@orbit_ui_toolkit/orbitui-kit 0.1.0 → 0.1.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/README.md +31 -73
- package/dist/components/AppLayout/AppLayout.d.ts +10 -0
- package/dist/components/AppLayout/AppLayout.stories.d.ts +8 -0
- package/dist/components/InboxLayout/InboxLayout.d.ts +12 -0
- package/dist/components/InboxLayout/InboxLayout.stories.d.ts +6 -0
- package/dist/components/SocialLayout/SocialLayout.d.ts +10 -0
- package/dist/components/SocialLayout/SocialLayout.stories.d.ts +7 -0
- package/dist/components/TextArea/TextArea.d.ts +7 -0
- package/dist/components/TextArea/TextArea.stories.d.ts +10 -0
- package/dist/index.d.ts +4 -0
- package/dist/orbitui.cjs.js +36 -5
- package/dist/orbitui.es.js +477 -309
- package/package.json +2 -2
package/dist/orbitui.es.js
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
import G from "react";
|
|
1
|
+
import G, { useState as te } from "react";
|
|
2
2
|
var R = { exports: {} }, C = {};
|
|
3
3
|
var F;
|
|
4
|
-
function
|
|
4
|
+
function se() {
|
|
5
5
|
if (F) return C;
|
|
6
6
|
F = 1;
|
|
7
|
-
var
|
|
8
|
-
function l(t, o,
|
|
9
|
-
var
|
|
10
|
-
if (
|
|
11
|
-
|
|
12
|
-
for (var
|
|
13
|
-
|
|
14
|
-
} else
|
|
15
|
-
return o =
|
|
16
|
-
$$typeof:
|
|
7
|
+
var s = /* @__PURE__ */ Symbol.for("react.transitional.element"), n = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
8
|
+
function l(t, o, a) {
|
|
9
|
+
var d = null;
|
|
10
|
+
if (a !== void 0 && (d = "" + a), o.key !== void 0 && (d = "" + o.key), "key" in o) {
|
|
11
|
+
a = {};
|
|
12
|
+
for (var c in o)
|
|
13
|
+
c !== "key" && (a[c] = o[c]);
|
|
14
|
+
} else a = o;
|
|
15
|
+
return o = a.ref, {
|
|
16
|
+
$$typeof: s,
|
|
17
17
|
type: t,
|
|
18
|
-
key:
|
|
18
|
+
key: d,
|
|
19
19
|
ref: o !== void 0 ? o : null,
|
|
20
|
-
props:
|
|
20
|
+
props: a
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
|
-
return C.Fragment =
|
|
23
|
+
return C.Fragment = n, C.jsx = l, C.jsxs = l, C;
|
|
24
24
|
}
|
|
25
25
|
var _ = {};
|
|
26
26
|
var U;
|
|
27
|
-
function
|
|
27
|
+
function ne() {
|
|
28
28
|
return U || (U = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
29
|
-
function
|
|
30
|
-
if (
|
|
31
|
-
if (typeof
|
|
32
|
-
return
|
|
33
|
-
if (typeof
|
|
34
|
-
switch (
|
|
35
|
-
case
|
|
29
|
+
function s(r) {
|
|
30
|
+
if (r == null) return null;
|
|
31
|
+
if (typeof r == "function")
|
|
32
|
+
return r.$$typeof === K ? null : r.displayName || r.name || null;
|
|
33
|
+
if (typeof r == "string") return r;
|
|
34
|
+
switch (r) {
|
|
35
|
+
case k:
|
|
36
36
|
return "Fragment";
|
|
37
37
|
case M:
|
|
38
38
|
return "Profiler";
|
|
@@ -45,128 +45,128 @@ function se() {
|
|
|
45
45
|
case Q:
|
|
46
46
|
return "Activity";
|
|
47
47
|
}
|
|
48
|
-
if (typeof
|
|
49
|
-
switch (typeof
|
|
48
|
+
if (typeof r == "object")
|
|
49
|
+
switch (typeof r.tag == "number" && console.error(
|
|
50
50
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
51
|
-
),
|
|
52
|
-
case
|
|
51
|
+
), r.$$typeof) {
|
|
52
|
+
case N:
|
|
53
53
|
return "Portal";
|
|
54
|
-
case q:
|
|
55
|
-
return e.displayName || "Context";
|
|
56
|
-
case T:
|
|
57
|
-
return (e._context.displayName || "Context") + ".Consumer";
|
|
58
54
|
case H:
|
|
59
|
-
|
|
60
|
-
return e = e.displayName, e || (e = s.displayName || s.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
|
|
61
|
-
case X:
|
|
62
|
-
return s = e.displayName || null, s !== null ? s : n(e.type) || "Memo";
|
|
55
|
+
return r.displayName || "Context";
|
|
63
56
|
case $:
|
|
64
|
-
|
|
57
|
+
return (r._context.displayName || "Context") + ".Consumer";
|
|
58
|
+
case q:
|
|
59
|
+
var i = r.render;
|
|
60
|
+
return r = r.displayName, r || (r = i.displayName || i.name || "", r = r !== "" ? "ForwardRef(" + r + ")" : "ForwardRef"), r;
|
|
61
|
+
case X:
|
|
62
|
+
return i = r.displayName || null, i !== null ? i : s(r.type) || "Memo";
|
|
63
|
+
case T:
|
|
64
|
+
i = r._payload, r = r._init;
|
|
65
65
|
try {
|
|
66
|
-
return
|
|
66
|
+
return s(r(i));
|
|
67
67
|
} catch {
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
return null;
|
|
71
71
|
}
|
|
72
|
-
function
|
|
73
|
-
return "" +
|
|
72
|
+
function n(r) {
|
|
73
|
+
return "" + r;
|
|
74
74
|
}
|
|
75
|
-
function l(
|
|
75
|
+
function l(r) {
|
|
76
76
|
try {
|
|
77
|
-
|
|
78
|
-
var
|
|
77
|
+
n(r);
|
|
78
|
+
var i = !1;
|
|
79
79
|
} catch {
|
|
80
|
-
|
|
80
|
+
i = !0;
|
|
81
81
|
}
|
|
82
|
-
if (
|
|
83
|
-
|
|
84
|
-
var u =
|
|
82
|
+
if (i) {
|
|
83
|
+
i = console;
|
|
84
|
+
var u = i.error, x = typeof Symbol == "function" && Symbol.toStringTag && r[Symbol.toStringTag] || r.constructor.name || "Object";
|
|
85
85
|
return u.call(
|
|
86
|
-
|
|
86
|
+
i,
|
|
87
87
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
88
88
|
x
|
|
89
|
-
),
|
|
89
|
+
), n(r);
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
|
-
function t(
|
|
93
|
-
if (
|
|
94
|
-
if (typeof
|
|
92
|
+
function t(r) {
|
|
93
|
+
if (r === k) return "<>";
|
|
94
|
+
if (typeof r == "object" && r !== null && r.$$typeof === T)
|
|
95
95
|
return "<...>";
|
|
96
96
|
try {
|
|
97
|
-
var
|
|
98
|
-
return
|
|
97
|
+
var i = s(r);
|
|
98
|
+
return i ? "<" + i + ">" : "<...>";
|
|
99
99
|
} catch {
|
|
100
100
|
return "<...>";
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
function o() {
|
|
104
|
-
var
|
|
105
|
-
return
|
|
104
|
+
var r = S.A;
|
|
105
|
+
return r === null ? null : r.getOwner();
|
|
106
106
|
}
|
|
107
|
-
function
|
|
107
|
+
function a() {
|
|
108
108
|
return Error("react-stack-top-frame");
|
|
109
109
|
}
|
|
110
|
-
function
|
|
111
|
-
if (z.call(
|
|
112
|
-
var
|
|
113
|
-
if (
|
|
110
|
+
function d(r) {
|
|
111
|
+
if (z.call(r, "key")) {
|
|
112
|
+
var i = Object.getOwnPropertyDescriptor(r, "key").get;
|
|
113
|
+
if (i && i.isReactWarning) return !1;
|
|
114
114
|
}
|
|
115
|
-
return
|
|
115
|
+
return r.key !== void 0;
|
|
116
116
|
}
|
|
117
|
-
function
|
|
117
|
+
function c(r, i) {
|
|
118
118
|
function u() {
|
|
119
119
|
W || (W = !0, console.error(
|
|
120
120
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
121
|
-
|
|
121
|
+
i
|
|
122
122
|
));
|
|
123
123
|
}
|
|
124
|
-
u.isReactWarning = !0, Object.defineProperty(
|
|
124
|
+
u.isReactWarning = !0, Object.defineProperty(r, "key", {
|
|
125
125
|
get: u,
|
|
126
126
|
configurable: !0
|
|
127
127
|
});
|
|
128
128
|
}
|
|
129
|
-
function
|
|
130
|
-
var
|
|
131
|
-
return
|
|
129
|
+
function f() {
|
|
130
|
+
var r = s(this.type);
|
|
131
|
+
return I[r] || (I[r] = !0, console.error(
|
|
132
132
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
133
|
-
)),
|
|
133
|
+
)), r = this.props.ref, r !== void 0 ? r : null;
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function g(r, i, u, x, E, O) {
|
|
136
136
|
var m = u.ref;
|
|
137
|
-
return
|
|
137
|
+
return r = {
|
|
138
138
|
$$typeof: v,
|
|
139
|
-
type:
|
|
140
|
-
key:
|
|
139
|
+
type: r,
|
|
140
|
+
key: i,
|
|
141
141
|
props: u,
|
|
142
142
|
_owner: x
|
|
143
|
-
}, (m !== void 0 ? m : null) !== null ? Object.defineProperty(
|
|
143
|
+
}, (m !== void 0 ? m : null) !== null ? Object.defineProperty(r, "ref", {
|
|
144
144
|
enumerable: !1,
|
|
145
|
-
get:
|
|
146
|
-
}) : Object.defineProperty(
|
|
145
|
+
get: f
|
|
146
|
+
}) : Object.defineProperty(r, "ref", { enumerable: !1, value: null }), r._store = {}, Object.defineProperty(r._store, "validated", {
|
|
147
147
|
configurable: !1,
|
|
148
148
|
enumerable: !1,
|
|
149
149
|
writable: !0,
|
|
150
150
|
value: 0
|
|
151
|
-
}), Object.defineProperty(
|
|
151
|
+
}), Object.defineProperty(r, "_debugInfo", {
|
|
152
152
|
configurable: !1,
|
|
153
153
|
enumerable: !1,
|
|
154
154
|
writable: !0,
|
|
155
155
|
value: null
|
|
156
|
-
}), Object.defineProperty(
|
|
156
|
+
}), Object.defineProperty(r, "_debugStack", {
|
|
157
157
|
configurable: !1,
|
|
158
158
|
enumerable: !1,
|
|
159
159
|
writable: !0,
|
|
160
160
|
value: E
|
|
161
|
-
}), Object.defineProperty(
|
|
161
|
+
}), Object.defineProperty(r, "_debugTask", {
|
|
162
162
|
configurable: !1,
|
|
163
163
|
enumerable: !1,
|
|
164
164
|
writable: !0,
|
|
165
165
|
value: O
|
|
166
|
-
}), Object.freeze && (Object.freeze(
|
|
166
|
+
}), Object.freeze && (Object.freeze(r.props), Object.freeze(r)), r;
|
|
167
167
|
}
|
|
168
|
-
function
|
|
169
|
-
var m =
|
|
168
|
+
function p(r, i, u, x, E, O) {
|
|
169
|
+
var m = i.children;
|
|
170
170
|
if (m !== void 0)
|
|
171
171
|
if (x)
|
|
172
172
|
if (ee(m)) {
|
|
@@ -178,9 +178,9 @@ function se() {
|
|
|
178
178
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
179
179
|
);
|
|
180
180
|
else b(m);
|
|
181
|
-
if (z.call(
|
|
182
|
-
m =
|
|
183
|
-
var y = Object.keys(
|
|
181
|
+
if (z.call(i, "key")) {
|
|
182
|
+
m = s(r);
|
|
183
|
+
var y = Object.keys(i).filter(function(re) {
|
|
184
184
|
return re !== "key";
|
|
185
185
|
});
|
|
186
186
|
x = 0 < y.length ? "{key: someKey, " + y.join(": ..., ") + ": ...}" : "{key: someKey}", Y[m + x] || (y = 0 < y.length ? "{" + y.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
@@ -196,16 +196,16 @@ React keys must be passed directly to JSX without using spread:
|
|
|
196
196
|
m
|
|
197
197
|
), Y[m + x] = !0);
|
|
198
198
|
}
|
|
199
|
-
if (m = null, u !== void 0 && (l(u), m = "" + u),
|
|
199
|
+
if (m = null, u !== void 0 && (l(u), m = "" + u), d(i) && (l(i.key), m = "" + i.key), "key" in i) {
|
|
200
200
|
u = {};
|
|
201
|
-
for (var P in
|
|
202
|
-
P !== "key" && (u[P] =
|
|
203
|
-
} else u =
|
|
204
|
-
return m &&
|
|
201
|
+
for (var P in i)
|
|
202
|
+
P !== "key" && (u[P] = i[P]);
|
|
203
|
+
} else u = i;
|
|
204
|
+
return m && c(
|
|
205
205
|
u,
|
|
206
|
-
typeof
|
|
207
|
-
),
|
|
208
|
-
|
|
206
|
+
typeof r == "function" ? r.displayName || r.name || "Unknown" : r
|
|
207
|
+
), g(
|
|
208
|
+
r,
|
|
209
209
|
m,
|
|
210
210
|
u,
|
|
211
211
|
o(),
|
|
@@ -213,64 +213,64 @@ React keys must be passed directly to JSX without using spread:
|
|
|
213
213
|
O
|
|
214
214
|
);
|
|
215
215
|
}
|
|
216
|
-
function b(
|
|
217
|
-
j(
|
|
216
|
+
function b(r) {
|
|
217
|
+
j(r) ? r._store && (r._store.validated = 1) : typeof r == "object" && r !== null && r.$$typeof === T && (r._payload.status === "fulfilled" ? j(r._payload.value) && r._payload.value._store && (r._payload.value._store.validated = 1) : r._store && (r._store.validated = 1));
|
|
218
218
|
}
|
|
219
|
-
function j(
|
|
220
|
-
return typeof
|
|
219
|
+
function j(r) {
|
|
220
|
+
return typeof r == "object" && r !== null && r.$$typeof === v;
|
|
221
221
|
}
|
|
222
|
-
var
|
|
222
|
+
var h = G, v = /* @__PURE__ */ Symbol.for("react.transitional.element"), N = /* @__PURE__ */ Symbol.for("react.portal"), k = /* @__PURE__ */ Symbol.for("react.fragment"), L = /* @__PURE__ */ Symbol.for("react.strict_mode"), M = /* @__PURE__ */ Symbol.for("react.profiler"), $ = /* @__PURE__ */ Symbol.for("react.consumer"), H = /* @__PURE__ */ Symbol.for("react.context"), q = /* @__PURE__ */ Symbol.for("react.forward_ref"), J = /* @__PURE__ */ Symbol.for("react.suspense"), Z = /* @__PURE__ */ Symbol.for("react.suspense_list"), X = /* @__PURE__ */ Symbol.for("react.memo"), T = /* @__PURE__ */ Symbol.for("react.lazy"), Q = /* @__PURE__ */ Symbol.for("react.activity"), K = /* @__PURE__ */ Symbol.for("react.client.reference"), S = h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, z = Object.prototype.hasOwnProperty, ee = Array.isArray, A = console.createTask ? console.createTask : function() {
|
|
223
223
|
return null;
|
|
224
224
|
};
|
|
225
|
-
|
|
226
|
-
react_stack_bottom_frame: function(
|
|
227
|
-
return
|
|
225
|
+
h = {
|
|
226
|
+
react_stack_bottom_frame: function(r) {
|
|
227
|
+
return r();
|
|
228
228
|
}
|
|
229
229
|
};
|
|
230
|
-
var W,
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
)(),
|
|
234
|
-
_.Fragment =
|
|
230
|
+
var W, I = {}, B = h.react_stack_bottom_frame.bind(
|
|
231
|
+
h,
|
|
232
|
+
a
|
|
233
|
+
)(), D = A(t(a)), Y = {};
|
|
234
|
+
_.Fragment = k, _.jsx = function(r, i, u) {
|
|
235
235
|
var x = 1e4 > S.recentlyCreatedOwnerStacks++;
|
|
236
|
-
return
|
|
237
|
-
|
|
238
|
-
|
|
236
|
+
return p(
|
|
237
|
+
r,
|
|
238
|
+
i,
|
|
239
239
|
u,
|
|
240
240
|
!1,
|
|
241
|
-
x ? Error("react-stack-top-frame") :
|
|
242
|
-
x ? A(t(
|
|
241
|
+
x ? Error("react-stack-top-frame") : B,
|
|
242
|
+
x ? A(t(r)) : D
|
|
243
243
|
);
|
|
244
|
-
}, _.jsxs = function(
|
|
244
|
+
}, _.jsxs = function(r, i, u) {
|
|
245
245
|
var x = 1e4 > S.recentlyCreatedOwnerStacks++;
|
|
246
|
-
return
|
|
247
|
-
|
|
248
|
-
|
|
246
|
+
return p(
|
|
247
|
+
r,
|
|
248
|
+
i,
|
|
249
249
|
u,
|
|
250
250
|
!0,
|
|
251
|
-
x ? Error("react-stack-top-frame") :
|
|
252
|
-
x ? A(t(
|
|
251
|
+
x ? Error("react-stack-top-frame") : B,
|
|
252
|
+
x ? A(t(r)) : D
|
|
253
253
|
);
|
|
254
254
|
};
|
|
255
255
|
})()), _;
|
|
256
256
|
}
|
|
257
257
|
var V;
|
|
258
|
-
function
|
|
259
|
-
return V || (V = 1, process.env.NODE_ENV === "production" ? R.exports =
|
|
258
|
+
function oe() {
|
|
259
|
+
return V || (V = 1, process.env.NODE_ENV === "production" ? R.exports = se() : R.exports = ne()), R.exports;
|
|
260
260
|
}
|
|
261
|
-
var
|
|
261
|
+
var e = oe();
|
|
262
262
|
const w = ({
|
|
263
|
-
variant:
|
|
264
|
-
size:
|
|
263
|
+
variant: s = "primary",
|
|
264
|
+
size: n = "md",
|
|
265
265
|
rounded: l = "full",
|
|
266
266
|
isLoading: t = !1,
|
|
267
267
|
fullWidth: o = !1,
|
|
268
|
-
leftIcon:
|
|
269
|
-
rightIcon:
|
|
270
|
-
className:
|
|
271
|
-
children:
|
|
272
|
-
disabled:
|
|
273
|
-
...
|
|
268
|
+
leftIcon: a,
|
|
269
|
+
rightIcon: d,
|
|
270
|
+
className: c = "",
|
|
271
|
+
children: f,
|
|
272
|
+
disabled: g,
|
|
273
|
+
...p
|
|
274
274
|
}) => {
|
|
275
275
|
const b = "inline-flex items-center justify-center font-medium disabled:opacity-50 disabled:pointer-events-none transition-colors duration-150", j = {
|
|
276
276
|
primary: "bg-[#0070f3] text-white hover:bg-[#0060df] border border-transparent",
|
|
@@ -284,7 +284,7 @@ const w = ({
|
|
|
284
284
|
// Text only
|
|
285
285
|
ghost: "bg-transparent text-gray-700 hover:bg-gray-100 border-transparent"
|
|
286
286
|
// Transparent with hover bg
|
|
287
|
-
},
|
|
287
|
+
}, h = {
|
|
288
288
|
sm: "px-4 py-1.5 text-xs gap-1.5 min-w-[80px]",
|
|
289
289
|
md: "px-6 py-2 text-sm gap-2 min-w-[100px]",
|
|
290
290
|
lg: "px-8 py-3 text-base gap-2 min-w-[120px]",
|
|
@@ -295,36 +295,36 @@ const w = ({
|
|
|
295
295
|
md: "rounded-md",
|
|
296
296
|
lg: "rounded-lg",
|
|
297
297
|
full: "rounded-full"
|
|
298
|
-
},
|
|
299
|
-
return /* @__PURE__ */
|
|
298
|
+
}, N = o ? "w-full" : "";
|
|
299
|
+
return /* @__PURE__ */ e.jsxs(
|
|
300
300
|
"button",
|
|
301
301
|
{
|
|
302
|
-
className: `${b} ${j[
|
|
303
|
-
disabled:
|
|
304
|
-
...
|
|
302
|
+
className: `${b} ${j[s]} ${h[n]} ${v[l]} ${N} ${c}`,
|
|
303
|
+
disabled: g || t,
|
|
304
|
+
...p,
|
|
305
305
|
children: [
|
|
306
|
-
t && /* @__PURE__ */
|
|
307
|
-
/* @__PURE__ */
|
|
308
|
-
/* @__PURE__ */
|
|
306
|
+
t && /* @__PURE__ */ e.jsxs("svg", { className: "animate-spin -ml-1 mr-2 h-4 w-4", xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", children: [
|
|
307
|
+
/* @__PURE__ */ e.jsx("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }),
|
|
308
|
+
/* @__PURE__ */ e.jsx("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" })
|
|
309
309
|
] }),
|
|
310
|
-
!t &&
|
|
311
|
-
/* @__PURE__ */
|
|
312
|
-
!t &&
|
|
310
|
+
!t && a && /* @__PURE__ */ e.jsx("span", { className: "shrink-0", children: a }),
|
|
311
|
+
/* @__PURE__ */ e.jsx("span", { className: "truncate", children: t ? "Loading..." : f }),
|
|
312
|
+
!t && d && /* @__PURE__ */ e.jsx("span", { className: "shrink-0", children: d })
|
|
313
313
|
]
|
|
314
314
|
}
|
|
315
315
|
);
|
|
316
|
-
},
|
|
317
|
-
label:
|
|
318
|
-
error:
|
|
316
|
+
}, de = ({
|
|
317
|
+
label: s,
|
|
318
|
+
error: n,
|
|
319
319
|
leftIcon: l,
|
|
320
320
|
rightIcon: t,
|
|
321
321
|
className: o = "",
|
|
322
|
-
...
|
|
323
|
-
}) => /* @__PURE__ */
|
|
324
|
-
|
|
325
|
-
/* @__PURE__ */
|
|
326
|
-
l && /* @__PURE__ */
|
|
327
|
-
/* @__PURE__ */
|
|
322
|
+
...a
|
|
323
|
+
}) => /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-1.5 w-full", children: [
|
|
324
|
+
s && /* @__PURE__ */ e.jsx("label", { className: "text-sm font-medium text-gray-700", children: s }),
|
|
325
|
+
/* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
|
|
326
|
+
l && /* @__PURE__ */ e.jsx("div", { className: "absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none text-gray-400", children: l }),
|
|
327
|
+
/* @__PURE__ */ e.jsx(
|
|
328
328
|
"input",
|
|
329
329
|
{
|
|
330
330
|
className: `
|
|
@@ -334,53 +334,53 @@ const w = ({
|
|
|
334
334
|
py-2
|
|
335
335
|
bg-white
|
|
336
336
|
border
|
|
337
|
-
${
|
|
337
|
+
${n ? "border-red-500" : "border-gray-300"}
|
|
338
338
|
rounded-md
|
|
339
339
|
shadow-sm
|
|
340
340
|
focus:outline-none
|
|
341
341
|
focus:ring-2
|
|
342
|
-
${
|
|
342
|
+
${n ? "focus:ring-red-500" : "focus:ring-blue-500"}
|
|
343
343
|
focus:border-transparent
|
|
344
344
|
transition-all
|
|
345
345
|
duration-200
|
|
346
346
|
hover:border-gray-400
|
|
347
347
|
${o}
|
|
348
348
|
`,
|
|
349
|
-
...
|
|
349
|
+
...a
|
|
350
350
|
}
|
|
351
351
|
),
|
|
352
|
-
t && /* @__PURE__ */
|
|
352
|
+
t && /* @__PURE__ */ e.jsx("div", { className: "absolute inset-y-0 right-0 pr-3 flex items-center text-gray-400", children: t })
|
|
353
353
|
] }),
|
|
354
|
-
|
|
355
|
-
] }),
|
|
356
|
-
title:
|
|
357
|
-
subtitle:
|
|
354
|
+
n && /* @__PURE__ */ e.jsx("span", { className: "text-xs text-red-500", children: n })
|
|
355
|
+
] }), ue = ({
|
|
356
|
+
title: s,
|
|
357
|
+
subtitle: n,
|
|
358
358
|
children: l,
|
|
359
359
|
footer: t,
|
|
360
360
|
className: o = ""
|
|
361
|
-
}) => /* @__PURE__ */
|
|
362
|
-
(
|
|
363
|
-
|
|
364
|
-
|
|
361
|
+
}) => /* @__PURE__ */ e.jsxs("div", { className: `bg-white rounded-xl border border-gray-200 shadow-sm overflow-hidden ${o}`, children: [
|
|
362
|
+
(s || n) && /* @__PURE__ */ e.jsxs("div", { className: "px-6 py-4 border-b border-gray-100", children: [
|
|
363
|
+
s && /* @__PURE__ */ e.jsx("h3", { className: "text-lg font-semibold text-gray-900", children: s }),
|
|
364
|
+
n && /* @__PURE__ */ e.jsx("p", { className: "text-sm text-gray-500 mt-1", children: n })
|
|
365
365
|
] }),
|
|
366
|
-
/* @__PURE__ */
|
|
367
|
-
t && /* @__PURE__ */
|
|
368
|
-
] }),
|
|
369
|
-
username:
|
|
370
|
-
profilePic:
|
|
366
|
+
/* @__PURE__ */ e.jsx("div", { className: "px-6 py-4", children: l }),
|
|
367
|
+
t && /* @__PURE__ */ e.jsx("div", { className: "px-6 py-4 bg-gray-50 border-t border-gray-100", children: t })
|
|
368
|
+
] }), xe = ({
|
|
369
|
+
username: s,
|
|
370
|
+
profilePic: n,
|
|
371
371
|
postImage: l,
|
|
372
372
|
likesCount: t,
|
|
373
373
|
caption: o,
|
|
374
|
-
location:
|
|
375
|
-
isLiked:
|
|
376
|
-
isBookmarked:
|
|
377
|
-
onLike:
|
|
378
|
-
onComment:
|
|
379
|
-
onShare:
|
|
374
|
+
location: a,
|
|
375
|
+
isLiked: d = !1,
|
|
376
|
+
isBookmarked: c = !1,
|
|
377
|
+
onLike: f,
|
|
378
|
+
onComment: g,
|
|
379
|
+
onShare: p,
|
|
380
380
|
onBookmark: b
|
|
381
|
-
}) => /* @__PURE__ */
|
|
382
|
-
/* @__PURE__ */
|
|
383
|
-
/* @__PURE__ */
|
|
381
|
+
}) => /* @__PURE__ */ e.jsxs("div", { className: "group relative max-w-[420px] mx-auto bg-white rounded-3xl overflow-hidden shadow-sm hover:shadow-xl transition-all duration-300 border border-gray-100/50", children: [
|
|
382
|
+
/* @__PURE__ */ e.jsxs("div", { className: "relative w-full aspect-4/5 bg-gray-100 overflow-hidden", children: [
|
|
383
|
+
/* @__PURE__ */ e.jsx(
|
|
384
384
|
"img",
|
|
385
385
|
{
|
|
386
386
|
src: l,
|
|
@@ -388,97 +388,97 @@ const w = ({
|
|
|
388
388
|
className: "w-full h-full object-cover transition-transform duration-700 group-hover:scale-105"
|
|
389
389
|
}
|
|
390
390
|
),
|
|
391
|
-
/* @__PURE__ */
|
|
391
|
+
/* @__PURE__ */ e.jsx("div", { className: "absolute top-4 right-4 opacity-0 group-hover:opacity-100 transition-opacity", children: /* @__PURE__ */ e.jsx(
|
|
392
392
|
w,
|
|
393
393
|
{
|
|
394
394
|
variant: "ghost",
|
|
395
395
|
size: "icon",
|
|
396
396
|
rounded: "full",
|
|
397
397
|
className: "bg-black/20 backdrop-blur-md text-white hover:bg-black/40 border-none",
|
|
398
|
-
children: /* @__PURE__ */
|
|
399
|
-
/* @__PURE__ */
|
|
400
|
-
/* @__PURE__ */
|
|
401
|
-
/* @__PURE__ */
|
|
398
|
+
children: /* @__PURE__ */ e.jsxs("svg", { "aria-label": "More options", fill: "currentColor", height: "24", role: "img", viewBox: "0 0 24 24", width: "24", children: [
|
|
399
|
+
/* @__PURE__ */ e.jsx("circle", { cx: "12", cy: "12", r: "1.5" }),
|
|
400
|
+
/* @__PURE__ */ e.jsx("circle", { cx: "6", cy: "12", r: "1.5" }),
|
|
401
|
+
/* @__PURE__ */ e.jsx("circle", { cx: "18", cy: "12", r: "1.5" })
|
|
402
402
|
] })
|
|
403
403
|
}
|
|
404
404
|
) })
|
|
405
405
|
] }),
|
|
406
|
-
/* @__PURE__ */
|
|
407
|
-
/* @__PURE__ */
|
|
408
|
-
/* @__PURE__ */
|
|
409
|
-
/* @__PURE__ */
|
|
406
|
+
/* @__PURE__ */ e.jsxs("div", { className: "p-5", children: [
|
|
407
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between mb-4", children: [
|
|
408
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
409
|
+
/* @__PURE__ */ e.jsx("div", { className: "relative", children: /* @__PURE__ */ e.jsx(
|
|
410
410
|
"img",
|
|
411
411
|
{
|
|
412
|
-
src:
|
|
413
|
-
alt:
|
|
412
|
+
src: n,
|
|
413
|
+
alt: s,
|
|
414
414
|
className: "w-10 h-10 rounded-full object-cover ring-2 ring-offset-2 ring-indigo-500"
|
|
415
415
|
}
|
|
416
416
|
) }),
|
|
417
|
-
/* @__PURE__ */
|
|
418
|
-
/* @__PURE__ */
|
|
419
|
-
|
|
417
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col", children: [
|
|
418
|
+
/* @__PURE__ */ e.jsx("span", { className: "font-bold text-gray-900 text-sm leading-tight hover:text-indigo-600 cursor-pointer transition-colors", children: s }),
|
|
419
|
+
a && /* @__PURE__ */ e.jsx("span", { className: "text-[11px] font-medium text-gray-400 uppercase tracking-wide", children: a })
|
|
420
420
|
] })
|
|
421
421
|
] }),
|
|
422
|
-
/* @__PURE__ */
|
|
423
|
-
/* @__PURE__ */
|
|
422
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
423
|
+
/* @__PURE__ */ e.jsx(
|
|
424
424
|
w,
|
|
425
425
|
{
|
|
426
426
|
variant: "ghost",
|
|
427
427
|
size: "icon",
|
|
428
428
|
rounded: "full",
|
|
429
|
-
onClick:
|
|
430
|
-
className: `transition-colors ${
|
|
431
|
-
children:
|
|
429
|
+
onClick: f,
|
|
430
|
+
className: `transition-colors ${d ? "text-rose-500 hover:bg-rose-50" : "text-gray-400 hover:text-rose-500"}`,
|
|
431
|
+
children: d ? /* @__PURE__ */ e.jsx("svg", { "aria-label": "Unlike", fill: "currentColor", height: "26", role: "img", viewBox: "0 0 48 48", width: "26", children: /* @__PURE__ */ e.jsx("path", { d: "M34.6 3.1c-4.5 0-7.9 1.8-10.6 5.6-2.7-3.7-6.1-5.5-10.6-5.5C6 3.1 0 9.6 0 17.6c0 14.9 17.8 29.1 23.9 30.2h.2c6.1-1.1 23.9-15.3 23.9-30.2 0-8-6-14.5-13.4-14.5z" }) }) : /* @__PURE__ */ e.jsx("svg", { "aria-label": "Like", fill: "currentColor", height: "26", role: "img", viewBox: "0 0 24 24", width: "26", children: /* @__PURE__ */ e.jsx("path", { d: "M16.792 3.904A4.989 4.989 0 0 1 21.5 9.122c0 3.072-2.652 4.959-5.197 7.222-2.512 2.243-3.865 3.469-4.303 3.752-.477-.309-2.143-1.823-4.303-3.752C5.141 14.072 2.5 12.194 2.5 9.122a4.989 4.989 0 0 1 4.708-5.218 4.21 4.21 0 0 1 3.675 1.941c.252.342.392.545.517.545s.265-.203.517-.545a4.21 4.21 0 0 1 3.675-1.941m0-2a6.21 6.21 0 0 0-5.292 2.768 6.21 6.21 0 0 0-5.292-2.768 6.989 6.989 0 0 0-6.708 7.218c0 4.19 2.923 6.64 5.642 9.066 2.057 1.838 4.19 3.744 5.358 5.485.474-.707 2.112-2.298 5.358-5.188 2.308-2.053 5.358-4.706 5.358-9.363a6.989 6.989 0 0 0-6.708-7.218Z" }) })
|
|
432
432
|
}
|
|
433
433
|
),
|
|
434
|
-
/* @__PURE__ */
|
|
434
|
+
/* @__PURE__ */ e.jsx(
|
|
435
435
|
w,
|
|
436
436
|
{
|
|
437
437
|
variant: "ghost",
|
|
438
438
|
size: "icon",
|
|
439
439
|
rounded: "full",
|
|
440
|
-
onClick:
|
|
440
|
+
onClick: g,
|
|
441
441
|
className: "text-gray-400 hover:text-indigo-500",
|
|
442
|
-
children: /* @__PURE__ */
|
|
442
|
+
children: /* @__PURE__ */ e.jsx("svg", { "aria-label": "Comment", fill: "currentColor", height: "26", role: "img", viewBox: "0 0 24 24", width: "26", children: /* @__PURE__ */ e.jsx("path", { d: "M20.656 17.008a9.993 9.993 0 1 0-3.59 3.615L22 22Z", fill: "none", stroke: "currentColor", strokeLinejoin: "round", strokeWidth: "2" }) })
|
|
443
443
|
}
|
|
444
444
|
),
|
|
445
|
-
/* @__PURE__ */
|
|
445
|
+
/* @__PURE__ */ e.jsx(
|
|
446
446
|
w,
|
|
447
447
|
{
|
|
448
448
|
variant: "ghost",
|
|
449
449
|
size: "icon",
|
|
450
450
|
rounded: "full",
|
|
451
|
-
onClick:
|
|
451
|
+
onClick: p,
|
|
452
452
|
className: "text-gray-400 hover:text-indigo-500",
|
|
453
|
-
children: /* @__PURE__ */
|
|
454
|
-
/* @__PURE__ */
|
|
455
|
-
/* @__PURE__ */
|
|
453
|
+
children: /* @__PURE__ */ e.jsxs("svg", { "aria-label": "Share Post", fill: "currentColor", height: "26", role: "img", viewBox: "0 0 24 24", width: "26", children: [
|
|
454
|
+
/* @__PURE__ */ e.jsx("line", { fill: "none", stroke: "currentColor", strokeLinejoin: "round", strokeWidth: "2", x1: "22", x2: "9.218", y1: "3", y2: "10.083" }),
|
|
455
|
+
/* @__PURE__ */ e.jsx("polygon", { fill: "none", points: "11.698 20.334 22 3.001 2 3.001 9.218 10.084 11.698 20.334", stroke: "currentColor", strokeLinejoin: "round", strokeWidth: "2" })
|
|
456
456
|
] })
|
|
457
457
|
}
|
|
458
458
|
)
|
|
459
459
|
] })
|
|
460
460
|
] }),
|
|
461
|
-
/* @__PURE__ */
|
|
462
|
-
/* @__PURE__ */
|
|
463
|
-
/* @__PURE__ */
|
|
464
|
-
/* @__PURE__ */
|
|
461
|
+
/* @__PURE__ */ e.jsxs("div", { className: "space-y-3", children: [
|
|
462
|
+
/* @__PURE__ */ e.jsx("p", { className: "text-gray-800 text-sm leading-relaxed", children: o }),
|
|
463
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between pt-2 border-t border-gray-50", children: [
|
|
464
|
+
/* @__PURE__ */ e.jsxs("span", { className: "font-semibold text-xs text-gray-500", children: [
|
|
465
465
|
t.toLocaleString(),
|
|
466
466
|
" Likes"
|
|
467
467
|
] }),
|
|
468
|
-
/* @__PURE__ */
|
|
468
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-3", children: /* @__PURE__ */ e.jsx(
|
|
469
469
|
w,
|
|
470
470
|
{
|
|
471
471
|
variant: "ghost",
|
|
472
472
|
size: "icon",
|
|
473
473
|
rounded: "full",
|
|
474
474
|
onClick: b,
|
|
475
|
-
className: `transition-colors ${
|
|
476
|
-
children:
|
|
475
|
+
className: `transition-colors ${c ? "text-gray-900" : "text-gray-400 hover:text-gray-900"}`,
|
|
476
|
+
children: c ? /* @__PURE__ */ e.jsx("svg", { "aria-label": "Remove", fill: "currentColor", height: "22", role: "img", viewBox: "0 0 24 24", width: "22", children: /* @__PURE__ */ e.jsx("path", { d: "M20 22a.999.999 0 0 1-.687-.273L12 14.89l-7.313 6.837A1 1 0 0 1 3 21V3a1 1 0 0 1 1-1h16a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1Z" }) }) : /* @__PURE__ */ e.jsx("svg", { "aria-label": "Save", fill: "currentColor", height: "22", role: "img", viewBox: "0 0 24 24", width: "22", children: /* @__PURE__ */ e.jsx("path", { d: "M20 22a.999.999 0 0 1-.687-.273L12 14.89l-7.313 6.837A1 1 0 0 1 3 21V3a1 1 0 0 1 1-1h16a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1Z", fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2" }) })
|
|
477
477
|
}
|
|
478
478
|
) })
|
|
479
479
|
] }),
|
|
480
|
-
/* @__PURE__ */
|
|
481
|
-
/* @__PURE__ */
|
|
480
|
+
/* @__PURE__ */ e.jsxs("div", { className: "relative mt-2", children: [
|
|
481
|
+
/* @__PURE__ */ e.jsx(
|
|
482
482
|
"input",
|
|
483
483
|
{
|
|
484
484
|
type: "text",
|
|
@@ -486,148 +486,148 @@ const w = ({
|
|
|
486
486
|
className: "w-full text-xs text-gray-600 bg-gray-50 rounded-full px-3 py-2 outline-none focus:ring-1 focus:ring-indigo-200 transition-all"
|
|
487
487
|
}
|
|
488
488
|
),
|
|
489
|
-
/* @__PURE__ */
|
|
489
|
+
/* @__PURE__ */ e.jsx("div", { className: "absolute right-2 top-1/2 -translate-y-1/2", children: /* @__PURE__ */ e.jsx(w, { variant: "ghost", size: "sm", className: "text-indigo-500 font-bold px-2 py-0 h-auto hover:bg-transparent hover:text-indigo-700 min-w-0", children: "Post" }) })
|
|
490
490
|
] })
|
|
491
491
|
] })
|
|
492
492
|
] })
|
|
493
|
-
] }),
|
|
494
|
-
variant:
|
|
495
|
-
size:
|
|
493
|
+
] }), me = ({
|
|
494
|
+
variant: s = "spinner",
|
|
495
|
+
size: n = "md",
|
|
496
496
|
className: l = "",
|
|
497
497
|
color: t,
|
|
498
498
|
colors: o
|
|
499
499
|
}) => {
|
|
500
|
-
const
|
|
500
|
+
const a = {
|
|
501
501
|
sm: "w-4 h-4",
|
|
502
502
|
md: "w-8 h-8",
|
|
503
503
|
lg: "w-12 h-12",
|
|
504
504
|
xl: "w-16 h-16"
|
|
505
|
-
},
|
|
505
|
+
}, d = {
|
|
506
506
|
sm: "w-1 h-1",
|
|
507
507
|
md: "w-2 h-2",
|
|
508
508
|
lg: "w-3 h-3",
|
|
509
509
|
xl: "w-4 h-4"
|
|
510
|
-
},
|
|
511
|
-
if (
|
|
512
|
-
const
|
|
513
|
-
if (!
|
|
514
|
-
const v = o?.[
|
|
510
|
+
}, c = a[n], f = "bg-gradient-to-tr from-yellow-400 via-red-500 to-purple-600";
|
|
511
|
+
if (s === "dots") {
|
|
512
|
+
const g = d[n], p = !!t || !!o?.length, b = (h) => {
|
|
513
|
+
if (!p) return {};
|
|
514
|
+
const v = o?.[h] || t;
|
|
515
515
|
return v ? { backgroundColor: v } : {};
|
|
516
|
-
}, j = () =>
|
|
517
|
-
return /* @__PURE__ */
|
|
516
|
+
}, j = () => p ? "" : f;
|
|
517
|
+
return /* @__PURE__ */ e.jsx("div", { className: `flex items-center justify-center gap-1 ${l}`, children: [0, 1, 2].map((h) => /* @__PURE__ */ e.jsx(
|
|
518
518
|
"div",
|
|
519
519
|
{
|
|
520
|
-
className: `${
|
|
520
|
+
className: `${g} rounded-full animate-bounce ${j()}`,
|
|
521
521
|
style: {
|
|
522
|
-
...b(
|
|
523
|
-
animationDelay:
|
|
522
|
+
...b(h),
|
|
523
|
+
animationDelay: h === 0 ? "-0.3s" : h === 1 ? "-0.15s" : "0s"
|
|
524
524
|
}
|
|
525
525
|
},
|
|
526
|
-
|
|
526
|
+
h
|
|
527
527
|
)) });
|
|
528
528
|
}
|
|
529
|
-
if (
|
|
530
|
-
const
|
|
531
|
-
return /* @__PURE__ */
|
|
532
|
-
/* @__PURE__ */
|
|
529
|
+
if (s === "pulse") {
|
|
530
|
+
const g = t ? "" : f;
|
|
531
|
+
return /* @__PURE__ */ e.jsxs("div", { className: `relative flex items-center justify-center ${c} ${l}`, children: [
|
|
532
|
+
/* @__PURE__ */ e.jsx(
|
|
533
533
|
"span",
|
|
534
534
|
{
|
|
535
|
-
className: `absolute inline-flex h-full w-full rounded-full opacity-75 animate-ping ${
|
|
535
|
+
className: `absolute inline-flex h-full w-full rounded-full opacity-75 animate-ping ${g}`,
|
|
536
536
|
style: t ? { backgroundColor: t } : {}
|
|
537
537
|
}
|
|
538
538
|
),
|
|
539
|
-
/* @__PURE__ */
|
|
539
|
+
/* @__PURE__ */ e.jsx(
|
|
540
540
|
"span",
|
|
541
541
|
{
|
|
542
|
-
className: `relative inline-flex rounded-full h-3/4 w-3/4 ${
|
|
542
|
+
className: `relative inline-flex rounded-full h-3/4 w-3/4 ${g}`,
|
|
543
543
|
style: t ? { backgroundColor: t } : {}
|
|
544
544
|
}
|
|
545
545
|
)
|
|
546
546
|
] });
|
|
547
547
|
}
|
|
548
|
-
return
|
|
549
|
-
/* @__PURE__ */
|
|
548
|
+
return s === "multicolor" ? /* @__PURE__ */ e.jsx("div", { className: `${c} relative ${l}`, children: /* @__PURE__ */ e.jsx("div", { className: `absolute inset-0 rounded-full ${f} animate-spin`, children: /* @__PURE__ */ e.jsx("div", { className: "absolute inset-[3px] bg-white rounded-full" }) }) }) : s === "orbit" ? t ? /* @__PURE__ */ e.jsxs("div", { className: `relative ${c} ${l}`, children: [
|
|
549
|
+
/* @__PURE__ */ e.jsx(
|
|
550
550
|
"div",
|
|
551
551
|
{
|
|
552
552
|
className: "absolute inset-0 rounded-full border-2 border-t-transparent border-b-transparent animate-spin",
|
|
553
553
|
style: { borderColor: t, borderTopColor: "transparent", borderBottomColor: "transparent" }
|
|
554
554
|
}
|
|
555
555
|
),
|
|
556
|
-
/* @__PURE__ */
|
|
556
|
+
/* @__PURE__ */ e.jsx(
|
|
557
557
|
"div",
|
|
558
558
|
{
|
|
559
559
|
className: "absolute inset-1 rounded-full border-2 border-l-transparent border-r-transparent animate-spin-reverse opacity-75",
|
|
560
560
|
style: { borderColor: t, borderLeftColor: "transparent", borderRightColor: "transparent", animationDirection: "reverse", animationDuration: "1.5s" }
|
|
561
561
|
}
|
|
562
562
|
)
|
|
563
|
-
] }) : /* @__PURE__ */
|
|
564
|
-
/* @__PURE__ */
|
|
565
|
-
/* @__PURE__ */
|
|
563
|
+
] }) : /* @__PURE__ */ e.jsxs("div", { className: `relative ${c} ${l}`, children: [
|
|
564
|
+
/* @__PURE__ */ e.jsx("div", { className: `absolute inset-0 rounded-full ${f} animate-spin`, children: /* @__PURE__ */ e.jsx("div", { className: "absolute inset-[2px] bg-white rounded-full" }) }),
|
|
565
|
+
/* @__PURE__ */ e.jsx("div", { className: `absolute inset-1 rounded-full ${f} animate-spin-reverse opacity-75`, style: { animationDirection: "reverse", animationDuration: "1.5s" }, children: /* @__PURE__ */ e.jsx("div", { className: "absolute inset-[2px] bg-white rounded-full" }) })
|
|
566
566
|
] }) : null;
|
|
567
|
-
},
|
|
568
|
-
variant:
|
|
569
|
-
title:
|
|
567
|
+
}, he = ({
|
|
568
|
+
variant: s = "info",
|
|
569
|
+
title: n,
|
|
570
570
|
children: l,
|
|
571
571
|
onClose: t,
|
|
572
572
|
className: o = ""
|
|
573
573
|
}) => {
|
|
574
|
-
const
|
|
574
|
+
const d = {
|
|
575
575
|
success: {
|
|
576
576
|
container: "bg-green-50 text-green-900 border-green-200",
|
|
577
577
|
iconColor: "text-green-600",
|
|
578
578
|
closeHover: "hover:bg-green-100 text-green-600",
|
|
579
|
-
Icon: () => /* @__PURE__ */
|
|
579
|
+
Icon: () => /* @__PURE__ */ e.jsx("svg", { className: "w-5 h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ e.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M5 13l4 4L19 7" }) })
|
|
580
580
|
},
|
|
581
581
|
error: {
|
|
582
582
|
container: "bg-red-50 text-red-900 border-red-200",
|
|
583
583
|
iconColor: "text-red-600",
|
|
584
584
|
closeHover: "hover:bg-red-100 text-red-600",
|
|
585
|
-
Icon: () => /* @__PURE__ */
|
|
585
|
+
Icon: () => /* @__PURE__ */ e.jsx("svg", { className: "w-5 h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ e.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" }) })
|
|
586
586
|
},
|
|
587
587
|
warning: {
|
|
588
588
|
container: "bg-yellow-50 text-yellow-900 border-yellow-200",
|
|
589
589
|
iconColor: "text-yellow-600",
|
|
590
590
|
closeHover: "hover:bg-yellow-100 text-yellow-600",
|
|
591
|
-
Icon: () => /* @__PURE__ */
|
|
591
|
+
Icon: () => /* @__PURE__ */ e.jsx("svg", { className: "w-5 h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ e.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" }) })
|
|
592
592
|
},
|
|
593
593
|
info: {
|
|
594
594
|
container: "bg-blue-50 text-blue-900 border-blue-200",
|
|
595
595
|
iconColor: "text-blue-600",
|
|
596
596
|
closeHover: "hover:bg-blue-100 text-blue-600",
|
|
597
|
-
Icon: () => /* @__PURE__ */
|
|
597
|
+
Icon: () => /* @__PURE__ */ e.jsx("svg", { className: "w-5 h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ e.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" }) })
|
|
598
598
|
}
|
|
599
|
-
}[
|
|
600
|
-
return /* @__PURE__ */
|
|
599
|
+
}[s], c = d.Icon;
|
|
600
|
+
return /* @__PURE__ */ e.jsxs(
|
|
601
601
|
"div",
|
|
602
602
|
{
|
|
603
603
|
role: "alert",
|
|
604
|
-
className: `flex p-4 rounded-lg border ${
|
|
604
|
+
className: `flex p-4 rounded-lg border ${d.container} ${o}`,
|
|
605
605
|
children: [
|
|
606
|
-
/* @__PURE__ */
|
|
607
|
-
/* @__PURE__ */
|
|
608
|
-
|
|
609
|
-
/* @__PURE__ */
|
|
606
|
+
/* @__PURE__ */ e.jsx("div", { className: `shrink-0 ${d.iconColor}`, children: /* @__PURE__ */ e.jsx(c, {}) }),
|
|
607
|
+
/* @__PURE__ */ e.jsxs("div", { className: "ml-3 text-sm flex-1", children: [
|
|
608
|
+
n && /* @__PURE__ */ e.jsx("span", { className: "font-semibold block mb-1", children: n }),
|
|
609
|
+
/* @__PURE__ */ e.jsx("div", { className: "leading-relaxed", children: l })
|
|
610
610
|
] }),
|
|
611
|
-
t && /* @__PURE__ */
|
|
611
|
+
t && /* @__PURE__ */ e.jsx(
|
|
612
612
|
"button",
|
|
613
613
|
{
|
|
614
614
|
onClick: t,
|
|
615
|
-
className: `ml-auto -mx-1.5 -my-1.5 rounded-lg p-1.5 inline-flex h-8 w-8 items-center justify-center transition-colors ${
|
|
615
|
+
className: `ml-auto -mx-1.5 -my-1.5 rounded-lg p-1.5 inline-flex h-8 w-8 items-center justify-center transition-colors ${d.closeHover}`,
|
|
616
616
|
"aria-label": "Close",
|
|
617
|
-
children: /* @__PURE__ */
|
|
617
|
+
children: /* @__PURE__ */ e.jsx("svg", { className: "w-4 h-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ e.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) })
|
|
618
618
|
}
|
|
619
619
|
)
|
|
620
620
|
]
|
|
621
621
|
}
|
|
622
622
|
);
|
|
623
|
-
},
|
|
624
|
-
children:
|
|
625
|
-
colSpan:
|
|
623
|
+
}, ae = ({
|
|
624
|
+
children: s,
|
|
625
|
+
colSpan: n,
|
|
626
626
|
rowSpan: l,
|
|
627
627
|
colStart: t,
|
|
628
628
|
className: o = ""
|
|
629
629
|
}) => {
|
|
630
|
-
const
|
|
630
|
+
const a = {
|
|
631
631
|
1: "col-span-1",
|
|
632
632
|
2: "col-span-2",
|
|
633
633
|
3: "col-span-3",
|
|
@@ -641,32 +641,32 @@ const w = ({
|
|
|
641
641
|
11: "col-span-11",
|
|
642
642
|
12: "col-span-12",
|
|
643
643
|
full: "col-span-full"
|
|
644
|
-
},
|
|
644
|
+
}, d = {
|
|
645
645
|
1: "row-span-1",
|
|
646
646
|
2: "row-span-2",
|
|
647
647
|
3: "row-span-3",
|
|
648
648
|
4: "row-span-4",
|
|
649
649
|
5: "row-span-5",
|
|
650
650
|
6: "row-span-6"
|
|
651
|
-
},
|
|
652
|
-
|
|
653
|
-
l ?
|
|
651
|
+
}, c = [
|
|
652
|
+
n ? a[n] : "",
|
|
653
|
+
l ? d[l] : "",
|
|
654
654
|
t ? `col-start-${t}` : "",
|
|
655
655
|
o
|
|
656
656
|
].filter(Boolean).join(" ");
|
|
657
|
-
return /* @__PURE__ */
|
|
658
|
-
},
|
|
659
|
-
children:
|
|
660
|
-
cols:
|
|
657
|
+
return /* @__PURE__ */ e.jsx("div", { className: c, children: s });
|
|
658
|
+
}, le = ({
|
|
659
|
+
children: s,
|
|
660
|
+
cols: n = 1,
|
|
661
661
|
gap: l = 4,
|
|
662
662
|
gapX: t,
|
|
663
663
|
gapY: o,
|
|
664
|
-
flow:
|
|
665
|
-
align:
|
|
666
|
-
justify:
|
|
667
|
-
className:
|
|
664
|
+
flow: a = "row",
|
|
665
|
+
align: d,
|
|
666
|
+
justify: c,
|
|
667
|
+
className: f = ""
|
|
668
668
|
}) => {
|
|
669
|
-
const
|
|
669
|
+
const g = {
|
|
670
670
|
1: "grid-cols-1",
|
|
671
671
|
2: "grid-cols-2",
|
|
672
672
|
3: "grid-cols-3",
|
|
@@ -676,7 +676,7 @@ const w = ({
|
|
|
676
676
|
8: "grid-cols-8",
|
|
677
677
|
10: "grid-cols-10",
|
|
678
678
|
12: "grid-cols-12"
|
|
679
|
-
},
|
|
679
|
+
}, p = {
|
|
680
680
|
0: "gap-0",
|
|
681
681
|
1: "gap-1",
|
|
682
682
|
2: "gap-2",
|
|
@@ -689,30 +689,30 @@ const w = ({
|
|
|
689
689
|
12: "gap-12"
|
|
690
690
|
}, b = [
|
|
691
691
|
"grid",
|
|
692
|
-
|
|
693
|
-
t === void 0 && o === void 0 ?
|
|
692
|
+
g[n],
|
|
693
|
+
t === void 0 && o === void 0 ? p[l] : "",
|
|
694
694
|
// Use standard gap if no X/Y overrides
|
|
695
695
|
t ? `gap-x-${t}` : "",
|
|
696
696
|
o ? `gap-y-${o}` : "",
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
697
|
+
a ? `grid-flow-${a}` : "",
|
|
698
|
+
d ? `items-${d}` : "",
|
|
699
|
+
c ? `justify-${c}` : "",
|
|
700
|
+
f
|
|
701
701
|
].filter(Boolean).join(" ");
|
|
702
|
-
return /* @__PURE__ */
|
|
702
|
+
return /* @__PURE__ */ e.jsx("div", { className: b, children: s });
|
|
703
703
|
};
|
|
704
|
-
|
|
704
|
+
le.Item = ae;
|
|
705
705
|
const fe = ({
|
|
706
|
-
variant:
|
|
707
|
-
component:
|
|
706
|
+
variant: s = "body1",
|
|
707
|
+
component: n,
|
|
708
708
|
children: l,
|
|
709
709
|
weight: t,
|
|
710
710
|
align: o = "left",
|
|
711
|
-
color:
|
|
712
|
-
className:
|
|
713
|
-
noWrap:
|
|
711
|
+
color: a,
|
|
712
|
+
className: d = "",
|
|
713
|
+
noWrap: c = !1
|
|
714
714
|
}) => {
|
|
715
|
-
const
|
|
715
|
+
const g = n || {
|
|
716
716
|
h1: "h1",
|
|
717
717
|
h2: "h2",
|
|
718
718
|
h3: "h3",
|
|
@@ -723,7 +723,7 @@ const fe = ({
|
|
|
723
723
|
body2: "p",
|
|
724
724
|
caption: "span",
|
|
725
725
|
overline: "span"
|
|
726
|
-
}[
|
|
726
|
+
}[s] || "p", p = {
|
|
727
727
|
h1: "text-5xl md:text-6xl tracking-tight leading-tight",
|
|
728
728
|
h2: "text-4xl md:text-5xl tracking-tight leading-tight",
|
|
729
729
|
h3: "text-3xl md:text-4xl tracking-tight",
|
|
@@ -751,33 +751,201 @@ const fe = ({
|
|
|
751
751
|
semibold: "font-semibold",
|
|
752
752
|
bold: "font-bold",
|
|
753
753
|
extrabold: "font-extrabold"
|
|
754
|
-
},
|
|
754
|
+
}, h = {
|
|
755
755
|
left: "text-left",
|
|
756
756
|
center: "text-center",
|
|
757
757
|
right: "text-right",
|
|
758
758
|
justify: "text-justify"
|
|
759
|
-
}, v =
|
|
759
|
+
}, v = p[s], N = t ? j[t] : b[s], k = h[o], $ = [
|
|
760
760
|
v,
|
|
761
|
-
k,
|
|
762
761
|
N,
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
c
|
|
762
|
+
k,
|
|
763
|
+
a || "text-gray-900",
|
|
764
|
+
c ? "truncate" : "",
|
|
765
|
+
d
|
|
766
766
|
].filter(Boolean).join(" ");
|
|
767
|
-
return /* @__PURE__ */
|
|
768
|
-
},
|
|
769
|
-
const
|
|
770
|
-
return /* @__PURE__ */
|
|
767
|
+
return /* @__PURE__ */ e.jsx(g, { className: $, children: l });
|
|
768
|
+
}, ie = G.forwardRef(({ as: s, className: n = "", children: l, ...t }, o) => {
|
|
769
|
+
const a = s || "div";
|
|
770
|
+
return /* @__PURE__ */ e.jsx(a, { ref: o, className: n, ...t, children: l });
|
|
771
771
|
});
|
|
772
|
-
|
|
772
|
+
ie.displayName = "Box";
|
|
773
|
+
const ge = ({
|
|
774
|
+
label: s,
|
|
775
|
+
error: n,
|
|
776
|
+
autoResize: l,
|
|
777
|
+
className: t = "",
|
|
778
|
+
rows: o = 4,
|
|
779
|
+
...a
|
|
780
|
+
}) => {
|
|
781
|
+
const d = (c) => {
|
|
782
|
+
l && (c.target.style.height = "auto", c.target.style.height = `${c.target.scrollHeight}px`), a.onChange?.(c);
|
|
783
|
+
};
|
|
784
|
+
return /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-1.5 w-full", children: [
|
|
785
|
+
s && /* @__PURE__ */ e.jsx("label", { className: "text-sm font-medium text-gray-700", children: s }),
|
|
786
|
+
/* @__PURE__ */ e.jsx(
|
|
787
|
+
"textarea",
|
|
788
|
+
{
|
|
789
|
+
className: `
|
|
790
|
+
w-full
|
|
791
|
+
px-3
|
|
792
|
+
py-2
|
|
793
|
+
bg-white
|
|
794
|
+
border
|
|
795
|
+
${n ? "border-red-500" : "border-gray-300"}
|
|
796
|
+
rounded-md
|
|
797
|
+
shadow-sm
|
|
798
|
+
focus:outline-none
|
|
799
|
+
focus:ring-2
|
|
800
|
+
${n ? "focus:ring-red-500" : "focus:ring-blue-500"}
|
|
801
|
+
focus:border-transparent
|
|
802
|
+
transition-all
|
|
803
|
+
duration-200
|
|
804
|
+
hover:border-gray-400
|
|
805
|
+
min-h-[100px]
|
|
806
|
+
resize-y
|
|
807
|
+
${t}
|
|
808
|
+
`,
|
|
809
|
+
rows: o,
|
|
810
|
+
onInput: d,
|
|
811
|
+
...a
|
|
812
|
+
}
|
|
813
|
+
),
|
|
814
|
+
n && /* @__PURE__ */ e.jsx("span", { className: "text-xs text-red-500", children: n })
|
|
815
|
+
] });
|
|
816
|
+
}, pe = ({
|
|
817
|
+
sidebar: s,
|
|
818
|
+
header: n,
|
|
819
|
+
children: l,
|
|
820
|
+
footer: t,
|
|
821
|
+
sidebarWidth: o = "260px",
|
|
822
|
+
className: a = ""
|
|
823
|
+
}) => {
|
|
824
|
+
const [d, c] = te(!1);
|
|
825
|
+
return /* @__PURE__ */ e.jsxs("div", { className: `flex h-screen bg-gray-50 overflow-hidden ${a}`, children: [
|
|
826
|
+
s && /* @__PURE__ */ e.jsx(
|
|
827
|
+
"div",
|
|
828
|
+
{
|
|
829
|
+
className: "hidden md:flex flex-col h-full bg-white border-r border-gray-200",
|
|
830
|
+
style: { width: o },
|
|
831
|
+
children: s
|
|
832
|
+
}
|
|
833
|
+
),
|
|
834
|
+
s && d && /* @__PURE__ */ e.jsx(
|
|
835
|
+
"div",
|
|
836
|
+
{
|
|
837
|
+
className: "fixed inset-0 z-40 bg-black/50 md:hidden",
|
|
838
|
+
onClick: () => c(!1)
|
|
839
|
+
}
|
|
840
|
+
),
|
|
841
|
+
s && /* @__PURE__ */ e.jsx(
|
|
842
|
+
"div",
|
|
843
|
+
{
|
|
844
|
+
className: `
|
|
845
|
+
fixed inset-y-0 left-0 z-50 w-64 bg-white shadow-xl transition-transform duration-300 md:hidden
|
|
846
|
+
${d ? "translate-x-0" : "-translate-x-full"}
|
|
847
|
+
`,
|
|
848
|
+
children: s
|
|
849
|
+
}
|
|
850
|
+
),
|
|
851
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col flex-1 min-w-0 overflow-hidden", children: [
|
|
852
|
+
/* @__PURE__ */ e.jsxs("header", { className: "flex h-16 items-center border-b border-gray-200 bg-white px-4 shrink-0", children: [
|
|
853
|
+
s && /* @__PURE__ */ e.jsx(
|
|
854
|
+
"button",
|
|
855
|
+
{
|
|
856
|
+
className: "mr-4 p-2 md:hidden text-gray-500 hover:bg-gray-100 rounded-md",
|
|
857
|
+
onClick: () => c(!0),
|
|
858
|
+
children: /* @__PURE__ */ e.jsx("svg", { className: "h-6 w-6", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ e.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 6h16M4 12h16m-7 6h7" }) })
|
|
859
|
+
}
|
|
860
|
+
),
|
|
861
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex-1 flex items-center justify-between", children: n || /* @__PURE__ */ e.jsx("div", { className: "font-bold text-xl text-indigo-600", children: "OrbitUI" }) })
|
|
862
|
+
] }),
|
|
863
|
+
/* @__PURE__ */ e.jsx("main", { className: "flex-1 overflow-y-auto p-4 md:p-6 lg:p-8", children: l }),
|
|
864
|
+
t && /* @__PURE__ */ e.jsx("footer", { className: "h-14 border-t border-gray-200 bg-white px-4 flex items-center shrink-0", children: t })
|
|
865
|
+
] })
|
|
866
|
+
] });
|
|
867
|
+
}, be = ({
|
|
868
|
+
sidebar: s,
|
|
869
|
+
header: n,
|
|
870
|
+
children: l,
|
|
871
|
+
footer: t,
|
|
872
|
+
maxWidth: o = "935px",
|
|
873
|
+
className: a = ""
|
|
874
|
+
}) => /* @__PURE__ */ e.jsxs("div", { className: `flex flex-col md:flex-row h-screen bg-white ${a}`, children: [
|
|
875
|
+
s && /* @__PURE__ */ e.jsx("aside", { className: "hidden md:flex flex-col fixed left-0 h-screen border-r border-gray-200 transition-all duration-300 xl:w-64 w-20 z-50 bg-white", children: s }),
|
|
876
|
+
/* @__PURE__ */ e.jsxs(
|
|
877
|
+
"main",
|
|
878
|
+
{
|
|
879
|
+
className: `
|
|
880
|
+
flex-1 bg-white overflow-y-auto min-w-0
|
|
881
|
+
${s ? "md:ml-20 xl:ml-64" : ""}
|
|
882
|
+
`,
|
|
883
|
+
children: [
|
|
884
|
+
n && /* @__PURE__ */ e.jsx("header", { className: "sticky top-0 z-40 bg-white/80 backdrop-blur-md border-b border-gray-100 md:hidden", children: n }),
|
|
885
|
+
/* @__PURE__ */ e.jsx("div", { className: "mx-auto px-4 md:px-8 py-8", style: { maxWidth: o }, children: l })
|
|
886
|
+
]
|
|
887
|
+
}
|
|
888
|
+
),
|
|
889
|
+
t && /* @__PURE__ */ e.jsx("nav", { className: "md:hidden fixed bottom-0 left-0 right-0 bg-white border-t border-gray-200 z-50", children: t })
|
|
890
|
+
] }), ve = ({
|
|
891
|
+
list: s,
|
|
892
|
+
header: n,
|
|
893
|
+
children: l,
|
|
894
|
+
footer: t,
|
|
895
|
+
isChatActive: o = !1,
|
|
896
|
+
onBack: a,
|
|
897
|
+
listWidth: d = "350px",
|
|
898
|
+
className: c = ""
|
|
899
|
+
}) => /* @__PURE__ */ e.jsxs("div", { className: `flex h-screen bg-white overflow-hidden ${c}`, children: [
|
|
900
|
+
/* @__PURE__ */ e.jsx(
|
|
901
|
+
"aside",
|
|
902
|
+
{
|
|
903
|
+
className: `
|
|
904
|
+
flex-shrink-0 border-r border-gray-200 bg-white transition-all duration-300
|
|
905
|
+
${o ? "hidden md:flex" : "flex w-full md:w-auto"}
|
|
906
|
+
`,
|
|
907
|
+
style: { width: o ? d : window.innerWidth < 768 ? "100%" : d },
|
|
908
|
+
children: /* @__PURE__ */ e.jsx("div", { className: "flex flex-col w-full h-full", children: s })
|
|
909
|
+
}
|
|
910
|
+
),
|
|
911
|
+
/* @__PURE__ */ e.jsxs(
|
|
912
|
+
"main",
|
|
913
|
+
{
|
|
914
|
+
className: `
|
|
915
|
+
flex-1 flex flex-col min-w-0 bg-white transition-all duration-300
|
|
916
|
+
${o ? "flex w-full" : "hidden md:flex"}
|
|
917
|
+
`,
|
|
918
|
+
children: [
|
|
919
|
+
(n || a) && /* @__PURE__ */ e.jsxs("header", { className: "flex h-16 items-center px-4 border-b border-gray-100 shrink-0 bg-white/80 backdrop-blur-md sticky top-0 z-10", children: [
|
|
920
|
+
a && /* @__PURE__ */ e.jsx(
|
|
921
|
+
"button",
|
|
922
|
+
{
|
|
923
|
+
onClick: a,
|
|
924
|
+
className: "mr-3 p-2 md:hidden text-gray-500 hover:bg-gray-100 rounded-full transition-colors",
|
|
925
|
+
"aria-label": "Go back",
|
|
926
|
+
children: /* @__PURE__ */ e.jsx("svg", { className: "w-6 h-6", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ e.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M15 19l-7-7 7-7" }) })
|
|
927
|
+
}
|
|
928
|
+
),
|
|
929
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex-1 min-w-0", children: n })
|
|
930
|
+
] }),
|
|
931
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex-1 overflow-y-auto bg-gray-50", children: l }),
|
|
932
|
+
t && /* @__PURE__ */ e.jsx("footer", { className: "p-4 bg-white border-t border-gray-100 shrink-0", children: t })
|
|
933
|
+
]
|
|
934
|
+
}
|
|
935
|
+
)
|
|
936
|
+
] });
|
|
773
937
|
export {
|
|
774
|
-
|
|
775
|
-
|
|
938
|
+
he as Alert,
|
|
939
|
+
pe as AppLayout,
|
|
940
|
+
ie as Box,
|
|
776
941
|
w as Button,
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
942
|
+
ue as Card,
|
|
943
|
+
le as Grid,
|
|
944
|
+
ve as InboxLayout,
|
|
945
|
+
de as Input,
|
|
946
|
+
me as Loader,
|
|
947
|
+
xe as Post,
|
|
948
|
+
be as SocialLayout,
|
|
949
|
+
ge as TextArea,
|
|
782
950
|
fe as Typography
|
|
783
951
|
};
|