blixify-ui-web 0.1.180 → 0.1.181
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/design/onboarding/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/design/onboarding/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,oBAAoB,CAAC;AAG5B,UAAU,cAAc;IACtB,IAAI,EAAE,YAAY,CAAC;CACpB;AAED,UAAU,KAAK;IACb,QAAQ,EAAE,cAAc,EAAE,CAAC;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oBAAoB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,WAAW,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;CAC/B;AAED,qBAAa,UAAW,SAAQ,SAAS,CAAC,KAAK,CAAC;IAC9C,cAAc,aAMZ;IAEF,cAAc,aAQZ;IAEF,eAAe,UAAW,MAAM,UAE9B;IAEF,eAAe,0BAqBb;IAEF,gBAAgB,0BA+Bd;IAEF,MAAM;CA0CP"}
|
|
@@ -39,22 +39,26 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
39
39
|
};
|
|
40
40
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
41
|
exports.Onboarding = void 0;
|
|
42
|
-
var solid_1 = require("@heroicons/react/24/solid");
|
|
43
42
|
var react_1 = __importStar(require("react"));
|
|
44
43
|
require("../../../index.css");
|
|
44
|
+
var button_1 = require("../../action/button");
|
|
45
45
|
var Onboarding = /** @class */ (function (_super) {
|
|
46
46
|
__extends(Onboarding, _super);
|
|
47
47
|
function Onboarding() {
|
|
48
48
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
49
49
|
_this.handleNextStep = function () {
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
if (_this.props.currentStep < _this.props.contents.length - 1) {
|
|
51
|
+
var currentStepIndex = (_this.props.currentStep + 1) % _this.props.contents.length;
|
|
52
|
+
_this.props.handleSetCurrentStep(currentStepIndex);
|
|
53
|
+
}
|
|
52
54
|
};
|
|
53
55
|
_this.handlePrevStep = function () {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
if (_this.props.currentStep > 0) {
|
|
57
|
+
var currentStepIndex = _this.props.currentStep === 0
|
|
58
|
+
? _this.props.contents.length - 1
|
|
59
|
+
: _this.props.currentStep - 1;
|
|
60
|
+
_this.props.handleSetCurrentStep(currentStepIndex);
|
|
61
|
+
}
|
|
58
62
|
};
|
|
59
63
|
_this.handleIndicator = function (index) {
|
|
60
64
|
_this.props.handleSetCurrentStep(index);
|
|
@@ -64,16 +68,17 @@ var Onboarding = /** @class */ (function (_super) {
|
|
|
64
68
|
react_1.default.createElement("div", { className: "self-center z-50 flex list-none justify-center p-0" }, _this.props.contents.map(function (_, index) { return (react_1.default.createElement("button", { key: index, type: "button", onClick: function () { return _this.handleIndicator(index); }, className: "mx-[3px] box-content h-[3px] ".concat(_this.props.contents.length > 4 ? "w-[15px]" : "w-[25px]", " flex-initial cursor-pointer border-0 border-y-[10px] border-solid border-transparent bg-black bg-clip-padding p-0 -indent-[999px] transition-opacity duration-[600ms] ease-[cubic-bezier(0.25,0.1,0.25,1.0)] motion-reduce:transition-none ").concat(index === _this.props.currentStep ? "opacity-100" : "opacity-30"), "aria-current": index === _this.props.currentStep ? "true" : "false", "aria-label": "Step ".concat(index + 1) })); }))));
|
|
65
69
|
};
|
|
66
70
|
_this.renderNavigation = function () {
|
|
67
|
-
var buttonClassName = "z-50 flex w-[15%] items-center justify-center border-0 bg-none p-0 text-center text-black opacity-50 transition-opacity duration-150 ease-[cubic-bezier(0.25,0.1,0.25,1.0)] hover:opacity-100 motion-reduce:transition-none";
|
|
68
|
-
var iconClassName = _this.props.contents.length > 4 ? "w-5 h-5" : "w-8 h-8";
|
|
69
71
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
70
|
-
react_1.default.createElement("div", { className: "flex
|
|
71
|
-
react_1.default.createElement("div", { className: "flex justify-
|
|
72
|
-
react_1.default.createElement("
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
72
|
+
react_1.default.createElement("div", { className: "flex flex-col" },
|
|
73
|
+
react_1.default.createElement("div", { className: "flex justify-center" },
|
|
74
|
+
react_1.default.createElement("div", { className: "flex justify-center mt-5 md:w-full w-60" }, _this.renderIndicator())),
|
|
75
|
+
react_1.default.createElement("div", { className: "flex justify-center mt-10 mb-5" },
|
|
76
|
+
react_1.default.createElement("div", { className: "w-5/6" },
|
|
77
|
+
react_1.default.createElement(button_1.Button, { text: _this.props.currentStep < _this.props.contents.length - 1
|
|
78
|
+
? "Continue"
|
|
79
|
+
: "Close Onboarding", size: "small", type: "normal", className: "w-full", onClick: _this.props.currentStep < _this.props.contents.length - 1
|
|
80
|
+
? _this.handleNextStep
|
|
81
|
+
: _this.props.handleClose }))))));
|
|
77
82
|
};
|
|
78
83
|
return _this;
|
|
79
84
|
}
|
|
@@ -93,8 +98,8 @@ var Onboarding = /** @class */ (function (_super) {
|
|
|
93
98
|
: "fixed inset-0 flex items-center justify-center z-50 " },
|
|
94
99
|
react_1.default.createElement("div", { className: defaultClassName },
|
|
95
100
|
react_1.default.createElement("div", { className: "py-5" },
|
|
96
|
-
react_1.default.createElement("div", { className: "flex
|
|
97
|
-
react_1.default.createElement("p", { className: "font-semibold cursor-pointer hover:text-gray-900 text-gray-500 text-xs" }, "
|
|
101
|
+
react_1.default.createElement("div", { className: "flex", onClick: this.handlePrevStep },
|
|
102
|
+
react_1.default.createElement("p", { className: "font-semibold cursor-pointer hover:text-gray-900 text-gray-500 text-xs" }, "Back")),
|
|
98
103
|
this.props.contents[this.props.currentStep].data,
|
|
99
104
|
this.renderNavigation())))));
|
|
100
105
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/design/onboarding/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/design/onboarding/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAuD;AACvD,8BAA4B;AAC5B,8CAA6C;AAgB7C;IAAgC,8BAAgB;IAAhD;QAAA,qEAyHC;QAxHC,oBAAc,GAAG;YACf,IAAI,KAAI,CAAC,KAAK,CAAC,WAAW,GAAG,KAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE;gBAC3D,IAAM,gBAAgB,GACpB,CAAC,KAAI,CAAC,KAAK,CAAC,WAAW,GAAG,CAAC,CAAC,GAAG,KAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC;gBAC5D,KAAI,CAAC,KAAK,CAAC,oBAAoB,CAAC,gBAAgB,CAAC,CAAC;aACnD;QACH,CAAC,CAAC;QAEF,oBAAc,GAAG;YACf,IAAI,KAAI,CAAC,KAAK,CAAC,WAAW,GAAG,CAAC,EAAE;gBAC9B,IAAM,gBAAgB,GACpB,KAAI,CAAC,KAAK,CAAC,WAAW,KAAK,CAAC;oBAC1B,CAAC,CAAC,KAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC;oBAChC,CAAC,CAAC,KAAI,CAAC,KAAK,CAAC,WAAW,GAAG,CAAC,CAAC;gBACjC,KAAI,CAAC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