@tempots/beatui 0.86.0 → 0.87.0
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/auth/index.cjs.js +1 -1
- package/dist/auth/index.es.js +1 -1
- package/dist/{auth-divider-C3_CgC0l.js → auth-divider-BIefTDoO.js} +5 -5
- package/dist/{auth-divider-C4WTL71M.cjs → auth-divider-V_Se6Qhe.cjs} +1 -1
- package/dist/beatui.css +13 -10
- package/dist/beatui.tailwind.css +13 -10
- package/dist/better-auth/index.cjs.js +1 -1
- package/dist/better-auth/index.es.js +4 -4
- package/dist/{deep-merge-CmQoIYPC.js → deep-merge-BRqRzEQs.js} +3 -3
- package/dist/{deep-merge-UghuPcyW.cjs → deep-merge-CvN7Xvd1.cjs} +1 -1
- package/dist/{duration-input-DaB6s0rL.js → duration-input-BDEb1Bb7.js} +95 -89
- package/dist/duration-input-BtFL5Vjx.cjs +1 -0
- package/dist/{editor-toolbar-group-_V1rDM-1.cjs → editor-toolbar-group-BgWLVgMZ.cjs} +1 -1
- package/dist/{editor-toolbar-group-BslfdazC.js → editor-toolbar-group-CwCCGzEC.js} +1 -1
- package/dist/{index-DfJMDwSU.js → index-B0t-nt7i.js} +1 -1
- package/dist/{index-BzRuy4V1.cjs → index-CaWDj1Vg.cjs} +2 -2
- package/dist/{index-vzoI95E1.js → index-DdqGL9Jk.js} +4 -4
- package/dist/{index-4GQLcxme.cjs → index-qa82MK4Z.cjs} +1 -1
- package/dist/index.cjs.js +2 -2
- package/dist/index.es.js +18 -21
- package/dist/input-container-B31Seozh.cjs +1 -0
- package/dist/input-container-DhUiLmXE.js +263 -0
- package/dist/json-schema/index.cjs.js +1 -1
- package/dist/json-schema/index.es.js +7 -7
- package/dist/json-structure/index.cjs.js +1 -1
- package/dist/json-structure/index.es.js +5 -5
- package/dist/lexical/index.cjs.js +1 -1
- package/dist/lexical/index.es.js +3 -3
- package/dist/{modal-kyZfvVZb.cjs → modal-Coenk8Fy.cjs} +1 -1
- package/dist/{modal-DaI1jH-X.js → modal-Dkje8L_l.js} +2 -2
- package/dist/{notice-Dz4nX57_.js → notice-BmkckDsD.js} +3 -3
- package/dist/{notice-Bc1L4Zpr.cjs → notice-DMK7dx9a.cjs} +1 -1
- package/dist/prosemirror/index.cjs.js +1 -1
- package/dist/prosemirror/index.es.js +1 -1
- package/dist/{text-input-CPJzUC2r.js → text-input-BZmAB3_o.js} +15 -15
- package/dist/text-input-w0eVcqk5.cjs +1 -0
- package/dist/{toolbar-D3ZsC0g_.cjs → toolbar-BR8In7O0.cjs} +1 -1
- package/dist/{toolbar-CjQG7l7X.js → toolbar-Pdj-F80l.js} +1 -1
- package/dist/types/components/form/input/input-container.d.ts +5 -2
- package/dist/types/components/form/input/input-options.d.ts +24 -2
- package/dist/types/components/form/input/nullable-plain-date-input.d.ts +1 -0
- package/dist/types/components/form/input/nullable-plain-date-time-input.d.ts +1 -0
- package/dist/types/components/form/input/nullable-plain-time-input.d.ts +1 -0
- package/dist/types/components/form/input/nullable-plain-year-month-input.d.ts +1 -0
- package/dist/types/components/form/input/plain-date-input.d.ts +1 -0
- package/dist/types/components/form/input/plain-date-time-input.d.ts +1 -0
- package/dist/types/components/form/input/plain-time-input.d.ts +1 -0
- package/dist/types/components/form/input/plain-year-month-input.d.ts +1 -0
- package/dist/{use-form-BurzbPVV.js → use-form-BSvvERhX.js} +1 -1
- package/dist/{use-form-Uree6QFy.cjs → use-form-B_mCauP0.cjs} +1 -1
- package/dist/{widget-customization-B9Oc1bG4.cjs → widget-customization-BASfRpF7.cjs} +1 -1
- package/dist/{widget-customization-Ct2eqKKR.js → widget-customization-DFr3ycD7.js} +4 -4
- package/package.json +2 -2
- package/dist/duration-input-BJzKgI15.cjs +0 -1
- package/dist/input-container-CSi72GI1.cjs +0 -1
- package/dist/input-container-Nx0gMAzS.js +0 -258
- package/dist/text-input-8v79fzEy.cjs +0 -1
|
@@ -1,258 +0,0 @@
|
|
|
1
|
-
import { prop as _, Use as B, html as k, attr as d, computedOf as p, aria as w, When as D, Fragment as $, style as y, on as E, Value as I, Empty as V, WithElement as j, OnDispose as S } from "@tempots/dom";
|
|
2
|
-
import { t as g, b as x, h as c, a as f, B as O, I as L } from "./translations-BGblCUBj.js";
|
|
3
|
-
import { ElementRect as U } from "@tempots/ui";
|
|
4
|
-
function W(s, e, n, t) {
|
|
5
|
-
const r = [
|
|
6
|
-
"bc-button",
|
|
7
|
-
`bc-button--size-${s}`,
|
|
8
|
-
`bc-control--padding-${s}`,
|
|
9
|
-
`bc-control--rounded-${e}`
|
|
10
|
-
];
|
|
11
|
-
return n && r.push("bc-button--loading"), t && r.push("bc-button--full-width"), r.join(" ");
|
|
12
|
-
}
|
|
13
|
-
function q(s, e, n) {
|
|
14
|
-
const t = /* @__PURE__ */ new Map();
|
|
15
|
-
t.set("--button-text-shadow", "var(--text-shadow-none)"), t.set("--button-text-shadow-dark", "var(--text-shadow-none)");
|
|
16
|
-
const r = (o, a, l, i) => {
|
|
17
|
-
n || (t.set("--button-bg-hover", o), t.set("--button-text-hover", l), t.set("--button-bg-hover-dark", a), t.set("--button-text-hover-dark", i));
|
|
18
|
-
};
|
|
19
|
-
switch (s) {
|
|
20
|
-
case "filled": {
|
|
21
|
-
const o = x(e, "solid", "light"), a = x(e, "solid", "dark");
|
|
22
|
-
t.set("--button-bg", o.backgroundColor), t.set("--button-text", o.textColor), t.set("--button-bg-dark", a.backgroundColor), t.set("--button-text-dark", a.textColor), t.set(
|
|
23
|
-
"--button-text-shadow",
|
|
24
|
-
"var(--text-shadow-button-filled, var(--text-shadow-sm))"
|
|
25
|
-
), t.set(
|
|
26
|
-
"--button-text-shadow-dark",
|
|
27
|
-
"var(--text-shadow-button-filled, var(--text-shadow-sm))"
|
|
28
|
-
);
|
|
29
|
-
const l = c(e, "solid", "light"), i = c(e, "solid", "dark");
|
|
30
|
-
r(
|
|
31
|
-
l.backgroundColor,
|
|
32
|
-
i.backgroundColor,
|
|
33
|
-
l.textColor,
|
|
34
|
-
i.textColor
|
|
35
|
-
);
|
|
36
|
-
break;
|
|
37
|
-
}
|
|
38
|
-
case "light": {
|
|
39
|
-
const o = x(e, "light", "light"), a = x(e, "light", "dark");
|
|
40
|
-
t.set("--button-bg", o.backgroundColor), t.set("--button-text", o.textColor), t.set("--button-bg-dark", a.backgroundColor), t.set("--button-text-dark", a.textColor);
|
|
41
|
-
const l = c(e, "light", "light"), i = c(e, "light", "dark");
|
|
42
|
-
r(
|
|
43
|
-
l.backgroundColor,
|
|
44
|
-
i.backgroundColor,
|
|
45
|
-
l.textColor,
|
|
46
|
-
i.textColor
|
|
47
|
-
);
|
|
48
|
-
break;
|
|
49
|
-
}
|
|
50
|
-
case "outline": {
|
|
51
|
-
t.set("--button-bg", "transparent"), t.set("--button-bg-dark", "transparent"), t.set("--button-border", f(e, "light")), t.set("--button-border-dark", f(e, "dark")), t.set("--button-text", g(e, "light")), t.set("--button-text-dark", g(e, "dark")), t.set(
|
|
52
|
-
"--button-text-shadow",
|
|
53
|
-
"var(--text-shadow-button-light, var(--text-shadow-xs))"
|
|
54
|
-
), t.set(
|
|
55
|
-
"--button-text-shadow-dark",
|
|
56
|
-
"var(--text-shadow-button-light, var(--text-shadow-xs))"
|
|
57
|
-
);
|
|
58
|
-
const o = c(e, "light", "light"), a = c(e, "light", "dark");
|
|
59
|
-
r(
|
|
60
|
-
o.backgroundColor,
|
|
61
|
-
a.backgroundColor,
|
|
62
|
-
o.textColor,
|
|
63
|
-
a.textColor
|
|
64
|
-
);
|
|
65
|
-
break;
|
|
66
|
-
}
|
|
67
|
-
case "dashed": {
|
|
68
|
-
t.set("--button-bg", "transparent"), t.set("--button-bg-dark", "transparent"), t.set("--button-border", f(e, "light")), t.set("--button-border-dark", f(e, "dark")), t.set("--button-border-style", "dashed"), t.set("--button-text", g(e, "light")), t.set("--button-text-dark", g(e, "dark"));
|
|
69
|
-
const o = c(e, "light", "light"), a = c(e, "light", "dark");
|
|
70
|
-
r(
|
|
71
|
-
o.backgroundColor,
|
|
72
|
-
a.backgroundColor,
|
|
73
|
-
o.textColor,
|
|
74
|
-
a.textColor
|
|
75
|
-
);
|
|
76
|
-
break;
|
|
77
|
-
}
|
|
78
|
-
case "default": {
|
|
79
|
-
const o = x("neutral", "light", "light"), a = x("neutral", "light", "dark");
|
|
80
|
-
t.set("--button-bg", o.backgroundColor), t.set("--button-text", g(e, "light")), t.set("--button-bg-dark", a.backgroundColor), t.set("--button-text-dark", g(e, "dark")), t.set(
|
|
81
|
-
"--button-text-shadow",
|
|
82
|
-
"var(--text-shadow-button-default, var(--text-shadow-2xs))"
|
|
83
|
-
), t.set(
|
|
84
|
-
"--button-text-shadow-dark",
|
|
85
|
-
"var(--text-shadow-button-default, var(--text-shadow-2xs))"
|
|
86
|
-
);
|
|
87
|
-
const l = c("base", "light", "light"), i = c("base", "light", "dark");
|
|
88
|
-
r(
|
|
89
|
-
l.backgroundColor,
|
|
90
|
-
i.backgroundColor,
|
|
91
|
-
t.get("--button-text") ?? o.textColor,
|
|
92
|
-
t.get("--button-text-dark") ?? a.textColor
|
|
93
|
-
);
|
|
94
|
-
break;
|
|
95
|
-
}
|
|
96
|
-
case "text": {
|
|
97
|
-
t.set("--button-bg", "transparent"), t.set("--button-bg-dark", "transparent"), t.set("--button-text", g(e, "light")), t.set("--button-text-dark", g(e, "dark")), n || t.set("--button-hover-decoration", "underline");
|
|
98
|
-
break;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
return Array.from(t.entries()).map(([o, a]) => `${o}: ${a}`).join("; ");
|
|
102
|
-
}
|
|
103
|
-
function P({
|
|
104
|
-
type: s = "button",
|
|
105
|
-
disabled: e = !1,
|
|
106
|
-
loading: n = !1,
|
|
107
|
-
variant: t = "filled",
|
|
108
|
-
size: r = "md",
|
|
109
|
-
color: o = "base",
|
|
110
|
-
roundedness: a = "sm",
|
|
111
|
-
onClick: l = () => {
|
|
112
|
-
},
|
|
113
|
-
fullWidth: i = !1,
|
|
114
|
-
stopPropagation: v = !0
|
|
115
|
-
}, ...C) {
|
|
116
|
-
const u = _(null);
|
|
117
|
-
return B(
|
|
118
|
-
O,
|
|
119
|
-
(h) => k.button(
|
|
120
|
-
d.type(s),
|
|
121
|
-
d.disabled(
|
|
122
|
-
p(
|
|
123
|
-
e,
|
|
124
|
-
n
|
|
125
|
-
)((b, m) => b || m)
|
|
126
|
-
),
|
|
127
|
-
// Add ARIA attributes for accessibility
|
|
128
|
-
w.busy(n ?? !1),
|
|
129
|
-
D(n ?? !1, () => w.label(h.$.loadingExtended)),
|
|
130
|
-
d.class(
|
|
131
|
-
p(r, a, n, i)(W)
|
|
132
|
-
),
|
|
133
|
-
d.style(p(t, o, e)(q)),
|
|
134
|
-
D(
|
|
135
|
-
n ?? !1,
|
|
136
|
-
() => $(
|
|
137
|
-
y.width(
|
|
138
|
-
u.map((b) => b == null ? "" : `${b.width}px`)
|
|
139
|
-
),
|
|
140
|
-
y.height(
|
|
141
|
-
u.map((b) => b == null ? "" : `${b.height}px`)
|
|
142
|
-
),
|
|
143
|
-
L({ icon: "line-md:loading-twotone-loop", size: r ?? "md" }),
|
|
144
|
-
// Hidden live region for screen reader announcements
|
|
145
|
-
k.span(
|
|
146
|
-
d.class("sr-only"),
|
|
147
|
-
w.live("polite"),
|
|
148
|
-
h.$.loadingExtended
|
|
149
|
-
)
|
|
150
|
-
),
|
|
151
|
-
() => $(
|
|
152
|
-
E.click((b) => {
|
|
153
|
-
s !== "submit" && b.preventDefault(), v && b.stopPropagation(), l();
|
|
154
|
-
}),
|
|
155
|
-
...C
|
|
156
|
-
)
|
|
157
|
-
),
|
|
158
|
-
D(
|
|
159
|
-
n != null,
|
|
160
|
-
() => U((b) => (b.on((m) => {
|
|
161
|
-
I.get(n ?? !1) || u.set(m);
|
|
162
|
-
}), V))
|
|
163
|
-
)
|
|
164
|
-
)
|
|
165
|
-
);
|
|
166
|
-
}
|
|
167
|
-
function z(s, e, n) {
|
|
168
|
-
const t = [
|
|
169
|
-
s ? "bc-base-input-container" : "bc-input-container"
|
|
170
|
-
];
|
|
171
|
-
return e ? t.push(
|
|
172
|
-
s ? "bc-base-input-container--disabled" : "bc-input-container--disabled"
|
|
173
|
-
) : t.push(
|
|
174
|
-
s ? "bc-base-input-container--default" : "bc-input-container--default"
|
|
175
|
-
), n && t.push("bc-input-container--error"), t.join(" ");
|
|
176
|
-
}
|
|
177
|
-
function A(s, e) {
|
|
178
|
-
const n = ["bc-input-container__input"];
|
|
179
|
-
return s || (n.push(`bc-control--padding-${e}`), n.push(`bc-control--text-size-${e}`)), n.join(" ");
|
|
180
|
-
}
|
|
181
|
-
const R = ({
|
|
182
|
-
baseContainer: s,
|
|
183
|
-
disabled: e,
|
|
184
|
-
input: n,
|
|
185
|
-
before: t,
|
|
186
|
-
after: r,
|
|
187
|
-
hasError: o,
|
|
188
|
-
focusableSelector: a = "input, select, textarea",
|
|
189
|
-
growInput: l = !0,
|
|
190
|
-
size: i
|
|
191
|
-
}, ...v) => {
|
|
192
|
-
const C = I.map(e ?? !1, (u) => u);
|
|
193
|
-
return k.div(
|
|
194
|
-
j((u) => {
|
|
195
|
-
const h = () => {
|
|
196
|
-
u.querySelector(a)?.focus();
|
|
197
|
-
};
|
|
198
|
-
return u.addEventListener("click", h), S(() => u.removeEventListener("click", h));
|
|
199
|
-
}),
|
|
200
|
-
d.class(
|
|
201
|
-
p(
|
|
202
|
-
s,
|
|
203
|
-
C,
|
|
204
|
-
o ?? !1
|
|
205
|
-
// size ?? 'md'
|
|
206
|
-
)(
|
|
207
|
-
(u, h, b) => z(
|
|
208
|
-
u ?? !1,
|
|
209
|
-
h ?? !1,
|
|
210
|
-
b ?? !1
|
|
211
|
-
// (size ?? 'md') as ControlSize
|
|
212
|
-
)
|
|
213
|
-
)
|
|
214
|
-
),
|
|
215
|
-
t != null ? k.span(d.class("bc-input-container__before"), t) : null,
|
|
216
|
-
k.div(
|
|
217
|
-
d.class(
|
|
218
|
-
p(
|
|
219
|
-
s,
|
|
220
|
-
i ?? "md"
|
|
221
|
-
)(
|
|
222
|
-
(u, h) => A(
|
|
223
|
-
u ?? !1,
|
|
224
|
-
h ?? "md"
|
|
225
|
-
)
|
|
226
|
-
)
|
|
227
|
-
),
|
|
228
|
-
// attr.class('bc-input-container__input'),
|
|
229
|
-
d.class(
|
|
230
|
-
I.map(
|
|
231
|
-
l,
|
|
232
|
-
(u) => u ? "bc-input-container__input--grow" : ""
|
|
233
|
-
)
|
|
234
|
-
),
|
|
235
|
-
n
|
|
236
|
-
),
|
|
237
|
-
r != null ? k.span(d.class("bc-input-container__after"), r) : null,
|
|
238
|
-
...v
|
|
239
|
-
);
|
|
240
|
-
};
|
|
241
|
-
function G({
|
|
242
|
-
icon: s,
|
|
243
|
-
size: e = "md",
|
|
244
|
-
color: n = "neutral"
|
|
245
|
-
}) {
|
|
246
|
-
return k.span(
|
|
247
|
-
d.class("bc-input-container__icon"),
|
|
248
|
-
L({ icon: s, size: e, color: n })
|
|
249
|
-
);
|
|
250
|
-
}
|
|
251
|
-
export {
|
|
252
|
-
P as B,
|
|
253
|
-
R as I,
|
|
254
|
-
G as a,
|
|
255
|
-
W as b,
|
|
256
|
-
q as c,
|
|
257
|
-
A as g
|
|
258
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const t=require("@tempots/dom"),c=require("./input-container-CSi72GI1.cjs"),p=({autocomplete:n,autofocus:r,class:e,disabled:a,name:u,placeholder:l,id:i,required:m,tabIndex:s,hasError:o})=>t.Fragment(t.attr.autocomplete(n),t.attr.autofocus(r),t.attr.class(e),t.attr.disabled(a),t.attr.name(u??i),t.attr.placeholder(l),t.attr.id(i),t.aria.required(m),t.attr.tabindex(s),o!=null?t.aria.invalid(o??!1):null),d=n=>{const{value:r,onBlur:e,onChange:a,onInput:u,type:l}=n;return c.InputContainer({...n,input:t.html.input(t.attr.type(l??"text"),p(n),t.attr.value(r),t.attr.class("bc-input"),e!=null?t.on.blur(t.emitValue(e)):t.Empty,a!=null?t.on.change(t.emitValue(a)):t.Empty,u!=null?t.on.input(t.emitValue(u)):t.Empty)})};exports.CommonInputAttributes=p;exports.TextInput=d;
|