funuicss 2.0.25 → 2.5.0
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/css/fun.css +1002 -3749
- package/js/Fun.js +2 -2
- package/js/Fun.tsx +9 -8
- package/package.json +2 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/ui/alert/Alert.d.ts +1 -1
- package/ui/aos/AOS.d.ts +1 -1
- package/ui/appbar/AppBar.d.ts +1 -1
- package/ui/avatar/Avatar.d.ts +2 -1
- package/ui/breadcrumb/BreadCrumb.d.ts +2 -1
- package/ui/button/Button.d.ts +1 -1
- package/ui/card/Card.d.ts +1 -1
- package/ui/card/CardBody.d.ts +2 -2
- package/ui/card/CardFab.d.ts +2 -2
- package/ui/card/CardFooter.d.ts +2 -2
- package/ui/card/CardHeader.d.ts +2 -2
- package/ui/div/Div.d.ts +1 -1
- package/ui/drop/Action.d.ts +1 -1
- package/ui/drop/Down.d.ts +1 -1
- package/ui/drop/Item.d.ts +1 -1
- package/ui/drop/Menu.d.ts +1 -1
- package/ui/drop/Up.d.ts +1 -1
- package/ui/grid/Col.d.ts +2 -1
- package/ui/grid/Grid.d.ts +2 -1
- package/ui/input/Iconic.d.ts +2 -2
- package/ui/input/Input.d.ts +2 -0
- package/ui/input/Input.js +50 -9
- package/ui/input/Input.tsx +34 -7
- package/ui/list/Item.d.ts +1 -1
- package/ui/list/List.d.ts +1 -1
- package/ui/loader/Loader.d.ts +2 -1
- package/ui/modal/Action.d.ts +1 -1
- package/ui/modal/Close.d.ts +2 -1
- package/ui/modal/Content.d.ts +1 -1
- package/ui/modal/Header.d.ts +2 -2
- package/ui/modal/Header.tsx +1 -1
- package/ui/modal/Modal.d.ts +1 -1
- package/ui/notification/Content.d.ts +1 -1
- package/ui/notification/Footer.d.ts +1 -1
- package/ui/notification/Header.d.ts +1 -1
- package/ui/notification/Notification.d.ts +1 -1
- package/ui/page/NotFound.d.ts +1 -1
- package/ui/page/UnAuthorized.d.ts +1 -1
- package/ui/progress/Bar.d.ts +1 -1
- package/ui/sidebar/SideBar.d.ts +2 -1
- package/ui/sidebar/SideContent.d.ts +1 -1
- package/ui/specials/Circle.d.ts +3 -2
- package/ui/specials/Circle.js +2 -2
- package/ui/specials/Circle.tsx +4 -2
- package/ui/specials/FullCenteredPage.d.ts +1 -1
- package/ui/specials/Hr.d.ts +1 -1
- package/ui/specials/RowFlex.d.ts +1 -1
- package/ui/specials/Section.d.ts +1 -1
- package/ui/table/Body.d.ts +1 -1
- package/ui/table/Data.d.ts +1 -1
- package/ui/table/Head.d.ts +1 -1
- package/ui/table/Row.d.ts +1 -1
- package/ui/table/Table.d.ts +1 -1
- package/ui/table/Table.js +11 -7
- package/ui/table/Table.tsx +20 -8
- package/ui/text/Text.d.ts +5 -5
- package/ui/text/Text.js +20 -11
- package/ui/text/Text.tsx +62 -33
- package/ui/tooltip/Tip.d.ts +2 -1
- package/ui/tooltip/Tip.js +9 -5
- package/ui/tooltip/Tip.tsx +12 -2
- package/ui/tooltip/ToolTip.d.ts +1 -1
- package/ui/tooltip/ToolTip.js +1 -1
- package/ui/tooltip/ToolTip.tsx +7 -1
- package/ui/video/FunPlayer.d.ts +0 -7
- package/ui/video/FunPlayer.js +202 -179
- package/ui/video/FunPlayer.tsx +218 -218
package/ui/input/Input.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
"use strict";
|
|
2
3
|
var __assign = (this && this.__assign) || function () {
|
|
3
4
|
__assign = Object.assign || function(t) {
|
|
@@ -10,6 +11,29 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
11
|
};
|
|
11
12
|
return __assign.apply(this, arguments);
|
|
12
13
|
};
|
|
14
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
15
|
+
if (k2 === undefined) k2 = k;
|
|
16
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
17
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
18
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
19
|
+
}
|
|
20
|
+
Object.defineProperty(o, k2, desc);
|
|
21
|
+
}) : (function(o, m, k, k2) {
|
|
22
|
+
if (k2 === undefined) k2 = k;
|
|
23
|
+
o[k2] = m[k];
|
|
24
|
+
}));
|
|
25
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
26
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
27
|
+
}) : function(o, v) {
|
|
28
|
+
o["default"] = v;
|
|
29
|
+
});
|
|
30
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
13
37
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
38
|
var t = {};
|
|
15
39
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -25,11 +49,21 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
25
49
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
50
|
};
|
|
27
51
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
-
var react_1 =
|
|
52
|
+
var react_1 = __importStar(require("react"));
|
|
29
53
|
var pi_1 = require("react-icons/pi");
|
|
30
54
|
var Button_1 = __importDefault(require("../button/Button"));
|
|
31
55
|
var Input = function (_a) {
|
|
32
|
-
var select = _a.select, bordered = _a.bordered, borderless = _a.borderless, multiline = _a.multiline, file = _a.file, noBorder = _a.noBorder, icon = _a.icon, button = _a.button, id = _a.id, status = _a.status, funcss = _a.funcss, flat = _a.flat, leftRounded = _a.leftRounded, rightRounded = _a.rightRounded, rounded = _a.rounded, fullWidth = _a.fullWidth, type = _a.type, label = _a.label, name = _a.name, value = _a.value, defaultValue = _a.defaultValue, onChange = _a.onChange, options = _a.options, rows = _a.rows, bg = _a.bg, rest = __rest(_a, ["select", "bordered", "borderless", "multiline", "file", "noBorder", "icon", "button", "id", "status", "funcss", "flat", "leftRounded", "rightRounded", "rounded", "fullWidth", "type", "label", "name", "value", "defaultValue", "onChange", "options", "rows", "bg"]);
|
|
56
|
+
var select = _a.select, bordered = _a.bordered, borderless = _a.borderless, multiline = _a.multiline, file = _a.file, extra = _a.extra, noBorder = _a.noBorder, icon = _a.icon, btn = _a.btn, button = _a.button, id = _a.id, status = _a.status, funcss = _a.funcss, flat = _a.flat, leftRounded = _a.leftRounded, rightRounded = _a.rightRounded, rounded = _a.rounded, fullWidth = _a.fullWidth, type = _a.type, label = _a.label, name = _a.name, value = _a.value, defaultValue = _a.defaultValue, onChange = _a.onChange, options = _a.options, rows = _a.rows, bg = _a.bg, rest = __rest(_a, ["select", "bordered", "borderless", "multiline", "file", "extra", "noBorder", "icon", "btn", "button", "id", "status", "funcss", "flat", "leftRounded", "rightRounded", "rounded", "fullWidth", "type", "label", "name", "value", "defaultValue", "onChange", "options", "rows", "bg"]);
|
|
57
|
+
var _b = (0, react_1.useState)(''), fileName = _b[0], setFileName = _b[1];
|
|
58
|
+
var handleChange = function (e) {
|
|
59
|
+
var _a;
|
|
60
|
+
var file = (_a = e.target.files) === null || _a === void 0 ? void 0 : _a[0];
|
|
61
|
+
if (file) {
|
|
62
|
+
setFileName(file.name);
|
|
63
|
+
}
|
|
64
|
+
if (onChange)
|
|
65
|
+
onChange(e);
|
|
66
|
+
};
|
|
33
67
|
if (select) {
|
|
34
68
|
if (bordered) {
|
|
35
69
|
return (react_1.default.createElement("select", __assign({}, rest, { id: id, className: "\n ".concat(status === 'success' ? 'success-input' : '', "\n ").concat(status === 'warning' ? 'warning-input' : '', "\n ").concat(status === 'danger' ? 'danger-input' : '', "\n input \n ").concat(rounded ? "rounded" : '', "\n ").concat(bg ? bg : '', "\n ").concat(funcss, " ").concat(flat ? 'flat' : '', "\n ").concat(leftRounded ? 'leftRounded' : rightRounded ? 'rightRounded' : '', "\n borderedInput\n "), onChange: onChange, defaultValue: defaultValue, name: name, style: {
|
|
@@ -39,14 +73,14 @@ var Input = function (_a) {
|
|
|
39
73
|
: ''));
|
|
40
74
|
}
|
|
41
75
|
else if (borderless) {
|
|
42
|
-
return (react_1.default.createElement("select", __assign({}, rest, { id: id, className: "\n ".concat(status === 'success' ? 'success-input' : '', "\n ").concat(status === 'warning' ? 'warning-input' : '', "\n ").concat(status === 'danger' ? 'danger-input' : '', "\n input \n ").concat(rounded ? "rounded" : '', "\n ").concat(bg ? bg : '', "\n ").concat(funcss, " ").concat(flat ? 'flat' : '', "\n ").concat(leftRounded ? 'leftRounded' : rightRounded ? 'rightRounded' : '', "\n borderless\n "), onChange: onChange, defaultValue: defaultValue,
|
|
76
|
+
return (react_1.default.createElement("select", __assign({}, rest, { id: id, className: "\n ".concat(status === 'success' ? 'success-input' : '', "\n ").concat(status === 'warning' ? 'warning-input' : '', "\n ").concat(status === 'danger' ? 'danger-input' : '', "\n input \n ").concat(rounded ? "rounded" : '', "\n ").concat(bg ? bg : '', "\n ").concat(funcss, " ").concat(flat ? 'flat' : '', "\n ").concat(leftRounded ? 'leftRounded' : rightRounded ? 'rightRounded' : '', "\n borderless\n "), onChange: onChange, defaultValue: defaultValue, name: name, value: value, style: {
|
|
43
77
|
width: "".concat(fullWidth ? '100%' : '')
|
|
44
78
|
} }), options
|
|
45
79
|
? options.map(function (doc) { return (react_1.default.createElement("option", { value: doc.value, key: doc.value }, doc.text)); })
|
|
46
80
|
: ''));
|
|
47
81
|
}
|
|
48
82
|
else {
|
|
49
|
-
return (react_1.default.createElement("select", __assign({}, rest, { id: id, className: "\n ".concat(status === 'success' ? 'success-input' : '', "\n ").concat(status === 'warning' ? 'warning-input' : '', "\n ").concat(status === 'danger' ? 'danger-input' : '', "\n input \n ").concat(rounded ? "rounded" : '', "\n ").concat(bg ? bg : '', "\n ").concat(funcss, " ").concat(flat ? 'flat' : '', "\n ").concat(leftRounded ? 'leftRounded' : rightRounded ? 'rightRounded' : '', "\n "), onChange: onChange, defaultValue: defaultValue,
|
|
83
|
+
return (react_1.default.createElement("select", __assign({}, rest, { id: id, className: "\n ".concat(status === 'success' ? 'success-input' : '', "\n ").concat(status === 'warning' ? 'warning-input' : '', "\n ").concat(status === 'danger' ? 'danger-input' : '', "\n input \n ").concat(rounded ? "rounded" : '', "\n ").concat(bg ? bg : '', "\n ").concat(funcss, " ").concat(flat ? 'flat' : '', "\n ").concat(leftRounded ? 'leftRounded' : rightRounded ? 'rightRounded' : '', "\n "), onChange: onChange, defaultValue: defaultValue, name: name, value: value, style: {
|
|
50
84
|
width: "".concat(fullWidth ? '100%' : '')
|
|
51
85
|
} }), options
|
|
52
86
|
? options.map(function (doc) { return (react_1.default.createElement("option", { value: doc.value, key: doc.value }, doc.text)); })
|
|
@@ -71,11 +105,18 @@ var Input = function (_a) {
|
|
|
71
105
|
}
|
|
72
106
|
}
|
|
73
107
|
else if (file) {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
108
|
+
if (btn)
|
|
109
|
+
return (react_1.default.createElement("div", { className: "fileInput" },
|
|
110
|
+
button ? (button) : (react_1.default.createElement(Button_1.default, { funcss: " ".concat(funcss, " "), startIcon: icon ? icon : react_1.default.createElement(pi_1.PiCloudArrowUp, null), bg: "primary", fullWidth: true, raised: true }, fileName || label || 'Upload File')),
|
|
111
|
+
react_1.default.createElement("input", __assign({ name: name, id: id, className: "\n ".concat(status === 'success' ? 'success-input' : '', "\n ").concat(status === 'warning' ? 'warning-input' : '', "\n ").concat(status === 'danger' ? 'danger-input' : '', "\n input \n ").concat(rounded ? "rounded" : '', "\n ").concat(bg ? bg : '', "\n ").concat(funcss, " ").concat(flat ? 'flat' : '', "\n ").concat(leftRounded ? 'leftRounded' : rightRounded ? 'rightRounded' : '', "\n borderedInput\n filedInput\n "), onChange: handleChange, type: 'file', style: {
|
|
112
|
+
width: "".concat(fullWidth ? '100%' : '')
|
|
113
|
+
}, value: value }, rest))));
|
|
114
|
+
return (react_1.default.createElement("div", { className: "_upload_container" },
|
|
115
|
+
react_1.default.createElement("label", { htmlFor: id || "fileInput", className: "_upload_label" },
|
|
116
|
+
react_1.default.createElement("div", { className: "_upload_icon" }, icon || react_1.default.createElement(react_1.default.Fragment, null, "\u21EA")),
|
|
117
|
+
react_1.default.createElement("div", { className: "_upload_text" }, fileName || label || "Upload File"),
|
|
118
|
+
react_1.default.createElement("div", { className: "text-small opacity-3" }, extra || '')),
|
|
119
|
+
react_1.default.createElement("input", __assign({ onChange: handleChange, type: "file", id: id || "fileInput", className: "_upload_input" }, rest))));
|
|
79
120
|
}
|
|
80
121
|
else {
|
|
81
122
|
if (bordered) {
|
package/ui/input/Input.tsx
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
'use client'
|
|
2
|
+
import React, { useState } from 'react';
|
|
2
3
|
import { PiCheck, PiCloudArrowUp } from 'react-icons/pi';
|
|
3
4
|
import Button from '../button/Button';
|
|
4
5
|
|
|
@@ -10,6 +11,7 @@ interface InputProps {
|
|
|
10
11
|
file?: boolean;
|
|
11
12
|
noBorder?: boolean;
|
|
12
13
|
icon?: React.ReactNode;
|
|
14
|
+
extra?: React.ReactNode;
|
|
13
15
|
button?: React.ReactNode;
|
|
14
16
|
id?: string;
|
|
15
17
|
status?: 'success' | 'warning' | 'danger' | '';
|
|
@@ -19,6 +21,7 @@ interface InputProps {
|
|
|
19
21
|
rightRounded?: boolean;
|
|
20
22
|
rounded?: boolean;
|
|
21
23
|
fullWidth?: boolean;
|
|
24
|
+
btn?: boolean;
|
|
22
25
|
type?: string;
|
|
23
26
|
label?: string;
|
|
24
27
|
name?: string;
|
|
@@ -32,14 +35,17 @@ interface InputProps {
|
|
|
32
35
|
bg?: string;
|
|
33
36
|
}
|
|
34
37
|
|
|
38
|
+
|
|
35
39
|
const Input: React.FC<InputProps> = ({
|
|
36
40
|
select,
|
|
37
41
|
bordered,
|
|
38
42
|
borderless,
|
|
39
43
|
multiline,
|
|
40
44
|
file,
|
|
45
|
+
extra,
|
|
41
46
|
noBorder,
|
|
42
47
|
icon,
|
|
48
|
+
btn,
|
|
43
49
|
button,
|
|
44
50
|
id,
|
|
45
51
|
status,
|
|
@@ -60,6 +66,17 @@ const Input: React.FC<InputProps> = ({
|
|
|
60
66
|
bg,
|
|
61
67
|
...rest
|
|
62
68
|
}) => {
|
|
69
|
+
const [fileName, setFileName] = useState('');
|
|
70
|
+
|
|
71
|
+
const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
|
72
|
+
const file = e.target.files?.[0];
|
|
73
|
+
if (file) {
|
|
74
|
+
setFileName(file.name);
|
|
75
|
+
}
|
|
76
|
+
if (onChange) onChange(e);
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
|
|
63
80
|
if (select) {
|
|
64
81
|
if (bordered) {
|
|
65
82
|
return (
|
|
@@ -112,7 +129,6 @@ const Input: React.FC<InputProps> = ({
|
|
|
112
129
|
`}
|
|
113
130
|
onChange={onChange}
|
|
114
131
|
defaultValue={defaultValue}
|
|
115
|
-
placeholder={label}
|
|
116
132
|
name={name}
|
|
117
133
|
value={value}
|
|
118
134
|
style={{
|
|
@@ -145,7 +161,6 @@ const Input: React.FC<InputProps> = ({
|
|
|
145
161
|
`}
|
|
146
162
|
onChange={onChange}
|
|
147
163
|
defaultValue={defaultValue}
|
|
148
|
-
placeholder={label}
|
|
149
164
|
name={name}
|
|
150
165
|
value={value}
|
|
151
166
|
style={{
|
|
@@ -245,7 +260,8 @@ const Input: React.FC<InputProps> = ({
|
|
|
245
260
|
);
|
|
246
261
|
}
|
|
247
262
|
} else if (file) {
|
|
248
|
-
|
|
263
|
+
if(btn)
|
|
264
|
+
return (
|
|
249
265
|
<div className="fileInput">
|
|
250
266
|
{button ? (
|
|
251
267
|
button
|
|
@@ -257,7 +273,7 @@ const Input: React.FC<InputProps> = ({
|
|
|
257
273
|
fullWidth
|
|
258
274
|
raised
|
|
259
275
|
>
|
|
260
|
-
{
|
|
276
|
+
{fileName || label || 'Upload File'}
|
|
261
277
|
</Button>
|
|
262
278
|
)}
|
|
263
279
|
<input
|
|
@@ -275,16 +291,27 @@ const Input: React.FC<InputProps> = ({
|
|
|
275
291
|
borderedInput
|
|
276
292
|
filedInput
|
|
277
293
|
`}
|
|
278
|
-
onChange={
|
|
294
|
+
onChange={handleChange}
|
|
279
295
|
type={'file'}
|
|
280
296
|
style={{
|
|
281
297
|
width: `${fullWidth ? '100%' : ''}`
|
|
282
298
|
}}
|
|
299
|
+
|
|
283
300
|
value={value}
|
|
284
301
|
{...rest}
|
|
285
302
|
/>
|
|
286
303
|
</div>
|
|
287
|
-
)
|
|
304
|
+
)
|
|
305
|
+
return (
|
|
306
|
+
<div className="_upload_container">
|
|
307
|
+
<label htmlFor={id || "fileInput"} className="_upload_label">
|
|
308
|
+
<div className="_upload_icon">{ icon || <>⇪</>}</div>
|
|
309
|
+
<div className="_upload_text">{fileName || label || `Upload File`}</div>
|
|
310
|
+
<div className="text-small opacity-3">{extra || ''}</div>
|
|
311
|
+
</label>
|
|
312
|
+
<input onChange={handleChange} type="file" id={id || "fileInput"} className="_upload_input" {...rest} />
|
|
313
|
+
</div>
|
|
314
|
+
)
|
|
288
315
|
} else {
|
|
289
316
|
if (bordered) {
|
|
290
317
|
return (
|
package/ui/list/Item.d.ts
CHANGED
|
@@ -3,5 +3,5 @@ interface ListItemProps {
|
|
|
3
3
|
children?: React.ReactNode;
|
|
4
4
|
funcss?: string;
|
|
5
5
|
}
|
|
6
|
-
export default function ListItem({ children, funcss, ...rest }: ListItemProps):
|
|
6
|
+
export default function ListItem({ children, funcss, ...rest }: ListItemProps): React.JSX.Element;
|
|
7
7
|
export {};
|
package/ui/list/List.d.ts
CHANGED
|
@@ -10,5 +10,5 @@ interface ListProps {
|
|
|
10
10
|
roundItems?: boolean;
|
|
11
11
|
gap?: number;
|
|
12
12
|
}
|
|
13
|
-
export default function List({ children, funcss, dark, light, stripped, bordered, hoverable, roundItems, gap, ...rest }: ListProps):
|
|
13
|
+
export default function List({ children, funcss, dark, light, stripped, bordered, hoverable, roundItems, gap, ...rest }: ListProps): React.JSX.Element;
|
|
14
14
|
export {};
|
package/ui/loader/Loader.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
interface FunLoaderProps {
|
|
2
3
|
funcss?: string;
|
|
3
4
|
size?: number;
|
|
@@ -6,5 +7,5 @@ interface FunLoaderProps {
|
|
|
6
7
|
color?: string;
|
|
7
8
|
variant?: 'simple' | 'duotone' | "circle";
|
|
8
9
|
}
|
|
9
|
-
export default function FunLoader({ funcss, size, fixed, backdrop, color, variant, ...rest }: FunLoaderProps):
|
|
10
|
+
export default function FunLoader({ funcss, size, fixed, backdrop, color, variant, ...rest }: FunLoaderProps): React.JSX.Element;
|
|
10
11
|
export {};
|
package/ui/modal/Action.d.ts
CHANGED
|
@@ -3,5 +3,5 @@ interface ModalActionProps extends React.HTMLProps<HTMLDivElement> {
|
|
|
3
3
|
funcss?: string;
|
|
4
4
|
children?: React.ReactNode;
|
|
5
5
|
}
|
|
6
|
-
export default function ModalAction({ funcss, children, ...rest }: ModalActionProps):
|
|
6
|
+
export default function ModalAction({ funcss, children, ...rest }: ModalActionProps): React.JSX.Element;
|
|
7
7
|
export {};
|
package/ui/modal/Close.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { HTMLProps } from 'react';
|
|
2
|
+
import * as React from 'react';
|
|
2
3
|
interface CloseModalProps extends HTMLProps<HTMLDivElement> {
|
|
3
4
|
funcss?: string;
|
|
4
5
|
}
|
|
5
|
-
export default function CloseModal({ funcss, ...rest }: CloseModalProps):
|
|
6
|
+
export default function CloseModal({ funcss, ...rest }: CloseModalProps): React.JSX.Element;
|
|
6
7
|
export {};
|
package/ui/modal/Content.d.ts
CHANGED
|
@@ -3,5 +3,5 @@ interface ModalContentProps {
|
|
|
3
3
|
funcss?: string;
|
|
4
4
|
children?: React.ReactNode;
|
|
5
5
|
}
|
|
6
|
-
export default function ModalContent({ funcss, children, }: ModalContentProps):
|
|
6
|
+
export default function ModalContent({ funcss, children, }: ModalContentProps): React.JSX.Element;
|
|
7
7
|
export {};
|
package/ui/modal/Header.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ interface ModalHeaderProps {
|
|
|
3
3
|
funcss?: string;
|
|
4
4
|
children?: React.ReactNode;
|
|
5
5
|
close?: React.ReactNode | '';
|
|
6
|
-
title?:
|
|
6
|
+
title?: React.ReactNode;
|
|
7
7
|
}
|
|
8
|
-
export default function ModalHeader({ funcss, children, close, title, ...rest }: ModalHeaderProps):
|
|
8
|
+
export default function ModalHeader({ funcss, children, close, title, ...rest }: ModalHeaderProps): React.JSX.Element;
|
|
9
9
|
export {};
|
package/ui/modal/Header.tsx
CHANGED
package/ui/modal/Modal.d.ts
CHANGED
|
@@ -22,5 +22,5 @@ interface ModalProps {
|
|
|
22
22
|
position?: string;
|
|
23
23
|
flat?: boolean;
|
|
24
24
|
}
|
|
25
|
-
export default function Modal({ children, funcss, animation, duration, open, maxWidth, maxHeight, height, width, backdrop, title, titlecss, body, bodycss, footer, footercss, close, closecss, position, id, flat, ...rest }: ModalProps):
|
|
25
|
+
export default function Modal({ children, funcss, animation, duration, open, maxWidth, maxHeight, height, width, backdrop, title, titlecss, body, bodycss, footer, footercss, close, closecss, position, id, flat, ...rest }: ModalProps): React.JSX.Element;
|
|
26
26
|
export {};
|
|
@@ -3,5 +3,5 @@ type NotificationContentProps = {
|
|
|
3
3
|
funcss?: string;
|
|
4
4
|
children?: React.ReactNode;
|
|
5
5
|
};
|
|
6
|
-
export default function NotificationContent({ funcss, children }: NotificationContentProps):
|
|
6
|
+
export default function NotificationContent({ funcss, children }: NotificationContentProps): React.JSX.Element;
|
|
7
7
|
export {};
|
|
@@ -3,5 +3,5 @@ type NotificationFooterProps = {
|
|
|
3
3
|
funcss?: string;
|
|
4
4
|
children?: React.ReactNode;
|
|
5
5
|
};
|
|
6
|
-
export default function NotificationFooter({ funcss, children }: NotificationFooterProps):
|
|
6
|
+
export default function NotificationFooter({ funcss, children }: NotificationFooterProps): React.JSX.Element;
|
|
7
7
|
export {};
|
|
@@ -3,5 +3,5 @@ type NotificationHeaderProps = {
|
|
|
3
3
|
funcss?: string;
|
|
4
4
|
children?: React.ReactNode;
|
|
5
5
|
};
|
|
6
|
-
export default function NotificationHeader({ funcss, children }: NotificationHeaderProps):
|
|
6
|
+
export default function NotificationHeader({ funcss, children }: NotificationHeaderProps): React.JSX.Element;
|
|
7
7
|
export {};
|
|
@@ -11,5 +11,5 @@ type NotificationProps = {
|
|
|
11
11
|
content?: React.ReactNode;
|
|
12
12
|
footer?: React.ReactNode;
|
|
13
13
|
};
|
|
14
|
-
export default function Notification({ position, funcss, animation, duration, children, state, width, header, content, footer }: NotificationProps):
|
|
14
|
+
export default function Notification({ position, funcss, animation, duration, children, state, width, header, content, footer }: NotificationProps): React.JSX.Element;
|
|
15
15
|
export {};
|
package/ui/page/NotFound.d.ts
CHANGED
|
@@ -5,5 +5,5 @@ interface NotFoundProps {
|
|
|
5
5
|
content?: React.ReactNode;
|
|
6
6
|
action?: React.ReactNode;
|
|
7
7
|
}
|
|
8
|
-
export default function NotFound({ header, code, content, action }: NotFoundProps):
|
|
8
|
+
export default function NotFound({ header, code, content, action }: NotFoundProps): React.JSX.Element;
|
|
9
9
|
export {};
|
|
@@ -5,5 +5,5 @@ interface UnAuthorizedProps {
|
|
|
5
5
|
content?: React.ReactNode;
|
|
6
6
|
action?: React.ReactNode;
|
|
7
7
|
}
|
|
8
|
-
export default function UnAuthorized({ header, code, content, action }: UnAuthorizedProps):
|
|
8
|
+
export default function UnAuthorized({ header, code, content, action }: UnAuthorizedProps): React.JSX.Element;
|
|
9
9
|
export {};
|
package/ui/progress/Bar.d.ts
CHANGED
|
@@ -10,5 +10,5 @@ interface ProgressBarProps {
|
|
|
10
10
|
raised?: boolean;
|
|
11
11
|
rounded?: boolean;
|
|
12
12
|
}
|
|
13
|
-
export default function ProgressBar({ funcss, progress, height, children, content, raised, rounded, bg, lined, }: ProgressBarProps):
|
|
13
|
+
export default function ProgressBar({ funcss, progress, height, children, content, raised, rounded, bg, lined, }: ProgressBarProps): React.JSX.Element;
|
|
14
14
|
export {};
|
package/ui/sidebar/SideBar.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
import * as React from 'react';
|
|
2
3
|
interface FunLoaderProps {
|
|
3
4
|
funcss?: string;
|
|
4
5
|
position?: "left" | "right";
|
|
@@ -10,5 +11,5 @@ interface FunLoaderProps {
|
|
|
10
11
|
footer?: ReactNode;
|
|
11
12
|
fixed?: boolean;
|
|
12
13
|
}
|
|
13
|
-
export default function SideBar({ funcss, position, glassy, header, open, content, close, footer, fixed, ...rest }: FunLoaderProps):
|
|
14
|
+
export default function SideBar({ funcss, position, glassy, header, open, content, close, footer, fixed, ...rest }: FunLoaderProps): React.JSX.Element;
|
|
14
15
|
export {};
|
package/ui/specials/Circle.d.ts
CHANGED
|
@@ -4,11 +4,12 @@ interface Circle_Props extends HTMLProps<HTMLDivElement> {
|
|
|
4
4
|
size?: number;
|
|
5
5
|
funcss?: string;
|
|
6
6
|
bg?: string;
|
|
7
|
+
color?: string;
|
|
7
8
|
children?: ReactNode;
|
|
8
9
|
hoverable?: boolean;
|
|
9
10
|
raised?: boolean;
|
|
10
|
-
key?: React.
|
|
11
|
+
key?: React.Key;
|
|
11
12
|
onClick?: () => void;
|
|
12
13
|
}
|
|
13
|
-
export default function Circle({ size, funcss, bg, children, hoverable, raised, key, onClick, ...rest }: Circle_Props):
|
|
14
|
+
export default function Circle({ size, funcss, bg, color, children, hoverable, raised, key, onClick, ...rest }: Circle_Props): React.JSX.Element;
|
|
14
15
|
export {};
|
package/ui/specials/Circle.js
CHANGED
|
@@ -48,8 +48,8 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
48
48
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
49
49
|
var React = __importStar(require("react"));
|
|
50
50
|
function Circle(_a) {
|
|
51
|
-
var size = _a.size, funcss = _a.funcss, bg = _a.bg, children = _a.children, hoverable = _a.hoverable, raised = _a.raised, key = _a.key, onClick = _a.onClick, rest = __rest(_a, ["size", "funcss", "bg", "children", "hoverable", "raised", "key", "onClick"]);
|
|
52
|
-
return (React.createElement("div", __assign({ className: "pointer avatar ".concat(funcss || '', "
|
|
51
|
+
var size = _a.size, funcss = _a.funcss, bg = _a.bg, color = _a.color, children = _a.children, hoverable = _a.hoverable, raised = _a.raised, key = _a.key, onClick = _a.onClick, rest = __rest(_a, ["size", "funcss", "bg", "color", "children", "hoverable", "raised", "key", "onClick"]);
|
|
52
|
+
return (React.createElement("div", __assign({ className: "pointer avatar ".concat(funcss || '', " ").concat("text-" + (color === null || color === void 0 ? void 0 : color.trim()) || '', " ").concat(raised ? "raised" : '', " ").concat(bg || '', " ").concat(hoverable ? 'hoverable' : ''), style: {
|
|
53
53
|
width: "".concat(size + "rem" || '2.3rem'),
|
|
54
54
|
height: "".concat(size + "rem" || '2.3rem'),
|
|
55
55
|
}, key: key, onClick: onClick }, rest),
|
package/ui/specials/Circle.tsx
CHANGED
|
@@ -7,10 +7,11 @@ interface Circle_Props extends HTMLProps<HTMLDivElement> {
|
|
|
7
7
|
size?: number;
|
|
8
8
|
funcss?: string;
|
|
9
9
|
bg?: string;
|
|
10
|
+
color?: string;
|
|
10
11
|
children?: ReactNode;
|
|
11
12
|
hoverable?: boolean;
|
|
12
13
|
raised?:boolean
|
|
13
|
-
key?:React.
|
|
14
|
+
key?:React.Key
|
|
14
15
|
onClick?: ()=> void
|
|
15
16
|
}
|
|
16
17
|
|
|
@@ -19,6 +20,7 @@ export default function Circle({
|
|
|
19
20
|
size,
|
|
20
21
|
funcss,
|
|
21
22
|
bg,
|
|
23
|
+
color,
|
|
22
24
|
children,
|
|
23
25
|
hoverable,
|
|
24
26
|
raised ,
|
|
@@ -28,7 +30,7 @@ export default function Circle({
|
|
|
28
30
|
}: Circle_Props) {
|
|
29
31
|
return (
|
|
30
32
|
<div
|
|
31
|
-
className={`pointer avatar ${funcss || ''}
|
|
33
|
+
className={`pointer avatar ${funcss || ''} ${`text-` + color?.trim() || ''} ${raised ? "raised" : ''} ${bg || ''} ${
|
|
32
34
|
hoverable ? 'hoverable' : ''
|
|
33
35
|
}`}
|
|
34
36
|
style={{
|
|
@@ -4,5 +4,5 @@ type HrProps = {
|
|
|
4
4
|
funcss?: string;
|
|
5
5
|
style?: object;
|
|
6
6
|
};
|
|
7
|
-
declare const FullCenteredPage: ({ children, funcss, style, ...rest }: HrProps) =>
|
|
7
|
+
declare const FullCenteredPage: ({ children, funcss, style, ...rest }: HrProps) => React.JSX.Element;
|
|
8
8
|
export default FullCenteredPage;
|
package/ui/specials/Hr.d.ts
CHANGED
package/ui/specials/RowFlex.d.ts
CHANGED
|
@@ -10,5 +10,5 @@ interface RowFlexProps {
|
|
|
10
10
|
id?: string;
|
|
11
11
|
children?: React.ReactNode;
|
|
12
12
|
}
|
|
13
|
-
export default function RowFlex({ funcss, content, justify, gap, alignItems, responsiveSmall, responsiveMedium, id, children, ...rest }: RowFlexProps):
|
|
13
|
+
export default function RowFlex({ funcss, content, justify, gap, alignItems, responsiveSmall, responsiveMedium, id, children, ...rest }: RowFlexProps): React.JSX.Element;
|
|
14
14
|
export {};
|
package/ui/specials/Section.d.ts
CHANGED
package/ui/table/Body.d.ts
CHANGED
package/ui/table/Data.d.ts
CHANGED
package/ui/table/Head.d.ts
CHANGED
package/ui/table/Row.d.ts
CHANGED
|
@@ -5,5 +5,5 @@ type TableRowProps = {
|
|
|
5
5
|
rowKey?: React.Key;
|
|
6
6
|
key?: React.Key;
|
|
7
7
|
};
|
|
8
|
-
export default function TableRow({ children, funcss, rowKey, key }: TableRowProps):
|
|
8
|
+
export default function TableRow({ children, funcss, rowKey, key }: TableRowProps): React.JSX.Element;
|
|
9
9
|
export {};
|
package/ui/table/Table.d.ts
CHANGED
|
@@ -29,5 +29,5 @@ type TableProps = {
|
|
|
29
29
|
};
|
|
30
30
|
export default function Table({ children, funcss, bordered, noStripped, hoverable, title, showTotal, light, dark, head, body, data, isLoading, right, height, pageSize, // Default page size,
|
|
31
31
|
customColumns, filterableFields, // New prop
|
|
32
|
-
...rest }: TableProps):
|
|
32
|
+
...rest }: TableProps): React.JSX.Element;
|
|
33
33
|
export {};
|
package/ui/table/Table.js
CHANGED
|
@@ -132,21 +132,25 @@ function Table(_a) {
|
|
|
132
132
|
data &&
|
|
133
133
|
React.createElement("div", { className: "padding bb" },
|
|
134
134
|
React.createElement(RowFlex_1.default, { justify: 'space-between' },
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
React.createElement(
|
|
138
|
-
|
|
135
|
+
React.createElement("div", null,
|
|
136
|
+
title &&
|
|
137
|
+
React.createElement("div", null,
|
|
138
|
+
React.createElement(Text_1.default, { text: title || "", size: 'h4' })),
|
|
139
|
+
showTotal && data &&
|
|
140
|
+
React.createElement("div", null,
|
|
141
|
+
React.createElement(Text_1.default, { text: 'Records:', size: 'sm', color: 'primary' }),
|
|
142
|
+
React.createElement(Text_1.default, { text: filteredData.length, size: 'h6' }))),
|
|
139
143
|
data && filterableFields ?
|
|
140
144
|
React.createElement("div", { className: "col width-200-max" },
|
|
141
145
|
React.createElement(RowFlex_1.default, { gap: 0.7 },
|
|
142
|
-
React.createElement("select", { className: "
|
|
146
|
+
React.createElement("select", { className: " input borderedInput roundEdgeSmall smallInput", value: selectedField || '', onChange: function (e) {
|
|
143
147
|
handleFieldChange(e.target.value);
|
|
144
148
|
} },
|
|
145
149
|
React.createElement("option", { value: "" }, "\uD83D\uDD0D Filter"),
|
|
146
150
|
React.createElement("option", { value: "" }, "All*"), filterableFields === null || filterableFields === void 0 ? void 0 :
|
|
147
151
|
filterableFields.map(function (field) { return (React.createElement("option", { key: field, value: field }, field)); })),
|
|
148
152
|
selectedField && React.createElement("div", null, "="),
|
|
149
|
-
selectedField && (React.createElement("select", { className: "
|
|
153
|
+
selectedField && (React.createElement("select", { className: " input borderedInput width-200-max roundEdgeSmall smallInput", value: selectedValue || '', onChange: function (e) {
|
|
150
154
|
handleValueChange(e.target.value);
|
|
151
155
|
handleChangePage(1);
|
|
152
156
|
} },
|
|
@@ -183,6 +187,6 @@ function Table(_a) {
|
|
|
183
187
|
React.createElement("div", { className: "padding bt" },
|
|
184
188
|
React.createElement(RowFlex_1.default, { gap: 1, justify: 'center' },
|
|
185
189
|
React.createElement("div", { className: "pagination" }, Array.from({ length: endPage - startPage + 1 }, function (_, i) { return (React.createElement(Circle_1.default, { size: 2.5, key: startPage + i, onClick: function () { return handleChangePage(startPage + i); }, funcss: currentPage === startPage + i ? 'primary pageCircle' : 'dark800 pageCircle text-primary' },
|
|
186
|
-
React.createElement(Text_1.default, { text: "".concat(startPage + i), bold: true, size: '
|
|
190
|
+
React.createElement(Text_1.default, { text: "".concat(startPage + i), bold: true, size: 'sm' }))); }))))))));
|
|
187
191
|
}
|
|
188
192
|
exports.default = Table;
|
package/ui/table/Table.tsx
CHANGED
|
@@ -139,19 +139,30 @@ export default function Table({
|
|
|
139
139
|
data &&
|
|
140
140
|
<div className="padding bb">
|
|
141
141
|
<RowFlex justify='space-between'>
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
<Text text={
|
|
142
|
+
<div>
|
|
143
|
+
{
|
|
144
|
+
title &&
|
|
145
|
+
<div >
|
|
146
|
+
<Text text={title || ""} size='h4'/>
|
|
147
|
+
</div>
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
}
|
|
151
|
+
{
|
|
152
|
+
showTotal && data &&
|
|
153
|
+
<div >
|
|
154
|
+
<Text text='Records:' size='sm' color='primary'/>
|
|
155
|
+
<Text text={filteredData.length} size='h6'/>
|
|
147
156
|
</div>
|
|
148
157
|
}
|
|
158
|
+
</div>
|
|
159
|
+
|
|
149
160
|
{
|
|
150
161
|
data && filterableFields ?
|
|
151
162
|
<div className="col width-200-max">
|
|
152
163
|
<RowFlex gap={0.7}>
|
|
153
164
|
<select
|
|
154
|
-
className="
|
|
165
|
+
className=" input borderedInput roundEdgeSmall smallInput"
|
|
155
166
|
value={selectedField || ''}
|
|
156
167
|
onChange={(e) => {
|
|
157
168
|
handleFieldChange(e.target.value)
|
|
@@ -169,7 +180,7 @@ export default function Table({
|
|
|
169
180
|
}
|
|
170
181
|
{selectedField && (
|
|
171
182
|
<select
|
|
172
|
-
className="
|
|
183
|
+
className=" input borderedInput width-200-max roundEdgeSmall smallInput"
|
|
173
184
|
value={selectedValue || ''}
|
|
174
185
|
onChange={(e) => {
|
|
175
186
|
handleValueChange(e.target.value)
|
|
@@ -290,10 +301,11 @@ export default function Table({
|
|
|
290
301
|
onClick={() => handleChangePage(startPage + i)}
|
|
291
302
|
funcss={currentPage === startPage + i ? 'primary pageCircle' : 'dark800 pageCircle text-primary'}
|
|
292
303
|
>
|
|
293
|
-
<Text text={`${startPage + i}`} bold size='
|
|
304
|
+
<Text text={`${startPage + i}`} bold size='sm'/>
|
|
294
305
|
</Circle>
|
|
295
306
|
))}
|
|
296
307
|
</div>
|
|
308
|
+
|
|
297
309
|
</RowFlex>
|
|
298
310
|
</div>
|
|
299
311
|
}
|