@proyecto-viviana/ui 0.1.4 → 0.1.5
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/dist/index.js +935 -542
- package/dist/index.js.map +1 -1
- package/dist/index.ssr.js +1657 -0
- package/dist/index.ssr.js.map +1 -0
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
1
|
+
// src/button/Button.tsx
|
|
2
|
+
import { createComponent as _$createComponent } from "solid-js/web";
|
|
3
|
+
import { mergeProps as _$mergeProps } from "solid-js/web";
|
|
4
|
+
import { memo as _$memo } from "solid-js/web";
|
|
5
|
+
import { splitProps, mergeProps as solidMergeProps } from "solid-js";
|
|
6
|
+
import { Button as HeadlessButton } from "@proyecto-viviana/solidaria-components";
|
|
6
7
|
function Button(props) {
|
|
7
8
|
const defaultProps = {
|
|
8
9
|
variant: "primary",
|
|
9
10
|
buttonStyle: "fill",
|
|
10
11
|
size: "md"
|
|
11
12
|
};
|
|
12
|
-
const merged =
|
|
13
|
+
const merged = solidMergeProps(defaultProps, props);
|
|
13
14
|
const [local, headlessProps] = splitProps(merged, ["children", "variant", "buttonStyle", "size", "fullWidth", "staticColor", "class"]);
|
|
14
15
|
const getClassName = (renderProps) => {
|
|
15
16
|
const classList = ["vui-button", `vui-button--${local.buttonStyle}`, `vui-button--${local.variant}`, `vui-button--${local.size}`];
|
|
@@ -24,7 +25,7 @@ function Button(props) {
|
|
|
24
25
|
}
|
|
25
26
|
return classList.join(" ");
|
|
26
27
|
};
|
|
27
|
-
return createComponent(
|
|
28
|
+
return _$createComponent(HeadlessButton, _$mergeProps(headlessProps, {
|
|
28
29
|
"class": getClassName,
|
|
29
30
|
get ["data-variant"]() {
|
|
30
31
|
return local.variant;
|
|
@@ -41,8 +42,17 @@ function Button(props) {
|
|
|
41
42
|
}));
|
|
42
43
|
}
|
|
43
44
|
|
|
44
|
-
|
|
45
|
-
|
|
45
|
+
// src/badge/index.tsx
|
|
46
|
+
import { template as _$template } from "solid-js/web";
|
|
47
|
+
import { className as _$className } from "solid-js/web";
|
|
48
|
+
import { effect as _$effect } from "solid-js/web";
|
|
49
|
+
import { createComponent as _$createComponent2 } from "solid-js/web";
|
|
50
|
+
import { getNextElement as _$getNextElement } from "solid-js/web";
|
|
51
|
+
import { insert as _$insert } from "solid-js/web";
|
|
52
|
+
import { Show } from "solid-js";
|
|
53
|
+
var _tmpl$ = /* @__PURE__ */ _$template(`<span>`);
|
|
54
|
+
var _tmpl$2 = /* @__PURE__ */ _$template(`<div>`);
|
|
55
|
+
var variantStyles = {
|
|
46
56
|
primary: "bg-primary-500 text-white",
|
|
47
57
|
secondary: "bg-bg-300 text-primary-300",
|
|
48
58
|
accent: "bg-accent-300 text-black",
|
|
@@ -50,7 +60,7 @@ const variantStyles$5 = {
|
|
|
50
60
|
warning: "bg-warning-400 text-black",
|
|
51
61
|
danger: "bg-danger-400 text-white"
|
|
52
62
|
};
|
|
53
|
-
|
|
63
|
+
var sizeStyles = {
|
|
54
64
|
sm: "w-5 h-5 text-xs",
|
|
55
65
|
md: "w-7 h-7 text-xs",
|
|
56
66
|
lg: "w-9 h-9 text-sm"
|
|
@@ -59,8 +69,8 @@ function Badge(props) {
|
|
|
59
69
|
const variant = () => props.variant ?? "accent";
|
|
60
70
|
const size = () => props.size ?? "md";
|
|
61
71
|
return (() => {
|
|
62
|
-
var _el$ = _tmpl$2
|
|
63
|
-
insert(_el$,
|
|
72
|
+
var _el$ = _$getNextElement(_tmpl$2);
|
|
73
|
+
_$insert(_el$, _$createComponent2(Show, {
|
|
64
74
|
get when() {
|
|
65
75
|
return props.count !== void 0;
|
|
66
76
|
},
|
|
@@ -68,18 +78,33 @@ function Badge(props) {
|
|
|
68
78
|
return props.children;
|
|
69
79
|
},
|
|
70
80
|
get children() {
|
|
71
|
-
var _el$2 = _tmpl
|
|
72
|
-
insert(_el$2, () => props.count);
|
|
81
|
+
var _el$2 = _$getNextElement(_tmpl$);
|
|
82
|
+
_$insert(_el$2, () => props.count);
|
|
73
83
|
return _el$2;
|
|
74
84
|
}
|
|
75
85
|
}));
|
|
76
|
-
effect(() => className(_el$, `flex items-center justify-center rounded-full border-b border-white font-semibold ${variantStyles
|
|
86
|
+
_$effect(() => _$className(_el$, `flex items-center justify-center rounded-full border-b border-white font-semibold ${variantStyles[variant()]} ${sizeStyles[size()]} ${props.class ?? ""}`));
|
|
77
87
|
return _el$;
|
|
78
88
|
})();
|
|
79
89
|
}
|
|
80
90
|
|
|
81
|
-
|
|
82
|
-
|
|
91
|
+
// src/alert/index.tsx
|
|
92
|
+
import { template as _$template2 } from "solid-js/web";
|
|
93
|
+
import { delegateEvents as _$delegateEvents } from "solid-js/web";
|
|
94
|
+
import { className as _$className2 } from "solid-js/web";
|
|
95
|
+
import { effect as _$effect2 } from "solid-js/web";
|
|
96
|
+
import { getNextMarker as _$getNextMarker } from "solid-js/web";
|
|
97
|
+
import { runHydrationEvents as _$runHydrationEvents } from "solid-js/web";
|
|
98
|
+
import { addEventListener as _$addEventListener } from "solid-js/web";
|
|
99
|
+
import { createComponent as _$createComponent3 } from "solid-js/web";
|
|
100
|
+
import { getNextElement as _$getNextElement2 } from "solid-js/web";
|
|
101
|
+
import { insert as _$insert2 } from "solid-js/web";
|
|
102
|
+
import { Show as Show2 } from "solid-js";
|
|
103
|
+
var _tmpl$3 = /* @__PURE__ */ _$template2(`<span class="font-semibold font-jost">`);
|
|
104
|
+
var _tmpl$22 = /* @__PURE__ */ _$template2(`<span class=opacity-50>|`);
|
|
105
|
+
var _tmpl$32 = /* @__PURE__ */ _$template2(`<button class="hover:opacity-70 transition-opacity ml-2"aria-label=Dismiss>\u2715`);
|
|
106
|
+
var _tmpl$4 = /* @__PURE__ */ _$template2(`<div role=alert><div class="flex items-center gap-3 flex-1"><!$><!/><div class=flex-1></div><!$><!/>`);
|
|
107
|
+
var variantStyles2 = {
|
|
83
108
|
info: "bg-primary-700 text-primary-200 border border-primary-500",
|
|
84
109
|
success: "bg-success-600 text-success-100 border border-success-400",
|
|
85
110
|
warning: "bg-warning-600 text-warning-100 border border-warning-400",
|
|
@@ -88,38 +113,52 @@ const variantStyles$4 = {
|
|
|
88
113
|
function Alert(props) {
|
|
89
114
|
const variant = () => props.variant ?? "info";
|
|
90
115
|
return (() => {
|
|
91
|
-
var _el$ = _tmpl$4
|
|
92
|
-
|
|
116
|
+
var _el$ = _$getNextElement2(_tmpl$4), _el$2 = _el$.firstChild, _el$7 = _el$2.firstChild, [_el$8, _co$] = _$getNextMarker(_el$7.nextSibling), _el$5 = _el$8.nextSibling, _el$9 = _el$5.nextSibling, [_el$0, _co$2] = _$getNextMarker(_el$9.nextSibling);
|
|
117
|
+
_$insert2(_el$2, _$createComponent3(Show2, {
|
|
93
118
|
get when() {
|
|
94
119
|
return props.title;
|
|
95
120
|
},
|
|
96
121
|
get children() {
|
|
97
122
|
return [(() => {
|
|
98
|
-
var _el$3 = _tmpl
|
|
99
|
-
|
|
123
|
+
var _el$3 = _$getNextElement2(_tmpl$3);
|
|
124
|
+
_$insert2(_el$3, () => props.title);
|
|
100
125
|
return _el$3;
|
|
101
|
-
})(), _tmpl$
|
|
126
|
+
})(), _$getNextElement2(_tmpl$22)];
|
|
102
127
|
}
|
|
103
|
-
}), _el$
|
|
104
|
-
|
|
105
|
-
|
|
128
|
+
}), _el$8, _co$);
|
|
129
|
+
_$insert2(_el$5, () => props.children);
|
|
130
|
+
_$insert2(_el$2, _$createComponent3(Show2, {
|
|
106
131
|
get when() {
|
|
107
132
|
return props.dismissible;
|
|
108
133
|
},
|
|
109
134
|
get children() {
|
|
110
|
-
var _el$6 = _tmpl$
|
|
111
|
-
addEventListener(_el$6, "click", props.onDismiss, true);
|
|
135
|
+
var _el$6 = _$getNextElement2(_tmpl$32);
|
|
136
|
+
_$addEventListener(_el$6, "click", props.onDismiss, true);
|
|
137
|
+
_$runHydrationEvents();
|
|
112
138
|
return _el$6;
|
|
113
139
|
}
|
|
114
|
-
}),
|
|
115
|
-
|
|
140
|
+
}), _el$0, _co$2);
|
|
141
|
+
_$effect2(() => _$className2(_el$, `flex items-center min-h-[50px] font-normal rounded-lg px-4 py-2 ${variantStyles2[variant()]} ${props.class ?? ""}`));
|
|
116
142
|
return _el$;
|
|
117
143
|
})();
|
|
118
144
|
}
|
|
119
|
-
delegateEvents(["click"]);
|
|
145
|
+
_$delegateEvents(["click"]);
|
|
120
146
|
|
|
121
|
-
|
|
122
|
-
|
|
147
|
+
// src/avatar/index.tsx
|
|
148
|
+
import { template as _$template3 } from "solid-js/web";
|
|
149
|
+
import { getNextMarker as _$getNextMarker2 } from "solid-js/web";
|
|
150
|
+
import { className as _$className3 } from "solid-js/web";
|
|
151
|
+
import { insert as _$insert3 } from "solid-js/web";
|
|
152
|
+
import { createComponent as _$createComponent4 } from "solid-js/web";
|
|
153
|
+
import { setAttribute as _$setAttribute } from "solid-js/web";
|
|
154
|
+
import { effect as _$effect3 } from "solid-js/web";
|
|
155
|
+
import { getNextElement as _$getNextElement3 } from "solid-js/web";
|
|
156
|
+
import { Show as Show3 } from "solid-js";
|
|
157
|
+
var _tmpl$5 = /* @__PURE__ */ _$template3(`<img class="w-full h-full object-cover">`);
|
|
158
|
+
var _tmpl$23 = /* @__PURE__ */ _$template3(`<span>`);
|
|
159
|
+
var _tmpl$33 = /* @__PURE__ */ _$template3(`<div><div></div><!$><!/>`);
|
|
160
|
+
var _tmpl$42 = /* @__PURE__ */ _$template3(`<div class="flex -space-x-2">`);
|
|
161
|
+
var sizeStyles2 = {
|
|
123
162
|
xs: {
|
|
124
163
|
container: "w-6 h-6",
|
|
125
164
|
text: "text-xs",
|
|
@@ -148,32 +187,32 @@ const sizeStyles$5 = {
|
|
|
148
187
|
};
|
|
149
188
|
function Avatar(props) {
|
|
150
189
|
const size = () => props.size ?? "md";
|
|
151
|
-
const styles = () =>
|
|
190
|
+
const styles = () => sizeStyles2[size()];
|
|
152
191
|
const initials = () => {
|
|
153
192
|
if (props.fallback) return props.fallback.slice(0, 2).toUpperCase();
|
|
154
193
|
if (props.alt) return props.alt.slice(0, 2).toUpperCase();
|
|
155
194
|
return "?";
|
|
156
195
|
};
|
|
157
196
|
return (() => {
|
|
158
|
-
var _el$ = _tmpl$
|
|
159
|
-
|
|
197
|
+
var _el$ = _$getNextElement3(_tmpl$33), _el$2 = _el$.firstChild, _el$5 = _el$2.nextSibling, [_el$6, _co$] = _$getNextMarker2(_el$5.nextSibling);
|
|
198
|
+
_$insert3(_el$2, _$createComponent4(Show3, {
|
|
160
199
|
get when() {
|
|
161
200
|
return props.src;
|
|
162
201
|
},
|
|
163
202
|
get fallback() {
|
|
164
203
|
return (() => {
|
|
165
|
-
var _el$
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
return _el$
|
|
204
|
+
var _el$7 = _$getNextElement3(_tmpl$23);
|
|
205
|
+
_$insert3(_el$7, initials);
|
|
206
|
+
_$effect3(() => _$className3(_el$7, `${styles().text} font-medium text-primary-300`));
|
|
207
|
+
return _el$7;
|
|
169
208
|
})();
|
|
170
209
|
},
|
|
171
210
|
get children() {
|
|
172
|
-
var _el$3 = _tmpl
|
|
173
|
-
|
|
211
|
+
var _el$3 = _$getNextElement3(_tmpl$5);
|
|
212
|
+
_$effect3((_p$) => {
|
|
174
213
|
var _v$ = props.src, _v$2 = props.alt ?? "Avatar";
|
|
175
|
-
_v$ !== _p$.e && setAttribute(_el$3, "src", _p$.e = _v$);
|
|
176
|
-
_v$2 !== _p$.t && setAttribute(_el$3, "alt", _p$.t = _v$2);
|
|
214
|
+
_v$ !== _p$.e && _$setAttribute(_el$3, "src", _p$.e = _v$);
|
|
215
|
+
_v$2 !== _p$.t && _$setAttribute(_el$3, "alt", _p$.t = _v$2);
|
|
177
216
|
return _p$;
|
|
178
217
|
}, {
|
|
179
218
|
e: void 0,
|
|
@@ -182,20 +221,20 @@ function Avatar(props) {
|
|
|
182
221
|
return _el$3;
|
|
183
222
|
}
|
|
184
223
|
}));
|
|
185
|
-
|
|
224
|
+
_$insert3(_el$, _$createComponent4(Show3, {
|
|
186
225
|
get when() {
|
|
187
226
|
return props.online !== void 0;
|
|
188
227
|
},
|
|
189
228
|
get children() {
|
|
190
|
-
var _el$4 = _tmpl$
|
|
191
|
-
|
|
229
|
+
var _el$4 = _$getNextElement3(_tmpl$23);
|
|
230
|
+
_$effect3(() => _$className3(_el$4, `absolute bottom-0 right-0 ${styles().indicator} rounded-full ring-2 ring-bg-400 ${props.online ? "bg-success-400" : "bg-bg-light"}`));
|
|
192
231
|
return _el$4;
|
|
193
232
|
}
|
|
194
|
-
}),
|
|
195
|
-
|
|
233
|
+
}), _el$6, _co$);
|
|
234
|
+
_$effect3((_p$) => {
|
|
196
235
|
var _v$3 = `relative inline-block ${props.class ?? ""}`, _v$4 = `${styles().container} rounded-full overflow-hidden bg-bg-200 flex items-center justify-center ring-2 ring-accent/50`;
|
|
197
|
-
_v$3 !== _p$.e &&
|
|
198
|
-
_v$4 !== _p$.t &&
|
|
236
|
+
_v$3 !== _p$.e && _$className3(_el$, _p$.e = _v$3);
|
|
237
|
+
_v$4 !== _p$.t && _$className3(_el$2, _p$.t = _v$4);
|
|
199
238
|
return _p$;
|
|
200
239
|
}, {
|
|
201
240
|
e: void 0,
|
|
@@ -206,14 +245,37 @@ function Avatar(props) {
|
|
|
206
245
|
}
|
|
207
246
|
function AvatarGroup(props) {
|
|
208
247
|
return (() => {
|
|
209
|
-
var _el$
|
|
210
|
-
|
|
211
|
-
return _el$
|
|
248
|
+
var _el$8 = _$getNextElement3(_tmpl$42);
|
|
249
|
+
_$insert3(_el$8, () => props.children);
|
|
250
|
+
return _el$8;
|
|
212
251
|
})();
|
|
213
252
|
}
|
|
214
253
|
|
|
215
|
-
|
|
216
|
-
|
|
254
|
+
// src/switch/index.tsx
|
|
255
|
+
import { template as _$template5 } from "solid-js/web";
|
|
256
|
+
import { delegateEvents as _$delegateEvents2 } from "solid-js/web";
|
|
257
|
+
import { className as _$className5 } from "solid-js/web";
|
|
258
|
+
import { effect as _$effect5 } from "solid-js/web";
|
|
259
|
+
import { getNextElement as _$getNextElement5 } from "solid-js/web";
|
|
260
|
+
import { runHydrationEvents as _$runHydrationEvents2 } from "solid-js/web";
|
|
261
|
+
import { insert as _$insert5 } from "solid-js/web";
|
|
262
|
+
import { memo as _$memo3 } from "solid-js/web";
|
|
263
|
+
import { createSignal, createEffect } from "solid-js";
|
|
264
|
+
|
|
265
|
+
// src/switch/ToggleSwitch.tsx
|
|
266
|
+
import { template as _$template4 } from "solid-js/web";
|
|
267
|
+
import { insert as _$insert4 } from "solid-js/web";
|
|
268
|
+
import { memo as _$memo2 } from "solid-js/web";
|
|
269
|
+
import { className as _$className4 } from "solid-js/web";
|
|
270
|
+
import { effect as _$effect4 } from "solid-js/web";
|
|
271
|
+
import { getNextElement as _$getNextElement4 } from "solid-js/web";
|
|
272
|
+
import { createComponent as _$createComponent5 } from "solid-js/web";
|
|
273
|
+
import { mergeProps as _$mergeProps2 } from "solid-js/web";
|
|
274
|
+
import { splitProps as splitProps2, mergeProps as solidMergeProps2 } from "solid-js";
|
|
275
|
+
import { ToggleSwitch as HeadlessToggleSwitch } from "@proyecto-viviana/solidaria-components";
|
|
276
|
+
var _tmpl$6 = /* @__PURE__ */ _$template4(`<span><span>`);
|
|
277
|
+
var _tmpl$24 = /* @__PURE__ */ _$template4(`<span class=text-primary-200>`);
|
|
278
|
+
var sizeStyles3 = {
|
|
217
279
|
sm: {
|
|
218
280
|
track: "h-5 w-9",
|
|
219
281
|
thumb: "h-4 w-4",
|
|
@@ -234,38 +296,39 @@ function ToggleSwitch(props) {
|
|
|
234
296
|
const defaultProps = {
|
|
235
297
|
size: "md"
|
|
236
298
|
};
|
|
237
|
-
const merged =
|
|
238
|
-
const [local, headlessProps] =
|
|
239
|
-
const size = () =>
|
|
299
|
+
const merged = solidMergeProps2(defaultProps, props);
|
|
300
|
+
const [local, headlessProps] = splitProps2(merged, ["size", "class", "children"]);
|
|
301
|
+
const size = () => sizeStyles3[local.size];
|
|
240
302
|
const getClassName = (renderProps) => {
|
|
241
303
|
const base = "inline-flex items-center gap-2 cursor-pointer";
|
|
242
304
|
const disabledClass = renderProps.isDisabled ? "cursor-not-allowed opacity-50" : "";
|
|
243
305
|
const custom = local.class || "";
|
|
244
306
|
return [base, disabledClass, custom].filter(Boolean).join(" ");
|
|
245
307
|
};
|
|
246
|
-
return
|
|
308
|
+
return _$createComponent5(HeadlessToggleSwitch, _$mergeProps2(headlessProps, {
|
|
247
309
|
"class": getClassName,
|
|
248
310
|
children: (renderProps) => [(() => {
|
|
249
|
-
var _el$ = _tmpl
|
|
250
|
-
|
|
311
|
+
var _el$ = _$getNextElement4(_tmpl$6), _el$2 = _el$.firstChild;
|
|
312
|
+
_$effect4((_p$) => {
|
|
251
313
|
var _v$ = ["relative rounded-full transition-colors duration-200", "focus-within:ring-2 focus-within:ring-accent-300 focus-within:ring-offset-2 focus-within:ring-offset-bg-400", size().track, renderProps.isSelected ? "bg-accent" : "bg-bg-300", renderProps.isDisabled ? "cursor-not-allowed" : "cursor-pointer"].join(" "), _v$2 = ["absolute top-0.5 left-0.5 rounded-full bg-white shadow transition-transform duration-200", size().thumb, renderProps.isSelected ? size().translate : "translate-x-0"].join(" ");
|
|
252
|
-
_v$ !== _p$.e &&
|
|
253
|
-
_v$2 !== _p$.t &&
|
|
314
|
+
_v$ !== _p$.e && _$className4(_el$, _p$.e = _v$);
|
|
315
|
+
_v$2 !== _p$.t && _$className4(_el$2, _p$.t = _v$2);
|
|
254
316
|
return _p$;
|
|
255
317
|
}, {
|
|
256
318
|
e: void 0,
|
|
257
319
|
t: void 0
|
|
258
320
|
});
|
|
259
321
|
return _el$;
|
|
260
|
-
})(),
|
|
261
|
-
var _el$3 = _tmpl$
|
|
262
|
-
|
|
322
|
+
})(), _$memo2(() => _$memo2(() => !!local.children)() && (() => {
|
|
323
|
+
var _el$3 = _$getNextElement4(_tmpl$24);
|
|
324
|
+
_$insert4(_el$3, () => local.children);
|
|
263
325
|
return _el$3;
|
|
264
326
|
})())]
|
|
265
327
|
}));
|
|
266
328
|
}
|
|
267
329
|
|
|
268
|
-
|
|
330
|
+
// src/switch/index.tsx
|
|
331
|
+
var _tmpl$7 = /* @__PURE__ */ _$template5(`<div><div></div><div class="flex z-10 h-8 justify-around"><button type=button><span></span></button><button type=button><span>`);
|
|
269
332
|
function TabSwitch(props) {
|
|
270
333
|
const [leftSelected, setLeftSelected] = createSignal(props.value ? props.value === props.options[0]?.value : true);
|
|
271
334
|
createEffect(() => {
|
|
@@ -286,16 +349,16 @@ function TabSwitch(props) {
|
|
|
286
349
|
const textSelected = "font-extrabold text-primary-300";
|
|
287
350
|
const textUnselected = "font-medium text-primary-600 tracking-wider";
|
|
288
351
|
return (() => {
|
|
289
|
-
var _el$ = _tmpl
|
|
352
|
+
var _el$ = _$getNextElement5(_tmpl$7), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$6 = _el$4.nextSibling, _el$7 = _el$6.firstChild;
|
|
290
353
|
_el$.$$click = toggle;
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
354
|
+
_$insert5(_el$5, () => props.options[0]?.label ?? "TENDENCIAS");
|
|
355
|
+
_$insert5(_el$7, () => props.options[1]?.label ?? "\xDALTIMOS");
|
|
356
|
+
_$effect5((_p$) => {
|
|
294
357
|
var _v$ = `relative bg-bg-400 rounded-full w-[250px] cursor-pointer ${props.class ?? ""}`, _v$2 = `${leftSelected() ? leftSelectedStyle : rightSelectedStyle} transition-all duration-500 ease-in-out z-0 absolute bg-primary-600 rounded-full h-8 border-accent-300`, _v$3 = `${leftSelected() ? textSelected : textUnselected} transition-all ease-in-out duration-500 z-10 text-lg flex justify-center items-center pointer-events-none`, _v$4 = `${leftSelected() ? textUnselected : textSelected} transition-all ease-in-out duration-500 z-10 text-lg flex justify-center items-center pointer-events-none`;
|
|
295
|
-
_v$ !== _p$.e &&
|
|
296
|
-
_v$2 !== _p$.t &&
|
|
297
|
-
_v$3 !== _p$.a &&
|
|
298
|
-
_v$4 !== _p$.o &&
|
|
358
|
+
_v$ !== _p$.e && _$className5(_el$, _p$.e = _v$);
|
|
359
|
+
_v$2 !== _p$.t && _$className5(_el$2, _p$.t = _v$2);
|
|
360
|
+
_v$3 !== _p$.a && _$className5(_el$4, _p$.a = _v$3);
|
|
361
|
+
_v$4 !== _p$.o && _$className5(_el$6, _p$.o = _v$4);
|
|
299
362
|
return _p$;
|
|
300
363
|
}, {
|
|
301
364
|
e: void 0,
|
|
@@ -303,13 +366,32 @@ function TabSwitch(props) {
|
|
|
303
366
|
a: void 0,
|
|
304
367
|
o: void 0
|
|
305
368
|
});
|
|
369
|
+
_$runHydrationEvents2();
|
|
306
370
|
return _el$;
|
|
307
371
|
})();
|
|
308
372
|
}
|
|
309
|
-
|
|
373
|
+
_$delegateEvents2(["click"]);
|
|
310
374
|
|
|
311
|
-
|
|
312
|
-
|
|
375
|
+
// src/checkbox/index.tsx
|
|
376
|
+
import { template as _$template6 } from "solid-js/web";
|
|
377
|
+
import { memo as _$memo4 } from "solid-js/web";
|
|
378
|
+
import { className as _$className6 } from "solid-js/web";
|
|
379
|
+
import { insert as _$insert6 } from "solid-js/web";
|
|
380
|
+
import { createComponent as _$createComponent6 } from "solid-js/web";
|
|
381
|
+
import { mergeProps as _$mergeProps3 } from "solid-js/web";
|
|
382
|
+
import { setAttribute as _$setAttribute2 } from "solid-js/web";
|
|
383
|
+
import { effect as _$effect6 } from "solid-js/web";
|
|
384
|
+
import { getNextElement as _$getNextElement6 } from "solid-js/web";
|
|
385
|
+
import { splitProps as splitProps3, mergeProps as solidMergeProps3, Show as Show4 } from "solid-js";
|
|
386
|
+
import { Checkbox as HeadlessCheckbox, CheckboxGroup as HeadlessCheckboxGroup } from "@proyecto-viviana/solidaria-components";
|
|
387
|
+
var _tmpl$8 = /* @__PURE__ */ _$template6(`<svg viewBox="0 0 12 10"fill=none xmlns=http://www.w3.org/2000/svg><path d="M1 5L4.5 8.5L11 1"stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round>`);
|
|
388
|
+
var _tmpl$25 = /* @__PURE__ */ _$template6(`<svg viewBox="0 0 12 2"fill=none xmlns=http://www.w3.org/2000/svg><path d="M1 1H11"stroke=currentColor stroke-width=2 stroke-linecap=round>`);
|
|
389
|
+
var _tmpl$34 = /* @__PURE__ */ _$template6(`<span>`);
|
|
390
|
+
var _tmpl$43 = /* @__PURE__ */ _$template6(`<span class="text-sm font-medium text-primary-200">`);
|
|
391
|
+
var _tmpl$52 = /* @__PURE__ */ _$template6(`<div class="flex flex-col gap-2">`);
|
|
392
|
+
var _tmpl$62 = /* @__PURE__ */ _$template6(`<span class="text-sm text-primary-400">`);
|
|
393
|
+
var _tmpl$72 = /* @__PURE__ */ _$template6(`<span class="text-sm text-danger-400">`);
|
|
394
|
+
var sizeStyles4 = {
|
|
313
395
|
sm: {
|
|
314
396
|
box: "h-4 w-4",
|
|
315
397
|
icon: "h-3 w-3",
|
|
@@ -328,15 +410,15 @@ const sizeStyles$3 = {
|
|
|
328
410
|
};
|
|
329
411
|
function CheckIcon(props) {
|
|
330
412
|
return (() => {
|
|
331
|
-
var _el$ = _tmpl
|
|
332
|
-
|
|
413
|
+
var _el$ = _$getNextElement6(_tmpl$8);
|
|
414
|
+
_$effect6(() => _$setAttribute2(_el$, "class", props.class));
|
|
333
415
|
return _el$;
|
|
334
416
|
})();
|
|
335
417
|
}
|
|
336
418
|
function IndeterminateIcon(props) {
|
|
337
419
|
return (() => {
|
|
338
|
-
var _el$2 = _tmpl$
|
|
339
|
-
|
|
420
|
+
var _el$2 = _$getNextElement6(_tmpl$25);
|
|
421
|
+
_$effect6(() => _$setAttribute2(_el$2, "class", props.class));
|
|
340
422
|
return _el$2;
|
|
341
423
|
})();
|
|
342
424
|
}
|
|
@@ -344,16 +426,16 @@ function Checkbox(props) {
|
|
|
344
426
|
const defaultProps = {
|
|
345
427
|
size: "md"
|
|
346
428
|
};
|
|
347
|
-
const merged =
|
|
348
|
-
const [local, headlessProps] =
|
|
349
|
-
const size = () =>
|
|
429
|
+
const merged = solidMergeProps3(defaultProps, props);
|
|
430
|
+
const [local, headlessProps] = splitProps3(merged, ["size", "class", "children"]);
|
|
431
|
+
const size = () => sizeStyles4[local.size];
|
|
350
432
|
const getClassName = (renderProps) => {
|
|
351
433
|
const base = "inline-flex items-center gap-2 cursor-pointer";
|
|
352
434
|
const disabledClass = renderProps.isDisabled ? "cursor-not-allowed opacity-50" : "";
|
|
353
435
|
const custom = local.class || "";
|
|
354
436
|
return [base, disabledClass, custom].filter(Boolean).join(" ");
|
|
355
437
|
};
|
|
356
|
-
return
|
|
438
|
+
return _$createComponent6(HeadlessCheckbox, _$mergeProps3(headlessProps, {
|
|
357
439
|
"class": getClassName,
|
|
358
440
|
children: (renderProps) => {
|
|
359
441
|
const boxClasses = () => {
|
|
@@ -384,36 +466,36 @@ function Checkbox(props) {
|
|
|
384
466
|
return [base, sizeClass, disabledClass].filter(Boolean).join(" ");
|
|
385
467
|
};
|
|
386
468
|
return [(() => {
|
|
387
|
-
var _el$3 = _tmpl$
|
|
388
|
-
|
|
469
|
+
var _el$3 = _$getNextElement6(_tmpl$34);
|
|
470
|
+
_$insert6(_el$3, _$createComponent6(Show4, {
|
|
389
471
|
get when() {
|
|
390
472
|
return !renderProps.isIndeterminate;
|
|
391
473
|
},
|
|
392
474
|
get fallback() {
|
|
393
|
-
return
|
|
475
|
+
return _$createComponent6(IndeterminateIcon, {
|
|
394
476
|
get ["class"]() {
|
|
395
477
|
return iconClasses();
|
|
396
478
|
}
|
|
397
479
|
});
|
|
398
480
|
},
|
|
399
481
|
get children() {
|
|
400
|
-
return
|
|
482
|
+
return _$createComponent6(CheckIcon, {
|
|
401
483
|
get ["class"]() {
|
|
402
484
|
return iconClasses();
|
|
403
485
|
}
|
|
404
486
|
});
|
|
405
487
|
}
|
|
406
488
|
}));
|
|
407
|
-
|
|
489
|
+
_$effect6(() => _$className6(_el$3, boxClasses()));
|
|
408
490
|
return _el$3;
|
|
409
|
-
})(),
|
|
491
|
+
})(), _$createComponent6(Show4, {
|
|
410
492
|
get when() {
|
|
411
493
|
return local.children;
|
|
412
494
|
},
|
|
413
495
|
get children() {
|
|
414
|
-
var _el$4 = _tmpl$
|
|
415
|
-
|
|
416
|
-
|
|
496
|
+
var _el$4 = _$getNextElement6(_tmpl$34);
|
|
497
|
+
_$insert6(_el$4, () => local.children);
|
|
498
|
+
_$effect6(() => _$className6(_el$4, labelClasses()));
|
|
417
499
|
return _el$4;
|
|
418
500
|
}
|
|
419
501
|
})];
|
|
@@ -421,54 +503,69 @@ function Checkbox(props) {
|
|
|
421
503
|
}));
|
|
422
504
|
}
|
|
423
505
|
function CheckboxGroup(props) {
|
|
424
|
-
const [local, headlessProps] =
|
|
506
|
+
const [local, headlessProps] = splitProps3(props, ["class", "children", "label", "description", "errorMessage"]);
|
|
425
507
|
const getClassName = (renderProps) => {
|
|
426
508
|
const base = "flex flex-col gap-2";
|
|
427
509
|
const disabledClass = renderProps.isDisabled ? "opacity-50" : "";
|
|
428
510
|
const custom = local.class || "";
|
|
429
511
|
return [base, disabledClass, custom].filter(Boolean).join(" ");
|
|
430
512
|
};
|
|
431
|
-
const renderChildren = (renderProps) => [
|
|
513
|
+
const renderChildren = (renderProps) => [_$createComponent6(Show4, {
|
|
432
514
|
get when() {
|
|
433
515
|
return local.label;
|
|
434
516
|
},
|
|
435
517
|
get children() {
|
|
436
|
-
var _el$5 = _tmpl$
|
|
437
|
-
|
|
518
|
+
var _el$5 = _$getNextElement6(_tmpl$43);
|
|
519
|
+
_$insert6(_el$5, () => local.label);
|
|
438
520
|
return _el$5;
|
|
439
521
|
}
|
|
440
522
|
}), (() => {
|
|
441
|
-
var _el$6 = _tmpl$
|
|
442
|
-
|
|
523
|
+
var _el$6 = _$getNextElement6(_tmpl$52);
|
|
524
|
+
_$insert6(_el$6, () => local.children);
|
|
443
525
|
return _el$6;
|
|
444
|
-
})(),
|
|
526
|
+
})(), _$createComponent6(Show4, {
|
|
445
527
|
get when() {
|
|
446
|
-
return
|
|
528
|
+
return _$memo4(() => !!local.description)() && !renderProps.isInvalid;
|
|
447
529
|
},
|
|
448
530
|
get children() {
|
|
449
|
-
var _el$7 = _tmpl$
|
|
450
|
-
|
|
531
|
+
var _el$7 = _$getNextElement6(_tmpl$62);
|
|
532
|
+
_$insert6(_el$7, () => local.description);
|
|
451
533
|
return _el$7;
|
|
452
534
|
}
|
|
453
|
-
}),
|
|
535
|
+
}), _$createComponent6(Show4, {
|
|
454
536
|
get when() {
|
|
455
|
-
return
|
|
537
|
+
return _$memo4(() => !!local.errorMessage)() && renderProps.isInvalid;
|
|
456
538
|
},
|
|
457
539
|
get children() {
|
|
458
|
-
var _el$8 = _tmpl$
|
|
459
|
-
|
|
540
|
+
var _el$8 = _$getNextElement6(_tmpl$72);
|
|
541
|
+
_$insert6(_el$8, () => local.errorMessage);
|
|
460
542
|
return _el$8;
|
|
461
543
|
}
|
|
462
544
|
})];
|
|
463
|
-
return
|
|
545
|
+
return _$createComponent6(HeadlessCheckboxGroup, _$mergeProps3(headlessProps, {
|
|
464
546
|
"class": getClassName,
|
|
465
547
|
children: renderChildren
|
|
466
548
|
}));
|
|
467
549
|
}
|
|
468
550
|
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
551
|
+
// src/radio/index.tsx
|
|
552
|
+
import { template as _$template7 } from "solid-js/web";
|
|
553
|
+
import { className as _$className7 } from "solid-js/web";
|
|
554
|
+
import { effect as _$effect7 } from "solid-js/web";
|
|
555
|
+
import { mergeProps as _$mergeProps4 } from "solid-js/web";
|
|
556
|
+
import { memo as _$memo5 } from "solid-js/web";
|
|
557
|
+
import { createComponent as _$createComponent7 } from "solid-js/web";
|
|
558
|
+
import { getNextElement as _$getNextElement7 } from "solid-js/web";
|
|
559
|
+
import { insert as _$insert7 } from "solid-js/web";
|
|
560
|
+
import { Show as Show5, createContext, useContext, splitProps as splitProps4 } from "solid-js";
|
|
561
|
+
import { RadioGroup as HeadlessRadioGroup, Radio as HeadlessRadio } from "@proyecto-viviana/solidaria-components";
|
|
562
|
+
var _tmpl$9 = /* @__PURE__ */ _$template7(`<span class="text-primary-200 font-medium mb-1">`);
|
|
563
|
+
var _tmpl$26 = /* @__PURE__ */ _$template7(`<span class="text-primary-400 text-sm">`);
|
|
564
|
+
var _tmpl$35 = /* @__PURE__ */ _$template7(`<span class="text-danger-400 text-sm">`);
|
|
565
|
+
var _tmpl$44 = /* @__PURE__ */ _$template7(`<span><span>`);
|
|
566
|
+
var _tmpl$53 = /* @__PURE__ */ _$template7(`<span>`);
|
|
567
|
+
var RadioSizeContext = createContext("md");
|
|
568
|
+
var sizeStyles5 = {
|
|
472
569
|
sm: {
|
|
473
570
|
circle: "h-4 w-4",
|
|
474
571
|
dot: "h-2 w-2",
|
|
@@ -486,7 +583,7 @@ const sizeStyles$2 = {
|
|
|
486
583
|
}
|
|
487
584
|
};
|
|
488
585
|
function RadioGroup(props) {
|
|
489
|
-
const [local, headlessProps] =
|
|
586
|
+
const [local, headlessProps] = splitProps4(props, ["size", "class", "label", "description", "errorMessage", "children"]);
|
|
490
587
|
const size = local.size ?? "md";
|
|
491
588
|
const customClass = local.class ?? "";
|
|
492
589
|
const getClassName = (renderProps) => {
|
|
@@ -495,38 +592,38 @@ function RadioGroup(props) {
|
|
|
495
592
|
const disabledClass = renderProps.isDisabled ? "opacity-50" : "";
|
|
496
593
|
return [base, orientationClass, disabledClass, customClass].filter(Boolean).join(" ");
|
|
497
594
|
};
|
|
498
|
-
const renderChildren = (renderProps) => [
|
|
595
|
+
const renderChildren = (renderProps) => [_$createComponent7(Show5, {
|
|
499
596
|
get when() {
|
|
500
597
|
return local.label;
|
|
501
598
|
},
|
|
502
599
|
get children() {
|
|
503
|
-
var _el$ = _tmpl
|
|
504
|
-
|
|
600
|
+
var _el$ = _$getNextElement7(_tmpl$9);
|
|
601
|
+
_$insert7(_el$, () => local.label);
|
|
505
602
|
return _el$;
|
|
506
603
|
}
|
|
507
|
-
}),
|
|
604
|
+
}), _$memo5(() => _$memo5(() => typeof local.children === "function")() ? local.children(renderProps) : local.children), _$createComponent7(Show5, {
|
|
508
605
|
get when() {
|
|
509
|
-
return
|
|
606
|
+
return _$memo5(() => !!local.description)() && !renderProps.isInvalid;
|
|
510
607
|
},
|
|
511
608
|
get children() {
|
|
512
|
-
var _el$2 = _tmpl$
|
|
513
|
-
|
|
609
|
+
var _el$2 = _$getNextElement7(_tmpl$26);
|
|
610
|
+
_$insert7(_el$2, () => local.description);
|
|
514
611
|
return _el$2;
|
|
515
612
|
}
|
|
516
|
-
}),
|
|
613
|
+
}), _$createComponent7(Show5, {
|
|
517
614
|
get when() {
|
|
518
|
-
return
|
|
615
|
+
return _$memo5(() => !!local.errorMessage)() && renderProps.isInvalid;
|
|
519
616
|
},
|
|
520
617
|
get children() {
|
|
521
|
-
var _el$3 = _tmpl$
|
|
522
|
-
|
|
618
|
+
var _el$3 = _$getNextElement7(_tmpl$35);
|
|
619
|
+
_$insert7(_el$3, () => local.errorMessage);
|
|
523
620
|
return _el$3;
|
|
524
621
|
}
|
|
525
622
|
})];
|
|
526
|
-
return
|
|
623
|
+
return _$createComponent7(RadioSizeContext.Provider, {
|
|
527
624
|
value: size,
|
|
528
625
|
get children() {
|
|
529
|
-
return
|
|
626
|
+
return _$createComponent7(HeadlessRadioGroup, _$mergeProps4(headlessProps, {
|
|
530
627
|
"class": getClassName,
|
|
531
628
|
"data-size": size,
|
|
532
629
|
children: renderChildren
|
|
@@ -536,7 +633,7 @@ function RadioGroup(props) {
|
|
|
536
633
|
}
|
|
537
634
|
function Radio(props) {
|
|
538
635
|
const sizeFromContext = useContext(RadioSizeContext);
|
|
539
|
-
const size = () =>
|
|
636
|
+
const size = () => sizeStyles5[sizeFromContext];
|
|
540
637
|
const customClass = props.class ?? "";
|
|
541
638
|
const getClassName = (renderProps) => {
|
|
542
639
|
const base = "inline-flex items-center gap-2 cursor-pointer";
|
|
@@ -548,7 +645,7 @@ function Radio(props) {
|
|
|
548
645
|
children,
|
|
549
646
|
...headlessProps
|
|
550
647
|
} = props;
|
|
551
|
-
return
|
|
648
|
+
return _$createComponent7(HeadlessRadio, _$mergeProps4(headlessProps, {
|
|
552
649
|
"class": getClassName,
|
|
553
650
|
children: (renderProps) => {
|
|
554
651
|
const circleClasses = () => {
|
|
@@ -580,23 +677,23 @@ function Radio(props) {
|
|
|
580
677
|
};
|
|
581
678
|
const resolvedChildren = typeof children === "function" ? children(renderProps) : children;
|
|
582
679
|
return [(() => {
|
|
583
|
-
var _el$4 = _tmpl$
|
|
584
|
-
|
|
680
|
+
var _el$4 = _$getNextElement7(_tmpl$44), _el$5 = _el$4.firstChild;
|
|
681
|
+
_$effect7((_p$) => {
|
|
585
682
|
var _v$ = circleClasses(), _v$2 = dotClasses();
|
|
586
|
-
_v$ !== _p$.e &&
|
|
587
|
-
_v$2 !== _p$.t &&
|
|
683
|
+
_v$ !== _p$.e && _$className7(_el$4, _p$.e = _v$);
|
|
684
|
+
_v$2 !== _p$.t && _$className7(_el$5, _p$.t = _v$2);
|
|
588
685
|
return _p$;
|
|
589
686
|
}, {
|
|
590
687
|
e: void 0,
|
|
591
688
|
t: void 0
|
|
592
689
|
});
|
|
593
690
|
return _el$4;
|
|
594
|
-
})(),
|
|
691
|
+
})(), _$createComponent7(Show5, {
|
|
595
692
|
when: resolvedChildren,
|
|
596
693
|
get children() {
|
|
597
|
-
var _el$6 = _tmpl$
|
|
598
|
-
|
|
599
|
-
|
|
694
|
+
var _el$6 = _$getNextElement7(_tmpl$53);
|
|
695
|
+
_$insert7(_el$6, resolvedChildren);
|
|
696
|
+
_$effect7(() => _$className7(_el$6, labelClasses()));
|
|
600
697
|
return _el$6;
|
|
601
698
|
}
|
|
602
699
|
})];
|
|
@@ -604,8 +701,31 @@ function Radio(props) {
|
|
|
604
701
|
}));
|
|
605
702
|
}
|
|
606
703
|
|
|
607
|
-
|
|
608
|
-
|
|
704
|
+
// src/dialog/index.tsx
|
|
705
|
+
import { template as _$template9 } from "solid-js/web";
|
|
706
|
+
import { className as _$className9 } from "solid-js/web";
|
|
707
|
+
import { effect as _$effect9 } from "solid-js/web";
|
|
708
|
+
import { getNextMarker as _$getNextMarker4 } from "solid-js/web";
|
|
709
|
+
import { memo as _$memo7 } from "solid-js/web";
|
|
710
|
+
import { createComponent as _$createComponent8 } from "solid-js/web";
|
|
711
|
+
import { getNextElement as _$getNextElement9 } from "solid-js/web";
|
|
712
|
+
import { insert as _$insert9 } from "solid-js/web";
|
|
713
|
+
import { Show as Show6 } from "solid-js";
|
|
714
|
+
|
|
715
|
+
// src/custom/chip/index.tsx
|
|
716
|
+
import { template as _$template8 } from "solid-js/web";
|
|
717
|
+
import { delegateEvents as _$delegateEvents3 } from "solid-js/web";
|
|
718
|
+
import { className as _$className8 } from "solid-js/web";
|
|
719
|
+
import { effect as _$effect8 } from "solid-js/web";
|
|
720
|
+
import { getNextElement as _$getNextElement8 } from "solid-js/web";
|
|
721
|
+
import { runHydrationEvents as _$runHydrationEvents3 } from "solid-js/web";
|
|
722
|
+
import { getNextMarker as _$getNextMarker3 } from "solid-js/web";
|
|
723
|
+
import { insert as _$insert8 } from "solid-js/web";
|
|
724
|
+
import { memo as _$memo6 } from "solid-js/web";
|
|
725
|
+
import { addEventListener as _$addEventListener2 } from "solid-js/web";
|
|
726
|
+
var _tmpl$10 = /* @__PURE__ */ _$template8(`<button><!$><!/><span>`);
|
|
727
|
+
var _tmpl$27 = /* @__PURE__ */ _$template8(`<span class=mr-1.5>`);
|
|
728
|
+
var variantStyles3 = {
|
|
609
729
|
primary: "bg-primary-700 text-primary-200 shadow-primary-chip",
|
|
610
730
|
secondary: "bg-primary-600 text-primary-100 hover:bg-primary-500",
|
|
611
731
|
accent: "bg-accent text-white",
|
|
@@ -614,51 +734,56 @@ const variantStyles$3 = {
|
|
|
614
734
|
function Chip(props) {
|
|
615
735
|
const variant = () => props.variant ?? "primary";
|
|
616
736
|
return (() => {
|
|
617
|
-
var _el$ = _tmpl
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
var _c$ =
|
|
737
|
+
var _el$ = _$getNextElement8(_tmpl$10), _el$3 = _el$.firstChild, [_el$4, _co$] = _$getNextMarker3(_el$3.nextSibling), _el$2 = _el$4.nextSibling;
|
|
738
|
+
_$addEventListener2(_el$, "click", props.onClick, true);
|
|
739
|
+
_$insert8(_el$, (() => {
|
|
740
|
+
var _c$ = _$memo6(() => !!props.icon);
|
|
621
741
|
return () => _c$() && (() => {
|
|
622
|
-
var _el$
|
|
623
|
-
|
|
624
|
-
return _el$
|
|
742
|
+
var _el$5 = _$getNextElement8(_tmpl$27);
|
|
743
|
+
_$insert8(_el$5, () => props.icon);
|
|
744
|
+
return _el$5;
|
|
625
745
|
})();
|
|
626
|
-
})(), _el$
|
|
627
|
-
|
|
628
|
-
|
|
746
|
+
})(), _el$4, _co$);
|
|
747
|
+
_$insert8(_el$2, () => props.text);
|
|
748
|
+
_$effect8(() => _$className8(_el$, `flex justify-center items-center h-6 w-auto rounded-full px-4 py-1 font-medium text-sm tracking-wide transition-colors ${variantStyles3[variant()]} ${props.class ?? ""}`));
|
|
749
|
+
_$runHydrationEvents3();
|
|
629
750
|
return _el$;
|
|
630
751
|
})();
|
|
631
752
|
}
|
|
632
|
-
|
|
753
|
+
_$delegateEvents3(["click"]);
|
|
633
754
|
|
|
634
|
-
|
|
755
|
+
// src/dialog/index.tsx
|
|
756
|
+
var _tmpl$11 = /* @__PURE__ */ _$template9(`<span class="text-base font-normal text-primary-300">`);
|
|
757
|
+
var _tmpl$28 = /* @__PURE__ */ _$template9(`<div class="flex flex-1 flex-row items-end justify-center gap-5 py-5"><!$><!/><!$><!/>`);
|
|
758
|
+
var _tmpl$36 = /* @__PURE__ */ _$template9(`<div class="relative bottom-4 right-4 w-full"><div class="flex flex-row justify-end gap-2 pr-4">`);
|
|
759
|
+
var _tmpl$45 = /* @__PURE__ */ _$template9(`<div><span class="relative left-8 top-4 bg-gradient-to-b from-primary-100 to-primary-500 bg-clip-text text-4xl font-extrabold text-transparent"></span><div class="flex h-[50px] flex-col justify-end rounded-t-[26px] bg-primary-800"><div class="flex h-[40px] flex-col justify-end rounded-t-[30px] bg-primary-600"><div class="flex h-[20px] items-center justify-end rounded-t-[100px] bg-primary-700 pr-4"></div></div></div><div class="mt-1 flex min-h-[200px] flex-col rounded-b-[26px] rounded-t-lg border-b border-accent-500 bg-bg-300"><div class="flex flex-1 flex-col p-4"><div class="text-lg text-gray-100"></div><!$><!/></div></div><!$><!/>`);
|
|
635
760
|
function Dialog(props) {
|
|
636
761
|
return (() => {
|
|
637
|
-
var _el$ = _tmpl$
|
|
638
|
-
|
|
639
|
-
|
|
762
|
+
var _el$ = _$getNextElement9(_tmpl$45), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$7 = _el$3.nextSibling, _el$8 = _el$7.firstChild, _el$9 = _el$8.firstChild, _el$13 = _el$9.nextSibling, [_el$14, _co$3] = _$getNextMarker4(_el$13.nextSibling), _el$17 = _el$7.nextSibling, [_el$18, _co$4] = _$getNextMarker4(_el$17.nextSibling);
|
|
763
|
+
_$insert9(_el$2, () => props.title);
|
|
764
|
+
_$insert9(_el$5, _$createComponent8(Show6, {
|
|
640
765
|
get when() {
|
|
641
766
|
return props.subtitle;
|
|
642
767
|
},
|
|
643
768
|
get children() {
|
|
644
|
-
var _el$6 = _tmpl
|
|
645
|
-
|
|
769
|
+
var _el$6 = _$getNextElement9(_tmpl$11);
|
|
770
|
+
_$insert9(_el$6, () => props.subtitle);
|
|
646
771
|
return _el$6;
|
|
647
772
|
}
|
|
648
773
|
}));
|
|
649
|
-
|
|
650
|
-
|
|
774
|
+
_$insert9(_el$9, () => props.children);
|
|
775
|
+
_$insert9(_el$8, _$createComponent8(Show6, {
|
|
651
776
|
get when() {
|
|
652
777
|
return props.primaryAction || props.secondaryAction;
|
|
653
778
|
},
|
|
654
779
|
get children() {
|
|
655
|
-
var _el$0 = _tmpl$2$
|
|
656
|
-
|
|
780
|
+
var _el$0 = _$getNextElement9(_tmpl$28), _el$1 = _el$0.firstChild, [_el$10, _co$] = _$getNextMarker4(_el$1.nextSibling), _el$11 = _el$10.nextSibling, [_el$12, _co$2] = _$getNextMarker4(_el$11.nextSibling);
|
|
781
|
+
_$insert9(_el$0, _$createComponent8(Show6, {
|
|
657
782
|
get when() {
|
|
658
783
|
return props.secondaryAction;
|
|
659
784
|
},
|
|
660
785
|
get children() {
|
|
661
|
-
return
|
|
786
|
+
return _$createComponent8(Button, {
|
|
662
787
|
variant: "primary",
|
|
663
788
|
buttonStyle: "outline",
|
|
664
789
|
get onPress() {
|
|
@@ -669,13 +794,13 @@ function Dialog(props) {
|
|
|
669
794
|
}
|
|
670
795
|
});
|
|
671
796
|
}
|
|
672
|
-
}),
|
|
673
|
-
|
|
797
|
+
}), _el$10, _co$);
|
|
798
|
+
_$insert9(_el$0, _$createComponent8(Show6, {
|
|
674
799
|
get when() {
|
|
675
800
|
return props.primaryAction;
|
|
676
801
|
},
|
|
677
802
|
get children() {
|
|
678
|
-
return
|
|
803
|
+
return _$createComponent8(Button, {
|
|
679
804
|
variant: "primary",
|
|
680
805
|
get onPress() {
|
|
681
806
|
return props.primaryAction.onClick;
|
|
@@ -685,37 +810,55 @@ function Dialog(props) {
|
|
|
685
810
|
}
|
|
686
811
|
});
|
|
687
812
|
}
|
|
688
|
-
}),
|
|
813
|
+
}), _el$12, _co$2);
|
|
689
814
|
return _el$0;
|
|
690
815
|
}
|
|
691
|
-
}),
|
|
692
|
-
|
|
816
|
+
}), _el$14, _co$3);
|
|
817
|
+
_$insert9(_el$, _$createComponent8(Show6, {
|
|
693
818
|
get when() {
|
|
694
|
-
return
|
|
819
|
+
return _$memo7(() => !!props.tags)() && props.tags.length > 0;
|
|
695
820
|
},
|
|
696
821
|
get children() {
|
|
697
|
-
var _el$
|
|
698
|
-
|
|
822
|
+
var _el$15 = _$getNextElement9(_tmpl$36), _el$16 = _el$15.firstChild;
|
|
823
|
+
_$insert9(_el$16, () => props.tags.map((tag) => _$createComponent8(Chip, {
|
|
699
824
|
variant: "primary",
|
|
700
825
|
text: tag
|
|
701
826
|
})));
|
|
702
|
-
return _el$
|
|
827
|
+
return _el$15;
|
|
703
828
|
}
|
|
704
|
-
}),
|
|
705
|
-
|
|
829
|
+
}), _el$18, _co$4);
|
|
830
|
+
_$effect9(() => _$className9(_el$, `flex flex-col w-full max-w-[540px] ${props.class ?? ""}`));
|
|
706
831
|
return _el$;
|
|
707
832
|
})();
|
|
708
833
|
}
|
|
709
834
|
|
|
710
|
-
|
|
835
|
+
// src/icon/index.tsx
|
|
836
|
+
import { template as _$template11 } from "solid-js/web";
|
|
837
|
+
import { delegateEvents as _$delegateEvents4 } from "solid-js/web";
|
|
838
|
+
import { className as _$className10 } from "solid-js/web";
|
|
839
|
+
import { effect as _$effect11 } from "solid-js/web";
|
|
840
|
+
import { getNextElement as _$getNextElement11 } from "solid-js/web";
|
|
841
|
+
import { runHydrationEvents as _$runHydrationEvents4 } from "solid-js/web";
|
|
842
|
+
import { getNextMarker as _$getNextMarker5 } from "solid-js/web";
|
|
843
|
+
import { insert as _$insert10 } from "solid-js/web";
|
|
844
|
+
import { createComponent as _$createComponent9 } from "solid-js/web";
|
|
845
|
+
import { memo as _$memo8 } from "solid-js/web";
|
|
846
|
+
import { addEventListener as _$addEventListener3 } from "solid-js/web";
|
|
847
|
+
|
|
848
|
+
// src/icon/icons/GitHubIcon.tsx
|
|
849
|
+
import { template as _$template10 } from "solid-js/web";
|
|
850
|
+
import { setAttribute as _$setAttribute3 } from "solid-js/web";
|
|
851
|
+
import { effect as _$effect10 } from "solid-js/web";
|
|
852
|
+
import { getNextElement as _$getNextElement10 } from "solid-js/web";
|
|
853
|
+
var _tmpl$12 = /* @__PURE__ */ _$template10(`<svg viewBox="0 0 24 24"aria-hidden=true><path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z">`);
|
|
711
854
|
function GitHubIcon(props) {
|
|
712
855
|
return (() => {
|
|
713
|
-
var _el$ = _tmpl
|
|
714
|
-
|
|
856
|
+
var _el$ = _$getNextElement10(_tmpl$12);
|
|
857
|
+
_$effect10((_p$) => {
|
|
715
858
|
var _v$ = props.size, _v$2 = props.size, _v$3 = props.color;
|
|
716
|
-
_v$ !== _p$.e &&
|
|
717
|
-
_v$2 !== _p$.t &&
|
|
718
|
-
_v$3 !== _p$.a &&
|
|
859
|
+
_v$ !== _p$.e && _$setAttribute3(_el$, "width", _p$.e = _v$);
|
|
860
|
+
_v$2 !== _p$.t && _$setAttribute3(_el$, "height", _p$.t = _v$2);
|
|
861
|
+
_v$3 !== _p$.a && _$setAttribute3(_el$, "fill", _p$.a = _v$3);
|
|
719
862
|
return _p$;
|
|
720
863
|
}, {
|
|
721
864
|
e: void 0,
|
|
@@ -726,28 +869,30 @@ function GitHubIcon(props) {
|
|
|
726
869
|
})();
|
|
727
870
|
}
|
|
728
871
|
|
|
729
|
-
|
|
872
|
+
// src/icon/index.tsx
|
|
873
|
+
var _tmpl$13 = /* @__PURE__ */ _$template11(`<div><!$><!/><div class=vui-icon__main>`);
|
|
874
|
+
var _tmpl$29 = /* @__PURE__ */ _$template11(`<div class=vui-icon__shadow>`);
|
|
730
875
|
function Icon(props) {
|
|
731
876
|
const size = () => props.size ?? 24;
|
|
732
877
|
const color = () => props.color ?? "var(--color-primary-500)";
|
|
733
878
|
const IconComponent = props.icon;
|
|
734
879
|
return (() => {
|
|
735
|
-
var _el$ = _tmpl
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
var _c$ =
|
|
880
|
+
var _el$ = _$getNextElement11(_tmpl$13), _el$3 = _el$.firstChild, [_el$4, _co$] = _$getNextMarker5(_el$3.nextSibling), _el$2 = _el$4.nextSibling;
|
|
881
|
+
_$addEventListener3(_el$, "click", props.onClick, true);
|
|
882
|
+
_$insert10(_el$, (() => {
|
|
883
|
+
var _c$ = _$memo8(() => !!props.withShadow);
|
|
739
884
|
return () => _c$() && (() => {
|
|
740
|
-
var _el$
|
|
741
|
-
|
|
885
|
+
var _el$5 = _$getNextElement11(_tmpl$29);
|
|
886
|
+
_$insert10(_el$5, _$createComponent9(IconComponent, {
|
|
742
887
|
get size() {
|
|
743
888
|
return size();
|
|
744
889
|
},
|
|
745
890
|
color: "var(--color-accent)"
|
|
746
891
|
}));
|
|
747
|
-
return _el$
|
|
892
|
+
return _el$5;
|
|
748
893
|
})();
|
|
749
|
-
})(), _el$
|
|
750
|
-
|
|
894
|
+
})(), _el$4, _co$);
|
|
895
|
+
_$insert10(_el$2, _$createComponent9(IconComponent, {
|
|
751
896
|
get size() {
|
|
752
897
|
return size();
|
|
753
898
|
},
|
|
@@ -755,23 +900,30 @@ function Icon(props) {
|
|
|
755
900
|
return color();
|
|
756
901
|
}
|
|
757
902
|
}));
|
|
758
|
-
|
|
903
|
+
_$effect11(() => _$className10(_el$, `vui-icon ${props.withShadow ? "vui-icon--with-shadow" : ""} ${props.class ?? ""}`));
|
|
904
|
+
_$runHydrationEvents4();
|
|
759
905
|
return _el$;
|
|
760
906
|
})();
|
|
761
907
|
}
|
|
762
|
-
|
|
908
|
+
_$delegateEvents4(["click"]);
|
|
763
909
|
|
|
764
|
-
|
|
910
|
+
// src/tooltip/index.tsx
|
|
911
|
+
import { template as _$template12 } from "solid-js/web";
|
|
912
|
+
import { className as _$className11 } from "solid-js/web";
|
|
913
|
+
import { effect as _$effect12 } from "solid-js/web";
|
|
914
|
+
import { getNextElement as _$getNextElement12 } from "solid-js/web";
|
|
915
|
+
import { insert as _$insert11 } from "solid-js/web";
|
|
916
|
+
var _tmpl$14 = /* @__PURE__ */ _$template12(`<div><div class=vui-tooltip__trigger></div><div><span>`);
|
|
765
917
|
function Tooltip(props) {
|
|
766
918
|
const position = () => props.position ?? "bottom";
|
|
767
919
|
return (() => {
|
|
768
|
-
var _el$ = _tmpl
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
920
|
+
var _el$ = _$getNextElement12(_tmpl$14), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.firstChild;
|
|
921
|
+
_$insert11(_el$2, () => props.children);
|
|
922
|
+
_$insert11(_el$4, () => props.label);
|
|
923
|
+
_$effect12((_p$) => {
|
|
772
924
|
var _v$ = `vui-tooltip ${props.class ?? ""}`, _v$2 = `vui-tooltip__content vui-tooltip__content--${position()}`;
|
|
773
|
-
_v$ !== _p$.e &&
|
|
774
|
-
_v$2 !== _p$.t &&
|
|
925
|
+
_v$ !== _p$.e && _$className11(_el$, _p$.e = _v$);
|
|
926
|
+
_v$2 !== _p$.t && _$className11(_el$3, _p$.t = _v$2);
|
|
775
927
|
return _p$;
|
|
776
928
|
}, {
|
|
777
929
|
e: void 0,
|
|
@@ -781,26 +933,45 @@ function Tooltip(props) {
|
|
|
781
933
|
})();
|
|
782
934
|
}
|
|
783
935
|
|
|
936
|
+
// src/textfield/index.tsx
|
|
937
|
+
import { template as _$template13 } from "solid-js/web";
|
|
938
|
+
import { setAttribute as _$setAttribute4 } from "solid-js/web";
|
|
939
|
+
import { className as _$className12 } from "solid-js/web";
|
|
940
|
+
import { effect as _$effect13 } from "solid-js/web";
|
|
941
|
+
import { memo as _$memo9 } from "solid-js/web";
|
|
942
|
+
import { runHydrationEvents as _$runHydrationEvents5 } from "solid-js/web";
|
|
943
|
+
import { getNextMarker as _$getNextMarker6 } from "solid-js/web";
|
|
944
|
+
import { insert as _$insert12 } from "solid-js/web";
|
|
945
|
+
import { createComponent as _$createComponent10 } from "solid-js/web";
|
|
946
|
+
import { getNextElement as _$getNextElement13 } from "solid-js/web";
|
|
947
|
+
import { spread as _$spread } from "solid-js/web";
|
|
948
|
+
import { mergeProps as _$mergeProps5 } from "solid-js/web";
|
|
949
|
+
import { splitProps as splitProps5, mergeProps as solidMergeProps4, Show as Show7 } from "solid-js";
|
|
950
|
+
import { createTextField, createFocusRing } from "@proyecto-viviana/solidaria";
|
|
951
|
+
|
|
952
|
+
// ../solid-stately/dist/index.js
|
|
953
|
+
import { createSignal as createSignal2, createUniqueId, untrack } from "solid-js";
|
|
954
|
+
import { isServer } from "solid-js/web";
|
|
784
955
|
function access(value) {
|
|
785
956
|
return typeof value === "function" ? value() : value;
|
|
786
957
|
}
|
|
787
|
-
|
|
788
958
|
function createTextFieldState(props = {}) {
|
|
789
959
|
const getProps = () => access(props);
|
|
790
960
|
const initialProps = getProps();
|
|
791
961
|
const initialValue = initialProps.value ?? initialProps.defaultValue ?? "";
|
|
792
|
-
const [internalValue, setInternalValue] =
|
|
962
|
+
const [internalValue, setInternalValue] = createSignal2(initialValue);
|
|
793
963
|
const isControlled = () => getProps().value !== void 0;
|
|
794
964
|
const value = () => {
|
|
795
965
|
const p = getProps();
|
|
796
966
|
return isControlled() ? p.value ?? "" : internalValue();
|
|
797
967
|
};
|
|
798
968
|
function setValue(newValue) {
|
|
969
|
+
var _a;
|
|
799
970
|
const p = getProps();
|
|
800
971
|
if (!isControlled()) {
|
|
801
972
|
setInternalValue(newValue);
|
|
802
973
|
}
|
|
803
|
-
p.onChange
|
|
974
|
+
(_a = p.onChange) == null ? void 0 : _a.call(p, newValue);
|
|
804
975
|
}
|
|
805
976
|
return {
|
|
806
977
|
value,
|
|
@@ -808,8 +979,12 @@ function createTextFieldState(props = {}) {
|
|
|
808
979
|
};
|
|
809
980
|
}
|
|
810
981
|
|
|
811
|
-
|
|
812
|
-
|
|
982
|
+
// src/textfield/index.tsx
|
|
983
|
+
var _tmpl$15 = /* @__PURE__ */ _$template13(`<span class="text-danger-400 ml-0.5">*`);
|
|
984
|
+
var _tmpl$210 = /* @__PURE__ */ _$template13(`<label><!$><!/><!$><!/>`);
|
|
985
|
+
var _tmpl$37 = /* @__PURE__ */ _$template13(`<p>`);
|
|
986
|
+
var _tmpl$46 = /* @__PURE__ */ _$template13(`<div><!$><!/><input><!$><!/><!$><!/>`);
|
|
987
|
+
var sizeStyles6 = {
|
|
813
988
|
sm: {
|
|
814
989
|
input: "h-8 px-2 text-sm",
|
|
815
990
|
label: "text-sm",
|
|
@@ -831,9 +1006,9 @@ function TextField(props) {
|
|
|
831
1006
|
size: "md",
|
|
832
1007
|
variant: "outline"
|
|
833
1008
|
};
|
|
834
|
-
const merged =
|
|
835
|
-
const [local, ariaProps] =
|
|
836
|
-
const size = () =>
|
|
1009
|
+
const merged = solidMergeProps4(defaultProps, props);
|
|
1010
|
+
const [local, ariaProps] = splitProps5(merged, ["size", "variant", "class", "label", "description", "errorMessage"]);
|
|
1011
|
+
const size = () => sizeStyles6[local.size];
|
|
837
1012
|
const state = createTextFieldState(() => ({
|
|
838
1013
|
value: ariaProps.value,
|
|
839
1014
|
defaultValue: ariaProps.defaultValue,
|
|
@@ -926,74 +1101,77 @@ function TextField(props) {
|
|
|
926
1101
|
return rest;
|
|
927
1102
|
};
|
|
928
1103
|
return (() => {
|
|
929
|
-
var _el$ = _tmpl$
|
|
930
|
-
|
|
1104
|
+
var _el$ = _$getNextElement13(_tmpl$46), _el$1 = _el$.firstChild, [_el$10, _co$3] = _$getNextMarker6(_el$1.nextSibling), _el$8 = _el$10.nextSibling, _el$11 = _el$8.nextSibling, [_el$12, _co$4] = _$getNextMarker6(_el$11.nextSibling), _el$13 = _el$12.nextSibling, [_el$14, _co$5] = _$getNextMarker6(_el$13.nextSibling);
|
|
1105
|
+
_$insert12(_el$, _$createComponent10(Show7, {
|
|
931
1106
|
get when() {
|
|
932
1107
|
return local.label;
|
|
933
1108
|
},
|
|
934
1109
|
get children() {
|
|
935
|
-
var _el$2 = _tmpl$2$
|
|
936
|
-
spread(_el$2,
|
|
1110
|
+
var _el$2 = _$getNextElement13(_tmpl$210), _el$4 = _el$2.firstChild, [_el$5, _co$] = _$getNextMarker6(_el$4.nextSibling), _el$6 = _el$5.nextSibling, [_el$7, _co$2] = _$getNextMarker6(_el$6.nextSibling);
|
|
1111
|
+
_$spread(_el$2, _$mergeProps5(cleanLabelProps, {
|
|
937
1112
|
get ["class"]() {
|
|
938
1113
|
return labelClasses();
|
|
939
1114
|
}
|
|
940
1115
|
}), false, true);
|
|
941
|
-
|
|
942
|
-
|
|
1116
|
+
_$insert12(_el$2, () => local.label, _el$5, _co$);
|
|
1117
|
+
_$insert12(_el$2, _$createComponent10(Show7, {
|
|
943
1118
|
get when() {
|
|
944
1119
|
return ariaProps.isRequired;
|
|
945
1120
|
},
|
|
946
1121
|
get children() {
|
|
947
|
-
return _tmpl
|
|
1122
|
+
return _$getNextElement13(_tmpl$15);
|
|
948
1123
|
}
|
|
949
|
-
}),
|
|
1124
|
+
}), _el$7, _co$2);
|
|
1125
|
+
_$runHydrationEvents5();
|
|
950
1126
|
return _el$2;
|
|
951
1127
|
}
|
|
952
|
-
}), _el$
|
|
953
|
-
spread(_el$
|
|
1128
|
+
}), _el$10, _co$3);
|
|
1129
|
+
_$spread(_el$8, _$mergeProps5(cleanInputProps, {
|
|
954
1130
|
get ["class"]() {
|
|
955
1131
|
return inputClasses();
|
|
956
1132
|
}
|
|
957
1133
|
}), false, false);
|
|
958
|
-
|
|
1134
|
+
_$insert12(_el$, _$createComponent10(Show7, {
|
|
959
1135
|
get when() {
|
|
960
|
-
return
|
|
1136
|
+
return _$memo9(() => !!local.description)() && !textFieldAria.isInvalid;
|
|
961
1137
|
},
|
|
962
1138
|
get children() {
|
|
963
|
-
var _el$
|
|
964
|
-
spread(_el$
|
|
1139
|
+
var _el$9 = _$getNextElement13(_tmpl$37);
|
|
1140
|
+
_$spread(_el$9, _$mergeProps5(cleanDescriptionProps, {
|
|
965
1141
|
get ["class"]() {
|
|
966
1142
|
return descriptionClasses();
|
|
967
1143
|
}
|
|
968
1144
|
}), false, true);
|
|
969
|
-
|
|
970
|
-
|
|
1145
|
+
_$insert12(_el$9, () => local.description);
|
|
1146
|
+
_$runHydrationEvents5();
|
|
1147
|
+
return _el$9;
|
|
971
1148
|
}
|
|
972
|
-
}),
|
|
973
|
-
|
|
1149
|
+
}), _el$12, _co$4);
|
|
1150
|
+
_$insert12(_el$, _$createComponent10(Show7, {
|
|
974
1151
|
get when() {
|
|
975
|
-
return
|
|
1152
|
+
return _$memo9(() => !!local.errorMessage)() && textFieldAria.isInvalid;
|
|
976
1153
|
},
|
|
977
1154
|
get children() {
|
|
978
|
-
var _el$
|
|
979
|
-
spread(_el$
|
|
1155
|
+
var _el$0 = _$getNextElement13(_tmpl$37);
|
|
1156
|
+
_$spread(_el$0, _$mergeProps5(cleanErrorMessageProps, {
|
|
980
1157
|
get ["class"]() {
|
|
981
1158
|
return errorClasses();
|
|
982
1159
|
}
|
|
983
1160
|
}), false, true);
|
|
984
|
-
|
|
985
|
-
|
|
1161
|
+
_$insert12(_el$0, () => local.errorMessage);
|
|
1162
|
+
_$runHydrationEvents5();
|
|
1163
|
+
return _el$0;
|
|
986
1164
|
}
|
|
987
|
-
}),
|
|
988
|
-
|
|
1165
|
+
}), _el$14, _co$5);
|
|
1166
|
+
_$effect13((_p$) => {
|
|
989
1167
|
var _v$ = containerClasses(), _v$2 = ariaProps.isDisabled || void 0, _v$3 = textFieldAria.isInvalid || void 0, _v$4 = ariaProps.isReadOnly || void 0, _v$5 = ariaProps.isRequired || void 0, _v$6 = isFocused() || void 0, _v$7 = isFocusVisible() || void 0;
|
|
990
|
-
_v$ !== _p$.e &&
|
|
991
|
-
_v$2 !== _p$.t &&
|
|
992
|
-
_v$3 !== _p$.a &&
|
|
993
|
-
_v$4 !== _p$.o &&
|
|
994
|
-
_v$5 !== _p$.i &&
|
|
995
|
-
_v$6 !== _p$.n &&
|
|
996
|
-
_v$7 !== _p$.s &&
|
|
1168
|
+
_v$ !== _p$.e && _$className12(_el$, _p$.e = _v$);
|
|
1169
|
+
_v$2 !== _p$.t && _$setAttribute4(_el$, "data-disabled", _p$.t = _v$2);
|
|
1170
|
+
_v$3 !== _p$.a && _$setAttribute4(_el$, "data-invalid", _p$.a = _v$3);
|
|
1171
|
+
_v$4 !== _p$.o && _$setAttribute4(_el$, "data-readonly", _p$.o = _v$4);
|
|
1172
|
+
_v$5 !== _p$.i && _$setAttribute4(_el$, "data-required", _p$.i = _v$5);
|
|
1173
|
+
_v$6 !== _p$.n && _$setAttribute4(_el$, "data-focused", _p$.n = _v$6);
|
|
1174
|
+
_v$7 !== _p$.s && _$setAttribute4(_el$, "data-focus-visible", _p$.s = _v$7);
|
|
997
1175
|
return _p$;
|
|
998
1176
|
}, {
|
|
999
1177
|
e: void 0,
|
|
@@ -1004,22 +1182,28 @@ function TextField(props) {
|
|
|
1004
1182
|
n: void 0,
|
|
1005
1183
|
s: void 0
|
|
1006
1184
|
});
|
|
1185
|
+
_$runHydrationEvents5();
|
|
1007
1186
|
return _el$;
|
|
1008
1187
|
})();
|
|
1009
1188
|
}
|
|
1010
1189
|
|
|
1011
|
-
|
|
1190
|
+
// src/link/index.tsx
|
|
1191
|
+
import { createComponent as _$createComponent11 } from "solid-js/web";
|
|
1192
|
+
import { mergeProps as _$mergeProps6 } from "solid-js/web";
|
|
1193
|
+
import { splitProps as splitProps6 } from "solid-js";
|
|
1194
|
+
import { Link as HeadlessLink } from "@proyecto-viviana/solidaria-components";
|
|
1195
|
+
var variantStyles4 = {
|
|
1012
1196
|
primary: "text-accent hover:text-accent-300",
|
|
1013
1197
|
secondary: "text-primary-300 hover:text-primary-200",
|
|
1014
1198
|
subtle: "text-primary-400 hover:text-primary-300"
|
|
1015
1199
|
};
|
|
1016
1200
|
function Link(props) {
|
|
1017
|
-
const [local, headlessProps] =
|
|
1201
|
+
const [local, headlessProps] = splitProps6(props, ["variant", "isStandalone", "isQuiet", "class", "children"]);
|
|
1018
1202
|
const variant = local.variant ?? "primary";
|
|
1019
1203
|
const customClass = local.class ?? "";
|
|
1020
1204
|
const getClassName = (renderProps) => {
|
|
1021
1205
|
const base = "transition-colors duration-200 cursor-pointer rounded-sm outline-none";
|
|
1022
|
-
const variantClass =
|
|
1206
|
+
const variantClass = variantStyles4[variant];
|
|
1023
1207
|
let underlineClass;
|
|
1024
1208
|
if (local.isStandalone && local.isQuiet) {
|
|
1025
1209
|
underlineClass = renderProps.isHovered || renderProps.isFocusVisible ? "underline" : "no-underline";
|
|
@@ -1032,7 +1216,7 @@ function Link(props) {
|
|
|
1032
1216
|
const pressedClass = renderProps.isPressed ? "opacity-80" : "";
|
|
1033
1217
|
return [base, variantClass, underlineClass, weightClass, focusClass, disabledClass, pressedClass, customClass].filter(Boolean).join(" ");
|
|
1034
1218
|
};
|
|
1035
|
-
return
|
|
1219
|
+
return _$createComponent11(HeadlessLink, _$mergeProps6(headlessProps, {
|
|
1036
1220
|
"class": getClassName,
|
|
1037
1221
|
get children() {
|
|
1038
1222
|
return local.children;
|
|
@@ -1040,8 +1224,26 @@ function Link(props) {
|
|
|
1040
1224
|
}));
|
|
1041
1225
|
}
|
|
1042
1226
|
|
|
1043
|
-
|
|
1044
|
-
|
|
1227
|
+
// src/progress-bar/index.tsx
|
|
1228
|
+
import { template as _$template14 } from "solid-js/web";
|
|
1229
|
+
import { setStyleProperty as _$setStyleProperty } from "solid-js/web";
|
|
1230
|
+
import { runHydrationEvents as _$runHydrationEvents6 } from "solid-js/web";
|
|
1231
|
+
import { className as _$className13 } from "solid-js/web";
|
|
1232
|
+
import { effect as _$effect14 } from "solid-js/web";
|
|
1233
|
+
import { getNextMarker as _$getNextMarker7 } from "solid-js/web";
|
|
1234
|
+
import { createComponent as _$createComponent12 } from "solid-js/web";
|
|
1235
|
+
import { getNextElement as _$getNextElement14 } from "solid-js/web";
|
|
1236
|
+
import { insert as _$insert13 } from "solid-js/web";
|
|
1237
|
+
import { memo as _$memo10 } from "solid-js/web";
|
|
1238
|
+
import { spread as _$spread2 } from "solid-js/web";
|
|
1239
|
+
import { mergeProps as _$mergeProps7 } from "solid-js/web";
|
|
1240
|
+
import { splitProps as splitProps7, Show as Show8, createMemo } from "solid-js";
|
|
1241
|
+
import { createProgressBar } from "@proyecto-viviana/solidaria";
|
|
1242
|
+
var _tmpl$16 = /* @__PURE__ */ _$template14(`<span class="text-primary-200 font-medium">`);
|
|
1243
|
+
var _tmpl$211 = /* @__PURE__ */ _$template14(`<span class=text-primary-300>`);
|
|
1244
|
+
var _tmpl$38 = /* @__PURE__ */ _$template14(`<div><!$><!/><!$><!/>`);
|
|
1245
|
+
var _tmpl$47 = /* @__PURE__ */ _$template14(`<div><!$><!/><div><div>`);
|
|
1246
|
+
var sizeStyles7 = {
|
|
1045
1247
|
sm: {
|
|
1046
1248
|
track: "h-1",
|
|
1047
1249
|
text: "text-xs"
|
|
@@ -1055,7 +1257,7 @@ const sizeStyles = {
|
|
|
1055
1257
|
text: "text-base"
|
|
1056
1258
|
}
|
|
1057
1259
|
};
|
|
1058
|
-
|
|
1260
|
+
var variantStyles5 = {
|
|
1059
1261
|
primary: "bg-primary-500",
|
|
1060
1262
|
accent: "bg-accent",
|
|
1061
1263
|
success: "bg-green-500",
|
|
@@ -1066,7 +1268,7 @@ function clamp(value, min, max) {
|
|
|
1066
1268
|
return Math.min(Math.max(value, min), max);
|
|
1067
1269
|
}
|
|
1068
1270
|
function ProgressBar(props) {
|
|
1069
|
-
const [local, ariaProps] =
|
|
1271
|
+
const [local, ariaProps] = splitProps7(props, ["size", "variant", "label", "showValueLabel", "class"]);
|
|
1070
1272
|
const size = () => local.size ?? "md";
|
|
1071
1273
|
const variant = () => local.variant ?? "primary";
|
|
1072
1274
|
const isIndeterminate = () => ariaProps.isIndeterminate ?? false;
|
|
@@ -1105,81 +1307,92 @@ function ProgressBar(props) {
|
|
|
1105
1307
|
return (clampedValue - minValue) / (maxValue - minValue) * 100;
|
|
1106
1308
|
});
|
|
1107
1309
|
const valueText = () => progressAria.progressBarProps["aria-valuetext"];
|
|
1108
|
-
const sizeConfig = () =>
|
|
1310
|
+
const sizeConfig = () => sizeStyles7[size()];
|
|
1109
1311
|
return (() => {
|
|
1110
|
-
var _el$ = _tmpl$
|
|
1111
|
-
|
|
1312
|
+
var _el$ = _$getNextElement14(_tmpl$47), _el$1 = _el$.firstChild, [_el$10, _co$3] = _$getNextMarker7(_el$1.nextSibling), _el$9 = _el$10.nextSibling, _el$0 = _el$9.firstChild;
|
|
1313
|
+
_$spread2(_el$, _$mergeProps7(() => progressAria.progressBarProps, {
|
|
1112
1314
|
get ["class"]() {
|
|
1113
1315
|
return `w-full ${local.class ?? ""}`;
|
|
1114
1316
|
}
|
|
1115
1317
|
}), false, true);
|
|
1116
|
-
|
|
1318
|
+
_$insert13(_el$, _$createComponent12(Show8, {
|
|
1117
1319
|
get when() {
|
|
1118
1320
|
return local.label || showValueLabel();
|
|
1119
1321
|
},
|
|
1120
1322
|
get children() {
|
|
1121
|
-
var _el$2 = _tmpl$
|
|
1122
|
-
|
|
1323
|
+
var _el$2 = _$getNextElement14(_tmpl$38), _el$5 = _el$2.firstChild, [_el$6, _co$] = _$getNextMarker7(_el$5.nextSibling), _el$7 = _el$6.nextSibling, [_el$8, _co$2] = _$getNextMarker7(_el$7.nextSibling);
|
|
1324
|
+
_$insert13(_el$2, _$createComponent12(Show8, {
|
|
1123
1325
|
get when() {
|
|
1124
1326
|
return local.label;
|
|
1125
1327
|
},
|
|
1126
1328
|
get children() {
|
|
1127
|
-
var _el$3 = _tmpl
|
|
1128
|
-
|
|
1329
|
+
var _el$3 = _$getNextElement14(_tmpl$16);
|
|
1330
|
+
_$insert13(_el$3, () => local.label);
|
|
1129
1331
|
return _el$3;
|
|
1130
1332
|
}
|
|
1131
|
-
}),
|
|
1132
|
-
|
|
1333
|
+
}), _el$6, _co$);
|
|
1334
|
+
_$insert13(_el$2, _$createComponent12(Show8, {
|
|
1133
1335
|
get when() {
|
|
1134
|
-
return
|
|
1336
|
+
return _$memo10(() => !!showValueLabel())() && !isIndeterminate();
|
|
1135
1337
|
},
|
|
1136
1338
|
get children() {
|
|
1137
|
-
var _el$4 = _tmpl$
|
|
1138
|
-
|
|
1339
|
+
var _el$4 = _$getNextElement14(_tmpl$211);
|
|
1340
|
+
_$insert13(_el$4, valueText);
|
|
1139
1341
|
return _el$4;
|
|
1140
1342
|
}
|
|
1141
|
-
}),
|
|
1142
|
-
|
|
1343
|
+
}), _el$8, _co$2);
|
|
1344
|
+
_$effect14(() => _$className13(_el$2, `flex justify-between items-center mb-1 ${sizeConfig().text}`));
|
|
1143
1345
|
return _el$2;
|
|
1144
1346
|
}
|
|
1145
|
-
}), _el$
|
|
1146
|
-
|
|
1147
|
-
var _v$ = `w-full ${sizeConfig().track} bg-bg-300 rounded-full overflow-hidden`, _v$2 = `h-full rounded-full transition-all duration-300 ${
|
|
1148
|
-
_v$ !== _p$.e &&
|
|
1149
|
-
_v$2 !== _p$.t &&
|
|
1150
|
-
_v$3 !== _p$.a && setStyleProperty(_el$
|
|
1347
|
+
}), _el$10, _co$3);
|
|
1348
|
+
_$effect14((_p$) => {
|
|
1349
|
+
var _v$ = `w-full ${sizeConfig().track} bg-bg-300 rounded-full overflow-hidden`, _v$2 = `h-full rounded-full transition-all duration-300 ${variantStyles5[variant()]} ${isIndeterminate() ? "animate-progress-indeterminate" : ""}`, _v$3 = isIndeterminate() ? "30%" : `${percentage()}%`;
|
|
1350
|
+
_v$ !== _p$.e && _$className13(_el$9, _p$.e = _v$);
|
|
1351
|
+
_v$2 !== _p$.t && _$className13(_el$0, _p$.t = _v$2);
|
|
1352
|
+
_v$3 !== _p$.a && _$setStyleProperty(_el$0, "width", _p$.a = _v$3);
|
|
1151
1353
|
return _p$;
|
|
1152
1354
|
}, {
|
|
1153
1355
|
e: void 0,
|
|
1154
1356
|
t: void 0,
|
|
1155
1357
|
a: void 0
|
|
1156
1358
|
});
|
|
1359
|
+
_$runHydrationEvents6();
|
|
1157
1360
|
return _el$;
|
|
1158
1361
|
})();
|
|
1159
1362
|
}
|
|
1160
1363
|
|
|
1161
|
-
|
|
1162
|
-
|
|
1364
|
+
// src/separator/index.tsx
|
|
1365
|
+
import { template as _$template15 } from "solid-js/web";
|
|
1366
|
+
import { createComponent as _$createComponent13 } from "solid-js/web";
|
|
1367
|
+
import { getNextElement as _$getNextElement15 } from "solid-js/web";
|
|
1368
|
+
import { runHydrationEvents as _$runHydrationEvents7 } from "solid-js/web";
|
|
1369
|
+
import { spread as _$spread3 } from "solid-js/web";
|
|
1370
|
+
import { mergeProps as _$mergeProps8 } from "solid-js/web";
|
|
1371
|
+
import { splitProps as splitProps8, createMemo as createMemo2, Show as Show9 } from "solid-js";
|
|
1372
|
+
import { createSeparator } from "@proyecto-viviana/solidaria";
|
|
1373
|
+
var _tmpl$17 = /* @__PURE__ */ _$template15(`<div>`);
|
|
1374
|
+
var _tmpl$212 = /* @__PURE__ */ _$template15(`<hr>`);
|
|
1375
|
+
var variantStyles6 = {
|
|
1163
1376
|
default: "bg-bg-100",
|
|
1164
1377
|
subtle: "bg-bg-200",
|
|
1165
1378
|
strong: "bg-primary-600"
|
|
1166
1379
|
};
|
|
1167
|
-
|
|
1380
|
+
var horizontalSizeStyles = {
|
|
1168
1381
|
sm: "h-px",
|
|
1169
1382
|
md: "h-0.5",
|
|
1170
1383
|
lg: "h-1"
|
|
1171
1384
|
};
|
|
1172
|
-
|
|
1385
|
+
var verticalSizeStyles = {
|
|
1173
1386
|
sm: "w-px",
|
|
1174
1387
|
md: "w-0.5",
|
|
1175
1388
|
lg: "w-1"
|
|
1176
1389
|
};
|
|
1177
1390
|
function Separator(props) {
|
|
1178
|
-
const [local, ariaProps] =
|
|
1391
|
+
const [local, ariaProps] = splitProps8(props, ["orientation", "variant", "size", "class"]);
|
|
1179
1392
|
const orientation = () => local.orientation ?? "horizontal";
|
|
1180
1393
|
const variant = () => local.variant ?? "default";
|
|
1181
1394
|
const size = () => local.size ?? "md";
|
|
1182
|
-
const elementType =
|
|
1395
|
+
const elementType = createMemo2(() => {
|
|
1183
1396
|
if (orientation() === "vertical") {
|
|
1184
1397
|
return "div";
|
|
1185
1398
|
}
|
|
@@ -1196,12 +1409,12 @@ function Separator(props) {
|
|
|
1196
1409
|
return ariaProps["aria-label"];
|
|
1197
1410
|
}
|
|
1198
1411
|
});
|
|
1199
|
-
const className =
|
|
1412
|
+
const className = createMemo2(() => {
|
|
1200
1413
|
const isVertical = orientation() === "vertical";
|
|
1201
|
-
const
|
|
1414
|
+
const sizeStyles8 = isVertical ? verticalSizeStyles : horizontalSizeStyles;
|
|
1202
1415
|
const base = [
|
|
1203
|
-
|
|
1204
|
-
|
|
1416
|
+
variantStyles6[variant()],
|
|
1417
|
+
sizeStyles8[size()],
|
|
1205
1418
|
isVertical ? "h-full self-stretch" : "w-full",
|
|
1206
1419
|
"border-0",
|
|
1207
1420
|
// Reset hr default border
|
|
@@ -1216,59 +1429,77 @@ function Separator(props) {
|
|
|
1216
1429
|
} = separatorAria.separatorProps;
|
|
1217
1430
|
return props2;
|
|
1218
1431
|
};
|
|
1219
|
-
return
|
|
1432
|
+
return _$createComponent13(Show9, {
|
|
1220
1433
|
get when() {
|
|
1221
1434
|
return orientation() === "vertical";
|
|
1222
1435
|
},
|
|
1223
1436
|
get fallback() {
|
|
1224
1437
|
return (() => {
|
|
1225
|
-
var _el$2 = _tmpl$
|
|
1226
|
-
|
|
1438
|
+
var _el$2 = _$getNextElement15(_tmpl$212);
|
|
1439
|
+
_$spread3(_el$2, _$mergeProps8(getAriaProps, {
|
|
1227
1440
|
get ["class"]() {
|
|
1228
1441
|
return className();
|
|
1229
1442
|
}
|
|
1230
1443
|
}), false, false);
|
|
1444
|
+
_$runHydrationEvents7();
|
|
1231
1445
|
return _el$2;
|
|
1232
1446
|
})();
|
|
1233
1447
|
},
|
|
1234
1448
|
get children() {
|
|
1235
|
-
var _el$ = _tmpl
|
|
1236
|
-
|
|
1449
|
+
var _el$ = _$getNextElement15(_tmpl$17);
|
|
1450
|
+
_$spread3(_el$, _$mergeProps8(getAriaProps, {
|
|
1237
1451
|
get ["class"]() {
|
|
1238
1452
|
return className();
|
|
1239
1453
|
}
|
|
1240
1454
|
}), false, false);
|
|
1455
|
+
_$runHydrationEvents7();
|
|
1241
1456
|
return _el$;
|
|
1242
1457
|
}
|
|
1243
1458
|
});
|
|
1244
1459
|
}
|
|
1245
1460
|
|
|
1246
|
-
|
|
1461
|
+
// src/custom/nav-header/index.tsx
|
|
1462
|
+
import { template as _$template16 } from "solid-js/web";
|
|
1463
|
+
import { delegateEvents as _$delegateEvents5 } from "solid-js/web";
|
|
1464
|
+
import { className as _$className14 } from "solid-js/web";
|
|
1465
|
+
import { getNextMarker as _$getNextMarker8 } from "solid-js/web";
|
|
1466
|
+
import { runHydrationEvents as _$runHydrationEvents8 } from "solid-js/web";
|
|
1467
|
+
import { addEventListener as _$addEventListener4 } from "solid-js/web";
|
|
1468
|
+
import { insert as _$insert14 } from "solid-js/web";
|
|
1469
|
+
import { createComponent as _$createComponent14 } from "solid-js/web";
|
|
1470
|
+
import { setAttribute as _$setAttribute5 } from "solid-js/web";
|
|
1471
|
+
import { effect as _$effect15 } from "solid-js/web";
|
|
1472
|
+
import { getNextElement as _$getNextElement16 } from "solid-js/web";
|
|
1473
|
+
import { Show as Show10 } from "solid-js";
|
|
1474
|
+
var _tmpl$18 = /* @__PURE__ */ _$template16(`<img class="h-[42px] w-auto">`);
|
|
1475
|
+
var _tmpl$213 = /* @__PURE__ */ _$template16(`<button class="md:hidden flex items-center justify-center">`);
|
|
1476
|
+
var _tmpl$39 = /* @__PURE__ */ _$template16(`<nav><div class="pl-1 md:pl-8 flex items-center"></div><div class="flex-1 flex justify-end items-center pr-1 md:pr-8"><!$><!/><!$><!/>`);
|
|
1477
|
+
var _tmpl$48 = /* @__PURE__ */ _$template16(`<span class="text-[34px] font-light text-primary-700 flex items-center">`);
|
|
1247
1478
|
function NavHeader(props) {
|
|
1248
1479
|
return (() => {
|
|
1249
|
-
var _el$ = _tmpl$
|
|
1250
|
-
|
|
1480
|
+
var _el$ = _$getNextElement16(_tmpl$39), _el$2 = _el$.firstChild, _el$4 = _el$2.nextSibling, _el$6 = _el$4.firstChild, [_el$7, _co$] = _$getNextMarker8(_el$6.nextSibling), _el$8 = _el$7.nextSibling, [_el$9, _co$2] = _$getNextMarker8(_el$8.nextSibling);
|
|
1481
|
+
_$insert14(_el$2, _$createComponent14(Show10, {
|
|
1251
1482
|
get when() {
|
|
1252
1483
|
return props.logo;
|
|
1253
1484
|
},
|
|
1254
1485
|
get fallback() {
|
|
1255
|
-
return
|
|
1486
|
+
return _$createComponent14(Show10, {
|
|
1256
1487
|
get when() {
|
|
1257
1488
|
return props.logoText;
|
|
1258
1489
|
},
|
|
1259
1490
|
get children() {
|
|
1260
|
-
var _el$
|
|
1261
|
-
|
|
1262
|
-
return _el$
|
|
1491
|
+
var _el$0 = _$getNextElement16(_tmpl$48);
|
|
1492
|
+
_$insert14(_el$0, () => props.logoText);
|
|
1493
|
+
return _el$0;
|
|
1263
1494
|
}
|
|
1264
1495
|
});
|
|
1265
1496
|
},
|
|
1266
1497
|
get children() {
|
|
1267
|
-
var _el$3 = _tmpl
|
|
1268
|
-
|
|
1498
|
+
var _el$3 = _$getNextElement16(_tmpl$18);
|
|
1499
|
+
_$effect15((_p$) => {
|
|
1269
1500
|
var _v$ = props.logo, _v$2 = props.logoAlt ?? "Logo";
|
|
1270
|
-
_v$ !== _p$.e &&
|
|
1271
|
-
_v$2 !== _p$.t &&
|
|
1501
|
+
_v$ !== _p$.e && _$setAttribute5(_el$3, "src", _p$.e = _v$);
|
|
1502
|
+
_v$2 !== _p$.t && _$setAttribute5(_el$3, "alt", _p$.t = _v$2);
|
|
1272
1503
|
return _p$;
|
|
1273
1504
|
}, {
|
|
1274
1505
|
e: void 0,
|
|
@@ -1277,31 +1508,46 @@ function NavHeader(props) {
|
|
|
1277
1508
|
return _el$3;
|
|
1278
1509
|
}
|
|
1279
1510
|
}));
|
|
1280
|
-
|
|
1281
|
-
|
|
1511
|
+
_$insert14(_el$4, () => props.children, _el$7, _co$);
|
|
1512
|
+
_$insert14(_el$4, _$createComponent14(Show10, {
|
|
1282
1513
|
get when() {
|
|
1283
1514
|
return props.menuIcon;
|
|
1284
1515
|
},
|
|
1285
1516
|
get children() {
|
|
1286
|
-
var _el$5 = _tmpl$
|
|
1287
|
-
|
|
1288
|
-
|
|
1517
|
+
var _el$5 = _$getNextElement16(_tmpl$213);
|
|
1518
|
+
_$addEventListener4(_el$5, "click", props.onMenuClick, true);
|
|
1519
|
+
_$insert14(_el$5, () => props.menuIcon);
|
|
1520
|
+
_$runHydrationEvents8();
|
|
1289
1521
|
return _el$5;
|
|
1290
1522
|
}
|
|
1291
|
-
}),
|
|
1292
|
-
|
|
1523
|
+
}), _el$9, _co$2);
|
|
1524
|
+
_$effect15(() => _$className14(_el$, `flex items-center bg-bg-400 h-[70px] border-b-4 border-accent-500 ${props.class ?? ""}`));
|
|
1293
1525
|
return _el$;
|
|
1294
1526
|
})();
|
|
1295
1527
|
}
|
|
1296
|
-
|
|
1528
|
+
_$delegateEvents5(["click"]);
|
|
1297
1529
|
|
|
1298
|
-
|
|
1530
|
+
// src/custom/lateral-nav/index.tsx
|
|
1531
|
+
import { template as _$template17 } from "solid-js/web";
|
|
1532
|
+
import { createComponent as _$createComponent15 } from "solid-js/web";
|
|
1533
|
+
import { setAttribute as _$setAttribute6 } from "solid-js/web";
|
|
1534
|
+
import { className as _$className15 } from "solid-js/web";
|
|
1535
|
+
import { effect as _$effect16 } from "solid-js/web";
|
|
1536
|
+
import { getNextElement as _$getNextElement17 } from "solid-js/web";
|
|
1537
|
+
import { getNextMarker as _$getNextMarker9 } from "solid-js/web";
|
|
1538
|
+
import { insert as _$insert15 } from "solid-js/web";
|
|
1539
|
+
import { Show as Show11, For } from "solid-js";
|
|
1540
|
+
var _tmpl$19 = /* @__PURE__ */ _$template17(`<li><span class="text-lg font-bold text-primary-200"></span><!$><!/>`);
|
|
1541
|
+
var _tmpl$214 = /* @__PURE__ */ _$template17(`<a>`);
|
|
1542
|
+
var _tmpl$310 = /* @__PURE__ */ _$template17(`<div><!$><!/><div class="flex h-full"><div class="h-5 w-1 bg-accent-300"></div><ul class="flex h-full flex-1 flex-col gap-1 pl-4"><!$><!/><!$><!/>`);
|
|
1543
|
+
var _tmpl$49 = /* @__PURE__ */ _$template17(`<li>`);
|
|
1544
|
+
var _tmpl$54 = /* @__PURE__ */ _$template17(`<div>`);
|
|
1299
1545
|
function NavItem(props) {
|
|
1300
1546
|
return (() => {
|
|
1301
|
-
var _el$ = _tmpl
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1547
|
+
var _el$ = _$getNextElement17(_tmpl$19), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, [_el$4, _co$] = _$getNextMarker9(_el$3.nextSibling);
|
|
1548
|
+
_$insert15(_el$2, () => props.title);
|
|
1549
|
+
_$insert15(_el$, () => props.children, _el$4, _co$);
|
|
1550
|
+
_$effect16(() => _$className15(_el$, `flex items-center ${props.class ?? ""}`));
|
|
1305
1551
|
return _el$;
|
|
1306
1552
|
})();
|
|
1307
1553
|
}
|
|
@@ -1309,40 +1555,40 @@ function NavLink(props) {
|
|
|
1309
1555
|
const activeStyles = "font-medium text-primary-300 underline underline-offset-4";
|
|
1310
1556
|
const inactiveStyles = "font-normal text-gray-200 underline-offset-4 hover:text-gray-100 hover:underline";
|
|
1311
1557
|
return (() => {
|
|
1312
|
-
var _el$
|
|
1313
|
-
|
|
1314
|
-
|
|
1558
|
+
var _el$5 = _$getNextElement17(_tmpl$214);
|
|
1559
|
+
_$insert15(_el$5, () => props.children);
|
|
1560
|
+
_$effect16((_p$) => {
|
|
1315
1561
|
var _v$ = props.href, _v$2 = `${props.active ? activeStyles : inactiveStyles} ${props.class ?? ""}`;
|
|
1316
|
-
_v$ !== _p$.e &&
|
|
1317
|
-
_v$2 !== _p$.t &&
|
|
1562
|
+
_v$ !== _p$.e && _$setAttribute6(_el$5, "href", _p$.e = _v$);
|
|
1563
|
+
_v$2 !== _p$.t && _$className15(_el$5, _p$.t = _v$2);
|
|
1318
1564
|
return _p$;
|
|
1319
1565
|
}, {
|
|
1320
1566
|
e: void 0,
|
|
1321
1567
|
t: void 0
|
|
1322
1568
|
});
|
|
1323
|
-
return _el$
|
|
1569
|
+
return _el$5;
|
|
1324
1570
|
})();
|
|
1325
1571
|
}
|
|
1326
1572
|
function NavSection(props) {
|
|
1327
1573
|
return (() => {
|
|
1328
|
-
var _el$
|
|
1329
|
-
|
|
1574
|
+
var _el$6 = _$getNextElement17(_tmpl$310), _el$12 = _el$6.firstChild, [_el$13, _co$4] = _$getNextMarker9(_el$12.nextSibling), _el$7 = _el$13.nextSibling, _el$8 = _el$7.firstChild, _el$9 = _el$8.nextSibling, _el$0 = _el$9.firstChild, [_el$1, _co$2] = _$getNextMarker9(_el$0.nextSibling), _el$10 = _el$1.nextSibling, [_el$11, _co$3] = _$getNextMarker9(_el$10.nextSibling);
|
|
1575
|
+
_$insert15(_el$6, _$createComponent15(NavItem, {
|
|
1330
1576
|
get title() {
|
|
1331
1577
|
return props.title;
|
|
1332
1578
|
}
|
|
1333
|
-
}), _el$
|
|
1334
|
-
|
|
1579
|
+
}), _el$13, _co$4);
|
|
1580
|
+
_$insert15(_el$9, _$createComponent15(Show11, {
|
|
1335
1581
|
get when() {
|
|
1336
1582
|
return props.links;
|
|
1337
1583
|
},
|
|
1338
1584
|
get children() {
|
|
1339
|
-
return
|
|
1585
|
+
return _$createComponent15(For, {
|
|
1340
1586
|
get each() {
|
|
1341
1587
|
return props.links;
|
|
1342
1588
|
},
|
|
1343
1589
|
children: (link) => (() => {
|
|
1344
|
-
var _el$
|
|
1345
|
-
|
|
1590
|
+
var _el$14 = _$getNextElement17(_tmpl$49);
|
|
1591
|
+
_$insert15(_el$14, _$createComponent15(NavLink, {
|
|
1346
1592
|
get href() {
|
|
1347
1593
|
return link.href;
|
|
1348
1594
|
},
|
|
@@ -1353,62 +1599,72 @@ function NavSection(props) {
|
|
|
1353
1599
|
return link.label;
|
|
1354
1600
|
}
|
|
1355
1601
|
}));
|
|
1356
|
-
return _el$
|
|
1602
|
+
return _el$14;
|
|
1357
1603
|
})()
|
|
1358
1604
|
});
|
|
1359
1605
|
}
|
|
1360
|
-
}),
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
return _el$
|
|
1606
|
+
}), _el$1, _co$2);
|
|
1607
|
+
_$insert15(_el$9, () => props.children, _el$11, _co$3);
|
|
1608
|
+
_$effect16(() => _$className15(_el$6, props.class ?? ""));
|
|
1609
|
+
return _el$6;
|
|
1364
1610
|
})();
|
|
1365
1611
|
}
|
|
1366
1612
|
function LateralNav(props) {
|
|
1367
1613
|
const bgColor = () => props.transparent ? "" : "bg-bg-200";
|
|
1368
1614
|
return (() => {
|
|
1369
|
-
var _el$
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
return _el$
|
|
1615
|
+
var _el$15 = _$getNextElement17(_tmpl$54);
|
|
1616
|
+
_$insert15(_el$15, () => props.children);
|
|
1617
|
+
_$effect16(() => _$className15(_el$15, `hidden w-[300px] md:block ${bgColor()} m-0 border-r border-primary-600 p-3 ${props.class ?? ""}`));
|
|
1618
|
+
return _el$15;
|
|
1373
1619
|
})();
|
|
1374
1620
|
}
|
|
1375
1621
|
|
|
1376
|
-
|
|
1377
|
-
|
|
1622
|
+
// src/custom/timeline-item/index.tsx
|
|
1623
|
+
import { template as _$template18 } from "solid-js/web";
|
|
1624
|
+
import { className as _$className16 } from "solid-js/web";
|
|
1625
|
+
import { effect as _$effect17 } from "solid-js/web";
|
|
1626
|
+
import { getNextMarker as _$getNextMarker10 } from "solid-js/web";
|
|
1627
|
+
import { createComponent as _$createComponent16 } from "solid-js/web";
|
|
1628
|
+
import { getNextElement as _$getNextElement18 } from "solid-js/web";
|
|
1629
|
+
import { insert as _$insert16 } from "solid-js/web";
|
|
1630
|
+
import { Show as Show12 } from "solid-js";
|
|
1631
|
+
var _tmpl$20 = /* @__PURE__ */ _$template18(`<span class="font-semibold text-accent-200">`);
|
|
1632
|
+
var _tmpl$215 = /* @__PURE__ */ _$template18(`<div><div class="flex items-center justify-around gap-3"><!$><!/><!$><!/><!$><!/></div><div class="flex items-center justify-center gap-3 text-center"><span class="font-light text-primary-300">`);
|
|
1633
|
+
var eventMessages = {
|
|
1378
1634
|
follow: (left, right) => [(() => {
|
|
1379
|
-
var _el$ = _tmpl
|
|
1380
|
-
|
|
1635
|
+
var _el$ = _$getNextElement18(_tmpl$20);
|
|
1636
|
+
_$insert16(_el$, left);
|
|
1381
1637
|
return _el$;
|
|
1382
1638
|
})(), " ha empezado a seguir a ", (() => {
|
|
1383
|
-
var _el$2 = _tmpl
|
|
1384
|
-
|
|
1639
|
+
var _el$2 = _$getNextElement18(_tmpl$20);
|
|
1640
|
+
_$insert16(_el$2, right);
|
|
1385
1641
|
return _el$2;
|
|
1386
1642
|
})()],
|
|
1387
1643
|
like: (left, right) => [(() => {
|
|
1388
|
-
var _el$3 = _tmpl
|
|
1389
|
-
|
|
1644
|
+
var _el$3 = _$getNextElement18(_tmpl$20);
|
|
1645
|
+
_$insert16(_el$3, left);
|
|
1390
1646
|
return _el$3;
|
|
1391
1647
|
})(), " le ha dado like a ", (() => {
|
|
1392
|
-
var _el$4 = _tmpl
|
|
1393
|
-
|
|
1648
|
+
var _el$4 = _$getNextElement18(_tmpl$20);
|
|
1649
|
+
_$insert16(_el$4, right);
|
|
1394
1650
|
return _el$4;
|
|
1395
1651
|
})()],
|
|
1396
1652
|
comment: (left, right) => [(() => {
|
|
1397
|
-
var _el$5 = _tmpl
|
|
1398
|
-
|
|
1653
|
+
var _el$5 = _$getNextElement18(_tmpl$20);
|
|
1654
|
+
_$insert16(_el$5, left);
|
|
1399
1655
|
return _el$5;
|
|
1400
1656
|
})(), " ha comentado en ", (() => {
|
|
1401
|
-
var _el$6 = _tmpl
|
|
1402
|
-
|
|
1657
|
+
var _el$6 = _$getNextElement18(_tmpl$20);
|
|
1658
|
+
_$insert16(_el$6, right);
|
|
1403
1659
|
return _el$6;
|
|
1404
1660
|
})()],
|
|
1405
1661
|
event: (left, right) => [(() => {
|
|
1406
|
-
var _el$7 = _tmpl
|
|
1407
|
-
|
|
1662
|
+
var _el$7 = _$getNextElement18(_tmpl$20);
|
|
1663
|
+
_$insert16(_el$7, left);
|
|
1408
1664
|
return _el$7;
|
|
1409
|
-
})(), "
|
|
1410
|
-
var _el$8 = _tmpl
|
|
1411
|
-
|
|
1665
|
+
})(), " asistir\xE1 al evento de ", (() => {
|
|
1666
|
+
var _el$8 = _$getNextElement18(_tmpl$20);
|
|
1667
|
+
_$insert16(_el$8, right);
|
|
1412
1668
|
return _el$8;
|
|
1413
1669
|
})()],
|
|
1414
1670
|
custom: () => null
|
|
@@ -1418,13 +1674,13 @@ function TimelineItem(props) {
|
|
|
1418
1674
|
const leftName = () => props.leftUser?.name ?? "";
|
|
1419
1675
|
const rightName = () => props.rightUser?.name ?? "";
|
|
1420
1676
|
return (() => {
|
|
1421
|
-
var _el$9 = _tmpl$
|
|
1422
|
-
|
|
1677
|
+
var _el$9 = _$getNextElement18(_tmpl$215), _el$0 = _el$9.firstChild, _el$1 = _el$0.firstChild, [_el$10, _co$] = _$getNextMarker10(_el$1.nextSibling), _el$11 = _el$10.nextSibling, [_el$12, _co$2] = _$getNextMarker10(_el$11.nextSibling), _el$13 = _el$12.nextSibling, [_el$14, _co$3] = _$getNextMarker10(_el$13.nextSibling), _el$15 = _el$0.nextSibling, _el$16 = _el$15.firstChild;
|
|
1678
|
+
_$insert16(_el$0, _$createComponent16(Show12, {
|
|
1423
1679
|
get when() {
|
|
1424
1680
|
return props.leftUser;
|
|
1425
1681
|
},
|
|
1426
1682
|
get children() {
|
|
1427
|
-
return
|
|
1683
|
+
return _$createComponent16(Avatar, {
|
|
1428
1684
|
get src() {
|
|
1429
1685
|
return props.leftUser.avatar;
|
|
1430
1686
|
},
|
|
@@ -1433,21 +1689,21 @@ function TimelineItem(props) {
|
|
|
1433
1689
|
}
|
|
1434
1690
|
});
|
|
1435
1691
|
}
|
|
1436
|
-
}),
|
|
1437
|
-
|
|
1692
|
+
}), _el$10, _co$);
|
|
1693
|
+
_$insert16(_el$0, _$createComponent16(Show12, {
|
|
1438
1694
|
get when() {
|
|
1439
1695
|
return props.icon;
|
|
1440
1696
|
},
|
|
1441
1697
|
get children() {
|
|
1442
1698
|
return props.icon;
|
|
1443
1699
|
}
|
|
1444
|
-
}),
|
|
1445
|
-
|
|
1700
|
+
}), _el$12, _co$2);
|
|
1701
|
+
_$insert16(_el$0, _$createComponent16(Show12, {
|
|
1446
1702
|
get when() {
|
|
1447
1703
|
return props.rightUser;
|
|
1448
1704
|
},
|
|
1449
1705
|
get children() {
|
|
1450
|
-
return
|
|
1706
|
+
return _$createComponent16(Avatar, {
|
|
1451
1707
|
get src() {
|
|
1452
1708
|
return props.rightUser.avatar;
|
|
1453
1709
|
},
|
|
@@ -1456,8 +1712,8 @@ function TimelineItem(props) {
|
|
|
1456
1712
|
}
|
|
1457
1713
|
});
|
|
1458
1714
|
}
|
|
1459
|
-
}),
|
|
1460
|
-
|
|
1715
|
+
}), _el$14, _co$3);
|
|
1716
|
+
_$insert16(_el$16, _$createComponent16(Show12, {
|
|
1461
1717
|
get when() {
|
|
1462
1718
|
return props.message;
|
|
1463
1719
|
},
|
|
@@ -1468,17 +1724,36 @@ function TimelineItem(props) {
|
|
|
1468
1724
|
return props.message;
|
|
1469
1725
|
}
|
|
1470
1726
|
}));
|
|
1471
|
-
|
|
1727
|
+
_$effect17(() => _$className16(_el$9, `inline-flex w-auto flex-col gap-5 rounded-2xl border border-primary-700 bg-bg-200 p-5 hover:bg-bg-300 transition-colors ${props.class ?? ""}`));
|
|
1472
1728
|
return _el$9;
|
|
1473
1729
|
})();
|
|
1474
1730
|
}
|
|
1475
1731
|
|
|
1476
|
-
|
|
1732
|
+
// src/custom/conversation/index.tsx
|
|
1733
|
+
import { template as _$template19 } from "solid-js/web";
|
|
1734
|
+
import { delegateEvents as _$delegateEvents6 } from "solid-js/web";
|
|
1735
|
+
import { className as _$className17 } from "solid-js/web";
|
|
1736
|
+
import { effect as _$effect18 } from "solid-js/web";
|
|
1737
|
+
import { runHydrationEvents as _$runHydrationEvents9 } from "solid-js/web";
|
|
1738
|
+
import { memo as _$memo11 } from "solid-js/web";
|
|
1739
|
+
import { getNextMarker as _$getNextMarker11 } from "solid-js/web";
|
|
1740
|
+
import { getNextElement as _$getNextElement19 } from "solid-js/web";
|
|
1741
|
+
import { insert as _$insert17 } from "solid-js/web";
|
|
1742
|
+
import { createComponent as _$createComponent17 } from "solid-js/web";
|
|
1743
|
+
import { addEventListener as _$addEventListener5 } from "solid-js/web";
|
|
1744
|
+
import { Show as Show13, For as For2 } from "solid-js";
|
|
1745
|
+
var _tmpl$21 = /* @__PURE__ */ _$template19(`<span class="text-xs text-primary-500">`);
|
|
1746
|
+
var _tmpl$216 = /* @__PURE__ */ _$template19(`<p class="text-sm text-primary-400 truncate">`);
|
|
1747
|
+
var _tmpl$311 = /* @__PURE__ */ _$template19(`<span class="flex h-5 w-5 items-center justify-center rounded-full bg-accent text-xs font-bold text-white">`);
|
|
1748
|
+
var _tmpl$410 = /* @__PURE__ */ _$template19(`<button><!$><!/><div class="flex-1 min-w-0"><div class="flex items-center justify-between"><span class="font-semibold text-primary-100 truncate"></span><!$><!/></div><!$><!/></div><!$><!/>`);
|
|
1749
|
+
var _tmpl$55 = /* @__PURE__ */ _$template19(`<span>`);
|
|
1750
|
+
var _tmpl$63 = /* @__PURE__ */ _$template19(`<div><div><p></p><!$><!/>`);
|
|
1751
|
+
var _tmpl$73 = /* @__PURE__ */ _$template19(`<div>`);
|
|
1477
1752
|
function ConversationPreview(props) {
|
|
1478
1753
|
return (() => {
|
|
1479
|
-
var _el$ = _tmpl$
|
|
1480
|
-
|
|
1481
|
-
|
|
1754
|
+
var _el$ = _$getNextElement19(_tmpl$410), _el$10 = _el$.firstChild, [_el$11, _co$3] = _$getNextMarker11(_el$10.nextSibling), _el$2 = _el$11.nextSibling, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$6 = _el$4.nextSibling, [_el$7, _co$] = _$getNextMarker11(_el$6.nextSibling), _el$9 = _el$3.nextSibling, [_el$0, _co$2] = _$getNextMarker11(_el$9.nextSibling), _el$12 = _el$2.nextSibling, [_el$13, _co$4] = _$getNextMarker11(_el$12.nextSibling);
|
|
1755
|
+
_$addEventListener5(_el$, "click", props.onClick, true);
|
|
1756
|
+
_$insert17(_el$, _$createComponent17(Avatar, {
|
|
1482
1757
|
get src() {
|
|
1483
1758
|
return props.user.avatar;
|
|
1484
1759
|
},
|
|
@@ -1489,78 +1764,79 @@ function ConversationPreview(props) {
|
|
|
1489
1764
|
return props.user.online;
|
|
1490
1765
|
},
|
|
1491
1766
|
size: "md"
|
|
1492
|
-
}), _el$
|
|
1493
|
-
|
|
1494
|
-
|
|
1767
|
+
}), _el$11, _co$3);
|
|
1768
|
+
_$insert17(_el$4, () => props.user.name);
|
|
1769
|
+
_$insert17(_el$3, _$createComponent17(Show13, {
|
|
1495
1770
|
get when() {
|
|
1496
1771
|
return props.timestamp;
|
|
1497
1772
|
},
|
|
1498
1773
|
get children() {
|
|
1499
|
-
var _el$5 = _tmpl
|
|
1500
|
-
|
|
1774
|
+
var _el$5 = _$getNextElement19(_tmpl$21);
|
|
1775
|
+
_$insert17(_el$5, () => props.timestamp);
|
|
1501
1776
|
return _el$5;
|
|
1502
1777
|
}
|
|
1503
|
-
}),
|
|
1504
|
-
|
|
1778
|
+
}), _el$7, _co$);
|
|
1779
|
+
_$insert17(_el$2, _$createComponent17(Show13, {
|
|
1505
1780
|
get when() {
|
|
1506
1781
|
return props.lastMessage;
|
|
1507
1782
|
},
|
|
1508
1783
|
get children() {
|
|
1509
|
-
var _el$
|
|
1510
|
-
|
|
1511
|
-
return _el$
|
|
1784
|
+
var _el$8 = _$getNextElement19(_tmpl$216);
|
|
1785
|
+
_$insert17(_el$8, () => props.lastMessage);
|
|
1786
|
+
return _el$8;
|
|
1512
1787
|
}
|
|
1513
|
-
}),
|
|
1514
|
-
|
|
1788
|
+
}), _el$0, _co$2);
|
|
1789
|
+
_$insert17(_el$, _$createComponent17(Show13, {
|
|
1515
1790
|
get when() {
|
|
1516
|
-
return
|
|
1791
|
+
return _$memo11(() => !!props.unreadCount)() && props.unreadCount > 0;
|
|
1517
1792
|
},
|
|
1518
1793
|
get children() {
|
|
1519
|
-
var _el$
|
|
1520
|
-
|
|
1521
|
-
return _el$
|
|
1794
|
+
var _el$1 = _$getNextElement19(_tmpl$311);
|
|
1795
|
+
_$insert17(_el$1, () => props.unreadCount);
|
|
1796
|
+
return _el$1;
|
|
1522
1797
|
}
|
|
1523
|
-
}),
|
|
1524
|
-
|
|
1798
|
+
}), _el$13, _co$4);
|
|
1799
|
+
_$effect18(() => _$className17(_el$, `flex w-full items-center gap-3 rounded-xl p-3 hover:bg-bg-300 transition-colors text-left ${props.class ?? ""}`));
|
|
1800
|
+
_$runHydrationEvents9();
|
|
1525
1801
|
return _el$;
|
|
1526
1802
|
})();
|
|
1527
1803
|
}
|
|
1528
1804
|
function ConversationBubble(props) {
|
|
1529
1805
|
const isUser = () => props.sender === "user";
|
|
1530
1806
|
return (() => {
|
|
1531
|
-
var _el$
|
|
1532
|
-
|
|
1533
|
-
|
|
1807
|
+
var _el$14 = _$getNextElement19(_tmpl$63), _el$15 = _el$14.firstChild, _el$16 = _el$15.firstChild, _el$18 = _el$16.nextSibling, [_el$19, _co$5] = _$getNextMarker11(_el$18.nextSibling);
|
|
1808
|
+
_$insert17(_el$16, () => props.content);
|
|
1809
|
+
_$insert17(_el$15, _$createComponent17(Show13, {
|
|
1534
1810
|
get when() {
|
|
1535
1811
|
return props.timestamp;
|
|
1536
1812
|
},
|
|
1537
1813
|
get children() {
|
|
1538
|
-
var _el$
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
return _el$
|
|
1814
|
+
var _el$17 = _$getNextElement19(_tmpl$55);
|
|
1815
|
+
_$insert17(_el$17, () => props.timestamp);
|
|
1816
|
+
_$effect18(() => _$className17(_el$17, `text-xs ${isUser() ? "text-white/70" : "text-primary-500"}`));
|
|
1817
|
+
return _el$17;
|
|
1542
1818
|
}
|
|
1543
|
-
}),
|
|
1544
|
-
|
|
1819
|
+
}), _el$19, _co$5);
|
|
1820
|
+
_$effect18((_p$) => {
|
|
1545
1821
|
var _v$ = `flex ${isUser() ? "justify-end" : "justify-start"} ${props.class ?? ""}`, _v$2 = `max-w-[70%] rounded-2xl px-4 py-2 ${isUser() ? "bg-accent text-white rounded-br-sm" : "bg-bg-300 text-primary-100 rounded-bl-sm"}`;
|
|
1546
|
-
_v$ !== _p$.e &&
|
|
1547
|
-
_v$2 !== _p$.t &&
|
|
1822
|
+
_v$ !== _p$.e && _$className17(_el$14, _p$.e = _v$);
|
|
1823
|
+
_v$2 !== _p$.t && _$className17(_el$15, _p$.t = _v$2);
|
|
1548
1824
|
return _p$;
|
|
1549
1825
|
}, {
|
|
1550
1826
|
e: void 0,
|
|
1551
1827
|
t: void 0
|
|
1552
1828
|
});
|
|
1553
|
-
return _el$
|
|
1829
|
+
return _el$14;
|
|
1554
1830
|
})();
|
|
1555
1831
|
}
|
|
1556
1832
|
function Conversation(props) {
|
|
1557
1833
|
return (() => {
|
|
1558
|
-
var _el$
|
|
1559
|
-
|
|
1834
|
+
var _el$20 = _$getNextElement19(_tmpl$73);
|
|
1835
|
+
_$insert17(_el$20, _$createComponent17(For2, {
|
|
1560
1836
|
get each() {
|
|
1561
1837
|
return props.messages;
|
|
1562
1838
|
},
|
|
1563
|
-
children: (message) =>
|
|
1839
|
+
children: (message) => _$createComponent17(ConversationBubble, {
|
|
1564
1840
|
get content() {
|
|
1565
1841
|
return message.content;
|
|
1566
1842
|
},
|
|
@@ -1572,13 +1848,26 @@ function Conversation(props) {
|
|
|
1572
1848
|
}
|
|
1573
1849
|
})
|
|
1574
1850
|
}));
|
|
1575
|
-
|
|
1576
|
-
return _el$
|
|
1851
|
+
_$effect18(() => _$className17(_el$20, `flex flex-col gap-2 p-4 ${props.class ?? ""}`));
|
|
1852
|
+
return _el$20;
|
|
1577
1853
|
})();
|
|
1578
1854
|
}
|
|
1579
|
-
|
|
1855
|
+
_$delegateEvents6(["click"]);
|
|
1580
1856
|
|
|
1581
|
-
|
|
1857
|
+
// src/custom/profile-card/index.tsx
|
|
1858
|
+
import { template as _$template20 } from "solid-js/web";
|
|
1859
|
+
import { className as _$className18 } from "solid-js/web";
|
|
1860
|
+
import { effect as _$effect19 } from "solid-js/web";
|
|
1861
|
+
import { getNextMarker as _$getNextMarker12 } from "solid-js/web";
|
|
1862
|
+
import { getNextElement as _$getNextElement20 } from "solid-js/web";
|
|
1863
|
+
import { insert as _$insert18 } from "solid-js/web";
|
|
1864
|
+
import { createComponent as _$createComponent18 } from "solid-js/web";
|
|
1865
|
+
import { Show as Show14 } from "solid-js";
|
|
1866
|
+
var _tmpl$30 = /* @__PURE__ */ _$template20(`<p class="text-primary-300 text-sm mt-1 line-clamp-2">`);
|
|
1867
|
+
var _tmpl$217 = /* @__PURE__ */ _$template20(`<span class=text-primary-300><span class="font-semibold text-primary-100"></span> seguidores`);
|
|
1868
|
+
var _tmpl$312 = /* @__PURE__ */ _$template20(`<span class=text-primary-300><span class="font-semibold text-primary-100"></span> siguiendo`);
|
|
1869
|
+
var _tmpl$411 = /* @__PURE__ */ _$template20(`<div class="mt-4 flex gap-2">`);
|
|
1870
|
+
var _tmpl$56 = /* @__PURE__ */ _$template20(`<div><div class="flex items-start gap-4"><!$><!/><div class="flex-1 min-w-0"><h3 class="font-semibold text-primary-100 text-lg truncate"></h3><!$><!/><div class="flex gap-4 mt-2 text-sm"><!$><!/><!$><!/></div></div></div><!$><!/>`);
|
|
1582
1871
|
function ProfileCard(props) {
|
|
1583
1872
|
const formatNumber = (num) => {
|
|
1584
1873
|
if (num >= 1e6) return `${(num / 1e6).toFixed(1)}M`;
|
|
@@ -1586,8 +1875,8 @@ function ProfileCard(props) {
|
|
|
1586
1875
|
return num.toString();
|
|
1587
1876
|
};
|
|
1588
1877
|
return (() => {
|
|
1589
|
-
var _el$ = _tmpl$
|
|
1590
|
-
|
|
1878
|
+
var _el$ = _$getNextElement20(_tmpl$56), _el$2 = _el$.firstChild, _el$15 = _el$2.firstChild, [_el$16, _co$4] = _$getNextMarker12(_el$15.nextSibling), _el$3 = _el$16.nextSibling, _el$4 = _el$3.firstChild, _el$13 = _el$4.nextSibling, [_el$14, _co$3] = _$getNextMarker12(_el$13.nextSibling), _el$6 = _el$14.nextSibling, _el$1 = _el$6.firstChild, [_el$10, _co$] = _$getNextMarker12(_el$1.nextSibling), _el$11 = _el$10.nextSibling, [_el$12, _co$2] = _$getNextMarker12(_el$11.nextSibling), _el$18 = _el$2.nextSibling, [_el$19, _co$5] = _$getNextMarker12(_el$18.nextSibling);
|
|
1879
|
+
_$insert18(_el$2, _$createComponent18(Avatar, {
|
|
1591
1880
|
get src() {
|
|
1592
1881
|
return props.avatar;
|
|
1593
1882
|
},
|
|
@@ -1595,54 +1884,79 @@ function ProfileCard(props) {
|
|
|
1595
1884
|
return props.username;
|
|
1596
1885
|
},
|
|
1597
1886
|
size: "lg"
|
|
1598
|
-
}), _el$
|
|
1599
|
-
|
|
1600
|
-
|
|
1887
|
+
}), _el$16, _co$4);
|
|
1888
|
+
_$insert18(_el$4, () => props.username);
|
|
1889
|
+
_$insert18(_el$3, _$createComponent18(Show14, {
|
|
1601
1890
|
get when() {
|
|
1602
1891
|
return props.bio;
|
|
1603
1892
|
},
|
|
1604
1893
|
get children() {
|
|
1605
|
-
var _el$5 = _tmpl
|
|
1606
|
-
|
|
1894
|
+
var _el$5 = _$getNextElement20(_tmpl$30);
|
|
1895
|
+
_$insert18(_el$5, () => props.bio);
|
|
1607
1896
|
return _el$5;
|
|
1608
1897
|
}
|
|
1609
|
-
}), _el$
|
|
1610
|
-
|
|
1898
|
+
}), _el$14, _co$3);
|
|
1899
|
+
_$insert18(_el$6, _$createComponent18(Show14, {
|
|
1611
1900
|
get when() {
|
|
1612
1901
|
return props.followers !== void 0;
|
|
1613
1902
|
},
|
|
1614
1903
|
get children() {
|
|
1615
|
-
var _el$7 = _tmpl$
|
|
1616
|
-
|
|
1904
|
+
var _el$7 = _$getNextElement20(_tmpl$217), _el$8 = _el$7.firstChild;
|
|
1905
|
+
_$insert18(_el$8, () => formatNumber(props.followers));
|
|
1617
1906
|
return _el$7;
|
|
1618
1907
|
}
|
|
1619
|
-
}),
|
|
1620
|
-
|
|
1908
|
+
}), _el$10, _co$);
|
|
1909
|
+
_$insert18(_el$6, _$createComponent18(Show14, {
|
|
1621
1910
|
get when() {
|
|
1622
1911
|
return props.following !== void 0;
|
|
1623
1912
|
},
|
|
1624
1913
|
get children() {
|
|
1625
|
-
var _el$9 = _tmpl$
|
|
1626
|
-
|
|
1914
|
+
var _el$9 = _$getNextElement20(_tmpl$312), _el$0 = _el$9.firstChild;
|
|
1915
|
+
_$insert18(_el$0, () => formatNumber(props.following));
|
|
1627
1916
|
return _el$9;
|
|
1628
1917
|
}
|
|
1629
|
-
}),
|
|
1630
|
-
|
|
1918
|
+
}), _el$12, _co$2);
|
|
1919
|
+
_$insert18(_el$, _$createComponent18(Show14, {
|
|
1631
1920
|
get when() {
|
|
1632
1921
|
return props.actions;
|
|
1633
1922
|
},
|
|
1634
1923
|
get children() {
|
|
1635
|
-
var _el$
|
|
1636
|
-
|
|
1637
|
-
return _el$
|
|
1924
|
+
var _el$17 = _$getNextElement20(_tmpl$411);
|
|
1925
|
+
_$insert18(_el$17, () => props.actions);
|
|
1926
|
+
return _el$17;
|
|
1638
1927
|
}
|
|
1639
|
-
}),
|
|
1640
|
-
|
|
1928
|
+
}), _el$19, _co$5);
|
|
1929
|
+
_$effect19(() => _$className18(_el$, `bg-bg-200 rounded-xl p-4 ${props.class ?? ""}`));
|
|
1641
1930
|
return _el$;
|
|
1642
1931
|
})();
|
|
1643
1932
|
}
|
|
1644
1933
|
|
|
1645
|
-
|
|
1934
|
+
// src/custom/event-card/index.tsx
|
|
1935
|
+
import { template as _$template21 } from "solid-js/web";
|
|
1936
|
+
import { delegateEvents as _$delegateEvents7 } from "solid-js/web";
|
|
1937
|
+
import { runHydrationEvents as _$runHydrationEvents10 } from "solid-js/web";
|
|
1938
|
+
import { addEventListener as _$addEventListener6 } from "solid-js/web";
|
|
1939
|
+
import { className as _$className19 } from "solid-js/web";
|
|
1940
|
+
import { getNextMarker as _$getNextMarker13 } from "solid-js/web";
|
|
1941
|
+
import { memo as _$memo12 } from "solid-js/web";
|
|
1942
|
+
import { insert as _$insert19 } from "solid-js/web";
|
|
1943
|
+
import { createComponent as _$createComponent19 } from "solid-js/web";
|
|
1944
|
+
import { setAttribute as _$setAttribute7 } from "solid-js/web";
|
|
1945
|
+
import { effect as _$effect20 } from "solid-js/web";
|
|
1946
|
+
import { getNextElement as _$getNextElement21 } from "solid-js/web";
|
|
1947
|
+
import { Show as Show15, For as For3 } from "solid-js";
|
|
1948
|
+
var _tmpl$31 = /* @__PURE__ */ _$template21(`<div class="absolute -top-2 -right-2 z-10 flex flex-col gap-1"><img alt class="w-8 h-8 object-contain"><img alt class="w-6 h-6 object-contain ml-2"><img alt class="w-5 h-5 object-contain">`);
|
|
1949
|
+
var _tmpl$218 = /* @__PURE__ */ _$template21(`<div class="relative h-32 w-full"><img class="w-full h-full object-cover"><div class="absolute inset-0 bg-gradient-to-t from-bg-200 via-transparent to-transparent">`);
|
|
1950
|
+
var _tmpl$313 = /* @__PURE__ */ _$template21(`<div class="flex items-center gap-1.5"><span class=text-accent>@</span><span>`);
|
|
1951
|
+
var _tmpl$412 = /* @__PURE__ */ _$template21(`<div class="flex items-center gap-1.5"><span class=text-accent>\u23F1</span><span>`);
|
|
1952
|
+
var _tmpl$57 = /* @__PURE__ */ _$template21(`<div class="flex items-center gap-4 mt-3 text-sm text-primary-300"><!$><!/><!$><!/>`);
|
|
1953
|
+
var _tmpl$64 = /* @__PURE__ */ _$template21(`<span class="ml-2 text-sm text-primary-300">+<!$><!/> m\xE1s`);
|
|
1954
|
+
var _tmpl$74 = /* @__PURE__ */ _$template21(`<div class="flex items-center mt-3"><div class="flex -space-x-2"></div><!$><!/>`);
|
|
1955
|
+
var _tmpl$82 = /* @__PURE__ */ _$template21(`<div class="mt-4 flex gap-2">`);
|
|
1956
|
+
var _tmpl$92 = /* @__PURE__ */ _$template21(`<div><!$><!/><!$><!/><div class="p-4 pt-2"><h3 class="font-bold text-xl leading-tight bg-gradient-to-r from-accent to-accent-300 bg-clip-text text-transparent"></h3><!$><!/><!$><!/><!$><!/>`);
|
|
1957
|
+
var _tmpl$0 = /* @__PURE__ */ _$template21(`<div class="w-12 h-12 rounded-lg overflow-hidden flex-shrink-0"><img class="w-full h-full object-cover">`);
|
|
1958
|
+
var _tmpl$1 = /* @__PURE__ */ _$template21(`<p class="text-sm text-primary-300 truncate">`);
|
|
1959
|
+
var _tmpl$102 = /* @__PURE__ */ _$template21(`<button><!$><!/><div class="flex-1 min-w-0"><h4 class="font-medium text-primary-100 truncate"></h4><!$><!/>`);
|
|
1646
1960
|
function EventCard(props) {
|
|
1647
1961
|
const displayedAttendees = () => props.attendees?.slice(0, 3) ?? [];
|
|
1648
1962
|
const remainingCount = () => {
|
|
@@ -1651,18 +1965,18 @@ function EventCard(props) {
|
|
|
1651
1965
|
return total - displayed;
|
|
1652
1966
|
};
|
|
1653
1967
|
return (() => {
|
|
1654
|
-
var _el$ = _tmpl$9(), _el$8 = _el
|
|
1655
|
-
|
|
1968
|
+
var _el$ = _$getNextElement21(_tmpl$92), _el$35 = _el$.firstChild, [_el$36, _co$8] = _$getNextMarker13(_el$35.nextSibling), _el$37 = _el$36.nextSibling, [_el$38, _co$9] = _$getNextMarker13(_el$37.nextSibling), _el$8 = _el$38.nextSibling, _el$9 = _el$8.firstChild, _el$29 = _el$9.nextSibling, [_el$30, _co$5] = _$getNextMarker13(_el$29.nextSibling), _el$31 = _el$30.nextSibling, [_el$32, _co$6] = _$getNextMarker13(_el$31.nextSibling), _el$33 = _el$32.nextSibling, [_el$34, _co$7] = _$getNextMarker13(_el$33.nextSibling);
|
|
1969
|
+
_$insert19(_el$, _$createComponent19(Show15, {
|
|
1656
1970
|
get when() {
|
|
1657
1971
|
return props.decorationImage;
|
|
1658
1972
|
},
|
|
1659
1973
|
get children() {
|
|
1660
|
-
var _el$2 = _tmpl
|
|
1661
|
-
|
|
1974
|
+
var _el$2 = _$getNextElement21(_tmpl$31), _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$4.nextSibling;
|
|
1975
|
+
_$effect20((_p$) => {
|
|
1662
1976
|
var _v$ = props.decorationImage, _v$2 = props.decorationImage, _v$3 = props.decorationImage;
|
|
1663
|
-
_v$ !== _p$.e &&
|
|
1664
|
-
_v$2 !== _p$.t &&
|
|
1665
|
-
_v$3 !== _p$.a &&
|
|
1977
|
+
_v$ !== _p$.e && _$setAttribute7(_el$3, "src", _p$.e = _v$);
|
|
1978
|
+
_v$2 !== _p$.t && _$setAttribute7(_el$4, "src", _p$.t = _v$2);
|
|
1979
|
+
_v$3 !== _p$.a && _$setAttribute7(_el$5, "src", _p$.a = _v$3);
|
|
1666
1980
|
return _p$;
|
|
1667
1981
|
}, {
|
|
1668
1982
|
e: void 0,
|
|
@@ -1671,17 +1985,17 @@ function EventCard(props) {
|
|
|
1671
1985
|
});
|
|
1672
1986
|
return _el$2;
|
|
1673
1987
|
}
|
|
1674
|
-
}), _el$8);
|
|
1675
|
-
|
|
1988
|
+
}), _el$36, _co$8);
|
|
1989
|
+
_$insert19(_el$, _$createComponent19(Show15, {
|
|
1676
1990
|
get when() {
|
|
1677
1991
|
return props.image;
|
|
1678
1992
|
},
|
|
1679
1993
|
get children() {
|
|
1680
|
-
var _el$6 = _tmpl$
|
|
1681
|
-
|
|
1994
|
+
var _el$6 = _$getNextElement21(_tmpl$218), _el$7 = _el$6.firstChild;
|
|
1995
|
+
_$effect20((_p$) => {
|
|
1682
1996
|
var _v$4 = props.image, _v$5 = props.title;
|
|
1683
|
-
_v$4 !== _p$.e &&
|
|
1684
|
-
_v$5 !== _p$.t &&
|
|
1997
|
+
_v$4 !== _p$.e && _$setAttribute7(_el$7, "src", _p$.e = _v$4);
|
|
1998
|
+
_v$5 !== _p$.t && _$setAttribute7(_el$7, "alt", _p$.t = _v$5);
|
|
1685
1999
|
return _p$;
|
|
1686
2000
|
}, {
|
|
1687
2001
|
e: void 0,
|
|
@@ -1689,48 +2003,48 @@ function EventCard(props) {
|
|
|
1689
2003
|
});
|
|
1690
2004
|
return _el$6;
|
|
1691
2005
|
}
|
|
1692
|
-
}), _el$
|
|
1693
|
-
|
|
1694
|
-
|
|
2006
|
+
}), _el$38, _co$9);
|
|
2007
|
+
_$insert19(_el$9, () => props.title);
|
|
2008
|
+
_$insert19(_el$8, _$createComponent19(Show15, {
|
|
1695
2009
|
get when() {
|
|
1696
2010
|
return props.date || props.author;
|
|
1697
2011
|
},
|
|
1698
2012
|
get children() {
|
|
1699
|
-
var _el$0 = _tmpl$
|
|
1700
|
-
|
|
2013
|
+
var _el$0 = _$getNextElement21(_tmpl$57), _el$15 = _el$0.firstChild, [_el$16, _co$] = _$getNextMarker13(_el$15.nextSibling), _el$17 = _el$16.nextSibling, [_el$18, _co$2] = _$getNextMarker13(_el$17.nextSibling);
|
|
2014
|
+
_$insert19(_el$0, _$createComponent19(Show15, {
|
|
1701
2015
|
get when() {
|
|
1702
2016
|
return props.author;
|
|
1703
2017
|
},
|
|
1704
2018
|
get children() {
|
|
1705
|
-
var _el$1 = _tmpl$
|
|
1706
|
-
|
|
2019
|
+
var _el$1 = _$getNextElement21(_tmpl$313), _el$10 = _el$1.firstChild, _el$11 = _el$10.nextSibling;
|
|
2020
|
+
_$insert19(_el$11, () => props.author);
|
|
1707
2021
|
return _el$1;
|
|
1708
2022
|
}
|
|
1709
|
-
}),
|
|
1710
|
-
|
|
2023
|
+
}), _el$16, _co$);
|
|
2024
|
+
_$insert19(_el$0, _$createComponent19(Show15, {
|
|
1711
2025
|
get when() {
|
|
1712
2026
|
return props.date;
|
|
1713
2027
|
},
|
|
1714
2028
|
get children() {
|
|
1715
|
-
var _el$12 = _tmpl$
|
|
1716
|
-
|
|
2029
|
+
var _el$12 = _$getNextElement21(_tmpl$412), _el$13 = _el$12.firstChild, _el$14 = _el$13.nextSibling;
|
|
2030
|
+
_$insert19(_el$14, () => props.date);
|
|
1717
2031
|
return _el$12;
|
|
1718
2032
|
}
|
|
1719
|
-
}),
|
|
2033
|
+
}), _el$18, _co$2);
|
|
1720
2034
|
return _el$0;
|
|
1721
2035
|
}
|
|
1722
|
-
}),
|
|
1723
|
-
|
|
2036
|
+
}), _el$30, _co$5);
|
|
2037
|
+
_$insert19(_el$8, _$createComponent19(Show15, {
|
|
1724
2038
|
get when() {
|
|
1725
2039
|
return displayedAttendees().length > 0;
|
|
1726
2040
|
},
|
|
1727
2041
|
get children() {
|
|
1728
|
-
var _el$
|
|
1729
|
-
|
|
2042
|
+
var _el$19 = _$getNextElement21(_tmpl$74), _el$20 = _el$19.firstChild, _el$26 = _el$20.nextSibling, [_el$27, _co$4] = _$getNextMarker13(_el$26.nextSibling);
|
|
2043
|
+
_$insert19(_el$20, _$createComponent19(For3, {
|
|
1730
2044
|
get each() {
|
|
1731
2045
|
return displayedAttendees();
|
|
1732
2046
|
},
|
|
1733
|
-
children: (attendee) =>
|
|
2047
|
+
children: (attendee) => _$createComponent19(Avatar, {
|
|
1734
2048
|
get src() {
|
|
1735
2049
|
return attendee.avatar;
|
|
1736
2050
|
},
|
|
@@ -1740,73 +2054,90 @@ function EventCard(props) {
|
|
|
1740
2054
|
size: "sm"
|
|
1741
2055
|
})
|
|
1742
2056
|
}));
|
|
1743
|
-
|
|
2057
|
+
_$insert19(_el$19, _$createComponent19(Show15, {
|
|
1744
2058
|
get when() {
|
|
1745
2059
|
return remainingCount() > 0;
|
|
1746
2060
|
},
|
|
1747
2061
|
get children() {
|
|
1748
|
-
var _el$
|
|
1749
|
-
|
|
1750
|
-
return _el$
|
|
2062
|
+
var _el$21 = _$getNextElement21(_tmpl$64), _el$22 = _el$21.firstChild, _el$24 = _el$22.nextSibling, [_el$25, _co$3] = _$getNextMarker13(_el$24.nextSibling), _el$23 = _el$25.nextSibling;
|
|
2063
|
+
_$insert19(_el$21, remainingCount, _el$25, _co$3);
|
|
2064
|
+
return _el$21;
|
|
1751
2065
|
}
|
|
1752
|
-
}),
|
|
1753
|
-
return _el$
|
|
2066
|
+
}), _el$27, _co$4);
|
|
2067
|
+
return _el$19;
|
|
1754
2068
|
}
|
|
1755
|
-
}),
|
|
1756
|
-
|
|
2069
|
+
}), _el$32, _co$6);
|
|
2070
|
+
_$insert19(_el$8, _$createComponent19(Show15, {
|
|
1757
2071
|
get when() {
|
|
1758
2072
|
return props.actions;
|
|
1759
2073
|
},
|
|
1760
2074
|
get children() {
|
|
1761
|
-
var _el$
|
|
1762
|
-
|
|
1763
|
-
return _el$
|
|
2075
|
+
var _el$28 = _$getNextElement21(_tmpl$82);
|
|
2076
|
+
_$insert19(_el$28, () => props.actions);
|
|
2077
|
+
return _el$28;
|
|
1764
2078
|
}
|
|
1765
|
-
}),
|
|
1766
|
-
|
|
2079
|
+
}), _el$34, _co$7);
|
|
2080
|
+
_$effect20(() => _$className19(_el$, `relative bg-bg-200 rounded-3xl overflow-hidden ${props.class ?? ""}`));
|
|
1767
2081
|
return _el$;
|
|
1768
2082
|
})();
|
|
1769
2083
|
}
|
|
1770
2084
|
function EventListItem(props) {
|
|
1771
2085
|
return (() => {
|
|
1772
|
-
var _el$
|
|
1773
|
-
|
|
1774
|
-
|
|
2086
|
+
var _el$39 = _$getNextElement21(_tmpl$102), _el$47 = _el$39.firstChild, [_el$48, _co$1] = _$getNextMarker13(_el$47.nextSibling), _el$42 = _el$48.nextSibling, _el$43 = _el$42.firstChild, _el$45 = _el$43.nextSibling, [_el$46, _co$0] = _$getNextMarker13(_el$45.nextSibling);
|
|
2087
|
+
_$addEventListener6(_el$39, "click", props.onClick, true);
|
|
2088
|
+
_$insert19(_el$39, _$createComponent19(Show15, {
|
|
1775
2089
|
get when() {
|
|
1776
2090
|
return props.image;
|
|
1777
2091
|
},
|
|
1778
2092
|
get children() {
|
|
1779
|
-
var _el$
|
|
1780
|
-
|
|
2093
|
+
var _el$40 = _$getNextElement21(_tmpl$0), _el$41 = _el$40.firstChild;
|
|
2094
|
+
_$effect20((_p$) => {
|
|
1781
2095
|
var _v$6 = props.image, _v$7 = props.title;
|
|
1782
|
-
_v$6 !== _p$.e &&
|
|
1783
|
-
_v$7 !== _p$.t &&
|
|
2096
|
+
_v$6 !== _p$.e && _$setAttribute7(_el$41, "src", _p$.e = _v$6);
|
|
2097
|
+
_v$7 !== _p$.t && _$setAttribute7(_el$41, "alt", _p$.t = _v$7);
|
|
1784
2098
|
return _p$;
|
|
1785
2099
|
}, {
|
|
1786
2100
|
e: void 0,
|
|
1787
2101
|
t: void 0
|
|
1788
2102
|
});
|
|
1789
|
-
return _el$
|
|
2103
|
+
return _el$40;
|
|
1790
2104
|
}
|
|
1791
|
-
}), _el$
|
|
1792
|
-
|
|
1793
|
-
|
|
2105
|
+
}), _el$48, _co$1);
|
|
2106
|
+
_$insert19(_el$43, () => props.title);
|
|
2107
|
+
_$insert19(_el$42, _$createComponent19(Show15, {
|
|
1794
2108
|
get when() {
|
|
1795
2109
|
return props.subtitle;
|
|
1796
2110
|
},
|
|
1797
2111
|
get children() {
|
|
1798
|
-
var _el$
|
|
1799
|
-
|
|
1800
|
-
return _el$
|
|
2112
|
+
var _el$44 = _$getNextElement21(_tmpl$1);
|
|
2113
|
+
_$insert19(_el$44, () => props.subtitle);
|
|
2114
|
+
return _el$44;
|
|
1801
2115
|
}
|
|
1802
|
-
}),
|
|
1803
|
-
|
|
1804
|
-
|
|
2116
|
+
}), _el$46, _co$0);
|
|
2117
|
+
_$effect20(() => _$className19(_el$39, `flex items-center gap-3 w-full p-2 rounded-lg hover:bg-bg-300 transition-colors text-left ${props.class ?? ""}`));
|
|
2118
|
+
_$runHydrationEvents10();
|
|
2119
|
+
return _el$39;
|
|
1805
2120
|
})();
|
|
1806
2121
|
}
|
|
1807
|
-
|
|
2122
|
+
_$delegateEvents7(["click"]);
|
|
1808
2123
|
|
|
1809
|
-
|
|
2124
|
+
// src/custom/calendar-card/index.tsx
|
|
2125
|
+
import { template as _$template22 } from "solid-js/web";
|
|
2126
|
+
import { className as _$className20 } from "solid-js/web";
|
|
2127
|
+
import { getNextMarker as _$getNextMarker14 } from "solid-js/web";
|
|
2128
|
+
import { insert as _$insert20 } from "solid-js/web";
|
|
2129
|
+
import { memo as _$memo13 } from "solid-js/web";
|
|
2130
|
+
import { createComponent as _$createComponent20 } from "solid-js/web";
|
|
2131
|
+
import { setAttribute as _$setAttribute8 } from "solid-js/web";
|
|
2132
|
+
import { effect as _$effect21 } from "solid-js/web";
|
|
2133
|
+
import { getNextElement as _$getNextElement22 } from "solid-js/web";
|
|
2134
|
+
import { Show as Show16, For as For4 } from "solid-js";
|
|
2135
|
+
var _tmpl$40 = /* @__PURE__ */ _$template22(`<div class="relative h-[80px] w-[80px] flex-shrink-0 overflow-hidden rounded-xl border-2 border-accent-200"><img class="h-full w-full object-cover">`);
|
|
2136
|
+
var _tmpl$219 = /* @__PURE__ */ _$template22(`<div class="absolute bottom-[-20px] h-[30px] w-full"><div class="flex h-full w-full flex-1 justify-end gap-1">`);
|
|
2137
|
+
var _tmpl$314 = /* @__PURE__ */ _$template22(`<span class="font-semibold text-accent-200"><!$><!/> m\xE1s`);
|
|
2138
|
+
var _tmpl$413 = /* @__PURE__ */ _$template22(`<div class="flex flex-1"><span class="text-base font-normal text-primary-500">seguida por <!$><!/><!$><!/>`);
|
|
2139
|
+
var _tmpl$58 = /* @__PURE__ */ _$template22(`<div><!$><!/><div class="relative h-full flex-1 flex-col pl-3"><!$><!/><div class="flex h-full flex-col items-end justify-center pb-3 pr-5 pt-2"><div class="flex flex-1"><span class="text-lg font-semibold text-white drop-shadow-sm"></span></div><!$><!/>`);
|
|
2140
|
+
var _tmpl$65 = /* @__PURE__ */ _$template22(`<span class="font-semibold text-accent-200">`);
|
|
1810
2141
|
function CalendarCard(props) {
|
|
1811
2142
|
const displayedFollowers = () => props.followers?.slice(0, 2) ?? [];
|
|
1812
2143
|
const remainingCount = () => {
|
|
@@ -1815,17 +2146,17 @@ function CalendarCard(props) {
|
|
|
1815
2146
|
return total - displayed;
|
|
1816
2147
|
};
|
|
1817
2148
|
return (() => {
|
|
1818
|
-
var _el$ = _tmpl$
|
|
1819
|
-
|
|
2149
|
+
var _el$ = _$getNextElement22(_tmpl$58), _el$24 = _el$.firstChild, [_el$25, _co$6] = _$getNextMarker14(_el$24.nextSibling), _el$4 = _el$25.nextSibling, _el$22 = _el$4.firstChild, [_el$23, _co$5] = _$getNextMarker14(_el$22.nextSibling), _el$7 = _el$23.nextSibling, _el$8 = _el$7.firstChild, _el$9 = _el$8.firstChild, _el$20 = _el$8.nextSibling, [_el$21, _co$4] = _$getNextMarker14(_el$20.nextSibling);
|
|
2150
|
+
_$insert20(_el$, _$createComponent20(Show16, {
|
|
1820
2151
|
get when() {
|
|
1821
2152
|
return props.image;
|
|
1822
2153
|
},
|
|
1823
2154
|
get children() {
|
|
1824
|
-
var _el$2 = _tmpl
|
|
1825
|
-
|
|
2155
|
+
var _el$2 = _$getNextElement22(_tmpl$40), _el$3 = _el$2.firstChild;
|
|
2156
|
+
_$effect21((_p$) => {
|
|
1826
2157
|
var _v$ = props.image, _v$2 = props.title;
|
|
1827
|
-
_v$ !== _p$.e &&
|
|
1828
|
-
_v$2 !== _p$.t &&
|
|
2158
|
+
_v$ !== _p$.e && _$setAttribute8(_el$3, "src", _p$.e = _v$);
|
|
2159
|
+
_v$2 !== _p$.t && _$setAttribute8(_el$3, "alt", _p$.t = _v$2);
|
|
1829
2160
|
return _p$;
|
|
1830
2161
|
}, {
|
|
1831
2162
|
e: void 0,
|
|
@@ -1833,63 +2164,70 @@ function CalendarCard(props) {
|
|
|
1833
2164
|
});
|
|
1834
2165
|
return _el$2;
|
|
1835
2166
|
}
|
|
1836
|
-
}), _el$
|
|
1837
|
-
|
|
2167
|
+
}), _el$25, _co$6);
|
|
2168
|
+
_$insert20(_el$4, _$createComponent20(Show16, {
|
|
1838
2169
|
get when() {
|
|
1839
|
-
return
|
|
2170
|
+
return _$memo13(() => !!props.tags)() && props.tags.length > 0;
|
|
1840
2171
|
},
|
|
1841
2172
|
get children() {
|
|
1842
|
-
var _el$5 = _tmpl$
|
|
1843
|
-
|
|
2173
|
+
var _el$5 = _$getNextElement22(_tmpl$219), _el$6 = _el$5.firstChild;
|
|
2174
|
+
_$insert20(_el$6, _$createComponent20(For4, {
|
|
1844
2175
|
get each() {
|
|
1845
2176
|
return props.tags;
|
|
1846
2177
|
},
|
|
1847
|
-
children: (tag) =>
|
|
2178
|
+
children: (tag) => _$createComponent20(Chip, {
|
|
1848
2179
|
text: tag,
|
|
1849
2180
|
variant: "primary"
|
|
1850
2181
|
})
|
|
1851
2182
|
}));
|
|
1852
2183
|
return _el$5;
|
|
1853
2184
|
}
|
|
1854
|
-
}), _el$
|
|
1855
|
-
|
|
1856
|
-
|
|
2185
|
+
}), _el$23, _co$5);
|
|
2186
|
+
_$insert20(_el$9, () => props.title);
|
|
2187
|
+
_$insert20(_el$7, _$createComponent20(Show16, {
|
|
1857
2188
|
get when() {
|
|
1858
2189
|
return displayedFollowers().length > 0;
|
|
1859
2190
|
},
|
|
1860
2191
|
get children() {
|
|
1861
|
-
var _el$0 = _tmpl$
|
|
1862
|
-
|
|
2192
|
+
var _el$0 = _$getNextElement22(_tmpl$413), _el$1 = _el$0.firstChild, _el$10 = _el$1.firstChild, _el$16 = _el$10.nextSibling, [_el$17, _co$2] = _$getNextMarker14(_el$16.nextSibling), _el$18 = _el$17.nextSibling, [_el$19, _co$3] = _$getNextMarker14(_el$18.nextSibling);
|
|
2193
|
+
_$insert20(_el$1, _$createComponent20(For4, {
|
|
1863
2194
|
get each() {
|
|
1864
2195
|
return displayedFollowers();
|
|
1865
2196
|
},
|
|
1866
2197
|
children: (follower, index) => [(() => {
|
|
1867
|
-
var _el$
|
|
1868
|
-
|
|
1869
|
-
return _el$
|
|
1870
|
-
})(),
|
|
1871
|
-
}),
|
|
1872
|
-
|
|
2198
|
+
var _el$26 = _$getNextElement22(_tmpl$65);
|
|
2199
|
+
_$insert20(_el$26, () => follower.name);
|
|
2200
|
+
return _el$26;
|
|
2201
|
+
})(), _$memo13(() => index() < displayedFollowers().length - 1 && ", ")]
|
|
2202
|
+
}), _el$17, _co$2);
|
|
2203
|
+
_$insert20(_el$1, _$createComponent20(Show16, {
|
|
1873
2204
|
get when() {
|
|
1874
2205
|
return remainingCount() > 0;
|
|
1875
2206
|
},
|
|
1876
2207
|
get children() {
|
|
1877
2208
|
return [" ", "y ", (() => {
|
|
1878
|
-
var _el$12 = _tmpl$
|
|
1879
|
-
|
|
2209
|
+
var _el$12 = _$getNextElement22(_tmpl$314), _el$14 = _el$12.firstChild, [_el$15, _co$] = _$getNextMarker14(_el$14.nextSibling), _el$13 = _el$15.nextSibling;
|
|
2210
|
+
_$insert20(_el$12, remainingCount, _el$15, _co$);
|
|
1880
2211
|
return _el$12;
|
|
1881
2212
|
})()];
|
|
1882
2213
|
}
|
|
1883
|
-
}),
|
|
2214
|
+
}), _el$19, _co$3);
|
|
1884
2215
|
return _el$0;
|
|
1885
2216
|
}
|
|
1886
|
-
}),
|
|
1887
|
-
|
|
2217
|
+
}), _el$21, _co$4);
|
|
2218
|
+
_$effect21(() => _$className20(_el$, `flex h-[100px] w-full max-w-[500px] items-center rounded-xl border border-primary-600 border-b-accent-500 bg-bg-300 p-2 ${props.class ?? ""}`));
|
|
1888
2219
|
return _el$;
|
|
1889
2220
|
})();
|
|
1890
2221
|
}
|
|
1891
2222
|
|
|
1892
|
-
|
|
2223
|
+
// src/custom/logo/index.tsx
|
|
2224
|
+
import { template as _$template23 } from "solid-js/web";
|
|
2225
|
+
import { setAttribute as _$setAttribute9 } from "solid-js/web";
|
|
2226
|
+
import { className as _$className21 } from "solid-js/web";
|
|
2227
|
+
import { effect as _$effect22 } from "solid-js/web";
|
|
2228
|
+
import { getNextElement as _$getNextElement23 } from "solid-js/web";
|
|
2229
|
+
import { insert as _$insert21 } from "solid-js/web";
|
|
2230
|
+
var _tmpl$41 = /* @__PURE__ */ _$template23(`<span><span class=vui-logo__first></span><span class=vui-logo__second>`);
|
|
1893
2231
|
function Logo(props) {
|
|
1894
2232
|
const sizeClass = () => {
|
|
1895
2233
|
switch (props.size) {
|
|
@@ -1907,13 +2245,13 @@ function Logo(props) {
|
|
|
1907
2245
|
const firstWord = () => props.firstWord ?? "Proyecto";
|
|
1908
2246
|
const secondWord = () => props.secondWord ?? "Viviana";
|
|
1909
2247
|
return (() => {
|
|
1910
|
-
var _el$ = _tmpl
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
2248
|
+
var _el$ = _$getNextElement23(_tmpl$41), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
|
|
2249
|
+
_$insert21(_el$2, firstWord);
|
|
2250
|
+
_$insert21(_el$3, secondWord);
|
|
2251
|
+
_$effect22((_p$) => {
|
|
1914
2252
|
var _v$ = `vui-logo ${sizeClass()} ${props.class ?? ""}`, _v$2 = secondWord();
|
|
1915
|
-
_v$ !== _p$.e &&
|
|
1916
|
-
_v$2 !== _p$.t &&
|
|
2253
|
+
_v$ !== _p$.e && _$className21(_el$, _p$.e = _v$);
|
|
2254
|
+
_v$2 !== _p$.t && _$setAttribute9(_el$3, "data-text", _p$.t = _v$2);
|
|
1917
2255
|
return _p$;
|
|
1918
2256
|
}, {
|
|
1919
2257
|
e: void 0,
|
|
@@ -1923,20 +2261,30 @@ function Logo(props) {
|
|
|
1923
2261
|
})();
|
|
1924
2262
|
}
|
|
1925
2263
|
|
|
1926
|
-
|
|
2264
|
+
// src/custom/project-card/index.tsx
|
|
2265
|
+
import { template as _$template24 } from "solid-js/web";
|
|
2266
|
+
import { className as _$className22 } from "solid-js/web";
|
|
2267
|
+
import { setAttribute as _$setAttribute10 } from "solid-js/web";
|
|
2268
|
+
import { effect as _$effect23 } from "solid-js/web";
|
|
2269
|
+
import { getNextElement as _$getNextElement24 } from "solid-js/web";
|
|
2270
|
+
import { insert as _$insert22 } from "solid-js/web";
|
|
2271
|
+
var _tmpl$50 = /* @__PURE__ */ _$template24(`<div class=vui-project-card__tooltip><span>`);
|
|
2272
|
+
var _tmpl$220 = /* @__PURE__ */ _$template24(`<img class=vui-project-card__image>`);
|
|
2273
|
+
var _tmpl$315 = /* @__PURE__ */ _$template24(`<a target=_blank rel="noopener noreferrer">`);
|
|
2274
|
+
var _tmpl$414 = /* @__PURE__ */ _$template24(`<div>`);
|
|
1927
2275
|
function ProjectCard(props) {
|
|
1928
2276
|
const size = () => props.size ?? "sm";
|
|
1929
2277
|
const inactive = () => props.inactive ?? false;
|
|
1930
2278
|
const cardContent = () => [(() => {
|
|
1931
|
-
var _el$ = _tmpl
|
|
1932
|
-
|
|
2279
|
+
var _el$ = _$getNextElement24(_tmpl$50), _el$2 = _el$.firstChild;
|
|
2280
|
+
_$insert22(_el$2, () => props.name);
|
|
1933
2281
|
return _el$;
|
|
1934
2282
|
})(), (() => {
|
|
1935
|
-
var _el$3 = _tmpl$
|
|
1936
|
-
|
|
2283
|
+
var _el$3 = _$getNextElement24(_tmpl$220);
|
|
2284
|
+
_$effect23((_p$) => {
|
|
1937
2285
|
var _v$ = props.imageSrc, _v$2 = props.imageAlt ?? props.name;
|
|
1938
|
-
_v$ !== _p$.e &&
|
|
1939
|
-
_v$2 !== _p$.t &&
|
|
2286
|
+
_v$ !== _p$.e && _$setAttribute10(_el$3, "src", _p$.e = _v$);
|
|
2287
|
+
_v$2 !== _p$.t && _$setAttribute10(_el$3, "alt", _p$.t = _v$2);
|
|
1940
2288
|
return _p$;
|
|
1941
2289
|
}, {
|
|
1942
2290
|
e: void 0,
|
|
@@ -1947,12 +2295,12 @@ function ProjectCard(props) {
|
|
|
1947
2295
|
const cardClasses = () => `vui-project-card vui-project-card--${size()} ${inactive() ? "vui-project-card--inactive" : ""} ${props.class ?? ""}`;
|
|
1948
2296
|
if (props.href) {
|
|
1949
2297
|
return (() => {
|
|
1950
|
-
var _el$4 = _tmpl$
|
|
1951
|
-
|
|
1952
|
-
|
|
2298
|
+
var _el$4 = _$getNextElement24(_tmpl$315);
|
|
2299
|
+
_$insert22(_el$4, cardContent);
|
|
2300
|
+
_$effect23((_p$) => {
|
|
1953
2301
|
var _v$3 = props.href, _v$4 = cardClasses();
|
|
1954
|
-
_v$3 !== _p$.e &&
|
|
1955
|
-
_v$4 !== _p$.t &&
|
|
2302
|
+
_v$3 !== _p$.e && _$setAttribute10(_el$4, "href", _p$.e = _v$3);
|
|
2303
|
+
_v$4 !== _p$.t && _$className22(_el$4, _p$.t = _v$4);
|
|
1956
2304
|
return _p$;
|
|
1957
2305
|
}, {
|
|
1958
2306
|
e: void 0,
|
|
@@ -1962,27 +2310,72 @@ function ProjectCard(props) {
|
|
|
1962
2310
|
})();
|
|
1963
2311
|
}
|
|
1964
2312
|
return (() => {
|
|
1965
|
-
var _el$5 = _tmpl$
|
|
1966
|
-
|
|
1967
|
-
|
|
2313
|
+
var _el$5 = _$getNextElement24(_tmpl$414);
|
|
2314
|
+
_$insert22(_el$5, cardContent);
|
|
2315
|
+
_$effect23(() => _$className22(_el$5, cardClasses()));
|
|
1968
2316
|
return _el$5;
|
|
1969
2317
|
})();
|
|
1970
2318
|
}
|
|
1971
2319
|
|
|
1972
|
-
|
|
2320
|
+
// src/custom/page-layout/index.tsx
|
|
2321
|
+
import { template as _$template25 } from "solid-js/web";
|
|
2322
|
+
import { getNextElement as _$getNextElement25 } from "solid-js/web";
|
|
2323
|
+
import { runHydrationEvents as _$runHydrationEvents11 } from "solid-js/web";
|
|
2324
|
+
import { insert as _$insert23 } from "solid-js/web";
|
|
2325
|
+
import { spread as _$spread4 } from "solid-js/web";
|
|
2326
|
+
import { mergeProps as _$mergeProps9 } from "solid-js/web";
|
|
2327
|
+
import { splitProps as splitProps9 } from "solid-js";
|
|
2328
|
+
var _tmpl$51 = /* @__PURE__ */ _$template25(`<div>`);
|
|
1973
2329
|
function PageLayout(props) {
|
|
1974
|
-
const [local, rest] =
|
|
2330
|
+
const [local, rest] = splitProps9(props, ["children", "class"]);
|
|
1975
2331
|
return (() => {
|
|
1976
|
-
var _el$ = _tmpl$
|
|
1977
|
-
|
|
2332
|
+
var _el$ = _$getNextElement25(_tmpl$51);
|
|
2333
|
+
_$spread4(_el$, _$mergeProps9({
|
|
1978
2334
|
get ["class"]() {
|
|
1979
2335
|
return `vui-page ${local.class ?? ""}`;
|
|
1980
2336
|
}
|
|
1981
2337
|
}, rest), false, true);
|
|
1982
|
-
|
|
2338
|
+
_$insert23(_el$, () => local.children);
|
|
2339
|
+
_$runHydrationEvents11();
|
|
1983
2340
|
return _el$;
|
|
1984
2341
|
})();
|
|
1985
2342
|
}
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
2343
|
+
export {
|
|
2344
|
+
Alert,
|
|
2345
|
+
Avatar,
|
|
2346
|
+
AvatarGroup,
|
|
2347
|
+
Badge,
|
|
2348
|
+
Button,
|
|
2349
|
+
CalendarCard,
|
|
2350
|
+
Checkbox,
|
|
2351
|
+
CheckboxGroup,
|
|
2352
|
+
Chip,
|
|
2353
|
+
Conversation,
|
|
2354
|
+
ConversationBubble,
|
|
2355
|
+
ConversationPreview,
|
|
2356
|
+
Dialog,
|
|
2357
|
+
EventCard,
|
|
2358
|
+
EventListItem,
|
|
2359
|
+
GitHubIcon,
|
|
2360
|
+
Icon,
|
|
2361
|
+
LateralNav,
|
|
2362
|
+
Link,
|
|
2363
|
+
Logo,
|
|
2364
|
+
NavHeader,
|
|
2365
|
+
NavItem,
|
|
2366
|
+
NavLink,
|
|
2367
|
+
NavSection,
|
|
2368
|
+
PageLayout,
|
|
2369
|
+
ProfileCard,
|
|
2370
|
+
ProgressBar,
|
|
2371
|
+
ProjectCard,
|
|
2372
|
+
Radio,
|
|
2373
|
+
RadioGroup,
|
|
2374
|
+
Separator,
|
|
2375
|
+
TabSwitch,
|
|
2376
|
+
TextField,
|
|
2377
|
+
TimelineItem,
|
|
2378
|
+
ToggleSwitch,
|
|
2379
|
+
Tooltip
|
|
2380
|
+
};
|
|
2381
|
+
//# sourceMappingURL=index.js.map
|