funuicss 2.7.6 → 2.7.8

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.
@@ -0,0 +1,157 @@
1
+ 'use client';
2
+ import * as React from 'react';
3
+
4
+ type ViewProps = {
5
+ children?: React.ReactNode;
6
+ content?: React.ReactNode;
7
+ funcss?: string;
8
+ customStyle?: React.CSSProperties;
9
+
10
+ // Dimensions
11
+ height?: string;
12
+ width?: string;
13
+ minHeight?: string;
14
+ maxHeight?: string;
15
+ minWidth?: string;
16
+ maxWidth?: string;
17
+
18
+ // Spacing
19
+ padding?: string;
20
+ margin?: string;
21
+ gap?: string;
22
+
23
+ // Layout & Display
24
+ fit?: boolean;
25
+ display?: React.CSSProperties['display'];
26
+ flexDirection?: React.CSSProperties['flexDirection'];
27
+ justifyContent?: React.CSSProperties['justifyContent'];
28
+ alignItems?: React.CSSProperties['alignItems'];
29
+
30
+ // Styling
31
+ background?: string;
32
+ color?: string;
33
+ border?: string;
34
+ borderRadius?: string;
35
+ boxShadow?: string;
36
+
37
+ // Positioning
38
+ position?: React.CSSProperties['position'];
39
+ top?: string;
40
+ left?: string;
41
+ right?: string;
42
+ bottom?: string;
43
+ zIndex?: number;
44
+ overflow?: React.CSSProperties['overflow'];
45
+
46
+ // Accessibility & IDs
47
+ id?: string;
48
+ title?: string;
49
+ role?: string;
50
+ ariaLabel?: string;
51
+
52
+ // Events
53
+ onClick?: React.MouseEventHandler<HTMLDivElement>;
54
+ onMouseEnter?: React.MouseEventHandler<HTMLDivElement>;
55
+ onMouseLeave?: React.MouseEventHandler<HTMLDivElement>;
56
+ onFocus?: React.FocusEventHandler<HTMLDivElement>;
57
+ onBlur?: React.FocusEventHandler<HTMLDivElement>;
58
+ };
59
+
60
+ const View = ({
61
+ children,
62
+ content,
63
+ funcss = '',
64
+ customStyle = {},
65
+
66
+ height,
67
+ width,
68
+ minHeight,
69
+ maxHeight,
70
+ minWidth,
71
+ maxWidth,
72
+
73
+ padding,
74
+ margin,
75
+ gap,
76
+
77
+ fit,
78
+ display,
79
+ flexDirection,
80
+ justifyContent,
81
+ alignItems,
82
+
83
+ background,
84
+ color,
85
+ border,
86
+ borderRadius,
87
+ boxShadow,
88
+
89
+ position,
90
+ top,
91
+ left,
92
+ right,
93
+ bottom,
94
+ zIndex,
95
+ overflow,
96
+
97
+ id,
98
+ title,
99
+ role,
100
+ ariaLabel,
101
+
102
+ onClick,
103
+ onMouseEnter,
104
+ onMouseLeave,
105
+ onFocus,
106
+ onBlur,
107
+
108
+ ...rest
109
+ }: ViewProps) => {
110
+ return (
111
+ <div
112
+ id={id}
113
+ title={title}
114
+ role={role}
115
+ aria-label={ariaLabel}
116
+ className={`${fit ? 'width-100-p height-100-p' : ''} ${funcss}`}
117
+ style={{
118
+ display,
119
+ flexDirection,
120
+ justifyContent,
121
+ alignItems,
122
+ height,
123
+ width,
124
+ minHeight,
125
+ maxHeight,
126
+ minWidth,
127
+ maxWidth,
128
+ padding,
129
+ margin,
130
+ gap,
131
+ background,
132
+ color,
133
+ border,
134
+ borderRadius,
135
+ boxShadow,
136
+ position,
137
+ top,
138
+ left,
139
+ right,
140
+ bottom,
141
+ zIndex,
142
+ overflow,
143
+ ...customStyle,
144
+ }}
145
+ onClick={onClick}
146
+ onMouseEnter={onMouseEnter}
147
+ onMouseLeave={onMouseLeave}
148
+ onFocus={onFocus}
149
+ onBlur={onBlur}
150
+ {...rest}
151
+ >
152
+ {content || children}
153
+ </div>
154
+ );
155
+ };
156
+
157
+ export default View;