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.
Files changed (72) hide show
  1. package/css/fun.css +1002 -3749
  2. package/js/Fun.js +2 -2
  3. package/js/Fun.tsx +9 -8
  4. package/package.json +2 -1
  5. package/tsconfig.tsbuildinfo +1 -1
  6. package/ui/alert/Alert.d.ts +1 -1
  7. package/ui/aos/AOS.d.ts +1 -1
  8. package/ui/appbar/AppBar.d.ts +1 -1
  9. package/ui/avatar/Avatar.d.ts +2 -1
  10. package/ui/breadcrumb/BreadCrumb.d.ts +2 -1
  11. package/ui/button/Button.d.ts +1 -1
  12. package/ui/card/Card.d.ts +1 -1
  13. package/ui/card/CardBody.d.ts +2 -2
  14. package/ui/card/CardFab.d.ts +2 -2
  15. package/ui/card/CardFooter.d.ts +2 -2
  16. package/ui/card/CardHeader.d.ts +2 -2
  17. package/ui/div/Div.d.ts +1 -1
  18. package/ui/drop/Action.d.ts +1 -1
  19. package/ui/drop/Down.d.ts +1 -1
  20. package/ui/drop/Item.d.ts +1 -1
  21. package/ui/drop/Menu.d.ts +1 -1
  22. package/ui/drop/Up.d.ts +1 -1
  23. package/ui/grid/Col.d.ts +2 -1
  24. package/ui/grid/Grid.d.ts +2 -1
  25. package/ui/input/Iconic.d.ts +2 -2
  26. package/ui/input/Input.d.ts +2 -0
  27. package/ui/input/Input.js +50 -9
  28. package/ui/input/Input.tsx +34 -7
  29. package/ui/list/Item.d.ts +1 -1
  30. package/ui/list/List.d.ts +1 -1
  31. package/ui/loader/Loader.d.ts +2 -1
  32. package/ui/modal/Action.d.ts +1 -1
  33. package/ui/modal/Close.d.ts +2 -1
  34. package/ui/modal/Content.d.ts +1 -1
  35. package/ui/modal/Header.d.ts +2 -2
  36. package/ui/modal/Header.tsx +1 -1
  37. package/ui/modal/Modal.d.ts +1 -1
  38. package/ui/notification/Content.d.ts +1 -1
  39. package/ui/notification/Footer.d.ts +1 -1
  40. package/ui/notification/Header.d.ts +1 -1
  41. package/ui/notification/Notification.d.ts +1 -1
  42. package/ui/page/NotFound.d.ts +1 -1
  43. package/ui/page/UnAuthorized.d.ts +1 -1
  44. package/ui/progress/Bar.d.ts +1 -1
  45. package/ui/sidebar/SideBar.d.ts +2 -1
  46. package/ui/sidebar/SideContent.d.ts +1 -1
  47. package/ui/specials/Circle.d.ts +3 -2
  48. package/ui/specials/Circle.js +2 -2
  49. package/ui/specials/Circle.tsx +4 -2
  50. package/ui/specials/FullCenteredPage.d.ts +1 -1
  51. package/ui/specials/Hr.d.ts +1 -1
  52. package/ui/specials/RowFlex.d.ts +1 -1
  53. package/ui/specials/Section.d.ts +1 -1
  54. package/ui/table/Body.d.ts +1 -1
  55. package/ui/table/Data.d.ts +1 -1
  56. package/ui/table/Head.d.ts +1 -1
  57. package/ui/table/Row.d.ts +1 -1
  58. package/ui/table/Table.d.ts +1 -1
  59. package/ui/table/Table.js +11 -7
  60. package/ui/table/Table.tsx +20 -8
  61. package/ui/text/Text.d.ts +5 -5
  62. package/ui/text/Text.js +20 -11
  63. package/ui/text/Text.tsx +62 -33
  64. package/ui/tooltip/Tip.d.ts +2 -1
  65. package/ui/tooltip/Tip.js +9 -5
  66. package/ui/tooltip/Tip.tsx +12 -2
  67. package/ui/tooltip/ToolTip.d.ts +1 -1
  68. package/ui/tooltip/ToolTip.js +1 -1
  69. package/ui/tooltip/ToolTip.tsx +7 -1
  70. package/ui/video/FunPlayer.d.ts +0 -7
  71. package/ui/video/FunPlayer.js +202 -179
  72. package/ui/video/FunPlayer.tsx +218 -218
