@zauru-sdk/components 1.0.11 → 1.0.12
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 +8 -0
- package/dist/Alerts/index.d.ts +3 -0
- package/dist/Alerts/index.js +3 -0
- package/dist/BlockUI/BlockUI.d.ts +8 -0
- package/dist/BlockUI/BlockUI.js +8 -0
- package/dist/BlockUI/index.d.ts +1 -0
- package/dist/BlockUI/index.js +1 -0
- package/dist/Buttons/Button.d.ts +15 -0
- package/dist/Buttons/Button.js +43 -0
- package/dist/Buttons/index.d.ts +1 -0
- package/dist/Buttons/index.js +1 -0
- package/dist/Card/Card.d.ts +8 -0
- package/dist/Card/Card.js +5 -0
- package/dist/Card/index.d.ts +1 -0
- package/dist/Card/index.js +1 -0
- package/dist/Chat/ChatLayout.d.ts +17 -0
- package/dist/Chat/ChatLayout.js +27 -0
- package/dist/Chat/ChatMessageHistory.d.ts +12 -0
- package/dist/Chat/ChatMessageHistory.js +53 -0
- package/dist/Chat/index.d.ts +2 -0
- package/dist/Chat/index.js +2 -0
- package/dist/Containers/BodyContainer.d.ts +6 -0
- package/dist/Containers/BodyContainer.js +5 -0
- package/dist/Containers/ButtonSectionContainer.d.ts +8 -0
- package/dist/Containers/ButtonSectionContainer.js +5 -0
- package/dist/Containers/Container.d.ts +10 -0
- package/dist/Containers/Container.js +6 -0
- package/dist/Containers/DoubleContainer.d.ts +9 -0
- package/dist/Containers/DoubleContainer.js +14 -0
- package/dist/Containers/MainContainer.d.ts +6 -0
- package/dist/Containers/MainContainer.js +5 -0
- package/dist/Containers/OutletContainer.d.ts +6 -0
- package/dist/Containers/OutletContainer.js +5 -0
- package/dist/Containers/SubContainer.d.ts +10 -0
- package/dist/Containers/SubContainer.js +6 -0
- package/dist/Containers/index.d.ts +7 -0
- package/dist/Containers/index.js +7 -0
- package/dist/Footer/Footer.d.ts +7 -0
- package/dist/Footer/Footer.js +25 -0
- package/dist/Footer/index.d.ts +1 -0
- package/dist/Footer/index.js +1 -0
- package/dist/Labels/InfoLabel/index.d.ts +7 -0
- package/dist/Labels/InfoLabel/index.js +5 -0
- package/dist/Labels/index.d.ts +1 -0
- package/dist/Labels/index.js +1 -0
- package/dist/Layouts/homeLayout/index.d.ts +6 -0
- package/dist/Layouts/homeLayout/index.js +10 -0
- package/dist/Layouts/index.d.ts +1 -0
- package/dist/Layouts/index.js +1 -0
- package/dist/LineSeparator/LineSeparator.d.ts +1 -0
- package/dist/LineSeparator/LineSeparator.js +4 -0
- package/dist/LineSeparator/index.d.ts +1 -0
- package/dist/LineSeparator/index.js +1 -0
- package/dist/Modal/Modal.d.ts +10 -0
- package/dist/Modal/Modal.js +32 -0
- package/dist/Modal/index.d.ts +1 -0
- package/dist/Modal/index.js +1 -0
- package/dist/NavBar/index.d.ts +3 -0
- package/dist/NavBar/index.js +3 -0
- package/dist/ProgressBar/ProgressBar.d.ts +6 -0
- package/dist/ProgressBar/ProgressBar.js +5 -0
- package/dist/ProgressBar/ProgressCircle.d.ts +6 -0
- package/dist/ProgressBar/ProgressCircle.js +22 -0
- package/dist/ProgressBar/index.d.ts +2 -0
- package/dist/ProgressBar/index.js +2 -0
- package/dist/Skeletons/LoadingInputSkeleton.d.ts +1 -0
- package/dist/Skeletons/LoadingInputSkeleton.js +8 -0
- package/dist/Skeletons/index.d.ts +1 -0
- package/dist/Skeletons/index.js +1 -0
- package/dist/Tab/Tab.d.ts +9 -0
- package/dist/Tab/Tab.js +19 -0
- package/dist/Tab/index.d.ts +1 -0
- package/dist/Tab/index.js +1 -0
- package/dist/Table/ZauruTable.d.ts +25 -0
- package/dist/Table/ZauruTable.js +148 -0
- package/dist/Table/index.d.ts +1 -0
- package/dist/Table/index.js +1 -0
- package/dist/TaskList/TaskList.d.ts +14 -0
- package/dist/TaskList/TaskList.js +35 -0
- package/dist/TaskList/index.d.ts +1 -0
- package/dist/TaskList/index.js +1 -0
- package/dist/Titles/LabelArray.d.ts +4 -0
- package/dist/Titles/LabelArray.js +7 -0
- package/dist/Titles/TableColumnTitle.d.ts +4 -0
- package/dist/Titles/TableColumnTitle.js +5 -0
- package/dist/Titles/TitleH1.d.ts +1 -0
- package/dist/Titles/TitleH1.js +5 -0
- package/dist/Titles/TitleH2.d.ts +1 -0
- package/dist/Titles/TitleH2.js +5 -0
- package/dist/Titles/TitleH3.d.ts +1 -0
- package/dist/Titles/TitleH3.js +5 -0
- package/dist/Titles/index.d.ts +5 -0
- package/dist/Titles/index.js +5 -0
- package/dist/Tooltip/Tooltip.d.ts +7 -0
- package/dist/Tooltip/Tooltip.js +14 -0
- package/dist/Tooltip/index.d.ts +1 -0
- package/dist/Tooltip/index.js +1 -0
- package/dist/WithTooltip/WithTooltip.d.ts +7 -0
- package/dist/WithTooltip/WithTooltip.js +5 -0
- package/dist/WithTooltip/index.d.ts +1 -0
- package/dist/WithTooltip/index.js +1 -0
- package/dist/Wizards/StepWizard.d.ts +14 -0
- package/dist/Wizards/StepWizard.js +14 -0
- package/dist/Wizards/index.d.ts +1 -0
- package/dist/Wizards/index.js +1 -0
- package/dist/Zendesk/Chat.d.ts +14 -0
- package/dist/Zendesk/Chat.js +63 -0
- package/dist/Zendesk/index.d.ts +2 -0
- package/dist/Zendesk/index.js +2 -0
- package/dist/Zendesk/zendesk.config.d.ts +9 -0
- package/dist/Zendesk/zendesk.config.js +24 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +21 -1
- package/package.json +4 -2
- package/src/Alerts/index.ts +3 -0
- package/src/BlockUI/BlockUI.tsx +50 -0
- package/src/BlockUI/index.tsx +1 -0
- package/src/Buttons/Button.tsx +90 -0
- package/src/Buttons/index.ts +1 -0
- package/src/Card/Card.tsx +24 -0
- package/src/Card/index.ts +1 -0
- package/src/Containers/BodyContainer.tsx +14 -0
- package/src/Containers/ButtonSectionContainer.tsx +21 -0
- package/src/Containers/Container.tsx +39 -0
- package/src/Containers/DoubleContainer.tsx +48 -0
- package/src/Containers/MainContainer.tsx +17 -0
- package/src/Containers/OutletContainer.tsx +14 -0
- package/src/Containers/SubContainer.tsx +37 -0
- package/src/Containers/index.ts +7 -0
- package/src/Footer/Footer.tsx +61 -0
- package/src/Footer/index.tsx +1 -0
- package/src/Labels/InfoLabel/index.tsx +21 -0
- package/src/Labels/index.tsx +1 -0
- package/src/Layouts/homeLayout/index.tsx +34 -0
- package/src/Layouts/index.ts +1 -0
- package/src/LineSeparator/LineSeparator.tsx +3 -0
- package/src/LineSeparator/index.tsx +1 -0
- package/src/Modal/Modal.tsx +104 -0
- package/src/Modal/index.tsx +1 -0
- package/src/NavBar/index.tsx +5 -0
- package/src/ProgressBar/ProgressBar.tsx +25 -0
- package/src/ProgressBar/ProgressCircle.tsx +75 -0
- package/src/ProgressBar/index.tsx +2 -0
- package/src/Skeletons/LoadingInputSkeleton.tsx +12 -0
- package/src/Skeletons/index.ts +1 -0
- package/src/Tab/Tab.tsx +63 -0
- package/src/Tab/index.ts +1 -0
- package/src/Table/ZauruTable.tsx +263 -0
- package/src/Table/index.tsx +1 -0
- package/src/TaskList/TaskList.tsx +88 -0
- package/src/TaskList/index.ts +1 -0
- package/src/Titles/LabelArray.tsx +17 -0
- package/src/Titles/TableColumnTitle.tsx +9 -0
- package/src/Titles/TitleH1.tsx +11 -0
- package/src/Titles/TitleH2.tsx +10 -0
- package/src/Titles/TitleH3.tsx +10 -0
- package/src/Titles/index.ts +5 -0
- package/src/Tooltip/Tooltip.tsx +42 -0
- package/src/Tooltip/index.ts +1 -0
- package/src/WithTooltip/WithTooltip.tsx +21 -0
- package/src/WithTooltip/index.tsx +1 -0
- package/src/Wizards/StepWizard.tsx +88 -0
- package/src/Wizards/index.ts +1 -0
- package/src/index.ts +21 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import React, { useState } from "react";
|
|
4
|
+
|
|
5
|
+
type Props = {
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
text: string;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export const Tooltip = ({ children, text }: Props) => {
|
|
11
|
+
const [show, setShow] = useState(false);
|
|
12
|
+
|
|
13
|
+
return (
|
|
14
|
+
<div className="relative inline-block">
|
|
15
|
+
<div
|
|
16
|
+
onMouseEnter={() => setShow(true)}
|
|
17
|
+
onMouseLeave={() => setShow(false)}
|
|
18
|
+
>
|
|
19
|
+
{children}
|
|
20
|
+
</div>
|
|
21
|
+
{show && (
|
|
22
|
+
<div
|
|
23
|
+
className="absolute z-10 bg-gray-700 text-white px-2 py-1 rounded-md bottom-full left-1/2 transform -translate-x-1/2"
|
|
24
|
+
style={{ whiteSpace: "nowrap", height: "2rem" }}
|
|
25
|
+
>
|
|
26
|
+
{text}
|
|
27
|
+
<div
|
|
28
|
+
className="absolute top-full left-1/2 transform -translate-x-1/2"
|
|
29
|
+
style={{
|
|
30
|
+
width: "0",
|
|
31
|
+
height: "0",
|
|
32
|
+
borderTop: "6px solid transparent",
|
|
33
|
+
borderLeft: "6px solid transparent",
|
|
34
|
+
borderRight: "6px solid transparent",
|
|
35
|
+
borderBottom: "6px solid gray",
|
|
36
|
+
}}
|
|
37
|
+
></div>
|
|
38
|
+
</div>
|
|
39
|
+
)}
|
|
40
|
+
</div>
|
|
41
|
+
);
|
|
42
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Tooltip";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
type Props = {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
text: string;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export const WithTooltip = (props: Props) => {
|
|
9
|
+
const { children, text } = props;
|
|
10
|
+
|
|
11
|
+
return (
|
|
12
|
+
<>
|
|
13
|
+
<span className="group relative">
|
|
14
|
+
{children}
|
|
15
|
+
<span className="pointer-events-none absolute -top-10 left-1/2 -translate-x-1/2 whitespace-nowrap rounded bg-black px-2 py-1 text-white opacity-0 transition z-50 before:absolute before:left-1/2 before:top-full before:-translate-x-1/2 before:border-4 before:border-transparent before:border-t-black before:content-[''] group-hover:opacity-100 before:z-50">
|
|
16
|
+
{text}
|
|
17
|
+
</span>
|
|
18
|
+
</span>
|
|
19
|
+
</>
|
|
20
|
+
);
|
|
21
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./WithTooltip";
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import React, { useState } from "react";
|
|
3
|
+
import { LoadingInputSkeleton } from "src";
|
|
4
|
+
|
|
5
|
+
export type StepWizard = {
|
|
6
|
+
index: number;
|
|
7
|
+
stepName: string;
|
|
8
|
+
component: ReactNode;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
interface StepWizardProps {
|
|
12
|
+
steps: StepWizard[];
|
|
13
|
+
showStepName?: boolean;
|
|
14
|
+
loading?: boolean;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export const StepWizardComponent: React.FC<StepWizardProps> = ({
|
|
18
|
+
steps,
|
|
19
|
+
showStepName = false,
|
|
20
|
+
loading = false,
|
|
21
|
+
}) => {
|
|
22
|
+
const [currentStep, setCurrentStep] = useState(0);
|
|
23
|
+
|
|
24
|
+
if (loading) {
|
|
25
|
+
return (
|
|
26
|
+
<div className="lg:grid lg:grid-cols-10 gap-4">
|
|
27
|
+
<div className="lg:col-span-2">
|
|
28
|
+
<select className="lg:hidden mb-5 block w-full pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm rounded-md">
|
|
29
|
+
<option></option>
|
|
30
|
+
</select>
|
|
31
|
+
<div className="hidden lg:block">
|
|
32
|
+
<LoadingInputSkeleton />
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
<div className="lg:col-span-8">
|
|
36
|
+
<LoadingInputSkeleton />
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
return (
|
|
43
|
+
<div className="lg:grid lg:grid-cols-10 gap-4">
|
|
44
|
+
<div className="lg:col-span-2">
|
|
45
|
+
<select
|
|
46
|
+
className="lg:hidden mb-5 block w-full pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm rounded-md"
|
|
47
|
+
onChange={(e) => setCurrentStep(parseInt(e.target.value))}
|
|
48
|
+
value={currentStep}
|
|
49
|
+
>
|
|
50
|
+
{steps.map((step, index) => (
|
|
51
|
+
<option key={index} value={index}>
|
|
52
|
+
{showStepName ? step.stepName : `Step ${index + 1}`}
|
|
53
|
+
</option>
|
|
54
|
+
))}
|
|
55
|
+
</select>
|
|
56
|
+
<div className="scroll-hidden hidden lg:block">
|
|
57
|
+
{steps.map((step, index) => (
|
|
58
|
+
<div
|
|
59
|
+
key={index}
|
|
60
|
+
onClick={() => setCurrentStep(index)}
|
|
61
|
+
className={`py-2 px-4 mt-5 cursor-pointer rounded ${
|
|
62
|
+
currentStep === index
|
|
63
|
+
? "bg-blue-500 text-white"
|
|
64
|
+
: "text-blue-500 hover:bg-gray-100 border border-gray-300"
|
|
65
|
+
} ${
|
|
66
|
+
showStepName
|
|
67
|
+
? "text-wrap break-words"
|
|
68
|
+
: "rounded-full w-8 h-8 flex items-center justify-center"
|
|
69
|
+
}`}
|
|
70
|
+
>
|
|
71
|
+
{showStepName ? step.stepName : index + 1}
|
|
72
|
+
</div>
|
|
73
|
+
))}
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
<div className="lg:col-span-8">
|
|
77
|
+
{steps.map((step, index) => (
|
|
78
|
+
<div
|
|
79
|
+
key={index}
|
|
80
|
+
className={currentStep === index ? "block" : "hidden"}
|
|
81
|
+
>
|
|
82
|
+
{step.component}
|
|
83
|
+
</div>
|
|
84
|
+
))}
|
|
85
|
+
</div>
|
|
86
|
+
</div>
|
|
87
|
+
);
|
|
88
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./StepWizard";
|
package/src/index.ts
CHANGED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export * from "./Alerts";
|
|
2
|
+
export * from "./BlockUI";
|
|
3
|
+
export * from "./Buttons";
|
|
4
|
+
export * from "./Card";
|
|
5
|
+
//export * from "./Chat";
|
|
6
|
+
export * from "./Containers";
|
|
7
|
+
export * from "./Footer";
|
|
8
|
+
export * from "./Labels";
|
|
9
|
+
export * from "./Layouts";
|
|
10
|
+
export * from "./LineSeparator";
|
|
11
|
+
export * from "./Modal";
|
|
12
|
+
export * from "./NavBar";
|
|
13
|
+
export * from "./Skeletons";
|
|
14
|
+
export * from "./Tab";
|
|
15
|
+
export * from "./Table";
|
|
16
|
+
export * from "./TaskList";
|
|
17
|
+
export * from "./Titles";
|
|
18
|
+
export * from "./Tooltip";
|
|
19
|
+
export * from "./WithTooltip";
|
|
20
|
+
export * from "./Wizards";
|
|
21
|
+
//export * from "./Zendesk";
|