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,143 @@
1
+ 'use client';
2
+ import React, { useState } from 'react';
3
+ import dayjs from 'dayjs';
4
+ import Avatar from '../avatar/Avatar';
5
+ import { PiCaretLeft, PiCaretRight, PiX, PiXCircle } from 'react-icons/pi';
6
+
7
+ interface DatePickerProps {
8
+ mode?: 'single' | 'interval';
9
+ funcss?: string;
10
+ onSelect?: (value: Date | [Date, Date]) => void;
11
+ value?: Date | [Date, Date];
12
+ className?: string;
13
+ }
14
+
15
+ type Selection = Date | [Date, Date | null] | null;
16
+
17
+ const DatePicker: React.FC<DatePickerProps> = ({
18
+ mode = 'single',
19
+ onSelect,
20
+ value,
21
+ funcss,
22
+ className = '',
23
+ }) => {
24
+ const [currentMonth, setCurrentMonth] = useState(dayjs());
25
+ const [selected, setSelected] = useState<Selection>(value || null);
26
+
27
+ const daysInMonth = currentMonth.daysInMonth();
28
+ const firstDay = currentMonth.startOf('month').day(); // 0 = Sunday
29
+
30
+ const days: (Date | null)[] = [];
31
+ for (let i = 0; i < firstDay; i++) {
32
+ days.push(null); // padding
33
+ }
34
+ for (let i = 1; i <= daysInMonth; i++) {
35
+ days.push(currentMonth.date(i).toDate());
36
+ }
37
+
38
+ const handleSelect = (date: Date) => {
39
+ if (mode === 'single') {
40
+ setSelected(date);
41
+ onSelect?.(date);
42
+ } else if (mode === 'interval') {
43
+ if (!selected || !Array.isArray(selected)) {
44
+ setSelected([date, null]);
45
+ } else {
46
+ const [start, end] = selected;
47
+ if (!end) {
48
+ const range: [Date, Date] =
49
+ dayjs(date).isBefore(dayjs(start)) ? [date, start] : [start, date];
50
+ setSelected(range);
51
+ onSelect?.(range);
52
+ } else {
53
+ setSelected([date, null]); // restart
54
+ }
55
+ }
56
+ }
57
+ };
58
+
59
+ const isSelected = (date: Date) => {
60
+ if (!selected) return false;
61
+ if (mode === 'single' && selected instanceof Date) {
62
+ return dayjs(selected).isSame(date, 'day');
63
+ }
64
+ if (Array.isArray(selected)) {
65
+ const [start, end] = selected;
66
+ if (start && end) {
67
+ return (
68
+ dayjs(date).isSame(start, 'day') ||
69
+ dayjs(date).isSame(end, 'day') ||
70
+ (dayjs(date).isAfter(start) && dayjs(date).isBefore(end))
71
+ );
72
+ }
73
+ return dayjs(date).isSame(start, 'day');
74
+ }
75
+ return false;
76
+ };
77
+
78
+ const nextMonth = () => setCurrentMonth(currentMonth.add(1, 'month'));
79
+ const prevMonth = () => setCurrentMonth(currentMonth.subtract(1, 'month'));
80
+
81
+ const handleClear = () => {
82
+ setSelected(null);
83
+ onSelect?.(mode === 'single' ? null as unknown as Date : null as unknown as [Date, Date]);
84
+ };
85
+
86
+ const formatDate = (date: Date | null | undefined) =>
87
+ date ? dayjs(date).format('MMM D, YYYY') : '...';
88
+
89
+ return (
90
+ <div className={`datepicker ${funcss} ${className}`}>
91
+ <div className="datepicker-header">
92
+ <Avatar onClick={prevMonth}><PiCaretLeft /></Avatar>
93
+ <span>{currentMonth.format('MMMM YYYY')}</span>
94
+ <Avatar onClick={nextMonth}><PiCaretRight /></Avatar>
95
+ </div>
96
+
97
+ {selected && (
98
+ <div className="datepicker-selected">
99
+ <span className="interval-display">
100
+ {mode === 'single' && selected instanceof Date && (
101
+ <>Selected: {formatDate(selected)}</>
102
+ )}
103
+ {mode === 'interval' && Array.isArray(selected) && (
104
+ <div className='text-sm'>
105
+ {selected[1]
106
+ ? `From ${formatDate(selected[0])} to ${formatDate(selected[1])}`
107
+ : `Start: ${formatDate(selected[0])} - Select end date`}
108
+ </div>
109
+ )}
110
+ </span>
111
+ <div style={{lineHeight:"0"}}>
112
+ <PiX className="clear-icon" onClick={handleClear} style={{ cursor: 'pointer' }} />
113
+ </div>
114
+ </div>
115
+ )}
116
+
117
+ <div className="datepicker-weekdays">
118
+ {['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'].map((d) => (
119
+ <div key={d}>{d}</div>
120
+ ))}
121
+ </div>
122
+
123
+ <div className="datepicker-grid">
124
+ {days.map((date, idx) => {
125
+ const isSelectedClass = date && isSelected(date) ? 'selected' : '';
126
+ const isInRangeClass =
127
+ date && isSelected(date) && Array.isArray(selected) ? 'in-range' : '';
128
+ return (
129
+ <div
130
+ key={idx}
131
+ onClick={() => date && handleSelect(date)}
132
+ className={`datepicker-day ${!date ? 'empty' : ''} ${isSelectedClass} ${isInRangeClass}`}
133
+ >
134
+ {date ? dayjs(date).date() : ''}
135
+ </div>
136
+ );
137
+ })}
138
+ </div>
139
+ </div>
140
+ );
141
+ };
142
+
143
+ export default DatePicker;
@@ -60,7 +60,7 @@ exports.default = Circle;
60
60
  var React = __importStar(require("react"));
