funuicss 2.7.9 → 2.7.11
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 +238 -25
- package/index.d.ts +1 -0
- package/index.js +3 -1
- package/index.tsx +2 -1
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/ui/ScrollInView/ScrollInView.js +1 -1
- package/ui/ScrollInView/ScrollInView.tsx +1 -1
- package/ui/accordion/Accordion.d.ts +16 -2
- package/ui/accordion/Accordion.js +8 -8
- package/ui/accordion/Accordion.tsx +24 -17
- package/ui/avatar/Avatar.js +5 -4
- package/ui/avatar/Avatar.tsx +3 -1
- package/ui/button/Button.d.ts +1 -1
- package/ui/button/Button.js +1 -1
- package/ui/button/Button.tsx +3 -2
- package/ui/calendar/ActivityCard.d.ts +8 -0
- package/ui/calendar/ActivityCard.js +18 -0
- package/ui/calendar/ActivityCard.tsx +27 -0
- package/ui/calendar/Calendar.d.ts +5 -2
- package/ui/calendar/Calendar.js +119 -84
- package/ui/calendar/Calendar.tsx +211 -161
- package/ui/datepicker/DatePicker.js +4 -3
- package/ui/datepicker/DatePicker.tsx +8 -3
- package/ui/drop/Dropdown.js +17 -17
- package/ui/drop/Dropdown.tsx +31 -29
- package/ui/vista/Vista.d.ts +28 -0
- package/ui/vista/Vista.js +66 -0
- package/ui/vista/Vista.tsx +145 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type VistaProps = {
|
|
3
|
+
layout?: 'centered' | 'imageLeft' | 'imageRight' | 'stacked';
|
|
4
|
+
reverse?: boolean;
|
|
5
|
+
background?: string;
|
|
6
|
+
padding?: string;
|
|
7
|
+
textAlign?: 'left' | 'center' | 'right';
|
|
8
|
+
imgPosition?: 'top' | 'bottom';
|
|
9
|
+
funcss?: string;
|
|
10
|
+
blurry?: number;
|
|
11
|
+
opacity?: number;
|
|
12
|
+
heading?: React.ReactNode;
|
|
13
|
+
subheading?: React.ReactNode;
|
|
14
|
+
content?: React.ReactNode;
|
|
15
|
+
image?: React.ReactNode;
|
|
16
|
+
cta?: React.ReactNode;
|
|
17
|
+
sectionClass?: string;
|
|
18
|
+
containerClass?: string;
|
|
19
|
+
textWrapperClass?: string;
|
|
20
|
+
imageWrapperClass?: string;
|
|
21
|
+
children?: React.ReactNode;
|
|
22
|
+
showGradient?: boolean;
|
|
23
|
+
gradientPosition?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'center';
|
|
24
|
+
gradientSize?: string;
|
|
25
|
+
gradientColors?: string;
|
|
26
|
+
};
|
|
27
|
+
declare const Vista: React.FC<VistaProps>;
|
|
28
|
+
export default Vista;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
'use client';
|
|
3
|
+
var __assign = (this && this.__assign) || function () {
|
|
4
|
+
__assign = Object.assign || function(t) {
|
|
5
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
6
|
+
s = arguments[i];
|
|
7
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
8
|
+
t[p] = s[p];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
return __assign.apply(this, arguments);
|
|
13
|
+
};
|
|
14
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
15
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
16
|
+
};
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
var react_1 = __importDefault(require("react"));
|
|
19
|
+
var ScrollInView_1 = __importDefault(require("../ScrollInView/ScrollInView"));
|
|
20
|
+
var getCssVariable_1 = require("../../utils/getCssVariable");
|
|
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.background, background = _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, heading = _a.heading, subheading = _a.subheading, content = _a.content, image = _a.image, cta = _a.cta, _j = _a.sectionClass, sectionClass = _j === void 0 ? '' : _j, _k = _a.containerClass, containerClass = _k === void 0 ? '' : _k, _l = _a.textWrapperClass, textWrapperClass = _l === void 0 ? '' : _l, _m = _a.imageWrapperClass, imageWrapperClass = _m === void 0 ? '' : _m, children = _a.children,
|
|
23
|
+
// Gradient Props
|
|
24
|
+
_o = _a.showGradient,
|
|
25
|
+
// Gradient Props
|
|
26
|
+
showGradient = _o === void 0 ? false : _o, _p = _a.gradientPosition, gradientPosition = _p === void 0 ? 'bottom-right' : _p, _q = _a.gradientSize, gradientSize = _q === void 0 ? '300px' : _q, _r = _a.blurry, blurry = _r === void 0 ? 100 : _r, _s = _a.opacity, opacity = _s === void 0 ? 0.4 : _s, gradientColors = _a.gradientColors;
|
|
27
|
+
var layoutClass = [
|
|
28
|
+
layout,
|
|
29
|
+
reverse ? 'reverse' : '',
|
|
30
|
+
"text-".concat(textAlign),
|
|
31
|
+
]
|
|
32
|
+
.filter(Boolean)
|
|
33
|
+
.join(' ');
|
|
34
|
+
var TextContent = (react_1.default.createElement("div", { className: "vista-text ".concat(textWrapperClass) },
|
|
35
|
+
heading,
|
|
36
|
+
subheading,
|
|
37
|
+
content,
|
|
38
|
+
cta,
|
|
39
|
+
children));
|
|
40
|
+
var ImageContent = image && (react_1.default.createElement("div", { className: "vista-image ".concat(imageWrapperClass) }, image));
|
|
41
|
+
var isCentered = layout === 'centered';
|
|
42
|
+
var isStacked = layout === 'stacked';
|
|
43
|
+
var positionStyles = {
|
|
44
|
+
'top-left': { top: '-100px', left: '-100px' },
|
|
45
|
+
'top-right': { top: '-100px', right: '-100px' },
|
|
46
|
+
'bottom-left': { bottom: '-100px', left: '-100px' },
|
|
47
|
+
'bottom-right': { bottom: '-100px', right: '-100px' },
|
|
48
|
+
center: { top: '50%', left: '50%', transform: 'translate(-50%, -50%)' },
|
|
49
|
+
};
|
|
50
|
+
var primaryColor = (0, getCssVariable_1.getCssVariableValue)('--primary');
|
|
51
|
+
var secondaryColor = (0, getCssVariable_1.getCssVariableValue)('--accent');
|
|
52
|
+
var gradientStyle = __assign({ position: 'absolute', width: gradientSize, height: gradientSize, background: gradientColors || "radial-gradient(circle, ".concat(primaryColor, ", ").concat(secondaryColor, ")"), opacity: opacity, filter: "blur(".concat(blurry, "px)"), pointerEvents: 'none', zIndex: 0 }, positionStyles[gradientPosition]);
|
|
53
|
+
return (react_1.default.createElement(ScrollInView_1.default, null,
|
|
54
|
+
react_1.default.createElement("div", { className: "vista ".concat(background, " ").concat(padding, " ").concat(layoutClass, " ").concat(sectionClass, " ").concat(funcss), style: { position: 'relative', overflow: 'hidden' } },
|
|
55
|
+
showGradient && react_1.default.createElement("div", { style: gradientStyle }),
|
|
56
|
+
react_1.default.createElement("div", { className: "vista-container ".concat(containerClass), style: { position: 'relative', zIndex: 1 } }, isCentered || isStacked ? (react_1.default.createElement(react_1.default.Fragment, null,
|
|
57
|
+
(imgPosition === 'top') && ImageContent,
|
|
58
|
+
TextContent,
|
|
59
|
+
(imgPosition === 'bottom') && ImageContent)) : reverse ? (react_1.default.createElement(react_1.default.Fragment, null,
|
|
60
|
+
ImageContent,
|
|
61
|
+
TextContent)) : (react_1.default.createElement(react_1.default.Fragment, null,
|
|
62
|
+
(layout === 'imageLeft') && ImageContent,
|
|
63
|
+
TextContent,
|
|
64
|
+
(layout === 'imageRight') && ImageContent))))));
|
|
65
|
+
};
|
|
66
|
+
exports.default = Vista;
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import ScrollInView from '../ScrollInView/ScrollInView';
|
|
4
|
+
import { getCssVariableValue } from '../../utils/getCssVariable';
|
|
5
|
+
|
|
6
|
+
type VistaProps = {
|
|
7
|
+
layout?: 'centered' | 'imageLeft' | 'imageRight' | 'stacked';
|
|
8
|
+
reverse?: boolean;
|
|
9
|
+
background?: string;
|
|
10
|
+
padding?: string;
|
|
11
|
+
textAlign?: 'left' | 'center' | 'right';
|
|
12
|
+
imgPosition?: 'top' | 'bottom';
|
|
13
|
+
funcss?: string;
|
|
14
|
+
blurry?: number;
|
|
15
|
+
opacity?: number;
|
|
16
|
+
|
|
17
|
+
heading?: React.ReactNode;
|
|
18
|
+
subheading?: React.ReactNode;
|
|
19
|
+
content?: React.ReactNode;
|
|
20
|
+
image?: React.ReactNode;
|
|
21
|
+
cta?: React.ReactNode;
|
|
22
|
+
|
|
23
|
+
sectionClass?: string;
|
|
24
|
+
containerClass?: string;
|
|
25
|
+
textWrapperClass?: string;
|
|
26
|
+
imageWrapperClass?: string;
|
|
27
|
+
children?: React.ReactNode;
|
|
28
|
+
|
|
29
|
+
// New Props for Gradient Blob
|
|
30
|
+
showGradient?: boolean;
|
|
31
|
+
gradientPosition?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'center';
|
|
32
|
+
gradientSize?: string; // e.g. '300px'
|
|
33
|
+
gradientColors?: string; // e.g. 'radial-gradient(circle, #ff6ec4, #7873f5)'
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
const Vista: React.FC<VistaProps> = ({
|
|
37
|
+
layout = 'imageRight',
|
|
38
|
+
reverse = false,
|
|
39
|
+
background = '',
|
|
40
|
+
padding = 'padding-lg',
|
|
41
|
+
textAlign = 'left',
|
|
42
|
+
imgPosition = 'top',
|
|
43
|
+
funcss = '',
|
|
44
|
+
|
|
45
|
+
heading,
|
|
46
|
+
subheading,
|
|
47
|
+
content,
|
|
48
|
+
image,
|
|
49
|
+
cta,
|
|
50
|
+
|
|
51
|
+
sectionClass = '',
|
|
52
|
+
containerClass = '',
|
|
53
|
+
textWrapperClass = '',
|
|
54
|
+
imageWrapperClass = '',
|
|
55
|
+
children,
|
|
56
|
+
|
|
57
|
+
// Gradient Props
|
|
58
|
+
showGradient = false,
|
|
59
|
+
gradientPosition = 'bottom-right',
|
|
60
|
+
gradientSize = '300px',
|
|
61
|
+
blurry = 100,
|
|
62
|
+
opacity = 0.4 ,
|
|
63
|
+
gradientColors,
|
|
64
|
+
}) => {
|
|
65
|
+
const layoutClass = [
|
|
66
|
+
layout,
|
|
67
|
+
reverse ? 'reverse' : '',
|
|
68
|
+
`text-${textAlign}`,
|
|
69
|
+
]
|
|
70
|
+
.filter(Boolean)
|
|
71
|
+
.join(' ');
|
|
72
|
+
|
|
73
|
+
const TextContent = (
|
|
74
|
+
<div className={`vista-text ${textWrapperClass}`}>
|
|
75
|
+
{heading}
|
|
76
|
+
{subheading}
|
|
77
|
+
{content}
|
|
78
|
+
{cta}
|
|
79
|
+
{children}
|
|
80
|
+
</div>
|
|
81
|
+
);
|
|
82
|
+
|
|
83
|
+
const ImageContent = image && (
|
|
84
|
+
<div className={`vista-image ${imageWrapperClass}`}>{image}</div>
|
|
85
|
+
);
|
|
86
|
+
|
|
87
|
+
const isCentered = layout === 'centered';
|
|
88
|
+
const isStacked = layout === 'stacked';
|
|
89
|
+
|
|
90
|
+
const positionStyles: Record<string, React.CSSProperties> = {
|
|
91
|
+
'top-left': { top: '-100px', left: '-100px' },
|
|
92
|
+
'top-right': { top: '-100px', right: '-100px' },
|
|
93
|
+
'bottom-left': { bottom: '-100px', left: '-100px' },
|
|
94
|
+
'bottom-right': { bottom: '-100px', right: '-100px' },
|
|
95
|
+
center: { top: '50%', left: '50%', transform: 'translate(-50%, -50%)' },
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
let primaryColor = getCssVariableValue('--primary')
|
|
99
|
+
let secondaryColor = getCssVariableValue('--accent')
|
|
100
|
+
|
|
101
|
+
const gradientStyle: React.CSSProperties = {
|
|
102
|
+
position: 'absolute',
|
|
103
|
+
width: gradientSize,
|
|
104
|
+
height: gradientSize,
|
|
105
|
+
background: gradientColors || `radial-gradient(circle, ${primaryColor}, ${secondaryColor})`,
|
|
106
|
+
opacity: opacity,
|
|
107
|
+
filter: `blur(${blurry}px)`,
|
|
108
|
+
pointerEvents: 'none',
|
|
109
|
+
zIndex: 0,
|
|
110
|
+
...positionStyles[gradientPosition],
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
return (
|
|
114
|
+
<ScrollInView>
|
|
115
|
+
<div
|
|
116
|
+
className={`vista ${background} ${padding} ${layoutClass} ${sectionClass} ${funcss}`}
|
|
117
|
+
style={{ position: 'relative', overflow: 'hidden' }}
|
|
118
|
+
>
|
|
119
|
+
{showGradient && <div style={gradientStyle} />}
|
|
120
|
+
<div className={`vista-container ${containerClass}`} style={{ position: 'relative', zIndex: 1 }}>
|
|
121
|
+
{isCentered || isStacked ? (
|
|
122
|
+
<>
|
|
123
|
+
{(imgPosition === 'top') && ImageContent}
|
|
124
|
+
{TextContent}
|
|
125
|
+
{(imgPosition === 'bottom') && ImageContent}
|
|
126
|
+
</>
|
|
127
|
+
) : reverse ? (
|
|
128
|
+
<>
|
|
129
|
+
{ImageContent}
|
|
130
|
+
{TextContent}
|
|
131
|
+
</>
|
|
132
|
+
) : (
|
|
133
|
+
<>
|
|
134
|
+
{(layout === 'imageLeft') && ImageContent}
|
|
135
|
+
{TextContent}
|
|
136
|
+
{(layout === 'imageRight') && ImageContent}
|
|
137
|
+
</>
|
|
138
|
+
)}
|
|
139
|
+
</div>
|
|
140
|
+
</div>
|
|
141
|
+
</ScrollInView>
|
|
142
|
+
);
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
export default Vista;
|