package/ui/text/Text.d.ts CHANGED
@@ -1,16 +1,13 @@
1
1
  import React from 'react';
2
2
  type TypographyProps = {
3
3
  id?: string;
4
- size?: "smaller" | "small" | "big" | "bigger" | "jumbo" | "minified";
4
+ text?: React.ReactNode;
5
+ funcss?: string;
5
6
  bg?: string;
6
7
  color?: string;
7
- children?: React.ReactNode;
8
8
  hoverBg?: string;
9
9
  hoverText?: string;
10
10
  monospace?: boolean;
11
- text?: string;
12
- heading?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
13
- funcss?: string;
14
11
  emp?: boolean;
15
12
  bold?: boolean;
16
13
  block?: boolean;
@@ -20,6 +17,7 @@ type TypographyProps = {
20
17
  lighter?: boolean;
21
18
  italic?: boolean;
22
19
  underline?: boolean;
20
+ weight?: number;
23
21
  quote?: boolean;
24
22
  align?: "left" | "center" | "right" | "justify";
25
23
  lineHeight?: string;
@@ -39,6 +37,8 @@ type TypographyProps = {
39
37
  transform?: string;
40
38
  customStyles?: React.CSSProperties;
41
39
  onClick?: () => void;
40
+ children?: React.ReactNode;
41
+ size?: "xs" | "sm" | "base" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
42
42
  };
43
43
  declare const Text: React.FC<TypographyProps>;
44
44
  export default Text;
package/ui/text/Text.js CHANGED
@@ -28,33 +28,42 @@ Object.defineProperty(exports, "__esModule", { value: true });
28
28
  var react_1 = __importDefault(require("react"));
29
29
  var pi_1 = require("react-icons/pi");
30
30
  var Text = function (_a) {
31
- var id = _a.id, size = _a.size, bg = _a.bg, color = _a.color, children = _a.children, hoverBg = _a.hoverBg, hoverText = _a.hoverText, text = _a.text, heading = _a.heading, funcss = _a.funcss, emp = _a.emp, bold = _a.bold, block = _a.block, body = _a.body, article = _a.article, light = _a.light, lighter = _a.lighter, italic = _a.italic, underline = _a.underline, align = _a.align, lineHeight = _a.lineHeight, letterSpacing = _a.letterSpacing, uppercase = _a.uppercase, lowercase = _a.lowercase, capitalize = _a.capitalize, textDecoration = _a.textDecoration, textTransform = _a.textTransform, whiteSpace = _a.whiteSpace, wordBreak = _a.wordBreak, fontFamily = _a.fontFamily, textShadow = _a.textShadow, textAlign = _a.textAlign, customStyles = _a.customStyles, monospace = _a.monospace, quote = _a.quote, rest = __rest(_a, ["id", "size", "bg", "color", "children", "hoverBg", "hoverText", "text", "heading", "funcss", "emp", "bold", "block", "body", "article", "light", "lighter", "italic", "underline", "align", "lineHeight", "letterSpacing", "uppercase", "lowercase", "capitalize", "textDecoration", "textTransform", "whiteSpace", "wordBreak", "fontFamily", "textShadow", "textAlign", "customStyles", "monospace", "quote"]);
32
- var mergedStyles = __assign({ display: block ? 'block' : undefined, fontWeight: bold ? 'bold' : undefined, lineHeight: lineHeight ? lineHeight : undefined, letterSpacing: letterSpacing ? letterSpacing : undefined, textTransform: textTransform ? textTransform : undefined, textDecoration: textDecoration ? textDecoration : undefined, fontFamily: fontFamily ? fontFamily : undefined, textShadow: textShadow ? textShadow : undefined, textAlign: textAlign ? textAlign : undefined, whiteSpace: whiteSpace ? whiteSpace : undefined, wordBreak: wordBreak ? wordBreak : undefined, transform: customStyles === null || customStyles === void 0 ? void 0 : customStyles.transform }, customStyles);
31
+ var id = _a.id, bg = _a.bg, color = _a.color, children = _a.children, hoverBg = _a.hoverBg, hoverText = _a.hoverText, text = _a.text, funcss = _a.funcss, emp = _a.emp, bold = _a.bold, block = _a.block, body = _a.body, article = _a.article, light = _a.light, lighter = _a.lighter, italic = _a.italic, weight = _a.weight, underline = _a.underline, align = _a.align, lineHeight = _a.lineHeight, letterSpacing = _a.letterSpacing, uppercase = _a.uppercase, lowercase = _a.lowercase, capitalize = _a.capitalize, textDecoration = _a.textDecoration, textTransform = _a.textTransform, whiteSpace = _a.whiteSpace, wordBreak = _a.wordBreak, fontFamily = _a.fontFamily, textShadow = _a.textShadow, textAlign = _a.textAlign, customStyles = _a.customStyles, monospace = _a.monospace, quote = _a.quote, _b = _a.size, size = _b === void 0 ? 'base' : _b, // default
32
+ rest = __rest(_a, ["id", "bg", "color", "children", "hoverBg", "hoverText", "text", "funcss", "emp", "bold", "block", "body", "article", "light", "lighter", "italic", "weight", "underline", "align", "lineHeight", "letterSpacing", "uppercase", "lowercase", "capitalize", "textDecoration", "textTransform", "whiteSpace", "wordBreak", "fontFamily", "textShadow", "textAlign", "customStyles", "monospace", "quote", "size"]);
33
+ var Tag = block ? 'div' : 'span';
34
+ var sizeClass = "".concat(size === 'h1' ? "h1" :
35
+ size === 'h2' ? "h2" :
36
+ size === 'h3' ? "h3" :
37
+ size === 'h4' ? "h4" :
38
+ size === 'h5' ? "h5" :
39
+ size === 'h6' ? "h6" :
40
+ "text-".concat(size));
41
+ var mergedStyles = __assign({ display: block ? 'block' : undefined, fontWeight: bold ? 'bold' : weight ? weight : undefined, lineHeight: lineHeight, letterSpacing: letterSpacing, textTransform: textTransform, textDecoration: textDecoration, fontFamily: fontFamily, textShadow: textShadow, textAlign: textAlign, whiteSpace: whiteSpace, wordBreak: wordBreak, transform: customStyles === null || customStyles === void 0 ? void 0 : customStyles.transform }, customStyles);
33
42
  var classNames = [
34
- size ? "text-".concat(size) : '',
43
+ funcss || '',
44
+ sizeClass,
35
45
  color ? "text-".concat(color) : '',
36
46
  align ? "text-".concat(align) : '',
37
47
  monospace ? 'monospace' : '',
38
- bg ? bg : '',
48
+ bg || '',
39
49
  hoverText ? "hover-text-".concat(hoverText) : '',
40
50
  hoverBg ? "hover-".concat(hoverBg) : '',
41
51
  light ? 'lightText' : lighter ? 'lighterText' : '',
42
- heading ? heading : '',
43
52
  italic ? 'italicText' : '',
44
53
  underline ? 'underlineText' : '',
45
54
  body ? 'body' : '',
46
55
  article ? 'article' : '',
47
- funcss ? funcss : '',
48
56
  emp ? 'emp' : '',
49
57
  bold ? 'bold' : '',
50
58
  uppercase ? 'uppercase' : '',
51
59
  lowercase ? 'lowercase' : '',
52
60
  capitalize ? 'capitalize' : '',
53
- ].filter(Boolean).join(' ');
54
- var HeadingTag = heading ? heading : block ? "div" : 'span';
55
- return (react_1.default.createElement(HeadingTag, __assign({ id: id, className: classNames, style: mergedStyles }, rest),
56
- quote && react_1.default.createElement("div", { className: "" },
57
- react_1.default.createElement(pi_1.PiQuotesLight, null)),
61
+ ]
62
+ .filter(Boolean)
63
+ .join(' ');
64
+ return (react_1.default.createElement(Tag, __assign({ id: id, className: classNames, style: mergedStyles }, rest),
65
+ quote && (react_1.default.createElement("div", null,
66
+ react_1.default.createElement(pi_1.PiQuotesLight, null))),
58
67
  children,
59
68
  text));
60
69
  };
package/ui/text/Text.tsx CHANGED
@@ -3,16 +3,13 @@ import { PiQuotesLight } from 'react-icons/pi';
3
3
 
4
4
  type TypographyProps = {
5
5
  id?: string;
6
- size?: "smaller" | "small" | "big" | "bigger" | "jumbo" | "minified";
6
+ text?: React.ReactNode;
7
+ funcss?: string;
7
8
  bg?: string;
8
9
  color?: string;
9
- children?: React.ReactNode;
10
10
  hoverBg?: string;
11
11
  hoverText?: string;
12
12
  monospace?: boolean;
13
- text?: string;
14
- heading?: "h1" | "h2" |"h3" |"h4" |"h5" |"h6" ;
15
- funcss?: string;
16
13
  emp?: boolean;
17
14
  bold?: boolean;
18
15
  block?: boolean;
@@ -22,7 +19,8 @@ type TypographyProps = {
22
19
  lighter?: boolean;
23
20
  italic?: boolean;
24
21
  underline?: boolean;
25
- quote?:boolean;
22
+ weight?: number;
23
+ quote?: boolean;
26
24
  align?: "left" | "center" | "right" | "justify";
27
25
  lineHeight?: string;
28
26
  letterSpacing?: string;
@@ -41,18 +39,38 @@ type TypographyProps = {
41
39
  transform?: string;
42
40
  customStyles?: React.CSSProperties;
43
41
  onClick?: () => void;
42
+ children?: React.ReactNode;
43
+
44
+ size?:
45
+ | "xs"
46
+ | "sm"
47
+ | "base"
48
+ | "lg"
49
+ | "xl"
50
+ | "2xl"
51
+ | "3xl"
52
+ | "4xl"
53
+ | "5xl"
54
+ | "6xl"
55
+ | "7xl"
56
+ | "8xl"
57
+ | "9xl"
58
+ | "h1"
59
+ | "h2"
60
+ | "h3"
61
+ | "h4"
62
+ | "h5"
63
+ | "h6";
44
64
  };
45
65
 
46
66
  const Text: React.FC<TypographyProps> = ({
47
67
  id,
48
- size,
49
68
  bg,
50
69
  color,
51
70
  children,
52
71
  hoverBg,
53
72
  hoverText,
54
73
  text,
55
- heading,
56
74
  funcss,
57
75
  emp,
58
76
  bold,
@@ -62,6 +80,7 @@ const Text: React.FC<TypographyProps> = ({
62
80
  light,
63
81
  lighter,
64
82
  italic,
83
+ weight,
65
84
  underline,
66
85
  align,
67
86
  lineHeight,
@@ -79,59 +98,69 @@ const Text: React.FC<TypographyProps> = ({
79
98
  customStyles,
80
99
  monospace,
81
100
  quote,
101
+ size = 'base', // default
102
+
82
103
  ...rest
83
104
  }) => {
105
+ const Tag = block ? 'div' : 'span';
106
+
107
+ const sizeClass = `${size === 'h1' ? `h1` :
108
+ size === 'h2' ? `h2` :
109
+ size === 'h3' ? `h3` :
110
+ size === 'h4' ? `h4` :
111
+ size === 'h5' ? `h5` :
112
+ size === 'h6' ? `h6` :
113
+ `text-${size}`}`;
114
+
84
115
  const mergedStyles: React.CSSProperties = {
85
116
  display: block ? 'block' : undefined,
86
- fontWeight: bold ? 'bold' : undefined,
87
- lineHeight: lineHeight ? lineHeight : undefined,
88
- letterSpacing: letterSpacing ? letterSpacing : undefined,
89
- textTransform: textTransform ? textTransform : undefined,
90
- textDecoration: textDecoration ? textDecoration : undefined,
91
- fontFamily: fontFamily ? fontFamily : undefined,
92
- textShadow: textShadow ? textShadow : undefined,
93
- textAlign: textAlign ? textAlign : undefined,
94
- whiteSpace: whiteSpace ? whiteSpace : undefined,
95
- wordBreak: wordBreak ? wordBreak : undefined,
117
+ fontWeight: bold ? 'bold' : weight ? weight : undefined,
118
+ lineHeight,
119
+ letterSpacing,
120
+ textTransform,
121
+ textDecoration,
122
+ fontFamily,
123
+ textShadow,
124
+ textAlign,
125
+ whiteSpace,
126
+ wordBreak,
96
127
  transform: customStyles?.transform,
97
128
  ...customStyles,
98
129
  };
99
130
 
100
131
  const classNames = [
101
- size ? `text-${size}` : '',
132
+ funcss || '',
133
+ sizeClass,
102
134
  color ? `text-${color}` : '',
103
135
  align ? `text-${align}` : '',
104
136
  monospace ? 'monospace' : '',
105
- bg ? bg : '',
137
+ bg || '',
106
138
  hoverText ? `hover-text-${hoverText}` : '',
107
139
  hoverBg ? `hover-${hoverBg}` : '',
108
140
  light ? 'lightText' : lighter ? 'lighterText' : '',
109
- heading ? heading : '',
110
141
  italic ? 'italicText' : '',
111
142
  underline ? 'underlineText' : '',
112
143
  body ? 'body' : '',
113
144
  article ? 'article' : '',
114
- funcss ? funcss : '',
115
145
  emp ? 'emp' : '',
116
146
  bold ? 'bold' : '',
117
147
  uppercase ? 'uppercase' : '',
118
148
  lowercase ? 'lowercase' : '',
119
149
  capitalize ? 'capitalize' : '',
120
- ].filter(Boolean).join(' ');
121
-
122
- const HeadingTag = heading ? heading : block ? "div" : 'span';
150
+ ]
151
+ .filter(Boolean)
152
+ .join(' ');
123
153
 
124
154
  return (
125
- <HeadingTag
126
- id={id}
127
- className={classNames}
128
- style={mergedStyles}
129
- {...rest}
130
- >
131
- {quote && <div className=""><PiQuotesLight /></div>}
155
+ <Tag id={id} className={classNames} style={mergedStyles} {...rest}>
156
+ {quote && (
157
+ <div>
158
+ <PiQuotesLight />
159
+ </div>
160
+ )}
132
161
  {children}
133
162
  {text}
134
- </HeadingTag>
163
+ </Tag>
135
164
  );
136
165
  };
137
166
 
@@ -4,8 +4,9 @@ interface TipProps {
4
4
  funcss?: string;
5
5
  children?: React.ReactNode;
6
6
  content?: React.ReactNode;
7
+ message?: React.ReactNode;
7
8
  animation?: string;
8
9
  duration?: number;
9
10
  }
10
- export default function Tip({ tip, funcss, children, content, animation, duration, ...rest }: TipProps): any;
11
+ export default function Tip({ tip, funcss, children, content, message, animation, duration, ...rest }: TipProps): React.JSX.Element;
11
12
  export {};
package/ui/tooltip/Tip.js CHANGED
@@ -47,10 +47,14 @@ var __rest = (this && this.__rest) || function (s, e) {
47
47
  Object.defineProperty(exports, "__esModule", { value: true });
48
48
  var React = __importStar(require("react"));
49
49
  function Tip(_a) {
50
- var tip = _a.tip, funcss = _a.funcss, children = _a.children, content = _a.content, animation = _a.animation, duration = _a.duration, rest = __rest(_a, ["tip", "funcss", "children", "content", "animation", "duration"]);
51
- return (React.createElement("span", __assign({ className: "tip-".concat(tip, " tip ").concat(funcss ? funcss : ''), style: { animation: " ".concat(duration ? duration : 0, "s ").concat(animation ? animation : '') } }, rest),
52
- children,
53
- " ",
54
- content));
50
+ var tip = _a.tip, funcss = _a.funcss, children = _a.children, content = _a.content, message = _a.message, animation = _a.animation, duration = _a.duration, rest = __rest(_a, ["tip", "funcss", "children", "content", "message", "animation", "duration"]);
51
+ // Calculate width only if content is a string
52
+ var text = message || content || children;
53
+ // Check if content is a plain string to calculate width
54
+ var isString = typeof text === 'string';
55
+ var minWidth = isString
56
+ ? "".concat(text.replace(/\s+/g, '').length * 8, "px")
57
+ : 'auto';
58
+ return (React.createElement("span", __assign({ className: "tip-".concat(tip, " tip ").concat(funcss ? funcss : ''), style: { animation: " ".concat(duration ? duration : 0, "s ").concat(animation ? animation : ''), minWidth: minWidth } }, rest), text));
55
59
  }
56
60
  exports.default = Tip;
@@ -5,6 +5,7 @@ interface TipProps {
5
5
  funcss?: string;
6
6
  children?: React.ReactNode;
7
7
  content?: React.ReactNode;
8
+ message?: React.ReactNode;
8
9
  animation?: string;
9
10
  duration?: number;
10
11
  }
@@ -14,17 +15,26 @@ export default function Tip({
14
15
  funcss,
15
16
  children,
16
17
  content,
18
+ message,
17
19
  animation,
18
20
  duration,
19
21
  ...rest
20
22
  }: TipProps) {
23
+ // Calculate width only if content is a string
24
+ const text = message || content || children;
25
+ // Check if content is a plain string to calculate width
26
+ const isString = typeof text === 'string';
27
+ const minWidth = isString
28
+ ? `${text.replace(/\s+/g, '').length * 8}px`
29
+ : 'auto';
21
30
  return (
22
31
  <span
23
32
  className={`tip-${tip} tip ${funcss ? funcss : ''}`}
24
- style={{ animation: ` ${duration ? duration : 0}s ${animation ? animation : ''}` }}
33
+ style={{ animation: ` ${duration ? duration : 0}s ${animation ? animation : ''}`, minWidth: minWidth }}
25
34
  {...rest}
26
35
  >
27
- {children} {content}
36
+ {text}
37
+
28
38
  </span>
29
39
  );
30
40
  }
@@ -3,5 +3,5 @@ interface ToolTipProps {
3
3
  funcss?: string;
4
4
  children?: React.ReactNode;
5
5
  }
6
- export default function ToolTip({ funcss, children, ...rest }: ToolTipProps): any;
6
+ export default function ToolTip({ funcss, children, ...rest }: ToolTipProps): React.JSX.Element;
7
7
  export {};
@@ -48,6 +48,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
48
48
  var React = __importStar(require("react"));
49
49
  function ToolTip(_a) {
50
50
  var funcss = _a.funcss, children = _a.children, rest = __rest(_a, ["funcss", "children"]);
51
- return (React.createElement("span", __assign({ className: "tooltip ".concat(funcss ? funcss : '') }, rest), children));
51
+ return (React.createElement("span", __assign({ className: "tooltip ".concat(funcss !== null && funcss !== void 0 ? funcss : '') }, rest), children));
52
52
  }
53
53
  exports.default = ToolTip;
@@ -1,4 +1,5 @@
1
1
  import * as React from 'react';
2
+ import Tip from './Tip';
2
3
 
3
4
  interface ToolTipProps {
4
5
  funcss?: string;
@@ -6,8 +7,13 @@ interface ToolTipProps {
6
7
  }
7
8
 
8
9
  export default function ToolTip({ funcss, children, ...rest }: ToolTipProps) {
10
+
9
11
  return (
10
- <span className={`tooltip ${funcss ? funcss : ''}`} {...rest}>
12
+ <span
13
+
14
+ className={`tooltip ${funcss ?? ''}`}
15
+ {...rest}
16
+ >
11
17
  {children}
12
18
  </span>
13
19
  );
@@ -1,7 +0,0 @@
1
- interface VideoProps {
2
- src: string;
3
- autoPlay: boolean;
4
- onDuration?: (duration: number) => void;
5
- }
6
- export default function Video({ src, autoPlay, onDuration }: VideoProps): any;
7
- export {};