@useblu/ocean-react 1.31.0 → 1.31.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,10 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.31.1](https://github.com/ocean-ds/ocean-web/compare/v1.31.0...v1.31.1) (2022-05-17)
7
+
8
+ **Note:** Version bump only for package @useblu/ocean-react
9
+
6
10
  # [1.31.0](https://github.com/ocean-ds/ocean-web/compare/v1.30.4...v1.31.0) (2022-04-06)
7
11
 
8
12
  ### Features
package/Steps/Steps.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { ReactElement } from 'react';
2
2
  export interface StepsProps {
3
- currentStep: 1 | 2 | 3 | 4;
4
- steps: 2 | 3 | 4;
3
+ currentStep: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10;
4
+ steps: 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10;
5
5
  }
6
6
  declare const defaultProps: {
7
7
  currentStep: number;
@@ -1 +1 @@
1
- {"version":3,"file":"Steps.d.ts","sourceRoot":"","sources":["../../src/Steps/Steps.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE5C,MAAM,WAAW,UAAU;IAKzB,WAAW,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAM3B,KAAK,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;CAClB;AACD,QAAA,MAAM,YAAY;;;CAGjB,CAAC;AAqBF,QAAA,MAAM,KAAK,4BAGR,UAAU,GAAG,mBAAmB,KAAG,YAuLrC,CAAC;AAEF,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"Steps.d.ts","sourceRoot":"","sources":["../../src/Steps/Steps.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE5C,MAAM,WAAW,UAAU;IAKzB,WAAW,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC;IAMpD,KAAK,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC;CAC3C;AACD,QAAA,MAAM,YAAY;;;CAGjB,CAAC;AAEF,QAAA,MAAM,KAAK,4BAGR,UAAU,GAAG,mBAAmB,KAAG,YA2GrC,CAAC;AAEF,eAAe,KAAK,CAAC"}
package/index.es.js CHANGED
@@ -25413,77 +25413,32 @@ var Stepper = e$1.forwardRef(function Stepper(_a, ref) {
25413
25413
  e$1.createElement(To, { size: 24 })))))));
25414
25414
  });
25415
25415
 
