sveltekit-ui 1.1.73 → 1.1.74
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/Components/TextInput/index.svelte.js +5 -28
- package/dist/client/docs/index.js +1 -1
- package/package.json +3 -3
- package/src/lib/Components/TextInput/index.svelte.js +5 -28
- package/src/lib/client/docs/index.js +1 -1
- package/.vercel/output/config.json +0 -64
- package/.vercel/output/functions/![-]/catchall.func/.svelte-kit/output/server/chunks/Checkbox.js +0 -285
- package/.vercel/output/functions/![-]/catchall.func/.svelte-kit/output/server/chunks/client.js +0 -1609
- package/.vercel/output/functions/![-]/catchall.func/.svelte-kit/output/server/chunks/client2.js +0 -5320
- package/.vercel/output/functions/![-]/catchall.func/.svelte-kit/output/server/chunks/docs.js +0 -26418
- package/.vercel/output/functions/![-]/catchall.func/.svelte-kit/output/server/chunks/env.js +0 -8
- package/.vercel/output/functions/![-]/catchall.func/.svelte-kit/output/server/chunks/exports.js +0 -371
- package/.vercel/output/functions/![-]/catchall.func/.svelte-kit/output/server/chunks/index.svelte.js +0 -869
- package/.vercel/output/functions/![-]/catchall.func/.svelte-kit/output/server/chunks/index2.svelte.js +0 -220
- package/.vercel/output/functions/![-]/catchall.func/.svelte-kit/output/server/chunks/index3.svelte.js +0 -914
- package/.vercel/output/functions/![-]/catchall.func/.svelte-kit/output/server/chunks/index4.svelte.js +0 -2035
- package/.vercel/output/functions/![-]/catchall.func/.svelte-kit/output/server/chunks/internal.js +0 -823
- package/.vercel/output/functions/![-]/catchall.func/.svelte-kit/output/server/chunks/internal2.js +0 -34
- package/.vercel/output/functions/![-]/catchall.func/.svelte-kit/output/server/chunks/server.js +0 -4203
- package/.vercel/output/functions/![-]/catchall.func/.svelte-kit/output/server/chunks/shared.js +0 -298
- package/.vercel/output/functions/![-]/catchall.func/.svelte-kit/output/server/chunks/state.js +0 -76
- package/.vercel/output/functions/![-]/catchall.func/.svelte-kit/output/server/chunks/utils.js +0 -903
- package/.vercel/output/functions/![-]/catchall.func/.svelte-kit/output/server/entries/endpoints/sitemap.xml/_server.js +0 -223
- package/.vercel/output/functions/![-]/catchall.func/.svelte-kit/output/server/entries/fallbacks/error.svelte.js +0 -10
- package/.vercel/output/functions/![-]/catchall.func/.svelte-kit/output/server/entries/hooks.server.js +0 -7
- package/.vercel/output/functions/![-]/catchall.func/.svelte-kit/output/server/entries/pages/_layout.js +0 -8
- package/.vercel/output/functions/![-]/catchall.func/.svelte-kit/output/server/entries/pages/_layout.svelte.js +0 -826
- package/.vercel/output/functions/![-]/catchall.func/.svelte-kit/output/server/entries/pages/_page.svelte.js +0 -345
- package/.vercel/output/functions/![-]/catchall.func/.svelte-kit/output/server/entries/pages/components/_component_/_page.svelte.js +0 -9431
- package/.vercel/output/functions/![-]/catchall.func/.svelte-kit/output/server/entries/pages/test/_page.svelte.js +0 -50
- package/.vercel/output/functions/![-]/catchall.func/.svelte-kit/output/server/entries/pages/test2/_page.svelte.js +0 -10909
- package/.vercel/output/functions/![-]/catchall.func/.svelte-kit/output/server/entries/pages/test3/_page.server.js +0 -9466
- package/.vercel/output/functions/![-]/catchall.func/.svelte-kit/output/server/entries/pages/test3/_page.svelte.js +0 -99
- package/.vercel/output/functions/![-]/catchall.func/.svelte-kit/output/server/index.js +0 -3515
- package/.vercel/output/functions/![-]/catchall.func/.svelte-kit/output/server/nodes/0.js +0 -10
- package/.vercel/output/functions/![-]/catchall.func/.svelte-kit/output/server/nodes/1.js +0 -8
- package/.vercel/output/functions/![-]/catchall.func/.svelte-kit/output/server/nodes/2.js +0 -8
- package/.vercel/output/functions/![-]/catchall.func/.svelte-kit/output/server/nodes/3.js +0 -8
- package/.vercel/output/functions/![-]/catchall.func/.svelte-kit/output/server/nodes/4.js +0 -8
- package/.vercel/output/functions/![-]/catchall.func/.svelte-kit/output/server/nodes/5.js +0 -8
- package/.vercel/output/functions/![-]/catchall.func/.svelte-kit/output/server/nodes/6.js +0 -10
- package/.vercel/output/functions/![-]/catchall.func/.svelte-kit/vercel-tmp/index.js +0 -42
- package/.vercel/output/functions/![-]/catchall.func/.svelte-kit/vercel-tmp/manifest.js +0 -78
- package/.vercel/output/functions/![-]/catchall.func/.vc-config.json +0 -11
- package/.vercel/output/functions/![-]/catchall.func/package.json +0 -1
- package/.vercel/output/static/_app/immutable/assets/0.D1AvWWSC.css +0 -1
- package/.vercel/output/static/_app/immutable/assets/2.D3o4PLbP.css +0 -1
- package/.vercel/output/static/_app/immutable/assets/3.DK3uvf0v.css +0 -1
- package/.vercel/output/static/_app/immutable/assets/6.BnjxUmH7.css +0 -1
- package/.vercel/output/static/_app/immutable/assets/Checkbox.CJEZNdbe.css +0 -1
- package/.vercel/output/static/_app/immutable/assets/alloy-voice-sample.PT8wH6s9.mp3 +0 -0
- package/.vercel/output/static/_app/immutable/assets/docs.CDTCxDP7.css +0 -1
- package/.vercel/output/static/_app/immutable/assets/echo-voice-sample.pUPbplSr.mp3 +0 -0
- package/.vercel/output/static/_app/immutable/assets/fable-voice-sample.DLFL6517.mp3 +0 -0
- package/.vercel/output/static/_app/immutable/assets/index.CCk09GbO.css +0 -1
- package/.vercel/output/static/_app/immutable/assets/index.CYJKF3O7.css +0 -1
- package/.vercel/output/static/_app/immutable/assets/index.DCBl_q1O.css +0 -1
- package/.vercel/output/static/_app/immutable/assets/index.DatXVBdh.css +0 -1
- package/.vercel/output/static/_app/immutable/assets/nova-voice-sample.DWaD-VGb.mp3 +0 -0
- package/.vercel/output/static/_app/immutable/assets/onyx-voice-sample.DMRXZHJF.mp3 +0 -0
- package/.vercel/output/static/_app/immutable/assets/shimmer-voice-sample.Cho2QgFr.mp3 +0 -0
- package/.vercel/output/static/_app/immutable/chunks/BLfjN0VF.js +0 -1
- package/.vercel/output/static/_app/immutable/chunks/BddFMzPD.js +0 -1
- package/.vercel/output/static/_app/immutable/chunks/Bjy-W4x2.js +0 -81
- package/.vercel/output/static/_app/immutable/chunks/BqBxxYmA.js +0 -14
- package/.vercel/output/static/_app/immutable/chunks/CJM4yLow.js +0 -25
- package/.vercel/output/static/_app/immutable/chunks/CRYWmS0s.js +0 -19
- package/.vercel/output/static/_app/immutable/chunks/CZIC9Qgj.js +0 -11
- package/.vercel/output/static/_app/immutable/chunks/CvmT24cS.js +0 -3
- package/.vercel/output/static/_app/immutable/chunks/D566uQC1.js +0 -2
- package/.vercel/output/static/_app/immutable/chunks/SvbogVTv.js +0 -119
- package/.vercel/output/static/_app/immutable/chunks/_g5tLpFU.js +0 -3
- package/.vercel/output/static/_app/immutable/chunks/u3U-vofW.js +0 -15
- package/.vercel/output/static/_app/immutable/chunks/xihTtKlq.js +0 -1
- package/.vercel/output/static/_app/immutable/entry/app.td6ThZ7k.js +0 -2
- package/.vercel/output/static/_app/immutable/entry/start.2Q3_BAwG.js +0 -1
- package/.vercel/output/static/_app/immutable/nodes/0.C2Ckbl4e.js +0 -8
- package/.vercel/output/static/_app/immutable/nodes/1.DLziSd8k.js +0 -1
- package/.vercel/output/static/_app/immutable/nodes/2.BX7tnCWG.js +0 -58
- package/.vercel/output/static/_app/immutable/nodes/3.CEpCPaPY.js +0 -22
- package/.vercel/output/static/_app/immutable/nodes/4.Ux2eRH04.js +0 -1
- package/.vercel/output/static/_app/immutable/nodes/5.Cv9G2Xkm.js +0 -1
- package/.vercel/output/static/_app/immutable/nodes/6.DcYd4Shl.js +0 -1
- package/.vercel/output/static/_app/version.json +0 -1
- package/.vercel/output/static/android-chrome-192x192.png +0 -0
- package/.vercel/output/static/android-chrome-512x512.png +0 -0
- package/.vercel/output/static/apple-touch-icon.png +0 -0
- package/.vercel/output/static/favicon-inactive.svg +0 -4
- package/.vercel/output/static/favicon-themed.svg +0 -11
- package/.vercel/output/static/favicon-transparent-bg.webp +0 -0
- package/.vercel/output/static/favicon-transparent.webp +0 -0
- package/.vercel/output/static/favicon.png +0 -0
- package/.vercel/output/static/favicon.svg +0 -3
- package/.vercel/output/static/favicon.webp +0 -0
- package/.vercel/output/static/fonts/ProximaVara.woff2 +0 -0
- package/.vercel/output/static/fonts/Quicksand-VariableFont.woff2 +0 -0
- package/.vercel/output/static/fonts/RobotoSerif-VariableFont.woff2 +0 -0
- package/.vercel/output/static/full_logo.webp +0 -0
- package/.vercel/output/static/icon.png +0 -0
- package/.vercel/output/static/site.webmanifest +0 -21
- package/.vercel/output/static/thumbnail.png +0 -0
- package/.vercel/output/static/thumbnail.webp +0 -0
|
@@ -1,220 +0,0 @@
|
|
|
1
|
-
import { o as tick } from "./internal.js";
|
|
2
|
-
import { C as escape_html, i as derived, l as stringify, n as attr_style, o as ensure_array_like, t as attr_class } from "./server.js";
|
|
3
|
-
import { o as ErrorX, r as Button, s as SuccessCheck, t as create_button_manager } from "./index.svelte.js";
|
|
4
|
-
import { g as set_closurable, o as create_unique_id } from "./client2.js";
|
|
5
|
-
//#region src/lib/Components/Alert/index.svelte
|
|
6
|
-
function Alert($$renderer, $$props) {
|
|
7
|
-
$$renderer.component(($$renderer) => {
|
|
8
|
-
let { manager = null, options = null, on_alert_added } = $$props;
|
|
9
|
-
$$renderer.push(`<div class="alerts_container svelte-tl9dw9">`);
|
|
10
|
-
if (Array.isArray(manager?.alerts) && manager?.alerts.length > 0) {
|
|
11
|
-
$$renderer.push("<!--[0-->");
|
|
12
|
-
$$renderer.push(`<!--[-->`);
|
|
13
|
-
const each_array = ensure_array_like(manager?.alerts);
|
|
14
|
-
for (let i = 0, $$length = each_array.length; i < $$length; i++) {
|
|
15
|
-
let alert = each_array[i];
|
|
16
|
-
$$renderer.push(`<div${attr_class("card alert_box svelte-tl9dw9", void 0, {
|
|
17
|
-
"alert_container": !manager?.is_small_screen,
|
|
18
|
-
"small_alert_container": manager?.is_small_screen
|
|
19
|
-
})}${attr_style(`--br: ${stringify(manager?.border_radius)}rem;`)}><div class="icon svelte-tl9dw9">`);
|
|
20
|
-
if (alert.icon === "check") {
|
|
21
|
-
$$renderer.push("<!--[0-->");
|
|
22
|
-
SuccessCheck($$renderer, { color: manager?.success_icon_color });
|
|
23
|
-
} else if (alert.icon === "x") {
|
|
24
|
-
$$renderer.push("<!--[1-->");
|
|
25
|
-
ErrorX($$renderer, { color: manager?.error_icon_color });
|
|
26
|
-
} else $$renderer.push("<!--[-1-->");
|
|
27
|
-
$$renderer.push(`<!--]--></div> <div class="text_container svelte-tl9dw9"><h3 class="svelte-tl9dw9">${escape_html(alert.header)}</h3> <p>${escape_html(alert.message)}</p></div> <div class="x svelte-tl9dw9">`);
|
|
28
|
-
Button($$renderer, { manager: alert?.x_button_manager });
|
|
29
|
-
$$renderer.push(`<!----></div></div>`);
|
|
30
|
-
}
|
|
31
|
-
$$renderer.push(`<!--]-->`);
|
|
32
|
-
} else $$renderer.push("<!--[-1-->");
|
|
33
|
-
$$renderer.push(`<!--]--></div>`);
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
//#endregion
|
|
37
|
-
//#region src/lib/Components/Confetti/index.svelte
|
|
38
|
-
function Confetti($$renderer, $$props) {
|
|
39
|
-
$$renderer.component(($$renderer) => {
|
|
40
|
-
let { manager } = $$props;
|
|
41
|
-
if (manager?.is_show) {
|
|
42
|
-
$$renderer.push("<!--[0-->");
|
|
43
|
-
$$renderer.push(`<div${attr_class("container svelte-1vyaegh", void 0, { "full": manager?.type == "full" })}${attr_style(` --border_radius: ${stringify(manager?.border_radius)}rem; --fall_distance: ${stringify(manager?.fall_distance)}; --size: ${stringify(manager?.size)}rem; --transition_duration: ${stringify(manager?.transition_duration)}ms; --x_spread: ${stringify(manager?.x_spread)}`)}><!--[-->`);
|
|
44
|
-
const each_array = ensure_array_like(manager?.confetti_prepped);
|
|
45
|
-
for (let $$index = 0, $$length = each_array.length; $$index < $$length; $$index++) {
|
|
46
|
-
let item = each_array[$$index];
|
|
47
|
-
$$renderer.push(`<div class="item svelte-1vyaegh"${attr_style(` --item_bg: ${stringify(item?.item_bg)}; --skew: ${stringify(item?.skew)}; --rotation_xyz: ${stringify(item?.rotation_xyz)}; --rotation_deg: ${stringify(item?.rotation_deg)}; --translate_x: ${stringify(item?.translate_x)}; --translate_y: ${stringify(item?.translate_y)}; --scale: ${stringify(item?.scale)}; --transition_delay: ${stringify(item?.transition_time_range)};`)}></div>`);
|
|
48
|
-
}
|
|
49
|
-
$$renderer.push(`<!--]--></div>`);
|
|
50
|
-
} else $$renderer.push("<!--[-1-->");
|
|
51
|
-
$$renderer.push(`<!--]-->`);
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
//#endregion
|
|
55
|
-
//#region src/lib/Components/Alert/index.svelte.js
|
|
56
|
-
function create_alert_manager(config) {
|
|
57
|
-
let alerts = [];
|
|
58
|
-
let is_small_screen = false;
|
|
59
|
-
let x_color = "var(--g7-t)";
|
|
60
|
-
let border_radius = 1;
|
|
61
|
-
let success_icon_color = "var(--success-t)";
|
|
62
|
-
let error_icon_color = "var(--error-t)";
|
|
63
|
-
let interval = null;
|
|
64
|
-
function run_auto_delete() {
|
|
65
|
-
if (interval) {
|
|
66
|
-
clearInterval(interval);
|
|
67
|
-
interval = null;
|
|
68
|
-
}
|
|
69
|
-
if (Array.isArray(alerts) && alerts.length > 0) interval = setInterval(function() {
|
|
70
|
-
if (Array.isArray(alerts) && alerts.length > 0) {
|
|
71
|
-
alerts.sort((a, b) => a?.epoch - b?.epoch);
|
|
72
|
-
const id = alerts[0]?.id;
|
|
73
|
-
if (id) delete_alert(id);
|
|
74
|
-
}
|
|
75
|
-
}, 3800);
|
|
76
|
-
}
|
|
77
|
-
function delete_alert(id) {
|
|
78
|
-
if (Array.isArray(alerts)) {
|
|
79
|
-
alerts = alerts.filter((h) => h?.id != id);
|
|
80
|
-
if (alerts.length < 1 && interval) {
|
|
81
|
-
clearInterval(interval);
|
|
82
|
-
interval = null;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
function add_alert(header, message, icon) {
|
|
87
|
-
const id = create_unique_id(null, 20);
|
|
88
|
-
const alert_to_add = {
|
|
89
|
-
id,
|
|
90
|
-
header,
|
|
91
|
-
message,
|
|
92
|
-
icon,
|
|
93
|
-
epoch: Math.floor(Date.now() / 1e3),
|
|
94
|
-
x_button_manager: create_button_manager({
|
|
95
|
-
type: "soft",
|
|
96
|
-
support_icon: "x",
|
|
97
|
-
is_uniform: true,
|
|
98
|
-
on_click: () => delete_alert(id)
|
|
99
|
-
})
|
|
100
|
-
};
|
|
101
|
-
alerts.push(alert_to_add);
|
|
102
|
-
if (!interval) run_auto_delete();
|
|
103
|
-
if (config?.on_alert_added) config?.on_alert_added(alert_to_add);
|
|
104
|
-
}
|
|
105
|
-
function init(config) {
|
|
106
|
-
alerts = config?.alerts ?? [];
|
|
107
|
-
is_small_screen = config?.is_small_screen ?? false;
|
|
108
|
-
x_color = config?.x_color ?? "var(--g7-t)";
|
|
109
|
-
border_radius = config?.border_radius ?? 1;
|
|
110
|
-
success_icon_color = config?.success_icon_color ?? "var(--success-t)";
|
|
111
|
-
error_icon_color = config?.alerts ?? "var(--error-t)";
|
|
112
|
-
run_auto_delete();
|
|
113
|
-
}
|
|
114
|
-
init(config);
|
|
115
|
-
return {
|
|
116
|
-
get interval() {
|
|
117
|
-
return interval;
|
|
118
|
-
},
|
|
119
|
-
get alerts() {
|
|
120
|
-
return alerts;
|
|
121
|
-
},
|
|
122
|
-
get is_small_screen() {
|
|
123
|
-
return is_small_screen;
|
|
124
|
-
},
|
|
125
|
-
get x_color() {
|
|
126
|
-
return x_color;
|
|
127
|
-
},
|
|
128
|
-
get border_radius() {
|
|
129
|
-
return border_radius;
|
|
130
|
-
},
|
|
131
|
-
get success_icon_color() {
|
|
132
|
-
return success_icon_color;
|
|
133
|
-
},
|
|
134
|
-
get error_icon_color() {
|
|
135
|
-
return error_icon_color;
|
|
136
|
-
},
|
|
137
|
-
add_alert,
|
|
138
|
-
delete_alert
|
|
139
|
-
};
|
|
140
|
-
}
|
|
141
|
-
//#endregion
|
|
142
|
-
//#region src/lib/Components/Confetti/index.svelte.js
|
|
143
|
-
function create_confetti_manager(config) {
|
|
144
|
-
let type = derived(() => set_closurable(config?.type, null));
|
|
145
|
-
let amount = derived(() => set_closurable(config?.amount, 50));
|
|
146
|
-
let size = derived(() => set_closurable(config?.size, 1.2));
|
|
147
|
-
let x_range = derived(() => set_closurable(config?.x_range, [-10, 10]));
|
|
148
|
-
let x_spread = derived(() => set_closurable(config?.x_spread, .9));
|
|
149
|
-
let y_range = derived(() => set_closurable(config?.y_range, [-3, -10]));
|
|
150
|
-
let time_range = derived(() => set_closurable(config?.time_range, 50));
|
|
151
|
-
let duration = derived(() => set_closurable(config?.duration, 2e3));
|
|
152
|
-
let item_bg = derived(() => set_closurable(config?.item_bg, null));
|
|
153
|
-
let fall_distance = derived(() => set_closurable(config?.fall_distance, "10rem"));
|
|
154
|
-
let border_radius = derived(() => set_closurable(config?.border_radius, .1));
|
|
155
|
-
let is_show = false;
|
|
156
|
-
let confetti_prepped = null;
|
|
157
|
-
function random_between(min, max) {
|
|
158
|
-
return (Math.random() * (max - min) + min).toPrecision(4);
|
|
159
|
-
}
|
|
160
|
-
function get_item_bg() {
|
|
161
|
-
if (Array.isArray(item_bg()) && item_bg().length) return item_bg()[Math.round(Math.random() * (item_bg().length - 1))];
|
|
162
|
-
else if (item_bg() == "rainbow") return `oklch(var(--l6-t) var(--c10) var(--h${Math.round(random_between(0, 24))}))`;
|
|
163
|
-
return `oklch(var(--l6-t) var(--c${Math.round(random_between(1, 14))}) var(--primary-h))`;
|
|
164
|
-
}
|
|
165
|
-
function prep_confetti() {
|
|
166
|
-
let confetti_prepped_loc = [];
|
|
167
|
-
for (let i = 0; i < amount(); i++) {
|
|
168
|
-
const item_bg = get_item_bg();
|
|
169
|
-
confetti_prepped_loc.push({
|
|
170
|
-
item_bg,
|
|
171
|
-
skew: `${random_between(-45, 45)}deg,${random_between(-45, 45)}deg`,
|
|
172
|
-
rotation_xyz: `${random_between(-10, 10)}, ${random_between(-10, 10)}, ${random_between(-10, 10)}`,
|
|
173
|
-
rotation_deg: `${random_between(0, 360)}deg`,
|
|
174
|
-
translate_x: `${Math.floor(random_between(x_range()?.[0], x_range()?.[1]))}rem`,
|
|
175
|
-
translate_y: `${Math.floor(random_between(y_range()?.[0], y_range()?.[1]))}rem`,
|
|
176
|
-
scale: .1 * random_between(2, 10),
|
|
177
|
-
transition_time_range: `${random_between(0, time_range())}ms`
|
|
178
|
-
});
|
|
179
|
-
}
|
|
180
|
-
confetti_prepped = confetti_prepped_loc;
|
|
181
|
-
}
|
|
182
|
-
async function show_confetti() {
|
|
183
|
-
is_show = false;
|
|
184
|
-
prep_confetti();
|
|
185
|
-
await tick();
|
|
186
|
-
is_show = true;
|
|
187
|
-
setTimeout(() => {
|
|
188
|
-
is_show = false;
|
|
189
|
-
}, duration() + time_range());
|
|
190
|
-
}
|
|
191
|
-
return {
|
|
192
|
-
get type() {
|
|
193
|
-
return type();
|
|
194
|
-
},
|
|
195
|
-
get confetti_prepped() {
|
|
196
|
-
return confetti_prepped;
|
|
197
|
-
},
|
|
198
|
-
get is_show() {
|
|
199
|
-
return is_show;
|
|
200
|
-
},
|
|
201
|
-
get border_radius() {
|
|
202
|
-
return border_radius();
|
|
203
|
-
},
|
|
204
|
-
get fall_distance() {
|
|
205
|
-
return fall_distance();
|
|
206
|
-
},
|
|
207
|
-
get size() {
|
|
208
|
-
return size();
|
|
209
|
-
},
|
|
210
|
-
get transition_duration() {
|
|
211
|
-
return duration();
|
|
212
|
-
},
|
|
213
|
-
get x_spread() {
|
|
214
|
-
return x_spread();
|
|
215
|
-
},
|
|
216
|
-
show_confetti
|
|
217
|
-
};
|
|
218
|
-
}
|
|
219
|
-
//#endregion
|
|
220
|
-
export { Alert as i, create_alert_manager as n, Confetti as r, create_confetti_manager as t };
|