@adamosuiteservices/ui 2.19.1 → 2.19.3
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/amount-input.cjs +1 -1
- package/dist/amount-input.js +1 -1
- package/dist/{calendar-DXq90PYV.cjs → calendar-DbfRhJEt.cjs} +18 -18
- package/dist/{calendar-DgfO9zab.js → calendar-ghKmqI3K.js} +74 -74
- package/dist/calendar.cjs +1 -1
- package/dist/calendar.js +1 -1
- package/dist/date-picker-selector.cjs +1 -1
- package/dist/date-picker-selector.js +1 -1
- package/dist/{input-8sEO5zwD.js → input-BhpIEjpU.js} +2 -2
- package/dist/{input-AONeSXcs.cjs → input-Dyi5eQGJ.cjs} +4 -4
- package/dist/{input-group-BLffLxyg.cjs → input-group-CW5HkR9e.cjs} +5 -6
- package/dist/{input-group-DmevJAqa.js → input-group-CoG1ulfX.js} +6 -7
- package/dist/input-group.cjs +1 -1
- package/dist/input-group.js +1 -1
- package/dist/input-otp.cjs +10 -12
- package/dist/input-otp.js +92 -94
- package/dist/input.cjs +1 -1
- package/dist/input.js +1 -1
- package/dist/selectable-card.cjs +2 -2
- package/dist/selectable-card.js +24 -24
- package/dist/styles.css +1 -1
- package/dist/timeline.cjs +2 -2
- package/dist/timeline.js +55 -55
- package/docs/components/ui/input-group.md +1 -1
- package/docs/components/ui/input-otp.md +254 -0
- package/docs/components/ui/input.md +0 -2
- package/docs/components/ui/timeline.md +6 -1
- package/package.json +1 -1
|
@@ -35,7 +35,7 @@ function Ve(e, t) {
|
|
|
35
35
|
class U extends Date {
|
|
36
36
|
//#region static
|
|
37
37
|
constructor(...t) {
|
|
38
|
-
super(), t.length > 1 && typeof t[t.length - 1] == "string" && (this.timeZone = t.pop()), this.internal = /* @__PURE__ */ new Date(), isNaN(oe(this.timeZone, this)) ? this.setTime(NaN) : t.length ? typeof t[0] == "number" && (t.length === 1 || t.length === 2 && typeof t[1] != "number") ? this.setTime(t[0]) : typeof t[0] == "string" ? this.setTime(+new Date(t[0])) : t[0] instanceof Date ? this.setTime(+t[0]) : (this.setTime(+new Date(...t)), dt(this),
|
|
38
|
+
super(), t.length > 1 && typeof t[t.length - 1] == "string" && (this.timeZone = t.pop()), this.internal = /* @__PURE__ */ new Date(), isNaN(oe(this.timeZone, this)) ? this.setTime(NaN) : t.length ? typeof t[0] == "number" && (t.length === 1 || t.length === 2 && typeof t[1] != "number") ? this.setTime(t[0]) : typeof t[0] == "string" ? this.setTime(+new Date(t[0])) : t[0] instanceof Date ? this.setTime(+t[0]) : (this.setTime(+new Date(...t)), dt(this), je(this)) : this.setTime(Date.now());
|
|
39
39
|
}
|
|
40
40
|
static tz(t, ...n) {
|
|
41
41
|
return n.length ? new U(...n, t) : new U(Date.now(), t);
|
|
@@ -52,7 +52,7 @@ class U extends Date {
|
|
|
52
52
|
//#endregion
|
|
53
53
|
//#region time
|
|
54
54
|
setTime(t) {
|
|
55
|
-
return Date.prototype.setTime.apply(this, arguments),
|
|
55
|
+
return Date.prototype.setTime.apply(this, arguments), je(this), +this;
|
|
56
56
|
}
|
|
57
57
|
//#endregion
|
|
58
58
|
//#region date-fns integration
|
|
@@ -70,10 +70,10 @@ Object.getOwnPropertyNames(Date.prototype).forEach((e) => {
|
|
|
70
70
|
} : (U.prototype[e] = function() {
|
|
71
71
|
return Date.prototype[t].apply(this.internal, arguments), wn(this), +this;
|
|
72
72
|
}, U.prototype[t] = function() {
|
|
73
|
-
return Date.prototype[t].apply(this, arguments),
|
|
73
|
+
return Date.prototype[t].apply(this, arguments), je(this), +this;
|
|
74
74
|
}));
|
|
75
75
|
});
|
|
76
|
-
function
|
|
76
|
+
function je(e) {
|
|
77
77
|
e.internal.setTime(+e), e.internal.setUTCSeconds(e.internal.getUTCSeconds() - Math.round(-oe(e.timeZone, e) * 60));
|
|
78
78
|
}
|
|
79
79
|
function wn(e) {
|
|
@@ -410,12 +410,12 @@ const In = {
|
|
|
410
410
|
long: "h:mm:ss a z",
|
|
411
411
|
medium: "h:mm:ss a",
|
|
412
412
|
short: "h:mm a"
|
|
413
|
-
},
|
|
413
|
+
}, jn = {
|
|
414
414
|
full: "{{date}} 'at' {{time}}",
|
|
415
415
|
long: "{{date}} 'at' {{time}}",
|
|
416
416
|
medium: "{{date}}, {{time}}",
|
|
417
417
|
short: "{{date}}, {{time}}"
|
|
418
|
-
},
|
|
418
|
+
}, qn = {
|
|
419
419
|
date: Pe({
|
|
420
420
|
formats: In,
|
|
421
421
|
defaultWidth: "full"
|
|
@@ -425,17 +425,17 @@ const In = {
|
|
|
425
425
|
defaultWidth: "full"
|
|
426
426
|
}),
|
|
427
427
|
dateTime: Pe({
|
|
428
|
-
formats:
|
|
428
|
+
formats: jn,
|
|
429
429
|
defaultWidth: "full"
|
|
430
430
|
})
|
|
431
|
-
},
|
|
431
|
+
}, An = {
|
|
432
432
|
lastWeek: "'last' eeee 'at' p",
|
|
433
433
|
yesterday: "'yesterday at' p",
|
|
434
434
|
today: "'today at' p",
|
|
435
435
|
tomorrow: "'tomorrow at' p",
|
|
436
436
|
nextWeek: "eeee 'at' p",
|
|
437
437
|
other: "P"
|
|
438
|
-
}, zn = (e, t, n, r) =>
|
|
438
|
+
}, zn = (e, t, n, r) => An[e];
|
|
439
439
|
function le(e) {
|
|
440
440
|
return (t, n) => {
|
|
441
441
|
const r = n?.context ? String(n.context) : "standalone";
|
|
@@ -746,10 +746,10 @@ const er = /^(\d+)(th|st|nd|rd)?/i, tr = /\d+/i, nr = {
|
|
|
746
746
|
parsePatterns: lr,
|
|
747
747
|
defaultParseWidth: "any"
|
|
748
748
|
})
|
|
749
|
-
},
|
|
749
|
+
}, qe = {
|
|
750
750
|
code: "en-US",
|
|
751
751
|
formatDistance: Bn,
|
|
752
|
-
formatLong:
|
|
752
|
+
formatLong: qn,
|
|
753
753
|
formatRelative: zn,
|
|
754
754
|
localize: Un,
|
|
755
755
|
match: fr,
|
|
@@ -1478,7 +1478,7 @@ function vr(e, t, n) {
|
|
|
1478
1478
|
}
|
|
1479
1479
|
const Or = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Wr = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Sr = /^'([^]*?)'?$/, Cr = /''/g, xr = /[a-zA-Z]/;
|
|
1480
1480
|
function Nr(e, t, n) {
|
|
1481
|
-
const r = ge(), o = n?.locale ?? r.locale ??
|
|
1481
|
+
const r = ge(), o = n?.locale ?? r.locale ?? qe, a = n?.firstWeekContainsDate ?? n?.locale?.options?.firstWeekContainsDate ?? r.firstWeekContainsDate ?? r.locale?.options?.firstWeekContainsDate ?? 1, i = n?.weekStartsOn ?? n?.locale?.options?.weekStartsOn ?? r.weekStartsOn ?? r.locale?.options?.weekStartsOn ?? 0, s = Y(e, n?.in);
|
|
1482
1482
|
if (!Cn(s))
|
|
1483
1483
|
throw new RangeError("Invalid time value");
|
|
1484
1484
|
let c = t.match(Wr).map((l) => {
|
|
@@ -1558,21 +1558,21 @@ function Hr(e, t, n) {
|
|
|
1558
1558
|
const s = Yr(i);
|
|
1559
1559
|
return r.setMonth(t, Math.min(a, s)), r;
|
|
1560
1560
|
}
|
|
1561
|
-
function
|
|
1561
|
+
function jr(e, t, n) {
|
|
1562
1562
|
const r = Y(e, n?.in);
|
|
1563
1563
|
return isNaN(+r) ? B(e, NaN) : (r.setFullYear(t), r);
|
|
1564
1564
|
}
|
|
1565
|
-
const at = 5,
|
|
1566
|
-
function
|
|
1565
|
+
const at = 5, qr = 4;
|
|
1566
|
+
function Ar(e, t) {
|
|
1567
1567
|
const n = t.startOfMonth(e), r = n.getDay() > 0 ? n.getDay() : 7, o = t.addDays(e, -r + 1), a = t.addDays(o, at * 7 - 1);
|
|
1568
|
-
return t.getMonth(e) === t.getMonth(a) ? at :
|
|
1568
|
+
return t.getMonth(e) === t.getMonth(a) ? at : qr;
|
|
1569
1569
|
}
|
|
1570
1570
|
function vt(e, t) {
|
|
1571
1571
|
const n = t.startOfMonth(e), r = n.getDay();
|
|
1572
1572
|
return r === 1 ? n : r === 0 ? t.addDays(n, -6) : t.addDays(n, -1 * (r - 1));
|
|
1573
1573
|
}
|
|
1574
1574
|
function zr(e, t) {
|
|
1575
|
-
const n = vt(e, t), r =
|
|
1575
|
+
const n = vt(e, t), r = Ar(e, t);
|
|
1576
1576
|
return t.addDays(n, r * 7 - 1);
|
|
1577
1577
|
}
|
|
1578
1578
|
class R {
|
|
@@ -1594,7 +1594,7 @@ class R {
|
|
|
1594
1594
|
}, this.endOfBroadcastWeek = (r) => this.overrides?.endOfBroadcastWeek ? this.overrides.endOfBroadcastWeek(r) : zr(r, this), this.endOfISOWeek = (r) => this.overrides?.endOfISOWeek ? this.overrides.endOfISOWeek(r) : Pn(r), this.endOfMonth = (r) => this.overrides?.endOfMonth ? this.overrides.endOfMonth(r) : Nn(r), this.endOfWeek = (r, o) => this.overrides?.endOfWeek ? this.overrides.endOfWeek(r, o) : wt(r, this.options), this.endOfYear = (r) => this.overrides?.endOfYear ? this.overrides.endOfYear(r) : Tn(r), this.format = (r, o, a) => {
|
|
1595
1595
|
const i = this.overrides?.format ? this.overrides.format(r, o, this.options) : Nr(r, o, this.options);
|
|
1596
1596
|
return this.options.numerals && this.options.numerals !== "latn" ? this.replaceDigits(i) : i;
|
|
1597
|
-
}, this.getISOWeek = (r) => this.overrides?.getISOWeek ? this.overrides.getISOWeek(r) : bt(r), this.getMonth = (r, o) => this.overrides?.getMonth ? this.overrides.getMonth(r, this.options) : Tr(r, this.options), this.getYear = (r, o) => this.overrides?.getYear ? this.overrides.getYear(r, this.options) : Er(r, this.options), this.getWeek = (r, o) => this.overrides?.getWeek ? this.overrides.getWeek(r, this.options) : kt(r, this.options), this.isAfter = (r, o) => this.overrides?.isAfter ? this.overrides.isAfter(r, o) : Pr(r, o), this.isBefore = (r, o) => this.overrides?.isBefore ? this.overrides.isBefore(r, o) : Fr(r, o), this.isDate = (r) => this.overrides?.isDate ? this.overrides.isDate(r) : yt(r), this.isSameDay = (r, o) => this.overrides?.isSameDay ? this.overrides.isSameDay(r, o) : Sn(r, o), this.isSameMonth = (r, o) => this.overrides?.isSameMonth ? this.overrides.isSameMonth(r, o) : Br(r, o), this.isSameYear = (r, o) => this.overrides?.isSameYear ? this.overrides.isSameYear(r, o) : Ir(r, o), this.max = (r) => this.overrides?.max ? this.overrides.max(r) : On(r), this.min = (r) => this.overrides?.min ? this.overrides.min(r) : Wn(r), this.setMonth = (r, o) => this.overrides?.setMonth ? this.overrides.setMonth(r, o) : Hr(r, o), this.setYear = (r, o) => this.overrides?.setYear ? this.overrides.setYear(r, o) :
|
|
1597
|
+
}, this.getISOWeek = (r) => this.overrides?.getISOWeek ? this.overrides.getISOWeek(r) : bt(r), this.getMonth = (r, o) => this.overrides?.getMonth ? this.overrides.getMonth(r, this.options) : Tr(r, this.options), this.getYear = (r, o) => this.overrides?.getYear ? this.overrides.getYear(r, this.options) : Er(r, this.options), this.getWeek = (r, o) => this.overrides?.getWeek ? this.overrides.getWeek(r, this.options) : kt(r, this.options), this.isAfter = (r, o) => this.overrides?.isAfter ? this.overrides.isAfter(r, o) : Pr(r, o), this.isBefore = (r, o) => this.overrides?.isBefore ? this.overrides.isBefore(r, o) : Fr(r, o), this.isDate = (r) => this.overrides?.isDate ? this.overrides.isDate(r) : yt(r), this.isSameDay = (r, o) => this.overrides?.isSameDay ? this.overrides.isSameDay(r, o) : Sn(r, o), this.isSameMonth = (r, o) => this.overrides?.isSameMonth ? this.overrides.isSameMonth(r, o) : Br(r, o), this.isSameYear = (r, o) => this.overrides?.isSameYear ? this.overrides.isSameYear(r, o) : Ir(r, o), this.max = (r) => this.overrides?.max ? this.overrides.max(r) : On(r), this.min = (r) => this.overrides?.min ? this.overrides.min(r) : Wn(r), this.setMonth = (r, o) => this.overrides?.setMonth ? this.overrides.setMonth(r, o) : Hr(r, o), this.setYear = (r, o) => this.overrides?.setYear ? this.overrides.setYear(r, o) : jr(r, o), this.startOfBroadcastWeek = (r, o) => this.overrides?.startOfBroadcastWeek ? this.overrides.startOfBroadcastWeek(r, this) : vt(r, this), this.startOfDay = (r) => this.overrides?.startOfDay ? this.overrides.startOfDay(r) : ye(r), this.startOfISOWeek = (r) => this.overrides?.startOfISOWeek ? this.overrides.startOfISOWeek(r) : he(r), this.startOfMonth = (r) => this.overrides?.startOfMonth ? this.overrides.startOfMonth(r) : Yn(r), this.startOfWeek = (r, o) => this.overrides?.startOfWeek ? this.overrides.startOfWeek(r, this.options) : de(r, this.options), this.startOfYear = (r) => this.overrides?.startOfYear ? this.overrides.startOfYear(r) : pt(r), this.options = { locale: qe, ...t }, this.overrides = n;
|
|
1598
1598
|
}
|
|
1599
1599
|
/**
|
|
1600
1600
|
* Generates a mapping of Arabic digits (0-9) to the target numbering system
|
|
@@ -1901,7 +1901,7 @@ function J(e, t, n = !1, r = V) {
|
|
|
1901
1901
|
function St(e) {
|
|
1902
1902
|
return !!(e && typeof e == "object" && "before" in e && "after" in e);
|
|
1903
1903
|
}
|
|
1904
|
-
function
|
|
1904
|
+
function Ae(e) {
|
|
1905
1905
|
return !!(e && typeof e == "object" && "from" in e);
|
|
1906
1906
|
}
|
|
1907
1907
|
function Ct(e) {
|
|
@@ -1925,7 +1925,7 @@ function ee(e, t, n = V) {
|
|
|
1925
1925
|
return o(e, s);
|
|
1926
1926
|
if (_t(s, n))
|
|
1927
1927
|
return s.includes(e);
|
|
1928
|
-
if (
|
|
1928
|
+
if (Ae(s))
|
|
1929
1929
|
return J(s, e, !1, n);
|
|
1930
1930
|
if (Nt(s))
|
|
1931
1931
|
return Array.isArray(s.dayOfWeek) ? s.dayOfWeek.includes(e.getDay()) : s.dayOfWeek === e.getDay();
|
|
@@ -1945,9 +1945,9 @@ function bo(e, t, n, r, o) {
|
|
|
1945
1945
|
[F.today]: []
|
|
1946
1946
|
}, T = {};
|
|
1947
1947
|
for (const y of e) {
|
|
1948
|
-
const { date: k, displayMonth: b } = y, x = !!(b && !f(k, b)), I = !!(O && v(k, O)),
|
|
1948
|
+
const { date: k, displayMonth: b } = y, x = !!(b && !f(k, b)), I = !!(O && v(k, O)), j = !!(C && M(k, C)), q = !!(a && ee(k, a, o)), Z = !!(i && ee(k, i, o)) || I || j || // Broadcast calendar will show outside days as default
|
|
1949
1949
|
!d && !c && x || d && c === !1 && x, ae = u(k, l ?? o.today());
|
|
1950
|
-
x && p.outside.push(y),
|
|
1950
|
+
x && p.outside.push(y), q && p.disabled.push(y), Z && p.hidden.push(y), ae && p.today.push(y), s && Object.keys(s).forEach((se) => {
|
|
1951
1951
|
const ie = s?.[se];
|
|
1952
1952
|
ie && ee(k, ie, o) && (T[se] ? T[se].push(y) : T[se] = [y]);
|
|
1953
1953
|
});
|
|
@@ -1962,7 +1962,7 @@ function bo(e, t, n, r, o) {
|
|
|
1962
1962
|
}, b = {};
|
|
1963
1963
|
for (const x in p) {
|
|
1964
1964
|
const I = p[x];
|
|
1965
|
-
k[x] = I.some((
|
|
1965
|
+
k[x] = I.some((j) => j === y);
|
|
1966
1966
|
}
|
|
1967
1967
|
for (const x in T)
|
|
1968
1968
|
b[x] = T[x].some((I) => I === y);
|
|
@@ -2100,13 +2100,13 @@ function Ho(e, t, n, r) {
|
|
|
2100
2100
|
let o = (r ?? new R(n)).format(e, "PPPP");
|
|
2101
2101
|
return t?.today && (o = `Today, ${o}`), o;
|
|
2102
2102
|
}
|
|
2103
|
-
function
|
|
2103
|
+
function jo(e) {
|
|
2104
2104
|
return "Choose the Month";
|
|
2105
2105
|
}
|
|
2106
|
-
function
|
|
2106
|
+
function qo() {
|
|
2107
2107
|
return "";
|
|
2108
2108
|
}
|
|
2109
|
-
function
|
|
2109
|
+
function Ao(e) {
|
|
2110
2110
|
return "Go to the Next Month";
|
|
2111
2111
|
}
|
|
2112
2112
|
function zo(e) {
|
|
@@ -2131,9 +2131,9 @@ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2131
2131
|
labelDayButton: Et,
|
|
2132
2132
|
labelGrid: Pt,
|
|
2133
2133
|
labelGridcell: Ho,
|
|
2134
|
-
labelMonthDropdown:
|
|
2135
|
-
labelNav:
|
|
2136
|
-
labelNext:
|
|
2134
|
+
labelMonthDropdown: jo,
|
|
2135
|
+
labelNav: qo,
|
|
2136
|
+
labelNext: Ao,
|
|
2137
2137
|
labelPrevious: zo,
|
|
2138
2138
|
labelWeekNumber: $o,
|
|
2139
2139
|
labelWeekNumberHeader: Zo,
|
|
@@ -2182,26 +2182,26 @@ function Vo(e, t, { classNames: n, months: r, focused: o, dateLib: a }) {
|
|
|
2182
2182
|
y.style.pointerEvents = "none", y.style.position = "absolute", y.style.overflow = "hidden", y.setAttribute("aria-hidden", "true");
|
|
2183
2183
|
const I = Uo(y);
|
|
2184
2184
|
I && (I.style.opacity = "0");
|
|
2185
|
-
const
|
|
2186
|
-
|
|
2187
|
-
const
|
|
2188
|
-
|
|
2185
|
+
const j = Be(y);
|
|
2186
|
+
j && (j.classList.add(u ? n[z.caption_before_exit] : n[z.caption_after_exit]), j.addEventListener("animationend", x));
|
|
2187
|
+
const q = Ie(y);
|
|
2188
|
+
q && q.classList.add(u ? n[z.weeks_before_exit] : n[z.weeks_after_exit]), p.insertBefore(y, p.firstChild);
|
|
2189
2189
|
});
|
|
2190
2190
|
}
|
|
2191
2191
|
});
|
|
2192
2192
|
}
|
|
2193
2193
|
function Ko(e, t, n, r) {
|
|
2194
2194
|
const o = e[0], a = e[e.length - 1], { ISOWeek: i, fixedWeeks: s, broadcastCalendar: c } = n ?? {}, { addDays: d, differenceInCalendarDays: l, differenceInCalendarMonths: u, endOfBroadcastWeek: f, endOfISOWeek: g, endOfMonth: v, endOfWeek: W, isAfter: M, startOfBroadcastWeek: O, startOfISOWeek: C, startOfWeek: p } = r, T = c ? O(o, r) : i ? C(o) : p(o), y = c ? f(a) : i ? g(v(a)) : W(v(a)), k = l(y, T), b = u(a, o) + 1, x = [];
|
|
2195
|
-
for (let
|
|
2196
|
-
const Z = d(T,
|
|
2195
|
+
for (let q = 0; q <= k; q++) {
|
|
2196
|
+
const Z = d(T, q);
|
|
2197
2197
|
if (t && M(Z, t))
|
|
2198
2198
|
break;
|
|
2199
2199
|
x.push(Z);
|
|
2200
2200
|
}
|
|
2201
|
-
const
|
|
2202
|
-
if (s && x.length <
|
|
2203
|
-
const
|
|
2204
|
-
for (let Z = 0; Z <
|
|
2201
|
+
const j = (c ? 35 : 42) * b;
|
|
2202
|
+
if (s && x.length < j) {
|
|
2203
|
+
const q = j - x.length;
|
|
2204
|
+
for (let Z = 0; Z < q; Z++) {
|
|
2205
2205
|
const ae = d(x[x.length - 1], 1);
|
|
2206
2206
|
x.push(ae);
|
|
2207
2207
|
}
|
|
@@ -2246,8 +2246,8 @@ function ta(e, t, n, r) {
|
|
|
2246
2246
|
p.push(...b);
|
|
2247
2247
|
}
|
|
2248
2248
|
const y = p.reduce((b, x) => {
|
|
2249
|
-
const I = n.ISOWeek ? d(x) : l(x),
|
|
2250
|
-
return
|
|
2249
|
+
const I = n.ISOWeek ? d(x) : l(x), j = b.find((Z) => Z.weekNumber === I), q = new Ot(x, M, r);
|
|
2250
|
+
return j ? j.days.push(q) : b.push(new $r(I, [q])), b;
|
|
2251
2251
|
}, []), k = new Rr(M, y);
|
|
2252
2252
|
return W.push(k), W;
|
|
2253
2253
|
}, []);
|
|
@@ -2430,7 +2430,7 @@ function ct(e, t, n = V) {
|
|
|
2430
2430
|
}
|
|
2431
2431
|
function ma(e, t, n = V) {
|
|
2432
2432
|
const r = Array.isArray(t) ? t : [t];
|
|
2433
|
-
if (r.filter((s) => typeof s != "function").some((s) => typeof s == "boolean" ? s : n.isDate(s) ? J(e, s, !1, n) : _t(s, n) ? s.some((c) => J(e, c, !1, n)) :
|
|
2433
|
+
if (r.filter((s) => typeof s != "function").some((s) => typeof s == "boolean" ? s : n.isDate(s) ? J(e, s, !1, n) : _t(s, n) ? s.some((c) => J(e, c, !1, n)) : Ae(s) ? s.from && s.to ? ct(e, { from: s.from, to: s.to }, n) : !1 : Nt(s) ? fa(e, s.dayOfWeek, n) : St(s) ? n.isAfter(s.before, s.after) ? ct(e, {
|
|
2434
2434
|
from: n.addDays(s.after, 1),
|
|
2435
2435
|
to: n.addDays(s.before, -1)
|
|
2436
2436
|
}, n) : ee(e.from, s, n) || ee(e.to, s, n) : Ct(s) || xt(s) ? ee(e.from, s, n) || ee(e.to, s, n) : !1))
|
|
@@ -2491,7 +2491,7 @@ function pa(e) {
|
|
|
2491
2491
|
to: t.selected.to ? new H(t.selected.to, t.timeZone) : void 0
|
|
2492
2492
|
}));
|
|
2493
2493
|
const { components: n, formatters: r, labels: o, dateLib: a, locale: i, classNames: s } = Ee(() => {
|
|
2494
|
-
const D = { ...
|
|
2494
|
+
const D = { ...qe, ...t.locale };
|
|
2495
2495
|
return {
|
|
2496
2496
|
dateLib: new R({
|
|
2497
2497
|
locale: D,
|
|
@@ -2522,7 +2522,7 @@ function pa(e) {
|
|
|
2522
2522
|
t.formatters,
|
|
2523
2523
|
t.labels,
|
|
2524
2524
|
t.classNames
|
|
2525
|
-
]), { captionLayout: c, mode: d, navLayout: l, numberOfMonths: u = 1, onDayBlur: f, onDayClick: g, onDayFocus: v, onDayKeyDown: W, onDayMouseEnter: M, onDayMouseLeave: O, onNextClick: C, onPrevClick: p, showWeekNumber: T, styles: y } = t, { formatCaption: k, formatDay: b, formatMonthDropdown: x, formatWeekNumber: I, formatWeekNumberHeader:
|
|
2525
|
+
]), { captionLayout: c, mode: d, navLayout: l, numberOfMonths: u = 1, onDayBlur: f, onDayClick: g, onDayFocus: v, onDayKeyDown: W, onDayMouseEnter: M, onDayMouseLeave: O, onNextClick: C, onPrevClick: p, showWeekNumber: T, styles: y } = t, { formatCaption: k, formatDay: b, formatMonthDropdown: x, formatWeekNumber: I, formatWeekNumberHeader: j, formatWeekdayName: q, formatYearDropdown: Z } = r, ae = sa(t, a), { days: se, months: ie, navStart: be, navEnd: Oe, previousMonth: G, nextMonth: L, goToMonth: K } = ae, We = bo(se, t, be, Oe, a), { isSelected: Se, select: Ce, selected: Me } = ga(t, a) ?? {}, { blur: Re, focused: $e, isFocusTarget: Bt, moveFocus: Ze, setFocused: ke } = da(t, ae, We, Se ?? (() => !1), a), { labelDayButton: It, labelGridcell: Ht, labelGrid: jt, labelMonthDropdown: qt, labelNav: Ge, labelPrevious: At, labelNext: zt, labelWeekday: Rt, labelWeekNumber: $t, labelWeekNumberHeader: Zt, labelYearDropdown: Gt } = o, Lt = Ee(() => Po(a, t.ISOWeek), [a, t.ISOWeek]), Le = d !== void 0 || g !== void 0, xe = $(() => {
|
|
2526
2526
|
G && (K(G), p?.(G));
|
|
2527
2527
|
}, [G, K, p]), Ne = $(() => {
|
|
2528
2528
|
L && (K(L), C?.(L));
|
|
@@ -2551,8 +2551,8 @@ function pa(e) {
|
|
|
2551
2551
|
};
|
|
2552
2552
|
if (E[w.key]) {
|
|
2553
2553
|
w.preventDefault(), w.stopPropagation();
|
|
2554
|
-
const [
|
|
2555
|
-
Ze(
|
|
2554
|
+
const [A, S] = E[w.key];
|
|
2555
|
+
Ze(A, S);
|
|
2556
2556
|
}
|
|
2557
2557
|
W?.(D.date, P, w);
|
|
2558
2558
|
}, [Ze, W, t.dir]), Kt = $((D, P) => (w) => {
|
|
@@ -2614,14 +2614,14 @@ function pa(e) {
|
|
|
2614
2614
|
},
|
|
2615
2615
|
l === "around" && !t.hideNavigation && P === 0 && m.createElement(
|
|
2616
2616
|
n.PreviousMonthButton,
|
|
2617
|
-
{ type: "button", className: s[h.PreviousMonthButton], tabIndex: G ? void 0 : -1, "aria-disabled": G ? void 0 : !0, "aria-label":
|
|
2617
|
+
{ type: "button", className: s[h.PreviousMonthButton], tabIndex: G ? void 0 : -1, "aria-disabled": G ? void 0 : !0, "aria-label": At(G), onClick: xe, "data-animated-button": t.animate ? "true" : void 0 },
|
|
2618
2618
|
m.createElement(n.Chevron, { disabled: G ? void 0 : !0, className: s[h.Chevron], orientation: t.dir === "rtl" ? "right" : "left" })
|
|
2619
2619
|
),
|
|
2620
2620
|
m.createElement(n.MonthCaption, { "data-animated-caption": t.animate ? "true" : void 0, className: s[h.MonthCaption], style: y?.[h.MonthCaption], calendarMonth: D, displayIndex: P }, c?.startsWith("dropdown") ? m.createElement(
|
|
2621
2621
|
n.DropdownNav,
|
|
2622
2622
|
{ className: s[h.Dropdowns], style: y?.[h.Dropdowns] },
|
|
2623
2623
|
(() => {
|
|
2624
|
-
const w = c === "dropdown" || c === "dropdown-months" ? m.createElement(n.MonthsDropdown, { key: "month", className: s[h.MonthsDropdown], "aria-label":
|
|
2624
|
+
const w = c === "dropdown" || c === "dropdown-months" ? m.createElement(n.MonthsDropdown, { key: "month", className: s[h.MonthsDropdown], "aria-label": qt(), classNames: s, components: n, disabled: !!t.disableNavigation, onChange: en(D.date), options: To(D.date, be, Oe, r, a), style: y?.[h.Dropdown], value: a.getMonth(D.date) }) : m.createElement("span", { key: "month" }, x(D.date, a)), E = c === "dropdown" || c === "dropdown-years" ? m.createElement(n.YearsDropdown, { key: "year", className: s[h.YearsDropdown], "aria-label": Gt(a.options), classNames: s, components: n, disabled: !!t.disableNavigation, onChange: tn(D.date), options: Fo(be, Oe, r, a, !!t.reverseYears), style: y?.[h.Dropdown], value: a.getYear(D.date) }) : m.createElement("span", { key: "year" }, Z(D.date, a));
|
|
2625
2625
|
return a.getMonthYearOrder() === "year-first" ? [E, w] : [w, E];
|
|
2626
2626
|
})(),
|
|
2627
2627
|
m.createElement("span", { role: "status", "aria-live": "polite", style: {
|
|
@@ -2648,12 +2648,12 @@ function pa(e) {
|
|
|
2648
2648
|
P === u - 1 && l === "after" && !t.hideNavigation && m.createElement(n.Nav, { "data-animated-nav": t.animate ? "true" : void 0, className: s[h.Nav], style: y?.[h.Nav], "aria-label": Ge(), onPreviousClick: xe, onNextClick: Ne, previousMonth: G, nextMonth: L }),
|
|
2649
2649
|
m.createElement(
|
|
2650
2650
|
n.MonthGrid,
|
|
2651
|
-
{ role: "grid", "aria-multiselectable": d === "multiple" || d === "range", "aria-label":
|
|
2651
|
+
{ role: "grid", "aria-multiselectable": d === "multiple" || d === "range", "aria-label": jt(D.date, a.options, a) || void 0, className: s[h.MonthGrid], style: y?.[h.MonthGrid] },
|
|
2652
2652
|
!t.hideWeekdays && m.createElement(
|
|
2653
2653
|
n.Weekdays,
|
|
2654
2654
|
{ "data-animated-weekdays": t.animate ? "true" : void 0, className: s[h.Weekdays], style: y?.[h.Weekdays] },
|
|
2655
|
-
T && m.createElement(n.WeekNumberHeader, { "aria-label": Zt(a.options), className: s[h.WeekNumberHeader], style: y?.[h.WeekNumberHeader], scope: "col" },
|
|
2656
|
-
Lt.map((w) => m.createElement(n.Weekday, { "aria-label": Rt(w, a.options, a), className: s[h.Weekday], key: String(w), style: y?.[h.Weekday], scope: "col" },
|
|
2655
|
+
T && m.createElement(n.WeekNumberHeader, { "aria-label": Zt(a.options), className: s[h.WeekNumberHeader], style: y?.[h.WeekNumberHeader], scope: "col" }, j()),
|
|
2656
|
+
Lt.map((w) => m.createElement(n.Weekday, { "aria-label": Rt(w, a.options, a), className: s[h.Weekday], key: String(w), style: y?.[h.Weekday], scope: "col" }, q(w, a.options, a)))
|
|
2657
2657
|
),
|
|
2658
2658
|
m.createElement(n.Weeks, { "data-animated-weeks": t.animate ? "true" : void 0, className: s[h.Weeks], style: y?.[h.Weeks] }, D.weeks.map((w) => m.createElement(
|
|
2659
2659
|
n.Week,
|
|
@@ -2663,15 +2663,15 @@ function pa(e) {
|
|
|
2663
2663
|
locale: i
|
|
2664
2664
|
}), className: s[h.WeekNumber], scope: "row", role: "rowheader" }, I(w.weekNumber, a)),
|
|
2665
2665
|
w.days.map((E) => {
|
|
2666
|
-
const { date:
|
|
2667
|
-
if (S[F.focused] = !S.hidden && !!$e?.isEqualTo(E), S[Q.selected] = Se?.(
|
|
2666
|
+
const { date: A } = E, S = We(E);
|
|
2667
|
+
if (S[F.focused] = !S.hidden && !!$e?.isEqualTo(E), S[Q.selected] = Se?.(A) || S.selected, Ae(Me)) {
|
|
2668
2668
|
const { from: _e, to: Ye } = Me;
|
|
2669
|
-
S[Q.range_start] = !!(_e && Ye && a.isSameDay(
|
|
2669
|
+
S[Q.range_start] = !!(_e && Ye && a.isSameDay(A, _e)), S[Q.range_end] = !!(_e && Ye && a.isSameDay(A, Ye)), S[Q.range_middle] = J(Me, A, !0, a);
|
|
2670
2670
|
}
|
|
2671
|
-
const sn = Eo(S, y, t.modifiersStyles), cn = Mo(S, s, t.modifiersClassNames), dn = !Le && !S.hidden ? Ht(
|
|
2671
|
+
const sn = Eo(S, y, t.modifiersStyles), cn = Mo(S, s, t.modifiersClassNames), dn = !Le && !S.hidden ? Ht(A, S, a.options, a) : void 0;
|
|
2672
2672
|
return (
|
|
2673
2673
|
// biome-ignore lint/a11y/useSemanticElements: react component
|
|
2674
|
-
m.createElement(n.Day, { key: `${a.format(
|
|
2674
|
+
m.createElement(n.Day, { key: `${a.format(A, "yyyy-MM-dd")}_${a.format(E.displayMonth, "yyyy-MM")}`, day: E, modifiers: S, className: cn.join(" "), style: sn, role: "gridcell", "aria-selected": S.selected || void 0, "aria-label": dn, "data-day": a.format(A, "yyyy-MM-dd"), "data-month": E.outside ? a.format(A, "yyyy-MM") : void 0, "data-selected": S.selected || void 0, "data-disabled": S.disabled || void 0, "data-hidden": S.hidden || void 0, "data-outside": E.outside || void 0, "data-focused": S.focused || void 0, "data-today": S.today || void 0 }, !S.hidden && Le ? m.createElement(n.DayButton, { className: s[h.DayButton], style: y?.[h.DayButton], type: "button", day: E, modifiers: S, disabled: S.disabled || void 0, tabIndex: Bt(E) ? 0 : -1, "aria-label": It(A, S, a.options, a), onClick: Qt(E, S), onBlur: Ut(E, S), onFocus: Xt(E, S), onKeyDown: Vt(E, S), onMouseEnter: Kt(E, S), onMouseLeave: Jt(E, S) }, b(A, a.options, a)) : !S.hidden && b(E.date, a.options, a))
|
|
2675
2675
|
);
|
|
2676
2676
|
})
|
|
2677
2677
|
)))
|
|
@@ -2703,7 +2703,7 @@ function Oa({
|
|
|
2703
2703
|
className: N(
|
|
2704
2704
|
`
|
|
2705
2705
|
adm:group/calendar adm:bg-background adm:p-3
|
|
2706
|
-
adm:[--cell-size:--spacing(
|
|
2706
|
+
adm:[--cell-size:--spacing(9)]
|
|
2707
2707
|
adm:[[data-slot=card-content]_&]:bg-transparent
|
|
2708
2708
|
adm:[[data-slot=popover-content]_&]:bg-transparent
|
|
2709
2709
|
`,
|
|
@@ -2713,7 +2713,7 @@ function Oa({
|
|
|
2713
2713
|
),
|
|
2714
2714
|
captionLayout: r,
|
|
2715
2715
|
formatters: {
|
|
2716
|
-
formatMonthDropdown: (l) => l.toLocaleString(s?.code, { month: "
|
|
2716
|
+
formatMonthDropdown: (l) => l.toLocaleString(s?.code, { month: "long" }),
|
|
2717
2717
|
...a
|
|
2718
2718
|
},
|
|
2719
2719
|
classNames: {
|
|
@@ -2752,23 +2752,23 @@ function Oa({
|
|
|
2752
2752
|
month_caption: N(
|
|
2753
2753
|
`
|
|
2754
2754
|
adm:flex adm:h-(--cell-size) adm:w-full adm:items-center
|
|
2755
|
-
adm:justify-center adm:px-
|
|
2755
|
+
adm:justify-center adm:px-9
|
|
2756
2756
|
`,
|
|
2757
2757
|
d.month_caption
|
|
2758
2758
|
),
|
|
2759
2759
|
dropdowns: N(
|
|
2760
2760
|
`
|
|
2761
2761
|
adm:flex adm:h-(--cell-size) adm:w-full adm:items-center
|
|
2762
|
-
adm:justify-center adm:gap-
|
|
2762
|
+
adm:justify-center adm:gap-3 adm:text-sm adm:font-medium
|
|
2763
2763
|
`,
|
|
2764
2764
|
d.dropdowns
|
|
2765
2765
|
),
|
|
2766
2766
|
dropdown_root: N(
|
|
2767
2767
|
`
|
|
2768
|
-
adm:relative adm:
|
|
2769
|
-
adm:
|
|
2770
|
-
adm:has-focus:border-
|
|
2771
|
-
adm:has-focus:ring-
|
|
2768
|
+
adm:relative adm:flex adm:items-center adm:rounded-md adm:border
|
|
2769
|
+
adm:border-input adm:bg-background adm:px-3
|
|
2770
|
+
adm:has-focus:border-primary-300 adm:has-focus:ring-4
|
|
2771
|
+
adm:has-focus:ring-primary/10
|
|
2772
2772
|
`,
|
|
2773
2773
|
d.dropdown_root
|
|
2774
2774
|
),
|
|
@@ -2779,8 +2779,8 @@ function Oa({
|
|
|
2779
2779
|
caption_label: N(
|
|
2780
2780
|
"adm:font-medium adm:select-none",
|
|
2781
2781
|
r === "label" ? "adm:text-sm" : `
|
|
2782
|
-
adm:flex adm:h-8 adm:
|
|
2783
|
-
adm:
|
|
2782
|
+
adm:flex adm:h-8 adm:w-full adm:items-center adm:justify-between
|
|
2783
|
+
adm:gap-1 adm:rounded-md adm:text-sm
|
|
2784
2784
|
adm:[&>[data-slot=icon]]:text-base
|
|
2785
2785
|
adm:[&>[data-slot=icon]]:text-muted-foreground
|
|
2786
2786
|
adm:[&>svg]:size-3.5 adm:[&>svg]:text-muted-foreground
|
|
@@ -2788,7 +2788,7 @@ function Oa({
|
|
|
2788
2788
|
d.caption_label
|
|
2789
2789
|
),
|
|
2790
2790
|
table: "adm:w-full adm:border-collapse",
|
|
2791
|
-
weekdays: N("adm:flex
|
|
2791
|
+
weekdays: N("adm:flex", d.weekdays),
|
|
2792
2792
|
weekday: N(
|
|
2793
2793
|
`
|
|
2794
2794
|
adm:flex-1 adm:rounded-md adm:text-[0.8rem] adm:font-normal
|
|
@@ -2796,7 +2796,7 @@ function Oa({
|
|
|
2796
2796
|
`,
|
|
2797
2797
|
d.weekday
|
|
2798
2798
|
),
|
|
2799
|
-
week: N("adm:mt-2 adm:flex adm:w-full
|
|
2799
|
+
week: N("adm:mt-2 adm:flex adm:w-full", d.week),
|
|
2800
2800
|
week_number_header: N(
|
|
2801
2801
|
"adm:w-(--cell-size) adm:select-none",
|
|
2802
2802
|
d.week_number_header
|
|
@@ -2815,11 +2815,11 @@ function Oa({
|
|
|
2815
2815
|
d.day
|
|
2816
2816
|
),
|
|
2817
2817
|
range_start: N(
|
|
2818
|
-
"adm:rounded-l-md adm:bg-
|
|
2818
|
+
"adm:rounded-l-md adm:bg-primary-50",
|
|
2819
2819
|
d.range_start
|
|
2820
2820
|
),
|
|
2821
2821
|
range_middle: N("adm:rounded-none", d.range_middle),
|
|
2822
|
-
range_end: N("adm:rounded-r-md adm:bg-
|
|
2822
|
+
range_end: N("adm:rounded-r-md adm:bg-primary-50", d.range_end),
|
|
2823
2823
|
today: N(
|
|
2824
2824
|
d.today
|
|
2825
2825
|
),
|
|
@@ -2910,7 +2910,7 @@ function wa({
|
|
|
2910
2910
|
`
|
|
2911
2911
|
adm:flex adm:aspect-41/34 adm:size-auto adm:w-full
|
|
2912
2912
|
adm:min-w-(--cell-size) adm:flex-col adm:gap-1 adm:rounded-md
|
|
2913
|
-
adm:leading-none adm:font-normal adm:text-foreground
|
|
2913
|
+
adm:text-sm adm:leading-none adm:font-normal adm:text-foreground
|
|
2914
2914
|
adm:group-data-[focused=true]/day:relative
|
|
2915
2915
|
adm:group-data-[focused=true]/day:z-10
|
|
2916
2916
|
adm:group-data-[focused=true]/day:border-ring
|
|
@@ -2922,13 +2922,13 @@ function wa({
|
|
|
2922
2922
|
adm:data-[range-end=true]:bg-primary
|
|
2923
2923
|
adm:data-[range-end=true]:text-primary-foreground
|
|
2924
2924
|
adm:data-[range-middle=true]:rounded-none
|
|
2925
|
-
adm:data-[range-middle=true]:bg-
|
|
2926
|
-
adm:data-[range-middle=true]:text-
|
|
2925
|
+
adm:data-[range-middle=true]:bg-primary-50
|
|
2926
|
+
adm:data-[range-middle=true]:text-foreground
|
|
2927
2927
|
adm:data-[range-start=true]:rounded-md
|
|
2928
2928
|
adm:data-[range-start=true]:rounded-l-md
|
|
2929
2929
|
adm:data-[range-start=true]:bg-primary
|
|
2930
2930
|
adm:data-[range-start=true]:text-primary-foreground
|
|
2931
|
-
adm:data-[selected-single=true]:bg-primary
|
|
2931
|
+
adm:data-[selected-single=true]:bg-primary
|
|
2932
2932
|
adm:data-[selected-single=true]:text-primary-foreground
|
|
2933
2933
|
adm:dark:hover:text-accent-foreground
|
|
2934
2934
|
adm:[&>span]:text-xs adm:[&>span]:opacity-70
|
package/dist/calendar.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./calendar-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./calendar-DbfRhJEt.cjs");exports.Calendar=a.Calendar;exports.CalendarDayButton=a.CalendarDayButton;
|
package/dist/calendar.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./jsx-runtime-BB_1_6y_.cjs"),h=require("./button-CPm4-98H.cjs"),n=require("./calendar-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./jsx-runtime-BB_1_6y_.cjs"),h=require("./button-CPm4-98H.cjs"),n=require("./calendar-DbfRhJEt.cjs"),L=require("./combobox-DylTjGrw.cjs"),x=require("./popover-cGp_rNLg.cjs"),r=require("react");function D(a,u,m){return n.addDays(a,-u,m)}function T({dateRange:a,onDateRangeChange:u,labels:m,combobox:R,calendar:C,"aria-invalid":g,disabled:E}){const f=r.useRef(null),p=r.useRef(void 0),v=e=>{if(!e.from||!e.to)return;const l=n.startOfDay(new Date),j=[{value:"7_days",days:7},{value:"30_days",days:30},{value:"90_days",days:90}];for(const c of j){const q=D(l,c.days);if(n.startOfDay(e.from).getTime()===q.getTime()&&n.startOfDay(e.to).getTime()===l.getTime())return c.value}return"custom"},[y,o]=r.useState(()=>v(a)),[_,d]=r.useState(!1),[i,S]=r.useState(a);r.useEffect(()=>{const e=v(a);o(e)},[a]);const s={...{last7Days:"Last 7 days",last30Days:"Last 30 days",last90Days:"Last 90 days",custom:"Custom",placeholder:"Date",cancel:"Cancel",apply:"Apply"},...m},k=e=>{const l=n.startOfDay(new Date),c={"7_days":7,"30_days":30,"90_days":90}[e];return c?{from:D(l,c),to:l}:{from:void 0,to:void 0}},b=e=>{o(p.current),d(!1)},O=e=>{if(e==="custom"){p.current=y,o(e),d(!0);return}o(e),u(k(e))},P=()=>{if(i?.from&&i?.to){u(i),o("custom"),d(!1);return}o(p.current),d(!1)};return t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.jsxRuntimeExports.jsx(L.Combobox,{alwaysShowPlaceholder:!0,selectedFeedback:"check",icon:"calendar_today",options:[{label:s.last7Days,value:"7_days"},{label:s.last30Days,value:"30_days"},{label:s.last90Days,value:"90_days"},{label:s.custom,value:"custom"}],labels:{placeholder:s.placeholder},value:y,onValueChange:O,"aria-invalid":g,disabled:E,ref:e=>{f.current=e},...R}),t.jsxRuntimeExports.jsxs(x.Popover,{open:_,onOpenChange:e=>{!e&&y==="custom"&&b()},children:[t.jsxRuntimeExports.jsx(x.PopoverAnchor,{virtualRef:f}),t.jsxRuntimeExports.jsxs(x.PopoverContent,{align:"start",children:[t.jsxRuntimeExports.jsx(n.Calendar,{required:!0,mode:"range",selected:i,onSelect:S,captionLayout:"dropdown",classNames:{root:"adm:p-0!"},...C}),t.jsxRuntimeExports.jsxs("div",{className:"adm:mt-2 adm:flex adm:justify-end adm:gap-2",children:[t.jsxRuntimeExports.jsx(h.Button,{variant:"link",onClick:()=>b(),children:s.cancel}),t.jsxRuntimeExports.jsx(h.Button,{variant:"link",onClick:P,children:s.apply})]})]})]})]})}exports.DatePickerSelector=T;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { j as a } from "./jsx-runtime-BzflLqGi.js";
|
|
2
2
|
import { B as x } from "./button-D4ddrxyp.js";
|
|
3
|
-
import { b as V, C as A, s as i } from "./calendar-
|
|
3
|
+
import { b as V, C as A, s as i } from "./calendar-ghKmqI3K.js";
|
|
4
4
|
import { C as F } from "./combobox-DG9u4g84.js";
|
|
5
5
|
import { P as w, c as B, b as E } from "./popover-DcQ18EVl.js";
|
|
6
6
|
import { useRef as D, useState as y, useEffect as M } from "react";
|
|
@@ -12,8 +12,8 @@ function l({ className: d, type: e, ...a }) {
|
|
|
12
12
|
`
|
|
13
13
|
adm:h-10 adm:w-full adm:min-w-0 adm:rounded-md adm:border
|
|
14
14
|
adm:border-input adm:bg-background adm:px-3 adm:text-sm
|
|
15
|
-
adm:text-input-foreground adm:shadow
|
|
16
|
-
adm:
|
|
15
|
+
adm:text-input-foreground adm:transition-[color,box-shadow]
|
|
16
|
+
adm:outline-none
|
|
17
17
|
adm:selection:bg-primary adm:selection:text-primary-foreground
|
|
18
18
|
adm:file:mr-3 adm:file:-ml-3 adm:file:inline-flex adm:file:h-full
|
|
19
19
|
adm:file:items-center adm:file:border-0 adm:file:bg-transparent
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
"use client";"use strict";const
|
|
1
|
+
"use client";"use strict";const a=require("./jsx-runtime-BB_1_6y_.cjs"),r=require("./index-DoxiiusW.cjs");require("react");function t({className:e,type:d,...i}){return a.jsxRuntimeExports.jsx("input",{type:d,"data-slot":"input",className:r.cn(`
|
|
2
2
|
adm:h-10 adm:w-full adm:min-w-0 adm:rounded-md adm:border
|
|
3
3
|
adm:border-input adm:bg-background adm:px-3 adm:text-sm
|
|
4
|
-
adm:text-input-foreground adm:shadow
|
|
5
|
-
adm:
|
|
4
|
+
adm:text-input-foreground adm:transition-[color,box-shadow]
|
|
5
|
+
adm:outline-none
|
|
6
6
|
adm:selection:bg-primary adm:selection:text-primary-foreground
|
|
7
7
|
adm:file:mr-3 adm:file:-ml-3 adm:file:inline-flex adm:file:h-full
|
|
8
8
|
adm:file:items-center adm:file:border-0 adm:file:bg-transparent
|
|
@@ -19,4 +19,4 @@
|
|
|
19
19
|
adm:focus-visible:ring-primary/10
|
|
20
20
|
adm:aria-invalid:focus-visible:border-destructive
|
|
21
21
|
adm:aria-invalid:focus-visible:ring-destructive/10
|
|
22
|
-
`,"adm:aria-invalid:border-destructive",e),...
|
|
22
|
+
`,"adm:aria-invalid:border-destructive",e),...i})}exports.Input=t;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
"use client";"use strict";const d=require("./jsx-runtime-BB_1_6y_.cjs"),m=require("./button-CPm4-98H.cjs"),i=require("./input-
|
|
1
|
+
"use client";"use strict";const d=require("./jsx-runtime-BB_1_6y_.cjs"),m=require("./button-CPm4-98H.cjs"),i=require("./input-Dyi5eQGJ.cjs"),u=require("./textarea-BSooGyp-.cjs"),n=require("./index-DoxiiusW.cjs"),s=require("./index-BTzZJcis.cjs");require("react");function p({className:t,...a}){return d.jsxRuntimeExports.jsx("div",{"data-slot":"input-group",role:"group",className:n.cn(`
|
|
2
2
|
adm:group/input-group adm:relative adm:flex adm:w-full
|
|
3
3
|
adm:items-center adm:rounded-md adm:border adm:border-input
|
|
4
|
-
adm:bg-background adm:
|
|
5
|
-
adm:outline-none
|
|
4
|
+
adm:bg-background adm:transition-[color,box-shadow] adm:outline-none
|
|
6
5
|
adm:hover:bg-muted
|
|
7
6
|
`,`
|
|
8
7
|
adm:h-10 adm:min-w-0
|
|
@@ -23,7 +22,7 @@
|
|
|
23
22
|
adm:has-[[data-slot][aria-invalid=true]]:border-destructive
|
|
24
23
|
adm:has-[[data-slot][aria-invalid=true]:focus-visible]:ring-4
|
|
25
24
|
adm:has-[[data-slot][aria-invalid=true]:focus-visible]:ring-destructive/10
|
|
26
|
-
`,t),...a})}const l=
|
|
25
|
+
`,t),...a})}const l=s.cva(`
|
|
27
26
|
adm:flex adm:h-auto adm:cursor-text adm:items-center adm:justify-center
|
|
28
27
|
adm:gap-2 adm:py-2 adm:text-sm adm:font-medium adm:text-muted-foreground
|
|
29
28
|
adm:select-none
|
|
@@ -47,7 +46,7 @@
|
|
|
47
46
|
adm:order-last adm:w-full adm:justify-start adm:px-3 adm:pb-3
|
|
48
47
|
adm:group-has-[>input]/input-group:pb-2.5
|
|
49
48
|
adm:[.border-t]:pt-3
|
|
50
|
-
`}},defaultVariants:{align:"inline-start"}});function c({className:t,align:a="inline-start",...
|
|
49
|
+
`}},defaultVariants:{align:"inline-start"}});function c({className:t,align:a="inline-start",...r}){return d.jsxRuntimeExports.jsx("div",{role:"group","data-slot":"input-group-addon","data-align":a,className:n.cn(l({align:a}),t),onClick:e=>{e.target.closest("button")||e.currentTarget.parentElement?.querySelector("input")?.focus()},...r})}const x=s.cva("adm:flex adm:items-center adm:gap-2 adm:text-sm adm:shadow-none",{variants:{size:{xs:`
|
|
51
50
|
adm:h-6 adm:gap-1 adm:rounded-[calc(var(--radius)-5px)] adm:px-2
|
|
52
51
|
adm:has-[>[data-slot=icon]]:px-2
|
|
53
52
|
adm:has-[>svg]:px-2
|
|
@@ -65,7 +64,7 @@
|
|
|
65
64
|
adm:size-8 adm:p-0
|
|
66
65
|
adm:has-[>[data-slot=icon]]:p-0
|
|
67
66
|
adm:has-[>svg]:p-0
|
|
68
|
-
`}},defaultVariants:{size:"xs"}});function g({className:t,type:a="button",variant:
|
|
67
|
+
`}},defaultVariants:{size:"xs"}});function g({className:t,type:a="button",variant:r="link-neutral",size:e="xs",...o}){return d.jsxRuntimeExports.jsx(m.Button,{type:a,"data-size":e,variant:r,className:n.cn(x({size:e}),t),...o})}function b({className:t,...a}){return d.jsxRuntimeExports.jsx("span",{className:n.cn(`
|
|
69
68
|
adm:flex adm:items-center adm:gap-2 adm:text-sm
|
|
70
69
|
adm:text-muted-foreground
|
|
71
70
|
adm:**:data-[slot=icon]:pointer-events-none
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { j as d } from "./jsx-runtime-BzflLqGi.js";
|
|
3
3
|
import { B as m } from "./button-D4ddrxyp.js";
|
|
4
|
-
import { I as i } from "./input-
|
|
4
|
+
import { I as i } from "./input-BhpIEjpU.js";
|
|
5
5
|
import { T as u } from "./textarea-D_sj6ivo.js";
|
|
6
6
|
import { c as s } from "./index-CRiPKpXj.js";
|
|
7
7
|
import { c as o } from "./index-BqtVL8d-.js";
|
|
@@ -16,8 +16,7 @@ function k({ className: t, ...a }) {
|
|
|
16
16
|
`
|
|
17
17
|
adm:group/input-group adm:relative adm:flex adm:w-full
|
|
18
18
|
adm:items-center adm:rounded-md adm:border adm:border-input
|
|
19
|
-
adm:bg-background adm:
|
|
20
|
-
adm:outline-none
|
|
19
|
+
adm:bg-background adm:transition-[color,box-shadow] adm:outline-none
|
|
21
20
|
adm:hover:bg-muted
|
|
22
21
|
`,
|
|
23
22
|
`
|
|
@@ -187,7 +186,7 @@ function I({ className: t, ...a }) {
|
|
|
187
186
|
}
|
|
188
187
|
);
|
|
189
188
|
}
|
|
190
|
-
function
|
|
189
|
+
function y({
|
|
191
190
|
className: t,
|
|
192
191
|
...a
|
|
193
192
|
}) {
|
|
@@ -209,7 +208,7 @@ function w({
|
|
|
209
208
|
}
|
|
210
209
|
);
|
|
211
210
|
}
|
|
212
|
-
function
|
|
211
|
+
function w({
|
|
213
212
|
className: t,
|
|
214
213
|
...a
|
|
215
214
|
}) {
|
|
@@ -235,6 +234,6 @@ export {
|
|
|
235
234
|
j as a,
|
|
236
235
|
z as b,
|
|
237
236
|
I as c,
|
|
238
|
-
|
|
239
|
-
|
|
237
|
+
y as d,
|
|
238
|
+
w as e
|
|
240
239
|
};
|
package/dist/input-group.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./input-group-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./input-group-CW5HkR9e.cjs");exports.InputGroup=u.InputGroup;exports.InputGroupAddon=u.InputGroupAddon;exports.InputGroupButton=u.InputGroupButton;exports.InputGroupInput=u.InputGroupInput;exports.InputGroupText=u.InputGroupText;exports.InputGroupTextarea=u.InputGroupTextarea;
|
package/dist/input-group.js
CHANGED