@inceptionbg/iui 1.0.5 → 1.0.6
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/dist/index.css +1 -0
- package/dist/index.d.ts +407 -0
- package/dist/index.js +269 -0
- package/dist/index.js.map +1 -0
- package/package.json +5 -5
- package/src/Elements/Accordions/Accordions.tsx +0 -63
- package/src/Elements/Alert/Alert.tsx +0 -31
- package/src/Elements/Alert/alert.scss +0 -36
- package/src/Elements/Button/Button.tsx +0 -55
- package/src/Elements/Button/IconButton.tsx +0 -42
- package/src/Elements/Button/button.scss +0 -97
- package/src/Elements/Dialog/Dialog.tsx +0 -175
- package/src/Elements/Helper/Collapse.tsx +0 -39
- package/src/Elements/Helper/NoAccessInfo.tsx +0 -195
- package/src/Elements/Tooltip/Tooltip.tsx +0 -116
- package/src/Elements/Tooltip/tooltip.scss +0 -46
- package/src/Elements/Wrappers/ConditionalWrapper.tsx +0 -10
- package/src/Elements/Wrappers/FormWrapper.tsx +0 -67
- package/src/Elements/Wrappers/FullPageWrapper.tsx +0 -87
- package/src/icons/duotone/faArrowLeftFromLine.ts +0 -17
- package/src/icons/duotone/faArrowRightToLine.ts +0 -17
- package/src/icons/duotone/faBell.ts +0 -17
- package/src/icons/duotone/faEye.ts +0 -17
- package/src/icons/duotone/faEyeSlash.ts +0 -17
- package/src/icons/duotone/faHouseHeart.ts +0 -17
- package/src/icons/duotone/faPlusCircle.ts +0 -18
- package/src/icons/duotone/faUser.ts +0 -18
- package/src/icons/duotone/index.ts +0 -19
- package/src/icons/light/faAngleDown.ts +0 -15
- package/src/icons/light/faArrowDownShortWide.ts +0 -15
- package/src/icons/light/faArrowDownWideShort.ts +0 -15
- package/src/icons/light/faArrowsToLine.ts +0 -15
- package/src/icons/light/faArrowsUpDown.ts +0 -15
- package/src/icons/light/faBell.ts +0 -15
- package/src/icons/light/faCheck.ts +0 -15
- package/src/icons/light/faClockRotateLeft.ts +0 -15
- package/src/icons/light/faEllipsisVertical.ts +0 -15
- package/src/icons/light/faXmark.ts +0 -15
- package/src/icons/light/index.ts +0 -23
- package/src/icons/regular/faArrowRightArrowLeft.ts +0 -15
- package/src/icons/regular/faCalendar.ts +0 -15
- package/src/icons/regular/faCircleCheck.ts +0 -15
- package/src/icons/regular/faCircleExclamation.ts +0 -15
- package/src/icons/regular/faCircleInfo.ts +0 -15
- package/src/icons/regular/faFileArrowDown.ts +0 -15
- package/src/icons/regular/faFilterCircleXmark.ts +0 -15
- package/src/icons/regular/faTriangleExclamation.ts +0 -15
- package/src/icons/solid/faAngleLeft.ts +0 -15
- package/src/icons/solid/faAngleRight.ts +0 -15
- package/src/icons/solid/faArrowDownWideShort.ts +0 -15
- package/src/icons/solid/faArrowLeft.ts +0 -15
- package/src/icons/solid/faEllipsisVertical.ts +0 -15
- package/src/icons/solid/faFilter.ts +0 -15
- package/src/icons/solid/faGripDotsVertical.ts +0 -15
- package/src/icons/solid/faListUl.ts +0 -15
- package/src/icons/solid/faMagnifyingGlass.ts +0 -15
- package/src/icons/solid/faPrint.ts +0 -15
- package/src/icons/solid/faRotateRight.ts +0 -15
- package/src/icons/solid/faXmark.ts +0 -15
- package/src/styles/App.scss +0 -25
- package/src/styles/iui/common/_animations.scss +0 -56
- package/src/styles/iui/common/_typography.scss +0 -76
- package/src/styles/iui/common/_variables.scss +0 -56
- package/src/styles/iui/common/helpers/_base.scss +0 -32
- package/src/styles/iui/common/helpers/_color.scss +0 -7
- package/src/styles/iui/common/helpers/_display.scss +0 -54
- package/src/styles/iui/common/helpers/_size.scss +0 -17
- package/src/styles/iui/common/maps/_align.scss +0 -24
- package/src/styles/iui/common/maps/_spacing.scss +0 -78
- package/src/styles/iui/components/_accordions.scss +0 -47
- package/src/styles/iui/components/_badge.scss +0 -52
- package/src/styles/iui/components/_card.scss +0 -24
- package/src/styles/iui/components/_dialog.scss +0 -75
- package/src/styles/iui/components/_header.scss +0 -22
- package/src/styles/iui/components/_input.scss +0 -225
- package/src/styles/iui/components/_loader.scss +0 -93
- package/src/styles/iui/components/_menu.scss +0 -44
- package/src/styles/iui/components/_notifications.scss +0 -86
- package/src/styles/iui/components/_page.scss +0 -50
- package/src/styles/iui/components/_pagePrelogin.scss +0 -66
- package/src/styles/iui/components/_portal.scss +0 -8
- package/src/styles/iui/components/_print.scss +0 -92
- package/src/styles/iui/components/_scrollbar.scss +0 -18
- package/src/styles/iui/components/_selectInput.scss +0 -15
- package/src/styles/iui/components/_sidebar.scss +0 -171
- package/src/styles/iui/components/_smallComponents.scss +0 -24
- package/src/styles/iui/components/_table.scss +0 -207
- package/src/styles/iui/components/_tabs.scss +0 -94
- package/src/styles/iui.scss +0 -28
- package/src/styles/red-variables.scss +0 -9
- package/src/types/IBasic.ts +0 -31
- package/src/types/IError.ts +0 -4
- package/src/types/IHeaderAction.ts +0 -12
- package/src/types/ISelect.ts +0 -6
- package/src/types/ISidebar.ts +0 -29
- package/src/types/ITab.ts +0 -10
- package/src/types/ITable.ts +0 -210
- package/src/types/custom.d.ts +0 -9
- package/src/utils/DateUtils.ts +0 -30
- package/src/utils/NumberUtils.ts +0 -21
- package/src/utils/ObjectUtils.ts +0 -49
- package/src/utils/StringUtils.ts +0 -2
- package/src/utils/Toasts.ts +0 -6
- package/src/utils/icons.ts +0 -11
- package/src/utils/index.ts +0 -41
- package/tsconfig.json +0 -20
package/dist/index.js
ADDED
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
import clsx from 'clsx';
|
|
2
|
+
export { default as clsx } from 'clsx';
|
|
3
|
+
export { default as moment } from 'moment';
|
|
4
|
+
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
5
|
+
export { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
6
|
+
import moment from 'moment/moment';
|
|
7
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
8
|
+
import { useState, useRef, useEffect, forwardRef, cloneElement } from 'react';
|
|
9
|
+
import { useNavigate } from 'react-router-dom';
|
|
10
|
+
import { createPortal } from 'react-dom';
|
|
11
|
+
|
|
12
|
+
const formatDate = (date) => date ? moment(date).format(`DD.MM.YYYY.`) : '/';
|
|
13
|
+
const formatDateAndTime = (date, withSeconds) => date ? moment(date).format(`DD.MM.YYYY. HH:mm${withSeconds ? ':ss' : ''}`) : '/';
|
|
14
|
+
const formatTime = (date, withSeconds) => date ? moment(date).format(`HH:mm${withSeconds ? ':ss' : ''}`) : '/';
|
|
15
|
+
const dateAddDays = (date, addDays) => moment(date).add(addDays, 'days').toISOString();
|
|
16
|
+
const checkIfExpired = (date) => date ? moment(new Date()) > moment(date) : true;
|
|
17
|
+
const getCurrentDateFormattedYMD = () => moment().format('yyyy-MM-DD').toString();
|
|
18
|
+
const getDaysLeft = (date) => moment(date).diff(new Date(), 'days');
|
|
19
|
+
const formatYearMonth = (year, month) => `${year}-${month < 10 ? `0${month}` : month}`;
|
|
20
|
+
// export const getDayInputRegex = (max: number) =>
|
|
21
|
+
// `(0[1-9]|1[0-9]|2[0-${max === 28 ? "8" : "9"}]${
|
|
22
|
+
// max > 29 && `|3[0${max > 30 && "-1"}]`
|
|
23
|
+
// })`;
|
|
24
|
+
|
|
25
|
+
// export const toNumberOrZero = (value?: string | number) => (!!value ? +value : 0);
|
|
26
|
+
const formatCurrency = (number, minimumFractionDigits, maximumFractionDigits) => Number(number || 0).toLocaleString('sr-RS', {
|
|
27
|
+
minimumFractionDigits: minimumFractionDigits || 2,
|
|
28
|
+
maximumFractionDigits: maximumFractionDigits || 2,
|
|
29
|
+
});
|
|
30
|
+
const formatCurrencyNoDecimals = (number) =>
|
|
31
|
+
// number?.toString().replace(',', '.') || 0;
|
|
32
|
+
Number(number || 0).toLocaleString('sr-RS');
|
|
33
|
+
// export const formatDecimalNumber = (number?: string | number) =>
|
|
34
|
+
// number?.toString().replace('.', ',') || 0;
|
|
35
|
+
// export const roundTwoDecimals = (value?: string | number) =>
|
|
36
|
+
// !!value ? Math.round(+value * 100) / 100 : 0;
|
|
37
|
+
|
|
38
|
+
const maxChar = (str = '', maxLength = 30) => str.length > maxLength ? `${str.substring(0, maxLength)}...` : str;
|
|
39
|
+
|
|
40
|
+
const deleteProps = (obj, props) => {
|
|
41
|
+
let newObj = { ...obj };
|
|
42
|
+
props.forEach((e) => delete newObj[e]);
|
|
43
|
+
return newObj;
|
|
44
|
+
};
|
|
45
|
+
const deleteEmptyProps = (obj) => Object.entries(obj).reduce((a, [k, v]) => [null, undefined, ""].includes(v) ? a : ((a[k] = v), a), {});
|
|
46
|
+
const deleteEmptyPropsIncludingArray = (obj) => Object.entries(obj).reduce((a, [k, v]) => [null, undefined, ""].includes(v) || (Array.isArray(v) && !v.length)
|
|
47
|
+
? a
|
|
48
|
+
: ((a[k] = v), a), {});
|
|
49
|
+
const getActiveFilterNumber = (obj) => Object.keys(obj).length;
|
|
50
|
+
const getVisibleColumnsIds = (tableCols, isPrint) => tableCols.reduce((arr, col) => col.hidden ||
|
|
51
|
+
col.unavailable ||
|
|
52
|
+
(isPrint && ["select", "icons", "actions"].includes(col.id))
|
|
53
|
+
? arr
|
|
54
|
+
: arr.concat(col.id), []);
|
|
55
|
+
|
|
56
|
+
const Collapse = ({ isOpen, className, children }) => {
|
|
57
|
+
const [height, setHeight] = useState();
|
|
58
|
+
const ref = useRef(null);
|
|
59
|
+
useEffect(() => {
|
|
60
|
+
const observer = new ResizeObserver((entries) => {
|
|
61
|
+
const newHeight = Math.ceil(entries[0].contentRect.height);
|
|
62
|
+
setHeight(newHeight);
|
|
63
|
+
});
|
|
64
|
+
let observerRefValue;
|
|
65
|
+
if (ref.current) {
|
|
66
|
+
observerRefValue = ref.current;
|
|
67
|
+
observer.observe(observerRefValue);
|
|
68
|
+
}
|
|
69
|
+
return () => {
|
|
70
|
+
observerRefValue && observer.unobserve(observerRefValue);
|
|
71
|
+
};
|
|
72
|
+
}, [ref]);
|
|
73
|
+
return (jsx("div", { className: clsx("iui-colapse", className), style: { maxHeight: isOpen ? height : 0 }, children: jsx("div", { ref: ref, children: children }) }));
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
const prefix$6 = "fal";
|
|
77
|
+
const iconName$6 = "arrows-to-line";
|
|
78
|
+
const width$6 = 448;
|
|
79
|
+
const height$6 = 512;
|
|
80
|
+
const unicode$6 = "e0a7";
|
|
81
|
+
const svgPathData$6 = "M235.3 324.7C231.3 320.7 226.5 320 224 320s-7.299 .6547-11.33 4.698l-79.98 79.98C129.6 407.8 128 411.9 128 416c0 8.523 6.865 16 16 16c4.094 0 8.188-1.562 11.31-4.688L208 374.6V496c0 8.844 7.156 16 16 16s16-7.156 16-16v-121.4l52.69 52.69C295.8 430.4 299.9 432 304 432c9.139 0 16-7.477 16-16c0-4.094-1.562-8.188-4.688-11.31L235.3 324.7zM212.7 187.3C214.4 189 218.3 192 224 192s9.609-2.98 11.33-4.707l79.98-79.98C318.4 104.2 320 100.1 320 96c0-8.527-6.865-16-16-16c-4.094 0-8.188 1.562-11.31 4.688L240 137.4V16C240 7.156 232.8 0 224 0S208 7.156 208 16v121.4L155.3 84.69C152.2 81.56 148.1 80 144 80C134.9 80 128 87.47 128 96c0 4.094 1.562 8.188 4.688 11.31L212.7 187.3zM432 240h-416C7.156 240 0 247.1 0 255.1S7.156 272 16 272h416c8.844 0 16-7.165 16-16.01S440.8 240 432 240z";
|
|
82
|
+
const faArrowsToLine = {
|
|
83
|
+
prefix: prefix$6,
|
|
84
|
+
iconName: iconName$6,
|
|
85
|
+
icon: [width$6, height$6, [], unicode$6, svgPathData$6],
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
const prefix$5 = "fal";
|
|
89
|
+
const iconName$5 = "arrows-up-down";
|
|
90
|
+
const width$5 = 256;
|
|
91
|
+
const height$5 = 512;
|
|
92
|
+
const unicode$5 = "f07d";
|
|
93
|
+
const svgPathData$5 = "M139.3 4.688l112 112C254.4 119.8 256 123.9 256 128s-1.562 8.188-4.688 11.31c-6.25 6.25-16.38 6.25-22.62 0L144 54.63v402.8l84.69-84.69c6.25-6.25 16.38-6.25 22.62 0C254.4 375.8 256 379.9 256 384s-1.562 8.188-4.688 11.31l-112 112c-6.25 6.25-16.38 6.25-22.62 0l-112-112c-6.25-6.25-6.25-16.38 0-22.62s16.38-6.25 22.62 0L112 457.4V54.63L27.31 139.3c-6.25 6.25-16.38 6.25-22.62 0s-6.25-16.38 0-22.62l112-112C122.9-1.562 133.1-1.562 139.3 4.688z";
|
|
94
|
+
const faArrowsUpDown = {
|
|
95
|
+
prefix: prefix$5,
|
|
96
|
+
iconName: iconName$5,
|
|
97
|
+
icon: [width$5, height$5, [], unicode$5, svgPathData$5],
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
const Accordions = ({ tabs: allTabs, initialValue, compact, className, }) => {
|
|
101
|
+
const tabs = allTabs.filter((tab) => !tab.hidden);
|
|
102
|
+
const [selected, setSelected] = useState(initialValue || "");
|
|
103
|
+
return !!tabs.length ? (jsx("div", { className: className, children: jsx("div", { className: "iui-accordions", children: tabs.map((tab) => (jsxs("div", { className: clsx("iui-accordion", {
|
|
104
|
+
selected: selected === tab.value,
|
|
105
|
+
compact,
|
|
106
|
+
}), children: [jsxs("div", { className: clsx("summary clickable", {
|
|
107
|
+
disabled: tab.disabled,
|
|
108
|
+
}), onClick: tab.disabled
|
|
109
|
+
? undefined
|
|
110
|
+
: () => setSelected(selected === tab.value ? "" : tab.value), children: [jsxs("div", { className: "flex center", children: [tab.icon && (jsx(FontAwesomeIcon, { icon: tab.icon, className: "iui-icon" })), tab.label] }), jsx(FontAwesomeIcon, { icon: tab.value === selected ? faArrowsToLine : faArrowsUpDown, className: "collapse-icon" })] }), jsx(Collapse, { isOpen: selected === tab.value, children: jsx("div", { className: "p-4", children: tab.component }) })] }, tab.value))) }) })) : null;
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
const prefix$4 = "far";
|
|
114
|
+
const iconName$4 = "circle-check";
|
|
115
|
+
const width$4 = 512;
|
|
116
|
+
const height$4 = 512;
|
|
117
|
+
const unicode$4 = "f058";
|
|
118
|
+
const svgPathData$4 = "M335 175L224 286.1L176.1 239c-9.375-9.375-24.56-9.375-33.94 0s-9.375 24.56 0 33.94l64 64C211.7 341.7 217.8 344 224 344s12.28-2.344 16.97-7.031l128-128c9.375-9.375 9.375-24.56 0-33.94S344.4 165.7 335 175zM256 0C114.6 0 0 114.6 0 256s114.6 256 256 256s256-114.6 256-256S397.4 0 256 0zM256 464c-114.7 0-208-93.31-208-208S141.3 48 256 48s208 93.31 208 208S370.7 464 256 464z";
|
|
119
|
+
const faCircleCheck = {
|
|
120
|
+
prefix: prefix$4,
|
|
121
|
+
iconName: iconName$4,
|
|
122
|
+
icon: [width$4, height$4, [], unicode$4, svgPathData$4],
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
const prefix$3 = "far";
|
|
126
|
+
const iconName$3 = "circle-exclamation";
|
|
127
|
+
const width$3 = 512;
|
|
128
|
+
const height$3 = 512;
|
|
129
|
+
const unicode$3 = "f06a";
|
|
130
|
+
const svgPathData$3 = "M256 0C114.6 0 0 114.6 0 256s114.6 256 256 256s256-114.6 256-256S397.4 0 256 0zM256 464c-114.7 0-208-93.31-208-208S141.3 48 256 48s208 93.31 208 208S370.7 464 256 464zM256 304c13.25 0 24-10.75 24-24v-128C280 138.8 269.3 128 256 128S232 138.8 232 152v128C232 293.3 242.8 304 256 304zM256 337.1c-17.36 0-31.44 14.08-31.44 31.44C224.6 385.9 238.6 400 256 400s31.44-14.08 31.44-31.44C287.4 351.2 273.4 337.1 256 337.1z";
|
|
131
|
+
const faCircleExclamation = {
|
|
132
|
+
prefix: prefix$3,
|
|
133
|
+
iconName: iconName$3,
|
|
134
|
+
icon: [width$3, height$3, [], unicode$3, svgPathData$3],
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
const prefix$2 = "far";
|
|
138
|
+
const iconName$2 = "circle-info";
|
|
139
|
+
const width$2 = 512;
|
|
140
|
+
const height$2 = 512;
|
|
141
|
+
const unicode$2 = "f05a";
|
|
142
|
+
const svgPathData$2 = "M256 0C114.6 0 0 114.6 0 256s114.6 256 256 256s256-114.6 256-256S397.4 0 256 0zM256 464c-114.7 0-208-93.31-208-208S141.3 48 256 48s208 93.31 208 208S370.7 464 256 464zM296 336h-16V248C280 234.8 269.3 224 256 224H224C210.8 224 200 234.8 200 248S210.8 272 224 272h8v64h-16C202.8 336 192 346.8 192 360S202.8 384 216 384h80c13.25 0 24-10.75 24-24S309.3 336 296 336zM256 192c17.67 0 32-14.33 32-32c0-17.67-14.33-32-32-32S224 142.3 224 160C224 177.7 238.3 192 256 192z";
|
|
143
|
+
const faCircleInfo = {
|
|
144
|
+
prefix: prefix$2,
|
|
145
|
+
iconName: iconName$2,
|
|
146
|
+
icon: [width$2, height$2, [], unicode$2, svgPathData$2],
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
const prefix$1 = "far";
|
|
150
|
+
const iconName$1 = "triangle-exclamation";
|
|
151
|
+
const width$1 = 512;
|
|
152
|
+
const height$1 = 512;
|
|
153
|
+
const unicode$1 = "f071";
|
|
154
|
+
const svgPathData$1 = "M506.3 417l-213.3-364C284.8 39 270.4 32 256 32C241.6 32 227.2 39 218.1 53l-213.2 364C-10.59 444.9 9.851 480 42.74 480h426.6C502.1 480 522.6 445 506.3 417zM52.58 432L255.1 84.8L459.4 432H52.58zM256 337.1c-17.36 0-31.44 14.08-31.44 31.44c0 17.36 14.11 31.44 31.48 31.44s31.4-14.08 31.4-31.44C287.4 351.2 273.4 337.1 256 337.1zM232 184v96C232 293.3 242.8 304 256 304s24-10.75 24-24v-96C280 170.8 269.3 160 256 160S232 170.8 232 184z";
|
|
155
|
+
const faTriangleExclamation = {
|
|
156
|
+
prefix: prefix$1,
|
|
157
|
+
iconName: iconName$1,
|
|
158
|
+
icon: [width$1, height$1, [], unicode$1, svgPathData$1],
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
const infoIcons = {
|
|
162
|
+
error: faCircleExclamation,
|
|
163
|
+
success: faCircleCheck,
|
|
164
|
+
info: faCircleInfo,
|
|
165
|
+
warning: faTriangleExclamation,
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
const Alert = ({ text, severity, fitContent, className, children, }) => (jsxs("div", { className: clsx("iui-alert", severity, className, {
|
|
169
|
+
"width-fit": fitContent,
|
|
170
|
+
}), children: [jsx(FontAwesomeIcon, { icon: infoIcons[severity] }), text, children] }));
|
|
171
|
+
|
|
172
|
+
const Button = forwardRef(({ label, icon, iconEnd, onClick, disabled, primary, outlined, active, className, size = "m", buttonProps, }, ref) => (jsxs("button", { ref: ref, disabled: disabled, className: clsx("iui-btn", className, size, {
|
|
173
|
+
primary,
|
|
174
|
+
outlined,
|
|
175
|
+
active,
|
|
176
|
+
}), onClick: onClick, type: buttonProps?.type || onClick ? "button" : "submit", ...buttonProps, children: [icon && jsx(FontAwesomeIcon, { icon: icon }), jsx("div", { className: "iui-btn-label", children: label }), iconEnd && jsx(FontAwesomeIcon, { icon: iconEnd })] })));
|
|
177
|
+
|
|
178
|
+
const IconButton = forwardRef(({ icon, onClick, disabled, className, active, buttonProps,
|
|
179
|
+
// outlined,
|
|
180
|
+
// size = "m",
|
|
181
|
+
}, ref) => (jsx("button", { ref: ref, disabled: disabled, className: clsx("iui-btn iui-icon-btn", className, { active }), onClick: onClick, type: buttonProps?.type || onClick ? "button" : "submit", ...buttonProps, children: jsx(FontAwesomeIcon, { icon: icon }) })));
|
|
182
|
+
|
|
183
|
+
const NoAccessInfo = ({ title, buttonLabel }) => {
|
|
184
|
+
const navigate = useNavigate();
|
|
185
|
+
return (jsxs("div", { className: "flex center column mt-5", children: [jsxs("svg", { id: "aa03ddf9-f8f2-4819-a4ce-be9b0a220741", "data-name": "Layer 1", xmlns: "http://www.w3.org/2000/svg", width: "40%", viewBox: "0 0 1119.60911 699", children: [jsx("title", { children: "No Access" }), jsx("circle", { cx: "292.60911", cy: "213", r: "213", fill: "#f2f2f2" }), jsx("path", { d: "M31.39089,151.64237c0,77.49789,48.6181,140.20819,108.70073,140.20819", transform: "translate(-31.39089 -100.5)", fill: "#2f2e41" }), jsx("path", { d: "M140.09162,291.85056c0-78.36865,54.255-141.78356,121.30372-141.78356", transform: "translate(-31.39089 -100.5)", fill: "#4191ff" }), jsx("path", { d: "M70.77521,158.66768c0,73.61476,31.00285,133.18288,69.31641,133.18288", transform: "translate(-31.39089 -100.5)", fill: "#4191ff" }), jsx("path", { d: "M140.09162,291.85056c0-100.13772,62.7103-181.16788,140.20819-181.16788", transform: "translate(-31.39089 -100.5)", fill: "#2f2e41" }), jsx("path", { d: "M117.22379,292.83905s15.41555-.47479,20.06141-3.783,23.713-7.2585,24.86553-1.95278,23.16671,26.38821,5.76263,26.5286-40.43935-2.711-45.07627-5.53549S117.22379,292.83905,117.22379,292.83905Z", transform: "translate(-31.39089 -100.5)", fill: "#a8a8a8" }), jsx("path", { d: "M168.224,311.78489c-17.40408.14042-40.43933-2.71094-45.07626-5.53548-3.53126-2.151-4.93843-9.86945-5.40926-13.43043-.32607.014-.51463.02-.51463.02s.97638,12.43276,5.61331,15.2573,27.67217,5.67589,45.07626,5.53547c5.02386-.04052,6.7592-1.82793,6.66391-4.47526C173.87935,310.756,171.96329,311.75474,168.224,311.78489Z", transform: "translate(-31.39089 -100.5)", opacity: "0.2" }), jsx("ellipse", { cx: "198.60911", cy: "424.5", rx: "187", ry: "25.43993", fill: "#3f3d56" }), jsx("ellipse", { cx: "198.60911", cy: "424.5", rx: "157", ry: "21.35866", opacity: "0.1" }), jsx("ellipse", { cx: "836.60911", cy: "660.5", rx: "283", ry: "38.5", fill: "#3f3d56" }), jsx("ellipse", { cx: "310.60911", cy: "645.5", rx: "170", ry: "23.12721", fill: "#3f3d56" }), jsx("path", { d: "M494,726.5c90,23,263-30,282-90", transform: "translate(-31.39089 -100.5)", fill: "none", stroke: "#2f2e41", strokeMiterlimit: "10", strokeWidth: "2" }), jsx("path", { d: "M341,359.5s130-36,138,80-107,149-17,172", transform: "translate(-31.39089 -100.5)", fill: "none", stroke: "#2f2e41", strokeMiterlimit: "10", strokeWidth: "2" }), jsx("path", { d: "M215.40233,637.78332s39.0723-10.82,41.47675,24.04449-32.15951,44.78287-5.10946,51.69566", transform: "translate(-31.39089 -100.5)", fill: "none", stroke: "#2f2e41", strokeMiterlimit: "10", strokeWidth: "2" }), jsx("path", { d: "M810.09554,663.73988,802.218,714.03505s-38.78182,20.60284-11.51335,21.20881,155.73324,0,155.73324,0,24.84461,0-14.54318-21.81478l-7.87756-52.719Z", transform: "translate(-31.39089 -100.5)", fill: "#2f2e41" }), jsx("path", { d: "M785.21906,734.69812c6.193-5.51039,16.9989-11.252,16.9989-11.252l7.87756-50.2952,113.9216.10717,7.87756,49.582c9.185,5.08711,14.8749,8.987,18.20362,11.97818,5.05882-1.15422,10.58716-5.44353-18.20362-21.38921l-7.87756-52.719-113.9216,3.02983L802.218,714.03506S769.62985,731.34968,785.21906,734.69812Z", transform: "translate(-31.39089 -100.5)", opacity: "0.1" }), jsx("rect", { x: "578.43291", y: "212.68859", width: "513.25314", height: "357.51989", rx: "18.04568", fill: "#2f2e41" }), jsx("rect", { x: "595.70294", y: "231.77652", width: "478.71308", height: "267.83694", fill: "#3f3d56" }), jsx("circle", { cx: "835.05948", cy: "223.29299", r: "3.02983", fill: "#f2f2f2" }), jsx("path", { d: "M1123.07694,621.32226V652.6628a18.04341,18.04341,0,0,1-18.04568,18.04568H627.86949A18.04341,18.04341,0,0,1,609.8238,652.6628V621.32226Z", transform: "translate(-31.39089 -100.5)", fill: "#2f2e41" }), jsx("polygon", { points: "968.978 667.466 968.978 673.526 642.968 673.526 642.968 668.678 643.417 667.466 651.452 645.651 962.312 645.651 968.978 667.466", fill: "#2f2e41" }), jsx("path", { d: "M1125.828,762.03359c-.59383,2.539-2.83591,5.21743-7.90178,7.75032-18.179,9.08949-55.1429-2.42386-55.1429-2.42386s-28.4804-4.84773-28.4804-17.573a22.72457,22.72457,0,0,1,2.49658-1.48459c7.64294-4.04351,32.98449-14.02122,77.9177.42248a18.73921,18.73921,0,0,1,8.54106,5.59715C1125.07908,756.45353,1126.50669,759.15715,1125.828,762.03359Z", transform: "translate(-31.39089 -100.5)", fill: "#2f2e41" }), jsx("path", { d: "M1125.828,762.03359c-22.251,8.526-42.0843,9.1622-62.43871-4.975-10.26507-7.12617-19.59089-8.88955-26.58979-8.75618,7.64294-4.04351,32.98449-14.02122,77.9177.42248a18.73921,18.73921,0,0,1,8.54106,5.59715C1125.07908,756.45353,1126.50669,759.15715,1125.828,762.03359Z", transform: "translate(-31.39089 -100.5)", opacity: "0.1" }), jsx("ellipse", { cx: "1066.53846", cy: "654.13477", rx: "7.87756", ry: "2.42386", fill: "#f2f2f2" }), jsx("circle", { cx: "835.05948", cy: "545.66686", r: "11.51335", fill: "#f2f2f2" }), jsx("polygon", { points: "968.978 667.466 968.978 673.526 642.968 673.526 642.968 668.678 643.417 667.466 968.978 667.466", opacity: "0.1" }), jsx("rect", { x: "108.60911", y: "159", width: "208", height: "242", fill: "#2f2e41" }), jsx("rect", { x: "87.60911", y: "135", width: "250", height: "86", fill: "#3f3d56" }), jsx("rect", { x: "87.60911", y: "237", width: "250", height: "86", fill: "#3f3d56" }), jsx("rect", { x: "87.60911", y: "339", width: "250", height: "86", fill: "#3f3d56" }), jsx("rect", { x: "271.60911", y: "150", width: "16", height: "16", fill: "#4191ff", opacity: "0.4" }), jsx("rect", { x: "294.60911", y: "150", width: "16", height: "16", fill: "#4191ff", opacity: "0.8" }), jsx("rect", { x: "317.60911", y: "150", width: "16", height: "16", fill: "#4191ff" }), jsx("rect", { x: "271.60911", y: "251", width: "16", height: "16", fill: "#4191ff", opacity: "0.4" }), jsx("rect", { x: "294.60911", y: "251", width: "16", height: "16", fill: "#4191ff", opacity: "0.8" }), jsx("rect", { x: "317.60911", y: "251", width: "16", height: "16", fill: "#4191ff" }), jsx("rect", { x: "271.60911", y: "352", width: "16", height: "16", fill: "#4191ff", opacity: "0.4" }), jsx("rect", { x: "294.60911", y: "352", width: "16", height: "16", fill: "#4191ff", opacity: "0.8" }), jsx("rect", { x: "317.60911", y: "352", width: "16", height: "16", fill: "#4191ff" }), jsx("circle", { cx: "316.60911", cy: "538", r: "79", fill: "#2f2e41" }), jsx("rect", { x: "280.60911", y: "600", width: "24", height: "43", fill: "#2f2e41" }), jsx("rect", { x: "328.60911", y: "600", width: "24", height: "43", fill: "#2f2e41" }), jsx("ellipse", { cx: "300.60911", cy: "643.5", rx: "20", ry: "7.5", fill: "#2f2e41" }), jsx("ellipse", { cx: "348.60911", cy: "642.5", rx: "20", ry: "7.5", fill: "#2f2e41" }), jsx("circle", { cx: "318.60911", cy: "518", r: "27", fill: "#fff" }), jsx("circle", { cx: "318.60911", cy: "518", r: "9", fill: "#3f3d56" }), jsx("path", { d: "M271.36733,565.03228c-6.37889-28.56758,14.01185-57.43392,45.544-64.47477s62.2651,10.41,68.644,38.9776-14.51861,39.10379-46.05075,46.14464S277.74622,593.59986,271.36733,565.03228Z", transform: "translate(-31.39089 -100.5)", fill: "#4191ff" }), jsx("ellipse", { cx: "417.21511", cy: "611.34365", rx: "39.5", ry: "12.40027", transform: "translate(-238.28665 112.98044) rotate(-23.17116)", fill: "#2f2e41" }), jsx("ellipse", { cx: "269.21511", cy: "664.34365", rx: "39.5", ry: "12.40027", transform: "translate(-271.07969 59.02084) rotate(-23.17116)", fill: "#2f2e41" }), jsx("path", { d: "M394,661.5c0,7.732-19.90861,23-42,23s-43-14.268-43-22,20.90861-6,43-6S394,653.768,394,661.5Z", transform: "translate(-31.39089 -100.5)", fill: "#fff" })] }), jsx("h1", { className: "fs-32 mt-5", children: title || "You have no access to this resource" }), jsx(Button, { label: buttonLabel || "Return to homepage", className: "mt-5", primary: true, size: "l", onClick: () => navigate("/") })] }));
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
const Tooltip = ({ label, position = "bottom", disabled, className, children, }) => {
|
|
189
|
+
const [newPosition, setNewPosition] = useState("");
|
|
190
|
+
const containerRef = useRef(null);
|
|
191
|
+
const tooltipRef = useRef(null);
|
|
192
|
+
useEffect(() => {
|
|
193
|
+
if (!disabled && !!label) {
|
|
194
|
+
const container = containerRef.current;
|
|
195
|
+
const tooltip = tooltipRef.current;
|
|
196
|
+
const onMouseEnter = () => {
|
|
197
|
+
if (container && tooltip) {
|
|
198
|
+
setAbsolutePosition(container, tooltip, position, setNewPosition);
|
|
199
|
+
tooltip?.classList.add("visible");
|
|
200
|
+
}
|
|
201
|
+
};
|
|
202
|
+
const onMouseLeave = () => tooltip?.classList.remove("visible");
|
|
203
|
+
container?.addEventListener("mouseenter", onMouseEnter);
|
|
204
|
+
container?.addEventListener("mouseleave", onMouseLeave);
|
|
205
|
+
return () => {
|
|
206
|
+
container?.removeEventListener("mouseenter", onMouseEnter);
|
|
207
|
+
container?.removeEventListener("mouseleave", onMouseLeave);
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
}, [disabled, label, position]);
|
|
211
|
+
return !!label && !disabled ? (jsxs(Fragment, { children: [cloneElement(children, { ref: containerRef }), createPortal(jsx("div", { ref: tooltipRef, className: clsx("tooltip-container", className), children: jsxs("div", { className: "tooltip", children: [jsx("div", { className: clsx("arrow", newPosition || position) }), jsx("div", { children: label })] }) }), document.body)] })) : (children);
|
|
212
|
+
};
|
|
213
|
+
const setAbsolutePosition = (containerEl, targetEl, position, setNewPosition) => {
|
|
214
|
+
const containerRect = containerEl.getBoundingClientRect();
|
|
215
|
+
const tooltipRect = targetEl.getBoundingClientRect();
|
|
216
|
+
if (position === "bottom" || position === "top") {
|
|
217
|
+
const bottom = Math.floor(containerRect.bottom + 16);
|
|
218
|
+
const top = Math.floor(containerRect.top - tooltipRect.height - 16);
|
|
219
|
+
const leftCenter = Math.floor(containerRect.left + containerRect.width / 2 - tooltipRect.width / 2);
|
|
220
|
+
const reverse = position === "top"
|
|
221
|
+
? top < 0
|
|
222
|
+
: bottom + tooltipRect.height > window.innerHeight;
|
|
223
|
+
setNewPosition(reverse ? (position === "bottom" ? "top" : "bottom") : "");
|
|
224
|
+
targetEl.style.top = `${position === "bottom" ? (reverse ? top : bottom) : reverse ? bottom : top}px`;
|
|
225
|
+
targetEl.style.left = `${leftCenter}px`;
|
|
226
|
+
}
|
|
227
|
+
else if (position === "right") {
|
|
228
|
+
targetEl.style.top =
|
|
229
|
+
Math.floor(containerRect.top + containerRect.height / 2 - tooltipRect.height / 2) + "px";
|
|
230
|
+
targetEl.style.left = Math.floor(containerRect.right + 16) + "px";
|
|
231
|
+
}
|
|
232
|
+
else if (position === "left") {
|
|
233
|
+
targetEl.style.top =
|
|
234
|
+
Math.floor(containerRect.top + containerRect.height / 2 - tooltipRect.height / 2) + "px";
|
|
235
|
+
targetEl.style.left =
|
|
236
|
+
Math.floor(containerRect.left - tooltipRect.width - 16) + "px";
|
|
237
|
+
}
|
|
238
|
+
};
|
|
239
|
+
|
|
240
|
+
const ConditionalWrapper = ({ condition, wrapper, children }) => condition ? wrapper(children) : children;
|
|
241
|
+
|
|
242
|
+
const prefix = "fas";
|
|
243
|
+
const iconName = "arrow-left";
|
|
244
|
+
const width = 448;
|
|
245
|
+
const height = 512;
|
|
246
|
+
const unicode = "f060";
|
|
247
|
+
const svgPathData = "M447.1 256C447.1 273.7 433.7 288 416 288H109.3l105.4 105.4c12.5 12.5 12.5 32.75 0 45.25C208.4 444.9 200.2 448 192 448s-16.38-3.125-22.62-9.375l-160-160c-12.5-12.5-12.5-32.75 0-45.25l160-160c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25L109.3 224H416C433.7 224 447.1 238.3 447.1 256z";
|
|
248
|
+
const faArrowLeft = {
|
|
249
|
+
prefix,
|
|
250
|
+
iconName,
|
|
251
|
+
icon: [width, height, [], unicode, svgPathData],
|
|
252
|
+
};
|
|
253
|
+
|
|
254
|
+
const FullPageWrapper = ({ title, description, actionButton, backButton, img, translations, children, }) => {
|
|
255
|
+
const navigate = useNavigate();
|
|
256
|
+
return (jsxs("div", { className: "full-page-container", children: [jsx("h1", { children: title }), jsx("h2", { children: description }), jsxs("div", { className: "content", children: [jsx(ConditionalWrapper, { condition: !!actionButton?.onFormSubmit, wrapper: (children) => (jsx("form", { onSubmit: (e) => {
|
|
257
|
+
e.preventDefault();
|
|
258
|
+
e.stopPropagation();
|
|
259
|
+
actionButton?.onFormSubmit();
|
|
260
|
+
}, children: children })), children: jsxs("div", { children: [jsx("div", { className: "children", children: children }), (!!actionButton || backButton) && (jsxs("div", { className: "flex", children: [backButton && (jsx(Button, { label: translations?.Back || "Back", icon: faArrowLeft, className: "mr-2", onClick: () => navigate(-1) })), !!actionButton && (jsx(Button, { label: actionButton.label, icon: actionButton.icon, onClick: actionButton.onClick, primary: !actionButton.regular }))] }))] }) }), img && (jsx("div", { className: "full-page-image", children: jsx("img", { src: img, alt: "ePismonosa" }) }))] })] }));
|
|
261
|
+
};
|
|
262
|
+
|
|
263
|
+
const FormWrapper = ({ isLoading, noAccess, submitButton, otherButtons, className, children, }) => (jsxs("form", { className: clsx(className, { "form-disabled": isLoading }), onSubmit: (e) => {
|
|
264
|
+
e.preventDefault();
|
|
265
|
+
!submitButton.disabled && submitButton.onSubmit(e);
|
|
266
|
+
}, children: [children, (!noAccess || otherButtons) && (jsxs("div", { className: "text-center mt-3 mb-2", children: [otherButtons?.map((e) => (jsx(Button, { label: e.label, icon: e.icon, disabled: isLoading || e.disabled, outlined: e.outlined, onClick: e.onClick, className: "mr-2" }, e.label))), !noAccess && (jsx(Button, { label: submitButton.label || "Submit", icon: submitButton.icon, disabled: isLoading || submitButton.disabled, outlined: !submitButton.primary, primary: submitButton.primary }))] }))] }));
|
|
267
|
+
|
|
268
|
+
export { Accordions, Alert, Button, Collapse, ConditionalWrapper, FormWrapper, FullPageWrapper, IconButton, NoAccessInfo, Tooltip, checkIfExpired, dateAddDays, deleteEmptyProps, deleteEmptyPropsIncludingArray, deleteProps, formatCurrency, formatCurrencyNoDecimals, formatDate, formatDateAndTime, formatTime, formatYearMonth, getActiveFilterNumber, getCurrentDateFormattedYMD, getDaysLeft, getVisibleColumnsIds, maxChar };
|
|
269
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/utils/DateUtils.ts","../src/utils/NumberUtils.ts","../src/utils/StringUtils.ts","../src/utils/ObjectUtils.ts","../src/Elements/Helper/Collapse.tsx","../src/icons/light/faArrowsToLine.ts","../src/icons/light/faArrowsUpDown.ts","../src/Elements/Accordions/Accordions.tsx","../src/icons/regular/faCircleCheck.ts","../src/icons/regular/faCircleExclamation.ts","../src/icons/regular/faCircleInfo.ts","../src/icons/regular/faTriangleExclamation.ts","../src/utils/icons.ts","../src/Elements/Alert/Alert.tsx","../src/Elements/Button/Button.tsx","../src/Elements/Button/IconButton.tsx","../src/Elements/Helper/NoAccessInfo.tsx","../src/Elements/Tooltip/Tooltip.tsx","../src/Elements/Wrappers/ConditionalWrapper.tsx","../src/icons/solid/faArrowLeft.ts","../src/Elements/Wrappers/FullPageWrapper.tsx","../src/Elements/Wrappers/FormWrapper.tsx"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],"names":["_jsx","prefix","iconName","width","height","unicode","svgPathData","_jsxs","_Fragment"],"mappings":";;;;;;;;;;;AAEa,MAAA,UAAU,GAAG,CAAC,IAAa,KACtC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAa,WAAA,CAAA,CAAC,GAAG,IAAI;AAGrC,MAAA,iBAAiB,GAAG,CAAC,IAAa,EAAE,WAAqB,KACpE,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAoB,iBAAA,EAAA,WAAW,GAAG,KAAK,GAAG,EAAE,CAAE,CAAA,CAAC,GAAG,IAAI;AAEtE,MAAA,UAAU,GAAG,CAAC,IAAa,EAAE,WAAqB,KAC7D,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAQ,KAAA,EA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ACH,CAAC,EACD,CAAC,QAAQ,KACRA,GAAC,CAAA,MAAM,EACL,EAAA,KAAK,EAAE,YAAY,CAAC,KAAK,IAAI,QAAQ,EACrC,IAAI,EAAE,YAAY,CAAC,IAAI,EACvB,QAAQ,EAAE,SAAS,IAAI,YAAY,CAAC,QAAQ,EAC5C,QAAQ,EAAE,CAAC,YAAY,CAAC,OAAO,EAC/B,OAAO,EAAE,YAAY,CAAC,OAAO,EAC7B,CAAA,CACH,CACG,EAAA,CAAA,CACP,CACI,EAAA,CAAA;;;;"}
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inceptionbg/iui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"description": "UI components, elements & utils for Inception ecosystem",
|
|
5
|
+
"type": "module",
|
|
5
6
|
"files": [
|
|
6
|
-
"
|
|
7
|
-
"./tsconfig.json"
|
|
7
|
+
"dist"
|
|
8
8
|
],
|
|
9
9
|
"main": "src/index.ts",
|
|
10
10
|
"scripts": {
|
|
@@ -16,8 +16,7 @@
|
|
|
16
16
|
"@fortawesome/react-fontawesome": "^0.2.0",
|
|
17
17
|
"clsx": "^1.2.1",
|
|
18
18
|
"moment": "^2.29.4",
|
|
19
|
-
"react-toastify": "^9.1.3"
|
|
20
|
-
"rollup-plugin-postcss": "^4.0.2"
|
|
19
|
+
"react-toastify": "^9.1.3"
|
|
21
20
|
},
|
|
22
21
|
"devDependencies": {
|
|
23
22
|
"@rollup/plugin-commonjs": "^25.0.2",
|
|
@@ -27,6 +26,7 @@
|
|
|
27
26
|
"rollup": "^3.26.0",
|
|
28
27
|
"rollup-plugin-delete": "^2.0.0",
|
|
29
28
|
"rollup-plugin-dts": "^5.3.0",
|
|
29
|
+
"rollup-plugin-postcss": "^4.0.2",
|
|
30
30
|
"rollup-plugin-peer-deps-external": "^2.2.4"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { FC, useState } from "react";
|
|
2
|
-
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
3
|
-
import clsx from "clsx";
|
|
4
|
-
import { ITab } from "../../types/ITab";
|
|
5
|
-
import { Collapse } from "../Helper/Collapse";
|
|
6
|
-
import { faArrowsToLine, faArrowsUpDown } from "../../icons/light";
|
|
7
|
-
|
|
8
|
-
interface Props {
|
|
9
|
-
tabs: ITab[];
|
|
10
|
-
initialValue?: string;
|
|
11
|
-
compact?: boolean;
|
|
12
|
-
className?: string;
|
|
13
|
-
}
|
|
14
|
-
export const Accordions: FC<Props> = ({
|
|
15
|
-
tabs: allTabs,
|
|
16
|
-
initialValue,
|
|
17
|
-
compact,
|
|
18
|
-
className,
|
|
19
|
-
}) => {
|
|
20
|
-
const tabs = allTabs.filter((tab) => !tab.hidden);
|
|
21
|
-
const [selected, setSelected] = useState(initialValue || "");
|
|
22
|
-
|
|
23
|
-
return !!tabs.length ? (
|
|
24
|
-
<div className={className}>
|
|
25
|
-
<div className="iui-accordions">
|
|
26
|
-
{tabs.map((tab) => (
|
|
27
|
-
<div
|
|
28
|
-
key={tab.value}
|
|
29
|
-
className={clsx("iui-accordion", {
|
|
30
|
-
selected: selected === tab.value,
|
|
31
|
-
compact,
|
|
32
|
-
})}
|
|
33
|
-
>
|
|
34
|
-
<div
|
|
35
|
-
className={clsx("summary clickable", {
|
|
36
|
-
disabled: tab.disabled,
|
|
37
|
-
})}
|
|
38
|
-
onClick={
|
|
39
|
-
tab.disabled
|
|
40
|
-
? undefined
|
|
41
|
-
: () => setSelected(selected === tab.value ? "" : tab.value)
|
|
42
|
-
}
|
|
43
|
-
>
|
|
44
|
-
<div className="flex center">
|
|
45
|
-
{tab.icon && (
|
|
46
|
-
<FontAwesomeIcon icon={tab.icon} className="iui-icon" />
|
|
47
|
-
)}
|
|
48
|
-
{tab.label}
|
|
49
|
-
</div>
|
|
50
|
-
<FontAwesomeIcon
|
|
51
|
-
icon={tab.value === selected ? faArrowsToLine : faArrowsUpDown}
|
|
52
|
-
className="collapse-icon"
|
|
53
|
-
/>
|
|
54
|
-
</div>
|
|
55
|
-
<Collapse isOpen={selected === tab.value}>
|
|
56
|
-
<div className="p-4">{tab.component}</div>
|
|
57
|
-
</Collapse>
|
|
58
|
-
</div>
|
|
59
|
-
))}
|
|
60
|
-
</div>
|
|
61
|
-
</div>
|
|
62
|
-
) : null;
|
|
63
|
-
};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
2
|
-
import clsx from "clsx";
|
|
3
|
-
import { FC, ReactNode } from "react";
|
|
4
|
-
import "./alert.scss";
|
|
5
|
-
import { infoIcons } from "../../utils/icons";
|
|
6
|
-
|
|
7
|
-
interface Props {
|
|
8
|
-
text?: string;
|
|
9
|
-
severity: "success" | "info" | "warning" | "error";
|
|
10
|
-
fitContent?: boolean;
|
|
11
|
-
className?: string;
|
|
12
|
-
children?: ReactNode;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export const Alert: FC<Props> = ({
|
|
16
|
-
text,
|
|
17
|
-
severity,
|
|
18
|
-
fitContent,
|
|
19
|
-
className,
|
|
20
|
-
children,
|
|
21
|
-
}) => (
|
|
22
|
-
<div
|
|
23
|
-
className={clsx("iui-alert", severity, className, {
|
|
24
|
-
"width-fit": fitContent,
|
|
25
|
-
})}
|
|
26
|
-
>
|
|
27
|
-
<FontAwesomeIcon icon={infoIcons[severity]} />
|
|
28
|
-
{text}
|
|
29
|
-
{children}
|
|
30
|
-
</div>
|
|
31
|
-
);
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
.iui-alert {
|
|
2
|
-
border-radius: 25px;
|
|
3
|
-
display: flex;
|
|
4
|
-
align-items: center;
|
|
5
|
-
padding: 16px;
|
|
6
|
-
font-size: 13px;
|
|
7
|
-
svg {
|
|
8
|
-
font-size: 18px;
|
|
9
|
-
opacity: 0.9;
|
|
10
|
-
margin-right: 12px;
|
|
11
|
-
}
|
|
12
|
-
&.success {
|
|
13
|
-
background: var(--success01);
|
|
14
|
-
svg {
|
|
15
|
-
color: var(--success);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
&.info {
|
|
19
|
-
background: var(--info01);
|
|
20
|
-
svg {
|
|
21
|
-
color: var(--info);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
&.warning {
|
|
25
|
-
background: var(--warning01);
|
|
26
|
-
svg {
|
|
27
|
-
color: var(--warning);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
&.error {
|
|
31
|
-
background: var(--error01);
|
|
32
|
-
svg {
|
|
33
|
-
color: var(--error);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { ButtonHTMLAttributes, forwardRef, MouseEventHandler } from "react";
|
|
2
|
-
import clsx from "clsx";
|
|
3
|
-
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
4
|
-
import { IconDefinition } from "@fortawesome/fontawesome-svg-core";
|
|
5
|
-
import "./button.scss";
|
|
6
|
-
|
|
7
|
-
interface Props {
|
|
8
|
-
label: string;
|
|
9
|
-
icon?: IconDefinition;
|
|
10
|
-
iconEnd?: IconDefinition;
|
|
11
|
-
onClick?: MouseEventHandler<HTMLButtonElement>;
|
|
12
|
-
disabled?: boolean;
|
|
13
|
-
primary?: boolean;
|
|
14
|
-
outlined?: boolean;
|
|
15
|
-
active?: boolean;
|
|
16
|
-
className?: string;
|
|
17
|
-
size?: "xs" | "s" | "m" | "l";
|
|
18
|
-
buttonProps?: ButtonHTMLAttributes<HTMLButtonElement>;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export const Button = forwardRef<HTMLButtonElement, Props>(
|
|
22
|
-
(
|
|
23
|
-
{
|
|
24
|
-
label,
|
|
25
|
-
icon,
|
|
26
|
-
iconEnd,
|
|
27
|
-
onClick,
|
|
28
|
-
disabled,
|
|
29
|
-
primary,
|
|
30
|
-
outlined,
|
|
31
|
-
active,
|
|
32
|
-
className,
|
|
33
|
-
size = "m",
|
|
34
|
-
buttonProps,
|
|
35
|
-
},
|
|
36
|
-
ref
|
|
37
|
-
) => (
|
|
38
|
-
<button
|
|
39
|
-
ref={ref}
|
|
40
|
-
disabled={disabled}
|
|
41
|
-
className={clsx("iui-btn", className, size, {
|
|
42
|
-
primary,
|
|
43
|
-
outlined,
|
|
44
|
-
active,
|
|
45
|
-
})}
|
|
46
|
-
onClick={onClick}
|
|
47
|
-
type={buttonProps?.type || onClick ? "button" : "submit"}
|
|
48
|
-
{...buttonProps}
|
|
49
|
-
>
|
|
50
|
-
{icon && <FontAwesomeIcon icon={icon} />}
|
|
51
|
-
<div className="iui-btn-label">{label}</div>
|
|
52
|
-
{iconEnd && <FontAwesomeIcon icon={iconEnd} />}
|
|
53
|
-
</button>
|
|
54
|
-
)
|
|
55
|
-
);
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { ButtonHTMLAttributes, forwardRef, MouseEventHandler } from "react";
|
|
2
|
-
import clsx from "clsx";
|
|
3
|
-
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
4
|
-
import { IconDefinition } from "@fortawesome/fontawesome-svg-core";
|
|
5
|
-
|
|
6
|
-
interface Props {
|
|
7
|
-
icon: IconDefinition;
|
|
8
|
-
onClick?: MouseEventHandler<HTMLButtonElement>;
|
|
9
|
-
disabled?: boolean;
|
|
10
|
-
className?: string;
|
|
11
|
-
active?: boolean;
|
|
12
|
-
buttonProps?: ButtonHTMLAttributes<HTMLButtonElement>;
|
|
13
|
-
// outlined?: boolean;
|
|
14
|
-
// size?: "s" | "m" | "l";
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export const IconButton = forwardRef<HTMLButtonElement, Props>(
|
|
18
|
-
(
|
|
19
|
-
{
|
|
20
|
-
icon,
|
|
21
|
-
onClick,
|
|
22
|
-
disabled,
|
|
23
|
-
className,
|
|
24
|
-
active,
|
|
25
|
-
buttonProps,
|
|
26
|
-
// outlined,
|
|
27
|
-
// size = "m",
|
|
28
|
-
},
|
|
29
|
-
ref
|
|
30
|
-
) => (
|
|
31
|
-
<button
|
|
32
|
-
ref={ref}
|
|
33
|
-
disabled={disabled}
|
|
34
|
-
className={clsx("iui-btn iui-icon-btn", className, { active })}
|
|
35
|
-
onClick={onClick}
|
|
36
|
-
type={buttonProps?.type || onClick ? "button" : "submit"}
|
|
37
|
-
{...buttonProps}
|
|
38
|
-
>
|
|
39
|
-
<FontAwesomeIcon icon={icon} />
|
|
40
|
-
</button>
|
|
41
|
-
)
|
|
42
|
-
);
|