funuicss 3.7.15 → 3.8.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 +560 -203
- package/demo/theme.tsx +1311 -0
- package/index.d.ts +3 -0
- package/index.js +7 -1
- package/package.json +1 -1
- package/ui/button/Button.d.ts +2 -1
- package/ui/button/Button.js +3 -3
- package/ui/components/ImageScaler.d.ts +6 -0
- package/ui/components/ImageScaler.js +17 -0
- package/ui/div/Div.d.ts +3 -1
- package/ui/div/Div.js +2 -2
- package/ui/empty/Empty.d.ts +17 -0
- package/ui/empty/Empty.js +66 -0
- package/ui/feature/Feature.d.ts +130 -0
- package/ui/feature/Feature.js +380 -0
- package/ui/flex/Flex.d.ts +2 -1
- package/ui/flex/Flex.js +3 -3
- package/ui/footer/Footer.d.ts +1 -0
- package/ui/footer/Footer.js +6 -1
- package/ui/icons/Dynamic.d.ts +12 -0
- package/ui/icons/Dynamic.js +163 -0
- package/ui/modal/Modal.d.ts +1 -1
- package/ui/products/CartModal.d.ts +20 -0
- package/ui/products/CartModal.js +85 -0
- package/ui/products/ProductCard.d.ts +13 -0
- package/ui/products/ProductCard.js +56 -0
- package/ui/products/ProductDetail.d.ts +14 -0
- package/ui/products/ProductDetail.js +249 -0
- package/ui/products/ProductDetailModal.d.ts +17 -0
- package/ui/products/ProductDetailModal.js +99 -0
- package/ui/products/Products.d.ts +60 -0
- package/ui/products/Products.js +312 -0
- package/ui/products/Store.d.ts +99 -0
- package/ui/products/Store.js +515 -0
- package/ui/sidebar/SideBar.d.ts +3 -1
- package/ui/sidebar/SideBar.js +50 -11
- package/ui/specials/Circle.d.ts +2 -1
- package/ui/specials/Circle.js +2 -2
- package/ui/table/Table.d.ts +15 -1
- package/ui/table/Table.js +143 -15
- package/ui/theme/theme.d.ts +91 -0
- package/ui/theme/theme.js +468 -25
- package/ui/vista/Vista.js +8 -12
- package/utils/Buckets.d.ts +0 -0
- package/utils/Buckets.js +1 -0
package/index.d.ts
CHANGED
|
@@ -57,6 +57,9 @@ export { default as ScrollToTop } from "./ui/scrolltotop/ScrollToTop";
|
|
|
57
57
|
export { default as Select } from "./ui/select/Select";
|
|
58
58
|
export { default as FileUpload } from "./ui/input/FileUpload";
|
|
59
59
|
export { default as Footer } from "./ui/footer/Footer";
|
|
60
|
+
export { default as Feature } from "./ui/feature/Feature";
|
|
61
|
+
export { default as Store } from "./ui/products/Store";
|
|
62
|
+
export { default as Empty } from "./ui/empty/Empty";
|
|
60
63
|
export { default as Cookie } from "./js/Cookie";
|
|
61
64
|
export { useVariable, useAsset, useAssetType, useAssetValue, useAssets, useVariables, } from "./ui/theme/theme";
|
|
62
65
|
export { FunGet } from "./js/Fun";
|
package/index.js
CHANGED
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.View = exports.ScrollInView = exports.Accordion = exports.Flex = exports.RichText = exports.Carousel = exports.Video = exports.SideBar = exports.ChartPie = exports.Lines = exports.Bars = exports.FullCenteredPage = exports.CircleGroup = exports.Circle = exports.Hr = exports.Section = exports.RowFlex = exports.Tip = exports.AppBar = exports.ToolTip = exports.Notification = exports.FunLoader = exports.ProgressBar = exports.DropMenu = exports.DropItem = exports.Dropdown = exports.DropDown = exports.DropUp = exports.UnAuthorized = exports.NotFound = exports.StepLine = exports.StepHeader = exports.Step = exports.StepContainer = exports.Div = exports.Text = exports.List = exports.Table = exports.Modal = exports.Loader = exports.SearchableInput = exports.Input = exports.Col = exports.Grid = exports.Container = exports.BreadCrumb = exports.Card = exports.Button = exports.ThemeProvider = exports.Alert = void 0;
|
|
7
|
-
exports.GoogleAnalytics = exports.FunGet = exports.useVariables = exports.useAssets = exports.useAssetValue = exports.useAssetType = exports.useAsset = exports.useVariable = exports.Cookie = exports.Footer = exports.FileUpload = exports.Select = exports.ScrollToTop = exports.FlexItem = exports.Slider = exports.Vista = exports.Calendar = exports.DatePicker = void 0;
|
|
7
|
+
exports.GoogleAnalytics = exports.FunGet = exports.useVariables = exports.useAssets = exports.useAssetValue = exports.useAssetType = exports.useAsset = exports.useVariable = exports.Cookie = exports.Empty = exports.Store = exports.Feature = exports.Footer = exports.FileUpload = exports.Select = exports.ScrollToTop = exports.FlexItem = exports.Slider = exports.Vista = exports.Calendar = exports.DatePicker = void 0;
|
|
8
8
|
var Alert_1 = require("./ui/alert/Alert");
|
|
9
9
|
Object.defineProperty(exports, "Alert", { enumerable: true, get: function () { return __importDefault(Alert_1).default; } });
|
|
10
10
|
var theme_1 = require("./ui/theme/theme");
|
|
@@ -123,6 +123,12 @@ var FileUpload_1 = require("./ui/input/FileUpload");
|
|
|
123
123
|
Object.defineProperty(exports, "FileUpload", { enumerable: true, get: function () { return __importDefault(FileUpload_1).default; } });
|
|
124
124
|
var Footer_1 = require("./ui/footer/Footer");
|
|
125
125
|
Object.defineProperty(exports, "Footer", { enumerable: true, get: function () { return __importDefault(Footer_1).default; } });
|
|
126
|
+
var Feature_1 = require("./ui/feature/Feature");
|
|
127
|
+
Object.defineProperty(exports, "Feature", { enumerable: true, get: function () { return __importDefault(Feature_1).default; } });
|
|
128
|
+
var Store_1 = require("./ui/products/Store");
|
|
129
|
+
Object.defineProperty(exports, "Store", { enumerable: true, get: function () { return __importDefault(Store_1).default; } });
|
|
130
|
+
var Empty_1 = require("./ui/empty/Empty");
|
|
131
|
+
Object.defineProperty(exports, "Empty", { enumerable: true, get: function () { return __importDefault(Empty_1).default; } });
|
|
126
132
|
// js
|
|
127
133
|
var Cookie_1 = require("./js/Cookie");
|
|
128
134
|
Object.defineProperty(exports, "Cookie", { enumerable: true, get: function () { return __importDefault(Cookie_1).default; } });
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "3.
|
|
2
|
+
"version": "3.8.0",
|
|
3
3
|
"name": "funuicss",
|
|
4
4
|
"description": "React and Next.js component UI Library for creating Easy and good looking websites with fewer lines of code. Elevate your web development experience with our cutting-edge React/Next.js component UI Library. Craft stunning websites effortlessly, boasting both seamless functionality and aesthetic appeal—all achieved with minimal lines of code. Unleash the power of simplicity and style in your projects!",
|
|
5
5
|
"main": "index.js",
|
package/ui/button/Button.d.ts
CHANGED
|
@@ -37,10 +37,11 @@ interface ButtonProps {
|
|
|
37
37
|
isLoading?: boolean;
|
|
38
38
|
variant?: string;
|
|
39
39
|
url?: string;
|
|
40
|
+
disabled?: boolean;
|
|
40
41
|
status?: 'success' | 'warning' | 'info' | 'error';
|
|
41
42
|
children?: React.ReactNode;
|
|
42
43
|
style?: React.CSSProperties;
|
|
43
44
|
onClick?: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
44
45
|
}
|
|
45
|
-
export default function Button({ variant, color, bg, funcss, startIcon, endIcon, stringPrefix, stringSuffix, prefix, suffix, iconSize, iconLineHeight, text, rounded, raised, height, width, float, hoverUp, fullWidth, outlined, small, hoverless, smaller, big, bigger, jumbo, flat, hoverNone, fillAnimation, fillDirection, fillTextColor, outlineSize, isLoading, status, bold, children, style, url, onClick, ...rest }: ButtonProps): React.JSX.Element;
|
|
46
|
+
export default function Button({ variant, color, bg, funcss, startIcon, endIcon, stringPrefix, stringSuffix, prefix, suffix, iconSize, iconLineHeight, text, rounded, raised, height, width, float, hoverUp, fullWidth, outlined, small, hoverless, smaller, big, bigger, jumbo, flat, hoverNone, fillAnimation, fillDirection, fillTextColor, outlineSize, isLoading, status, bold, children, style, url, onClick, disabled, ...rest }: ButtonProps): React.JSX.Element;
|
|
46
47
|
export {};
|
package/ui/button/Button.js
CHANGED
|
@@ -63,10 +63,10 @@ var componentUtils_1 = require("../../utils/componentUtils");
|
|
|
63
63
|
var getDynamicIcon_1 = require("../../utils/getDynamicIcon");
|
|
64
64
|
function Button(_a) {
|
|
65
65
|
var _b, _c;
|
|
66
|
-
var _d = _a.variant, variant = _d === void 0 ? '' : _d, color = _a.color, bg = _a.bg, funcss = _a.funcss, startIcon = _a.startIcon, endIcon = _a.endIcon, stringPrefix = _a.stringPrefix, stringSuffix = _a.stringSuffix, prefix = _a.prefix, suffix = _a.suffix, iconSize = _a.iconSize, _e = _a.iconLineHeight, iconLineHeight = _e === void 0 ? 0 : _e, text = _a.text, rounded = _a.rounded, raised = _a.raised, height = _a.height, width = _a.width, float = _a.float, hoverUp = _a.hoverUp, fullWidth = _a.fullWidth, outlined = _a.outlined, small = _a.small, hoverless = _a.hoverless, smaller = _a.smaller, big = _a.big, bigger = _a.bigger, jumbo = _a.jumbo, flat = _a.flat, hoverNone = _a.hoverNone, fillAnimation = _a.fillAnimation, fillDirection = _a.fillDirection, fillTextColor = _a.fillTextColor, outlineSize = _a.outlineSize, isLoading = _a.isLoading, status = _a.status, bold = _a.bold, children = _a.children, style = _a.style, url = _a.url, onClick = _a.onClick, rest = __rest(_a, ["variant", "color", "bg", "funcss", "startIcon", "endIcon", "stringPrefix", "stringSuffix", "prefix", "suffix", "iconSize", "iconLineHeight", "text", "rounded", "raised", "height", "width", "float", "hoverUp", "fullWidth", "outlined", "small", "hoverless", "smaller", "big", "bigger", "jumbo", "flat", "hoverNone", "fillAnimation", "fillDirection", "fillTextColor", "outlineSize", "isLoading", "status", "bold", "children", "style", "url", "onClick"]);
|
|
66
|
+
var _d = _a.variant, variant = _d === void 0 ? '' : _d, color = _a.color, bg = _a.bg, funcss = _a.funcss, startIcon = _a.startIcon, endIcon = _a.endIcon, stringPrefix = _a.stringPrefix, stringSuffix = _a.stringSuffix, prefix = _a.prefix, suffix = _a.suffix, iconSize = _a.iconSize, _e = _a.iconLineHeight, iconLineHeight = _e === void 0 ? 0 : _e, text = _a.text, rounded = _a.rounded, raised = _a.raised, height = _a.height, width = _a.width, float = _a.float, hoverUp = _a.hoverUp, fullWidth = _a.fullWidth, outlined = _a.outlined, small = _a.small, hoverless = _a.hoverless, smaller = _a.smaller, big = _a.big, bigger = _a.bigger, jumbo = _a.jumbo, flat = _a.flat, hoverNone = _a.hoverNone, fillAnimation = _a.fillAnimation, fillDirection = _a.fillDirection, fillTextColor = _a.fillTextColor, outlineSize = _a.outlineSize, isLoading = _a.isLoading, status = _a.status, bold = _a.bold, children = _a.children, style = _a.style, url = _a.url, onClick = _a.onClick, disabled = _a.disabled, rest = __rest(_a, ["variant", "color", "bg", "funcss", "startIcon", "endIcon", "stringPrefix", "stringSuffix", "prefix", "suffix", "iconSize", "iconLineHeight", "text", "rounded", "raised", "height", "width", "float", "hoverUp", "fullWidth", "outlined", "small", "hoverless", "smaller", "big", "bigger", "jumbo", "flat", "hoverNone", "fillAnimation", "fillDirection", "fillTextColor", "outlineSize", "isLoading", "status", "bold", "children", "style", "url", "onClick", "disabled"]);
|
|
67
67
|
var mergeWithLocal = (0, componentUtils_1.useComponentConfiguration)('Button', variant).mergeWithLocal;
|
|
68
68
|
// Create local props object - these will override config props
|
|
69
|
-
var localProps = __assign({ color: color, bg: bg, funcss: funcss, text: text, rounded: rounded, raised: raised, height: height, width: width, float: float, hoverUp: hoverUp, fullWidth: fullWidth, outlined: outlined, small: small, hoverless: hoverless, smaller: smaller, big: big, bigger: bigger, jumbo: jumbo, flat: flat, hoverNone: hoverNone, fillAnimation: fillAnimation, fillDirection: fillDirection, fillTextColor: fillTextColor, outlineSize: outlineSize, isLoading: isLoading, status: status, bold: bold, stringPrefix: stringPrefix, stringSuffix: stringSuffix }, rest);
|
|
69
|
+
var localProps = __assign({ color: color, bg: bg, funcss: funcss, text: text, rounded: rounded, raised: raised, height: height, width: width, float: float, hoverUp: hoverUp, fullWidth: fullWidth, outlined: outlined, small: small, hoverless: hoverless, smaller: smaller, big: big, bigger: bigger, jumbo: jumbo, flat: flat, hoverNone: hoverNone, fillAnimation: fillAnimation, fillDirection: fillDirection, fillTextColor: fillTextColor, disabled: disabled, outlineSize: outlineSize, isLoading: isLoading, status: status, bold: bold, stringPrefix: stringPrefix, stringSuffix: stringSuffix }, rest);
|
|
70
70
|
// Merge with config - LOCAL PROPS OVERRIDE CONFIG
|
|
71
71
|
var mergedProps = mergeWithLocal(localProps).props;
|
|
72
72
|
// Extract final values - local props take precedence
|
|
@@ -213,7 +213,7 @@ function Button(_a) {
|
|
|
213
213
|
return (react_1.default.createElement("span", { className: className, style: iconWrapperStyle }, isReactElement(icon) ? react_1.default.cloneElement(icon, { size: iconSize }) : icon));
|
|
214
214
|
};
|
|
215
215
|
return (react_1.default.createElement("span", null,
|
|
216
|
-
react_1.default.createElement("button", __assign({ className: "".concat(classNames, " ").concat((showPrefix || showSuffix || final.isLoading) ? 'iconic' : ''), style: __assign({ height: (_b = height !== null && height !== void 0 ? height : mergedProps.height) !== null && _b !== void 0 ? _b : '', width: final.fullWidth ? '100%' : (_c = width !== null && width !== void 0 ? width : mergedProps.width) !== null && _c !== void 0 ? _c : '', borderRadius: final.flat ? '0rem' : '' }, style), onClick: onClick || (url ? function () { return (window.location.href = url); } : undefined) }, mergedProps),
|
|
216
|
+
react_1.default.createElement("button", __assign({ disabled: disabled || final.isLoading || false, className: "".concat(classNames, " ").concat((showPrefix || showSuffix || final.isLoading) ? 'iconic' : ''), style: __assign({ height: (_b = height !== null && height !== void 0 ? height : mergedProps.height) !== null && _b !== void 0 ? _b : '', width: final.fullWidth ? '100%' : (_c = width !== null && width !== void 0 ? width : mergedProps.width) !== null && _c !== void 0 ? _c : '', borderRadius: final.flat ? '0rem' : '' }, style), onClick: onClick || (url ? function () { return (window.location.href = url); } : undefined) }, mergedProps),
|
|
217
217
|
final.isLoading ? (renderIcon(react_1.default.createElement(pi_1.PiSpinner, { className: "rotate" }), 'btn_left_icon')) : (react_1.default.createElement(react_1.default.Fragment, null,
|
|
218
218
|
final.status && (react_1.default.createElement("span", { className: "btn_left_icon", style: iconWrapperStyle },
|
|
219
219
|
final.status === 'success' && react_1.default.createElement(pi_1.PiCheck, { size: iconSize }),
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.default = ImageScaler;
|
|
7
|
+
var react_1 = __importDefault(require("react"));
|
|
8
|
+
function ImageScaler(_a) {
|
|
9
|
+
var _b = _a.funcss, funcss = _b === void 0 ? '' : _b, _c = _a.size, size = _c === void 0 ? "100%" : _c, _d = _a.src, src = _d === void 0 ? '' : _d;
|
|
10
|
+
return (react_1.default.createElement("div", { className: "image-scaler-container ".concat(funcss), style: {
|
|
11
|
+
maxWidth: size,
|
|
12
|
+
width: size,
|
|
13
|
+
maxHeight: size,
|
|
14
|
+
height: size,
|
|
15
|
+
} },
|
|
16
|
+
react_1.default.createElement("img", { src: src, className: "image-scaler-img", loading: "lazy", alt: "" })));
|
|
17
|
+
}
|
package/ui/div/Div.d.ts
CHANGED
|
@@ -11,9 +11,11 @@ type DivProps = {
|
|
|
11
11
|
width?: string;
|
|
12
12
|
padding?: string;
|
|
13
13
|
margin?: string;
|
|
14
|
+
id?: string;
|
|
14
15
|
fit?: boolean;
|
|
16
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
15
17
|
customStyle?: React.CSSProperties;
|
|
16
18
|
onClick?: React.MouseEventHandler<HTMLDivElement>;
|
|
17
19
|
};
|
|
18
|
-
declare const Div: ({ children, funcss, content, minHeight, maxHeight, maxWidth, minWidth, height, width, padding, margin, fit, customStyle, ...rest }: DivProps) => React.JSX.Element;
|
|
20
|
+
declare const Div: ({ children, funcss, content, minHeight, maxHeight, maxWidth, minWidth, height, width, padding, margin, id, fit, ref, customStyle, ...rest }: DivProps) => React.JSX.Element;
|
|
19
21
|
export default Div;
|
package/ui/div/Div.js
CHANGED
|
@@ -58,8 +58,8 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
58
58
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
59
59
|
var React = __importStar(require("react"));
|
|
60
60
|
var Div = function (_a) {
|
|
61
|
-
var children = _a.children, funcss = _a.funcss, content = _a.content, minHeight = _a.minHeight, maxHeight = _a.maxHeight, maxWidth = _a.maxWidth, minWidth = _a.minWidth, height = _a.height, width = _a.width, padding = _a.padding, margin = _a.margin, fit = _a.fit, customStyle = _a.customStyle, rest = __rest(_a, ["children", "funcss", "content", "minHeight", "maxHeight", "maxWidth", "minWidth", "height", "width", "padding", "margin", "fit", "customStyle"]);
|
|
61
|
+
var children = _a.children, funcss = _a.funcss, content = _a.content, minHeight = _a.minHeight, maxHeight = _a.maxHeight, maxWidth = _a.maxWidth, minWidth = _a.minWidth, height = _a.height, width = _a.width, padding = _a.padding, margin = _a.margin, id = _a.id, fit = _a.fit, ref = _a.ref, customStyle = _a.customStyle, rest = __rest(_a, ["children", "funcss", "content", "minHeight", "maxHeight", "maxWidth", "minWidth", "height", "width", "padding", "margin", "id", "fit", "ref", "customStyle"]);
|
|
62
62
|
return (React.createElement("div", null,
|
|
63
|
-
React.createElement("div", __assign({ className: "".concat(fit ? 'width-100-p height-100-p' : '', " ").concat(funcss), style: __assign({ height: height || '', maxHeight: maxHeight || '', minHeight: minHeight || '', maxWidth: maxWidth || '', minWidth: minWidth || '', width: width || '', padding: padding || '', margin: margin || '' }, customStyle) }, rest), content || children)));
|
|
63
|
+
React.createElement("div", __assign({ ref: ref, className: "".concat(fit ? 'width-100-p height-100-p' : '', " ").concat(funcss), style: __assign({ height: height || '', maxHeight: maxHeight || '', minHeight: minHeight || '', maxWidth: maxWidth || '', minWidth: minWidth || '', width: width || '', padding: padding || '', margin: margin || '' }, customStyle), id: id }, rest), content || children)));
|
|
64
64
|
};
|
|
65
65
|
exports.default = Div;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
interface EmptyProps {
|
|
3
|
+
header?: React.ReactNode;
|
|
4
|
+
title?: string;
|
|
5
|
+
titleSize?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl';
|
|
6
|
+
content?: React.ReactNode;
|
|
7
|
+
description?: string;
|
|
8
|
+
descriptionSize?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
9
|
+
action?: React.ReactNode;
|
|
10
|
+
ctaText?: string;
|
|
11
|
+
ctaIcon?: React.ReactNode;
|
|
12
|
+
ctaOnClick?: () => void;
|
|
13
|
+
ctaBg?: 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info';
|
|
14
|
+
showCta?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export default function Empty({ header, title, titleSize, content, description, descriptionSize, action, ctaText, ctaIcon, ctaOnClick, ctaBg, showCta, }: EmptyProps): React.JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,66 @@
|
|
|
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
|
+
exports.default = Empty;
|
|
41
|
+
var React = __importStar(require("react"));
|
|
42
|
+
var Button_1 = __importDefault(require("../button/Button"));
|
|
43
|
+
var pi_1 = require("react-icons/pi");
|
|
44
|
+
var Text_1 = __importDefault(require("../text/Text"));
|
|
45
|
+
var Flex_1 = __importDefault(require("../flex/Flex"));
|
|
46
|
+
function Empty(_a) {
|
|
47
|
+
var header = _a.header, _b = _a.title, title = _b === void 0 ? 'No Data Available' : _b, _c = _a.titleSize, titleSize = _c === void 0 ? 'xl' : _c, content = _a.content, _d = _a.description, description = _d === void 0 ? "There's nothing to display at the moment. Try adjusting your filters or check back later." : _d, _e = _a.descriptionSize, descriptionSize = _e === void 0 ? 'md' : _e, action = _a.action, _f = _a.ctaText, ctaText = _f === void 0 ? 'Go Back' : _f, _g = _a.ctaIcon, ctaIcon = _g === void 0 ? React.createElement(pi_1.PiArrowLeft, null) : _g, ctaOnClick = _a.ctaOnClick, _h = _a.ctaBg, ctaBg = _h === void 0 ? 'primary' : _h, _j = _a.showCta, showCta = _j === void 0 ? true : _j;
|
|
48
|
+
var handleCtaClick = function () {
|
|
49
|
+
if (ctaOnClick) {
|
|
50
|
+
ctaOnClick();
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
window.history.back();
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
return (React.createElement("div", null,
|
|
57
|
+
React.createElement("div", null,
|
|
58
|
+
React.createElement("div", { className: "central flex p-3" },
|
|
59
|
+
React.createElement("div", { className: "text-center width-600-max" },
|
|
60
|
+
React.createElement(Flex_1.default, { gap: 1, direction: "column", fit: true },
|
|
61
|
+
React.createElement("div", null, header ? (header) : (React.createElement("div", null,
|
|
62
|
+
React.createElement(Text_1.default, { text: title, size: titleSize, block: true })))),
|
|
63
|
+
React.createElement("div", { className: "article" }, content ? (content) : (React.createElement(Text_1.default, { article: true, opacity: 4, text: description, size: descriptionSize, block: true }))),
|
|
64
|
+
showCta && (React.createElement("div", null, action ? (action) : (React.createElement("div", { className: "row-flex gap", style: { justifyContent: 'center', gap: '0.4rem' } },
|
|
65
|
+
React.createElement(Button_1.default, { startIcon: ctaIcon, bg: ctaBg, onClick: handleCtaClick }, ctaText)))))))))));
|
|
66
|
+
}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type FeatureItem = {
|
|
3
|
+
icon?: string | React.ReactNode;
|
|
4
|
+
iconColor?: string;
|
|
5
|
+
iconSize?: number;
|
|
6
|
+
iconClassName?: string;
|
|
7
|
+
title?: React.ReactNode;
|
|
8
|
+
titleSize?: string;
|
|
9
|
+
titleWeight?: number;
|
|
10
|
+
titleColor?: string;
|
|
11
|
+
titleClassName?: string;
|
|
12
|
+
titleVariant?: string;
|
|
13
|
+
description?: React.ReactNode;
|
|
14
|
+
descriptionSize?: string;
|
|
15
|
+
descriptionWeight?: number;
|
|
16
|
+
descriptionColor?: string;
|
|
17
|
+
descriptionClassName?: string;
|
|
18
|
+
descriptionVariant?: string;
|
|
19
|
+
imageUrl?: string;
|
|
20
|
+
imageAlt?: string;
|
|
21
|
+
imageClassName?: string;
|
|
22
|
+
imageStyle?: React.CSSProperties;
|
|
23
|
+
content?: React.ReactNode;
|
|
24
|
+
className?: string;
|
|
25
|
+
style?: React.CSSProperties;
|
|
26
|
+
cardBg?: string;
|
|
27
|
+
cardPadding?: string;
|
|
28
|
+
cardRounded?: string;
|
|
29
|
+
cardShadow?: 'sm' | 'md' | 'lg' | 'xl' | 'none';
|
|
30
|
+
cardBorder?: boolean;
|
|
31
|
+
cardBorderColor?: string;
|
|
32
|
+
cardHoverEffect?: 'lift' | 'glow' | 'scale' | 'none';
|
|
33
|
+
ctaText?: string;
|
|
34
|
+
ctaUrl?: string;
|
|
35
|
+
ctaVariant?: 'primary' | 'secondary' | 'accent' | 'text' | 'outline';
|
|
36
|
+
ctaOnClick?: () => void;
|
|
37
|
+
ctaCss?: string;
|
|
38
|
+
ctaClassName?: string;
|
|
39
|
+
customRender?: () => React.ReactNode;
|
|
40
|
+
};
|
|
41
|
+
type FeatureProps = {
|
|
42
|
+
variant?: string;
|
|
43
|
+
layout?: 'checklist' | 'centered' | 'grid';
|
|
44
|
+
title?: React.ReactNode;
|
|
45
|
+
titleSize?: string;
|
|
46
|
+
titleWeight?: number;
|
|
47
|
+
titleColor?: string;
|
|
48
|
+
titleClassName?: string;
|
|
49
|
+
titleAlign?: 'left' | 'center' | 'right';
|
|
50
|
+
titleVariant?: string;
|
|
51
|
+
subtitle?: React.ReactNode;
|
|
52
|
+
subtitleSize?: string;
|
|
53
|
+
subtitleWeight?: number;
|
|
54
|
+
subtitleColor?: string;
|
|
55
|
+
subtitleClassName?: string;
|
|
56
|
+
subtitleVariant?: string;
|
|
57
|
+
description?: React.ReactNode;
|
|
58
|
+
descriptionSize?: string;
|
|
59
|
+
descriptionWeight?: number;
|
|
60
|
+
descriptionColor?: string;
|
|
61
|
+
descriptionClassName?: string;
|
|
62
|
+
descriptionVariant?: string;
|
|
63
|
+
features?: FeatureItem[] | string;
|
|
64
|
+
columns?: number;
|
|
65
|
+
gap?: string;
|
|
66
|
+
itemGap?: string;
|
|
67
|
+
align?: 'start' | 'center' | 'end' | 'stretch';
|
|
68
|
+
justify?: 'start' | 'center' | 'end' | 'between' | 'around';
|
|
69
|
+
wrap?: boolean;
|
|
70
|
+
bg?: string;
|
|
71
|
+
padding?: string;
|
|
72
|
+
className?: string;
|
|
73
|
+
style?: React.CSSProperties;
|
|
74
|
+
containerClassName?: string;
|
|
75
|
+
containerStyle?: React.CSSProperties;
|
|
76
|
+
cardBg?: string;
|
|
77
|
+
cardPadding?: string;
|
|
78
|
+
cardRounded?: string;
|
|
79
|
+
cardShadow?: 'sm' | 'md' | 'lg' | 'xl' | 'none';
|
|
80
|
+
cardBorder?: boolean;
|
|
81
|
+
cardBorderColor?: string;
|
|
82
|
+
cardHoverEffect?: 'lift' | 'glow' | 'scale' | 'none';
|
|
83
|
+
cardClassName?: string;
|
|
84
|
+
iconColor?: string;
|
|
85
|
+
iconSize?: number;
|
|
86
|
+
iconClassName?: string;
|
|
87
|
+
itemTitleSize?: string;
|
|
88
|
+
itemTitleWeight?: number;
|
|
89
|
+
itemTitleColor?: string;
|
|
90
|
+
itemTitleVariant?: string;
|
|
91
|
+
itemDescriptionSize?: string;
|
|
92
|
+
itemDescriptionWeight?: number;
|
|
93
|
+
itemDescriptionColor?: string;
|
|
94
|
+
itemDescriptionVariant?: string;
|
|
95
|
+
checkmarkIcon?: string;
|
|
96
|
+
checkmarkColor?: string;
|
|
97
|
+
checkmarkSize?: number;
|
|
98
|
+
checkmarkClassName?: string;
|
|
99
|
+
ctaText?: string;
|
|
100
|
+
ctaUrl?: string;
|
|
101
|
+
ctaVariant?: 'primary' | 'secondary' | 'accent' | 'text' | 'outline';
|
|
102
|
+
ctaOnClick?: () => void;
|
|
103
|
+
ctaClassName?: string;
|
|
104
|
+
ctaCss?: string;
|
|
105
|
+
ctaAlign?: 'left' | 'center' | 'right';
|
|
106
|
+
ctaStringPrefix?: string;
|
|
107
|
+
ctaStringSuffix?: string;
|
|
108
|
+
ctaStartIcon?: React.ReactNode;
|
|
109
|
+
ctaEndIcon?: React.ReactNode;
|
|
110
|
+
ctaIconSize?: number;
|
|
111
|
+
ctaIsLoading?: boolean;
|
|
112
|
+
ctaStatus?: 'success' | 'warning' | 'info' | 'error';
|
|
113
|
+
pattern?: 'grid' | 'dots' | 'diagonal' | 'none';
|
|
114
|
+
patternOpacity?: number;
|
|
115
|
+
patternColor?: string;
|
|
116
|
+
patternSize?: string;
|
|
117
|
+
fade?: boolean;
|
|
118
|
+
fadeColor?: string;
|
|
119
|
+
fadeDirection?: 'top' | 'bottom' | 'left' | 'right';
|
|
120
|
+
fadeRadial?: boolean;
|
|
121
|
+
hoverEffect?: 'lift' | 'glow' | 'scale' | 'none';
|
|
122
|
+
children?: React.ReactNode;
|
|
123
|
+
id?: string;
|
|
124
|
+
funcss?: string;
|
|
125
|
+
sectionClass?: string;
|
|
126
|
+
maxWidth?: string;
|
|
127
|
+
responsiveColumns?: string;
|
|
128
|
+
};
|
|
129
|
+
declare const Feature: React.FC<FeatureProps>;
|
|
130
|
+
export default Feature;
|