sccoreui 3.4.0 → 3.4.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/package.json +1 -1
- package/dist/App.js +0 -9
- package/dist/components/accordion/accordion.js +0 -11
- package/dist/components/auto-complete/auto-complete.js +0 -10
- package/dist/components/avatar/avatar-group.js +0 -4
- package/dist/components/avatar/avatar.js +0 -4
- package/dist/components/badge/badge.js +0 -4
- package/dist/components/breadcrumb/breacrumb.js +0 -4
- package/dist/components/button/button.js +0 -10
- package/dist/components/button/menu-item.js +0 -2
- package/dist/components/button/speed-dial.js +0 -4
- package/dist/components/button/split-button.js +0 -4
- package/dist/components/calendar/calendar.js +0 -4
- package/dist/components/card/card.js +0 -4
- package/dist/components/carousel/carousel.js +0 -4
- package/dist/components/carousel/tag.js +0 -4
- package/dist/components/chart/chart.js +0 -4
- package/dist/components/checkbox/checkbox.js +0 -10
- package/dist/components/chips/chip.js +0 -15
- package/dist/components/chips/chips.js +0 -4
- package/dist/components/color-picker/color-picker.js +0 -4
- package/dist/components/custom-slider/custom-slider.js +0 -100
- package/dist/components/data-table/column.js +0 -4
- package/dist/components/data-table/data-table.js +0 -4
- package/dist/components/data-table/paginator.js +0 -4
- package/dist/components/data-view/data-view.js +0 -6
- package/dist/components/dialogs/confirm-dialog.js +0 -4
- package/dist/components/dialogs/confirm-popup.js +0 -4
- package/dist/components/dialogs/dialog.js +0 -4
- package/dist/components/divider/divider.js +0 -4
- package/dist/components/dropdown/dropdown.js +0 -19
- package/dist/components/file-upload/file-upload.js +0 -4
- package/dist/components/galleria/galleria.js +0 -5
- package/dist/components/image/image.js +0 -4
- package/dist/components/input/input-mask.js +0 -4
- package/dist/components/input/input-number.js +0 -4
- package/dist/components/input/input-switch.js +0 -4
- package/dist/components/input/input-textarea.js +0 -4
- package/dist/components/input/input.js +0 -4
- package/dist/components/loading-indicator/loading-indicator-custom.js +0 -7
- package/dist/components/megamenu/mega-menu.js +0 -4
- package/dist/components/multi-select/multi-select.js +0 -4
- package/dist/components/overlays/overlay-panel.js +0 -4
- package/dist/components/password/password.js +0 -4
- package/dist/components/progress-bar/progress-bar.js +0 -4
- package/dist/components/progress-steps/progress-steps.js +0 -65
- package/dist/components/progress_bar_round/circle-progress-bar.js +0 -7
- package/dist/components/progress_bar_round/half-circle-progres-bar.js +0 -7
- package/dist/components/radio-button/radio-button.js +0 -4
- package/dist/components/range-slider/slider.js +0 -5
- package/dist/components/rating/rating.js +0 -4
- package/dist/components/side-panel/side-panel.js +0 -4
- package/dist/components/skeleton/skeleton.js +0 -4
- package/dist/components/slider/slider.js +0 -4
- package/dist/components/spinner/spinner.js +0 -4
- package/dist/components/tab-menu/tab-menu.js +0 -4
- package/dist/components/tabview/tabview.js +0 -6
- package/dist/components/toast/toast.js +0 -4
- package/dist/components/toggle/toggle-button.js +0 -4
- package/dist/components/tooltip/tooltip.js +0 -4
- package/dist/components/types/type.js +0 -2
- package/dist/components/utils/classnames.js +0 -4
- package/dist/directives/svg-component.js +0 -33
- package/dist/directives/svg-icons.js +0 -8934
- package/dist/index.js +0 -125
- /package/dist/{App.min.css → src/App.min.css} +0 -0
package/package.json
CHANGED
package/dist/App.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
|
-
// import Home from './pages/home';
|
|
5
|
-
require("./App.min.css");
|
|
6
|
-
const App = () => {
|
|
7
|
-
return ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)("div", {}) }));
|
|
8
|
-
};
|
|
9
|
-
exports.default = App;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AccordionTab = exports.Accordion = exports.AccordionComponent = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const accordion_1 = require("primereact/accordion");
|
|
6
|
-
Object.defineProperty(exports, "Accordion", { enumerable: true, get: function () { return accordion_1.Accordion; } });
|
|
7
|
-
Object.defineProperty(exports, "AccordionTab", { enumerable: true, get: function () { return accordion_1.AccordionTab; } });
|
|
8
|
-
const AccordionComponent = () => {
|
|
9
|
-
return ((0, jsx_runtime_1.jsx)("div", { children: "Accordion" }));
|
|
10
|
-
};
|
|
11
|
-
exports.AccordionComponent = AccordionComponent;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AutoCompleteComponent = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const autocomplete_1 = require("primereact/autocomplete");
|
|
6
|
-
const AutoCompleteComponent = () => {
|
|
7
|
-
return ((0, jsx_runtime_1.jsx)("div", { children: "auto-complete" }));
|
|
8
|
-
};
|
|
9
|
-
exports.AutoCompleteComponent = AutoCompleteComponent;
|
|
10
|
-
exports.default = autocomplete_1.AutoComplete;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ButtonComponent = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const button_1 = require("primereact/button");
|
|
6
|
-
const ButtonComponent = () => {
|
|
7
|
-
return ((0, jsx_runtime_1.jsxs)("div", { children: ["ButtonComponent", (0, jsx_runtime_1.jsx)(button_1.Button, { label: "Click Me" })] }));
|
|
8
|
-
};
|
|
9
|
-
exports.ButtonComponent = ButtonComponent;
|
|
10
|
-
exports.default = button_1.Button;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CheckboxComponent = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const checkbox_1 = require("primereact/checkbox");
|
|
6
|
-
const CheckboxComponent = () => {
|
|
7
|
-
return (0, jsx_runtime_1.jsx)("div", { children: "checkbox" });
|
|
8
|
-
};
|
|
9
|
-
exports.CheckboxComponent = CheckboxComponent;
|
|
10
|
-
exports.default = checkbox_1.Checkbox;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const svg_component_1 = tslib_1.__importDefault(require("../../directives/svg-component"));
|
|
6
|
-
const ChipTag = (props) => {
|
|
7
|
-
const { onRemove } = props;
|
|
8
|
-
return props.template ? ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: props.template })) : ((0, jsx_runtime_1.jsxs)("span", Object.assign({ className: !props.className
|
|
9
|
-
? "bg-gray-100 border-round-2xl flex justify-content-between align-items-center py-1 gap-2 px-3 text-gray-700"
|
|
10
|
-
: `bg-gray-100 border-round-2xl flex justify-content-between align-items-center py-1 gap-2 px-3 text-gray-700 ${props.className}` }, { children: [props.image && ((0, jsx_runtime_1.jsx)("img", { src: props.image, alt: props.imageAlt || "chip image" })), props.icon && (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: props.icon }), (0, jsx_runtime_1.jsx)("span", Object.assign({ className: "font-medium" }, { children: props.label })), props.removable && ((0, jsx_runtime_1.jsx)("span", Object.assign({ className: "cursor-pointer", onClick: (e) => {
|
|
11
|
-
const el = e.currentTarget.parentElement;
|
|
12
|
-
props.onRemove !== undefined ? onRemove : el.remove();
|
|
13
|
-
} }, { children: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: props.removeIcon || (0, jsx_runtime_1.jsx)(svg_component_1.default, { icon: "x-close" }) }) })))] })));
|
|
14
|
-
};
|
|
15
|
-
exports.default = ChipTag;
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
|
-
const react_1 = require("react");
|
|
5
|
-
const CustomSlider = (props) => {
|
|
6
|
-
const { min, max, orientation, range, value, indicator = true } = props;
|
|
7
|
-
const [rangeValues, setRangeValues] = (0, react_1.useState)(value);
|
|
8
|
-
const [sliderValue, setSliderValue] = (0, react_1.useState)(value);
|
|
9
|
-
const sliderRef = (0, react_1.useRef)(null);
|
|
10
|
-
if (range && typeof value === "number") {
|
|
11
|
-
throw new Error(`For a range slider value should be [number, number]. Make sure to provide a proper value.`);
|
|
12
|
-
}
|
|
13
|
-
const finalWidthValue = !range
|
|
14
|
-
? `${sliderValue}%`
|
|
15
|
-
: `${rangeValues[0] > rangeValues[1]
|
|
16
|
-
? rangeValues[0] - rangeValues[1]
|
|
17
|
-
: rangeValues[1] > rangeValues[0]
|
|
18
|
-
? rangeValues[1] - rangeValues[0]
|
|
19
|
-
: 0}%`;
|
|
20
|
-
const finalLeftValue = rangeValues[0] < rangeValues[1]
|
|
21
|
-
? `${rangeValues[0]}%`
|
|
22
|
-
: `${rangeValues[1]}%`;
|
|
23
|
-
const rangeStyles = range
|
|
24
|
-
? {
|
|
25
|
-
[orientation === "horizontal" ? "width" : "height"]: finalWidthValue,
|
|
26
|
-
[orientation === "horizontal" ? "left" : "top"]: finalLeftValue,
|
|
27
|
-
}
|
|
28
|
-
: {
|
|
29
|
-
[orientation === "horizontal" ? "width" : "height"]: `${sliderValue}%`,
|
|
30
|
-
[orientation === "vertical" ? "top" : null]: 0,
|
|
31
|
-
};
|
|
32
|
-
const handleStyles = !range
|
|
33
|
-
? { [orientation === "horizontal" ? "left" : "top"]: `${sliderValue}%` }
|
|
34
|
-
: null;
|
|
35
|
-
const mouseMoveController = (e, index) => {
|
|
36
|
-
const sliderRect = sliderRef.current.getBoundingClientRect();
|
|
37
|
-
const currentRange = Math.round((e[orientation === "horizontal" ? "clientX" : "clientY"] -
|
|
38
|
-
sliderRect[orientation === "horizontal" ? "left" : "top"]) /
|
|
39
|
-
4);
|
|
40
|
-
if (min && max) {
|
|
41
|
-
if (e[orientation === "horizontal" ? "clientX" : "clientY"] -
|
|
42
|
-
sliderRect[orientation === "horizontal" ? "left" : "top"] <
|
|
43
|
-
0 ||
|
|
44
|
-
e[orientation === "horizontal" ? "clientX" : "clientY"] -
|
|
45
|
-
sliderRect[orientation === "horizontal" ? "left" : "top"] >
|
|
46
|
-
sliderRect[orientation === "horizontal" ? "width" : "height"])
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
else {
|
|
50
|
-
if (currentRange < 0 || currentRange > 100)
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
if (range) {
|
|
54
|
-
if (index) {
|
|
55
|
-
setRangeValues((prevRanges) => [prevRanges[0], currentRange]);
|
|
56
|
-
}
|
|
57
|
-
else {
|
|
58
|
-
setRangeValues((prevRanges) => [currentRange, prevRanges[1]]);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
else {
|
|
62
|
-
setSliderValue(currentRange);
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
const handleMovement = (index) => {
|
|
66
|
-
const handler = (e) => {
|
|
67
|
-
mouseMoveController(e, index);
|
|
68
|
-
};
|
|
69
|
-
document.addEventListener("mousemove", handler);
|
|
70
|
-
document.addEventListener("mouseup", () => {
|
|
71
|
-
document.removeEventListener("mousemove", handler);
|
|
72
|
-
});
|
|
73
|
-
};
|
|
74
|
-
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ "data-pc-name": "slider", "data-pc-section": "root", className: `p-slider ${orientation === "horizontal" ? "w" : "h"}-25rem p-component p-slider-${orientation}${props.className ? ` ${props.className}` : ""}`, ref: sliderRef }, { children: [(0, jsx_runtime_1.jsx)("span", { className: "p-slider-range", "data-pc-section": "range", style: rangeStyles }), range && typeof value !== "number" ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("span", Object.assign({ className: "p-slider-handle p-slider-handle-start", tabIndex: 0, role: "slider", "aria-valuemin": min, "aria-valuemax": max, "aria-valuenow": rangeValues[0], "aria-orientation": orientation, style: {
|
|
75
|
-
[orientation === "horizontal"
|
|
76
|
-
? "left"
|
|
77
|
-
: "top"]: `${rangeValues[0]}%`,
|
|
78
|
-
}, onMouseDown: () => handleMovement(0) }, { children: indicator && ((0, jsx_runtime_1.jsxs)("span", Object.assign({ style: {
|
|
79
|
-
position: "absolute",
|
|
80
|
-
height: "40px",
|
|
81
|
-
[orientation === "vertical" ? "left" : "top"]: orientation === "horizontal" ? "-50px" : "-70px",
|
|
82
|
-
transform: `translate${orientation === "horizontal" ? "X" : "Y"}(-30%)`,
|
|
83
|
-
}, className: "px-3 bg-white border-1 border-gray-300 border-round-lg shadow-4 py-2 text-center text-lg" }, { children: [rangeValues[0], "%"] }))) })), (0, jsx_runtime_1.jsx)("span", Object.assign({ className: "p-slider-handle p-slider-handle-end p-slider-handle-active", tabIndex: 0, role: "slider", "aria-valuemin": min, "aria-valuemax": max, "aria-valuenow": rangeValues[1], "aria-orientation": orientation, style: {
|
|
84
|
-
[orientation === "horizontal"
|
|
85
|
-
? "left"
|
|
86
|
-
: "top"]: `${rangeValues[1]}%`,
|
|
87
|
-
}, onMouseDown: () => handleMovement(1) }, { children: indicator && ((0, jsx_runtime_1.jsxs)("span", Object.assign({ style: {
|
|
88
|
-
position: "absolute",
|
|
89
|
-
height: "40px",
|
|
90
|
-
[orientation === "vertical" ? "left" : "top"]: orientation === "horizontal" ? "-50px" : "-70px",
|
|
91
|
-
transform: `translate${orientation === "horizontal" ? "X" : "Y"}(-30%)`,
|
|
92
|
-
}, className: "px-3 bg-white border-1 border-gray-300 border-round-lg shadow-4 py-2 text-center text-lg" }, { children: [rangeValues[1], "%"] }))) }))] })) : ((0, jsx_runtime_1.jsx)("span", Object.assign({ className: "p-slider-handle", role: "slider", "aria-valuenow": typeof value === "number" ? value : undefined, "aria-valuemin": min, "aria-valuemax": max, "aria-orientation": orientation, style: handleStyles, onMouseDown: () => handleMovement() }, { children: indicator && ((0, jsx_runtime_1.jsxs)("span", Object.assign({ style: {
|
|
93
|
-
position: "absolute",
|
|
94
|
-
height: "40px",
|
|
95
|
-
width: "60px",
|
|
96
|
-
[orientation === "vertical" ? "left" : "top"]: "-50px",
|
|
97
|
-
transform: "translateX(-30%)",
|
|
98
|
-
}, className: "px-3 bg-white border-1 border-gray-300 border-round-lg shadow-4 py-2 text-center text-lg" }, { children: [sliderValue, "%"] }))) })))] })));
|
|
99
|
-
};
|
|
100
|
-
exports.default = CustomSlider;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DataViewLayoutOptions = exports.DataView = void 0;
|
|
4
|
-
const dataview_1 = require("primereact/dataview");
|
|
5
|
-
Object.defineProperty(exports, "DataView", { enumerable: true, get: function () { return dataview_1.DataView; } });
|
|
6
|
-
Object.defineProperty(exports, "DataViewLayoutOptions", { enumerable: true, get: function () { return dataview_1.DataViewLayoutOptions; } });
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DropdownComponent = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const react_1 = require("react");
|
|
6
|
-
const dropdown_1 = require("primereact/dropdown");
|
|
7
|
-
const DropdownComponent = () => {
|
|
8
|
-
const [selectedCity, setSelectedCity] = (0, react_1.useState)(null);
|
|
9
|
-
const cities = [
|
|
10
|
-
{ name: 'New York', code: 'NY' },
|
|
11
|
-
{ name: 'Rome', code: 'RM' },
|
|
12
|
-
{ name: 'London', code: 'LDN' },
|
|
13
|
-
{ name: 'Istanbul', code: 'IST' },
|
|
14
|
-
{ name: 'Paris', code: 'PRS' },
|
|
15
|
-
];
|
|
16
|
-
return ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: "card flex justify-content-center" }, { children: (0, jsx_runtime_1.jsx)(dropdown_1.Dropdown, { value: selectedCity, onChange: (e) => setSelectedCity(e.value), options: cities, optionLabel: "name", placeholder: "Select a City", className: "w-full md:w-14rem" }) })));
|
|
17
|
-
};
|
|
18
|
-
exports.DropdownComponent = DropdownComponent;
|
|
19
|
-
exports.default = dropdown_1.Dropdown;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Galleria = void 0;
|
|
4
|
-
const galleria_1 = require("primereact/galleria");
|
|
5
|
-
Object.defineProperty(exports, "Galleria", { enumerable: true, get: function () { return galleria_1.Galleria; } });
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
|
-
const CustomLoadingIndicator = ({ size = "100px", color = "var(--primary-600)", strokewidth = "6", bgstrokecolor = "var(--gray-100)", bgstroke = false, animationduration = "3500ms" }) => {
|
|
5
|
-
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex align-items-center flex-column" }, { children: [(0, jsx_runtime_1.jsx)("span", Object.assign({ className: "svgAnimation absolute z-3", style: { width: size, height: size } }, { children: (0, jsx_runtime_1.jsx)("svg", Object.assign({ className: "", viewBox: "22 22 44 44" }, { children: (0, jsx_runtime_1.jsx)("circle", { className: "animation", cx: "44", cy: "44", r: "17.2", fill: "none", "stroke-width": strokewidth, style: { strokeLinecap: "round", animationDuration: animationduration, stroke: color } }) })) })), bgstroke && (0, jsx_runtime_1.jsx)("span", Object.assign({ style: { width: size, height: size } }, { children: (0, jsx_runtime_1.jsx)("svg", Object.assign({ className: "", viewBox: "22 22 44 44" }, { children: (0, jsx_runtime_1.jsx)("circle", { className: "animatio", cx: "44", cy: "44", r: "17.2", fill: "none", "stroke-width": strokewidth, style: { stroke: bgstrokecolor } }) })) }))] })));
|
|
6
|
-
};
|
|
7
|
-
exports.default = CustomLoadingIndicator;
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const button_1 = require("primereact/button");
|
|
6
|
-
const svg_component_1 = tslib_1.__importDefault(require("../../directives/svg-component"));
|
|
7
|
-
const react_1 = require("react");
|
|
8
|
-
const ProgressSteps = (props) => {
|
|
9
|
-
const { stepsItems, orientation, activeIndex, withButtons = true, icons, className, style, } = props;
|
|
10
|
-
const [currentActive, setCurrentActive] = (0, react_1.useState)(!activeIndex ? 0 : activeIndex);
|
|
11
|
-
const progressRef = (0, react_1.useRef)(null);
|
|
12
|
-
(0, react_1.useEffect)(() => {
|
|
13
|
-
if (!orientation || orientation === "horizontal") {
|
|
14
|
-
progressRef.current.style.width = `${(currentActive / (stepsItems.length - 1)) * 100}%`;
|
|
15
|
-
progressRef.current.style.height = "2px";
|
|
16
|
-
}
|
|
17
|
-
else {
|
|
18
|
-
progressRef.current.style.height = `${(currentActive / (stepsItems.length - 1)) * 100}%`;
|
|
19
|
-
progressRef.current.style.width = "2px";
|
|
20
|
-
}
|
|
21
|
-
}, [currentActive, orientation]);
|
|
22
|
-
const handleNext = () => {
|
|
23
|
-
if (currentActive > stepsItems.length) {
|
|
24
|
-
setCurrentActive(stepsItems.length);
|
|
25
|
-
}
|
|
26
|
-
else {
|
|
27
|
-
setCurrentActive(currentActive + 1);
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
const handlePrev = () => {
|
|
31
|
-
if (currentActive < 1) {
|
|
32
|
-
setCurrentActive(1);
|
|
33
|
-
}
|
|
34
|
-
else {
|
|
35
|
-
setCurrentActive(currentActive - 1);
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
const orientationClass = !orientation ? "horizontal" : orientation;
|
|
39
|
-
const userClassNames = !className ? "" : className;
|
|
40
|
-
if (!stepsItems) {
|
|
41
|
-
throw new Error("stepItems must be specified in order to generate steps");
|
|
42
|
-
}
|
|
43
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", Object.assign({ className: `progress-container flex justify-content-between relative ${orientationClass === "horizontal"
|
|
44
|
-
? "flex-row max-w-full"
|
|
45
|
-
: "flex-column max-h-full"} ${orientationClass} ${userClassNames}`, style: style }, { children: [(0, jsx_runtime_1.jsx)("div", { className: `progressbar bg-primary-600 absolute ${orientationClass}`, ref: progressRef }), stepsItems.map((eachItem, index) => ((0, jsx_runtime_1.jsxs)("section", Object.assign({ className: `progress-step-item ${orientationClass === "horizontal"
|
|
46
|
-
? "flex flex-column align-items-center gap-5"
|
|
47
|
-
: "flex align-items-start gap-5"} ${orientationClass}`, onClick: () => {
|
|
48
|
-
if (eachItem.action) {
|
|
49
|
-
eachItem.action();
|
|
50
|
-
}
|
|
51
|
-
} }, { children: [!icons ? ((0, jsx_runtime_1.jsx)(svg_component_1.default, { icon: index === currentActive
|
|
52
|
-
? "step-current"
|
|
53
|
-
: index > currentActive
|
|
54
|
-
? "step-unvisited"
|
|
55
|
-
: "step-checked" })) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: index === currentActive
|
|
56
|
-
? icons.current
|
|
57
|
-
: index > currentActive
|
|
58
|
-
? icons.unvisited
|
|
59
|
-
: icons.visited })), !eachItem.template ? ((0, jsx_runtime_1.jsx)("span", Object.assign({ className: "font-medium" }, { children: eachItem.title }))) : ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: `flex flex-column line-height-2 ${orientationClass === "horizontal"
|
|
60
|
-
? "align-items-center"
|
|
61
|
-
: "align-items-start"} ${orientationClass}` }, { children: eachItem.template })))] }), eachItem.id)))] })), withButtons && ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: `flex${orientationClass === "horizontal"
|
|
62
|
-
? ""
|
|
63
|
-
: " flex-column align-self-center"} gap-2 mt-5` }, { children: [(0, jsx_runtime_1.jsx)(button_1.Button, Object.assign({ disabled: currentActive === 0, onClick: handlePrev }, { children: "Prev" })), (0, jsx_runtime_1.jsx)(button_1.Button, Object.assign({ disabled: currentActive === stepsItems.length - 1, onClick: handleNext }, { children: "Next" }))] })))] }));
|
|
64
|
-
};
|
|
65
|
-
exports.default = ProgressSteps;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
|
-
const CircleProgressComponent = ({ height = 290, strokeWidth = 14, text = "", strokeColor = 'var(--primary-600)', strokeBgColor = 'var(--gray-300)', value = -1, textDisabled = false, textClassName = "text-lg text-gray-700 font-normal", valueTextClassName = "text-2xl, text-gray-700 font-bold" }) => {
|
|
5
|
-
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "relative flex align-items-center justify-content-center", style: { height: height, width: height } }, { children: [(0, jsx_runtime_1.jsx)("span", Object.assign({ role: "progressbar", className: "flex ", style: { width: `${height}px`, height: `${height}px`, transform: "rotate(-90deg)", position: "absolute", top: "0", zIndex: "10" } }, { children: (0, jsx_runtime_1.jsx)("svg", Object.assign({ viewBox: "22 22 110 110" }, { children: (0, jsx_runtime_1.jsx)("circle", { cx: "76", cy: "76", r: "40.2", fill: "none", "stroke-width": strokeWidth, style: { strokeDasharray: "256.92", strokeDashoffset: `${(256.92 - ((256.92 / 100) * value))}`, strokeLinecap: "round", stroke: `${strokeColor}` } }) })) })), (0, jsx_runtime_1.jsx)("span", Object.assign({ role: "progressbar", className: "flex obsolute ", style: { width: `${height}px`, height: `${height}px`, position: "absolute", transform: "rotate(-90deg)" } }, { children: (0, jsx_runtime_1.jsx)("svg", Object.assign({ viewBox: "22 22 110 110" }, { children: (0, jsx_runtime_1.jsx)("circle", { cx: "76", cy: "76", r: "40.2", fill: "none", "stroke-width": strokeWidth, style: { strokeDasharray: "256.92", strokeDashoffset: "0", strokeLinecap: "round", stroke: `${strokeBgColor}` } }) })) })), !textDisabled && (0, jsx_runtime_1.jsxs)("section", Object.assign({ className: "flex flex-column align-items-center mr-auto ml-auto mt-auto mb-auto" }, { children: [text !== "" && (0, jsx_runtime_1.jsx)("span", Object.assign({ className: textClassName }, { children: text })), value !== -1 && (0, jsx_runtime_1.jsxs)("span", Object.assign({ className: valueTextClassName }, { children: [value, "%"] }))] }))] })));
|
|
6
|
-
};
|
|
7
|
-
exports.default = CircleProgressComponent;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
|
-
const HalfProgressComponent = ({ height = 290, strokeWidth = 14, text = "", strokeColor = 'var(--primary-600)', strokeBgColor = 'var(--gray-300)', value = -1, textDisabled = false }) => {
|
|
5
|
-
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "relative flex align-items-center justify-content-center", style: { height: height, width: height } }, { children: [(0, jsx_runtime_1.jsx)("span", Object.assign({ role: "progressbar", className: "flex ", style: { width: `${height}px`, height: `${height}px`, transform: "rotate(-90deg)", position: "absolute", top: "0", zIndex: "10" } }, { children: (0, jsx_runtime_1.jsx)("svg", Object.assign({ viewBox: "22 22 110 110" }, { children: (0, jsx_runtime_1.jsx)("circle", { cx: "76", cy: "76", r: "40.2", fill: "none", "stroke-width": strokeWidth, style: { strokeDasharray: "180.46", strokeDashoffset: `${(180.46 - ((180.46 / 100) * value))}`, strokeLinecap: "round", stroke: `${strokeColor}` } }) })) })), (0, jsx_runtime_1.jsx)("span", Object.assign({ role: "progressbar", className: "flex obsolute ", style: { width: `${height}px`, height: `${height}px`, position: "absolute", transform: "rotate(-90deg)" } }, { children: (0, jsx_runtime_1.jsx)("svg", Object.assign({ viewBox: "22 22 110 110" }, { children: (0, jsx_runtime_1.jsx)("circle", { cx: "76", cy: "76", r: "40.2", fill: "none", "stroke-width": strokeWidth, style: { strokeDasharray: "128.46", strokeDashoffset: "0", strokeLinecap: "round", stroke: `${strokeBgColor}` } }) })) })), !textDisabled && (0, jsx_runtime_1.jsxs)("section", Object.assign({ className: "flex flex-column align-items-center mr-auto ml-auto mt-auto mb-auto" }, { children: [text !== "" && (0, jsx_runtime_1.jsx)("span", Object.assign({ className: "text-base" }, { children: text })), value !== -1 && (0, jsx_runtime_1.jsxs)("span", Object.assign({ className: "text-4xl my-2" }, { children: [value, "%"] }))] }))] })) }));
|
|
6
|
-
};
|
|
7
|
-
exports.default = HalfProgressComponent;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TabPanel = exports.TabView = void 0;
|
|
4
|
-
const tabview_1 = require("primereact/tabview");
|
|
5
|
-
Object.defineProperty(exports, "TabView", { enumerable: true, get: function () { return tabview_1.TabView; } });
|
|
6
|
-
Object.defineProperty(exports, "TabPanel", { enumerable: true, get: function () { return tabview_1.TabPanel; } });
|