sprintify-ui 0.6.39 → 0.6.41
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/sprintify-ui.es.js +112 -97
- package/dist/types/src/components/BaseBadge.vue.d.ts +12 -3
- package/dist/types/src/components/BaseTextarea.vue.d.ts +4 -0
- package/package.json +1 -1
- package/src/components/BaseBadge.stories.js +4 -4
- package/src/components/BaseBadge.vue +37 -31
- package/src/components/BaseTextarea.vue +3 -1
- package/src/utils/colors.ts +10 -10
package/dist/sprintify-ui.es.js
CHANGED
|
@@ -2305,7 +2305,7 @@ function S0() {
|
|
|
2305
2305
|
}
|
|
2306
2306
|
};
|
|
2307
2307
|
}
|
|
2308
|
-
var
|
|
2308
|
+
var It = /* @__PURE__ */ u0(S0);
|
|
2309
2309
|
const _0 = ["active", "href", "aria-current", "onClick"], k0 = ["href"], A0 = {
|
|
2310
2310
|
inheritAttrs: !1
|
|
2311
2311
|
}, Li = /* @__PURE__ */ Se({
|
|
@@ -2317,7 +2317,7 @@ const _0 = ["active", "href", "aria-current", "onClick"], k0 = ["href"], A0 = {
|
|
|
2317
2317
|
},
|
|
2318
2318
|
emits: ["click"],
|
|
2319
2319
|
setup(n, { emit: t }) {
|
|
2320
|
-
const e = n, r = L(() =>
|
|
2320
|
+
const e = n, r = L(() => It(
|
|
2321
2321
|
"block text-left",
|
|
2322
2322
|
e.class
|
|
2323
2323
|
)), i = wt("closeMenu", () => {
|
|
@@ -4833,7 +4833,7 @@ const mw = ["innerHTML"], Os = /* @__PURE__ */ Se({
|
|
|
4833
4833
|
sm: "text-sm mb-1",
|
|
4834
4834
|
md: "text-sm mb-1"
|
|
4835
4835
|
}[r.value];
|
|
4836
|
-
return
|
|
4836
|
+
return It(o, a, t.class);
|
|
4837
4837
|
});
|
|
4838
4838
|
return (o, a) => (B(), K("label", {
|
|
4839
4839
|
class: de(T(i))
|
|
@@ -4904,7 +4904,7 @@ const mw = ["innerHTML"], Os = /* @__PURE__ */ Se({
|
|
|
4904
4904
|
function i(p) {
|
|
4905
4905
|
p != null && (e.value = p);
|
|
4906
4906
|
}
|
|
4907
|
-
const o = oe(""), a = L(() =>
|
|
4907
|
+
const o = oe(""), a = L(() => It(o.value, t.labelClass));
|
|
4908
4908
|
function l(p) {
|
|
4909
4909
|
p != null && (o.value = p);
|
|
4910
4910
|
}
|
|
@@ -5320,7 +5320,7 @@ const bc = /* @__PURE__ */ new WeakMap(), _w = (n) => {
|
|
|
5320
5320
|
const x = L(() => {
|
|
5321
5321
|
const P = "inline-flex bg-white input-rounded border transition-colors duration-200", $ = m.value ? "border-red-500" : "border-slate-300", Y = r.disabled ? "cursor-not-allowed text-slate-300" : "", Z = fr[y.value];
|
|
5322
5322
|
let pe = "";
|
|
5323
|
-
return r.visibleFocus && (m.value ? pe = "focus-within:input-focus-error" : pe = "focus-within:input-focus"),
|
|
5323
|
+
return r.visibleFocus && (m.value ? pe = "focus-within:input-focus-error" : pe = "focus-within:input-focus"), It([
|
|
5324
5324
|
P,
|
|
5325
5325
|
$,
|
|
5326
5326
|
Y,
|
|
@@ -5791,7 +5791,7 @@ const Jw = ["value", "name", "disabled", "required"], ex = ["value"], Su = "", _
|
|
|
5791
5791
|
sm: "pl-2.5 pr-8",
|
|
5792
5792
|
md: "pl-3 pr-10"
|
|
5793
5793
|
}[s.value];
|
|
5794
|
-
return
|
|
5794
|
+
return It([
|
|
5795
5795
|
g,
|
|
5796
5796
|
m,
|
|
5797
5797
|
v,
|
|
@@ -6933,7 +6933,7 @@ const Ex = {
|
|
|
6933
6933
|
const t = n;
|
|
6934
6934
|
return (e, r) => (B(), K("div", {
|
|
6935
6935
|
class: de(
|
|
6936
|
-
T(
|
|
6936
|
+
T(It)(
|
|
6937
6937
|
"relative isolate overflow-hidden rounded bg-slate-200",
|
|
6938
6938
|
t.class
|
|
6939
6939
|
)
|
|
@@ -7755,7 +7755,7 @@ const qx = {
|
|
|
7755
7755
|
}
|
|
7756
7756
|
},
|
|
7757
7757
|
setup(n) {
|
|
7758
|
-
const t = n, e = L(() =>
|
|
7758
|
+
const t = n, e = L(() => It(
|
|
7759
7759
|
"inline-flex",
|
|
7760
7760
|
"shrink-0",
|
|
7761
7761
|
"items-center",
|
|
@@ -8450,7 +8450,7 @@ const fE = /* @__PURE__ */ Co(wc), Xe = fE, og = {
|
|
|
8450
8450
|
red: {
|
|
8451
8451
|
low: {
|
|
8452
8452
|
backgroundColor: Xe.red[100],
|
|
8453
|
-
textColor: Xe.red[
|
|
8453
|
+
textColor: Xe.red[800],
|
|
8454
8454
|
borderColor: Xe.red[300]
|
|
8455
8455
|
},
|
|
8456
8456
|
high: {
|
|
@@ -8462,7 +8462,7 @@ const fE = /* @__PURE__ */ Co(wc), Xe = fE, og = {
|
|
|
8462
8462
|
orange: {
|
|
8463
8463
|
low: {
|
|
8464
8464
|
backgroundColor: Xe.orange[100],
|
|
8465
|
-
textColor: Xe.orange[
|
|
8465
|
+
textColor: Xe.orange[800],
|
|
8466
8466
|
borderColor: Xe.orange[300]
|
|
8467
8467
|
},
|
|
8468
8468
|
high: {
|
|
@@ -8474,7 +8474,7 @@ const fE = /* @__PURE__ */ Co(wc), Xe = fE, og = {
|
|
|
8474
8474
|
yellow: {
|
|
8475
8475
|
low: {
|
|
8476
8476
|
backgroundColor: Xe.yellow[100],
|
|
8477
|
-
textColor: Xe.yellow[
|
|
8477
|
+
textColor: Xe.yellow[800],
|
|
8478
8478
|
borderColor: Xe.yellow[300]
|
|
8479
8479
|
},
|
|
8480
8480
|
high: {
|
|
@@ -8486,7 +8486,7 @@ const fE = /* @__PURE__ */ Co(wc), Xe = fE, og = {
|
|
|
8486
8486
|
green: {
|
|
8487
8487
|
low: {
|
|
8488
8488
|
backgroundColor: Xe.green[100],
|
|
8489
|
-
textColor: Xe.green[
|
|
8489
|
+
textColor: Xe.green[800],
|
|
8490
8490
|
borderColor: Xe.green[300]
|
|
8491
8491
|
},
|
|
8492
8492
|
high: {
|
|
@@ -8498,7 +8498,7 @@ const fE = /* @__PURE__ */ Co(wc), Xe = fE, og = {
|
|
|
8498
8498
|
teal: {
|
|
8499
8499
|
low: {
|
|
8500
8500
|
backgroundColor: Xe.teal[100],
|
|
8501
|
-
textColor: Xe.teal[
|
|
8501
|
+
textColor: Xe.teal[800],
|
|
8502
8502
|
borderColor: Xe.teal[300]
|
|
8503
8503
|
},
|
|
8504
8504
|
high: {
|
|
@@ -8510,7 +8510,7 @@ const fE = /* @__PURE__ */ Co(wc), Xe = fE, og = {
|
|
|
8510
8510
|
cyan: {
|
|
8511
8511
|
low: {
|
|
8512
8512
|
backgroundColor: Xe.cyan[100],
|
|
8513
|
-
textColor: Xe.cyan[
|
|
8513
|
+
textColor: Xe.cyan[800],
|
|
8514
8514
|
borderColor: Xe.cyan[300]
|
|
8515
8515
|
},
|
|
8516
8516
|
high: {
|
|
@@ -8522,7 +8522,7 @@ const fE = /* @__PURE__ */ Co(wc), Xe = fE, og = {
|
|
|
8522
8522
|
blue: {
|
|
8523
8523
|
low: {
|
|
8524
8524
|
backgroundColor: Xe.blue[100],
|
|
8525
|
-
textColor: Xe.blue[
|
|
8525
|
+
textColor: Xe.blue[800],
|
|
8526
8526
|
borderColor: Xe.blue[300]
|
|
8527
8527
|
},
|
|
8528
8528
|
high: {
|
|
@@ -8534,7 +8534,7 @@ const fE = /* @__PURE__ */ Co(wc), Xe = fE, og = {
|
|
|
8534
8534
|
indigo: {
|
|
8535
8535
|
low: {
|
|
8536
8536
|
backgroundColor: Xe.indigo[100],
|
|
8537
|
-
textColor: Xe.indigo[
|
|
8537
|
+
textColor: Xe.indigo[800],
|
|
8538
8538
|
borderColor: Xe.indigo[300]
|
|
8539
8539
|
},
|
|
8540
8540
|
high: {
|
|
@@ -8546,7 +8546,7 @@ const fE = /* @__PURE__ */ Co(wc), Xe = fE, og = {
|
|
|
8546
8546
|
purple: {
|
|
8547
8547
|
low: {
|
|
8548
8548
|
backgroundColor: Xe.purple[100],
|
|
8549
|
-
textColor: Xe.purple[
|
|
8549
|
+
textColor: Xe.purple[800],
|
|
8550
8550
|
borderColor: Xe.purple[300]
|
|
8551
8551
|
},
|
|
8552
8552
|
high: {
|
|
@@ -8558,7 +8558,7 @@ const fE = /* @__PURE__ */ Co(wc), Xe = fE, og = {
|
|
|
8558
8558
|
pink: {
|
|
8559
8559
|
low: {
|
|
8560
8560
|
backgroundColor: Xe.pink[100],
|
|
8561
|
-
textColor: Xe.pink[
|
|
8561
|
+
textColor: Xe.pink[800],
|
|
8562
8562
|
borderColor: Xe.pink[300]
|
|
8563
8563
|
},
|
|
8564
8564
|
high: {
|
|
@@ -8600,33 +8600,46 @@ function Ms(n, t = !1) {
|
|
|
8600
8600
|
};
|
|
8601
8601
|
}
|
|
8602
8602
|
const Rd = /* @__PURE__ */ Se({
|
|
8603
|
+
inheritAttrs: !1,
|
|
8603
8604
|
__name: "BaseBadge",
|
|
8604
8605
|
props: {
|
|
8605
|
-
|
|
8606
|
+
class: { default: void 0 },
|
|
8607
|
+
contrast: { default: "low" },
|
|
8606
8608
|
color: { default: "gray" },
|
|
8607
|
-
size: { default: "
|
|
8609
|
+
size: { default: "md" },
|
|
8608
8610
|
icon: { default: void 0 },
|
|
8609
8611
|
wrap: { type: Boolean },
|
|
8610
8612
|
bordered: { type: Boolean }
|
|
8611
8613
|
},
|
|
8612
8614
|
setup(n) {
|
|
8613
|
-
const t = n, e = L(() => {
|
|
8614
|
-
const
|
|
8615
|
-
backgroundColor:
|
|
8616
|
-
color:
|
|
8615
|
+
const t = n, e = ["sm", "md", "lg"], r = L(() => {
|
|
8616
|
+
const l = Ms(t.color, t.contrast == "high"), s = {
|
|
8617
|
+
backgroundColor: l.backgroundColor,
|
|
8618
|
+
color: l.textColor
|
|
8617
8619
|
};
|
|
8618
|
-
return t.bordered && (
|
|
8619
|
-
}),
|
|
8620
|
-
|
|
8621
|
-
|
|
8622
|
-
|
|
8620
|
+
return t.bordered && (s.borderColor = l.borderColor, s.borderWidth = "1px", s.borderStyle = "solid"), s;
|
|
8621
|
+
}), i = L(() => e.includes(t.size) ? t.size : "md"), o = L(() => {
|
|
8622
|
+
const l = "inline-flex items-center rounded leading-tight", s = {
|
|
8623
|
+
sm: "px-1.5 py-px text-[10px]",
|
|
8624
|
+
md: "px-1.5 py-0.5 text-xs",
|
|
8625
|
+
lg: "px-1.5 py-0.5 text-sm"
|
|
8626
|
+
}[i.value], d = t.wrap ? "whitespace-nowrap" : "";
|
|
8627
|
+
return It(l, d, s, t.class);
|
|
8628
|
+
}), a = L(() => ({
|
|
8629
|
+
sm: "h-2.5 w-2.5 mr-1",
|
|
8630
|
+
md: "h-3 w-3 mr-1",
|
|
8631
|
+
lg: "h-4 w-4 mr-1"
|
|
8632
|
+
})[i.value]);
|
|
8633
|
+
return (l, s) => (B(), K("span", {
|
|
8634
|
+
class: de(T(o)),
|
|
8635
|
+
style: ot(T(r))
|
|
8623
8636
|
}, [
|
|
8624
|
-
|
|
8637
|
+
l.icon ? (B(), De(T(rt), {
|
|
8625
8638
|
key: 0,
|
|
8626
|
-
icon:
|
|
8627
|
-
class: de(["shrink-0", T(
|
|
8639
|
+
icon: l.icon,
|
|
8640
|
+
class: de(["shrink-0", T(a)])
|
|
8628
8641
|
}, null, 8, ["icon", "class"])) : ke("", !0),
|
|
8629
|
-
Pe(
|
|
8642
|
+
Pe(l.$slots, "default")
|
|
8630
8643
|
], 6));
|
|
8631
8644
|
}
|
|
8632
8645
|
}), pE = /* @__PURE__ */ Se({
|
|
@@ -9113,7 +9126,7 @@ const DE = {
|
|
|
9113
9126
|
"slate-200-outline": "btn-slate-200-outline"
|
|
9114
9127
|
}, o = L(() => t.icon && AE(e.default)), a = L(() => {
|
|
9115
9128
|
const c = ["btn"];
|
|
9116
|
-
return t.color && (t.color in i ? c.push(i[t.color]) : c.push("hover:opacity-80")), t.size && c.push(r[t.size]), o.value && c.push("p-0 aspect-1 justify-center"),
|
|
9129
|
+
return t.color && (t.color in i ? c.push(i[t.color]) : c.push("hover:opacity-80")), t.size && c.push(r[t.size]), o.value && c.push("p-0 aspect-1 justify-center"), It(c, t.class);
|
|
9117
9130
|
}), l = L(() => {
|
|
9118
9131
|
if (t.color && !(t.color in i)) {
|
|
9119
9132
|
const c = Ms(t.color);
|
|
@@ -9266,14 +9279,14 @@ const DE = {
|
|
|
9266
9279
|
xs: "gap-0.5",
|
|
9267
9280
|
sm: "gap-1",
|
|
9268
9281
|
md: "gap-1.5"
|
|
9269
|
-
}[o.value]),
|
|
9282
|
+
}[o.value]), It(
|
|
9270
9283
|
f,
|
|
9271
9284
|
p,
|
|
9272
9285
|
e.class
|
|
9273
9286
|
);
|
|
9274
9287
|
}), h = L(() => {
|
|
9275
9288
|
const f = e.spacing ? "whitespace-nowrap" : "";
|
|
9276
|
-
return
|
|
9289
|
+
return It([
|
|
9277
9290
|
f,
|
|
9278
9291
|
e.twButton
|
|
9279
9292
|
]);
|
|
@@ -9343,7 +9356,7 @@ const DE = {
|
|
|
9343
9356
|
class: { type: [Array, String, null, Number, Boolean], default: "" }
|
|
9344
9357
|
},
|
|
9345
9358
|
setup(n) {
|
|
9346
|
-
const t = n, e = L(() => t.size == "xs" ? "md:p-3 p-2" : t.size == "sm" ? "md:p-4 p-3" : t.size == "lg" ? "md:p-8 p-6" : "md:p-6 px-4 py-5"), r = L(() =>
|
|
9359
|
+
const t = n, e = L(() => t.size == "xs" ? "md:p-3 p-2" : t.size == "sm" ? "md:p-4 p-3" : t.size == "lg" ? "md:p-8 p-6" : "md:p-6 px-4 py-5"), r = L(() => It(
|
|
9347
9360
|
"border-t border-slate-300 first:border-t-0",
|
|
9348
9361
|
e.value,
|
|
9349
9362
|
t.class
|
|
@@ -10768,7 +10781,7 @@ class s_ {
|
|
|
10768
10781
|
return this.func(is(t, e, r, i));
|
|
10769
10782
|
}
|
|
10770
10783
|
}
|
|
10771
|
-
function
|
|
10784
|
+
function Pt(n) {
|
|
10772
10785
|
return typeof n == "object" && n ? new XS(n) : typeof n == "string" ? new l_(n) : typeof n == "function" ? new s_(n) : null;
|
|
10773
10786
|
}
|
|
10774
10787
|
const Yh = {
|
|
@@ -10785,7 +10798,7 @@ const Yh = {
|
|
|
10785
10798
|
scrollTimeReset: Boolean,
|
|
10786
10799
|
slotMinTime: St,
|
|
10787
10800
|
slotMaxTime: St,
|
|
10788
|
-
dayPopoverFormat:
|
|
10801
|
+
dayPopoverFormat: Pt,
|
|
10789
10802
|
slotDuration: St,
|
|
10790
10803
|
snapDuration: St,
|
|
10791
10804
|
headerToolbar: _e,
|
|
@@ -10794,7 +10807,7 @@ const Yh = {
|
|
|
10794
10807
|
titleRangeSeparator: String,
|
|
10795
10808
|
forceEventDuration: Boolean,
|
|
10796
10809
|
dayHeaders: Boolean,
|
|
10797
|
-
dayHeaderFormat:
|
|
10810
|
+
dayHeaderFormat: Pt,
|
|
10798
10811
|
dayHeaderClassNames: _e,
|
|
10799
10812
|
dayHeaderContent: _e,
|
|
10800
10813
|
dayHeaderDidMount: _e,
|
|
@@ -10845,7 +10858,7 @@ const Yh = {
|
|
|
10845
10858
|
height: _e,
|
|
10846
10859
|
contentHeight: _e,
|
|
10847
10860
|
direction: String,
|
|
10848
|
-
weekNumberFormat:
|
|
10861
|
+
weekNumberFormat: Pt,
|
|
10849
10862
|
eventResizableFromStart: Boolean,
|
|
10850
10863
|
displayEventTime: Boolean,
|
|
10851
10864
|
displayEventEnd: Boolean,
|
|
@@ -10901,7 +10914,7 @@ const Yh = {
|
|
|
10901
10914
|
allDayWillUnmount: _e,
|
|
10902
10915
|
slotMinWidth: Number,
|
|
10903
10916
|
navLinks: Boolean,
|
|
10904
|
-
eventTimeFormat:
|
|
10917
|
+
eventTimeFormat: Pt,
|
|
10905
10918
|
rerenderDelay: Number,
|
|
10906
10919
|
moreLinkText: _e,
|
|
10907
10920
|
moreLinkHint: _e,
|
|
@@ -10938,7 +10951,7 @@ const Yh = {
|
|
|
10938
10951
|
moreLinkContent: _e,
|
|
10939
10952
|
moreLinkDidMount: _e,
|
|
10940
10953
|
moreLinkWillUnmount: _e,
|
|
10941
|
-
monthStartFormat:
|
|
10954
|
+
monthStartFormat: Pt,
|
|
10942
10955
|
// for connectors
|
|
10943
10956
|
// (can't be part of plugin system b/c must be provided at runtime)
|
|
10944
10957
|
handleCustomRendering: _e,
|
|
@@ -12434,7 +12447,7 @@ class Gt {
|
|
|
12434
12447
|
i == null && (i = this._context.options.allDayMaintainDuration), this._def.allDay !== t && (r.hasEnd = i), this.mutate({ standardProps: r });
|
|
12435
12448
|
}
|
|
12436
12449
|
formatRange(t) {
|
|
12437
|
-
let { dateEnv: e } = this._context, r = this._instance, i =
|
|
12450
|
+
let { dateEnv: e } = this._context, r = this._instance, i = Pt(t);
|
|
12438
12451
|
return this._def.hasEnd ? e.formatRange(r.range.start, r.range.end, i, {
|
|
12439
12452
|
forcedStartTzo: r.forcedStartTzo,
|
|
12440
12453
|
forcedEndTzo: r.forcedEndTzo
|
|
@@ -13032,12 +13045,12 @@ class kk {
|
|
|
13032
13045
|
// -----------------------------------------------------------------------------------------------------------------
|
|
13033
13046
|
formatDate(t, e) {
|
|
13034
13047
|
let { dateEnv: r } = this.getCurrentData();
|
|
13035
|
-
return r.format(r.createMarker(t),
|
|
13048
|
+
return r.format(r.createMarker(t), Pt(e));
|
|
13036
13049
|
}
|
|
13037
13050
|
// `settings` is for formatter AND isEndExclusive
|
|
13038
13051
|
formatRange(t, e, r) {
|
|
13039
13052
|
let { dateEnv: i } = this.getCurrentData();
|
|
13040
|
-
return i.formatRange(i.createMarker(t), i.createMarker(e),
|
|
13053
|
+
return i.formatRange(i.createMarker(t), i.createMarker(e), Pt(r), r);
|
|
13041
13054
|
}
|
|
13042
13055
|
formatIso(t, e) {
|
|
13043
13056
|
let { dateEnv: r } = this.getCurrentData();
|
|
@@ -13297,7 +13310,7 @@ function zs(n, t) {
|
|
|
13297
13310
|
];
|
|
13298
13311
|
return n.isDisabled ? e.push("fc-day-disabled") : (n.isToday && (e.push("fc-day-today"), e.push(t.getClass("today"))), n.isPast && e.push("fc-day-past"), n.isFuture && e.push("fc-day-future"), n.isOther && e.push("fc-day-other")), e;
|
|
13299
13312
|
}
|
|
13300
|
-
const Mk =
|
|
13313
|
+
const Mk = Pt({ year: "numeric", month: "long", day: "numeric" }), Ik = Pt({ week: "long" });
|
|
13301
13314
|
function So(n, t, e = "day", r = !0) {
|
|
13302
13315
|
const { dateEnv: i, options: o, calendarApi: a } = n;
|
|
13303
13316
|
let l = i.format(t, e === "week" ? Ik : Mk);
|
|
@@ -13714,7 +13727,7 @@ class Vk {
|
|
|
13714
13727
|
}
|
|
13715
13728
|
const of = {};
|
|
13716
13729
|
function Wk(n, t) {
|
|
13717
|
-
return !n || t > 10 ?
|
|
13730
|
+
return !n || t > 10 ? Pt({ weekday: "short" }) : t > 1 ? Pt({ weekday: "short", month: "numeric", day: "numeric", omitCommas: !0 }) : Pt({ weekday: "long" });
|
|
13718
13731
|
}
|
|
13719
13732
|
const uv = "fc-col-header-cell";
|
|
13720
13733
|
function cv(n) {
|
|
@@ -13729,7 +13742,7 @@ class Gk extends Tt {
|
|
|
13729
13742
|
] })));
|
|
13730
13743
|
}
|
|
13731
13744
|
}
|
|
13732
|
-
const Yk =
|
|
13745
|
+
const Yk = Pt({ weekday: "long" });
|
|
13733
13746
|
class Kk extends Tt {
|
|
13734
13747
|
render() {
|
|
13735
13748
|
let { props: t } = this, { dateEnv: e, theme: r, viewApi: i, options: o } = this.context, a = fn(/* @__PURE__ */ new Date(2592e5), t.dow), l = {
|
|
@@ -14398,7 +14411,7 @@ const sf = (n) => te(Vr.Consumer, null, (t) => {
|
|
|
14398
14411
|
view: t.viewApi
|
|
14399
14412
|
};
|
|
14400
14413
|
return te(Cn, Object.assign({}, n, { elTag: n.elTag || "div", renderProps: r, generatorName: "nowIndicatorContent", customGenerator: e.nowIndicatorContent, classNameGenerator: e.nowIndicatorClassNames, didMount: e.nowIndicatorDidMount, willUnmount: e.nowIndicatorWillUnmount }));
|
|
14401
|
-
}), pA =
|
|
14414
|
+
}), pA = Pt({ day: "numeric" });
|
|
14402
14415
|
class uf extends Tt {
|
|
14403
14416
|
constructor() {
|
|
14404
14417
|
super(...arguments), this.refineRenderProps = Bl(mA);
|
|
@@ -15450,7 +15463,7 @@ class wC {
|
|
|
15450
15463
|
}
|
|
15451
15464
|
function xC(n, t, e) {
|
|
15452
15465
|
let r;
|
|
15453
|
-
return /^(year|month)$/.test(n.currentRangeUnit) ? r = n.currentRange : r = n.activeRange, e.formatRange(r.start, r.end,
|
|
15466
|
+
return /^(year|month)$/.test(n.currentRangeUnit) ? r = n.currentRange : r = n.activeRange, e.formatRange(r.start, r.end, Pt(t.titleFormat || EC(n)), {
|
|
15454
15467
|
isEndExclusive: n.isRangeAllDay,
|
|
15455
15468
|
defaultSeparator: t.titleRangeSeparator
|
|
15456
15469
|
});
|
|
@@ -16158,7 +16171,7 @@ function pp(n, t) {
|
|
|
16158
16171
|
e[r] = null;
|
|
16159
16172
|
return e;
|
|
16160
16173
|
}
|
|
16161
|
-
const Pv =
|
|
16174
|
+
const Pv = Pt({
|
|
16162
16175
|
hour: "numeric",
|
|
16163
16176
|
minute: "2-digit",
|
|
16164
16177
|
omitZeroMinute: !0,
|
|
@@ -16214,7 +16227,7 @@ function ZC(n) {
|
|
|
16214
16227
|
t.push(r.seg), r.isVisible || e.push(r.seg);
|
|
16215
16228
|
return { allSegs: t, invisibleSegs: e };
|
|
16216
16229
|
}
|
|
16217
|
-
const XC =
|
|
16230
|
+
const XC = Pt({ week: "narrow" });
|
|
16218
16231
|
class JC extends Xn {
|
|
16219
16232
|
constructor() {
|
|
16220
16233
|
super(...arguments), this.rootElRef = yn(), this.state = {
|
|
@@ -17729,7 +17742,7 @@ class LT extends Ok {
|
|
|
17729
17742
|
return t.allDay ? lk(t) ? ["timed", "allDay"] : ["allDay"] : ["timed"];
|
|
17730
17743
|
}
|
|
17731
17744
|
}
|
|
17732
|
-
const zT =
|
|
17745
|
+
const zT = Pt({
|
|
17733
17746
|
hour: "numeric",
|
|
17734
17747
|
minute: "2-digit",
|
|
17735
17748
|
omitZeroMinute: !0,
|
|
@@ -17746,7 +17759,7 @@ function Jv(n) {
|
|
|
17746
17759
|
return te("td", { className: t.join(" "), "data-time": n.isoTimeStr });
|
|
17747
17760
|
let { dateEnv: r, options: i, viewApi: o } = e, a = (
|
|
17748
17761
|
// TODO: fully pre-parse
|
|
17749
|
-
i.slotLabelFormat == null ? zT : Array.isArray(i.slotLabelFormat) ?
|
|
17762
|
+
i.slotLabelFormat == null ? zT : Array.isArray(i.slotLabelFormat) ? Pt(i.slotLabelFormat[0]) : Pt(i.slotLabelFormat)
|
|
17750
17763
|
), l = {
|
|
17751
17764
|
level: 0,
|
|
17752
17765
|
time: n.time,
|
|
@@ -17778,7 +17791,7 @@ class FT extends Tt {
|
|
|
17778
17791
|
));
|
|
17779
17792
|
}
|
|
17780
17793
|
}
|
|
17781
|
-
const $T =
|
|
17794
|
+
const $T = Pt({ week: "short" }), HT = 5;
|
|
17782
17795
|
class qT extends Xn {
|
|
17783
17796
|
constructor() {
|
|
17784
17797
|
super(...arguments), this.allDaySplitter = new LT(), this.headerElRef = yn(), this.rootElRef = yn(), this.scrollerElRef = yn(), this.state = {
|
|
@@ -18267,7 +18280,7 @@ function i2(n, t, e, r) {
|
|
|
18267
18280
|
s.push({ seg: d, rect: null });
|
|
18268
18281
|
return { segPlacements: s, hiddenGroups: l };
|
|
18269
18282
|
}
|
|
18270
|
-
const o2 =
|
|
18283
|
+
const o2 = Pt({
|
|
18271
18284
|
hour: "numeric",
|
|
18272
18285
|
minute: "2-digit",
|
|
18273
18286
|
meridiem: !1
|
|
@@ -18668,7 +18681,7 @@ function E2(n) {
|
|
|
18668
18681
|
te("a", Object.assign({ "aria-hidden": !0, className: "fc-list-day-side-text" }, n.sideNavLinkAttrs), n.sideText)
|
|
18669
18682
|
);
|
|
18670
18683
|
}
|
|
18671
|
-
const S2 =
|
|
18684
|
+
const S2 = Pt({
|
|
18672
18685
|
hour: "numeric",
|
|
18673
18686
|
minute: "2-digit",
|
|
18674
18687
|
meridiem: "short"
|
|
@@ -18837,7 +18850,7 @@ const I2 = {
|
|
|
18837
18850
|
// noEventsText is defined in base options
|
|
18838
18851
|
};
|
|
18839
18852
|
function wp(n) {
|
|
18840
|
-
return n === !1 ? null :
|
|
18853
|
+
return n === !1 ? null : Pt(n);
|
|
18841
18854
|
}
|
|
18842
18855
|
var N2 = mr({
|
|
18843
18856
|
name: "@fullcalendar/list",
|
|
@@ -19019,12 +19032,12 @@ function z2(n, t, e, r, i) {
|
|
|
19019
19032
|
}
|
|
19020
19033
|
return s;
|
|
19021
19034
|
}
|
|
19022
|
-
const j2 =
|
|
19035
|
+
const j2 = Pt({ year: "numeric", month: "long" }), F2 = Pt({ month: "long" });
|
|
19023
19036
|
function $2(n, t) {
|
|
19024
19037
|
return n || (t[0].currentRange.start.getUTCFullYear() !== t[t.length - 1].currentRange.start.getUTCFullYear() ? j2 : F2);
|
|
19025
19038
|
}
|
|
19026
19039
|
const H2 = {
|
|
19027
|
-
multiMonthTitleFormat:
|
|
19040
|
+
multiMonthTitleFormat: Pt,
|
|
19028
19041
|
multiMonthMaxColumns: Number,
|
|
19029
19042
|
multiMonthMinWidth: Number
|
|
19030
19043
|
};
|
|
@@ -20633,7 +20646,7 @@ const fD = {
|
|
|
20633
20646
|
default: ge(() => [
|
|
20634
20647
|
n.modelValue ? (B(), K("div", {
|
|
20635
20648
|
key: 0,
|
|
20636
|
-
class: de(T(
|
|
20649
|
+
class: de(T(It)(
|
|
20637
20650
|
"fixed inset-0 bg-slate-200 bg-opacity-40 transition-opacity",
|
|
20638
20651
|
n.twBackdrop
|
|
20639
20652
|
)),
|
|
@@ -23455,7 +23468,7 @@ const RO = { class: "grow" }, MO = {
|
|
|
23455
23468
|
style: ot({
|
|
23456
23469
|
width: `${n.width}px`
|
|
23457
23470
|
}),
|
|
23458
|
-
class: de(T(
|
|
23471
|
+
class: de(T(It)("rounded-md bg-white p-1 shadow-2xl outline-none ring-1 ring-black ring-opacity-10 focus:outline-none", n.twMenu))
|
|
23459
23472
|
}, {
|
|
23460
23473
|
default: ge(() => [
|
|
23461
23474
|
Pe(o.$slots, "items", { items: n.items }, () => [
|
|
@@ -23825,7 +23838,7 @@ const RO = { class: "grow" }, MO = {
|
|
|
23825
23838
|
}, {
|
|
23826
23839
|
default: ge(() => [
|
|
23827
23840
|
jn(j("div", {
|
|
23828
|
-
class: de(T(
|
|
23841
|
+
class: de(T(It)(
|
|
23829
23842
|
"fixed inset-0 bg-slate-200 bg-opacity-40 transition-opacity",
|
|
23830
23843
|
n.twBackdrop
|
|
23831
23844
|
)),
|
|
@@ -26361,8 +26374,8 @@ function bM(n, t) {
|
|
|
26361
26374
|
Ue.appendChild(_("flatpickr-day", new Date(V, Q, Ge), Ge, at));
|
|
26362
26375
|
for (var kt = je + 1; kt <= 42 - fe && (e.config.showMonths === 1 || at % 7 !== 0); kt++, at++)
|
|
26363
26376
|
Ue.appendChild(_("flatpickr-day " + yt, new Date(V, Q + 1, kt % je), kt, at));
|
|
26364
|
-
var
|
|
26365
|
-
return
|
|
26377
|
+
var Nt = Dt("div", "dayContainer");
|
|
26378
|
+
return Nt.appendChild(Ue), Nt;
|
|
26366
26379
|
}
|
|
26367
26380
|
function C() {
|
|
26368
26381
|
if (e.daysContainer !== void 0) {
|
|
@@ -26638,8 +26651,8 @@ function bM(n, t) {
|
|
|
26638
26651
|
return pn;
|
|
26639
26652
|
}), kt = at.indexOf(Q);
|
|
26640
26653
|
if (kt !== -1) {
|
|
26641
|
-
var
|
|
26642
|
-
V.preventDefault(), (
|
|
26654
|
+
var Nt = at[kt + (V.shiftKey ? -1 : 1)];
|
|
26655
|
+
V.preventDefault(), (Nt || e._input).focus();
|
|
26643
26656
|
}
|
|
26644
26657
|
} else
|
|
26645
26658
|
!e.config.noCalendar && e.daysContainer && e.daysContainer.contains(Q) && V.shiftKey && (V.preventDefault(), e._input.focus());
|
|
@@ -26665,7 +26678,7 @@ function bM(n, t) {
|
|
|
26665
26678
|
re(new Date(Ge), !0) || (st = st || Ge > je && Ge < Ue, Ge < Ae && (!Ze || Ge > Ze) ? Ze = Ge : Ge > Ae && (!yt || Ge < yt) && (yt = Ge));
|
|
26666
26679
|
var at = Array.from(e.rContainer.querySelectorAll("*:nth-child(-n+" + e.config.showMonths + ") > ." + Q));
|
|
26667
26680
|
at.forEach(function(kt) {
|
|
26668
|
-
var
|
|
26681
|
+
var Nt = kt.dateObj, pn = Nt.getTime(), Tr = Ze > 0 && pn < Ze || yt > 0 && pn > yt;
|
|
26669
26682
|
if (Tr) {
|
|
26670
26683
|
kt.classList.add("notAllowed"), ["inRange", "startRange", "endRange"].forEach(function(gr) {
|
|
26671
26684
|
kt.classList.remove(gr);
|
|
@@ -26805,8 +26818,8 @@ function bM(n, t) {
|
|
|
26805
26818
|
return wn + jo.offsetHeight;
|
|
26806
26819
|
}, 0), Ae = e.calendarContainer.offsetWidth, je = e.config.position.split(" "), Ue = je[0], st = je.length > 1 ? je[1] : null, Ze = Q.getBoundingClientRect(), yt = window.innerHeight - Ze.bottom, Ge = Ue === "above" || Ue !== "below" && yt < fe && Ze.top > fe, at = window.pageYOffset + Ze.top + (Ge ? -fe - 2 : Q.offsetHeight + 2);
|
|
26807
26820
|
if (Dn(e.calendarContainer, "arrowTop", !Ge), Dn(e.calendarContainer, "arrowBottom", Ge), !e.config.inline) {
|
|
26808
|
-
var kt = window.pageXOffset + Ze.left,
|
|
26809
|
-
st === "center" ? (kt -= (Ae - Ze.width) / 2,
|
|
26821
|
+
var kt = window.pageXOffset + Ze.left, Nt = !1, pn = !1;
|
|
26822
|
+
st === "center" ? (kt -= (Ae - Ze.width) / 2, Nt = !0) : st === "right" && (kt -= Ae - Ze.width, pn = !0), Dn(e.calendarContainer, "arrowLeft", !Nt && !pn), Dn(e.calendarContainer, "arrowCenter", Nt), Dn(e.calendarContainer, "arrowRight", pn);
|
|
26810
26823
|
var Tr = window.document.body.offsetWidth - (window.pageXOffset + Ze.right), gr = kt + Ae > window.document.body.offsetWidth, Io = Tr + Ae > window.document.body.offsetWidth;
|
|
26811
26824
|
if (Dn(e.calendarContainer, "rightMost", gr), !e.config.static)
|
|
26812
26825
|
if (e.calendarContainer.style.top = at + "px", !gr)
|
|
@@ -27365,7 +27378,7 @@ const EM = ["disabled", "placeholder"], SM = {
|
|
|
27365
27378
|
sm: "pl-[2.1rem] pr-6",
|
|
27366
27379
|
md: "pl-10 pr-7"
|
|
27367
27380
|
}[a.value], C = e.modelValue ? S : "pr-0";
|
|
27368
|
-
return
|
|
27381
|
+
return It(
|
|
27369
27382
|
_,
|
|
27370
27383
|
k,
|
|
27371
27384
|
E,
|
|
@@ -27381,13 +27394,13 @@ const EM = ["disabled", "placeholder"], SM = {
|
|
|
27381
27394
|
sm: "pl-2.5",
|
|
27382
27395
|
md: "pl-3"
|
|
27383
27396
|
}[a.value];
|
|
27384
|
-
return
|
|
27397
|
+
return It(
|
|
27385
27398
|
_,
|
|
27386
27399
|
k
|
|
27387
27400
|
);
|
|
27388
27401
|
}), x = L(() => {
|
|
27389
27402
|
const _ = "", k = i.value ? "text-red-500" : "text-slate-500", E = fr[a.value];
|
|
27390
|
-
return
|
|
27403
|
+
return It(
|
|
27391
27404
|
_,
|
|
27392
27405
|
k,
|
|
27393
27406
|
E.iconSize
|
|
@@ -29370,7 +29383,7 @@ const BM = /* @__PURE__ */ Co(PM), LM = { class: "text-xs text-slate-600" }, Yy
|
|
|
29370
29383
|
sm: "min-h-control-sm gap-0.5 p-0.5",
|
|
29371
29384
|
md: "min-h-control-md gap-1 p-1"
|
|
29372
29385
|
}[l.value], G = v.value ? "input-focus border-blue-300" : "";
|
|
29373
|
-
return
|
|
29386
|
+
return It(F, se, ie, G, r.twContainer);
|
|
29374
29387
|
}), ne = L(() => ({
|
|
29375
29388
|
xs: "h-[calc(theme(spacing.control-xs)_-_theme(spacing[0.5])_-_theme(spacing[0.5])_-_2px)]",
|
|
29376
29389
|
sm: "h-[calc(theme(spacing.control-sm)_-_theme(spacing[0.5])_-_theme(spacing[0.5])_-_2px)]",
|
|
@@ -29395,14 +29408,14 @@ const BM = /* @__PURE__ */ Co(PM), LM = { class: "text-xs text-slate-600" }, Yy
|
|
|
29395
29408
|
let ue = "bg-slate-200 border-slate-300";
|
|
29396
29409
|
y.value && y.value.value == F.value && (ue = "bg-red-200 border-red-300 text-red-800");
|
|
29397
29410
|
const re = r.disabled ? "cursor-not-allowed opacity-60" : "";
|
|
29398
|
-
return
|
|
29411
|
+
return It(se, ne.value, G, ue, re, ie);
|
|
29399
29412
|
}, q = L(() => {
|
|
29400
29413
|
const F = "flex shrink-0 appearance-none items-center justify-center border-0 bg-transparent outline-none", se = {
|
|
29401
29414
|
xs: "pl-1 pr-2",
|
|
29402
29415
|
sm: "pl-1 pr-2",
|
|
29403
29416
|
md: "pl-1 pr-3"
|
|
29404
29417
|
}[l.value], ie = r.disabled ? "cursor-not-allowed opacity-60" : "";
|
|
29405
|
-
return
|
|
29418
|
+
return It(F, se, ie);
|
|
29406
29419
|
});
|
|
29407
29420
|
return t({
|
|
29408
29421
|
focus: R,
|
|
@@ -29818,7 +29831,7 @@ const BM = /* @__PURE__ */ Co(PM), LM = { class: "text-xs text-slate-600" }, Yy
|
|
|
29818
29831
|
type: Boolean
|
|
29819
29832
|
}
|
|
29820
29833
|
},
|
|
29821
|
-
emits: ["update:modelValue"],
|
|
29834
|
+
emits: ["update:modelValue", "blur", "focus"],
|
|
29822
29835
|
setup(n, { expose: t, emit: e }) {
|
|
29823
29836
|
const r = n, { nameInternal: i, requiredInternal: o, hasErrorInternal: a, emitUpdate: l, sizeInternal: s } = Mn({
|
|
29824
29837
|
name: L(() => r.name),
|
|
@@ -29848,7 +29861,7 @@ const BM = /* @__PURE__ */ Co(PM), LM = { class: "text-xs text-slate-600" }, Yy
|
|
|
29848
29861
|
sm: "p-2.5",
|
|
29849
29862
|
md: "p-3"
|
|
29850
29863
|
}[s.value];
|
|
29851
|
-
return
|
|
29864
|
+
return It(g, m, y, v, b.fontSize, u, r.class);
|
|
29852
29865
|
});
|
|
29853
29866
|
return t({
|
|
29854
29867
|
focus: h,
|
|
@@ -29865,7 +29878,9 @@ const BM = /* @__PURE__ */ Co(PM), LM = { class: "text-xs text-slate-600" }, Yy
|
|
|
29865
29878
|
rows: n.rows,
|
|
29866
29879
|
autocomplete: n.autocomplete ? "on" : "off",
|
|
29867
29880
|
class: de(T(p)),
|
|
29868
|
-
onInput: m[0] || (m[0] = (v) => T(l)(d(v)))
|
|
29881
|
+
onInput: m[0] || (m[0] = (v) => T(l)(d(v))),
|
|
29882
|
+
onBlur: m[1] || (m[1] = (v) => g.$emit("blur")),
|
|
29883
|
+
onFocus: m[2] || (m[2] = (v) => g.$emit("focus"))
|
|
29869
29884
|
}, null, 42, GM));
|
|
29870
29885
|
}
|
|
29871
29886
|
}), YM = ["data-name"], KM = { class: "space-y-2" }, QM = /* @__PURE__ */ Se({
|
|
@@ -30239,14 +30254,14 @@ const JM = ["disabled"], eI = ["accept", "multiple"], _f = /* @__PURE__ */ Se({
|
|
|
30239
30254
|
default: ge(() => [
|
|
30240
30255
|
T(r) ? (B(), K("div", tI, [
|
|
30241
30256
|
j("div", {
|
|
30242
|
-
class: de(T(
|
|
30257
|
+
class: de(T(It)("absolute h-full w-full bg-white", n.twBackdrop))
|
|
30243
30258
|
}, null, 2),
|
|
30244
30259
|
n.size == "sm" ? (B(), De(Xm, {
|
|
30245
30260
|
key: 0,
|
|
30246
|
-
class: de(T(
|
|
30261
|
+
class: de(T(It)("h-10 w-10 text-blue-500", n.twIcon))
|
|
30247
30262
|
}, null, 8, ["class"])) : n.size == "lg" ? (B(), De($y, {
|
|
30248
30263
|
key: 1,
|
|
30249
|
-
class: de(T(
|
|
30264
|
+
class: de(T(It)("h-10 w-10 text-blue-500", n.twIcon))
|
|
30250
30265
|
}, null, 8, ["class"])) : ke("", !0)
|
|
30251
30266
|
])) : ke("", !0)
|
|
30252
30267
|
]),
|
|
@@ -30571,7 +30586,7 @@ const sI = { class: "absolute z-[1] inset-0 flex h-full w-full items-center just
|
|
|
30571
30586
|
T(a) && n.showLoadingMask ? Pe(k.$slots, "loading", { key: 0 }, () => [
|
|
30572
30587
|
j("div", sI, [
|
|
30573
30588
|
j("div", {
|
|
30574
|
-
class: de(["absolute inset-0 h-full w-full", T(
|
|
30589
|
+
class: de(["absolute inset-0 h-full w-full", T(It)("bg-white opacity-80", n.twLoadingMask)])
|
|
30575
30590
|
}, null, 2),
|
|
30576
30591
|
uI
|
|
30577
30592
|
])
|
|
@@ -33703,7 +33718,7 @@ const Rf = /* @__PURE__ */ Se({
|
|
|
33703
33718
|
"flex flex-col top-0 left-0 w-full",
|
|
33704
33719
|
o.value
|
|
33705
33720
|
];
|
|
33706
|
-
return r.value && g.push("overflow-y-auto"),
|
|
33721
|
+
return r.value && g.push("overflow-y-auto"), It(g, t.class);
|
|
33707
33722
|
}), l = oe(null), s = Yb(l), d = L(() => e.height.value - s.top.value), c = oe(!1);
|
|
33708
33723
|
function h() {
|
|
33709
33724
|
c.value ? p() : f();
|
|
@@ -42132,7 +42147,7 @@ ys.exports;
|
|
|
42132
42147
|
return ce[O] = vt && W === void 0 ? r : W, this;
|
|
42133
42148
|
}
|
|
42134
42149
|
st.prototype.clear = Ze, st.prototype.delete = yt, st.prototype.get = Ge, st.prototype.has = at, st.prototype.set = kt;
|
|
42135
|
-
function
|
|
42150
|
+
function Nt(O) {
|
|
42136
42151
|
var W = -1, ce = O ? O.length : 0;
|
|
42137
42152
|
for (this.clear(); ++W < ce; ) {
|
|
42138
42153
|
var Re = O[W];
|
|
@@ -42160,7 +42175,7 @@ ys.exports;
|
|
|
42160
42175
|
var ce = this.__data__, Re = Qi(ce, O);
|
|
42161
42176
|
return Re < 0 ? ce.push([O, W]) : ce[Re][1] = W, this;
|
|
42162
42177
|
}
|
|
42163
|
-
|
|
42178
|
+
Nt.prototype.clear = pn, Nt.prototype.delete = Tr, Nt.prototype.get = gr, Nt.prototype.has = Io, Nt.prototype.set = vi;
|
|
42164
42179
|
function cn(O) {
|
|
42165
42180
|
var W = -1, ce = O ? O.length : 0;
|
|
42166
42181
|
for (this.clear(); ++W < ce; ) {
|
|
@@ -42171,7 +42186,7 @@ ys.exports;
|
|
|
42171
42186
|
function No() {
|
|
42172
42187
|
this.__data__ = {
|
|
42173
42188
|
hash: new st(),
|
|
42174
|
-
map: new (Ve ||
|
|
42189
|
+
map: new (Ve || Nt)(),
|
|
42175
42190
|
string: new st()
|
|
42176
42191
|
};
|
|
42177
42192
|
}
|
|
@@ -42189,10 +42204,10 @@ ys.exports;
|
|
|
42189
42204
|
}
|
|
42190
42205
|
cn.prototype.clear = No, cn.prototype.delete = Po, cn.prototype.get = Bo, cn.prototype.has = Lo, cn.prototype.set = zo;
|
|
42191
42206
|
function wn(O) {
|
|
42192
|
-
this.__data__ = new
|
|
42207
|
+
this.__data__ = new Nt(O);
|
|
42193
42208
|
}
|
|
42194
42209
|
function jo() {
|
|
42195
|
-
this.__data__ = new
|
|
42210
|
+
this.__data__ = new Nt();
|
|
42196
42211
|
}
|
|
42197
42212
|
function Qs(O) {
|
|
42198
42213
|
return this.__data__.delete(O);
|
|
@@ -42205,7 +42220,7 @@ ys.exports;
|
|
|
42205
42220
|
}
|
|
42206
42221
|
function Js(O, W) {
|
|
42207
42222
|
var ce = this.__data__;
|
|
42208
|
-
if (ce instanceof
|
|
42223
|
+
if (ce instanceof Nt) {
|
|
42209
42224
|
var Re = ce.__data__;
|
|
42210
42225
|
if (!Ve || Re.length < e - 1)
|
|
42211
42226
|
return Re.push([O, W]), this;
|
|
@@ -42548,7 +42563,7 @@ bs.exports;
|
|
|
42548
42563
|
}(), Ie = ee.toString, Qe = RegExp(
|
|
42549
42564
|
"^" + U.call(ae).replace(q, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
42550
42565
|
), Ye = J ? re.Buffer : void 0, $e = re.Symbol, ct = re.Uint8Array, Le = ee.propertyIsEnumerable, Ve = I.splice, Ne = $e ? $e.toStringTag : void 0, We = Object.getOwnPropertySymbols, Ke = Ye ? Ye.isBuffer : void 0, vt = Te(Object.keys, Object), Rt = Dr(re, "DataView"), V = Dr(re, "Map"), Q = Dr(re, "Promise"), fe = Dr(re, "Set"), Ae = Dr(re, "WeakMap"), je = Dr(Object, "create"), Ue = Tn(Rt), st = Tn(V), Ze = Tn(Q), yt = Tn(fe), Ge = Tn(Ae), at = $e ? $e.prototype : void 0, kt = at ? at.valueOf : void 0;
|
|
42551
|
-
function
|
|
42566
|
+
function Nt(O) {
|
|
42552
42567
|
var W = -1, ce = O == null ? 0 : O.length;
|
|
42553
42568
|
for (this.clear(); ++W < ce; ) {
|
|
42554
42569
|
var Re = O[W];
|
|
@@ -42578,7 +42593,7 @@ bs.exports;
|
|
|
42578
42593
|
var ce = this.__data__;
|
|
42579
42594
|
return this.size += this.has(O) ? 0 : 1, ce[O] = je && W === void 0 ? r : W, this;
|
|
42580
42595
|
}
|
|
42581
|
-
|
|
42596
|
+
Nt.prototype.clear = pn, Nt.prototype.delete = Tr, Nt.prototype.get = gr, Nt.prototype.has = Io, Nt.prototype.set = vi;
|
|
42582
42597
|
function cn(O) {
|
|
42583
42598
|
var W = -1, ce = O == null ? 0 : O.length;
|
|
42584
42599
|
for (this.clear(); ++W < ce; ) {
|
|
@@ -42617,9 +42632,9 @@ bs.exports;
|
|
|
42617
42632
|
}
|
|
42618
42633
|
function jo() {
|
|
42619
42634
|
this.size = 0, this.__data__ = {
|
|
42620
|
-
hash: new
|
|
42635
|
+
hash: new Nt(),
|
|
42621
42636
|
map: new (V || cn)(),
|
|
42622
|
-
string: new
|
|
42637
|
+
string: new Nt()
|
|
42623
42638
|
};
|
|
42624
42639
|
}
|
|
42625
42640
|
function Qs(O) {
|
|
@@ -44445,7 +44460,7 @@ const NB = /* @__PURE__ */ pi(CB, [["render", IB]]), PB = /* @__PURE__ */ j("spa
|
|
|
44445
44460
|
sm: "px-2.5 py-[0.31rem] min-h-control-sm",
|
|
44446
44461
|
md: "px-3 py-[0.43rem] min-h-control-md"
|
|
44447
44462
|
}[s.value];
|
|
44448
|
-
return
|
|
44463
|
+
return It(
|
|
44449
44464
|
b,
|
|
44450
44465
|
u,
|
|
44451
44466
|
x,
|
|
@@ -44722,7 +44737,7 @@ const NB = /* @__PURE__ */ pi(CB, [["render", IB]]), PB = /* @__PURE__ */ j("spa
|
|
|
44722
44737
|
size: { default: "md" }
|
|
44723
44738
|
},
|
|
44724
44739
|
setup(n) {
|
|
44725
|
-
const t = n, e = L(() =>
|
|
44740
|
+
const t = n, e = L(() => It(
|
|
44726
44741
|
"sticky top-0 z-20 w-full shadow-sm || print:hidden",
|
|
44727
44742
|
t.class
|
|
44728
44743
|
)), r = Tb(), i = L(() => r.systemAlerts);
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
2
|
+
class: {
|
|
3
|
+
type: import("vue").PropType<string | string[]>;
|
|
4
|
+
default: undefined;
|
|
5
|
+
};
|
|
2
6
|
color: {
|
|
3
7
|
type: import("vue").PropType<string>;
|
|
4
8
|
default: string;
|
|
@@ -11,7 +15,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
11
15
|
default: undefined;
|
|
12
16
|
};
|
|
13
17
|
size: {
|
|
14
|
-
type: import("vue").PropType<
|
|
18
|
+
type: import("vue").PropType<string>;
|
|
15
19
|
default: string;
|
|
16
20
|
};
|
|
17
21
|
contrast: {
|
|
@@ -22,6 +26,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
22
26
|
type: import("vue").PropType<boolean>;
|
|
23
27
|
};
|
|
24
28
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
29
|
+
class: {
|
|
30
|
+
type: import("vue").PropType<string | string[]>;
|
|
31
|
+
default: undefined;
|
|
32
|
+
};
|
|
25
33
|
color: {
|
|
26
34
|
type: import("vue").PropType<string>;
|
|
27
35
|
default: string;
|
|
@@ -34,7 +42,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
34
42
|
default: undefined;
|
|
35
43
|
};
|
|
36
44
|
size: {
|
|
37
|
-
type: import("vue").PropType<
|
|
45
|
+
type: import("vue").PropType<string>;
|
|
38
46
|
default: string;
|
|
39
47
|
};
|
|
40
48
|
contrast: {
|
|
@@ -45,9 +53,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
45
53
|
type: import("vue").PropType<boolean>;
|
|
46
54
|
};
|
|
47
55
|
}>>, {
|
|
56
|
+
class: string | string[];
|
|
48
57
|
color: string;
|
|
49
58
|
icon: string;
|
|
50
|
-
size:
|
|
59
|
+
size: string;
|
|
51
60
|
contrast: "high" | "low";
|
|
52
61
|
}, {}>, {
|
|
53
62
|
default?(_: {}): any;
|
|
@@ -54,6 +54,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
54
54
|
focus: typeof focus;
|
|
55
55
|
blur: typeof blur;
|
|
56
56
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
57
|
+
blur: (...args: any[]) => void;
|
|
58
|
+
focus: (...args: any[]) => void;
|
|
57
59
|
"update:modelValue": (...args: any[]) => void;
|
|
58
60
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
59
61
|
modelValue: {
|
|
@@ -105,6 +107,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
105
107
|
type: BooleanConstructor;
|
|
106
108
|
};
|
|
107
109
|
}>> & {
|
|
110
|
+
onFocus?: ((...args: any[]) => any) | undefined;
|
|
111
|
+
onBlur?: ((...args: any[]) => any) | undefined;
|
|
108
112
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
109
113
|
}, {
|
|
110
114
|
class: string | string[];
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@ import { palette } from '@/utils/colors';
|
|
|
4
4
|
|
|
5
5
|
const colors = [...Object.keys(palette), '#ff0000', '#dbeafe'];
|
|
6
6
|
|
|
7
|
-
const sizes = ['sm', '
|
|
7
|
+
const sizes = ['sm', 'md', 'lg'];
|
|
8
8
|
|
|
9
9
|
export default {
|
|
10
10
|
title: 'Components/BaseBadge',
|
|
@@ -88,9 +88,9 @@ export const Sizes = (args) => ({
|
|
|
88
88
|
return { args, colors, sizes };
|
|
89
89
|
},
|
|
90
90
|
template: `
|
|
91
|
-
<div v-for="size in sizes" :key="size">
|
|
92
|
-
<p class="text-xs text-slate-600 leading-tight
|
|
93
|
-
<BaseBadge v-bind="args" :size="size"
|
|
91
|
+
<div v-for="size in sizes" :key="size" class="mb-1">
|
|
92
|
+
<p class="text-xs text-slate-600 leading-tight">{{ size }}</p>
|
|
93
|
+
<BaseBadge v-bind="args" :size="size">
|
|
94
94
|
Administrator
|
|
95
95
|
</BaseBadge>
|
|
96
96
|
</div>
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<span
|
|
3
|
-
class="
|
|
4
|
-
:class="[sizeClasses, wrapClasses]"
|
|
3
|
+
:class="classes"
|
|
5
4
|
:style="colorStyle"
|
|
6
5
|
>
|
|
7
6
|
<BaseIcon
|
|
@@ -17,20 +16,29 @@
|
|
|
17
16
|
<script lang="ts" setup>
|
|
18
17
|
import { getColorConfig } from '@/utils/colors';
|
|
19
18
|
import { Icon as BaseIcon } from '@iconify/vue';
|
|
19
|
+
import { twMerge } from 'tailwind-merge';
|
|
20
|
+
|
|
21
|
+
const sizes = ['sm', 'md', 'lg'];
|
|
22
|
+
|
|
23
|
+
defineOptions({
|
|
24
|
+
inheritAttrs: false,
|
|
25
|
+
})
|
|
20
26
|
|
|
21
27
|
const props = withDefaults(
|
|
22
28
|
defineProps<{
|
|
29
|
+
class?: string | string[];
|
|
23
30
|
contrast?: 'low' | 'high';
|
|
24
31
|
color?: string;
|
|
25
|
-
size?:
|
|
32
|
+
size?: typeof sizes[number];
|
|
26
33
|
icon?: string;
|
|
27
34
|
wrap?: boolean;
|
|
28
35
|
bordered?: boolean;
|
|
29
36
|
}>(),
|
|
30
37
|
{
|
|
31
|
-
|
|
38
|
+
class: undefined,
|
|
39
|
+
contrast: 'low',
|
|
32
40
|
color: 'gray',
|
|
33
|
-
size: '
|
|
41
|
+
size: 'md',
|
|
34
42
|
icon: undefined,
|
|
35
43
|
}
|
|
36
44
|
);
|
|
@@ -52,36 +60,34 @@ const colorStyle = computed((): Record<string, string> => {
|
|
|
52
60
|
return styles;
|
|
53
61
|
});
|
|
54
62
|
|
|
55
|
-
const
|
|
56
|
-
if (!props.
|
|
57
|
-
return '
|
|
63
|
+
const sizeInternal = computed(() => {
|
|
64
|
+
if (!sizes.includes(props.size)) {
|
|
65
|
+
return 'md';
|
|
58
66
|
}
|
|
59
|
-
return '';
|
|
60
|
-
});
|
|
61
67
|
|
|
62
|
-
|
|
63
|
-
if (props.size == 'sm') {
|
|
64
|
-
return 'px-2 py-px text-[11px]';
|
|
65
|
-
}
|
|
66
|
-
if (props.size == 'base') {
|
|
67
|
-
return 'px-2.5 py-0.5 text-xs';
|
|
68
|
-
}
|
|
69
|
-
if (props.size == 'lg') {
|
|
70
|
-
return 'px-3 py-0.5 text-sm';
|
|
71
|
-
}
|
|
72
|
-
return 'px-2.5 py-0.5 text-xs';
|
|
68
|
+
return props.size;
|
|
73
69
|
});
|
|
74
70
|
|
|
71
|
+
const classes = computed(() => {
|
|
72
|
+
const base = 'inline-flex items-center rounded leading-tight';
|
|
73
|
+
const size = {
|
|
74
|
+
sm: 'px-1.5 py-px text-[10px]',
|
|
75
|
+
md: 'px-1.5 py-0.5 text-xs',
|
|
76
|
+
lg: 'px-1.5 py-0.5 text-sm',
|
|
77
|
+
}[sizeInternal.value];
|
|
78
|
+
const wrap = props.wrap ? 'whitespace-nowrap' : '';
|
|
79
|
+
|
|
80
|
+
return twMerge(base, wrap, size, props.class);
|
|
81
|
+
})
|
|
82
|
+
|
|
75
83
|
const iconSizeClasses = computed(() => {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}
|
|
85
|
-
return 'h-3 w-3 mr-1 -ml-0.5';
|
|
84
|
+
|
|
85
|
+
const size = {
|
|
86
|
+
sm: 'h-2.5 w-2.5 mr-1',
|
|
87
|
+
md: 'h-3 w-3 mr-1',
|
|
88
|
+
lg: 'h-4 w-4 mr-1',
|
|
89
|
+
}[sizeInternal.value];
|
|
90
|
+
|
|
91
|
+
return size;
|
|
86
92
|
});
|
|
87
93
|
</script>
|
|
@@ -11,6 +11,8 @@
|
|
|
11
11
|
:autocomplete="autocomplete ? 'on' : 'off'"
|
|
12
12
|
:class="classes"
|
|
13
13
|
@input="emitUpdate(transformInputValue($event))"
|
|
14
|
+
@blur="$emit('blur')"
|
|
15
|
+
@focus="$emit('focus')"
|
|
14
16
|
/>
|
|
15
17
|
</template>
|
|
16
18
|
|
|
@@ -76,7 +78,7 @@ const props = defineProps({
|
|
|
76
78
|
},
|
|
77
79
|
});
|
|
78
80
|
|
|
79
|
-
const emit = defineEmits(['update:modelValue']);
|
|
81
|
+
const emit = defineEmits(['update:modelValue', 'blur', 'focus']);
|
|
80
82
|
|
|
81
83
|
const { nameInternal, requiredInternal, hasErrorInternal, emitUpdate, sizeInternal } =
|
|
82
84
|
useField({
|
package/src/utils/colors.ts
CHANGED
|
@@ -44,7 +44,7 @@ export const palette: Record<string, ColorPalette> = {
|
|
|
44
44
|
red: {
|
|
45
45
|
low: {
|
|
46
46
|
backgroundColor: colors.red[100],
|
|
47
|
-
textColor: colors.red[
|
|
47
|
+
textColor: colors.red[800],
|
|
48
48
|
borderColor: colors.red[300],
|
|
49
49
|
},
|
|
50
50
|
high: {
|
|
@@ -56,7 +56,7 @@ export const palette: Record<string, ColorPalette> = {
|
|
|
56
56
|
orange: {
|
|
57
57
|
low: {
|
|
58
58
|
backgroundColor: colors.orange[100],
|
|
59
|
-
textColor: colors.orange[
|
|
59
|
+
textColor: colors.orange[800],
|
|
60
60
|
borderColor: colors.orange[300],
|
|
61
61
|
},
|
|
62
62
|
high: {
|
|
@@ -68,7 +68,7 @@ export const palette: Record<string, ColorPalette> = {
|
|
|
68
68
|
yellow: {
|
|
69
69
|
low: {
|
|
70
70
|
backgroundColor: colors.yellow[100],
|
|
71
|
-
textColor: colors.yellow[
|
|
71
|
+
textColor: colors.yellow[800],
|
|
72
72
|
borderColor: colors.yellow[300],
|
|
73
73
|
},
|
|
74
74
|
high: {
|
|
@@ -80,7 +80,7 @@ export const palette: Record<string, ColorPalette> = {
|
|
|
80
80
|
green: {
|
|
81
81
|
low: {
|
|
82
82
|
backgroundColor: colors.green[100],
|
|
83
|
-
textColor: colors.green[
|
|
83
|
+
textColor: colors.green[800],
|
|
84
84
|
borderColor: colors.green[300],
|
|
85
85
|
},
|
|
86
86
|
high: {
|
|
@@ -92,7 +92,7 @@ export const palette: Record<string, ColorPalette> = {
|
|
|
92
92
|
teal: {
|
|
93
93
|
low: {
|
|
94
94
|
backgroundColor: colors.teal[100],
|
|
95
|
-
textColor: colors.teal[
|
|
95
|
+
textColor: colors.teal[800],
|
|
96
96
|
borderColor: colors.teal[300],
|
|
97
97
|
},
|
|
98
98
|
high: {
|
|
@@ -104,7 +104,7 @@ export const palette: Record<string, ColorPalette> = {
|
|
|
104
104
|
cyan: {
|
|
105
105
|
low: {
|
|
106
106
|
backgroundColor: colors.cyan[100],
|
|
107
|
-
textColor: colors.cyan[
|
|
107
|
+
textColor: colors.cyan[800],
|
|
108
108
|
borderColor: colors.cyan[300],
|
|
109
109
|
},
|
|
110
110
|
high: {
|
|
@@ -116,7 +116,7 @@ export const palette: Record<string, ColorPalette> = {
|
|
|
116
116
|
blue: {
|
|
117
117
|
low: {
|
|
118
118
|
backgroundColor: colors.blue[100],
|
|
119
|
-
textColor: colors.blue[
|
|
119
|
+
textColor: colors.blue[800],
|
|
120
120
|
borderColor: colors.blue[300],
|
|
121
121
|
},
|
|
122
122
|
high: {
|
|
@@ -128,7 +128,7 @@ export const palette: Record<string, ColorPalette> = {
|
|
|
128
128
|
indigo: {
|
|
129
129
|
low: {
|
|
130
130
|
backgroundColor: colors.indigo[100],
|
|
131
|
-
textColor: colors.indigo[
|
|
131
|
+
textColor: colors.indigo[800],
|
|
132
132
|
borderColor: colors.indigo[300],
|
|
133
133
|
},
|
|
134
134
|
high: {
|
|
@@ -140,7 +140,7 @@ export const palette: Record<string, ColorPalette> = {
|
|
|
140
140
|
purple: {
|
|
141
141
|
low: {
|
|
142
142
|
backgroundColor: colors.purple[100],
|
|
143
|
-
textColor: colors.purple[
|
|
143
|
+
textColor: colors.purple[800],
|
|
144
144
|
borderColor: colors.purple[300],
|
|
145
145
|
},
|
|
146
146
|
high: {
|
|
@@ -152,7 +152,7 @@ export const palette: Record<string, ColorPalette> = {
|
|
|
152
152
|
pink: {
|
|
153
153
|
low: {
|
|
154
154
|
backgroundColor: colors.pink[100],
|
|
155
|
-
textColor: colors.pink[
|
|
155
|
+
textColor: colors.pink[800],
|
|
156
156
|
borderColor: colors.pink[300],
|
|
157
157
|
},
|
|
158
158
|
high: {
|