@hitachivantara/uikit-react-lab 3.54.0 → 3.56.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 (67) hide show
  1. package/dist/Controls/Controls.d.ts +2 -10
  2. package/dist/Controls/RightControl/RightControl.d.ts +1 -1
  3. package/dist/StepNavigation/DefaultNavigation/DefaultNavigation.d.ts +3 -1
  4. package/dist/StepNavigation/DefaultNavigation/DefaultNavigation.js +2 -7
  5. package/dist/StepNavigation/DefaultNavigation/DefaultNavigation.js.map +1 -1
  6. package/dist/StepNavigation/DefaultNavigation/Step/Step.d.ts +7 -2
  7. package/dist/StepNavigation/DefaultNavigation/Step/Step.js +11 -4
  8. package/dist/StepNavigation/DefaultNavigation/Step/Step.js.map +1 -1
  9. package/dist/StepNavigation/DefaultNavigation/utils.js +3 -2
  10. package/dist/StepNavigation/DefaultNavigation/utils.js.map +1 -1
  11. package/dist/StepNavigation/SimpleNavigation/Dot/Dot.d.ts +1 -1
  12. package/dist/StepNavigation/SimpleNavigation/Dot/Dot.js +13 -9
  13. package/dist/StepNavigation/SimpleNavigation/Dot/Dot.js.map +1 -1
  14. package/dist/StepNavigation/SimpleNavigation/SimpleNavigation.d.ts +3 -1
  15. package/dist/StepNavigation/SimpleNavigation/SimpleNavigation.js +2 -9
  16. package/dist/StepNavigation/SimpleNavigation/SimpleNavigation.js.map +1 -1
  17. package/dist/StepNavigation/SimpleNavigation/utils.js +10 -8
  18. package/dist/StepNavigation/SimpleNavigation/utils.js.map +1 -1
  19. package/dist/StepNavigation/StepNavigation.d.ts +6 -5
  20. package/dist/StepNavigation/StepNavigation.js +21 -9
  21. package/dist/StepNavigation/StepNavigation.js.map +1 -1
  22. package/dist/Table/TableBody/TableBody.d.ts +4 -0
  23. package/dist/legacy/Controls/Controls.d.ts +2 -10
  24. package/dist/legacy/Controls/RightControl/RightControl.d.ts +1 -1
  25. package/dist/legacy/StepNavigation/DefaultNavigation/DefaultNavigation.d.ts +3 -1
  26. package/dist/legacy/StepNavigation/DefaultNavigation/DefaultNavigation.js +3 -8
  27. package/dist/legacy/StepNavigation/DefaultNavigation/DefaultNavigation.js.map +1 -1
  28. package/dist/legacy/StepNavigation/DefaultNavigation/Step/Step.d.ts +7 -2
  29. package/dist/legacy/StepNavigation/DefaultNavigation/Step/Step.js +11 -4
  30. package/dist/legacy/StepNavigation/DefaultNavigation/Step/Step.js.map +1 -1
  31. package/dist/legacy/StepNavigation/DefaultNavigation/utils.js +3 -2
  32. package/dist/legacy/StepNavigation/DefaultNavigation/utils.js.map +1 -1
  33. package/dist/legacy/StepNavigation/SimpleNavigation/Dot/Dot.d.ts +1 -1
  34. package/dist/legacy/StepNavigation/SimpleNavigation/Dot/Dot.js +15 -11
  35. package/dist/legacy/StepNavigation/SimpleNavigation/Dot/Dot.js.map +1 -1
  36. package/dist/legacy/StepNavigation/SimpleNavigation/SimpleNavigation.d.ts +3 -1
  37. package/dist/legacy/StepNavigation/SimpleNavigation/SimpleNavigation.js +3 -9
  38. package/dist/legacy/StepNavigation/SimpleNavigation/SimpleNavigation.js.map +1 -1
  39. package/dist/legacy/StepNavigation/SimpleNavigation/utils.js +9 -5
  40. package/dist/legacy/StepNavigation/SimpleNavigation/utils.js.map +1 -1
  41. package/dist/legacy/StepNavigation/StepNavigation.d.ts +6 -5
  42. package/dist/legacy/StepNavigation/StepNavigation.js +21 -9
  43. package/dist/legacy/StepNavigation/StepNavigation.js.map +1 -1
  44. package/dist/legacy/Table/TableBody/TableBody.d.ts +4 -0
  45. package/dist/modern/Controls/Controls.d.ts +2 -10
  46. package/dist/modern/Controls/RightControl/RightControl.d.ts +1 -1
  47. package/dist/modern/StepNavigation/DefaultNavigation/DefaultNavigation.d.ts +3 -1
  48. package/dist/modern/StepNavigation/DefaultNavigation/DefaultNavigation.js +3 -6
  49. package/dist/modern/StepNavigation/DefaultNavigation/DefaultNavigation.js.map +1 -1
  50. package/dist/modern/StepNavigation/DefaultNavigation/Step/Step.d.ts +7 -2
  51. package/dist/modern/StepNavigation/DefaultNavigation/Step/Step.js +11 -4
  52. package/dist/modern/StepNavigation/DefaultNavigation/Step/Step.js.map +1 -1
  53. package/dist/modern/StepNavigation/DefaultNavigation/utils.js +3 -2
  54. package/dist/modern/StepNavigation/DefaultNavigation/utils.js.map +1 -1
  55. package/dist/modern/StepNavigation/SimpleNavigation/Dot/Dot.d.ts +1 -1
  56. package/dist/modern/StepNavigation/SimpleNavigation/Dot/Dot.js +15 -9
  57. package/dist/modern/StepNavigation/SimpleNavigation/Dot/Dot.js.map +1 -1
  58. package/dist/modern/StepNavigation/SimpleNavigation/SimpleNavigation.d.ts +3 -1
  59. package/dist/modern/StepNavigation/SimpleNavigation/SimpleNavigation.js +3 -7
  60. package/dist/modern/StepNavigation/SimpleNavigation/SimpleNavigation.js.map +1 -1
  61. package/dist/modern/StepNavigation/SimpleNavigation/utils.js +7 -5
  62. package/dist/modern/StepNavigation/SimpleNavigation/utils.js.map +1 -1
  63. package/dist/modern/StepNavigation/StepNavigation.d.ts +6 -5
  64. package/dist/modern/StepNavigation/StepNavigation.js +21 -9
  65. package/dist/modern/StepNavigation/StepNavigation.js.map +1 -1
  66. package/dist/modern/Table/TableBody/TableBody.d.ts +4 -0
  67. package/package.json +3 -3
@@ -1,22 +1,14 @@
1
1
  import { StandardProps } from "@material-ui/core";
2
+ import { HvTableInstance } from "../Table";
2
3
 
3
4
  export type HvControlsClassKey = "root" | "rightSection" | "leftSection";
4
5
 
5
- export interface HvControlsSortValue {
6
- id: string;
7
- desc: string;
8
- }
9
6
  export interface HvControlsViewConfiguration extends Record<string, unknown> {
10
7
  id: string;
11
8
  label: string;
12
9
  icon: React.ReactNode;
13
10
  }
14
11
 
15
- export interface HvControlsCallbacks extends Record<string, unknown> {
16
- setSortBy?: (v: HvControlsSortValue[]) => void;
17
- setGlobalFilter?: (v: string) => void;
18
- }
19
-
20
12
  export interface HvControlsProps