25416
- var FinalSteps = function () {
25417
- return (e$1.createElement(e$1.Fragment, null,
25418
- e$1.createElement("path", { d: "M52 10H64", stroke: "#EBECF5", strokeWidth: "2" }),
25419
- e$1.createElement("path", { d: "M64 10L69 10", stroke: "#EBECF5", strokeWidth: "2" }),
25420
- e$1.createElement("circle", { cx: "74", cy: "10", r: "5", stroke: "#EBECF5", strokeWidth: "2" }),
25421
- e$1.createElement("path", { d: "M79 10H84", stroke: "#EBECF5", strokeWidth: "2" }),
25422
- e$1.createElement("path", { d: "M84 10H96", stroke: "#EBECF5", strokeWidth: "2" }),
25423
- e$1.createElement("circle", { r: "5", transform: "matrix(-1 0 0 1 106 10)", stroke: "#EBECF5", strokeWidth: "2" }),
25424
- e$1.createElement("path", { d: "M101 10H96", stroke: "#EBECF5", strokeWidth: "2" })));
25425
- };
25426
25416
  var Steps = function (_a) {
25427
25417
  var currentStep = _a.currentStep, steps = _a.steps;
25428
- if (currentStep === 1) {
25429
- return (e$1.createElement("svg", { width: "116", height: "20", viewBox: "0 0 116 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", "data-testid": "step-1" },
25430
- e$1.createElement("circle", { cx: "9.5", cy: "10.5", r: "5.5", stroke: "#13BDBD", strokeWidth: "2" }),
25431
- e$1.createElement("path", { d: "M15 10H20", stroke: "#13BDBD", strokeWidth: "2" }),
25432
- steps === 2 && (e$1.createElement(e$1.Fragment, null,
25433
- e$1.createElement("path", { d: "M20 10H32", stroke: "#EBECF5", strokeWidth: "2" }),
25434
- e$1.createElement("path", { d: "M32 10L37 10", stroke: "#EBECF5", strokeWidth: "2" }),
25435
- e$1.createElement("circle", { cx: "42", cy: "10", r: "5", stroke: "#EBECF5", strokeWidth: "2" }))),
25436
- steps === 3 && (e$1.createElement(e$1.Fragment, null,
25437
- e$1.createElement("path", { d: "M20 10H32", stroke: "#EBECF5", strokeWidth: "2" }),
25438
- e$1.createElement("path", { d: "M32 10L37 10", stroke: "#EBECF5", strokeWidth: "2" }),
25439
- e$1.createElement("circle", { cx: "42", cy: "10", r: "5", stroke: "#EBECF5", strokeWidth: "2" }),
25440
- e$1.createElement("path", { d: "M47 10H52", stroke: "#EBECF5", strokeWidth: "2" }),
25441
- e$1.createElement("path", { d: "M52 10H64", stroke: "#EBECF5", strokeWidth: "2" }),
25442
- e$1.createElement("path", { d: "M64 10L69 10", stroke: "#EBECF5", strokeWidth: "2" }),
25443
- e$1.createElement("circle", { cx: "74", cy: "10", r: "5", stroke: "#EBECF5", strokeWidth: "2" }))),
25444
- steps === 4 && (e$1.createElement(e$1.Fragment, null,
25445
- e$1.createElement("path", { d: "M20 10H32", stroke: "#EBECF5", strokeWidth: "2" }),
25446
- e$1.createElement("path", { d: "M32 10L37 10", stroke: "#EBECF5", strokeWidth: "2" }),
25447
- e$1.createElement("circle", { cx: "42", cy: "10", r: "5", stroke: "#EBECF5", strokeWidth: "2" }),
25448
- e$1.createElement("path", { d: "M47 10H52", stroke: "#EBECF5", strokeWidth: "2" }),
25449
- e$1.createElement(FinalSteps, null)))));
25450
- }
25451
- if (currentStep === 2) {
25452
- return (e$1.createElement("svg", { width: "116", height: "20", viewBox: "0 0 116 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", "data-testid": "step-2" },
25453
- e$1.createElement("circle", { cx: "10", cy: "10", r: "9", fill: "#13BDBD", stroke: "#13BDBD", strokeWidth: "2" }),
25454
- e$1.createElement("path", { d: "M7 10L9 12L13 8", stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
25455
- e$1.createElement("path", { d: "M20 10H32", stroke: "#13BDBD", strokeWidth: "2" }),
25456
- e$1.createElement("path", { d: "M32 10L37 10", stroke: "#13BDBD", strokeWidth: "2" }),
25457
- e$1.createElement("circle", { cx: "42", cy: "10", r: "5", stroke: "#13BDBD", strokeWidth: "2" }),
25458
- steps > 2 && (e$1.createElement(e$1.Fragment, null,
25459
- e$1.createElement("path", { d: "M47 10H52", stroke: "#13BDBD", strokeWidth: "2" }),
25460
- e$1.createElement("path", { d: "M52 10H64", stroke: "#EBECF5", strokeWidth: "2" }))),
25461
- steps === 3 && (e$1.createElement(e$1.Fragment, null,
25462
- e$1.createElement("path", { d: "M52 10H64", stroke: "#EBECF5", strokeWidth: "2" }),
25463
- e$1.createElement("path", { d: "M64 10L69 10", stroke: "#EBECF5", strokeWidth: "2" }),
25464
- e$1.createElement("circle", { cx: "74", cy: "10", r: "5", stroke: "#EBECF5", strokeWidth: "2" }))),
25465
- steps === 4 && e$1.createElement(FinalSteps, null)));
25466
- }
25467
- return (e$1.createElement("svg", { width: "116", height: "20", viewBox: "0 0 116 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", "data-testid": "step-3" },
25468
- e$1.createElement("circle", { cx: "10", cy: "10", r: "9", fill: "#13BDBD", stroke: "#13BDBD", strokeWidth: "2" }),
25469
- e$1.createElement("path", { d: "M7 10L9 12L13 8", stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
25470
- e$1.createElement("path", { d: "M20 10H32", stroke: "#13BDBD", strokeWidth: "2" }),
25471
- e$1.createElement("circle", { cx: "42", cy: "10", r: "9", fill: "#13BDBD", stroke: "#13BDBD", strokeWidth: "2" }),
25472
- e$1.createElement("path", { d: "M39 10L41 12L45 8", stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
25473
- e$1.createElement("path", { d: "M52 10H64", stroke: "#13BDBD", strokeWidth: "2" }),
25474
- currentStep === 3 ? (e$1.createElement(e$1.Fragment, null,
25475
- e$1.createElement("path", { d: "M64 10L69 10", stroke: "#13BDBD", strokeWidth: "2" }),
25476
- e$1.createElement("circle", { cx: "74", cy: "10", r: "5", stroke: "#13BDBD", strokeWidth: "2" }),
25477
- steps > 3 && (e$1.createElement(e$1.Fragment, null,
25478
- e$1.createElement("path", { d: "M79 10H84", stroke: "#13BDBD", strokeWidth: "2" }),
25479
- e$1.createElement("path", { d: "M84 10H96", stroke: "#EBECF5", strokeWidth: "2" }),
25480
- e$1.createElement("path", { d: "M101 10H96", stroke: "#EBECF5", strokeWidth: "2" }),
25481
- e$1.createElement("circle", { r: "5", transform: "matrix(-1 0 0 1 106 10)", stroke: "#EBECF5", strokeWidth: "2" }))))) : (e$1.createElement(e$1.Fragment, null,
25482
- e$1.createElement("circle", { cx: "74", cy: "10", r: "9", fill: "#13BDBD", stroke: "#13BDBD", strokeWidth: "2" }),
25483
- e$1.createElement("path", { d: "M71 10L73 12L77 8", stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
25484
- e$1.createElement("path", { d: "M84 10H96", stroke: "#13BDBD", strokeWidth: "2" }),
25485
- e$1.createElement("path", { d: "M101 10H96", stroke: "#13BDBD", strokeWidth: "2" }),
25486
- e$1.createElement("circle", { r: "5", transform: "matrix(-1 0 0 1 106 10)", stroke: "#13BDBD", strokeWidth: "2" })))));
25418
+ var getCurrentStep = function (step) {
25419
+ var left = 30 * (step - 1);
25420
+ if (step === currentStep) {
25421
+ return (e$1.createElement(e$1.Fragment, null,
25422
+ e$1.createElement("circle", { cx: step === 1 ? 9.5 : left + 12, cy: "10", r: "5", stroke: "#13BDBD", strokeWidth: "2" }),
25423
+ steps > step && (e$1.createElement(e$1.Fragment, null,
25424
+ e$1.createElement("path", { d: step === 1 ? 'M15 10H20' : "M".concat(left + 17, " 10H").concat(left + 22), stroke: "#13BDBD", strokeWidth: "2" }),
25425
+ e$1.createElement("path", { d: step === 1 ? 'M20 10H37' : "M".concat(left + 22, " 10H").concat(left + 38), stroke: "#EBECF5", strokeWidth: "2" })))));
25426
+ }
25427
+ if (currentStep > step) {
25428
+ return (e$1.createElement(e$1.Fragment, null,
25429
+ e$1.createElement("circle", { cx: step === 1 ? 10 : left + 12, cy: "10", r: "9", fill: "#13BDBD", stroke: "#13BDBD", strokeWidth: "2" }),
25430
+ e$1.createElement("path", { d: step === 1
25431
+ ? 'M7 10 L 9 12 L 13 8'
25432
+ : "M".concat(left + 9, " 10 L ").concat(left + 11, " 12 L ").concat(left + 16, " 8"), stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
25433
+ steps > step && (e$1.createElement(e$1.Fragment, null,
25434
+ e$1.createElement("path", { d: "M".concat(step === 1 ? 20 : left + 22, " 10H").concat(step * 30 + 2), stroke: "#13BDBD", strokeWidth: "2" }),
25435
+ e$1.createElement("path", { d: "M".concat(step * 30 + 2, " 10L").concat(step * 30 + 7, " 10"), stroke: "#13BDBD", strokeWidth: "2" })))));
25436
+ }
25437
+ return (e$1.createElement(e$1.Fragment, null,
25438
+ e$1.createElement("circle", { cx: step === 1 ? 9.5 : left + 12, cy: "10", r: "5", stroke: "#EBECF5", strokeWidth: "2" }),
25439
+ steps > step && (e$1.createElement("path", { d: step === 1 ? 'M15 10H37' : "M".concat(left + 17, " 10H").concat(left + 38), stroke: "#EBECF5", strokeWidth: "2" }))));
25440
+ };
25441
+ return (e$1.createElement("svg", { height: "20", width: 30 * (steps - 1) + 22, viewBox: "0 0 ".concat(30 * (steps - 1) + 22, " 20"), fill: "none", xmlns: "http://www.w3.org/2000/svg", "data-testid": "step-".concat(currentStep) }, Array.from(Array(steps).keys()).map(function (step) { return (e$1.createElement("g", { key: step }, getCurrentStep(step + 1))); })));
25487
25442
  };
25488
25443
 
25489
25444
  var Badge = e$1.forwardRef(function Badge(_a, ref) {