@tachui/primitives 0.8.27 → 0.8.29
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/{BasicInput-BHfrSdoi.js → BasicInput-CxQxJL1j.js} +1 -1
- package/dist/{Picker-Cjf9fmKK.js → Picker-DwKarueX.js} +32 -32
- package/dist/{ScrollView-4WhOoZol.js → ScrollView-DdlbVVKn.js} +68 -68
- package/dist/{Text-B8LIkq2h.js → Text-DmpfnY1o.js} +10 -10
- package/dist/controls/index.js +1 -1
- package/dist/display/index.js +2 -2
- package/dist/forms/index.js +1 -1
- package/dist/index.js +79 -79
- package/package.json +18 -18
- package/LICENSE +0 -363
|
@@ -2,7 +2,7 @@ import { withModifiers as v, createSignal as g, createEffect as c, h as p, text
|
|
|
2
2
|
var C = Object.defineProperty, w = (t, e, s) => e in t ? C(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s, o = (t, e, s) => w(t, typeof e != "symbol" ? e + "" : e, s);
|
|
3
3
|
class u {
|
|
4
4
|
constructor(e) {
|
|
5
|
-
this
|
|
5
|
+
o(this, "props", e), o(this, "type", "component"), o(this, "id"), o(this, "mounted", !1), o(this, "cleanup", []), o(this, "formElement", null), o(this, "validationErrors"), o(this, "setValidationErrors"), o(this, "setIsValid"), o(this, "handleSubmit", async (n) => {
|
|
6
6
|
if (n.preventDefault(), this.props.validateOnSubmit !== !1) {
|
|
7
7
|
const a = this.validateForm();
|
|
8
8
|
if (this.setValidationErrors(a), a.length > 0)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { withModifiers as A, ComponentWithCSSClasses as q, createSignal as R, useLifecycle as J, createEffect as Y, isSignal as l, ColorAsset as E, h as a, text as d, ConcatenatedComponent as P, clonePropsPreservingReactivity as N, resetLifecycleState as U, createComputed as Q } from "@tachui/core";
|
|
2
2
|
import { createComponentInstance as ee } from "@tachui/core/components";
|
|
3
|
-
import { T as W } from "./Text-
|
|
4
|
-
var te = Object.defineProperty, ie = (s, e, t) => e in s ? te(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t,
|
|
3
|
+
import { T as W } from "./Text-DmpfnY1o.js";
|
|
4
|
+
var te = Object.defineProperty, ie = (s, e, t) => e in s ? te(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t, m = (s, e, t) => ie(s, typeof e != "symbol" ? e + "" : e, t);
|
|
5
5
|
const se = {
|
|
6
6
|
colors: {
|
|
7
7
|
primary: "#007AFF",
|
|
@@ -33,7 +33,7 @@ const se = {
|
|
|
33
33
|
};
|
|
34
34
|
class z extends q {
|
|
35
35
|
constructor(e, t = se) {
|
|
36
|
-
super(), this
|
|
36
|
+
super(), m(this, "props", e), m(this, "type", "component"), m(this, "id"), m(this, "mounted", !1), m(this, "cleanup", []), m(this, "stateSignal"), m(this, "setState"), m(this, "theme"), this.id = `button-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`, this.theme = t;
|
|
37
37
|
const [i, n] = R("normal");
|
|
38
38
|
this.stateSignal = i, this.setState = n, this.setupDOMEventListeners();
|
|
39
39
|
}
|
|
@@ -222,33 +222,33 @@ class z extends q {
|
|
|
222
222
|
};
|
|
223
223
|
w.padding = `${k}px ${k * 2}px`, w.borderRadius = `${Z}px`, w.fontSize = `${H.size}px`, w.fontWeight = H.weight, w.minHeight = K[t];
|
|
224
224
|
}
|
|
225
|
-
let
|
|
225
|
+
let f = "transparent", S = "transparent", _ = "1px", C;
|
|
226
226
|
const X = this.resolveColorValue(n), O = this.resolveColorValue(r), D = this.resolveColorValue(o);
|
|
227
227
|
if (e) {
|
|
228
228
|
const k = X || this.theme.colors.primary;
|
|
229
229
|
switch (e) {
|
|
230
230
|
case "filled":
|
|
231
|
-
i === "destructive" ?
|
|
231
|
+
i === "destructive" ? f = this.theme.colors.destructive : i === "cancel" ? f = this.theme.colors.secondary : f = k, C = this.theme.colors.onPrimary;
|
|
232
232
|
break;
|
|
233
233
|
case "outlined":
|
|
234
|
-
|
|
234
|
+
S = i === "destructive" ? this.theme.colors.destructive : k, C = i === "destructive" ? this.theme.colors.destructive : k;
|
|
235
235
|
break;
|
|
236
236
|
case "bordered":
|
|
237
|
-
|
|
237
|
+
f = this.theme.colors.background, S = this.theme.colors.border;
|
|
238
238
|
break;
|
|
239
239
|
case "borderedProminent":
|
|
240
|
-
|
|
240
|
+
f = this.theme.colors.surface, S = this.theme.colors.primary, _ = "2px";
|
|
241
241
|
break;
|
|
242
242
|
}
|
|
243
243
|
}
|
|
244
|
-
O && (
|
|
244
|
+
O && (f = O), D && (C = D);
|
|
245
245
|
let F = "1", I = "auto", B, V = "none";
|
|
246
|
-
T ? h ? (F = "0.6", I = "none") : c === "pressed" ? (
|
|
246
|
+
T ? h ? (F = "0.6", I = "none") : c === "pressed" ? (f = this.darkenColor(f, 0.1), S = this.darkenColor(S, 0.1), B = "scale(0.95)") : c === "focused" && (V = "0 0 0 3px #007AFF40") : (f = this.theme.colors.disabled, S = this.theme.colors.disabled, C = this.theme.colors.disabled, F = "0.6", I = "none");
|
|
247
247
|
const p = {
|
|
248
248
|
...w
|
|
249
249
|
// Size-based styles (only if size provided)
|
|
250
250
|
};
|
|
251
|
-
return e && (p.backgroundColor =
|
|
251
|
+
return e && (p.backgroundColor = f, p.borderColor = S, p.borderWidth = _, C !== void 0 && (p.color = C)), O && (p.backgroundColor = O), D && (p.color = D), p.cursor = T ? "pointer" : "not-allowed", p.opacity = F, p.pointerEvents = I, p.transform = B !== void 0 ? B : "none", this.hasShadowModifier() || (p.boxShadow = V), p.transition = "all 0.2s ease", p;
|
|
252
252
|
}
|
|
253
253
|
/**
|
|
254
254
|
* Handle button press with proper state management
|
|
@@ -584,7 +584,7 @@ function me(s, e) {
|
|
|
584
584
|
const t = s, i = new G(t);
|
|
585
585
|
return A(i);
|
|
586
586
|
}
|
|
587
|
-
const
|
|
587
|
+
const x = {
|
|
588
588
|
/**
|
|
589
589
|
* Create an external link that opens in a new tab
|
|
590
590
|
*/
|
|
@@ -665,35 +665,35 @@ const S = {
|
|
|
665
665
|
*/
|
|
666
666
|
social: {
|
|
667
667
|
twitter(s, e) {
|
|
668
|
-
return
|
|
668
|
+
return x.external(
|
|
669
669
|
`https://twitter.com/${s}`,
|
|
670
670
|
e || `@${s}`,
|
|
671
671
|
{ accessibilityLabel: `Visit ${s} on Twitter` }
|
|
672
672
|
);
|
|
673
673
|
},
|
|
674
674
|
github(s, e) {
|
|
675
|
-
return
|
|
675
|
+
return x.external(
|
|
676
676
|
`https://github.com/${s}`,
|
|
677
677
|
e || s,
|
|
678
678
|
{ accessibilityLabel: `Visit ${s} on GitHub` }
|
|
679
679
|
);
|
|
680
680
|
},
|
|
681
681
|
linkedin(s, e) {
|
|
682
|
-
return
|
|
682
|
+
return x.external(
|
|
683
683
|
`https://linkedin.com/in/${s}`,
|
|
684
684
|
e || s,
|
|
685
685
|
{ accessibilityLabel: `Visit ${s} on LinkedIn` }
|
|
686
686
|
);
|
|
687
687
|
},
|
|
688
688
|
instagram(s, e) {
|
|
689
|
-
return
|
|
689
|
+
return x.external(
|
|
690
690
|
`https://instagram.com/${s}`,
|
|
691
691
|
e || `@${s}`,
|
|
692
692
|
{ accessibilityLabel: `Visit ${s} on Instagram` }
|
|
693
693
|
);
|
|
694
694
|
},
|
|
695
695
|
facebook(s, e) {
|
|
696
|
-
return
|
|
696
|
+
return x.external(
|
|
697
697
|
`https://facebook.com/${s}`,
|
|
698
698
|
e || s,
|
|
699
699
|
{ accessibilityLabel: `Visit ${s} on Facebook` }
|
|
@@ -705,7 +705,7 @@ const S = {
|
|
|
705
705
|
*/
|
|
706
706
|
appStore: {
|
|
707
707
|
ios(s, e) {
|
|
708
|
-
return
|
|
708
|
+
return x.external(
|
|
709
709
|
`https://apps.apple.com/app/id${s}`,
|
|
710
710
|
e || "Download from App Store",
|
|
711
711
|
{
|
|
@@ -715,7 +715,7 @@ const S = {
|
|
|
715
715
|
);
|
|
716
716
|
},
|
|
717
717
|
android(s, e) {
|
|
718
|
-
return
|
|
718
|
+
return x.external(
|
|
719
719
|
`https://play.google.com/store/apps/details?id=${s}`,
|
|
720
720
|
e || "Get it on Google Play",
|
|
721
721
|
{
|
|
@@ -732,10 +732,10 @@ const S = {
|
|
|
732
732
|
return (e) => s(e) ? "handled" : "systemAction";
|
|
733
733
|
}
|
|
734
734
|
};
|
|
735
|
-
var ae = Object.defineProperty, le = (s, e, t) => e in s ? ae(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t,
|
|
735
|
+
var ae = Object.defineProperty, le = (s, e, t) => e in s ? ae(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t, y = (s, e, t) => le(s, typeof e != "symbol" ? e + "" : e, t);
|
|
736
736
|
class ce {
|
|
737
737
|
constructor(e) {
|
|
738
|
-
this
|
|
738
|
+
y(this, "props", e), y(this, "type", "component"), y(this, "id"), y(this, "mounted", !1), y(this, "cleanup", []), y(this, "toggleElement", null), y(this, "setIsAnimating"), y(this, "handleToggle", async (i) => {
|
|
739
739
|
if (i.preventDefault(), this.isDisabled()) return;
|
|
740
740
|
const n = !this.getIsOn();
|
|
741
741
|
this.props.animated !== !1 && (this.setIsAnimating(!0), setTimeout(() => {
|
|
@@ -1225,12 +1225,12 @@ const ye = {
|
|
|
1225
1225
|
}
|
|
1226
1226
|
}
|
|
1227
1227
|
};
|
|
1228
|
-
var de = Object.defineProperty, pe = (s, e, t) => e in s ? de(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t,
|
|
1228
|
+
var de = Object.defineProperty, pe = (s, e, t) => e in s ? de(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t, u = (s, e, t) => pe(s, typeof e != "symbol" ? e + "" : e, t);
|
|
1229
1229
|
class he {
|
|
1230
1230
|
constructor(e) {
|
|
1231
|
-
this
|
|
1231
|
+
u(this, "props", e), u(this, "type", "component"), u(this, "id"), u(this, "mounted", !1), u(this, "cleanup", []), u(this, "isOpen"), u(this, "setIsOpen"), u(this, "searchTerm"), u(this, "setSearchTerm"), u(this, "handleSelection", (o) => {
|
|
1232
1232
|
this.props.onSelectionChange && this.props.onSelectionChange(o), (this.props.variant === "dropdown" || this.props.variant === "menu") && this.setIsOpen(!1), this.setSearchTerm("");
|
|
1233
|
-
}),
|
|
1233
|
+
}), u(this, "toggleOpen", () => {
|
|
1234
1234
|
this.isDisabled() || this.setIsOpen(!this.isOpen());
|
|
1235
1235
|
}), this.id = `picker-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
|
|
1236
1236
|
const [t, i] = R(!1), [n, r] = R("");
|
|
@@ -1700,13 +1700,13 @@ export {
|
|
|
1700
1700
|
$ as P,
|
|
1701
1701
|
b as T,
|
|
1702
1702
|
ge as a,
|
|
1703
|
-
|
|
1703
|
+
he as b,
|
|
1704
1704
|
ce as c,
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1705
|
+
x as d,
|
|
1706
|
+
xe as e,
|
|
1707
|
+
ve as f,
|
|
1708
|
+
ye as g,
|
|
1709
|
+
Se as h,
|
|
1710
|
+
j as i,
|
|
1711
|
+
se as j
|
|
1712
1712
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ComponentWithCSSClasses as V, processElementOverride as D, createSignal as T, useLifecycle as k, registerComponentWithLifecycleHooks as F, h as y, createEffect as b, ConcatenatedComponent as A, withModifiers as f, sanitizeSVG as N, text as Y, isSignal as E } from "@tachui/core";
|
|
2
2
|
import { isSignal as x, isComputed as z } from "@tachui/core/reactive";
|
|
3
3
|
import { aspectRatio as $ } from "@tachui/modifiers";
|
|
4
4
|
var B = Object.defineProperty, j = (e, t, s) => t in e ? B(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, m = (e, t, s) => j(e, typeof t != "symbol" ? t + "" : t, s);
|
|
5
|
-
const M = /* @__PURE__ */ new Map(),
|
|
5
|
+
const M = /* @__PURE__ */ new Map(), R = /* @__PURE__ */ new Map();
|
|
6
6
|
function H(e) {
|
|
7
7
|
return typeof e == "object" && e !== null && typeof e.resolve == "function";
|
|
8
8
|
}
|
|
9
9
|
function G(e) {
|
|
10
10
|
return e && (H(e) ? e.resolve() : e);
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function I(e) {
|
|
13
13
|
if (e !== void 0)
|
|
14
14
|
return x(e) || z(e) ? e() : e;
|
|
15
15
|
}
|
|
@@ -27,8 +27,8 @@ function q(e) {
|
|
|
27
27
|
async function U(e, t) {
|
|
28
28
|
if (M.has(e))
|
|
29
29
|
return M.get(e);
|
|
30
|
-
if (
|
|
31
|
-
return
|
|
30
|
+
if (R.has(e))
|
|
31
|
+
return R.get(e);
|
|
32
32
|
const s = fetch(e).then(async (o) => {
|
|
33
33
|
if (!o.ok)
|
|
34
34
|
throw new Error(`Failed to load SVG: ${o.status}`);
|
|
@@ -37,19 +37,19 @@ async function U(e, t) {
|
|
|
37
37
|
throw new Error("Sanitized SVG missing root <svg>");
|
|
38
38
|
return M.set(e, r), r;
|
|
39
39
|
}).finally(() => {
|
|
40
|
-
|
|
40
|
+
R.delete(e);
|
|
41
41
|
});
|
|
42
|
-
return
|
|
42
|
+
return R.set(e, s), s;
|
|
43
43
|
}
|
|
44
44
|
class J extends V {
|
|
45
45
|
constructor(t) {
|
|
46
|
-
super(), this
|
|
46
|
+
super(), m(this, "props", t), m(this, "type", "component"), m(this, "id"), m(this, "mounted", !1), m(this, "cleanup", []), m(this, "effectiveTag"), m(this, "validationResult"), m(this, "loadingStateSignal"), m(this, "setLoadingState"), this.id = `image-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
|
|
47
47
|
const s = D("Image", "img", this.props.element);
|
|
48
48
|
if (this.effectiveTag = s.tag, this.validationResult = s.validation, this.props.loadingState)
|
|
49
49
|
this.loadingStateSignal = this.props.loadingState, this.setLoadingState = (o) => {
|
|
50
50
|
};
|
|
51
51
|
else {
|
|
52
|
-
const o = this.props.src ? "idle" : "error", [i, r] =
|
|
52
|
+
const o = this.props.src ? "idle" : "error", [i, r] = T(o);
|
|
53
53
|
this.loadingStateSignal = i, this.setLoadingState = r;
|
|
54
54
|
}
|
|
55
55
|
k(this, {
|
|
@@ -82,7 +82,7 @@ class J extends V {
|
|
|
82
82
|
const t = this.loadingStateSignal();
|
|
83
83
|
if (t === "loading" && this.props.placeholder) {
|
|
84
84
|
if (typeof this.props.placeholder == "string")
|
|
85
|
-
return [
|
|
85
|
+
return [y("img", {
|
|
86
86
|
class: "tachui-image-placeholder",
|
|
87
87
|
src: this.props.placeholder,
|
|
88
88
|
alt: "Loading..."
|
|
@@ -92,7 +92,7 @@ class J extends V {
|
|
|
92
92
|
}
|
|
93
93
|
if (t === "error" && this.props.errorPlaceholder) {
|
|
94
94
|
if (typeof this.props.errorPlaceholder == "string")
|
|
95
|
-
return [
|
|
95
|
+
return [y("img", {
|
|
96
96
|
class: "tachui-image-error",
|
|
97
97
|
src: this.props.errorPlaceholder,
|
|
98
98
|
alt: "Error loading image"
|
|
@@ -104,15 +104,15 @@ class J extends V {
|
|
|
104
104
|
let r;
|
|
105
105
|
if (i === "template") {
|
|
106
106
|
q(this.props);
|
|
107
|
-
const n =
|
|
108
|
-
r =
|
|
107
|
+
const n = I(this.props.alt), p = !!I(this.props.decorative) || n === "";
|
|
108
|
+
r = y("span", {
|
|
109
109
|
className: `${o} tachui-image-template`,
|
|
110
110
|
role: "img",
|
|
111
111
|
...p ? { "aria-hidden": "true" } : { "aria-label": n || this.props.accessibilityLabel || "Image" }
|
|
112
112
|
});
|
|
113
113
|
} else {
|
|
114
114
|
const n = G(this.props.src);
|
|
115
|
-
r =
|
|
115
|
+
r = y(this.effectiveTag, {
|
|
116
116
|
className: o,
|
|
117
117
|
src: n,
|
|
118
118
|
// Pass resolved src for initial render
|
|
@@ -136,7 +136,7 @@ class J extends V {
|
|
|
136
136
|
* Set up ImageAsset reactivity for a real DOM element (called from onDOMReady)
|
|
137
137
|
*/
|
|
138
138
|
setupImageAssetReactivityForDOMElement(t, s) {
|
|
139
|
-
const o =
|
|
139
|
+
const o = b(() => {
|
|
140
140
|
const i = t.resolve();
|
|
141
141
|
this.props.onLoadStart?.(), this.setLoadingStateWithCallback("loading"), s.src = i;
|
|
142
142
|
});
|
|
@@ -144,12 +144,12 @@ class J extends V {
|
|
|
144
144
|
}
|
|
145
145
|
setupTemplateModeReactivityForDOMElement(t) {
|
|
146
146
|
let s = 0;
|
|
147
|
-
const o =
|
|
148
|
-
const r =
|
|
147
|
+
const o = b(() => {
|
|
148
|
+
const r = I(this.props.alt) ?? this.props.accessibilityLabel, n = !!I(this.props.decorative) || r === "";
|
|
149
149
|
t.setAttribute("role", "img"), n ? (t.setAttribute("aria-hidden", "true"), t.removeAttribute("aria-label")) : (t.removeAttribute("aria-hidden"), t.setAttribute("aria-label", r || "Image"));
|
|
150
150
|
});
|
|
151
151
|
this.cleanup.push(() => o.dispose());
|
|
152
|
-
const i =
|
|
152
|
+
const i = b(() => {
|
|
153
153
|
const r = X(this.props.src), n = ++s;
|
|
154
154
|
if (!r) {
|
|
155
155
|
t.innerHTML = "", this.setLoadingStateWithCallback("error"), this.props.onError?.(new Event("error"));
|
|
@@ -193,7 +193,7 @@ class J extends V {
|
|
|
193
193
|
}
|
|
194
194
|
const r = this.props.src;
|
|
195
195
|
if (x(r) || z(r)) {
|
|
196
|
-
const n =
|
|
196
|
+
const n = b(() => {
|
|
197
197
|
i(r());
|
|
198
198
|
});
|
|
199
199
|
this.cleanup.push(() => n.dispose());
|
|
@@ -328,23 +328,23 @@ const nt = {
|
|
|
328
328
|
});
|
|
329
329
|
}
|
|
330
330
|
};
|
|
331
|
-
var K = Object.defineProperty, Z = (e, t, s) => t in e ? K(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s,
|
|
332
|
-
class
|
|
331
|
+
var K = Object.defineProperty, Z = (e, t, s) => t in e ? K(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, S = (e, t, s) => Z(e, typeof t != "symbol" ? t + "" : t, s);
|
|
332
|
+
class v {
|
|
333
333
|
constructor(t, s, o, i = {}) {
|
|
334
|
-
this
|
|
334
|
+
S(this, "props", t), S(this, "tag", s), S(this, "content", o), S(this, "attributes", i), S(this, "type", "component"), S(this, "id"), S(this, "mounted", !1), S(this, "cleanup", []), this.id = `element-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
|
|
335
335
|
}
|
|
336
336
|
render() {
|
|
337
337
|
return [
|
|
338
|
-
|
|
338
|
+
y(this.tag, this.attributes, this.content ? Y(this.content) : "")
|
|
339
339
|
];
|
|
340
340
|
}
|
|
341
341
|
}
|
|
342
|
-
const
|
|
342
|
+
const w = {
|
|
343
343
|
/**
|
|
344
344
|
* Create a div element with modifier support
|
|
345
345
|
*/
|
|
346
346
|
div: (e = {}) => {
|
|
347
|
-
const t = new
|
|
347
|
+
const t = new v(
|
|
348
348
|
e,
|
|
349
349
|
"div",
|
|
350
350
|
e.children ? String(e.children) : void 0
|
|
@@ -355,7 +355,7 @@ const E = {
|
|
|
355
355
|
* Create a span element with modifier support
|
|
356
356
|
*/
|
|
357
357
|
span: (e = {}) => {
|
|
358
|
-
const t = new
|
|
358
|
+
const t = new v(
|
|
359
359
|
e,
|
|
360
360
|
"span",
|
|
361
361
|
e.children ? String(e.children) : void 0
|
|
@@ -366,7 +366,7 @@ const E = {
|
|
|
366
366
|
* Create an anchor element with modifier support
|
|
367
367
|
*/
|
|
368
368
|
a: (e = {}) => {
|
|
369
|
-
const t = new
|
|
369
|
+
const t = new v(
|
|
370
370
|
e,
|
|
371
371
|
"a",
|
|
372
372
|
e.children ? String(e.children) : void 0,
|
|
@@ -381,7 +381,7 @@ const E = {
|
|
|
381
381
|
* Create a paragraph element with modifier support
|
|
382
382
|
*/
|
|
383
383
|
p: (e = {}) => {
|
|
384
|
-
const t = new
|
|
384
|
+
const t = new v(
|
|
385
385
|
e,
|
|
386
386
|
"p",
|
|
387
387
|
e.children ? String(e.children) : void 0
|
|
@@ -395,7 +395,7 @@ const E = {
|
|
|
395
395
|
* use the main Button component instead.
|
|
396
396
|
*/
|
|
397
397
|
button: (e = {}) => {
|
|
398
|
-
const t = new
|
|
398
|
+
const t = new v(
|
|
399
399
|
e,
|
|
400
400
|
"button",
|
|
401
401
|
e.children ? String(e.children) : void 0,
|
|
@@ -409,7 +409,7 @@ const E = {
|
|
|
409
409
|
* Create an input element with modifier support
|
|
410
410
|
*/
|
|
411
411
|
input: (e = {}) => {
|
|
412
|
-
const t = new
|
|
412
|
+
const t = new v(e, "input", void 0, {
|
|
413
413
|
type: e.type || "text",
|
|
414
414
|
value: e.value || "",
|
|
415
415
|
placeholder: e.placeholder || "",
|
|
@@ -427,7 +427,7 @@ const E = {
|
|
|
427
427
|
* use the main Image component instead.
|
|
428
428
|
*/
|
|
429
429
|
img: (e) => {
|
|
430
|
-
const t = new
|
|
430
|
+
const t = new v(e, "img", void 0, {
|
|
431
431
|
src: e.src,
|
|
432
432
|
alt: e.alt || "",
|
|
433
433
|
width: e.width,
|
|
@@ -439,18 +439,18 @@ const E = {
|
|
|
439
439
|
* Create a heading element with modifier support
|
|
440
440
|
*/
|
|
441
441
|
heading: (e) => (t = {}) => {
|
|
442
|
-
const s = new
|
|
442
|
+
const s = new v(
|
|
443
443
|
t,
|
|
444
444
|
`h${e}`,
|
|
445
445
|
t.children ? String(t.children) : void 0
|
|
446
446
|
);
|
|
447
447
|
return f(s);
|
|
448
448
|
}
|
|
449
|
-
}, ct =
|
|
449
|
+
}, ct = w.heading(1), ht = w.heading(2), dt = w.heading(3), pt = w.heading(4), ft = w.heading(5), ut = w.heading(6);
|
|
450
450
|
var Q = Object.defineProperty, tt = (e, t, s) => t in e ? Q(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, l = (e, t, s) => tt(e, typeof t != "symbol" ? t + "" : t, s);
|
|
451
451
|
class et {
|
|
452
452
|
constructor(t) {
|
|
453
|
-
this
|
|
453
|
+
l(this, "props", t), l(this, "type", "component"), l(this, "id"), l(this, "mounted", !1), l(this, "cleanup", []), l(this, "scrollElement", null), l(this, "contentOffsetSignal"), l(this, "setContentOffset"), l(this, "contentSizeSignal"), l(this, "setContentSize"), l(this, "setIsScrolling"), l(this, "pullToRefreshStateSignal"), l(this, "setPullToRefreshState"), l(this, "scrollEventThrottle"), l(this, "lastScrollTime", 0), l(this, "scrollVelocity", { x: 0, y: 0 }), l(this, "lastScrollOffset", { x: 0, y: 0 }), l(this, "pullStartY", 0), l(this, "isPulling", !1), l(this, "handleScroll", (h) => {
|
|
454
454
|
if (!this.scrollElement) return;
|
|
455
455
|
const g = performance.now(), a = g - this.lastScrollTime;
|
|
456
456
|
if (a < this.scrollEventThrottle) return;
|
|
@@ -462,7 +462,7 @@ class et {
|
|
|
462
462
|
width: this.scrollElement.scrollWidth,
|
|
463
463
|
height: this.scrollElement.scrollHeight
|
|
464
464
|
});
|
|
465
|
-
const c = this.detectScrollEdges(),
|
|
465
|
+
const c = this.detectScrollEdges(), C = {
|
|
466
466
|
offset: d,
|
|
467
467
|
velocity: this.scrollVelocity,
|
|
468
468
|
contentSize: {
|
|
@@ -475,7 +475,7 @@ class et {
|
|
|
475
475
|
},
|
|
476
476
|
edges: c
|
|
477
477
|
};
|
|
478
|
-
this.props.onScroll && this.props.onScroll(
|
|
478
|
+
this.props.onScroll && this.props.onScroll(C), c.top && this.props.onReachTop && this.props.onReachTop(), c.bottom && this.props.onReachBottom && this.props.onReachBottom(), c.left && this.props.onReachLeft && this.props.onReachLeft(), c.right && this.props.onReachRight && this.props.onReachRight(), this.lastScrollOffset = d, this.lastScrollTime = g;
|
|
479
479
|
}), l(this, "handleScrollStart", () => {
|
|
480
480
|
this.setIsScrolling(!0), this.props.onScrollBegin && this.props.onScrollBegin();
|
|
481
481
|
}), l(this, "handleScrollEnd", () => {
|
|
@@ -501,29 +501,29 @@ class et {
|
|
|
501
501
|
this.setPullToRefreshState("idle");
|
|
502
502
|
this.isPulling = !1;
|
|
503
503
|
}), this.id = `scrollview-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`, this.scrollEventThrottle = t.scrollEventThrottle || 16;
|
|
504
|
-
const [s, o] =
|
|
504
|
+
const [s, o] = T(
|
|
505
505
|
{ x: 0, y: 0 }
|
|
506
506
|
);
|
|
507
507
|
this.contentOffsetSignal = s, this.setContentOffset = o;
|
|
508
|
-
const [i, r] =
|
|
508
|
+
const [i, r] = T({
|
|
509
509
|
width: 0,
|
|
510
510
|
height: 0
|
|
511
511
|
});
|
|
512
512
|
this.contentSizeSignal = i, this.setContentSize = r;
|
|
513
|
-
const [, n] =
|
|
513
|
+
const [, n] = T(!1);
|
|
514
514
|
this.setIsScrolling = n;
|
|
515
|
-
const [p, u] =
|
|
516
|
-
if (this.pullToRefreshStateSignal = p, this.setPullToRefreshState = u, t.contentOffset &&
|
|
515
|
+
const [p, u] = T("idle");
|
|
516
|
+
if (this.pullToRefreshStateSignal = p, this.setPullToRefreshState = u, t.contentOffset && E(t.contentOffset)) {
|
|
517
517
|
this.setContentOffset(t.contentOffset());
|
|
518
|
-
const h =
|
|
519
|
-
t.contentOffset &&
|
|
518
|
+
const h = b(() => {
|
|
519
|
+
t.contentOffset && E(t.contentOffset) && this.setContentOffset(t.contentOffset());
|
|
520
520
|
});
|
|
521
521
|
this.cleanup.push(() => h.dispose());
|
|
522
522
|
}
|
|
523
|
-
if (t.contentSize &&
|
|
523
|
+
if (t.contentSize && E(t.contentSize)) {
|
|
524
524
|
this.setContentSize(t.contentSize());
|
|
525
|
-
const h =
|
|
526
|
-
t.contentSize &&
|
|
525
|
+
const h = b(() => {
|
|
526
|
+
t.contentSize && E(t.contentSize) && this.setContentSize(t.contentSize());
|
|
527
527
|
});
|
|
528
528
|
this.cleanup.push(() => h.dispose());
|
|
529
529
|
}
|
|
@@ -662,7 +662,7 @@ class et {
|
|
|
662
662
|
cleanup: [],
|
|
663
663
|
props: {},
|
|
664
664
|
render: () => [
|
|
665
|
-
|
|
665
|
+
y(
|
|
666
666
|
"div",
|
|
667
667
|
{
|
|
668
668
|
style: {
|
|
@@ -724,7 +724,7 @@ class et {
|
|
|
724
724
|
const a = i();
|
|
725
725
|
o = Array.isArray(a) ? a : [];
|
|
726
726
|
} else Array.isArray(t) && (o = t);
|
|
727
|
-
const r =
|
|
727
|
+
const r = y(
|
|
728
728
|
"div",
|
|
729
729
|
{
|
|
730
730
|
class: "tachui-scrollview-content",
|
|
@@ -740,7 +740,7 @@ class et {
|
|
|
740
740
|
p.push(...d.filter((c) => c));
|
|
741
741
|
}
|
|
742
742
|
p.push(r);
|
|
743
|
-
const { direction: u = "vertical" } = this.props, h = this.getOverflowStyles(u), g =
|
|
743
|
+
const { direction: u = "vertical" } = this.props, h = this.getOverflowStyles(u), g = y(
|
|
744
744
|
"div",
|
|
745
745
|
{
|
|
746
746
|
id: this.id,
|
|
@@ -758,21 +758,21 @@ class et {
|
|
|
758
758
|
const a = g.element;
|
|
759
759
|
this.scrollElement = a, this.applyScrollViewStyles(a), this.setupScrollHandlers(a), r.element && this.applyContentInsets(r.element);
|
|
760
760
|
const d = () => {
|
|
761
|
-
const c =
|
|
761
|
+
const c = E(s) ? s() : s;
|
|
762
762
|
a.style.overflow = c ? "auto" : "hidden", a.style.pointerEvents = c ? "auto" : "none";
|
|
763
763
|
};
|
|
764
|
-
if (
|
|
765
|
-
const c =
|
|
764
|
+
if (E(s)) {
|
|
765
|
+
const c = b(d);
|
|
766
766
|
this.cleanup.push(() => c.dispose());
|
|
767
767
|
} else
|
|
768
768
|
d();
|
|
769
769
|
if (typeof i == "function") {
|
|
770
|
-
const c =
|
|
771
|
-
const
|
|
770
|
+
const c = b(() => {
|
|
771
|
+
const C = i(), W = (Array.isArray(C) ? C : []).flatMap((L) => L.render());
|
|
772
772
|
if (r.element) {
|
|
773
|
-
const
|
|
774
|
-
|
|
775
|
-
O && O.element &&
|
|
773
|
+
const L = r.element;
|
|
774
|
+
L.innerHTML = "", W.forEach((O) => {
|
|
775
|
+
O && O.element && L.appendChild(O.element);
|
|
776
776
|
});
|
|
777
777
|
}
|
|
778
778
|
});
|
|
@@ -823,18 +823,18 @@ const gt = {
|
|
|
823
823
|
};
|
|
824
824
|
export {
|
|
825
825
|
J as E,
|
|
826
|
-
|
|
826
|
+
ct as H,
|
|
827
827
|
P as I,
|
|
828
828
|
_ as S,
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
829
|
+
et as a,
|
|
830
|
+
ht as b,
|
|
831
|
+
dt as c,
|
|
832
|
+
pt as d,
|
|
833
|
+
ft as e,
|
|
834
|
+
ut as f,
|
|
835
|
+
w as g,
|
|
836
|
+
lt as h,
|
|
837
|
+
nt as i,
|
|
838
|
+
at as j,
|
|
839
839
|
gt as k
|
|
840
840
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentWithCSSClasses as d, processElementOverride as f, h as u, text as g, clonePropsPreservingReactivity as c, resetLifecycleState as h, withModifiers as b } from "@tachui/core";
|
|
2
2
|
import { createComponentInstance as m } from "@tachui/core/components";
|
|
3
|
-
var v = Object.defineProperty, y = (t, e, i) => e in t ? v(t, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : t[e] = i,
|
|
3
|
+
var v = Object.defineProperty, y = (t, e, i) => e in t ? v(t, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : t[e] = i, l = (t, e, i) => y(t, typeof e != "symbol" ? e + "" : e, i);
|
|
4
4
|
const s = {
|
|
5
5
|
largeTitle: { size: 34, weight: "400", lineHeight: 1.2 },
|
|
6
6
|
title: { size: 28, weight: "400", lineHeight: 1.3 },
|
|
@@ -16,7 +16,7 @@ const s = {
|
|
|
16
16
|
};
|
|
17
17
|
class r extends d {
|
|
18
18
|
constructor(e) {
|
|
19
|
-
super(), this
|
|
19
|
+
super(), l(this, "props", e), l(this, "type", "component"), l(this, "id"), l(this, "mounted", !1), l(this, "cleanup", []), l(this, "effectiveTag"), l(this, "validationResult"), this.id = `text-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
|
|
20
20
|
const i = this.resolveDefaultTag(), o = f(
|
|
21
21
|
"Text",
|
|
22
22
|
i,
|
|
@@ -93,7 +93,7 @@ function p(t, e) {
|
|
|
93
93
|
}, o = m(r, i);
|
|
94
94
|
return b(o);
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function a(t) {
|
|
97
97
|
return (e, i) => p(e, {
|
|
98
98
|
...i,
|
|
99
99
|
accessibilityRole: "heading",
|
|
@@ -101,19 +101,19 @@ function l(t) {
|
|
|
101
101
|
});
|
|
102
102
|
}
|
|
103
103
|
const n = Object.assign(p, {
|
|
104
|
-
H1:
|
|
105
|
-
H2:
|
|
106
|
-
H3:
|
|
107
|
-
H4:
|
|
108
|
-
H5:
|
|
109
|
-
H6:
|
|
104
|
+
H1: a(1),
|
|
105
|
+
H2: a(2),
|
|
106
|
+
H3: a(3),
|
|
107
|
+
H4: a(4),
|
|
108
|
+
H5: a(5),
|
|
109
|
+
H6: a(6)
|
|
110
110
|
});
|
|
111
111
|
function w(t, e = {}) {
|
|
112
112
|
e.level === void 0 && process.env.NODE_ENV !== "production" && console.warn(
|
|
113
113
|
"Heading: no level provided, defaulting to level 2. Pass { level: 1 } for primary page headings."
|
|
114
114
|
);
|
|
115
115
|
const { level: i = 2, ...o } = e;
|
|
116
|
-
return
|
|
116
|
+
return a(i)(t, o);
|
|
117
117
|
}
|
|
118
118
|
const x = {
|
|
119
119
|
/**
|
package/dist/controls/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as s, a as t, E as l,
|
|
1
|
+
import { B as s, a as t, E as l, b as n, c as g, L as i, d as o, P as c, e as T, f as h, T as k, g as r, h as d, i as u, j as B } from "../Picker-DwKarueX.js";
|
|
2
2
|
export {
|
|
3
3
|
s as Button,
|
|
4
4
|
t as ButtonStyles,
|
package/dist/display/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { E as e, H as t, T as o, a as H, b as l, c as n } from "../Text-
|
|
2
|
-
import { E as c,
|
|
1
|
+
import { E as e, H as t, T as o, a as H, b as l, c as n } from "../Text-DmpfnY1o.js";
|
|
2
|
+
import { E as c, a as g, H as m, b as i, c as T, d, e as x, f as I, g as S, I as h, h as E, i as p, j as f, S as w, k as y } from "../ScrollView-DdlbVVKn.js";
|
|
3
3
|
export {
|
|
4
4
|
c as EnhancedImage,
|
|
5
5
|
g as EnhancedScrollView,
|
package/dist/forms/index.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { Divider as
|
|
2
|
-
import { E as
|
|
3
|
-
import { E as
|
|
4
|
-
import { B as
|
|
5
|
-
import { B as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import { Divider as y, DividerComponent as j, DividerStyles as S, DividerUtils as A, HStack as L, Spacer as O, SpacerComponent as C, VStack as V, ZStack as H, defaultDividerTheme as E } from "./layout/index.js";
|
|
2
|
+
import { E as F, H as q, T as U, a as _, b as N, c as D } from "./Text-DmpfnY1o.js";
|
|
3
|
+
import { E as R, a as M, H as G, b as K, c as Z, d as z, e as J, f as Q, g as X, I as Y, h as ee, i as te, j as oe, S as ne, k as ie } from "./ScrollView-DdlbVVKn.js";
|
|
4
|
+
import { B as ae, a as se, E as ce, b as le, c as pe, L as de, d as ge, P as ue, e as me, f as he, T as fe, g as ve, h as we, i as xe, j as ke } from "./Picker-DwKarueX.js";
|
|
5
|
+
import { B as Te, a as be, b as Pe, c as Ie, d as ye, e as je, f as Se } from "./BasicInput-CxQxJL1j.js";
|
|
6
|
+
import { LayoutComponent as Le } from "@tachui/core/components";
|
|
7
|
+
import { withModifiers as Ce } from "@tachui/core";
|
|
8
|
+
var g = Object.defineProperty, u = (e, t, o) => t in e ? g(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o, m = (e, t, o) => u(e, t + "", o);
|
|
8
9
|
function d(e) {
|
|
9
10
|
return e && typeof e == "object" && "value" in e;
|
|
10
11
|
}
|
|
11
12
|
class n extends Error {
|
|
12
13
|
constructor(t, o) {
|
|
13
|
-
super(t), this
|
|
14
|
+
super(t), m(this, "context", o), this.name = "TachUIValidationError";
|
|
14
15
|
}
|
|
15
16
|
getFormattedMessage() {
|
|
16
17
|
const {
|
|
@@ -275,8 +276,7 @@ const r = {
|
|
|
275
276
|
}
|
|
276
277
|
}
|
|
277
278
|
);
|
|
278
|
-
|
|
279
|
-
if (!Array.isArray(i.children))
|
|
279
|
+
if (!Array.isArray(o.children))
|
|
280
280
|
throw new n(
|
|
281
281
|
`${e} children must be an array`,
|
|
282
282
|
{
|
|
@@ -384,18 +384,18 @@ const r = {
|
|
|
384
384
|
}
|
|
385
385
|
}
|
|
386
386
|
};
|
|
387
|
-
function
|
|
387
|
+
function h(e, t, o) {
|
|
388
388
|
return function(...s) {
|
|
389
389
|
return o(s), e.apply(this, s);
|
|
390
390
|
};
|
|
391
391
|
}
|
|
392
|
-
function
|
|
392
|
+
function f(e) {
|
|
393
393
|
l = { ...l, ...e };
|
|
394
394
|
}
|
|
395
|
-
function
|
|
395
|
+
function v() {
|
|
396
396
|
return { ...l };
|
|
397
397
|
}
|
|
398
|
-
const
|
|
398
|
+
const B = {
|
|
399
399
|
// Direct validation methods
|
|
400
400
|
validateText: r.validateText,
|
|
401
401
|
validateButton: r.validateButton,
|
|
@@ -407,11 +407,11 @@ const w = {
|
|
|
407
407
|
validateBasicForm: r.validateBasicForm,
|
|
408
408
|
validateBasicInput: r.validateBasicInput,
|
|
409
409
|
// Configuration
|
|
410
|
-
configure:
|
|
411
|
-
getConfig:
|
|
410
|
+
configure: f,
|
|
411
|
+
getConfig: v,
|
|
412
412
|
// Utilities
|
|
413
413
|
isValidationEnabled: a,
|
|
414
|
-
withComponentValidation:
|
|
414
|
+
withComponentValidation: h,
|
|
415
415
|
// Test method
|
|
416
416
|
test: () => {
|
|
417
417
|
console.group("🧪 Primitives Validation Test");
|
|
@@ -425,69 +425,69 @@ const w = {
|
|
|
425
425
|
}
|
|
426
426
|
console.groupEnd();
|
|
427
427
|
}
|
|
428
|
-
},
|
|
428
|
+
}, w = "@tachui/primitives", x = "0.8.29", T = w, b = x;
|
|
429
429
|
export {
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
430
|
+
Te as BasicForm,
|
|
431
|
+
be as BasicFormImplementation,
|
|
432
|
+
Pe as BasicFormStyles,
|
|
433
|
+
Ie as BasicFormValidation,
|
|
434
|
+
ye as BasicInput,
|
|
435
|
+
je as BasicInputStyles,
|
|
436
|
+
Se as BasicInputUtils,
|
|
437
|
+
ae as Button,
|
|
438
|
+
se as ButtonStyles,
|
|
439
|
+
y as Divider,
|
|
440
|
+
j as DividerComponent,
|
|
441
|
+
S as DividerStyles,
|
|
442
|
+
A as DividerUtils,
|
|
443
|
+
ce as EnhancedButton,
|
|
444
|
+
R as EnhancedImage,
|
|
445
|
+
le as EnhancedPicker,
|
|
446
|
+
M as EnhancedScrollView,
|
|
447
|
+
F as EnhancedText,
|
|
448
|
+
pe as EnhancedToggle,
|
|
449
|
+
G as H1,
|
|
450
|
+
K as H2,
|
|
451
|
+
Z as H3,
|
|
452
|
+
z as H4,
|
|
453
|
+
J as H5,
|
|
454
|
+
Q as H6,
|
|
455
|
+
L as HStack,
|
|
456
|
+
X as HTML,
|
|
457
|
+
q as Heading,
|
|
458
|
+
Y as Image,
|
|
459
|
+
ee as ImageContentModes,
|
|
460
|
+
te as ImageStates,
|
|
461
|
+
oe as ImageUtils,
|
|
462
|
+
Le as LayoutComponent,
|
|
463
|
+
de as Link,
|
|
464
|
+
ge as LinkUtils,
|
|
465
|
+
ue as Picker,
|
|
466
|
+
me as PickerStyles,
|
|
467
|
+
he as PickerUtils,
|
|
468
468
|
r as PrimitiveComponentValidation,
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
469
|
+
B as PrimitivesValidationUtils,
|
|
470
|
+
ne as ScrollView,
|
|
471
|
+
ie as ScrollViewUtils,
|
|
472
|
+
O as Spacer,
|
|
473
|
+
C as SpacerComponent,
|
|
474
|
+
T as TACHUI_PACKAGE,
|
|
475
|
+
b as TACHUI_PACKAGE_VERSION,
|
|
476
476
|
n as TachUIValidationError,
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
477
|
+
U as Text,
|
|
478
|
+
_ as TextFormat,
|
|
479
|
+
N as TextStyles,
|
|
480
|
+
fe as Toggle,
|
|
481
|
+
ve as ToggleStyles,
|
|
482
|
+
we as ToggleUtils,
|
|
483
|
+
xe as ToggleWithLabel,
|
|
484
|
+
D as Typography,
|
|
485
|
+
V as VStack,
|
|
486
|
+
H as ZStack,
|
|
487
|
+
f as configurePrimitivesValidation,
|
|
488
|
+
ke as defaultButtonTheme,
|
|
489
|
+
E as defaultDividerTheme,
|
|
490
|
+
v as getPrimitivesValidationConfig,
|
|
491
|
+
h as withComponentValidation,
|
|
492
|
+
Ce as withModifiers
|
|
493
493
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tachui/primitives",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.29",
|
|
4
4
|
"description": "Basic UI components for tachUI framework",
|
|
5
5
|
"homepage": "https://tachui.dev/",
|
|
6
6
|
"type": "module",
|
|
@@ -33,9 +33,23 @@
|
|
|
33
33
|
"files": [
|
|
34
34
|
"dist"
|
|
35
35
|
],
|
|
36
|
+
"scripts": {
|
|
37
|
+
"build": "rm -rf dist && vite build && tsc --project tsconfig.build.json",
|
|
38
|
+
"build:dev": "rm -rf dist && vite build --mode development && tsc --project tsconfig.build.json",
|
|
39
|
+
"build:prod": "rm -rf dist && vite build --mode production && tsc --project tsconfig.build.json",
|
|
40
|
+
"dev": "vite build --watch",
|
|
41
|
+
"valid": "clear && vitest run && bun run type-check && bun run lint && bun run build",
|
|
42
|
+
"test": "vitest run",
|
|
43
|
+
"test:coverage": "vitest run --coverage",
|
|
44
|
+
"test:watch": "vitest",
|
|
45
|
+
"test:ci": "npm run test:run",
|
|
46
|
+
"type-check": "tsc --project tsconfig.type-check.json",
|
|
47
|
+
"clean": "rm -rf dist",
|
|
48
|
+
"lint": "oxlint src"
|
|
49
|
+
},
|
|
36
50
|
"dependencies": {
|
|
37
|
-
"@tachui/core": "0.8.
|
|
38
|
-
"@tachui/modifiers": "0.8.
|
|
51
|
+
"@tachui/core": "0.8.28",
|
|
52
|
+
"@tachui/modifiers": "0.8.29"
|
|
39
53
|
},
|
|
40
54
|
"devDependencies": {
|
|
41
55
|
"@types/node": "^20.0.0",
|
|
@@ -67,19 +81,5 @@
|
|
|
67
81
|
"type": "git",
|
|
68
82
|
"url": "https://github.com/tach-UI/tachUI",
|
|
69
83
|
"directory": "packages/primitives"
|
|
70
|
-
},
|
|
71
|
-
"scripts": {
|
|
72
|
-
"build": "rm -rf dist && vite build && tsc --project tsconfig.build.json",
|
|
73
|
-
"build:dev": "rm -rf dist && vite build --mode development && tsc --project tsconfig.build.json",
|
|
74
|
-
"build:prod": "rm -rf dist && vite build --mode production && tsc --project tsconfig.build.json",
|
|
75
|
-
"dev": "vite build --watch",
|
|
76
|
-
"valid": "clear && vitest run && pnpm type-check && pnpm lint && pnpm build",
|
|
77
|
-
"test": "vitest run",
|
|
78
|
-
"test:coverage": "vitest run --coverage",
|
|
79
|
-
"test:watch": "vitest",
|
|
80
|
-
"test:ci": "npm run test:run",
|
|
81
|
-
"type-check": "tsc --project tsconfig.type-check.json",
|
|
82
|
-
"clean": "rm -rf dist",
|
|
83
|
-
"lint": "oxlint src"
|
|
84
84
|
}
|
|
85
|
-
}
|
|
85
|
+
}
|
package/LICENSE
DELETED
|
@@ -1,363 +0,0 @@
|
|
|
1
|
-
Mozilla Public License Version 2.0
|
|
2
|
-
==================================
|
|
3
|
-
|
|
4
|
-
1. Definitions
|
|
5
|
-
--------------
|
|
6
|
-
|
|
7
|
-
1.1. "Contributor"
|
|
8
|
-
means each individual or legal entity that creates, contributes to
|
|
9
|
-
the creation of, or owns Covered Software.
|
|
10
|
-
|
|
11
|
-
1.2. "Contributor Version"
|
|
12
|
-
means the combination of the Contributions of others (if any) used
|
|
13
|
-
by a Contributor and that particular Contributor's Contribution.
|
|
14
|
-
|
|
15
|
-
1.3. "Contribution"
|
|
16
|
-
means Covered Software of a particular Contributor.
|
|
17
|
-
|
|
18
|
-
1.4. "Covered Software"
|
|
19
|
-
means Source Code Form to which the initial Contributor has attached
|
|
20
|
-
the notice in Exhibit A, the Executable Form of such Source Code
|
|
21
|
-
Form, and Modifications of such Source Code Form, in each case
|
|
22
|
-
including portions thereof.
|
|
23
|
-
|
|
24
|
-
1.5. "Incompatible With Secondary Licenses"
|
|
25
|
-
means
|
|
26
|
-
|
|
27
|
-
(a) that the initial Contributor has attached the notice described
|
|
28
|
-
in Exhibit B to the Covered Software; or
|
|
29
|
-
|
|
30
|
-
(b) that the Covered Software was made available under the terms of
|
|
31
|
-
version 1.1 or earlier of the License, but not also under the
|
|
32
|
-
terms of a Secondary License.
|
|
33
|
-
|
|
34
|
-
1.6. "Executable Form"
|
|
35
|
-
means any form of the work other than Source Code Form.
|
|
36
|
-
|
|
37
|
-
1.7. "Larger Work"
|
|
38
|
-
means a work that combines Covered Software with other material, in
|
|
39
|
-
a separate file or files, that is not Covered Software.
|
|
40
|
-
|
|
41
|
-
1.8. "License"
|
|
42
|
-
means this document.
|
|
43
|
-
|
|
44
|
-
1.9. "Licensable"
|
|
45
|
-
means having the right to grant, to the maximum extent possible,
|
|
46
|
-
whether at the time of the initial grant or subsequently, any and
|
|
47
|
-
all of the rights conveyed by this License.
|
|
48
|
-
|
|
49
|
-
1.10. "Modifications"
|
|
50
|
-
means any of the following:
|
|
51
|
-
|
|
52
|
-
(a) any file in Source Code Form that results from an addition to,
|
|
53
|
-
deletion from, or modification of the contents of Covered
|
|
54
|
-
Software; or
|
|
55
|
-
|
|
56
|
-
(b) any new file in Source Code Form that contains any Covered
|
|
57
|
-
Software.
|
|
58
|
-
|
|
59
|
-
1.11. "Patent Claims" of a Contributor
|
|
60
|
-
means any patent claim(s), including without limitation, method,
|
|
61
|
-
process, and apparatus claims, in any patent Licensable by such
|
|
62
|
-
Contributor that would be infringed, but for the grant of the
|
|
63
|
-
License, by the making, using, selling, offering for sale, having
|
|
64
|
-
made, import, or transfer of either its Contributions or its
|
|
65
|
-
Contributor Version.
|
|
66
|
-
|
|
67
|
-
1.12. "Secondary License"
|
|
68
|
-
means either the GNU General Public License, Version 2.0, the GNU
|
|
69
|
-
Lesser General Public License, Version 2.1, the GNU Affero General
|
|
70
|
-
Public License, Version 3.0, or any later versions of those
|
|
71
|
-
licenses.
|
|
72
|
-
|
|
73
|
-
1.13. "Source Code Form"
|
|
74
|
-
means the form of the work preferred for making modifications.
|
|
75
|
-
|
|
76
|
-
1.14. "You" (or "Your")
|
|
77
|
-
means an individual or legal entity exercising rights under this
|
|
78
|
-
License. For legal entities, "You" includes any entity that
|
|
79
|
-
controls, is controlled by, or is under common control with You. For
|
|
80
|
-
purposes of this definition, "control" means (a) the power, direct
|
|
81
|
-
or indirect, to cause the direction or management of such entity,
|
|
82
|
-
whether by contract or otherwise, or (b) ownership of more than
|
|
83
|
-
fifty percent (50%) of the outstanding shares or beneficial
|
|
84
|
-
ownership of such entity.
|
|
85
|
-
|
|
86
|
-
2. License Grants and Conditions
|
|
87
|
-
--------------------------------
|
|
88
|
-
|
|
89
|
-
2.1. Grants
|
|
90
|
-
|
|
91
|
-
Each Contributor hereby grants You a world-wide, royalty-free,
|
|
92
|
-
non-exclusive license:
|
|
93
|
-
|
|
94
|
-
(a) under intellectual property rights (other than patent or trademark)
|
|
95
|
-
Licensable by such Contributor to use, reproduce, make available,
|
|
96
|
-
modify, display, perform, distribute, and otherwise exploit its
|
|
97
|
-
Contributions, either on an unmodified basis, with Modifications, or
|
|
98
|
-
as part of a Larger Work; and
|
|
99
|
-
|
|
100
|
-
(b) under Patent Claims of such Contributor to make, use, sell, offer
|
|
101
|
-
for sale, have made, import, and otherwise transfer either its
|
|
102
|
-
Contributions or its Contributor Version.
|
|
103
|
-
|
|
104
|
-
2.2. Effective Date
|
|
105
|
-
|
|
106
|
-
The licenses granted in Section 2.1 with respect to any Contribution
|
|
107
|
-
become effective for each Contribution on the date the Contributor first
|
|
108
|
-
distributes such Contribution.
|
|
109
|
-
|
|
110
|
-
2.3. Limitations on Grant Scope
|
|
111
|
-
|
|
112
|
-
The licenses granted in this Section 2 are the only rights granted under
|
|
113
|
-
this License. No additional rights or licenses will be implied from the
|
|
114
|
-
distribution or licensing of Covered Software under this License.
|
|
115
|
-
Notwithstanding Section 2.1(b) above, no patent license is granted by a
|
|
116
|
-
Contributor:
|
|
117
|
-
|
|
118
|
-
(a) for any code that a Contributor has removed from Covered Software;
|
|
119
|
-
or
|
|
120
|
-
|
|
121
|
-
(b) for infringements caused by: (i) Your and any other third party's
|
|
122
|
-
modifications of Covered Software, or (ii) the combination of its
|
|
123
|
-
Contributions with other software (except as part of its Contributor
|
|
124
|
-
Version); or
|
|
125
|
-
|
|
126
|
-
(c) under Patent Claims infringed by Covered Software in the absence of
|
|
127
|
-
its Contributions.
|
|
128
|
-
|
|
129
|
-
This License does not grant any rights in the trademarks, service marks,
|
|
130
|
-
or logos of any Contributor (except as may be necessary to comply with
|
|
131
|
-
the notice requirements in Section 3.4).
|
|
132
|
-
|
|
133
|
-
2.4. Subsequent Licenses
|
|
134
|
-
|
|
135
|
-
No Contributor makes additional grants as a result of Your choice to
|
|
136
|
-
distribute the Covered Software under a subsequent version of this
|
|
137
|
-
License (see Section 10.2) or under the terms of a Secondary License (if
|
|
138
|
-
permitted under the terms of Section 3.3).
|
|
139
|
-
|
|
140
|
-
2.5. Representation
|
|
141
|
-
|
|
142
|
-
Each Contributor represents that the Contributor believes its
|
|
143
|
-
Contributions are its original creation(s) or it has sufficient rights
|
|
144
|
-
to grant the rights to its Contributions conveyed by this License.
|
|
145
|
-
|
|
146
|
-
2.6. Fair Use
|
|
147
|
-
|
|
148
|
-
This License is not intended to limit any rights You have under
|
|
149
|
-
applicable copyright doctrines of fair use, fair dealing, or other
|
|
150
|
-
equivalents.
|
|
151
|
-
|
|
152
|
-
2.7. Conditions
|
|
153
|
-
|
|
154
|
-
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
|
|
155
|
-
in Section 2.1.
|
|
156
|
-
|
|
157
|
-
3. Responsibilities
|
|
158
|
-
-------------------
|
|
159
|
-
|
|
160
|
-
3.1. Distribution of Source Form
|
|
161
|
-
|
|
162
|
-
All distribution of Covered Software in Source Code Form, including any
|
|
163
|
-
Modifications that You create or to which You contribute, must be under
|
|
164
|
-
the terms of this License. You must inform recipients that the Source
|
|
165
|
-
Code Form of the Covered Software is governed by the terms of this
|
|
166
|
-
License, and how they can obtain a copy of this License. You may not
|
|
167
|
-
attempt to alter or restrict the recipients' rights in the Source Code
|
|
168
|
-
Form.
|
|
169
|
-
|
|
170
|
-
3.2. Distribution of Executable Form
|
|
171
|
-
|
|
172
|
-
If You distribute Covered Software in Executable Form then:
|
|
173
|
-
|
|
174
|
-
(a) such Covered Software must also be made available in Source Code
|
|
175
|
-
Form, as described in Section 3.1, and You must inform recipients of
|
|
176
|
-
the Executable Form how they can obtain a copy of such Source Code
|
|
177
|
-
Form by reasonable means in a timely manner, at a charge no more
|
|
178
|
-
than the cost of distribution to the recipient; and
|
|
179
|
-
|
|
180
|
-
(b) You may distribute such Executable Form under the terms of this
|
|
181
|
-
License, or sublicense it under different terms, provided that the
|
|
182
|
-
license for the Executable Form does not attempt to limit or alter
|
|
183
|
-
the recipients' rights in the Source Code Form under this License.
|
|
184
|
-
|
|
185
|
-
3.3. Distribution of a Larger Work
|
|
186
|
-
|
|
187
|
-
You may create and distribute a Larger Work under terms of Your choice,
|
|
188
|
-
provided that You also comply with the requirements of this License for
|
|
189
|
-
the Covered Software. If the Larger Work is a combination of Covered
|
|
190
|
-
Software with a work governed by one or more Secondary Licenses, and the
|
|
191
|
-
Covered Software is not Incompatible With Secondary Licenses, this
|
|
192
|
-
License permits You to additionally distribute such Covered Software
|
|
193
|
-
under the terms of such Secondary License(s), so that the recipient of
|
|
194
|
-
the Larger Work may, at their option, further distribute the Covered
|
|
195
|
-
Software under the terms of either this License or such Secondary
|
|
196
|
-
License(s).
|
|
197
|
-
|
|
198
|
-
3.4. Notices
|
|
199
|
-
|
|
200
|
-
You may not remove or alter the substance of any license notices
|
|
201
|
-
(including copyright notices, patent notices, disclaimers of warranty,
|
|
202
|
-
or limitations of liability) contained within the Source Code Form of
|
|
203
|
-
the Covered Software, except that You may alter any license notices to
|
|
204
|
-
the extent required to remedy known factual inaccuracies.
|
|
205
|
-
|
|
206
|
-
3.5. Application of Additional Terms
|
|
207
|
-
|
|
208
|
-
You may choose to offer, and to charge a fee for, warranty, support,
|
|
209
|
-
indemnity or liability obligations to one or more recipients of Covered
|
|
210
|
-
Software. However, You may do so only on Your own behalf, and not on
|
|
211
|
-
behalf of any Contributor. You must make it absolutely clear that any
|
|
212
|
-
such warranty, support, indemnity, or liability obligation is offered by
|
|
213
|
-
You alone, and You hereby agree to indemnify every Contributor for any
|
|
214
|
-
liability incurred by such Contributor as a result of warranty, support,
|
|
215
|
-
indemnity or liability terms You offer. You may include additional
|
|
216
|
-
disclaimers of warranty and limitations of liability specific to any
|
|
217
|
-
jurisdiction.
|
|
218
|
-
|
|
219
|
-
4. Inability to Comply Due to Statute or Regulation
|
|
220
|
-
---------------------------------------------------
|
|
221
|
-
|
|
222
|
-
If it is impossible for You to comply with any of the terms of this
|
|
223
|
-
License with respect to some or all of the Covered Software due to
|
|
224
|
-
statute, judicial order, or regulation then You must: (a) comply with
|
|
225
|
-
the terms of this License to the maximum extent possible; and (b)
|
|
226
|
-
describe the limitations and the code they affect. Such description must
|
|
227
|
-
be placed in a text file included with all distributions of the Covered
|
|
228
|
-
Software under this License. Except to the extent prohibited by statute
|
|
229
|
-
or regulation, such description must be sufficiently detailed for a
|
|
230
|
-
recipient of ordinary skill to be able to understand it.
|
|
231
|
-
|
|
232
|
-
5. Termination
|
|
233
|
-
--------------
|
|
234
|
-
|
|
235
|
-
5.1. The rights granted under this License will terminate automatically
|
|
236
|
-
if You fail to comply with any of its terms. However, if You become
|
|
237
|
-
compliant, then the rights granted under this License from a particular
|
|
238
|
-
Contributor are reinstated (a) provisionally, unless and until such
|
|
239
|
-
Contributor explicitly and finally terminates Your grants, and (b) on an
|
|
240
|
-
ongoing basis, if such Contributor fails to notify You of the
|
|
241
|
-
non-compliance by some reasonable means prior to 60 days after You have
|
|
242
|
-
come back into compliance. Moreover, Your grants from a particular
|
|
243
|
-
Contributor are reinstated on an ongoing basis if such Contributor
|
|
244
|
-
notifies You of the non-compliance by some reasonable means, this is the
|
|
245
|
-
first time You have received notice of non-compliance with this License
|
|
246
|
-
from such Contributor, and You become compliant prior to 30 days after
|
|
247
|
-
Your receipt of the notice.
|
|
248
|
-
|
|
249
|
-
5.2. If You initiate litigation against any entity by asserting a patent
|
|
250
|
-
infringement claim (excluding declaratory judgment actions,
|
|
251
|
-
counter-claims, and cross-claims) alleging that a Contributor Version
|
|
252
|
-
directly or indirectly infringes any patent, then the rights granted to
|
|
253
|
-
You by any and all Contributors for the Covered Software under Section
|
|
254
|
-
2.1 of this License shall terminate.
|
|
255
|
-
|
|
256
|
-
5.3. In the event of termination under Sections 5.1 or 5.2 above, all
|
|
257
|
-
end user license agreements (excluding distributors and resellers) which
|
|
258
|
-
have been validly granted by You or Your distributors under this License
|
|
259
|
-
prior to termination shall survive termination.
|
|
260
|
-
|
|
261
|
-
6. Disclaimer of Warranty
|
|
262
|
-
-------------------------
|
|
263
|
-
|
|
264
|
-
Covered Software is provided under this License on an "as is"
|
|
265
|
-
basis, without warranty of any kind, either expressed, implied, or
|
|
266
|
-
statutory, including, without limitation, warranties that the
|
|
267
|
-
Covered Software is free of defects, merchantable, fit for a
|
|
268
|
-
particular purpose or non-infringing. The entire risk as to the
|
|
269
|
-
quality and performance of the Covered Software is with You.
|
|
270
|
-
Should any Covered Software prove defective in any respect, You
|
|
271
|
-
(not any Contributor) assume the cost of any necessary servicing,
|
|
272
|
-
repair, or correction. This disclaimer of warranty constitutes an
|
|
273
|
-
essential part of this License. No use of any Covered Software is
|
|
274
|
-
authorized under this License except under this disclaimer.
|
|
275
|
-
|
|
276
|
-
7. Limitation of Liability
|
|
277
|
-
--------------------------
|
|
278
|
-
|
|
279
|
-
Under no circumstances and under no legal theory, whether tort
|
|
280
|
-
(including negligence), contract, or otherwise, shall any
|
|
281
|
-
Contributor, or anyone who distributes Covered Software as
|
|
282
|
-
permitted above, be liable to You for any direct, indirect,
|
|
283
|
-
special, incidental, or consequential damages of any character
|
|
284
|
-
including, without limitation, damages for lost profits, loss of
|
|
285
|
-
goodwill, work stoppage, computer failure or malfunction, or any
|
|
286
|
-
and all other commercial damages or losses, even if such party
|
|
287
|
-
shall have been informed of the possibility of such damages. This
|
|
288
|
-
limitation of liability shall not apply to liability for death or
|
|
289
|
-
personal injury resulting from such party's negligence to the
|
|
290
|
-
extent applicable law prohibits such limitation. Some
|
|
291
|
-
jurisdictions do not allow the exclusion or limitation of
|
|
292
|
-
incidental or consequential damages, so this exclusion and
|
|
293
|
-
limitation may not apply to You.
|
|
294
|
-
|
|
295
|
-
8. Litigation
|
|
296
|
-
-------------
|
|
297
|
-
|
|
298
|
-
Any litigation relating to this License may be brought only in the
|
|
299
|
-
courts of a jurisdiction where the defendant maintains its principal
|
|
300
|
-
place of business and such litigation shall be governed by laws of that
|
|
301
|
-
jurisdiction, without reference to its conflict-of-law provisions.
|
|
302
|
-
Nothing in this Section shall prevent a party's ability to bring
|
|
303
|
-
cross-claims or counter-claims.
|
|
304
|
-
|
|
305
|
-
9. Miscellaneous
|
|
306
|
-
----------------
|
|
307
|
-
|
|
308
|
-
This License represents the complete agreement concerning the subject
|
|
309
|
-
matter hereof. If any provision of this License is held to be
|
|
310
|
-
unenforceable, such provision shall be reformed only to the extent
|
|
311
|
-
necessary to make it enforceable. Any law or regulation which provides
|
|
312
|
-
that the language of a contract shall be construed against the drafter
|
|
313
|
-
shall not be used to construe this License against a Contributor.
|
|
314
|
-
|
|
315
|
-
10. Versions of the License
|
|
316
|
-
---------------------------
|
|
317
|
-
|
|
318
|
-
10.1. New Versions
|
|
319
|
-
|
|
320
|
-
Mozilla Foundation is the license steward. Except as provided in Section
|
|
321
|
-
10.3, no one other than the license steward has the right to modify or
|
|
322
|
-
publish new versions of this License. Each version will be given a
|
|
323
|
-
distinguishing version number.
|
|
324
|
-
|
|
325
|
-
10.2. Effect of New Versions
|
|
326
|
-
|
|
327
|
-
You may distribute the Covered Software under the terms of the version
|
|
328
|
-
of the License under which You originally received the Covered Software,
|
|
329
|
-
or under the terms of any subsequent version published by the license
|
|
330
|
-
steward.
|
|
331
|
-
|
|
332
|
-
10.3. Modified Versions
|
|
333
|
-
|
|
334
|
-
If you create software not governed by this License, and you want to
|
|
335
|
-
create a new license for such software, you may create and use a
|
|
336
|
-
modified version of this License if you rename the license and remove
|
|
337
|
-
any references to the name of the license steward (except to note that
|
|
338
|
-
such modified license differs from this License).
|
|
339
|
-
|
|
340
|
-
10.4. Distributing Source Code Form that is Incompatible With Secondary
|
|
341
|
-
Licenses
|
|
342
|
-
|
|
343
|
-
If You choose to distribute Source Code Form that is Incompatible With
|
|
344
|
-
Secondary Licenses under the terms of this version of the License, the
|
|
345
|
-
notice described in Exhibit B of this License must be attached.
|
|
346
|
-
|
|
347
|
-
Exhibit A - Source Code Form License Notice
|
|
348
|
-
-------------------------------------------
|
|
349
|
-
|
|
350
|
-
This Source Code Form is subject to the terms of the Mozilla Public
|
|
351
|
-
License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
352
|
-
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
353
|
-
|
|
354
|
-
If it is not possible or desirable to put the notice in a particular
|
|
355
|
-
file, then You may include it in a LICENSE file in a relevant
|
|
356
|
-
directory, or a legal notice stating where the relevant license can be
|
|
357
|
-
found.
|
|
358
|
-
|
|
359
|
-
Exhibit B - "Incompatible With Secondary Licenses" Notice
|
|
360
|
-
---------------------------------------------------------
|
|
361
|
-
|
|
362
|
-
This Source Code Form is "Incompatible With Secondary Licenses", as
|
|
363
|
-
defined by the Mozilla Public License, v. 2.0.
|