21
13
  extends StandardProps<React.HTMLAttributes<HTMLDivElement>, HvControlsClassKey> {
22
14
  /** Children to be rendered. */
@@ -29,7 +21,7 @@ export interface HvControlsProps
29
21
  * An instance of useHvTable or useTable used to manage the data
30
22
  * if this is not provided data sorting and search must be handled externally
31
23
  */
32
- callbacks?: HvControlsCallbacks;
24
+ callbacks?: Pick<HvTableInstance, "setSortBy" | "setGlobalFilter">;
33
25
  /**
34
26
  * Views configuration required for the view buttons
35
27
  */
@@ -10,7 +10,7 @@ export interface HvControlsViewConfiguration extends Record<string, unknown> {
10
10
  }
11
11
 
12
12
  export interface RightListControls extends ListValueProp {
13
- accesor: string;
13
+ accessor: string;
14
14
  desc: boolean;
15
15
  }
16
16
 
@@ -1,6 +1,8 @@
1
1
  import * as React from "react";
2
2
  import { StandardProps } from "@material-ui/core";
3
3
 
4
+ import { HvTheme } from "@hitachivantara/uikit-react-core";
5
+
4
6
  import { HvStepNavigationProps } from "../StepNavigation";
5
7
  import { HvStepProps } from "./Step";
6
8
 
@@ -12,7 +14,7 @@ export type ComponentChildProps = {
12
14
  separatorValues: {
13
15
  minWidth: number;
14
16
  maxWidth: number;
15
- getColor: (state: HvStepProps["state"]) => any;
17
+ getColor: (state: HvStepProps["state"], theme: HvTheme) => any;
16
18
  height: number;
17
19
  };
18
20
  stepValues: {
@@ -33,8 +33,7 @@ var HvDefaultNavigation = function HvDefaultNavigation(_ref) {
33
33
  getDynamicValues = _ref.getDynamicValues,
34
34
  children = _ref.children,
35
35
  other = (0, _objectWithoutProperties2.default)(_ref, _excluded);
36
- var theme = (0, _core.useTheme)(); // step values
37
-
36
+ // step values
38
37
  var _stepSizes$stepSize = _utils.stepSizes[stepSize],
39
38
  maxSize = _stepSizes$stepSize.container,
40
39
  minSize = _stepSizes$stepSize.avatar;
@@ -48,10 +47,6 @@ var HvDefaultNavigation = function HvDefaultNavigation(_ref) {
48
47
  separatorWidth = _getDynamicValues.separatorWidth; // separator values
49
48
 
50
49
 
51
- var getColor = function getColor(state) {
52
- return (0, _utils.getColor)(state === "Current" ? "Disabled" : state, theme);
53
- };
54
-
55
50
  var maxWidth = Math.max(titleWidth - minSize, separatorWidth);
56
51
  var minWidth = Math.max(titleWidth - (maxSize + minSize) * 0.5, separatorWidth); //
57
52
 
@@ -69,7 +64,7 @@ var HvDefaultNavigation = function HvDefaultNavigation(_ref) {
69
64
  separatorValues: {
70
65
  minWidth: minWidth,
71
66
  maxWidth: maxWidth,
72
- getColor: getColor,
67
+ getColor: _utils.getColor,
73
68
  height: 3
74
69
  },
75
70
  stepValues: {
@@ -1 +1 @@
1
- {"version":3,"file":"DefaultNavigation.js","names":["HvDefaultNavigation","numSteps","stepSize","getTitles","getDynamicValues","children","other","theme","useTheme","stepSizes","maxSize","container","minSize","avatar","StepComponent","HvStep","stepsWidth","width","titleWidth","separatorWidth","getColor","state","getStateColor","maxWidth","Math","max","minWidth","Steps","titles","variant","navWidth","separatorValues","height","stepValues","propTypes","className","PropTypes","string","classes","shape","root","isRequired","number","oneOf","func","elementType","withStyles","styles","name"],"sources":["../../../src/StepNavigation/DefaultNavigation/DefaultNavigation.js"],"sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\n\nimport { useTheme, withStyles } from \"@material-ui/core\";\n\nimport HvStep from \"./Step\";\nimport { getColor as getStateColor, stepSizes } from \"./utils\";\nimport styles from \"./styles\";\n\n/**\n * Default Navigation\n */\nconst HvDefaultNavigation = ({\n numSteps,\n stepSize,\n getTitles,\n getDynamicValues,\n children,\n ...other\n}) => {\n const theme = useTheme();\n\n // step values\n const { container: maxSize, avatar: minSize } = stepSizes[stepSize];\n const StepComponent = HvStep;\n //\n\n const stepsWidth = maxSize + minSize * (numSteps - 1);\n const { width, titleWidth, separatorWidth } = getDynamicValues(stepsWidth);\n\n // separator values\n const getColor = (state) => getStateColor(state === \"Current\" ? \"Disabled\" : state, theme);\n const maxWidth = Math.max(titleWidth - minSize, separatorWidth);\n const minWidth = Math.max(titleWidth - (maxSize + minSize) * 0.5, separatorWidth);\n //\n\n const Steps = children;\n\n const titles = getTitles(({ state }) => ({\n variant: state === \"Disabled\" ? \"disabledText\" : \"highlightText\",\n titleWidth,\n }));\n\n return (\n <div {...other}>\n <Steps\n {...{\n stepsWidth,\n navWidth: width,\n separatorValues: {\n minWidth,\n maxWidth,\n getColor,\n height: 3,\n },\n stepValues: {\n minSize,\n maxSize,\n StepComponent,\n },\n }}\n />\n {titles}\n </div>\n );\n};\n\nHvDefaultNavigation.propTypes = {\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the component root class.\n */\n root: PropTypes.string,\n }).isRequired,\n /**\n * Number of steps to show on the component.\n */\n numSteps: PropTypes.number.isRequired,\n /**\n * Sets one of the standard sizes of the steps\n */\n stepSize: PropTypes.oneOf([\"XS\", \"SM\", \"MD\", \"LG\", \"XL\"]).isRequired,\n /**\n * Returns dynamic width values of the component (width, titleWidth, separatorWidth).\n */\n getDynamicValues: PropTypes.func.isRequired,\n /**\n * Returns a JSX.element of the titles container.\n */\n getTitles: PropTypes.func.isRequired,\n /**\n * Component to render Step Navigation with props = {separatorValues, stepValues, stepsWidth}\n */\n children: PropTypes.elementType.isRequired,\n};\n\nexport default withStyles(styles, { name: \"HvDefaultNavigation\" })(HvDefaultNavigation);\n"],"mappings":";;;;;;;;;;;AAAA;;AACA;;AAEA;;AAEA;;AACA;;AACA;;;;AAEA;AACA;AACA;AACA,IAAMA,mBAAmB,GAAG,SAAtBA,mBAAsB,OAOtB;EAAA,IANJC,QAMI,QANJA,QAMI;EAAA,IALJC,QAKI,QALJA,QAKI;EAAA,IAJJC,SAII,QAJJA,SAII;EAAA,IAHJC,gBAGI,QAHJA,gBAGI;EAAA,IAFJC,QAEI,QAFJA,QAEI;EAAA,IADDC,KACC;EACJ,IAAMC,KAAK,GAAG,IAAAC,cAAA,GAAd,CADI,CAGJ;;EACA,0BAAgDC,gBAAA,CAAUP,QAAV,CAAhD;EAAA,IAAmBQ,O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EAAE;MACVrB,OAAO,EAAPA,OADU;MAEVF,OAAO,EAAPA,OAFU;MAGVI,aAAa,EAAbA;IAHU;EAVhB,EADF,EAkBGc,MAlBH,CADF;AAsBD,CArDD;;AAuDA,wCAAA5B,mBAAmB,CAACkC,SAApB,GAAgC;EAC9B;AACF;AACA;EACEC,SAAS,EAAEC,kBAAA,CAAUC,MAJS;;EAK9B;AACF;AACA;EACEC,OAAO,EAAEF,kBAAA,CAAUG,KAAV,CAAgB;IACvB;AACJ;AACA;IACIC,IAAI,EAAEJ,kBAAA,CAAUC;EAJO,CAAhB,EAKNI,UAb2B;;EAc9B;AACF;AACA;EACExC,QAAQ,EAAEmC,kBAAA,CAAUM,MAAV,CAAiBD,UAjBG;;EAkB9B;AACF;AACA;EACEvC,QAAQ,EAAEkC,kBAAA,CAAUO,KAAV,CAAgB,CAAC,IAAD,EAAO,IAAP,EAAa,IAAb,EAAmB,IAAnB,EAAyB,IAAzB,CAAhB,EAAgDF,UArB5B;;EAsB9B;AACF;AACA;EACErC,gBAAgB,EAAEgC,kBAAA,CAAUQ,IAAV,CAAeH,UAzBH;;EA0B9B;AACF;AACA;EACEtC,SAAS,EAAEiC,kBAAA,CAAUQ,IAAV,CAAeH,UA7BI;;EA8B9B;AACF;AACA;EACEpC,QAAQ,EAAE+B,kBAAA,CAAUS,WAAV,CAAsBJ;AAjCF,CAAhC;;eAoCe,IAAAK,gBAAA,EAAWC,eAAX,EAAmB;EAAEC,IAAI,EAAE;AAAR,CAAnB,EAAoDhD,mBAApD,C"}
1
+ {"version":3,"file":"DefaultNavigation.js","names":["HvDefaultNavigation","numSteps","stepSize","getTitles","getDynamicValues","children","other","stepSizes","maxSize","container","minSize","avatar","StepComponent","HvStep","stepsWidth","width","titleWidth","separatorWidth","maxWidth","Math","max","minWidth","Steps","titles","state","variant","navWidth","separatorValues","getColor","height","stepValues","propTypes","className","PropTypes","string","classes","shape","root","isRequired","number","oneOf","func","elementType","withStyles","styles","name"],"sources":["../../../src/StepNavigation/DefaultNavigation/DefaultNavigation.js"],"sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\n\nimport { withStyles } from \"@material-ui/core\";\n\nimport HvStep from \"./Step\";\nimport { getColor, stepSizes } from \"./utils\";\nimport styles from \"./styles\";\n\n/**\n * Default Navigation\n */\nconst HvDefaultNavigation = ({\n numSteps,\n stepSize,\n getTitles,\n getDynamicValues,\n children,\n ...other\n}) => {\n // step values\n const { container: maxSize, avatar: minSize } = stepSizes[stepSize];\n const StepComponent = HvStep;\n //\n\n const stepsWidth = maxSize + minSize * (numSteps - 1);\n const { width, titleWidth, separatorWidth } = getDynamicValues(stepsWidth);\n\n // separator values\n const maxWidth = Math.max(titleWidth - minSize, separatorWidth);\n const minWidth = Math.max(titleWidth - (maxSize + minSize) * 0.5, separatorWidth);\n //\n\n const Steps = children;\n\n const titles = getTitles(({ state }) => ({\n variant: state === \"Disabled\" ? \"disabledText\" : \"highlightText\",\n titleWidth,\n }));\n\n return (\n <div {...other}>\n <Steps\n {...{\n stepsWidth,\n navWidth: width,\n separatorValues: {\n minWidth,\n maxWidth,\n getColor,\n height: 3,\n },\n stepValues: {\n minSize,\n maxSize,\n StepComponent,\n },\n }}\n />\n {titles}\n </div>\n );\n};\n\nHvDefaultNavigation.propTypes = {\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the component root class.\n */\n root: PropTypes.string,\n }).isRequired,\n /**\n * Number of steps to show on the component.\n */\n numSteps: PropTypes.number.isRequired,\n /**\n * Sets one of the standard sizes of the steps\n */\n stepSize: PropTypes.oneOf([\"XS\", \"SM\", \"MD\", \"LG\", \"XL\"]).isRequired,\n /**\n * Returns dynamic width values of the component (width, titleWidth, separatorWidth).\n */\n getDynamicValues: PropTypes.func.isRequired,\n /**\n * Returns a JSX.element of the titles container.\n */\n getTitles: PropTypes.func.isRequired,\n /**\n * Component to render Step Navigation with props = {separatorValues, stepValues, stepsWidth}\n */\n children: PropTypes.elementType.isRequired,\n};\n\nexport default withStyles(styles, { name: \"HvDefaultNavigation\" })(HvDefaultNavigation);\n"],"mappings":";;;;;;;;;;;AAAA;;AACA;;AAEA;;AAEA;;AACA;;AACA;;;;AAEA;AACA;AACA;AACA,IAAMA,mBAAmB,GAAG,SAAtBA,mBAAsB,OAOtB;EAAA,IANJC,QAMI,QANJA,QAMI;EAAA,IALJC,QAKI,QALJA,QAKI;EAAA,IAJJC,SAII,QAJJA,SAII;EAAA,IAHJC,gBAGI,QAHJA,gBAGI;EAAA,IAFJC,QAEI,QAFJA,QAEI;EAAA,IADDC,KACC;EACJ;EACA,0BAAgDC,gBAAA,CAAUL,QAAV,CAAhD;EAAA,IAAmBM,OAAnB,uBAAQC,SAAR;EAAA,IAAoCC,OAApC,uBAA4BC,MAA5B;EACA,IAAMC,aAAa,GAAGC,aAAtB,CAHI,CAIJ;;EAEA,IAAMC,UAAU,GAAGN,OAAO,GAAGE,OAAO,IAAIT,QAAQ,GAAG,CAAf,CAApC;;EACA,wBAA8CG,gBAAgB,CAACU,UAAD,CAA9D;EAAA,IAAQC,KAAR,qBAAQA,KAAR;EAAA,IAAeC,UAAf,qBAAeA,UAAf;EAAA,IAA2BC,cAA3B,qBAA2BA,cAA3B,CAPI,CASJ;;;EACA,IAAMC,QAAQ,GAAGC,IAAI,CAACC,GAAL,CAASJ,UAAU,GAAGN,OAAtB,EAA+BO,cAA/B,CAAjB;EACA,IAAMI,QAAQ,GAAGF,IAAI,CAACC,GAAL,CAASJ,UAAU,GAAG,CAACR,OAAO,GAAGE,OAAX,IAAsB,GAA5C,EAAiDO,cAAjD,CAAjB,CAXI,CAYJ;;EAEA,IAAMK,KAAK,GAAGjB,QAAd;EAEA,IAAMkB,MAAM,GAAGpB,SAAS,CAAC;IAAA,IAAGqB,KAAH,SAAGA,KAAH;IAAA,OAAgB;MACvCC,OAAO,EAAED,KAAK,KAAK,UAAV,GAAuB,cAAvB,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,CAAnB,EAAoD7C,mBAApD,C"}
@@ -7,9 +7,9 @@ export type HvStepClassKey = "root";
7
7
  export type HvStepProps = StandardProps<React.HTMLAttributes<HTMLDivElement>, HvStepClassKey> &
8
8
  Pick<HvButtonProps, "onClick"> & {
9
9
  /**
10
- * State of the step. Values = {"Pending", "Failed", "Completed", "Current", "Disabled"}
10
+ * State of the step. Values = {"Pending", "Failed", "Completed", "Current", "Disabled", "Enabled"}
11
11
  */
12
- state: "Pending" | "Failed" | "Completed" | "Current" | "Disabled";
12
+ state: "Pending" | "Failed" | "Completed" | "Current" | "Disabled" | "Enabled";
13
13
  /**
14
14
  * Title of the step.
15
15
  */
@@ -22,6 +22,11 @@ export type HvStepProps = StandardProps<React.HTMLAttributes<HTMLDivElement>, Hv
22
22
  * Number of the step.
23
23
  */
24
24
  number?: number;
25
+ /**
26
+ * Define if a step is disabled/enabled.
27
+ * If this property is not defined and the step is on state "Disabled", the step component will be disabled
28
+ */
29
+ disabled?: boolean;
25
30
  };
26
31
 
27
32
  export default function HvStep(props: HvStepProps): JSX.Element | null;
@@ -34,6 +34,7 @@ var HvStep = function HvStep(_ref) {
34
34
  state = _ref.state,
35
35
  title = _ref.title,
36
36
  onClick = _ref.onClick,
37
+ disabled = _ref.disabled,
37
38
  _ref$size = _ref.size,
38
39
  size = _ref$size === void 0 ? "SM" : _ref$size,
39
40
  _ref$number = _ref.number,
@@ -73,7 +74,7 @@ var HvStep = function HvStep(_ref) {
73
74
  "aria-label": "step-".concat(title),
74
75
  icon: true,
75
76
  overrideIconColors: false,
76
- disabled: ["Current", "Disabled"].includes(state),
77
+ disabled: disabled !== null && disabled !== void 0 ? disabled : ["Current", "Disabled"].includes(state),
77
78
  onClick: onClick
78
79
  }, /*#__PURE__*/_react.default.createElement(_uikitReactCore.HvAvatar, {
79
80
  className: (0, _clsx.default)(classes.avatar, classes[size]),
@@ -161,9 +162,9 @@ process.env.NODE_ENV !== "production" ? HvStep.propTypes = {
161
162
  size: _propTypes.default.oneOf(["XS", "SM", "MD", "LG", "XL"]),
162
163
 
163
164
  /**
164
- * State of the step. Values = {"Pending", "Failed", "Completed", "Current", "Disabled"}
165
+ * State of the step. Values = {"Pending", "Failed", "Completed", "Current", "Disabled", "Enabled"}
165
166
  */
166
- state: _propTypes.default.oneOf(["Pending", "Failed", "Completed", "Current", "Disabled"]).isRequired,
167
+ state: _propTypes.default.oneOf(["Pending", "Failed", "Completed", "Current", "Disabled", "Enabled"]).isRequired,
167
168
 
168
169
  /**
169
170
  * Title of the step.
@@ -178,7 +179,13 @@ process.env.NODE_ENV !== "production" ? HvStep.propTypes = {
178
179
  /**
179
180
  * Event onClick of the step.
180
181
  */
181
- onClick: _propTypes.default.func
182
+ onClick: _propTypes.default.func,
183
+
184
+ /**
185
+ * Define if a step is disabled/enabled.
186
+ * If this property is not defined and the step is on state "Disabled", the step component will be disabled
187
+ */
188
+ disabled: _propTypes.default.bool
182
189
  } : void 0;
183
190
 
184
191
  var _default = (0, _core.withStyles)(_styles.default, {
@@ -1 +1 @@
1
- {"version":3,"file":"Step.js","names":["HvStep","className","classes","state","title","onClick","size","number","iconSize","XS","SM","MD","LG","XL","squareL","Pending","Failed","Completed","svgSize","backgroundColor","getColor","color","undefined","semantic","status","IconComponent","HourGlass","Level3Bad","Level0Good","clsx","root","ghost","ghostDisabled","includes","avatar","propTypes","PropTypes","string","shape","stepTitle","isRequired","oneOf","func","withStyles","styles","name"],"sources":["../../../../src/StepNavigation/DefaultNavigation/Step/Step.js"],"sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\n\nimport { withStyles } from \"@material-ui/core\";\n\nimport { Level0Good, Level3Bad, HourGlass } from \"@hitachivantara/uikit-react-icons\";\nimport { HvAvatar, HvButton } from \"@hitachivantara/uikit-react-core\";\n\nimport { getColor } from \"../utils\";\nimport styles from \"./styles\";\n\n/**\n * Step element of \"Default\" Step Navigation root component\n */\nconst HvStep = ({ className, classes, state, title, onClick, size = \"SM\", number = 1 }) => {\n const iconSize = {\n XS: \"XS\",\n SM: \"XS\",\n MD: \"S\",\n LG: \"M\",\n XL: \"M\",\n }[size];\n\n const squareL = {\n Pending: 16,\n Failed: 24,\n Completed: 24,\n }[state];\n\n const svgSize = {\n XS: squareL - 8,\n SM: squareL,\n MD: squareL + 8,\n LG: squareL + 16,\n XL: squareL + 24,\n }[size];\n\n const backgroundColor = getColor(state);\n\n const color = state === \"Pending\" ? \"atmo2\" : undefined;\n\n const semantic = state !== \"Pending\" ? backgroundColor : undefined;\n\n const status = state === \"Current\" ? \"atmo5\" : undefined;\n\n const IconComponent = {\n Pending: HourGlass,\n Failed: Level3Bad,\n Completed: Level0Good,\n }[state];\n\n return (\n <div\n className={clsx(className, classes.root, { [classes[\"not-current\"]]: state !== \"Current\" })}\n >\n <HvButton\n className={clsx(classes.ghost, { [classes.ghostDisabled]: state === \"Current\" })}\n aria-label={`step-${title}`}\n icon\n overrideIconColors={false}\n disabled={[\"Current\", \"Disabled\"].includes(state)}\n onClick={onClick}\n >\n <HvAvatar\n className={clsx(classes.avatar, classes[size])}\n backgroundColor={backgroundColor}\n status={status}\n size={size}\n >\n {IconComponent ? (\n <IconComponent\n color={color}\n semantic={semantic}\n width={svgSize}\n height={svgSize}\n iconSize={iconSize}\n />\n ) : (\n number\n )}\n </HvAvatar>\n </HvButton>\n </div>\n );\n};\n\nHvStep.propTypes = {\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the component root class.\n */\n root: PropTypes.string,\n /**\n * Styles applied to the ghost class.\n */\n ghost: PropTypes.string,\n /**\n * Styles applied to the ghostDisabled class.\n */\n ghostDisabled: PropTypes.string,\n /**\n * Styles applied to the root element when step is not in \"current\" state.\n */\n \"not-current\": PropTypes.string,\n /**\n * Styles applied to the root element when size is XS.\n */\n XS: PropTypes.string,\n /**\n * Styles applied to the root element when size is SM.\n */\n SM: PropTypes.string,\n /**\n * Styles applied to the root element when size is MD.\n */\n MD: PropTypes.string,\n /**\n * Styles applied to the root element when size is LG.\n */\n LG: PropTypes.string,\n /**\n * Styles applied to the root element when size is XL.\n */\n XL: PropTypes.string,\n /**\n * Styles applied to the avatar element.\n */\n avatar: PropTypes.string,\n /**\n * Styles applied to the title of a step element.\n */\n stepTitle: PropTypes.string,\n }).isRequired,\n /**\n * Sets one of the standard sizes of the step\n */\n size: PropTypes.oneOf([\"XS\", \"SM\", \"MD\", \"LG\", \"XL\"]),\n /**\n * State of the step. Values = {\"Pending\", \"Failed\", \"Completed\", \"Current\", \"Disabled\"}\n */\n state: PropTypes.oneOf([\"Pending\", \"Failed\", \"Completed\", \"Current\", \"Disabled\"]).isRequired,\n /**\n * Title of the step.\n */\n title: PropTypes.string.isRequired,\n /**\n * Number of the step.\n */\n number: PropTypes.number,\n /**\n * Event onClick of the step.\n */\n onClick: PropTypes.func,\n};\n\nexport default withStyles(styles, { name: \"HvStep\" })(HvStep);\n"],"mappings":";;;;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;AAEA;;AACA;;AAEA;;AACA;;AAEA;AACA;AACA;AACA,IAAMA,MAAM,GAAG,SAATA,MAAS,OAA4E;EAAA,IAAzEC,SAAyE,QAAzEA,SAAyE;EAAA,IAA9DC,OAA8D,QAA9DA,OAA8D;EAAA,IAArDC,KAAqD,QAArDA,KAAqD;EAAA,IAA9CC,KAA8C,QAA9CA,KAA8C;EAAA,IAAvCC,OAAuC,QAAvCA,OAAuC;EAAA,qBAA9BC,IAA8B;EAAA,IAA9BA,IAA8B,0BAAvB,IAAuB;EAAA,uBAAjBC,MAAiB;EAAA,IAAjBA,MAAiB,4BAAR,CAAQ;EACzF,IAAMC,QAAQ,GAAG;IACfC,EAAE,EAAE,IADW;IAEfC,EAAE,EAAE,IAFW;IAGfC,EAAE,EAAE,GAHW;IAIfC,EAAE,EAAE,GAJW;IAKfC,EAAE,EAAE;EALW,EAMfP,IANe,CAAjB;EAQA,I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A,CAAUC;EA5CE,CAAhB,EA6CNG,UArDc;;EAsDjB;AACF;AACA;EACElC,IAAI,EAAE8B,kBAAA,CAAUK,KAAV,CAAgB,CAAC,IAAD,EAAO,IAAP,EAAa,IAAb,EAAmB,IAAnB,EAAyB,IAAzB,CAAhB,CAzDW;;EA0DjB;AACF;AACA;EACEtC,KAAK,EAAEiC,kBAAA,CAAUK,KAAV,CAAgB,CAAC,SAAD,EAAY,QAAZ,EAAsB,WAAtB,EAAmC,SAAnC,EAA8C,UAA9C,CAAhB,EAA2ED,UA7DjE;;EA8DjB;AACF;AACA;EACEpC,KAAK,EAAEgC,kBAAA,CAAUC,MAAV,CAAiBG,UAjEP;;EAkEjB;AACF;AACA;EACEjC,MAAM,EAAE6B,kBAAA,CAAU7B,MArED;;EAsEjB;AACF;AACA;EACEF,OAAO,EAAE+B,kBAAA,CAAUM;AAzEF,CAAnB;;eA4Ee,IAAAC,gBAAA,EAAWC,eAAX,EAAmB;EAAEC,IAAI,EAAE;AAAR,CAAnB,EAAuC7C,MAAvC,C"}
1
+ {"version":3,"file":"Step.js","names":["HvStep","className","classes","state","title","onClick","disabled","size","number","iconSize","XS","SM","MD","LG","XL","squareL","Pending","Failed","Completed","svgSize","backgroundColor","getColor","color","undefined","semantic","status","IconComponent","HourGlass","Level3Bad","Level0Good","clsx","root","ghost","ghostDisabled","includes","avatar","propTypes","PropTypes","string","shape","stepTitle","isRequired","oneOf","func","bool","withStyles","styles","name"],"sources":["../../../../src/StepNavigation/DefaultNavigation/Step/Step.js"],"sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\n\nimport { withStyles } from \"@material-ui/core\";\n\nimport { Level0Good, Level3Bad, HourGlass } from \"@hitachivantara/uikit-react-icons\";\nimport { HvAvatar, HvButton } from \"@hitachivantara/uikit-react-core\";\n\nimport { getColor } from \"../utils\";\nimport styles from \"./styles\";\n\n/**\n * Step element of \"Default\" Step Navigation root component\n */\nconst HvStep = ({\n className,\n classes,\n state,\n title,\n onClick,\n disabled,\n size = \"SM\",\n number = 1,\n}) => {\n const iconSize = {\n XS: \"XS\",\n SM: \"XS\",\n MD: \"S\",\n LG: \"M\",\n XL: \"M\",\n }[size];\n\n const squareL = {\n Pending: 16,\n Failed: 24,\n Completed: 24,\n }[state];\n\n const svgSize = {\n XS: squareL - 8,\n SM: squareL,\n MD: squareL + 8,\n LG: squareL + 16,\n XL: squareL + 24,\n }[size];\n\n const backgroundColor = getColor(state);\n\n const color = state === \"Pending\" ? \"atmo2\" : undefined;\n\n const semantic = state !== \"Pending\" ? backgroundColor : undefined;\n\n const status = state === \"Current\" ? \"atmo5\" : undefined;\n\n const IconComponent = {\n Pending: HourGlass,\n Failed: Level3Bad,\n Completed: Level0Good,\n }[state];\n\n return (\n <div\n className={clsx(className, classes.root, { [classes[\"not-current\"]]: state !== \"Current\" })}\n >\n <HvButton\n className={clsx(classes.ghost, { [classes.ghostDisabled]: state === \"Current\" })}\n aria-label={`step-${title}`}\n icon\n overrideIconColors={false}\n disabled={disabled ?? [\"Current\", \"Disabled\"].includes(state)}\n onClick={onClick}\n >\n <HvAvatar\n className={clsx(classes.avatar, classes[size])}\n backgroundColor={backgroundColor}\n status={status}\n size={size}\n >\n {IconComponent ? (\n <IconComponent\n color={color}\n semantic={semantic}\n width={svgSize}\n height={svgSize}\n iconSize={iconSize}\n />\n ) : (\n number\n )}\n </HvAvatar>\n </HvButton>\n </div>\n );\n};\n\nHvStep.propTypes = {\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the component root class.\n */\n root: PropTypes.string,\n /**\n * Styles applied to the ghost class.\n */\n ghost: PropTypes.string,\n /**\n * Styles applied to the ghostDisabled class.\n */\n ghostDisabled: PropTypes.string,\n /**\n * Styles applied to the root element when step is not in \"current\" state.\n */\n \"not-current\": PropTypes.string,\n /**\n * Styles applied to the root element when size is XS.\n */\n XS: PropTypes.string,\n /**\n * Styles applied to the root element when size is SM.\n */\n SM: PropTypes.string,\n /**\n * Styles applied to the root element when size is MD.\n */\n MD: PropTypes.string,\n /**\n * Styles applied to the root element when size is LG.\n */\n LG: PropTypes.string,\n /**\n * Styles applied to the root element when size is XL.\n */\n XL: PropTypes.string,\n /**\n * Styles applied to the avatar element.\n */\n avatar: PropTypes.string,\n /**\n * Styles applied to the title of a step element.\n */\n stepTitle: PropTypes.string,\n }).isRequired,\n /**\n * Sets one of the standard sizes of the step\n */\n size: PropTypes.oneOf([\"XS\", \"SM\", \"MD\", \"LG\", \"XL\"]),\n /**\n * State of the step. Values = {\"Pending\", \"Failed\", \"Completed\", \"Current\", \"Disabled\", \"Enabled\"}\n */\n state: PropTypes.oneOf([\"Pending\", \"Failed\", \"Completed\", \"Current\", \"Disabled\", \"Enabled\"])\n .isRequired,\n /**\n * Title of the step.\n */\n title: PropTypes.string.isRequired,\n /**\n * Number of the step.\n */\n number: PropTypes.number,\n /**\n * Event onClick of the step.\n */\n onClick: PropTypes.func,\n /**\n * Define if a step is disabled/enabled.\n * If this property is not defined and the step is on state \"Disabled\", the step component will be disabled\n */\n disabled: PropTypes.bool,\n};\n\nexport default withStyles(styles, { name: \"HvStep\" })(HvStep);\n"],"mappings":";;;;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;AAEA;;AACA;;AAEA;;AACA;;AAEA;AACA;AACA;AACA,IAAMA,MAAM,GAAG,SAATA,MAAS,OAST;EAAA,IARJC,SAQI,QARJA,SAQI;EAAA,IAPJC,OAOI,QAPJA,OAOI;EAAA,IANJC,KAMI,QANJA,KAMI;EAAA,IALJC,KAKI,QALJA,KAKI;EAAA,IAJJC,OAII,QAJJA,OAII;EAAA,IAHJC,QAGI,QAHJA,QAGI;EAAA,qBAFJC,IAEI;EAAA,IAFJA,IAEI,0BAFG,IAEH;EAAA,uBADJC,MACI;EAAA,IADJA,MACI,4BADK,CACL;EACJ,IAAMC,QAAQ,GAAG;IACfC,EAA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CAAUC,MAhCS;;IAiCvB;AACJ;AACA;IACIxB,EAAE,EAAEuB,kBAAA,CAAUC,MApCS;;IAqCvB;AACJ;AACA;IACIH,MAAM,EAAEE,kBAAA,CAAUC,MAxCK;;IAyCvB;AACJ;AACA;IACIE,SAAS,EAAEH,kBAAA,CAAUC;EA5CE,CAAhB,EA6CNG,UArDc;;EAsDjB;AACF;AACA;EACElC,IAAI,EAAE8B,kBAAA,CAAUK,KAAV,CAAgB,CAAC,IAAD,EAAO,IAAP,EAAa,IAAb,EAAmB,IAAnB,EAAyB,IAAzB,CAAhB,CAzDW;;EA0DjB;AACF;AACA;EACEvC,KAAK,EAAEkC,kBAAA,CAAUK,KAAV,CAAgB,CAAC,SAAD,EAAY,QAAZ,EAAsB,WAAtB,EAAmC,SAAnC,EAA8C,UAA9C,EAA0D,SAA1D,CAAhB,EACJD,UA9Dc;;EA+DjB;AACF;AACA;EACErC,KAAK,EAAEiC,kBAAA,CAAUC,MAAV,CAAiBG,UAlEP;;EAmEjB;AACF;AACA;EACEjC,MAAM,EAAE6B,kBAAA,CAAU7B,MAtED;;EAuEjB;AACF;AACA;EACEH,OAAO,EAAEgC,kBAAA,CAAUM,IA1EF;;EA2EjB;AACF;AACA;AACA;EACErC,QAAQ,EAAE+B,kBAAA,CAAUO;AA/EH,CAAnB;;eAkFe,IAAAC,gBAAA,EAAWC,eAAX,EAAmB;EAAEC,IAAI,EAAE;AAAR,CAAnB,EAAuC/C,MAAvC,C"}
@@ -6,14 +6,15 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.stepSizes = exports.getColor = void 0;
7
7
 
8
8
  var getColor = function getColor(state, theme) {
9
- var _theme$hv$palette$sem, _theme$hv, _theme$hv$palette, _theme$hv$palette$sem2, _theme$hv$palette$sem3, _theme$hv2, _theme$hv2$palette, _theme$hv2$palette$se, _theme$hv$palette$sem4, _theme$hv3, _theme$hv3$palette, _theme$hv3$palette$se, _theme$hv$palette$acc, _theme$hv4, _theme$hv4$palette, _theme$hv4$palette$ac, _theme$hv$palette$atm, _theme$hv5, _theme$hv5$palette, _theme$hv5$palette$at;
9
+ var _theme$hv$palette$sem, _theme$hv, _theme$hv$palette, _theme$hv$palette$sem2, _theme$hv$palette$sem3, _theme$hv2, _theme$hv2$palette, _theme$hv2$palette$se, _theme$hv$palette$sem4, _theme$hv3, _theme$hv3$palette, _theme$hv3$palette$se, _theme$hv$palette$acc, _theme$hv4, _theme$hv4$palette, _theme$hv4$palette$ac, _theme$hv$palette$atm, _theme$hv5, _theme$hv5$palette, _theme$hv5$palette$at, _theme$hv$palette$acc2, _theme$hv6, _theme$hv6$palette, _theme$hv6$palette$ac;
10
10
 
11
11
  return {
12
12
  Pending: (_theme$hv$palette$sem = theme === null || theme === void 0 ? void 0 : (_theme$hv = theme.hv) === null || _theme$hv === void 0 ? void 0 : (_theme$hv$palette = _theme$hv.palette) === null || _theme$hv$palette === void 0 ? void 0 : (_theme$hv$palette$sem2 = _theme$hv$palette.semantic) === null || _theme$hv$palette$sem2 === void 0 ? void 0 : _theme$hv$palette$sem2.sema3) !== null && _theme$hv$palette$sem !== void 0 ? _theme$hv$palette$sem : "sema3",
13
13
  Failed: (_theme$hv$palette$sem3 = theme === null || theme === void 0 ? void 0 : (_theme$hv2 = theme.hv) === null || _theme$hv2 === void 0 ? void 0 : (_theme$hv2$palette = _theme$hv2.palette) === null || _theme$hv2$palette === void 0 ? void 0 : (_theme$hv2$palette$se = _theme$hv2$palette.semantic) === null || _theme$hv2$palette$se === void 0 ? void 0 : _theme$hv2$palette$se.sema4) !== null && _theme$hv$palette$sem3 !== void 0 ? _theme$hv$palette$sem3 : "sema4",
14
14
  Completed: (_theme$hv$palette$sem4 = theme === null || theme === void 0 ? void 0 : (_theme$hv3 = theme.hv) === null || _theme$hv3 === void 0 ? void 0 : (_theme$hv3$palette = _theme$hv3.palette) === null || _theme$hv3$palette === void 0 ? void 0 : (_theme$hv3$palette$se = _theme$hv3$palette.semantic) === null || _theme$hv3$palette$se === void 0 ? void 0 : _theme$hv3$palette$se.sema1) !== null && _theme$hv$palette$sem4 !== void 0 ? _theme$hv$palette$sem4 : "sema1",
15
15
  Current: (_theme$hv$palette$acc = theme === null || theme === void 0 ? void 0 : (_theme$hv4 = theme.hv) === null || _theme$hv4 === void 0 ? void 0 : (_theme$hv4$palette = _theme$hv4.palette) === null || _theme$hv4$palette === void 0 ? void 0 : (_theme$hv4$palette$ac = _theme$hv4$palette.accent) === null || _theme$hv4$palette$ac === void 0 ? void 0 : _theme$hv4$palette$ac.acce1) !== null && _theme$hv$palette$acc !== void 0 ? _theme$hv$palette$acc : "acce1",
16
- Disabled: (_theme$hv$palette$atm = theme === null || theme === void 0 ? void 0 : (_theme$hv5 = theme.hv) === null || _theme$hv5 === void 0 ? void 0 : (_theme$hv5$palette = _theme$hv5.palette) === null || _theme$hv5$palette === void 0 ? void 0 : (_theme$hv5$palette$at = _theme$hv5$palette.atmosphere) === null || _theme$hv5$palette$at === void 0 ? void 0 : _theme$hv5$palette$at.atmo5) !== null && _theme$hv$palette$atm !== void 0 ? _theme$hv$palette$atm : "atmo5"
16
+ Disabled: (_theme$hv$palette$atm = theme === null || theme === void 0 ? void 0 : (_theme$hv5 = theme.hv) === null || _theme$hv5 === void 0 ? void 0 : (_theme$hv5$palette = _theme$hv5.palette) === null || _theme$hv5$palette === void 0 ? void 0 : (_theme$hv5$palette$at = _theme$hv5$palette.atmosphere) === null || _theme$hv5$palette$at === void 0 ? void 0 : _theme$hv5$palette$at.atmo5) !== null && _theme$hv$palette$atm !== void 0 ? _theme$hv$palette$atm : "atmo5",
17
+ Enabled: (_theme$hv$palette$acc2 = theme === null || theme === void 0 ? void 0 : (_theme$hv6 = theme.hv) === null || _theme$hv6 === void 0 ? void 0 : (_theme$hv6$palette = _theme$hv6.palette) === null || _theme$hv6$palette === void 0 ? void 0 : (_theme$hv6$palette$ac = _theme$hv6$palette.accent) === null || _theme$hv6$palette$ac === void 0 ? void 0 : _theme$hv6$palette$ac.acce1) !== null && _theme$hv$palette$acc2 !== void 0 ? _theme$hv$palette$acc2 : "acce1"
17
18
  }[state];
18
19
  };
19
20
 
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","names":["getColor","state","theme","Pending","hv","palette","semantic","sema3","Failed","sema4","Completed","sema1","Current","accent","acce1","Disabled","atmosphere","atmo5","EXTRA_SMALL","container","avatar","SMALL","MEDIUM","LARGE","EXTRA_LARGE","stepSizes","XS","SM","MD","LG","XL"],"sources":["../../../src/StepNavigation/DefaultNavigation/utils.js"],"sourcesContent":["const getColor = (state, theme) =>\n ({\n Pending: theme?.hv?.palette?.semantic?.sema3 ?? \"sema3\",\n Failed: theme?.hv?.palette?.semantic?.sema4 ?? \"sema4\",\n Completed: theme?.hv?.palette?.semantic?.sema1 ?? \"sema1\",\n Current: theme?.hv?.palette?.accent?.acce1 ?? \"acce1\",\n Disabled: theme?.hv?.palette?.atmosphere?.atmo5 ?? \"atmo5\",\n }[state]);\n\nconst EXTRA_SMALL = { container: 32, avatar: 24 };\nconst SMALL = { container: 40, avatar: 32 };\nconst MEDIUM = { container: 48, avatar: 40 };\nconst LARGE = { container: 60, avatar: 52 };\nconst EXTRA_LARGE = { container: 96, avatar: 88 };\n\nconst stepSizes = {\n XS: EXTRA_SMALL,\n SM: SMALL,\n MD: MEDIUM,\n LG: LARGE,\n XL: EXTRA_LARGE,\n};\n\nexport { getColor, stepSizes };\n"],"mappings":";;;;;;;AAAA,IAAMA,QAAQ,GAAG,SAAXA,QAAW,CAACC,KAAD,EAAQC,KAAR;EAAA;;EAAA,OACd;IACCC,OAAO,2BAAED,KAAF,aAAEA,KAAF,oCAAEA,KAAK,CAAEE,EAAT,mEAAE,UAAWC,OAAb,gFAAE,kBAAoBC,QAAtB,2DAAE,uBAA8BC,KAAhC,yEAAyC,OADjD;IAECC,MAAM,4BAAEN,KAAF,aAAEA,KAAF,qCAAEA,KAAK,CAAEE,EAAT,qEAAE,WAAWC,OAAb,gFAAE,mBAAoBC,QAAtB,0DAAE,sBAA8BG,KAAhC,2EAAyC,OAFhD;IAGCC,SAAS,4BAAER,KAAF,aAAEA,KAAF,qCAAEA,KAAK,CAAEE,EAAT,qEAAE,WAAWC,OAAb,gFAAE,mBAAoBC,QAAtB,0DAAE,sBAA8BK,KAAhC,2EAAyC,OAHnD;IAICC,OAAO,2BAAEV,KAAF,aAAEA,KAAF,qCAAEA,KAAK,CAAEE,EAAT,qEAAE,WAAWC,OAAb,gFAAE,mBAAoBQ,MAAtB,0DAAE,sBAA4BC,KAA9B,yEAAuC,OAJ/C;IAKCC,QAAQ,2BAAEb,KAAF,aAAEA,KAAF,qCAAEA,KAAK,CAAEE,EAAT,qEAAE,WAAWC,OAAb,gFAAE,mBAAoBW,UAAtB,0DAAE,sBAAgCC,KAAlC,yEAA2C;EALpD,EAMChB,KAND,CADc;AAAA,CAAjB;;;AASA,IAAMiB,WAAW,GAAG;EAAEC,SAAS,EAAE,EAAb;EAAiBC,MAAM,EAAE;AAAzB,CAApB;AACA,IAAMC,KAAK,GAAG;EAAEF,SAAS,EAAE,EAAb;EAAiBC,MAAM,EAAE;AAAzB,CAAd;AACA,IAAME,MAAM,GAAG;EAAEH,SAAS,EAAE,EAAb;EAAiBC,MAAM,EAAE;AAAzB,CAAf;AACA,IAAMG,KAAK,GAAG;EAAEJ,SAAS,EAAE,EAAb;EAAiBC,MAAM,EAAE;AAAzB,CAAd;AACA,IAAMI,WAAW,GAAG;EAAEL,SAAS,EAAE,EAAb;EAAiBC,MAAM,EAAE;AAAzB,CAApB;AAEA,IAAMK,SAAS,GAAG;EAChBC,EAAE,EAAER,WADY;EAEhBS,EAAE,EAAEN,KAFY;EAGhBO,EAAE,EAAEN,MAHY;EAIhBO,EAAE,EAAEN,KAJY;EAKhBO,EAAE,EAAEN;AALY,CAAlB"}
1
+ {"version":3,"file":"utils.js","names":["getColor","state","theme","Pending","hv","palette","semantic","sema3","Failed","sema4","Completed","sema1","Current","accent","acce1","Disabled","atmosphere","atmo5","Enabled","EXTRA_SMALL","container","avatar","SMALL","MEDIUM","LARGE","EXTRA_LARGE","stepSizes","XS","SM","MD","LG","XL"],"sources":["../../../src/StepNavigation/DefaultNavigation/utils.js"],"sourcesContent":["const getColor = (state, theme) =>\n ({\n Pending: theme?.hv?.palette?.semantic?.sema3 ?? \"sema3\",\n Failed: theme?.hv?.palette?.semantic?.sema4 ?? \"sema4\",\n Completed: theme?.hv?.palette?.semantic?.sema1 ?? \"sema1\",\n Current: theme?.hv?.palette?.accent?.acce1 ?? \"acce1\",\n Disabled: theme?.hv?.palette?.atmosphere?.atmo5 ?? \"atmo5\",\n Enabled: theme?.hv?.palette?.accent?.acce1 ?? \"acce1\",\n }[state]);\n\nconst EXTRA_SMALL = { container: 32, avatar: 24 };\nconst SMALL = { container: 40, avatar: 32 };\nconst MEDIUM = { container: 48, avatar: 40 };\nconst LARGE = { container: 60, avatar: 52 };\nconst EXTRA_LARGE = { container: 96, avatar: 88 };\n\nconst stepSizes = {\n XS: EXTRA_SMALL,\n SM: SMALL,\n MD: MEDIUM,\n LG: LARGE,\n XL: EXTRA_LARGE,\n};\n\nexport { getColor, stepSizes };\n"],"mappings":";;;;;;;AAAA,IAAMA,QAAQ,GAAG,SAAXA,QAAW,CAACC,KAAD,EAAQC,KAAR;EAAA;;EAAA,OACd;IACCC,OAAO,2BAAED,KAAF,aAAEA,KAAF,oCAAEA,KAAK,CAAEE,EAAT,mEAAE,UAAWC,OAAb,gFAAE,kBAAoBC,QAAtB,2DAAE,uBAA8BC,KAAhC,yEAAyC,OADjD;IAECC,MAAM,4BAAEN,KAAF,aAAEA,KAAF,qCAAEA,KAAK,CAAEE,EAAT,qEAAE,WAAWC,OAAb,gFAAE,mBAAoBC,QAAtB,0DAAE,sBAA8BG,KAAhC,2EAAyC,OAFhD;IAGCC,SAAS,4BAAER,KAAF,aAAEA,KAAF,qCAAEA,KAAK,CAAEE,EAAT,qEAAE,WAAWC,OAAb,gFAAE,mBAAoBC,QAAtB,0DAAE,sBAA8BK,KAAhC,2EAAyC,OAHnD;IAICC,OAAO,2BAAEV,KAAF,aAAEA,KAAF,qCAAEA,KAAK,CAAEE,EAAT,qEAAE,WAAWC,OAAb,gFAAE,mBAAoBQ,MAAtB,0DAAE,sBAA4BC,KAA9B,yEAAuC,OAJ/C;IAKCC,QAAQ,2BAAEb,KAAF,aAAEA,KAAF,qCAAEA,KAAK,CAAEE,EAAT,qEAAE,WAAWC,OAAb,gFAAE,mBAAoBW,UAAtB,0DAAE,sBAAgCC,KAAlC,yEAA2C,OALpD;IAMCC,OAAO,4BAAEhB,KAAF,aAAEA,KAAF,qCAAEA,KAAK,CAAEE,EAAT,qEAAE,WAAWC,OAAb,gFAAE,mBAAoBQ,MAAtB,0DAAE,sBAA4BC,KAA9B,2EAAuC;EAN/C,EAOCb,KAPD,CADc;AAAA,CAAjB;;;AAUA,IAAMkB,WAAW,GAAG;EAAEC,SAAS,EAAE,EAAb;EAAiBC,MAAM,EAAE;AAAzB,CAApB;AACA,IAAMC,KAAK,GAAG;EAAEF,SAAS,EAAE,EAAb;EAAiBC,MAAM,EAAE;AAAzB,CAAd;AACA,IAAME,MAAM,GAAG;EAAEH,SAAS,EAAE,EAAb;EAAiBC,MAAM,EAAE;AAAzB,CAAf;AACA,IAAMG,KAAK,GAAG;EAAEJ,SAAS,EAAE,EAAb;EAAiBC,MAAM,EAAE;AAAzB,CAAd;AACA,IAAMI,WAAW,GAAG;EAAEL,SAAS,EAAE,EAAb;EAAiBC,MAAM,EAAE;AAAzB,CAApB;AAEA,IAAMK,SAAS,GAAG;EAChBC,EAAE,EAAER,WADY;EAEhBS,EAAE,EAAEN,KAFY;EAGhBO,EAAE,EAAEN,MAHY;EAIhBO,EAAE,EAAEN,KAJY;EAKhBO,EAAE,EAAEN;AALY,CAAlB"}
@@ -5,6 +5,6 @@ import { HvStepProps } from "../../DefaultNavigation/Step";
5
5
  export type HvDotClassKey = "root";
6
6
 
7
7
  export type HvDotProps = StandardProps<React.HTMLAttributes<HTMLDivElement>, HvDotClassKey> &
8
- Pick<HvStepProps, "size" | "title" | "state" | "onClick">;
8
+ Pick<HvStepProps, "size" | "title" | "state" | "onClick" | "disabled">;
9
9
 
10
10
  export default function HvDot(props: HvDotProps): JSX.Element | null;
@@ -68,14 +68,12 @@ var HvDot = function HvDot(_ref) {
68
68
  state = _ref.state,
69
69
  title = _ref.title,
70
70
  size = _ref.size,
71
- onClick = _ref.onClick;
71
+ onClick = _ref.onClick,
72
+ disabled = _ref.disabled;
72
73
  var dotSize = _utils.dotSizes[size] * (state === "Current" ? 1.5 : 1);
73
- var getBackgroundColor = (0, _react.useCallback)(function (theme) {
74
- return state === "Disabled" ? (0, _utils.disabledColor)(theme) : (0, _utils.defaultColor)(theme);
75
- }, [state]);
76
74
  var customClasses = (0, _react.useMemo)(function () {
77
75
  return (0, _core.makeStyles)(function (theme) {
78
- var backgroundColor = getBackgroundColor(theme);
76
+ var backgroundColor = (0, _utils.getColor)(state, theme);
79
77
  return {
80
78
  ghostDisabled: {},
81
79
  active: {},
@@ -95,13 +93,13 @@ var HvDot = function HvDot(_ref) {
95
93
  })
96
94
  };
97
95
  });
98
- }, [dotSize, getBackgroundColor])();
96
+ }, [dotSize, state])();
99
97
  return /*#__PURE__*/_react.default.createElement(_uikitReactCore.HvButton, {
100
- className: (0, _clsx.default)(classes.root, customClasses.ghost, className, "Current Disabled".includes(state) && customClasses.ghostDisabled, state === "Current" && customClasses.active),
98
+ className: (0, _clsx.default)(classes.root, customClasses.ghost, (disabled !== null && disabled !== void 0 ? disabled : "Current Disabled".includes(state)) && customClasses.ghostDisabled, className, state === "Current" && customClasses.active),
101
99
  "aria-label": "step-".concat(title),
102
100
  icon: true,
103
101
  overrideIconColors: false,
104
- disabled: ["Current", "Disabled"].includes(state),
102
+ disabled: disabled !== null && disabled !== void 0 ? disabled : ["Current", "Disabled"].includes(state),
105
103
  onClick: onClick
106
104
  }, []);
107
105
  };
@@ -155,7 +153,13 @@ process.env.NODE_ENV !== "production" ? HvDot.propTypes = {
155
153
  /**
156
154
  * Event onClick of the step.
157
155
  */
158
- onClick: _propTypes.default.func
156
+ onClick: _propTypes.default.func,
157
+
158
+ /**
159
+ * Define if a step is disabled/enabled.
160
+ * If this property is not defined and the step is on state "Disabled", the step component will be disabled
161
+ */
162
+ disabled: _propTypes.default.bool
159
163
  } : void 0;
160
164
 
161
165
  var _default = (0, _core.withStyles)(_styles.default, {
@@ -1 +1 @@
1
- {"version":3,"file":"Dot.js","names":["HvDot","classes","className","state","title","size","onClick","dotSize","dotSizes","getBackgroundColor","useCallback","theme","disabledColor","defaultColor","customClasses","useMemo","makeStyles","backgroundColor","ghostDisabled","active","ghost","styles","width","height","clsx","root","includes","propTypes","PropTypes","string","shape","isRequired","oneOf","func","withStyles","name"],"sources":["../../../../src/StepNavigation/SimpleNavigation/Dot/Dot.js"],"sourcesContent":["import React, { useCallback, useMemo } from \"react\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\n\nimport { HvButton } from \"@hitachivantara/uikit-react-core\";\nimport { makeStyles, withStyles } from \"@material-ui/core\";\n\nimport { defaultColor, disabledColor, dotSizes } from \"../utils\";\nimport styles from \"./styles\";\n\n/**\n * Step element of \"Simple\" Step Navigation root component\n */\nconst HvDot = ({ classes, className, state, title, size, onClick }) => {\n const dotSize = dotSizes[size] * (state === \"Current\" ? 1.5 : 1);\n const getBackgroundColor = useCallback(\n (theme) => (state === \"Disabled\" ? disabledColor(theme) : defaultColor(theme)),\n [state]\n );\n const customClasses = useMemo(\n () =>\n makeStyles((theme) => {\n const backgroundColor = getBackgroundColor(theme);\n return {\n ghostDisabled: {},\n active: {},\n ghost: {\n ...styles.ghost,\n width: dotSize,\n height: dotSize,\n backgroundColor,\n \"&:hover\": {\n backgroundColor,\n },\n \"&$ghostDisabled\": {\n ...styles.ghost[\"&$ghostDisabled\"],\n backgroundColor,\n },\n \"&$ghostDisabled&:hover\": {\n ...styles.ghost[\"&$ghostDisabled&:hover\"],\n backgroundColor,\n },\n },\n };\n }),\n [dotSize, getBackgroundColor]\n )();\n return (\n <HvButton\n className={clsx(\n classes.root,\n customClasses.ghost,\n {\n [customClasses.active]: state === \"Current\",\n [customClasses.ghostDisabled]: [\"Current\", \"Disabled\"].includes(state),\n },\n className\n )}\n aria-label={`step-${title}`}\n icon\n overrideIconColors={false}\n disabled={[\"Current\", \"Disabled\"].includes(state)}\n onClick={onClick}\n >\n {[]}\n </HvButton>\n );\n};\n\nHvDot.propTypes = {\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the component root class.\n */\n root: PropTypes.string,\n /**\n * Styles applied to the active class.\n */\n active: PropTypes.string,\n /**\n * Styles applied to the ghost class.\n */\n ghost: PropTypes.string,\n /**\n * Styles applied to the ghostDisabled class.\n */\n ghostDisabled: PropTypes.string,\n }).isRequired,\n /**\n * State of the step. Values = {\"Pending\", \"Failed\", \"Completed\", \"Current\", \"Disabled\"}\n */\n state: PropTypes.oneOf([\"Pending\", \"Failed\", \"Completed\", \"Current\", \"Disabled\"]).isRequired,\n /**\n * Title of the step.\n */\n title: PropTypes.string.isRequired,\n /**\n * Sets one of the standard sizes of the steps\n */\n size: PropTypes.oneOf([\"XS\", \"SM\", \"MD\", \"LG\", \"XL\"]).isRequired,\n /**\n * Event onClick of the step.\n */\n onClick: PropTypes.func,\n};\n\nexport default withStyles(styles, { name: \"HvDot\" })(HvDot);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;AACA;;AAEA;;AACA;;;;;;;;;;AAEA;AACA;AACA;AACA,IAAMA,KAAK,GAAG,SAARA,KAAQ,OAAyD;EAAA,IAAtDC,OAAsD,QAAtDA,OAAsD;EAAA,IAA7CC,SAA6C,QAA7CA,SAA6C;EAAA,IAAlCC,KAAkC,QAAlCA,KAAkC;EAAA,IAA3BC,KAA2B,QAA3BA,KAA2B;EA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tC,C"}
1
+ {"version":3,"file":"Dot.js","names":["HvDot","classes","className","state","title","size","onClick","disabled","dotSize","dotSizes","customClasses","useMemo","makeStyles","theme","backgroundColor","getColor","ghostDisabled","active","ghost","styles","width","height","clsx","root","includes","propTypes","PropTypes","string","shape","isRequired","oneOf","func","bool","withStyles","name"],"sources":["../../../../src/StepNavigation/SimpleNavigation/Dot/Dot.js"],"sourcesContent":["import React, { useMemo } from \"react\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\n\nimport { HvButton } from \"@hitachivantara/uikit-react-core\";\nimport { makeStyles, withStyles } from \"@material-ui/core\";\n\nimport { getColor, dotSizes } from \"../utils\";\nimport styles from \"./styles\";\n\n/**\n * Step element of \"Simple\" Step Navigation root component\n */\nconst HvDot = ({ classes, className, state, title, size, onClick, disabled }) => {\n const dotSize = dotSizes[size] * (state === \"Current\" ? 1.5 : 1);\n const customClasses = useMemo(\n () =>\n makeStyles((theme) => {\n const backgroundColor = getColor(state, theme);\n return {\n ghostDisabled: {},\n active: {},\n ghost: {\n ...styles.ghost,\n width: dotSize,\n height: dotSize,\n backgroundColor,\n \"&:hover\": {\n backgroundColor,\n },\n \"&$ghostDisabled\": {\n ...styles.ghost[\"&$ghostDisabled\"],\n backgroundColor,\n },\n \"&$ghostDisabled&:hover\": {\n ...styles.ghost[\"&$ghostDisabled&:hover\"],\n backgroundColor,\n },\n },\n };\n }),\n [dotSize, state]\n )();\n return (\n <HvButton\n className={clsx(\n classes.root,\n customClasses.ghost,\n {\n [customClasses.active]: state === \"Current\",\n [customClasses.ghostDisabled]: disabled ?? [\"Current\", \"Disabled\"].includes(state),\n },\n className\n )}\n aria-label={`step-${title}`}\n icon\n overrideIconColors={false}\n disabled={disabled ?? [\"Current\", \"Disabled\"].includes(state)}\n onClick={onClick}\n >\n {[]}\n </HvButton>\n );\n};\n\nHvDot.propTypes = {\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the component root class.\n */\n root: PropTypes.string,\n /**\n * Styles applied to the active class.\n */\n active: PropTypes.string,\n /**\n * Styles applied to the ghost class.\n */\n ghost: PropTypes.string,\n /**\n * Styles applied to the ghostDisabled class.\n */\n ghostDisabled: PropTypes.string,\n }).isRequired,\n /**\n * State of the step. Values = {\"Pending\", \"Failed\", \"Completed\", \"Current\", \"Disabled\"}\n */\n state: PropTypes.oneOf([\"Pending\", \"Failed\", \"Completed\", \"Current\", \"Disabled\"]).isRequired,\n /**\n * Title of the step.\n */\n title: PropTypes.string.isRequired,\n /**\n * Sets one of the standard sizes of the steps\n */\n size: PropTypes.oneOf([\"XS\", \"SM\", \"MD\", \"LG\", \"XL\"]).isRequired,\n /**\n * Event onClick of the step.\n */\n onClick: PropTypes.func,\n /**\n * Define if a step is disabled/enabled.\n * If this property is not defined and the step is on state \"Disabled\", the step component will be disabled\n */\n disabled: PropTypes.bool,\n};\n\nexport default withStyles(styles, { name: \"HvDot\" })(HvDot);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;AACA;;AAEA;;AACA;;;;;;;;;;AAEA;AACA;AACA;AACA,IAAMA,KAAK,GAAG,SAARA,KAAQ,OAAmE;EAAA,IAAhEC,OAAgE,QAAhEA,OAAgE;EAAA,IAAvDC,SAAuD,QAAvDA,SAAuD;EAAA,IAA5CC,KAA4C,QAA5CA,KAA4C;EAAA,IAArCC,KAAqC,QAArCA,KAAqC;EAAA,IAA9BC,IAA8B,QAA9BA,IAA8B;EAAA,IAAxBC,OAAwB,QAAxBA,OAAwB;EAAA,IAAfC,QAAe,QAAfA,QAAe;EAC/E,IAAMC,OAAO,GAAGC,eAAA,CAASJ,IAAT,KAAkBF,KAAK,KAAK,SAAV,GAAsB,GAAtB,GAA4B,CAA9C,CAAhB;EACA,IAAMO,aAAa,GAAG,IAAAC,cAAA,EACpB;IAAA,OACE,IAAAC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C,MAJL;;EAKhB;AACF;AACA;EACE1B,OAAO,EAAEyB,kBAAA,CAAUE,KAAV,CAAgB;IACvB;AACJ;AACA;IACIL,IAAI,EAAEG,kBAAA,CAAUC,MAJO;;IAKvB;AACJ;AACA;IACIV,MAAM,EAAES,kBAAA,CAAUC,MARK;;IASvB;AACJ;AACA;IACIT,KAAK,EAAEQ,kBAAA,CAAUC,MAZM;;IAavB;AACJ;AACA;IACIX,aAAa,EAAEU,kBAAA,CAAUC;EAhBF,CAAhB,EAiBNE,UAzBa;;EA0BhB;AACF;AACA;EACE1B,KAAK,EAAEuB,kBAAA,CAAUI,KAAV,CAAgB,CAAC,SAAD,EAAY,QAAZ,EAAsB,WAAtB,EAAmC,SAAnC,EAA8C,UAA9C,CAAhB,EAA2ED,UA7BlE;;EA8BhB;AACF;AACA;EACEzB,KAAK,EAAEsB,kBAAA,CAAUC,MAAV,CAAiBE,UAjCR;;EAkChB;AACF;AACA;EACExB,IAAI,EAAEqB,kBAAA,CAAUI,KAAV,CAAgB,CAAC,IAAD,EAAO,IAAP,EAAa,IAAb,EAAmB,IAAnB,EAAyB,IAAzB,CAAhB,EAAgDD,UArCtC;;EAsChB;AACF;AACA;EACEvB,OAAO,EAAEoB,kBAAA,CAAUK,IAzCH;;EA0ChB;AACF;AACA;AACA;EACExB,QAAQ,EAAEmB,kBAAA,CAAUM;AA9CJ,CAAlB;;eAiDe,IAAAC,gBAAA,EAAWd,eAAX,EAAmB;EAAEe,IAAI,EAAE;AAAR,CAAnB,EAAsClC,KAAtC,C"}
@@ -1,6 +1,8 @@
1
1
  import * as React from "react";
2
2
  import { StandardProps } from "@material-ui/core";
3
3
 
4
+ import { HvTheme } from "@hitachivantara/uikit-react-core";
5
+
4
6
  import { HvStepNavigationProps } from "../StepNavigation";
5
7
  import { HvDotProps } from "./Dot";
6
8
 
@@ -12,7 +14,7 @@ export type ComponentChildProps = {
12
14
  separatorValues: {
13
15
  minWidth: number;
14
16
  maxWidth: number;
15
- getColor: (state: HvDotProps["state"]) => any;
17
+ getColor: (state: HvDotProps["state"], theme: HvTheme) => any;
16
18
  height: number;
17
19
  };
18
20
  stepValues: {
@@ -7,8 +7,6 @@ Object.defineProperty(exports, "__esModule", {
7
7
  });
8
8
  exports.default = void 0;
9
9
 
10
- require("core-js/modules/es.array.includes.js");
11
-
12
10
  require("core-js/modules/es.array.concat.js");
13
11
 
14
12
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
@@ -37,8 +35,7 @@ var HvSimpleNavigation = function HvSimpleNavigation(_ref) {
37
35
  getDynamicValues = _ref.getDynamicValues,
38
36
  children = _ref.children,
39
37
  other = (0, _objectWithoutProperties2.default)(_ref, _excluded);
40
- var theme = (0, _core.useTheme)(); // step values
41
-
38
+ // step values
42
39
  var dotSize = _utils.dotSizes[stepSize];
43
40
  var StepComponent = _Dot.default; //
44
41
 
@@ -50,10 +47,6 @@ var HvSimpleNavigation = function HvSimpleNavigation(_ref) {
50
47
  separatorWidth = _getDynamicValues.separatorWidth; // separator values
51
48
 
52
49
 
53
- var getColor = function getColor(state) {
54
- return ["Current", "Disabled"].includes(state) ? (0, _utils.disabledColor)(theme) : (0, _utils.defaultColor)(theme);
55
- };
56
-
57
50
  var maxWidth = Math.max(titleWidth - dotSize, separatorWidth);
58
51
  var minWidth = Math.max(titleWidth - dotSize * 1.25, separatorWidth); //
59
52
 
@@ -72,7 +65,7 @@ var HvSimpleNavigation = function HvSimpleNavigation(_ref) {
72
65
  separatorValues: {
73
66
  minWidth: minWidth,
74
67
  maxWidth: maxWidth,
75
- getColor: getColor,
68
+ getColor: _utils.getColor,
76
69
  height: 2
77
70
  },
78
71
  stepValues: {
@@ -1 +1 @@
1
- {"version":3,"file":"SimpleNavigation.js","names":["HvSimpleNavigation","numSteps","stepSize","getTitles","getDynamicValues","children","other","theme","useTheme","dotSize","dotSizes","StepComponent","HvDot","stepsWidth","width","titleWidth","separatorWidth","getColor","state","includes","disabledColor","defaultColor","maxWidth","Math","max","minWidth","Steps","titles","rawTitle","number","title","navWidth","separatorValues","height","stepValues","minSize","maxSize","propTypes","className","PropTypes","string","classes","shape","root","isRequired","oneOf","func","elementType","withStyles","styles","name"],"sources":["../../../src/StepNavigation/SimpleNavigation/SimpleNavigation.js"],"sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\n\nimport { useTheme, withStyles } from \"@material-ui/core\";\n\nimport HvDot from \"./Dot\";\nimport { defaultColor, disabledColor, dotSizes } from \"./utils\";\nimport styles from \"./styles\";\n\n/**\n * Simple Navigation\n */\nconst HvSimpleNavigation = ({\n numSteps,\n stepSize,\n getTitles,\n getDynamicValues,\n children,\n ...other\n}) => {\n const theme = useTheme();\n\n // step values\n const dotSize = dotSizes[stepSize];\n const StepComponent = HvDot;\n //\n\n const stepsWidth = (numSteps + 0.5) * dotSize;\n const { width, titleWidth, separatorWidth } = getDynamicValues(stepsWidth);\n\n // separator values\n const getColor = (state) =>\n [\"Current\", \"Disabled\"].includes(state) ? disabledColor(theme) : defaultColor(theme);\n const maxWidth = Math.max(titleWidth - dotSize, separatorWidth);\n const minWidth = Math.max(titleWidth - dotSize * 1.25, separatorWidth);\n //\n\n const Steps = children;\n\n const titles = getTitles(({ rawTitle, number }) => ({\n title: `${number}. ${rawTitle}`,\n titleWidth,\n }));\n\n return (\n <div {...other}>\n {titles}\n <Steps\n {...{\n stepsWidth,\n navWidth: width,\n separatorValues: {\n minWidth,\n maxWidth,\n getColor,\n height: 2,\n },\n stepValues: {\n minSize: dotSize,\n maxSize: 1.5 * dotSize,\n StepComponent,\n },\n }}\n />\n </div>\n );\n};\n\nHvSimpleNavigation.propTypes = {\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the component root class.\n */\n root: PropTypes.string,\n }).isRequired,\n /**\n * Number of steps to show on the component.\n */\n numSteps: PropTypes.number.isRequired,\n /**\n * Sets one of the standard sizes of the steps\n */\n stepSize: PropTypes.oneOf([\"XS\", \"SM\", \"MD\", \"LG\", \"XL\"]).isRequired,\n /**\n * Returns dynamic width values of the component (width, titleWidth, separatorWidth).\n */\n getDynamicValues: PropTypes.func.isRequired,\n /**\n * Returns a JSX.element of the titles container.\n */\n getTitles: PropTypes.func.isRequired,\n /**\n * Component to render Step Navigation with props = {separatorValues, stepValues, stepsWidth}\n */\n children: PropTypes.elementType.isRequired,\n};\n\nexport default withStyles(styles, { name: \"HvSimpleNavigation\" })(HvSimpleNavigation);\n"],"mappings":";;;;;;;;;;;;;;;AAAA;;AACA;;AAEA;;AAEA;;AACA;;AACA;;;;AAEA;AACA;AACA;AACA,IAAMA,kBAAkB,GAAG,SAArBA,kBAAqB,OAOrB;EAAA,IANJC,QAMI,QANJA,QAMI;EAAA,IALJC,QAKI,QALJA,QAKI;EAAA,IAJJC,SAII,QAJJA,SAII;EAAA,IAHJC,gBAGI,QAHJA,gBAGI;EAAA,IAFJC,QAEI,QAFJA,QAEI;EAAA,IADDC,KACC;EACJ,IAAMC,KAAK,GAAG,IAAAC,cAAA,GAAd,CADI,CAGJ;;EACA,IAAMC,OAAO,GAAGC,eAAA,CAASR,QAAT,CAAhB;EACA,IAAMS,aAAa,GAAGC,YAAtB,CALI,CAMJ;;EAEA,IAAMC,UAAU,GAAG,CAACZ,QAAQ,GAAG,GAAZ,IAAmBQ,OAAtC;;EACA,wBAA8CL,gBAAgB,CAACS,UAAD,CAA9D;EAAA,IAAQC,KAAR,qBAAQA,KAAR;EAAA,IAAeC,UAAf,qBAAeA,UAAf;EAAA,IAA2BC,cAA3B,qBAA2BA,cAA3B,CATI,CAWJ;;;EACA,IAAMC,QAAQ,GAAG,SAAXA,QAAW,CAACC,KAAD;IAAA,OACf,CAAC,SAAD,EAAY,UAAZ,EAAwBC,QAAxB,CAAiCD,KAAjC,IAA0C,IAAAE,oBAAA,EAAcb,KAAd,CAA1C,GAAiE,IAAAc,mBAAA,EAAad,KAAb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AAQ,EAAEqC,kBAAA,CAAUM,KAAV,CAAgB,CAAC,IAAD,EAAO,IAAP,EAAa,IAAb,EAAmB,IAAnB,EAAyB,IAAzB,CAAhB,EAAgDD,UArB7B;;EAsB7B;AACF;AACA;EACExC,gBAAgB,EAAEmC,kBAAA,CAAUO,IAAV,CAAeF,UAzBJ;;EA0B7B;AACF;AACA;EACEzC,SAAS,EAAEoC,kBAAA,CAAUO,IAAV,CAAeF,UA7BG;;EA8B7B;AACF;AACA;EACEvC,QAAQ,EAAEkC,kBAAA,CAAUQ,WAAV,CAAsBH;AAjCH,CAA/B;;eAoCe,IAAAI,gBAAA,EAAWC,eAAX,EAAmB;EAAEC,IAAI,EAAE;AAAR,CAAnB,EAAmDlD,kBAAnD,C"}
1
+ {"version":3,"file":"SimpleNavigation.js","names":["HvSimpleNavigation","numSteps","stepSize","getTitles","getDynamicValues","children","other","dotSize","dotSizes","StepComponent","HvDot","stepsWidth","width","titleWidth","separatorWidth","maxWidth","Math","max","minWidth","Steps","titles","rawTitle","number","title","navWidth","separatorValues","getColor","height","stepValues","minSize","maxSize","propTypes","className","PropTypes","string","classes","shape","root","isRequired","oneOf","func","elementType","withStyles","styles","name"],"sources":["../../../src/StepNavigation/SimpleNavigation/SimpleNavigation.js"],"sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\n\nimport { withStyles } from \"@material-ui/core\";\n\nimport HvDot from \"./Dot\";\nimport { getColor, dotSizes } from \"./utils\";\nimport styles from \"./styles\";\n\n/**\n * Simple Navigation\n */\nconst HvSimpleNavigation = ({\n numSteps,\n stepSize,\n getTitles,\n getDynamicValues,\n children,\n ...other\n}) => {\n // step values\n const dotSize = dotSizes[stepSize];\n const StepComponent = HvDot;\n //\n\n const stepsWidth = (numSteps + 0.5) * dotSize;\n const { width, titleWidth, separatorWidth } = getDynamicValues(stepsWidth);\n\n // separator values\n const maxWidth = Math.max(titleWidth - dotSize, separatorWidth);\n const minWidth = Math.max(titleWidth - dotSize * 1.25, separatorWidth);\n //\n\n const Steps = children;\n\n const titles = getTitles(({ rawTitle, number }) => ({\n title: `${number}. ${rawTitle}`,\n titleWidth,\n }));\n\n return (\n <div {...other}>\n {titles}\n <Steps\n {...{\n stepsWidth,\n navWidth: width,\n separatorValues: {\n minWidth,\n maxWidth,\n getColor,\n height: 2,\n },\n stepValues: {\n minSize: dotSize,\n maxSize: 1.5 * dotSize,\n StepComponent,\n },\n }}\n />\n </div>\n );\n};\n\nHvSimpleNavigation.propTypes = {\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the component root class.\n */\n root: PropTypes.string,\n }).isRequired,\n /**\n * Number of steps to show on the component.\n */\n numSteps: PropTypes.number.isRequired,\n /**\n * Sets one of the standard sizes of the steps\n */\n stepSize: PropTypes.oneOf([\"XS\", \"SM\", \"MD\", \"LG\", \"XL\"]).isRequired,\n /**\n * Returns dynamic width values of the component (width, titleWidth, separatorWidth).\n */\n getDynamicValues: PropTypes.func.isRequired,\n /**\n * Returns a JSX.element of the titles container.\n */\n getTitles: PropTypes.func.isRequired,\n /**\n * Component to render Step Navigation with props = {separatorValues, stepValues, stepsWidth}\n */\n children: PropTypes.elementType.isRequired,\n};\n\nexport default withStyles(styles, { name: \"HvSimpleNavigation\" })(HvSimpleNavigation);\n"],"mappings":";;;;;;;;;;;;;AAAA;;AACA;;AAEA;;AAEA;;AACA;;AACA;;;;AAEA;AACA;AACA;AACA,IAAMA,kBAAkB,GAAG,SAArBA,kBAAqB,OAOrB;EAAA,IANJC,QAMI,QANJA,QAMI;EAAA,IALJC,QAKI,QALJA,QAKI;EAAA,IAJJC,SAII,QAJJA,SAII;EAAA,IAHJC,gBAGI,QAHJA,gBAGI;EAAA,IAFJC,QAEI,QAFJA,QAEI;EAAA,IADDC,KACC;EACJ;EACA,IAAMC,OAAO,GAAGC,eAAA,CAASN,QAAT,CAAhB;EACA,IAAMO,aAAa,G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;EACEC,OAAO,EAAEF,kBAAA,CAAUG,KAAV,CAAgB;IACvB;AACJ;AACA;IACIC,IAAI,EAAEJ,kBAAA,CAAUC;EAJO,CAAhB,EAKNI,UAb0B;;EAc7B;AACF;AACA;EACErC,QAAQ,EAAEgC,kBAAA,CAAUX,MAAV,CAAiBgB,UAjBE;;EAkB7B;AACF;AACA;EACEpC,QAAQ,EAAE+B,kBAAA,CAAUM,KAAV,CAAgB,CAAC,IAAD,EAAO,IAAP,EAAa,IAAb,EAAmB,IAAnB,EAAyB,IAAzB,CAAhB,EAAgDD,UArB7B;;EAsB7B;AACF;AACA;EACElC,gBAAgB,EAAE6B,kBAAA,CAAUO,IAAV,CAAeF,UAzBJ;;EA0B7B;AACF;AACA;EACEnC,SAAS,EAAE8B,kBAAA,CAAUO,IAAV,CAAeF,UA7BG;;EA8B7B;AACF;AACA;EACEjC,QAAQ,EAAE4B,kBAAA,CAAUQ,WAAV,CAAsBH;AAjCH,CAA/B;;eAoCe,IAAAI,gBAAA,EAAWC,eAAX,EAAmB;EAAEC,IAAI,EAAE;AAAR,CAAnB,EAAmD5C,kBAAnD,C"}
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.dotSizes = exports.disabledColor = exports.defaultColor = void 0;
6
+ exports.getColor = exports.dotSizes = void 0;
7
7
  var dotSizes = {
8
8
  XS: 8,
9
9
  SM: 10,
@@ -14,18 +14,20 @@ var dotSizes = {
14
14
  exports.dotSizes = dotSizes;
15
15
 
16
16
  var defaultColor = function defaultColor(theme) {
17
- var _theme$hv, _theme$hv$palette, _theme$hv$palette$acc;
17
+ var _theme$hv$palette$acc, _theme$hv, _theme$hv$palette, _theme$hv$palette$acc2;
18
18
 
19
- return theme === null || theme === void 0 ? void 0 : (_theme$hv = theme.hv) === null || _theme$hv === void 0 ? void 0 : (_theme$hv$palette = _theme$hv.palette) === null || _theme$hv$palette === void 0 ? void 0 : (_theme$hv$palette$acc = _theme$hv$palette.accent) === null || _theme$hv$palette$acc === void 0 ? void 0 : _theme$hv$palette$acc.acce1;
19
+ return (_theme$hv$palette$acc = theme === null || theme === void 0 ? void 0 : (_theme$hv = theme.hv) === null || _theme$hv === void 0 ? void 0 : (_theme$hv$palette = _theme$hv.palette) === null || _theme$hv$palette === void 0 ? void 0 : (_theme$hv$palette$acc2 = _theme$hv$palette.accent) === null || _theme$hv$palette$acc2 === void 0 ? void 0 : _theme$hv$palette$acc2.acce1) !== null && _theme$hv$palette$acc !== void 0 ? _theme$hv$palette$acc : "acce1";
20
20
  };
21
21
 
22
- exports.defaultColor = defaultColor;
23
-
24
22
  var disabledColor = function disabledColor(theme) {
25
- var _theme$hv2, _theme$hv2$palette, _theme$hv2$palette$at;
23
+ var _theme$hv$palette$atm, _theme$hv2, _theme$hv2$palette, _theme$hv2$palette$at;
24
+
25
+ return (_theme$hv$palette$atm = theme === null || theme === void 0 ? void 0 : (_theme$hv2 = theme.hv) === null || _theme$hv2 === void 0 ? void 0 : (_theme$hv2$palette = _theme$hv2.palette) === null || _theme$hv2$palette === void 0 ? void 0 : (_theme$hv2$palette$at = _theme$hv2$palette.atmosphere) === null || _theme$hv2$palette$at === void 0 ? void 0 : _theme$hv2$palette$at.atmo5) !== null && _theme$hv$palette$atm !== void 0 ? _theme$hv$palette$atm : "atmo5";
26
+ };
26
27
 
27
- return theme === null || theme === void 0 ? void 0 : (_theme$hv2 = theme.hv) === null || _theme$hv2 === void 0 ? void 0 : (_theme$hv2$palette = _theme$hv2.palette) === null || _theme$hv2$palette === void 0 ? void 0 : (_theme$hv2$palette$at = _theme$hv2$palette.atmosphere) === null || _theme$hv2$palette$at === void 0 ? void 0 : _theme$hv2$palette$at.atmo5;
28
+ var getColor = function getColor(state, theme) {
29
+ return state === "Disabled" ? disabledColor(theme) : defaultColor(theme);
28
30
  };
29
31
 
30
- exports.disabledColor = disabledColor;
32
+ exports.getColor = getColor;
31
33
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","names":["dotSizes","XS","SM","MD","LG","XL","defaultColor","theme","hv","palette","accent","acce1","disabledColor","atmosphere","atmo5"],"sources":["../../../src/StepNavigation/SimpleNavigation/utils.js"],"sourcesContent":["const dotSizes = {\n XS: 8,\n SM: 10,\n MD: 12,\n LG: 14,\n XL: 16,\n};\n\nconst defaultColor = (theme) => theme?.hv?.palette?.accent?.acce1;\nconst disabledColor = (theme) => theme?.hv?.palette?.atmosphere?.atmo5;\n\nexport { dotSizes, defaultColor, disabledColor };\n"],"mappings":";;;;;;AAAA,IAAMA,QAAQ,GAAG;EACfC,EAAE,EAAE,CADW;EAEfC,EAAE,EAAE,EAFW;EAGfC,EAAE,EAAE,EAHW;EAIfC,EAAE,EAAE,EAJW;EAKfC,EAAE,EAAE;AALW,CAAjB;;;AAQA,IAAMC,YAAY,GAAG,SAAfA,YAAe,CAACC,KAAD;EAAA;;EAAA,OAAWA,KAAX,aAAWA,KAAX,oCAAWA,KAAK,CAAEC,EAAlB,mEAAW,UAAWC,OAAtB,+EAAW,kBAAoBC,MAA/B,0DAAW,sBAA4BC,KAAvC;AAAA,CAArB;;;;AACA,IAAMC,aAAa,GAAG,SAAhBA,aAAgB,CAACL,KAAD;EAAA;;EAAA,OAAWA,KAAX,aAAWA,KAAX,qCAAWA,KAAK,CAAEC,EAAlB,qEAAW,WAAWC,OAAtB,gFAAW,mBAAoBI,UAA/B,0DAAW,sBAAgCC,KAA3C;AAAA,CAAtB"}
1
+ {"version":3,"file":"utils.js","names":["dotSizes","XS","SM","MD","LG","XL","defaultColor","theme","hv","palette","accent","acce1","disabledColor","atmosphere","atmo5","getColor","state"],"sources":["../../../src/StepNavigation/SimpleNavigation/utils.js"],"sourcesContent":["const dotSizes = {\n XS: 8,\n SM: 10,\n MD: 12,\n LG: 14,\n XL: 16,\n};\n\nconst defaultColor = (theme) => theme?.hv?.palette?.accent?.acce1 ?? \"acce1\";\nconst disabledColor = (theme) => theme?.hv?.palette?.atmosphere?.atmo5 ?? \"atmo5\";\n\nconst getColor = (state, theme) =>\n state === \"Disabled\" ? disabledColor(theme) : defaultColor(theme);\n\nexport { dotSizes, getColor };\n"],"mappings":";;;;;;AAAA,IAAMA,QAAQ,GAAG;EACfC,EAAE,EAAE,CADW;EAEfC,EAAE,EAAE,EAFW;EAGfC,EAAE,EAAE,EAHW;EAIfC,EAAE,EAAE,EAJW;EAKfC,EAAE,EAAE;AALW,CAAjB;;;AAQA,IAAMC,YAAY,GAAG,SAAfA,YAAe,CAACC,KAAD;EAAA;;EAAA,gCAAWA,KAAX,aAAWA,KAAX,oCAAWA,KAAK,CAAEC,EAAlB,mEAAW,UAAWC,OAAtB,gFAAW,kBAAoBC,MAA/B,2DAAW,uBAA4BC,KAAvC,yEAAgD,OAAhD;AAAA,CAArB;;AACA,IAAMC,aAAa,GAAG,SAAhBA,aAAgB,CAACL,KAAD;EAAA;;EAAA,gCAAWA,KAAX,aAAWA,KAAX,qCAAWA,KAAK,CAAEC,EAAlB,qEAAW,WAAWC,OAAtB,gFAAW,mBAAoBI,UAA/B,0DAAW,sBAAgCC,KAA3C,yEAAoD,OAApD;AAAA,CAAtB;;AAEA,IAAMC,QAAQ,GAAG,SAAXA,QAAW,CAACC,KAAD,EAAQT,KAAR;EAAA,OACfS,KAAK,KAAK,UAAV,GAAuBJ,aAAa,CAACL,KAAD,CAApC,GAA8CD,YAAY,CAACC,KAAD,CAD3C;AAAA,CAAjB"}
@@ -1,5 +1,6 @@
1
1
  import * as React from "react";
2
2
  import { StandardProps } from "@material-ui/core";
3
+ import { Breakpoint } from "@material-ui/core/styles/createBreakpoints";
3
4
  import { HvStepProps } from "./DefaultNavigation/Step/Step";
4
5
 
5
6
  export type HvStepNavigationClassKey = "root";
@@ -15,7 +16,7 @@ export type HvStepNavigationProps = StandardProps<
15
16
  /**
16
17
  * Steps to show on the component.
17
18
  */
18
- steps: Array<Pick<HvStepProps, "state" | "title" | "onClick" | "className">> & {
19
+ steps: Array<Pick<HvStepProps, "state" | "title" | "onClick" | "className" | "disabled">> & {
19
20
  /**
20
21
  * Class names to override styles on the separator component after the step.
21
22
  */
@@ -26,15 +27,15 @@ export type HvStepNavigationProps = StandardProps<
26
27
  titleClassName: string;
27
28
  };
28
29
  /**
29
- * Sets one of the standard sizes of the steps
30
+ * Sets one of the standard sizes of the steps.
30
31
  */
31
32
  stepSize?: "XS" | "SM" | "MD" | "LG" | "XL";
32
33
  /**
33
- * Width of the component element.
34
+ * Width of the component element on each breakpoint screen resolution.
34
35
  */
35
- width?: number;
36
+ width?: { [breakpoint in Breakpoint]?: number };
36
37
  /**
37
- * Defines either show a title or only a tooltip on each step component
38
+ * Defines either show a title or only a tooltip on each step component.
38
39
  */
39
40
  showTitles?: boolean;
40
41
  };