61
61
  function Circle(_a) {
62
62
  var _b = _a.size, size = _b === void 0 ? 2 : _b, funcss = _a.funcss, bg = _a.bg, color = _a.color, children = _a.children, hoverable = _a.hoverable, raised = _a.raised, key = _a.key, onClick = _a.onClick, bordered = _a.bordered, rest = __rest(_a, ["size", "funcss", "bg", "color", "children", "hoverable", "raised", "key", "onClick", "bordered"]);
63
- return (React.createElement("div", __assign({ className: " animated fade-in ".concat(bordered ? "border" : "", " pointer avatar ").concat(funcss || '', " ").concat("text-" + (color === null || color === void 0 ? void 0 : color.trim()) || '', " ").concat(raised ? "raised" : '', " ").concat(bg || '', " ").concat(hoverable ? 'hoverable' : ''), style: {
63
+ return (React.createElement("div", __assign({ className: " animated fade-in ".concat(bordered ? "border" : "", " pointer avatar ").concat(funcss || '', " ").concat("text-" + (color === null || color === void 0 ? void 0 : color.trim()) || '', " ").concat(raised ? "raised" : '', " ").concat(bg || 'lighter', " ").concat(hoverable ? 'hoverable' : ''), style: {
64
64
  width: "".concat(size + "rem" || '2.3rem'),
65
65
  height: "".concat(size + "rem" || '2.3rem'),
66
66
  }, key: key, onClick: onClick }, rest),
@@ -32,7 +32,7 @@ export default function Circle({
32
32
  }: Circle_Props) {
33
33
  return (
34
34
  <div
35
- className={` animated fade-in ${bordered ? "border" : ""} pointer avatar ${funcss || ''} ${`text-` + color?.trim() || ''} ${raised ? "raised" : ''} ${bg || ''} ${
35
+ className={` animated fade-in ${bordered ? "border" : ""} pointer avatar ${funcss || ''} ${`text-` + color?.trim() || ''} ${raised ? "raised" : ''} ${bg || 'lighter'} ${
36
36
  hoverable ? 'hoverable' : ''
37
37
  }`}
38
38
  style={{
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  interface ThemeProviderProps {
3
- theme: 'light' | 'dark' | 'dark-blue' | 'light-gray';
3
+ theme: 'light' | 'dark' | 'dark-blue' | 'light-gray' | 'pastel-green' | 'warm-orange' | 'frosted-glass' | 'midnight-purple' | 'cyber-metal';
4
4
  children: React.ReactNode;
5
5
  }
6
6
  declare const ThemeProvider: React.FC<ThemeProviderProps>;
package/ui/theme/theme.js CHANGED
@@ -48,7 +48,7 @@ var ThemeProvider = function (_a) {
48
48
  root.style.setProperty(key, value);
49
49
  });
50
50
  // Apply darkened RGBA versions (for dark themes only)
51
- if (theme === 'dark' || theme === 'dark-blue') {
51
+ if (theme === 'dark' || theme === 'dark-blue' || theme === 'midnight-purple' || theme === 'cyber-metal') {
52
52
  themes_1.colorVarsToDarken.forEach(function (varName) {
53
53
  var original = getComputedStyle(root).getPropertyValue(varName).trim();
54
54
  if (original) {
@@ -4,7 +4,7 @@ import { colorVarsToDarken, themes } from './themes';
4
4
  import { getDarkenAmount, darkenToRgba } from './darkenUtils';
5
5
 
6
6
  interface ThemeProviderProps {
7
- theme: 'light' | 'dark' | 'dark-blue' | 'light-gray';
7
+ theme: 'light' | 'dark' | 'dark-blue' | 'light-gray' | 'pastel-green' | 'warm-orange' | 'frosted-glass' | 'midnight-purple' | 'cyber-metal';
8
8
  children: React.ReactNode;
9
9
  }
10
10
 
@@ -19,7 +19,7 @@ const ThemeProvider: React.FC<ThemeProviderProps> = ({ theme, children }) => {
19
19
  });
20
20
 
21
21
  // Apply darkened RGBA versions (for dark themes only)
22
- if (theme === 'dark' || theme === 'dark-blue') {
22
+ if (theme === 'dark' || theme === 'dark-blue' || theme === 'midnight-purple' || theme === 'cyber-metal') {
23
23
  colorVarsToDarken.forEach((varName) => {
24
24
  const original = getComputedStyle(root).getPropertyValue(varName).trim();
25
25
  if (original) {
@@ -52,6 +52,7 @@ export declare const themes: {
52
52
  '--raiseThemes': string;
53
53
  '--raiseOpaque': string;
54
54
  '--borderColor': string;
55
+ '--borderRgb': string;
55
56
  '--lighter': string;
56
57
  '--linkColor': string;
57
58
  '--cardBg': string;
@@ -84,6 +85,7 @@ export declare const themes: {
84
85
  '--raiseThemes': string;
85
86
  '--raiseOpaque': string;
86
87
  '--borderColor': string;
88
+ '--borderRgb': string;
87
89
  '--lighter': string;
88
90
  '--linkColor': string;
89
91
  '--accent': string;
@@ -97,6 +99,117 @@ export declare const themes: {
97
99
  '--raiseThemes': string;
98
100
  '--raiseOpaque': string;
99
101
  '--borderColor': string;
102
+ '--borderRgb': string;
103
+ '--lighter': string;
104
+ '--linkColor': string;
105
+ '--accent': string;
106
+ '--cardBg': string;
107
+ '--card': string;
108
+ };
109
+ 'pastel-green': {
110
+ '--page-bg': string;
111
+ '--text-color': string;
112
+ '--text-muted': string;
113
+ '--raiseThemes': string;
114
+ '--raiseOpaque': string;
115
+ '--borderColor': string;
116
+ '--borderRgb': string;
117
+ '--lighter': string;
118
+ '--linkColor': string;
119
+ '--accent': string;
120
+ '--cardBg': string;
121
+ '--card': string;
122
+ };
123
+ 'warm-orange': {
124
+ '--page-bg': string;
125
+ '--text-color': string;
126
+ '--text-muted': string;
127
+ '--raiseThemes': string;
128
+ '--raiseOpaque': string;
129
+ '--borderColor': string;
130
+ '--borderRgb': string;
131
+ '--lighter': string;
132
+ '--linkColor': string;
133
+ '--accent': string;
134
+ '--cardBg': string;
135
+ '--card': string;
136
+ };
137
+ 'frosted-glass': {
138
+ '--page-bg': string;
139
+ '--text-color': string;
140
+ '--text-muted': string;
141
+ '--raiseThemes': string;
142
+ '--raiseOpaque': string;
143
+ '--borderColor': string;
144
+ '--borderRgb': string;
145
+ '--lighter': string;
146
+ '--linkColor': string;
147
+ '--accent': string;
148
+ '--cardBg': string;
149
+ '--card': string;
150
+ };
151
+ 'midnight-purple': {
152
+ '--success50': string;
153
+ '--success100': string;
154
+ '--success200': string;
155
+ '--success300': string;
156
+ '--success400': string;
157
+ '--warning50': string;
158
+ '--warning100': string;
159
+ '--warning200': string;
160
+ '--warning300': string;
161
+ '--warning400': string;
162
+ '--info50': string;
163
+ '--info100': string;
164
+ '--info200': string;
165
+ '--info300': string;
166
+ '--info400': string;
167
+ '--error50': string;
168
+ '--error100': string;
169
+ '--error200': string;
170
+ '--error300': string;
171
+ '--error400': string;
172
+ '--page-bg': string;
173
+ '--text-color': string;
174
+ '--text-muted': string;
175
+ '--raiseThemes': string;
176
+ '--raiseOpaque': string;
177
+ '--borderColor': string;
178
+ '--borderRgb': string;
179
+ '--lighter': string;
180
+ '--linkColor': string;
181
+ '--accent': string;
182
+ '--cardBg': string;
183
+ '--card': string;
184
+ };
185
+ 'cyber-metal': {
186
+ '--success50': string;
187
+ '--success100': string;
188
+ '--success200': string;
189
+ '--success300': string;
190
+ '--success400': string;
191
+ '--warning50': string;
192
+ '--warning100': string;
193
+ '--warning200': string;
194
+ '--warning300': string;
195
+ '--warning400': string;
196
+ '--info50': string;
197
+ '--info100': string;
198
+ '--info200': string;
199
+ '--info300': string;
200
+ '--info400': string;
201
+ '--error50': string;
202
+ '--error100': string;
203
+ '--error200': string;
204
+ '--error300': string;
205
+ '--error400': string;
206
+ '--page-bg': string;
207
+ '--text-color': string;
208
+ '--text-muted': string;
209
+ '--raiseThemes': string;
210
+ '--raiseOpaque': string;
211
+ '--borderColor': string;
212
+ '--borderRgb': string;
100
213
  '--lighter': string;
101
214
  '--linkColor': string;
102
215
  '--accent': string;
@@ -45,8 +45,8 @@ exports.themes = {
45
45
  '--page-bg': '#FFFFFF',
46
46
  '--text-color': '#000000',
47
47
  },
48
- dark: __assign({ '--page-bg': '#1E1E1E', '--text-color': '#FFFFFF', '--raiseThemes': 'rgba(32, 32, 32, 0.5)', '--raiseOpaque': 'rgba(32, 32, 32, 0.8)', '--borderColor': '#4a4a4a', '--lighter': '#2a2a2a', '--linkColor': '#9ab', '--cardBg': '#1e1e1e', '--card': "4px 4px 6px #141414, -4px -4px 6px #272727" }, exports.darkerDefaults),
49
- 'dark-blue': __assign({ '--page-bg': '#0d1b2a', '--text-color': '#f0f4f8', '--text-muted': '#a9bcd0', '--raiseThemes': 'rgba(13, 27, 42, 0.5)', '--raiseOpaque': 'rgba(13, 27, 42, 0.8)', '--borderColor': '#1e3249', '--lighter': '#1b2c3f', '--linkColor': '#56ccf2', '--accent': '#66d9ef', '--cardBg': '#0d1b2a', '--card': "4px 4px 6px #08121d, -4px -4px 6px #15273b" }, exports.darkerDefaults),
48
+ dark: __assign({ '--page-bg': '#1E1E1E', '--text-color': '#FFFFFF', '--raiseThemes': 'rgba(32, 32, 32, 0.5)', '--raiseOpaque': 'rgba(32, 32, 32, 0.8)', '--borderColor': '#4a4a4a', '--borderRgb': '74, 74, 74', '--lighter': '#2a2a2a', '--linkColor': '#9ab', '--cardBg': '#1e1e1e', '--card': "4px 4px 6px #141414, -4px -4px 6px #272727" }, exports.darkerDefaults),
49
+ 'dark-blue': __assign({ '--page-bg': '#0d1b2a', '--text-color': '#f0f4f8', '--text-muted': '#a9bcd0', '--raiseThemes': 'rgba(13, 27, 42, 0.5)', '--raiseOpaque': 'rgba(13, 27, 42, 0.8)', '--borderColor': '#1e3249', '--borderRgb': '30, 50, 73', '--lighter': '#1b2c3f', '--linkColor': '#56ccf2', '--accent': '#66d9ef', '--cardBg': '#0d1b2a', '--card': "4px 4px 6px #08121d, -4px -4px 6px #15273b" }, exports.darkerDefaults),
50
50
  'light-gray': {
51
51
  '--page-bg': '#e8e8e8',
52
52
  '--text-color': '#2a2a2a',
@@ -54,10 +54,55 @@ exports.themes = {
54
54
  '--raiseThemes': 'rgba(255, 255, 255, 0.6)',
55
55
  '--raiseOpaque': 'rgba(255, 255, 255, 0.94)',
56
56
  '--borderColor': '#d0d0d0',
57
+ '--borderRgb': '208, 208, 208',
57
58
  '--lighter': '#f4f4f4',
58
59
  '--linkColor': '#202020',
59
60
  '--accent': '#4a90e2',
60
61
  '--cardBg': '#e8e8e8',
61
62
  '--card': "8px 8px 16px #c5c5c5, -8px -8px 16px #ffffff",
62
- }
63
+ },
64
+ 'pastel-green': {
65
+ '--page-bg': '#e6f5ea',
66
+ '--text-color': '#2f4f4f',
67
+ '--text-muted': '#5a7d7d',
68
+ '--raiseThemes': 'rgba(230, 245, 234, 0.6)',
69
+ '--raiseOpaque': 'rgba(230, 245, 234, 0.9)',
70
+ '--borderColor': '#b5d3c5',
71
+ '--borderRgb': '181, 211, 197',
72
+ '--lighter': '#f1faf3',
73
+ '--linkColor': '#4caf50',
74
+ '--accent': '#81c784',
75
+ '--cardBg': '#e6f5ea',
76
+ '--card': "6px 6px 12px #cde3d5, -6px -6px 12px #ffffff",
77
+ },
78
+ 'warm-orange': {
79
+ '--page-bg': '#fff3e0',
80
+ '--text-color': '#4e342e',
81
+ '--text-muted': '#8d6e63',
82
+ '--raiseThemes': 'rgba(255, 243, 224, 0.6)',
83
+ '--raiseOpaque': 'rgba(255, 243, 224, 0.94)',
84
+ '--borderColor': '#ffccbc',
85
+ '--borderRgb': '255, 204, 188',
86
+ '--lighter': '#ffecb3',
87
+ '--linkColor': '#ff7043',
88
+ '--accent': '#ff8a65',
89
+ '--cardBg': '#fff3e0',
90
+ '--card': "6px 6px 14px #e0c7b3, -6px -6px 14px #ffffff",
91
+ },
92
+ 'frosted-glass': {
93
+ '--page-bg': 'rgba(255, 255, 255, 0.75)',
94
+ '--text-color': '#111',
95
+ '--text-muted': '#666',
96
+ '--raiseThemes': 'rgba(255, 255, 255, 0.4)',
97
+ '--raiseOpaque': 'rgba(255, 255, 255, 0.9)',
98
+ '--borderColor': '#ccc',
99
+ '--borderRgb': '204, 204, 204',
100
+ '--lighter': '#fafafa',
101
+ '--linkColor': '#0099cc',
102
+ '--accent': '#00c2ff',
103
+ '--cardBg': 'rgba(255, 255, 255, 0.6)',
104
+ '--card': "4px 4px 10px rgba(0, 0, 0, 0.05), -4px -4px 10px rgba(255, 255, 255, 0.5)",
105
+ },
106
+ 'midnight-purple': __assign({ '--page-bg': '#1a1333', '--text-color': '#e0e0ff', '--text-muted': '#b39ddb', '--raiseThemes': 'rgba(26, 19, 51, 0.5)', '--raiseOpaque': 'rgba(26, 19, 51, 0.85)', '--borderColor': '#2e215c', '--borderRgb': '46, 33, 92', '--lighter': '#2f2258', '--linkColor': '#d1c4e9', '--accent': '#9575cd', '--cardBg': '#1a1333', '--card': "4px 4px 8px #120c26, -4px -4px 8px #221a40" }, exports.darkerDefaults),
107
+ 'cyber-metal': __assign({ '--page-bg': '#0f1115', '--text-color': '#d0d0d0', '--text-muted': '#888', '--raiseThemes': 'rgba(15, 17, 21, 0.4)', '--raiseOpaque': 'rgba(15, 17, 21, 0.85)', '--borderColor': '#2a2a2a', '--borderRgb': '42, 42, 42', '--lighter': '#1a1a1a', '--linkColor': '#00ffe0', '--accent': '#39ff14', '--cardBg': '#0f1115', '--card': "6px 6px 12px #050607, -6px -6px 12px #1c1f25" }, exports.darkerDefaults)
63
108
  };
@@ -43,6 +43,7 @@ export const themes = {
43
43
  '--raiseThemes': 'rgba(32, 32, 32, 0.5)',
44
44
  '--raiseOpaque': 'rgba(32, 32, 32, 0.8)',
45
45
  '--borderColor': '#4a4a4a',
46
+ '--borderRgb': '74, 74, 74',
46
47
  '--lighter': '#2a2a2a',
47
48
  '--linkColor': '#9ab',
48
49
  '--cardBg': '#1e1e1e',
@@ -56,6 +57,7 @@ export const themes = {
56
57
  '--raiseThemes': 'rgba(13, 27, 42, 0.5)',
57
58
  '--raiseOpaque': 'rgba(13, 27, 42, 0.8)',
58
59
  '--borderColor': '#1e3249',
60
+ '--borderRgb': '30, 50, 73',
59
61
  '--lighter': '#1b2c3f',
60
62
  '--linkColor': '#56ccf2',
61
63
  '--accent': '#66d9ef',
@@ -70,10 +72,83 @@ export const themes = {
70
72
  '--raiseThemes': 'rgba(255, 255, 255, 0.6)',
71
73
  '--raiseOpaque': 'rgba(255, 255, 255, 0.94)',
72
74
  '--borderColor': '#d0d0d0',
75
+ '--borderRgb': '208, 208, 208',
73
76
  '--lighter': '#f4f4f4',
74
77
  '--linkColor': '#202020',
75
78
  '--accent': '#4a90e2',
76
79
  '--cardBg': '#e8e8e8',
77
80
  '--card': `8px 8px 16px #c5c5c5, -8px -8px 16px #ffffff`,
81
+ },
82
+ 'pastel-green': {
83
+ '--page-bg': '#e6f5ea',
84
+ '--text-color': '#2f4f4f',
85
+ '--text-muted': '#5a7d7d',
86
+ '--raiseThemes': 'rgba(230, 245, 234, 0.6)',
87
+ '--raiseOpaque': 'rgba(230, 245, 234, 0.9)',
88
+ '--borderColor': '#b5d3c5',
89
+ '--borderRgb': '181, 211, 197',
90
+ '--lighter': '#f1faf3',
91
+ '--linkColor': '#4caf50',
92
+ '--accent': '#81c784',
93
+ '--cardBg': '#e6f5ea',
94
+ '--card': `6px 6px 12px #cde3d5, -6px -6px 12px #ffffff`,
95
+ },
96
+ 'warm-orange': {
97
+ '--page-bg': '#fff3e0',
98
+ '--text-color': '#4e342e',
99
+ '--text-muted': '#8d6e63',
100
+ '--raiseThemes': 'rgba(255, 243, 224, 0.6)',
101
+ '--raiseOpaque': 'rgba(255, 243, 224, 0.94)',
102
+ '--borderColor': '#ffccbc',
103
+ '--borderRgb': '255, 204, 188',
104
+ '--lighter': '#ffecb3',
105
+ '--linkColor': '#ff7043',
106
+ '--accent': '#ff8a65',
107
+ '--cardBg': '#fff3e0',
108
+ '--card': `6px 6px 14px #e0c7b3, -6px -6px 14px #ffffff`,
109
+ },
110
+ 'frosted-glass': {
111
+ '--page-bg': 'rgba(255, 255, 255, 0.75)',
112
+ '--text-color': '#111',
113
+ '--text-muted': '#666',
114
+ '--raiseThemes': 'rgba(255, 255, 255, 0.4)',
115
+ '--raiseOpaque': 'rgba(255, 255, 255, 0.9)',
116
+ '--borderColor': '#ccc',
117
+ '--borderRgb': '204, 204, 204',
118
+ '--lighter': '#fafafa',
119
+ '--linkColor': '#0099cc',
120
+ '--accent': '#00c2ff',
121
+ '--cardBg': 'rgba(255, 255, 255, 0.6)',
122
+ '--card': `4px 4px 10px rgba(0, 0, 0, 0.05), -4px -4px 10px rgba(255, 255, 255, 0.5)`,
123
+ },
124
+ 'midnight-purple': {
125
+ '--page-bg': '#1a1333',
126
+ '--text-color': '#e0e0ff',
127
+ '--text-muted': '#b39ddb',
128
+ '--raiseThemes': 'rgba(26, 19, 51, 0.5)',
129
+ '--raiseOpaque': 'rgba(26, 19, 51, 0.85)',
130
+ '--borderColor': '#2e215c',
131
+ '--borderRgb': '46, 33, 92',
132
+ '--lighter': '#2f2258',
133
+ '--linkColor': '#d1c4e9',
134
+ '--accent': '#9575cd',
135
+ '--cardBg': '#1a1333',
136
+ '--card': `4px 4px 8px #120c26, -4px -4px 8px #221a40`,
137
+ ...darkerDefaults,
138
+ },
139
+ 'cyber-metal': {
140
+ '--page-bg': '#0f1115',
141
+ '--text-color': '#d0d0d0',
142
+ '--text-muted': '#888',
143
+ '--raiseThemes': 'rgba(15, 17, 21, 0.4)',
144
+ '--raiseOpaque': 'rgba(15, 17, 21, 0.85)',
145
+ '--borderColor': '#2a2a2a',
146
+ '--borderRgb': '42, 42, 42',
147
+ '--lighter': '#1a1a1a',
148
+ '--linkColor': '#00ffe0',
149
+ '--accent': '#39ff14',
150
+ '--cardBg': '#0f1115',
151
+ '--card': `6px 6px 12px #050607, -6px -6px 12px #1c1f25`,
152
+ ...darkerDefaults,
78
153
  }
79
154
  };
@@ -0,0 +1,44 @@
1
+ import * as React from 'react';
2
+ type ViewProps = {
3
+ children?: React.ReactNode;
4
+ content?: React.ReactNode;
5
+ funcss?: string;
6
+ customStyle?: React.CSSProperties;
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;
16
+ fit?: boolean;
17
+ display?: React.CSSProperties['display'];
18
+ flexDirection?: React.CSSProperties['flexDirection'];
19
+ justifyContent?: React.CSSProperties['justifyContent'];
20
+ alignItems?: React.CSSProperties['alignItems'];
21
+ background?: string;
22
+ color?: string;
23
+ border?: string;
24
+ borderRadius?: string;
25
+ boxShadow?: string;
26
+ position?: React.CSSProperties['position'];
27
+ top?: string;
28
+ left?: string;
29
+ right?: string;
30
+ bottom?: string;
31
+ zIndex?: number;
32
+ overflow?: React.CSSProperties['overflow'];
33
+ id?: string;
34
+ title?: string;
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;
44
+ export default View;
@@ -0,0 +1,64 @@
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 __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
+ var __rest = (this && this.__rest) || function (s, e) {
48
+ var t = {};
49
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
50
+ t[p] = s[p];
51
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
52
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
53
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
54
+ t[p[i]] = s[p[i]];
55
+ }
56
+ return t;
57
+ };
58
+ Object.defineProperty(exports, "__esModule", { value: true });
59
+ var React = __importStar(require("react"));
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));
63
+ };
64
+ exports.default = View;