funuicss 2.7.16 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/css/fun.css +6663 -6653
- package/index.d.ts +2 -0
- package/index.js +5 -1
- package/js/google/AnalyticsHandler.d.ts +10 -0
- package/js/google/AnalyticsHandler.js +20 -0
- package/js/google/analytics.d.ts +6 -0
- package/js/google/analytics.js +53 -0
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/ui/button/Button.js +1 -1
- package/ui/flex/Flex.d.ts +3 -3
- package/ui/flex/Flex.js +2 -2
- package/ui/notification/Notification.d.ts +7 -3
- package/ui/notification/Notification.js +18 -14
- package/ui/scrolltotop/ScrollToTop.d.ts +3 -0
- package/ui/scrolltotop/ScrollToTop.js +61 -0
- package/ui/view/View.d.ts +27 -38
- package/ui/view/View.js +10 -38
- package/ui/vista/Vista.d.ts +6 -1
- package/ui/vista/Vista.js +33 -4
- package/assets/colors/colors.d.ts +0 -347
- package/assets/colors/colors.js +0 -348
- package/assets/colors/colors.tsx +0 -697
- package/hooks/useHls.tsx +0 -69
- package/index.tsx +0 -58
- package/js/Cookie.tsx +0 -91
- package/js/Fun.jsx +0 -225
- package/js/Fun.tsx +0 -239
- package/tsconfig.json +0 -20
- package/types/react-easy-export.d.ts +0 -4
- package/ui/ScrollInView/ScrollInView.tsx +0 -69
- package/ui/accordion/Accordion.tsx +0 -125
- package/ui/alert/Alert.tsx +0 -106
- package/ui/aos/AOS.tsx +0 -24
- package/ui/appbar/AppBar.tsx +0 -115
- package/ui/appbar/Hamburger.tsx +0 -30
- package/ui/avatar/Avatar.tsx +0 -52
- package/ui/blob/Blob.tsx +0 -34
- package/ui/breadcrumb/BreadCrumb.tsx +0 -48
- package/ui/button/Button.tsx +0 -153
- package/ui/calendar/ActivityCard.tsx +0 -27
- package/ui/calendar/Calendar.tsx +0 -343
- package/ui/card/Card.tsx +0 -117
- package/ui/card/CardBody.tsx +0 -14
- package/ui/card/CardFab.tsx +0 -16
- package/ui/card/CardFooter.tsx +0 -14
- package/ui/card/CardHeader.tsx +0 -14
- package/ui/carousel/Carousel.tsx +0 -148
- package/ui/chart/Bar.tsx +0 -121
- package/ui/chart/Line.tsx +0 -186
- package/ui/chart/Pie.tsx +0 -127
- package/ui/container/Container.tsx +0 -38
- package/ui/datepicker/DatePicker.tsx +0 -148
- package/ui/div/Div.tsx +0 -61
- package/ui/drop/Action.tsx +0 -16
- package/ui/drop/Down.tsx +0 -18
- package/ui/drop/Dropdown.tsx +0 -117
- package/ui/drop/Item.tsx +0 -15
- package/ui/drop/Menu.tsx +0 -40
- package/ui/drop/Up.tsx +0 -18
- package/ui/flex/Flex.tsx +0 -97
- package/ui/flex/FlexItem.tsx +0 -64
- package/ui/grid/Col.tsx +0 -43
- package/ui/grid/Grid.tsx +0 -37
- package/ui/input/Iconic.tsx +0 -43
- package/ui/input/Input.tsx +0 -409
- package/ui/list/Item.tsx +0 -18
- package/ui/list/List.tsx +0 -45
- package/ui/loader/Loader.tsx +0 -47
- package/ui/modal/Action.tsx +0 -14
- package/ui/modal/Close.tsx +0 -14
- package/ui/modal/Content.tsx +0 -15
- package/ui/modal/Header.tsx +0 -19
- package/ui/modal/Modal.tsx +0 -140
- package/ui/notification/Content.tsx +0 -14
- package/ui/notification/Footer.tsx +0 -14
- package/ui/notification/Header.tsx +0 -14
- package/ui/notification/Notification.tsx +0 -62
- package/ui/page/NotFound.tsx +0 -67
- package/ui/page/UnAuthorized.tsx +0 -64
- package/ui/progress/Bar.tsx +0 -114
- package/ui/richtext/RichText.tsx +0 -156
- package/ui/sidebar/SideBar.tsx +0 -202
- package/ui/sidebar/SideContent.tsx +0 -16
- package/ui/slider/Slider.tsx +0 -75
- package/ui/snackbar/SnackBar.tsx +0 -56
- package/ui/specials/Circle.tsx +0 -49
- package/ui/specials/CircleGroup.tsx +0 -49
- package/ui/specials/FullCenteredPage.tsx +0 -25
- package/ui/specials/Hr.tsx +0 -16
- package/ui/specials/RowFlex.tsx +0 -56
- package/ui/specials/Section.tsx +0 -18
- package/ui/step/Container.tsx +0 -27
- package/ui/step/Header.tsx +0 -16
- package/ui/step/Line.tsx +0 -17
- package/ui/step/Step.tsx +0 -17
- package/ui/table/Body.tsx +0 -10
- package/ui/table/Data.tsx +0 -15
- package/ui/table/Head.tsx +0 -10
- package/ui/table/Row.tsx +0 -16
- package/ui/table/Table.tsx +0 -372
- package/ui/text/Text.tsx +0 -179
- package/ui/theme/dark.tsx +0 -45
- package/ui/theme/darkenUtils.ts +0 -15
- package/ui/theme/theme.tsx +0 -48
- package/ui/theme/themes.ts +0 -154
- package/ui/tooltip/Tip.tsx +0 -34
- package/ui/tooltip/ToolTip.tsx +0 -20
- package/ui/video/Video.tsx +0 -348
- package/ui/video/videoFunctions.tsx +0 -19
- package/ui/video/videoShortcuts.ts +0 -13
- package/ui/view/View.tsx +0 -157
- package/ui/vista/Vista.tsx +0 -165
- package/utils/Emojis.tsx +0 -59
- package/utils/Functions.tsx +0 -9
- package/utils/getCssVariable.tsx +0 -9
package/ui/button/Button.js
CHANGED
|
@@ -75,7 +75,7 @@ function Button(_a) {
|
|
|
75
75
|
}
|
|
76
76
|
var classNames = [
|
|
77
77
|
'button',
|
|
78
|
-
"text-".concat(bg ? color ? color : !hasNumber(bg) && !outlined ? "
|
|
78
|
+
"text-".concat(bg ? color ? color : !hasNumber(bg) && !outlined ? "" : hasNumberAbove(bg) && !outlined ? "white" : removeNumbers(bg) : color),
|
|
79
79
|
funcss || '',
|
|
80
80
|
rounded ? 'roundBtn' : '',
|
|
81
81
|
hoverless ? 'hoverless' : '',
|
package/ui/flex/Flex.d.ts
CHANGED
|
@@ -17,8 +17,8 @@ interface FlexProps {
|
|
|
17
17
|
responsiveSmall?: boolean;
|
|
18
18
|
responsiveMedium?: boolean;
|
|
19
19
|
responsiveLarge?: boolean;
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
width?: string;
|
|
21
|
+
height?: string;
|
|
22
22
|
}
|
|
23
|
-
export default function Flex({ className, funcss, id, children, style, direction, wrap, justify, alignItems, alignContent, gap, gapX, gapY, gapUnit, responsiveSmall, responsiveMedium, responsiveLarge,
|
|
23
|
+
export default function Flex({ className, funcss, id, children, style, direction, wrap, justify, alignItems, alignContent, gap, gapX, gapY, gapUnit, responsiveSmall, responsiveMedium, responsiveLarge, width, height, ...rest }: FlexProps): React.JSX.Element;
|
|
24
24
|
export {};
|
package/ui/flex/Flex.js
CHANGED
|
@@ -39,7 +39,7 @@ function Flex(_a) {
|
|
|
39
39
|
// Responsive
|
|
40
40
|
responsiveSmall = _a.responsiveSmall, responsiveMedium = _a.responsiveMedium, responsiveLarge = _a.responsiveLarge,
|
|
41
41
|
// Size
|
|
42
|
-
|
|
42
|
+
width = _a.width, height = _a.height, rest = __rest(_a, ["className", "funcss", "id", "children", "style", "direction", "wrap", "justify", "alignItems", "alignContent", "gap", "gapX", "gapY", "gapUnit", "responsiveSmall", "responsiveMedium", "responsiveLarge", "width", "height"]);
|
|
43
43
|
var combinedClassName = [
|
|
44
44
|
className,
|
|
45
45
|
funcss,
|
|
@@ -49,5 +49,5 @@ function Flex(_a) {
|
|
|
49
49
|
]
|
|
50
50
|
.filter(Boolean)
|
|
51
51
|
.join(' ');
|
|
52
|
-
return (react_1.default.createElement("div", __assign({ id: id, className: combinedClassName, style: __assign({ display: 'flex', flexDirection: direction, flexWrap: wrap, justifyContent: justify, alignItems: alignItems, alignContent: alignContent, gap: gap
|
|
52
|
+
return (react_1.default.createElement("div", __assign({ id: id, className: combinedClassName, style: __assign({ display: 'flex', flexDirection: direction, flexWrap: wrap, justifyContent: justify, alignItems: alignItems, alignContent: alignContent, gap: gap ? "".concat(gap).concat(gapUnit) : 0, columnGap: gapX ? "".concat(gapX).concat(gapUnit) : gap ? "".concat(gap).concat(gapUnit) : 0, rowGap: gapY ? "".concat(gapY).concat(gapUnit) : gap ? "".concat(gap).concat(gapUnit) : 0, width: width ? width : '100%', height: height ? height : '100%' }, style) }, rest), children));
|
|
53
53
|
}
|
|
@@ -1,15 +1,19 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
2
|
type NotificationProps = {
|
|
3
3
|
position: string;
|
|
4
4
|
funcss?: string;
|
|
5
5
|
animation?: string;
|
|
6
6
|
duration?: number;
|
|
7
|
-
|
|
7
|
+
autoHide?: boolean;
|
|
8
|
+
autoHideDuration?: number;
|
|
9
|
+
children?: React.ReactNode;
|
|
8
10
|
state: boolean;
|
|
11
|
+
setOpen: (state: boolean) => void;
|
|
9
12
|
width?: string;
|
|
10
13
|
header?: React.ReactNode;
|
|
11
14
|
content?: React.ReactNode;
|
|
12
15
|
footer?: React.ReactNode;
|
|
13
16
|
};
|
|
14
|
-
export default function Notification({ position, funcss, animation, duration,
|
|
17
|
+
export default function Notification({ position, funcss, animation, duration, autoHide, autoHideDuration, children, state, setOpen, // 👈 receives the setter from parent
|
|
18
|
+
width, header, content, footer, }: NotificationProps): React.JSX.Element | null;
|
|
15
19
|
export {};
|
|
@@ -38,23 +38,27 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
38
38
|
};
|
|
39
39
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
40
|
exports.default = Notification;
|
|
41
|
-
var
|
|
41
|
+
var react_1 = __importStar(require("react"));
|
|
42
42
|
var Header_1 = __importDefault(require("./Header"));
|
|
43
43
|
var Content_1 = __importDefault(require("./Content"));
|
|
44
44
|
var Footer_1 = __importDefault(require("./Footer"));
|
|
45
45
|
function Notification(_a) {
|
|
46
|
-
var position = _a.position,
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
57
|
-
|
|
46
|
+
var position = _a.position, _b = _a.funcss, funcss = _b === void 0 ? '' : _b, _c = _a.animation, animation = _c === void 0 ? 'fadeIn' : _c, _d = _a.duration, duration = _d === void 0 ? 0.2 : _d, _e = _a.autoHide, autoHide = _e === void 0 ? false : _e, _f = _a.autoHideDuration, autoHideDuration = _f === void 0 ? 0.2 : _f, children = _a.children, state = _a.state, setOpen = _a.setOpen, // 👈 receives the setter from parent
|
|
47
|
+
_g = _a.width, // 👈 receives the setter from parent
|
|
48
|
+
width = _g === void 0 ? '450px' : _g, header = _a.header, content = _a.content, footer = _a.footer;
|
|
49
|
+
(0, react_1.useEffect)(function () {
|
|
50
|
+
if (state && autoHide) {
|
|
51
|
+
var timer_1 = setTimeout(function () {
|
|
52
|
+
setOpen(false); // 👈 close from inside
|
|
53
|
+
}, autoHideDuration * 1000);
|
|
54
|
+
return function () { return clearTimeout(timer_1); };
|
|
55
|
+
}
|
|
56
|
+
}, [state, autoHide, autoHideDuration, setOpen]);
|
|
57
|
+
if (!state)
|
|
58
58
|
return null;
|
|
59
|
-
}
|
|
59
|
+
return (react_1.default.createElement("div", { className: "notification ".concat(position, " ").concat(funcss), style: { animation: "".concat(duration, "s ").concat(animation), width: width } },
|
|
60
|
+
header && react_1.default.createElement(Header_1.default, null, header),
|
|
61
|
+
content && react_1.default.createElement(Content_1.default, null, content),
|
|
62
|
+
footer && react_1.default.createElement(Footer_1.default, null, footer),
|
|
63
|
+
children));
|
|
60
64
|
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
'use client';
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
37
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
|
+
};
|
|
39
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
+
var react_1 = __importStar(require("react"));
|
|
41
|
+
var fa_1 = require("react-icons/fa");
|
|
42
|
+
var View_1 = __importDefault(require("../view/View"));
|
|
43
|
+
var ScrollToTop = function () {
|
|
44
|
+
var _a = (0, react_1.useState)(false), visible = _a[0], setVisible = _a[1];
|
|
45
|
+
// Show button after scrolling down 200px
|
|
46
|
+
(0, react_1.useEffect)(function () {
|
|
47
|
+
var toggleVisibility = function () {
|
|
48
|
+
setVisible(window.scrollY > 200);
|
|
49
|
+
};
|
|
50
|
+
window.addEventListener('scroll', toggleVisibility);
|
|
51
|
+
return function () { return window.removeEventListener('scroll', toggleVisibility); };
|
|
52
|
+
}, []);
|
|
53
|
+
var scrollToTop = function () {
|
|
54
|
+
window.scrollTo({ top: 0, behavior: 'smooth' });
|
|
55
|
+
};
|
|
56
|
+
if (!visible)
|
|
57
|
+
return null;
|
|
58
|
+
return (react_1.default.createElement(View_1.default, { onClick: scrollToTop, funcss: 'round-edge primary pointer', height: '40px', width: '40px', display: 'flex', justifyContent: 'center', alignItems: 'center', position: 'fixed', bottom: '20px', right: '20px', zIndex: 200 },
|
|
59
|
+
react_1.default.createElement(fa_1.FaCaretUp, { size: 24 })));
|
|
60
|
+
};
|
|
61
|
+
exports.default = ScrollToTop;
|
package/ui/view/View.d.ts
CHANGED
|
@@ -1,44 +1,33 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
children?:
|
|
4
|
-
content?:
|
|
1
|
+
import React, { CSSProperties, HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
interface ViewProps extends Omit<HTMLAttributes<HTMLDivElement>, 'content'> {
|
|
3
|
+
children?: ReactNode;
|
|
4
|
+
content?: ReactNode;
|
|
5
5
|
funcss?: string;
|
|
6
|
-
customStyle?:
|
|
7
|
-
height?: string;
|
|
8
|
-
width?: string;
|
|
9
|
-
minHeight?: string;
|
|
10
|
-
maxHeight?: string;
|
|
11
|
-
minWidth?: string;
|
|
12
|
-
maxWidth?: string;
|
|
13
|
-
padding?: string;
|
|
14
|
-
margin?: string;
|
|
15
|
-
gap?: string;
|
|
6
|
+
customStyle?: CSSProperties;
|
|
7
|
+
height?: string | number;
|
|
8
|
+
width?: string | number;
|
|
9
|
+
minHeight?: string | number;
|
|
10
|
+
maxHeight?: string | number;
|
|
11
|
+
minWidth?: string | number;
|
|
12
|
+
maxWidth?: string | number;
|
|
13
|
+
padding?: string | number;
|
|
14
|
+
margin?: string | number;
|
|
15
|
+
gap?: string | number;
|
|
16
16
|
fit?: boolean;
|
|
17
|
-
display?:
|
|
18
|
-
flexDirection?:
|
|
19
|
-
justifyContent?:
|
|
20
|
-
alignItems?:
|
|
21
|
-
|
|
22
|
-
color?: string;
|
|
23
|
-
border?: string;
|
|
17
|
+
display?: CSSProperties['display'];
|
|
18
|
+
flexDirection?: CSSProperties['flexDirection'];
|
|
19
|
+
justifyContent?: CSSProperties['justifyContent'];
|
|
20
|
+
alignItems?: CSSProperties['alignItems'];
|
|
21
|
+
bg?: string;
|
|
24
22
|
borderRadius?: string;
|
|
25
23
|
boxShadow?: string;
|
|
26
|
-
position?:
|
|
27
|
-
top?: string;
|
|
28
|
-
left?: string;
|
|
29
|
-
right?: string;
|
|
30
|
-
bottom?: string;
|
|
24
|
+
position?: CSSProperties['position'];
|
|
25
|
+
top?: string | number;
|
|
26
|
+
left?: string | number;
|
|
27
|
+
right?: string | number;
|
|
28
|
+
bottom?: string | number;
|
|
31
29
|
zIndex?: number;
|
|
32
|
-
overflow?:
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
role?: string;
|
|
36
|
-
ariaLabel?: string;
|
|
37
|
-
onClick?: React.MouseEventHandler<HTMLDivElement>;
|
|
38
|
-
onMouseEnter?: React.MouseEventHandler<HTMLDivElement>;
|
|
39
|
-
onMouseLeave?: React.MouseEventHandler<HTMLDivElement>;
|
|
40
|
-
onFocus?: React.FocusEventHandler<HTMLDivElement>;
|
|
41
|
-
onBlur?: React.FocusEventHandler<HTMLDivElement>;
|
|
42
|
-
};
|
|
43
|
-
declare const View: ({ children, content, funcss, customStyle, height, width, minHeight, maxHeight, minWidth, maxWidth, padding, margin, gap, fit, display, flexDirection, justifyContent, alignItems, background, color, border, borderRadius, boxShadow, position, top, left, right, bottom, zIndex, overflow, id, title, role, ariaLabel, onClick, onMouseEnter, onMouseLeave, onFocus, onBlur, ...rest }: ViewProps) => React.JSX.Element;
|
|
30
|
+
overflow?: string;
|
|
31
|
+
}
|
|
32
|
+
declare function View(props: ViewProps): React.JSX.Element;
|
|
44
33
|
export default View;
|
package/ui/view/View.js
CHANGED
|
@@ -11,39 +11,6 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
};
|
|
12
12
|
return __assign.apply(this, arguments);
|
|
13
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 () {
|
|
31
|
-
var ownKeys = function(o) {
|
|
32
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
33
|
-
var ar = [];
|
|
34
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
35
|
-
return ar;
|
|
36
|
-
};
|
|
37
|
-
return ownKeys(o);
|
|
38
|
-
};
|
|
39
|
-
return function (mod) {
|
|
40
|
-
if (mod && mod.__esModule) return mod;
|
|
41
|
-
var result = {};
|
|
42
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
43
|
-
__setModuleDefault(result, mod);
|
|
44
|
-
return result;
|
|
45
|
-
};
|
|
46
|
-
})();
|
|
47
14
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
48
15
|
var t = {};
|
|
49
16
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -55,10 +22,15 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
55
22
|
}
|
|
56
23
|
return t;
|
|
57
24
|
};
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
var View = function (_a) {
|
|
61
|
-
var children = _a.children, content = _a.content, _b = _a.funcss, funcss = _b === void 0 ? '' : _b, _c = _a.customStyle, customStyle = _c === void 0 ? {} : _c, height = _a.height, width = _a.width, minHeight = _a.minHeight, maxHeight = _a.maxHeight, minWidth = _a.minWidth, maxWidth = _a.maxWidth, padding = _a.padding, margin = _a.margin, gap = _a.gap, fit = _a.fit, display = _a.display, flexDirection = _a.flexDirection, justifyContent = _a.justifyContent, alignItems = _a.alignItems, background = _a.background, color = _a.color, border = _a.border, borderRadius = _a.borderRadius, boxShadow = _a.boxShadow, position = _a.position, top = _a.top, left = _a.left, right = _a.right, bottom = _a.bottom, zIndex = _a.zIndex, overflow = _a.overflow, id = _a.id, title = _a.title, role = _a.role, ariaLabel = _a.ariaLabel, onClick = _a.onClick, onMouseEnter = _a.onMouseEnter, onMouseLeave = _a.onMouseLeave, onFocus = _a.onFocus, onBlur = _a.onBlur, rest = __rest(_a, ["children", "content", "funcss", "customStyle", "height", "width", "minHeight", "maxHeight", "minWidth", "maxWidth", "padding", "margin", "gap", "fit", "display", "flexDirection", "justifyContent", "alignItems", "background", "color", "border", "borderRadius", "boxShadow", "position", "top", "left", "right", "bottom", "zIndex", "overflow", "id", "title", "role", "ariaLabel", "onClick", "onMouseEnter", "onMouseLeave", "onFocus", "onBlur"]);
|
|
62
|
-
return (React.createElement("div", __assign({ id: id, title: title, role: role, "aria-label": ariaLabel, className: "".concat(fit ? 'width-100-p height-100-p' : '', " ").concat(funcss), style: __assign({ display: display, flexDirection: flexDirection, justifyContent: justifyContent, alignItems: alignItems, height: height, width: width, minHeight: minHeight, maxHeight: maxHeight, minWidth: minWidth, maxWidth: maxWidth, padding: padding, margin: margin, gap: gap, background: background, color: color, border: border, borderRadius: borderRadius, boxShadow: boxShadow, position: position, top: top, left: left, right: right, bottom: bottom, zIndex: zIndex, overflow: overflow }, customStyle), onClick: onClick, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, onFocus: onFocus, onBlur: onBlur }, rest), content || children));
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
63
27
|
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
var react_1 = __importDefault(require("react"));
|
|
30
|
+
function View(props) {
|
|
31
|
+
var children = props.children, content = props.content, _a = props.funcss, funcss = _a === void 0 ? '' : _a, _b = props.customStyle, customStyle = _b === void 0 ? {} : _b, height = props.height, width = props.width, minHeight = props.minHeight, maxHeight = props.maxHeight, minWidth = props.minWidth, maxWidth = props.maxWidth, padding = props.padding, margin = props.margin, gap = props.gap, fit = props.fit, display = props.display, flexDirection = props.flexDirection, justifyContent = props.justifyContent, alignItems = props.alignItems, bg = props.bg, borderRadius = props.borderRadius, boxShadow = props.boxShadow, position = props.position, top = props.top, left = props.left, right = props.right, bottom = props.bottom, zIndex = props.zIndex, overflow = props.overflow, rest = __rest(props, ["children", "content", "funcss", "customStyle", "height", "width", "minHeight", "maxHeight", "minWidth", "maxWidth", "padding", "margin", "gap", "fit", "display", "flexDirection", "justifyContent", "alignItems", "bg", "borderRadius", "boxShadow", "position", "top", "left", "right", "bottom", "zIndex", "overflow"]);
|
|
32
|
+
var className = "".concat(fit ? 'width-100-p height-100-p' : '', " ").concat(funcss, " ").concat(bg !== null && bg !== void 0 ? bg : '').trim();
|
|
33
|
+
var style = __assign({ display: display, flexDirection: flexDirection, justifyContent: justifyContent, alignItems: alignItems, height: height, width: width, minHeight: minHeight, maxHeight: maxHeight, minWidth: minWidth, maxWidth: maxWidth, padding: padding, margin: margin, gap: gap, borderRadius: borderRadius, boxShadow: boxShadow, position: position, top: top, left: left, right: right, bottom: bottom, zIndex: zIndex, overflow: overflow }, customStyle);
|
|
34
|
+
return (react_1.default.createElement("div", __assign({ className: className, style: style }, rest), content !== null && content !== void 0 ? content : children));
|
|
35
|
+
}
|
|
64
36
|
exports.default = View;
|
package/ui/vista/Vista.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ type VistaProps = {
|
|
|
4
4
|
pattern?: 'grid' | 'dots' | 'diagonal' | 'checkerboard' | 'horizontal' | 'vertical';
|
|
5
5
|
patternOpacity?: number;
|
|
6
6
|
reverse?: boolean;
|
|
7
|
-
|
|
7
|
+
bg?: string;
|
|
8
8
|
padding?: string;
|
|
9
9
|
textAlign?: 'left' | 'center' | 'right';
|
|
10
10
|
imgPosition?: 'top' | 'bottom';
|
|
@@ -25,6 +25,11 @@ type VistaProps = {
|
|
|
25
25
|
gradientPosition?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'center';
|
|
26
26
|
gradientSize?: string;
|
|
27
27
|
gradientColors?: string;
|
|
28
|
+
fade?: boolean;
|
|
29
|
+
fadeDirection?: 'top' | 'bottom' | 'left' | 'right';
|
|
30
|
+
fadeRadial?: boolean;
|
|
31
|
+
fadeOverlayDarken?: number;
|
|
32
|
+
backgroundImage?: string;
|
|
28
33
|
};
|
|
29
34
|
declare const Vista: React.FC<VistaProps>;
|
|
30
35
|
export default Vista;
|
package/ui/vista/Vista.js
CHANGED
|
@@ -19,11 +19,11 @@ var react_1 = __importDefault(require("react"));
|
|
|
19
19
|
var ScrollInView_1 = __importDefault(require("../ScrollInView/ScrollInView"));
|
|
20
20
|
var getCssVariable_1 = require("../../utils/getCssVariable");
|
|
21
21
|
var Vista = function (_a) {
|
|
22
|
-
var _b = _a.layout, layout = _b === void 0 ? 'imageRight' : _b, _c = _a.reverse, reverse = _c === void 0 ? false : _c, _d = _a.
|
|
22
|
+
var _b = _a.layout, layout = _b === void 0 ? 'imageRight' : _b, _c = _a.reverse, reverse = _c === void 0 ? false : _c, _d = _a.bg, bg = _d === void 0 ? '' : _d, _e = _a.padding, padding = _e === void 0 ? 'padding-lg' : _e, _f = _a.textAlign, textAlign = _f === void 0 ? 'left' : _f, _g = _a.imgPosition, imgPosition = _g === void 0 ? 'top' : _g, _h = _a.funcss, funcss = _h === void 0 ? '' : _h, _j = _a.pattern, pattern = _j === void 0 ? '' : _j, _k = _a.patternOpacity, patternOpacity = _k === void 0 ? pattern === 'grid' ? 0.15 : pattern === 'dots' ? 0.4 : pattern === 'diagonal' ? 0.2 : pattern === 'checkerboard' ? 0.2 : pattern === 'horizontal' ? 0.2 : pattern === 'vertical' ? 0.2 : 0.1 : _k, heading = _a.heading, subheading = _a.subheading, content = _a.content, image = _a.image, cta = _a.cta, _l = _a.sectionClass, sectionClass = _l === void 0 ? '' : _l, _m = _a.containerClass, containerClass = _m === void 0 ? '' : _m, _o = _a.textWrapperClass, textWrapperClass = _o === void 0 ? '' : _o, _p = _a.imageWrapperClass, imageWrapperClass = _p === void 0 ? '' : _p, children = _a.children,
|
|
23
23
|
// Gradient Props
|
|
24
24
|
_q = _a.showGradient,
|
|
25
25
|
// Gradient Props
|
|
26
|
-
showGradient = _q === void 0 ? false : _q, _r = _a.gradientPosition, gradientPosition = _r === void 0 ? 'bottom-right' : _r, _s = _a.gradientSize, gradientSize = _s === void 0 ? '300px' : _s, _t = _a.blurry, blurry = _t === void 0 ? 100 : _t, _u = _a.opacity, opacity = _u === void 0 ? 0.4 : _u, gradientColors = _a.gradientColors;
|
|
26
|
+
showGradient = _q === void 0 ? false : _q, _r = _a.gradientPosition, gradientPosition = _r === void 0 ? 'bottom-right' : _r, _s = _a.gradientSize, gradientSize = _s === void 0 ? '300px' : _s, _t = _a.blurry, blurry = _t === void 0 ? 100 : _t, _u = _a.opacity, opacity = _u === void 0 ? 0.4 : _u, gradientColors = _a.gradientColors, _v = _a.fade, fade = _v === void 0 ? false : _v, _w = _a.fadeDirection, fadeDirection = _w === void 0 ? 'bottom' : _w, _x = _a.fadeRadial, fadeRadial = _x === void 0 ? false : _x, _y = _a.fadeOverlayDarken, fadeOverlayDarken = _y === void 0 ? 0.5 : _y, _z = _a.backgroundImage, backgroundImage = _z === void 0 ? '' : _z;
|
|
27
27
|
var layoutClass = [
|
|
28
28
|
layout,
|
|
29
29
|
reverse ? 'reverse' : '',
|
|
@@ -56,7 +56,7 @@ var Vista = function (_a) {
|
|
|
56
56
|
pattern === 'diagonal' ? 'bg-pattern-diagonal' :
|
|
57
57
|
pattern === 'checkerboard' ? 'bg-pattern-checkerboard' :
|
|
58
58
|
pattern === 'horizontal' ? 'bg-pattern-horizontal' :
|
|
59
|
-
pattern === 'vertical' ? 'bg-pattern-vertical' : '', " \n ").concat(
|
|
59
|
+
pattern === 'vertical' ? 'bg-pattern-vertical' : '', " \n ").concat(bg, " ").concat(padding, " ").concat(layoutClass, " ").concat(sectionClass, " ").concat(funcss), style: { position: 'relative',
|
|
60
60
|
overflow: 'hidden',
|
|
61
61
|
backgroundImage: pattern === 'grid' ? "linear-gradient(to right, rgba(var(--borderRgb), ".concat(patternOpacity, ") 1px, transparent 1px),\n linear-gradient(to bottom, rgba(var(--borderRgb), ").concat(patternOpacity, ") 1px, transparent 1px)") :
|
|
62
62
|
pattern === 'dots' ? "radial-gradient(rgba(var(--borderRgb), ".concat(patternOpacity, ") 1px, transparent 1px)") :
|
|
@@ -74,6 +74,35 @@ var Vista = function (_a) {
|
|
|
74
74
|
TextContent)) : (react_1.default.createElement(react_1.default.Fragment, null,
|
|
75
75
|
(layout === 'imageLeft') && ImageContent,
|
|
76
76
|
TextContent,
|
|
77
|
-
(layout === 'imageRight') && ImageContent)))
|
|
77
|
+
(layout === 'imageRight') && ImageContent))),
|
|
78
|
+
fade && (react_1.default.createElement("div", { style: {
|
|
79
|
+
position: 'absolute',
|
|
80
|
+
inset: 0,
|
|
81
|
+
width: '100%',
|
|
82
|
+
height: '100%',
|
|
83
|
+
background: fadeRadial
|
|
84
|
+
? "radial-gradient(circle, transparent 0%, ".concat((0, getCssVariable_1.getCssVariableValue)(bg || 'page-bg'), " 100%)")
|
|
85
|
+
: "linear-gradient(to ".concat(fadeDirection || 'bottom', ", ").concat((0, getCssVariable_1.getCssVariableValue)(bg || 'page-bg'), " 0%, transparent 100%)"),
|
|
86
|
+
zIndex: 0,
|
|
87
|
+
pointerEvents: 'none'
|
|
88
|
+
} })),
|
|
89
|
+
backgroundImage && (react_1.default.createElement("div", { style: {
|
|
90
|
+
position: 'absolute',
|
|
91
|
+
inset: 0,
|
|
92
|
+
backgroundImage: "url(".concat(backgroundImage, ")"),
|
|
93
|
+
backgroundSize: 'cover',
|
|
94
|
+
backgroundPosition: 'center',
|
|
95
|
+
zIndex: -1,
|
|
96
|
+
width: '100%',
|
|
97
|
+
height: '100%',
|
|
98
|
+
} })),
|
|
99
|
+
backgroundImage && fadeOverlayDarken !== undefined && (react_1.default.createElement("div", { style: {
|
|
100
|
+
position: 'absolute',
|
|
101
|
+
width: '100%',
|
|
102
|
+
height: '100%',
|
|
103
|
+
inset: 0,
|
|
104
|
+
backgroundColor: "rgba(0, 0, 0, ".concat(fadeOverlayDarken, ")"),
|
|
105
|
+
zIndex: -1,
|
|
106
|
+
} })))));
|
|
78
107
|
};
|
|
79
108
|
exports.default = Vista;
|