@livechat/design-system-react-components 1.28.1 → 1.28.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Button/Button.d.ts +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +230 -221
- package/package.json +2 -2
package/dist/index.es.js
CHANGED
|
@@ -629,7 +629,7 @@ const mc = {
|
|
|
629
629
|
r
|
|
630
630
|
);
|
|
631
631
|
}, I = (m) => {
|
|
632
|
-
var
|
|
632
|
+
var b = m, {
|
|
633
633
|
as: t = "p",
|
|
634
634
|
size: a = "md",
|
|
635
635
|
caps: r = !1,
|
|
@@ -641,7 +641,7 @@ const mc = {
|
|
|
641
641
|
className: d,
|
|
642
642
|
customColor: n,
|
|
643
643
|
textAlign: s
|
|
644
|
-
} =
|
|
644
|
+
} = b, p = F(b, [
|
|
645
645
|
"as",
|
|
646
646
|
"size",
|
|
647
647
|
"caps",
|
|
@@ -717,7 +717,7 @@ const mc = {
|
|
|
717
717
|
"action-menu__list--with-footer": "lc-ActionMenu-module__action-menu__list--with-footer___ghTxL",
|
|
718
718
|
"action-menu__footer": "lc-ActionMenu-module__action-menu__footer___HxoOe"
|
|
719
719
|
}, Re = "action-menu", b_ = (w) => {
|
|
720
|
-
var
|
|
720
|
+
var f = w, {
|
|
721
721
|
className: t,
|
|
722
722
|
triggerClassName: a,
|
|
723
723
|
options: r,
|
|
@@ -731,8 +731,8 @@ const mc = {
|
|
|
731
731
|
onOpen: s,
|
|
732
732
|
floatingStrategy: p,
|
|
733
733
|
selectedOptions: m,
|
|
734
|
-
footer:
|
|
735
|
-
} =
|
|
734
|
+
footer: b
|
|
735
|
+
} = f, g = F(f, [
|
|
736
736
|
"className",
|
|
737
737
|
"triggerClassName",
|
|
738
738
|
"options",
|
|
@@ -748,7 +748,7 @@ const mc = {
|
|
|
748
748
|
"selectedOptions",
|
|
749
749
|
"footer"
|
|
750
750
|
]);
|
|
751
|
-
const h = d !== void 0, [
|
|
751
|
+
const h = d !== void 0, [v, E] = e.useState(l), [N, $] = e.useState(null), y = e.useRef(-1), C = Ha(), D = aa(), L = e.useRef(null), G = h ? d : v, T = () => {
|
|
752
752
|
G ? (n == null || n(), !h && E(!1)) : (s == null || s(), !h && E(!0));
|
|
753
753
|
}, { x: M, y: V, strategy: q, refs: he, context: oe } = ra({
|
|
754
754
|
nodeId: D,
|
|
@@ -868,7 +868,7 @@ const mc = {
|
|
|
868
868
|
className: u(
|
|
869
869
|
Fe[`${Re}__list`],
|
|
870
870
|
{
|
|
871
|
-
[Fe[`${Re}__list--with-footer`]]:
|
|
871
|
+
[Fe[`${Re}__list--with-footer`]]: b
|
|
872
872
|
},
|
|
873
873
|
t
|
|
874
874
|
),
|
|
@@ -877,14 +877,14 @@ const mc = {
|
|
|
877
877
|
}),
|
|
878
878
|
r.map(vt)
|
|
879
879
|
),
|
|
880
|
-
|
|
880
|
+
b && /* @__PURE__ */ e.createElement(
|
|
881
881
|
I,
|
|
882
882
|
{
|
|
883
883
|
size: "sm",
|
|
884
884
|
as: "div",
|
|
885
885
|
className: Fe[`${Re}__footer`]
|
|
886
886
|
},
|
|
887
|
-
|
|
887
|
+
b
|
|
888
888
|
)
|
|
889
889
|
)));
|
|
890
890
|
return C === null ? /* @__PURE__ */ e.createElement(za, null, Ie) : Ie;
|
|
@@ -991,7 +991,7 @@ const mc = {
|
|
|
991
991
|
"btn--text-lock-black": "lc-Button-module__btn--text-lock-black___fy3zb"
|
|
992
992
|
}, se = "btn", W = e.forwardRef(
|
|
993
993
|
(w, g) => {
|
|
994
|
-
var
|
|
994
|
+
var f = w, {
|
|
995
995
|
loading: t = !1,
|
|
996
996
|
disabled: a = !1,
|
|
997
997
|
type: r = "button",
|
|
@@ -1005,7 +1005,7 @@ const mc = {
|
|
|
1005
1005
|
children: s,
|
|
1006
1006
|
href: p,
|
|
1007
1007
|
onClick: m
|
|
1008
|
-
} =
|
|
1008
|
+
} = f, b = F(f, [
|
|
1009
1009
|
"loading",
|
|
1010
1010
|
"disabled",
|
|
1011
1011
|
"type",
|
|
@@ -1020,7 +1020,7 @@ const mc = {
|
|
|
1020
1020
|
"href",
|
|
1021
1021
|
"onClick"
|
|
1022
1022
|
]);
|
|
1023
|
-
const h = t || a,
|
|
1023
|
+
const h = t || a, v = !s && c, E = ["text", "link", "link-light"].includes(o), N = p ? "a" : "button", $ = u(
|
|
1024
1024
|
n,
|
|
1025
1025
|
ne[se],
|
|
1026
1026
|
ne[`${se}--${o}`],
|
|
@@ -1028,9 +1028,9 @@ const mc = {
|
|
|
1028
1028
|
{
|
|
1029
1029
|
[ne[`${se}--loading`]]: t,
|
|
1030
1030
|
[ne[`${se}--full-width`]]: _,
|
|
1031
|
-
[ne[`${se}--with-${i}-icon`]]: c && !
|
|
1032
|
-
[ne[`${se}--icon-only`]]:
|
|
1033
|
-
[ne[`${se}--icon-only--bg`]]:
|
|
1031
|
+
[ne[`${se}--with-${i}-icon`]]: c && !v && !E,
|
|
1032
|
+
[ne[`${se}--icon-only`]]: v,
|
|
1033
|
+
[ne[`${se}--icon-only--bg`]]: v && E,
|
|
1034
1034
|
[ne[`${se}--disabled`]]: h
|
|
1035
1035
|
}
|
|
1036
1036
|
);
|
|
@@ -1042,7 +1042,7 @@ const mc = {
|
|
|
1042
1042
|
"aria-disabled": h,
|
|
1043
1043
|
type: r,
|
|
1044
1044
|
disabled: h
|
|
1045
|
-
}, !h && { href: p, onClick: m }),
|
|
1045
|
+
}, !h && { href: p, onClick: m }), b),
|
|
1046
1046
|
t && /* @__PURE__ */ e.createElement(
|
|
1047
1047
|
Wa,
|
|
1048
1048
|
k({
|
|
@@ -1150,12 +1150,12 @@ const x_ = (t) => {
|
|
|
1150
1150
|
onOpen: s,
|
|
1151
1151
|
withFadeAnimation: p = !0,
|
|
1152
1152
|
transitionDuration: m = 200,
|
|
1153
|
-
hoverOnDuration:
|
|
1153
|
+
hoverOnDuration: b,
|
|
1154
1154
|
hoverOffDuration: g,
|
|
1155
1155
|
transitionDelay: w = 0,
|
|
1156
|
-
hoverOnDelay:
|
|
1156
|
+
hoverOnDelay: f,
|
|
1157
1157
|
hoverOffDelay: h,
|
|
1158
|
-
triggerOnClick:
|
|
1158
|
+
triggerOnClick: v = !1,
|
|
1159
1159
|
triggerOnHover: E = !0,
|
|
1160
1160
|
offsetMainAxis: N = 8,
|
|
1161
1161
|
referenceElement: $,
|
|
@@ -1197,16 +1197,16 @@ const x_ = (t) => {
|
|
|
1197
1197
|
move: !1,
|
|
1198
1198
|
restMs: y,
|
|
1199
1199
|
delay: {
|
|
1200
|
-
open: st(
|
|
1200
|
+
open: st(f),
|
|
1201
1201
|
close: st(h || L)
|
|
1202
1202
|
},
|
|
1203
1203
|
enabled: E,
|
|
1204
1204
|
handleClose: M ? null : __()
|
|
1205
1205
|
}), Ge = o_(S), ma = na(S, C), pa = sa(S, { role: "tooltip" }), ga = ca(S, k({
|
|
1206
|
-
enabled:
|
|
1206
|
+
enabled: v
|
|
1207
1207
|
}, D)), { isMounted: ba, styles: fa } = $r(S, {
|
|
1208
1208
|
duration: {
|
|
1209
|
-
open: He(
|
|
1209
|
+
open: He(b),
|
|
1210
1210
|
close: He(g)
|
|
1211
1211
|
}
|
|
1212
1212
|
}), { status: va } = l_(S), { getReferenceProps: ha, getFloatingProps: ka } = ia([
|
|
@@ -1617,16 +1617,16 @@ const er = 8, tr = "guide-tooltip", ar = (t, a) => new P_(t, a), Nc = (t) => {
|
|
|
1617
1617
|
}) => {
|
|
1618
1618
|
const [i, d] = e.useState(
|
|
1619
1619
|
_.length
|
|
1620
|
-
), [n, s] = e.useState([]), [p, m] = e.useState(!1),
|
|
1620
|
+
), [n, s] = e.useState([]), [p, m] = e.useState(!1), b = r === "scroll", g = u(
|
|
1621
1621
|
U[zt],
|
|
1622
1622
|
t,
|
|
1623
1623
|
l && U[`${zt}--vertical`]
|
|
1624
|
-
), w = !
|
|
1624
|
+
), w = !b && n.length !== 0;
|
|
1625
1625
|
e.useEffect(() => {
|
|
1626
|
-
|
|
1626
|
+
b || (_.length > i ? s(_.slice(i, _.length)) : s([]));
|
|
1627
1627
|
}, [_, i]), e.useEffect(() => {
|
|
1628
|
-
const
|
|
1629
|
-
if (!
|
|
1628
|
+
const v = !!window.ResizeObserver;
|
|
1629
|
+
if (!b && v) {
|
|
1630
1630
|
const E = new ResizeObserver((N) => {
|
|
1631
1631
|
const { width: $, height: y } = N[0].contentRect, C = l ? y : $, D = n.length > 0 ? 60 : 0, L = Math.floor(
|
|
1632
1632
|
(C - D) / F_
|
|
@@ -1635,25 +1635,34 @@ const er = 8, tr = "guide-tooltip", ar = (t, a) => new P_(t, a), Nc = (t) => {
|
|
|
1635
1635
|
});
|
|
1636
1636
|
return E.observe(document.querySelector(`#${a}`)), () => E.disconnect();
|
|
1637
1637
|
}
|
|
1638
|
-
}, [n,
|
|
1639
|
-
const
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1638
|
+
}, [n, b, i]);
|
|
1639
|
+
const f = e.useCallback(() => n.reduce(
|
|
1640
|
+
(v, E) => {
|
|
1641
|
+
if (!E.hideInMenu) {
|
|
1642
|
+
const N = {
|
|
1643
|
+
key: E.key,
|
|
1644
|
+
element: /* @__PURE__ */ e.createElement(f_, { leftNode: E.element }, E.label),
|
|
1645
|
+
withDivider: E.withDivider,
|
|
1646
|
+
onClick: E.onClick
|
|
1647
|
+
};
|
|
1648
|
+
v.push(N);
|
|
1649
|
+
}
|
|
1650
|
+
return v;
|
|
1651
|
+
},
|
|
1652
|
+
[]
|
|
1653
|
+
), [n]), h = n.find((v) => v.key === o);
|
|
1645
1654
|
return /* @__PURE__ */ e.createElement("div", { id: a, className: g }, /* @__PURE__ */ e.createElement(
|
|
1646
1655
|
"div",
|
|
1647
1656
|
{
|
|
1648
1657
|
className: u(U[`${zt}__items`], {
|
|
1649
|
-
[U[`${zt}__items--scroll`]]:
|
|
1658
|
+
[U[`${zt}__items--scroll`]]: b
|
|
1650
1659
|
})
|
|
1651
1660
|
},
|
|
1652
|
-
_.slice(0, i).map((
|
|
1661
|
+
_.slice(0, i).map((v) => /* @__PURE__ */ e.createElement(
|
|
1653
1662
|
I_,
|
|
1654
1663
|
{
|
|
1655
|
-
option:
|
|
1656
|
-
isActive:
|
|
1664
|
+
option: v,
|
|
1665
|
+
isActive: v.key === o,
|
|
1657
1666
|
vertical: l
|
|
1658
1667
|
}
|
|
1659
1668
|
))
|
|
@@ -1674,7 +1683,7 @@ const er = 8, tr = "guide-tooltip", ar = (t, a) => new P_(t, a), Nc = (t) => {
|
|
|
1674
1683
|
onClose: () => m(!1),
|
|
1675
1684
|
floatingStrategy: "fixed",
|
|
1676
1685
|
placement: l ? "left-start" : "bottom-end",
|
|
1677
|
-
options:
|
|
1686
|
+
options: f(),
|
|
1678
1687
|
triggerClassName: u(
|
|
1679
1688
|
l && U[`${We}__trigger-vertical`]
|
|
1680
1689
|
),
|
|
@@ -1825,10 +1834,10 @@ const er = 8, tr = "guide-tooltip", ar = (t, a) => new P_(t, a), Nc = (t) => {
|
|
|
1825
1834
|
a
|
|
1826
1835
|
);
|
|
1827
1836
|
return e.useEffect(() => {
|
|
1828
|
-
const
|
|
1829
|
-
|
|
1837
|
+
const b = () => n.current && n.current.offsetWidth <= 400 ? p("small") : n.current && n.current.offsetWidth > 400 && n.current.offsetWidth <= 800 ? p("medium") : p("large"), g = xr(() => {
|
|
1838
|
+
b();
|
|
1830
1839
|
}, 500);
|
|
1831
|
-
return window.addEventListener("resize", g),
|
|
1840
|
+
return window.addEventListener("resize", g), b(), () => window.removeEventListener("resize", g);
|
|
1832
1841
|
}), /* @__PURE__ */ e.createElement("div", k({ ref: n, className: m }, c), /* @__PURE__ */ e.createElement("div", { className: ke[`${ye}__content`] }, /* @__PURE__ */ e.createElement("div", { className: ke[`${ye}__content__wrapper`] }, /* @__PURE__ */ e.createElement(
|
|
1833
1842
|
P,
|
|
1834
1843
|
x(k({}, U_[o]), {
|
|
@@ -1962,7 +1971,7 @@ const Y_ = "lc-Avatar-module__avatar___1zTCE", K_ = "lc-Avatar-module__avatar__s
|
|
|
1962
1971
|
"type",
|
|
1963
1972
|
"withRim"
|
|
1964
1973
|
]);
|
|
1965
|
-
const
|
|
1974
|
+
const b = d === "image" && !l, [g, w] = e.useState(b), f = d === "image" && !!l && !g, h = d === "text", v = ["xxxsmall", "xxsmall", "xsmall"].includes(o) ? 1 : 2, E = V_(i, v), N = ["xxxsmall", "xxsmall", "xsmall", "small"].includes(o), $ = r || W_(i), y = $ ? q_($) : void 0, C = h ? { backgroundColor: $ } : {}, D = u(k({
|
|
1966
1975
|
[ge[Z]]: !0,
|
|
1967
1976
|
[ge[`${Z}--${_}`]]: !0,
|
|
1968
1977
|
[ge[`${Z}--${o}`]]: !0,
|
|
@@ -1980,8 +1989,8 @@ const Y_ = "lc-Avatar-module__avatar___1zTCE", K_ = "lc-Avatar-module__avatar__s
|
|
|
1980
1989
|
ge[`${Z}__rim--${o}`]
|
|
1981
1990
|
), M = (q) => N ? "2xs" : ["medium"].includes(q) ? "xs" : ["large", "xlarge"].includes(q) ? "sm" : ["xxlarge"].includes(q) ? "lg" : "xl", V = e.useCallback(() => w(!0), []);
|
|
1982
1991
|
return e.useEffect(() => {
|
|
1983
|
-
w(
|
|
1984
|
-
}, [
|
|
1992
|
+
w(b);
|
|
1993
|
+
}, [b]), /* @__PURE__ */ e.createElement("div", k({ className: D, style: C }, s), n && /* @__PURE__ */ e.createElement(
|
|
1985
1994
|
"div",
|
|
1986
1995
|
{
|
|
1987
1996
|
"data-testid": `${Z}__rim`,
|
|
@@ -1993,7 +2002,7 @@ const Y_ = "lc-Avatar-module__avatar___1zTCE", K_ = "lc-Avatar-module__avatar__s
|
|
|
1993
2002
|
"data-testid": `${Z}__status`,
|
|
1994
2003
|
className: L
|
|
1995
2004
|
}
|
|
1996
|
-
),
|
|
2005
|
+
), f && /* @__PURE__ */ e.createElement(
|
|
1997
2006
|
"img",
|
|
1998
2007
|
{
|
|
1999
2008
|
className: ge[`${Z}__image`],
|
|
@@ -2082,23 +2091,23 @@ const ro = "lc-SegmentedControl-module__btn___tfsvL", Wt = {
|
|
|
2082
2091
|
e.useEffect(() => {
|
|
2083
2092
|
s && n(o);
|
|
2084
2093
|
}, [o]);
|
|
2085
|
-
const p = (
|
|
2086
|
-
s || n(
|
|
2087
|
-
}, m = a.map(({ id:
|
|
2088
|
-
const
|
|
2094
|
+
const p = (b, g) => {
|
|
2095
|
+
s || n(b), c(b, g);
|
|
2096
|
+
}, m = a.map(({ id: b, label: g, loading: w, disabled: f, icon: h }) => {
|
|
2097
|
+
const v = b === d, E = v ? Wt["btn--active"] : "", N = v ? !1 : w;
|
|
2089
2098
|
return /* @__PURE__ */ e.createElement(
|
|
2090
2099
|
W,
|
|
2091
2100
|
{
|
|
2092
|
-
key:
|
|
2101
|
+
key: b,
|
|
2093
2102
|
fullWidth: l,
|
|
2094
2103
|
loading: N,
|
|
2095
|
-
disabled:
|
|
2096
|
-
"aria-pressed":
|
|
2104
|
+
disabled: f,
|
|
2105
|
+
"aria-pressed": v,
|
|
2097
2106
|
kind: "secondary",
|
|
2098
2107
|
icon: h,
|
|
2099
2108
|
className: u(Wt.btn, Wt[`btn--${t}`], E),
|
|
2100
2109
|
onClick: ($) => {
|
|
2101
|
-
p(
|
|
2110
|
+
p(b, $);
|
|
2102
2111
|
}
|
|
2103
2112
|
},
|
|
2104
2113
|
g
|
|
@@ -2139,8 +2148,8 @@ const ro = "lc-SegmentedControl-module__btn___tfsvL", Wt = {
|
|
|
2139
2148
|
"src",
|
|
2140
2149
|
"title"
|
|
2141
2150
|
]);
|
|
2142
|
-
const [p, m] = e.useState(!1),
|
|
2143
|
-
return /* @__PURE__ */ e.createElement("div", k({ className: u(be[Ft], _) }, d),
|
|
2151
|
+
const [p, m] = e.useState(!1), b = p ? ta : Rt, g = p ? "Hide" : "Show more", w = (a == null ? void 0 : a.length) > 0, f = !!l, h = w || f, v = i, E = c, N = E ? "" : be[bo];
|
|
2152
|
+
return /* @__PURE__ */ e.createElement("div", k({ className: u(be[Ft], _) }, d), v && /* @__PURE__ */ e.createElement("div", { className: u(be[Zt], N) }, E && /* @__PURE__ */ e.createElement(
|
|
2144
2153
|
"img",
|
|
2145
2154
|
{
|
|
2146
2155
|
alt: t,
|
|
@@ -2173,13 +2182,13 @@ const ro = "lc-SegmentedControl-module__btn___tfsvL", Wt = {
|
|
|
2173
2182
|
},
|
|
2174
2183
|
C
|
|
2175
2184
|
)
|
|
2176
|
-
),
|
|
2185
|
+
), f && /* @__PURE__ */ e.createElement(
|
|
2177
2186
|
W,
|
|
2178
2187
|
{
|
|
2179
2188
|
className: be[`${Vt}__buttons-expander`],
|
|
2180
2189
|
kind: "link",
|
|
2181
2190
|
iconPosition: "right",
|
|
2182
|
-
icon: /* @__PURE__ */ e.createElement(P, { source:
|
|
2191
|
+
icon: /* @__PURE__ */ e.createElement(P, { source: b }),
|
|
2183
2192
|
onClick: () => m(!p)
|
|
2184
2193
|
},
|
|
2185
2194
|
g
|
|
@@ -2280,26 +2289,26 @@ const ro = "lc-SegmentedControl-module__btn___tfsvL", Wt = {
|
|
|
2280
2289
|
toMonth: p
|
|
2281
2290
|
} = t, m = () => {
|
|
2282
2291
|
typeof a == "function" && a();
|
|
2283
|
-
},
|
|
2292
|
+
}, b = () => {
|
|
2284
2293
|
typeof _ == "function" && _();
|
|
2285
2294
|
}, g = () => {
|
|
2286
2295
|
if (!s) {
|
|
2287
|
-
const
|
|
2288
|
-
return r(
|
|
2296
|
+
const v = bt(n, 12);
|
|
2297
|
+
return r(v);
|
|
2289
2298
|
}
|
|
2290
|
-
const
|
|
2299
|
+
const f = Math.abs(Ka(n, s)), h = bt(
|
|
2291
2300
|
n,
|
|
2292
|
-
!Number.isNaN(
|
|
2301
|
+
!Number.isNaN(f) && f > 12 ? 12 : f
|
|
2293
2302
|
);
|
|
2294
2303
|
return r(h);
|
|
2295
2304
|
}, w = () => {
|
|
2296
2305
|
if (!p) {
|
|
2297
|
-
const
|
|
2298
|
-
return r(
|
|
2306
|
+
const v = Ja(n, 12);
|
|
2307
|
+
return r(v);
|
|
2299
2308
|
}
|
|
2300
|
-
const
|
|
2309
|
+
const f = Math.abs(Ka(p, n)), h = Ja(
|
|
2301
2310
|
n,
|
|
2302
|
-
!Number.isNaN(
|
|
2311
|
+
!Number.isNaN(f) && f > 12 ? 12 : f
|
|
2303
2312
|
);
|
|
2304
2313
|
return d === 2 && Ia(h, p) ? r(bt(h, 1)) : r(h);
|
|
2305
2314
|
};
|
|
@@ -2333,7 +2342,7 @@ const ro = "lc-SegmentedControl-module__btn___tfsvL", Wt = {
|
|
|
2333
2342
|
[i.navButtonNext]: !0,
|
|
2334
2343
|
[i.navButtonInteractionDisabled]: !o
|
|
2335
2344
|
}),
|
|
2336
|
-
onClick:
|
|
2345
|
+
onClick: b
|
|
2337
2346
|
},
|
|
2338
2347
|
/* @__PURE__ */ e.createElement(P, { source: wr, kind: "subtle" })
|
|
2339
2348
|
), /* @__PURE__ */ e.createElement(
|
|
@@ -2439,25 +2448,25 @@ const ro = "lc-SegmentedControl-module__btn___tfsvL", Wt = {
|
|
|
2439
2448
|
"navbarElement",
|
|
2440
2449
|
"renderDay",
|
|
2441
2450
|
"innerRef"
|
|
2442
|
-
]), [m,
|
|
2451
|
+
]), [m, b] = e.useState(o || /* @__PURE__ */ new Date());
|
|
2443
2452
|
e.useEffect(() => {
|
|
2444
|
-
o && o !== m &&
|
|
2453
|
+
o && o !== m && b(o);
|
|
2445
2454
|
}, [o, m]), e.useEffect(() => {
|
|
2446
|
-
_ && o !== m && (Fr(m, { from: l, to: _ }) ||
|
|
2455
|
+
_ && o !== m && (Fr(m, { from: l, to: _ }) || b(_));
|
|
2447
2456
|
}, [o, m, _, l]);
|
|
2448
2457
|
const g = e.useCallback(
|
|
2449
|
-
(
|
|
2450
|
-
if (t.onMonthChange &&
|
|
2451
|
-
t.onMonthChange(
|
|
2458
|
+
(v) => {
|
|
2459
|
+
if (t.onMonthChange && v) {
|
|
2460
|
+
t.onMonthChange(v);
|
|
2452
2461
|
return;
|
|
2453
2462
|
}
|
|
2454
|
-
|
|
2463
|
+
b(v);
|
|
2455
2464
|
},
|
|
2456
2465
|
[o, t.onMonthChange]
|
|
2457
2466
|
);
|
|
2458
2467
|
let w = 1;
|
|
2459
2468
|
(c === 0 || c && c < 7) && (w = c);
|
|
2460
|
-
const
|
|
2469
|
+
const f = e.useMemo(
|
|
2461
2470
|
() => Do(r, a),
|
|
2462
2471
|
[r, a]
|
|
2463
2472
|
);
|
|
@@ -2468,7 +2477,7 @@ const ro = "lc-SegmentedControl-module__btn___tfsvL", Wt = {
|
|
|
2468
2477
|
xo,
|
|
2469
2478
|
{
|
|
2470
2479
|
month: m,
|
|
2471
|
-
classNames:
|
|
2480
|
+
classNames: f,
|
|
2472
2481
|
numberOfMonths: i,
|
|
2473
2482
|
onMonthChange: g,
|
|
2474
2483
|
toMonth: _,
|
|
@@ -2476,7 +2485,7 @@ const ro = "lc-SegmentedControl-module__btn___tfsvL", Wt = {
|
|
|
2476
2485
|
}
|
|
2477
2486
|
),
|
|
2478
2487
|
ref: s,
|
|
2479
|
-
classNames:
|
|
2488
|
+
classNames: f,
|
|
2480
2489
|
numberOfMonths: i,
|
|
2481
2490
|
toMonth: _,
|
|
2482
2491
|
fromMonth: l,
|
|
@@ -2591,11 +2600,11 @@ const Io = (t) => {
|
|
|
2591
2600
|
payload: { date: w }
|
|
2592
2601
|
});
|
|
2593
2602
|
}, [o, r, _]), gt(() => {
|
|
2594
|
-
const { from: w, selectedItem:
|
|
2603
|
+
const { from: w, selectedItem: f, to: h } = d;
|
|
2595
2604
|
if (!(w && h))
|
|
2596
2605
|
return;
|
|
2597
|
-
const
|
|
2598
|
-
|
|
2606
|
+
const v = Pt(f, t);
|
|
2607
|
+
v && (l == null || l(x(k({}, v), {
|
|
2599
2608
|
value: {
|
|
2600
2609
|
from: w,
|
|
2601
2610
|
to: h
|
|
@@ -2612,15 +2621,15 @@ const Io = (t) => {
|
|
|
2612
2621
|
if (!Pt(w, t))
|
|
2613
2622
|
return;
|
|
2614
2623
|
const h = t.reduce(
|
|
2615
|
-
(
|
|
2624
|
+
(v, E) => x(k({}, v), { [E.id]: E }),
|
|
2616
2625
|
{}
|
|
2617
2626
|
);
|
|
2618
2627
|
l(h[w]);
|
|
2619
2628
|
}, [l, d.selectedItem, t]);
|
|
2620
2629
|
const s = Lt(
|
|
2621
2630
|
(w) => {
|
|
2622
|
-
const
|
|
2623
|
-
!or(d.from, d.to) &&
|
|
2631
|
+
const f = o ? Sr(o, w) >= 0 : !0;
|
|
2632
|
+
!or(d.from, d.to) && f && n({
|
|
2624
2633
|
type: Y.NEW_TEMPORARY_TO_VALUE,
|
|
2625
2634
|
payload: { date: w }
|
|
2626
2635
|
});
|
|
@@ -2628,11 +2637,11 @@ const Io = (t) => {
|
|
|
2628
2637
|
[o, d.from, d.to]
|
|
2629
2638
|
), p = Lt(
|
|
2630
2639
|
(w) => {
|
|
2631
|
-
const { from:
|
|
2632
|
-
Fr(w, { to: o }) && (or(
|
|
2640
|
+
const { from: f, to: h } = d;
|
|
2641
|
+
Fr(w, { to: o }) && (or(f, h) ? n({
|
|
2633
2642
|
type: Y.SELECT_FIRST_DAY,
|
|
2634
2643
|
payload: { date: w }
|
|
2635
|
-
}) :
|
|
2644
|
+
}) : f && Fa(w, f) || f && Ra(w, f) ? n({
|
|
2636
2645
|
type: Y.SELECT_SECOND_DAY_AS_TO,
|
|
2637
2646
|
payload: { date: w }
|
|
2638
2647
|
}) : n({
|
|
@@ -2656,24 +2665,24 @@ const Io = (t) => {
|
|
|
2656
2665
|
});
|
|
2657
2666
|
},
|
|
2658
2667
|
[t]
|
|
2659
|
-
),
|
|
2668
|
+
), b = Lt((w) => {
|
|
2660
2669
|
n({
|
|
2661
2670
|
type: Y.CURRENT_MONTH_CHANGE,
|
|
2662
2671
|
payload: { date: w }
|
|
2663
2672
|
});
|
|
2664
2673
|
}, []);
|
|
2665
2674
|
return c((() => {
|
|
2666
|
-
const { currentMonth: w, from:
|
|
2667
|
-
() => So(
|
|
2668
|
-
[
|
|
2669
|
-
), $ = Ot(() => Pt(h, t), [t, h]), y = Ot(() => [
|
|
2675
|
+
const { currentMonth: w, from: f, selectedItem: h, temporaryTo: v, to: E } = d, N = Ot(
|
|
2676
|
+
() => So(f, v),
|
|
2677
|
+
[f, v]
|
|
2678
|
+
), $ = Ot(() => Pt(h, t), [t, h]), y = Ot(() => [f, { from: f, to: v }], [f, v]), C = Ot(() => o ? { after: o } : void 0, [o]);
|
|
2670
2679
|
return {
|
|
2671
2680
|
select: {
|
|
2672
2681
|
onItemSelect: m,
|
|
2673
2682
|
selected: h || ""
|
|
2674
2683
|
},
|
|
2675
2684
|
inputs: {
|
|
2676
|
-
fromDate:
|
|
2685
|
+
fromDate: f,
|
|
2677
2686
|
toDate: E
|
|
2678
2687
|
},
|
|
2679
2688
|
datepicker: {
|
|
@@ -2687,7 +2696,7 @@ const Io = (t) => {
|
|
|
2687
2696
|
toMonth: o,
|
|
2688
2697
|
disabledDays: C,
|
|
2689
2698
|
onDayMouseEnter: s,
|
|
2690
|
-
onMonthChange:
|
|
2699
|
+
onMonthChange: b
|
|
2691
2700
|
},
|
|
2692
2701
|
selectedOption: $
|
|
2693
2702
|
};
|
|
@@ -2745,18 +2754,18 @@ const Ac = (t) => {
|
|
|
2745
2754
|
hideLabelOnOpen: d,
|
|
2746
2755
|
onClick: n
|
|
2747
2756
|
}) => {
|
|
2748
|
-
const [s, p] = e.useState(i), [m,
|
|
2757
|
+
const [s, p] = e.useState(i), [m, b] = e.useState(0), g = e.useRef(null), w = u(
|
|
2749
2758
|
O[H],
|
|
2750
2759
|
l && O[`${H}--with-divider`],
|
|
2751
2760
|
a
|
|
2752
|
-
),
|
|
2761
|
+
), f = d && s, h = typeof o == "string", v = (E) => {
|
|
2753
2762
|
p((N) => !N), E.currentTarget.blur(), n == null || n();
|
|
2754
2763
|
};
|
|
2755
2764
|
return e.useEffect(() => {
|
|
2756
2765
|
const E = !!window.IntersectionObserver;
|
|
2757
2766
|
if (g.current && E) {
|
|
2758
2767
|
const N = new ResizeObserver(() => {
|
|
2759
|
-
g.current && m !== g.current.offsetHeight &&
|
|
2768
|
+
g.current && m !== g.current.offsetHeight && b(g.current.offsetHeight);
|
|
2760
2769
|
});
|
|
2761
2770
|
return N.observe(g.current), () => N.disconnect();
|
|
2762
2771
|
}
|
|
@@ -2766,11 +2775,11 @@ const Ac = (t) => {
|
|
|
2766
2775
|
className: u(
|
|
2767
2776
|
O[`${H}__label-wrapper`],
|
|
2768
2777
|
d && O[`${H}__label-wrapper--fading`],
|
|
2769
|
-
|
|
2778
|
+
f && O[`${H}__label-wrapper--hide`],
|
|
2770
2779
|
s && O[`${H}__label-wrapper--open`]
|
|
2771
2780
|
),
|
|
2772
2781
|
"aria-expanded": s,
|
|
2773
|
-
"aria-hidden":
|
|
2782
|
+
"aria-hidden": f,
|
|
2774
2783
|
"data-testid": "details-card-label"
|
|
2775
2784
|
},
|
|
2776
2785
|
/* @__PURE__ */ e.createElement(
|
|
@@ -2812,7 +2821,7 @@ const Ac = (t) => {
|
|
|
2812
2821
|
s && O[`${H}__button--open`],
|
|
2813
2822
|
d && O[`${H}__button--fading`]
|
|
2814
2823
|
),
|
|
2815
|
-
onClick:
|
|
2824
|
+
onClick: v,
|
|
2816
2825
|
"aria-expanded": s
|
|
2817
2826
|
}
|
|
2818
2827
|
), /* @__PURE__ */ e.createElement("div", null, /* @__PURE__ */ e.createElement(
|
|
@@ -2948,8 +2957,8 @@ const Ac = (t) => {
|
|
|
2948
2957
|
l
|
|
2949
2958
|
);
|
|
2950
2959
|
return e.useEffect(() => {
|
|
2951
|
-
const
|
|
2952
|
-
return t &&
|
|
2960
|
+
const b = n;
|
|
2961
|
+
return t && b.current ? p(`${b.current.clientHeight}px`) : p("auto");
|
|
2953
2962
|
}), /* @__PURE__ */ e.createElement("div", { className: m }, d && t && /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(
|
|
2954
2963
|
I,
|
|
2955
2964
|
{
|
|
@@ -3107,7 +3116,7 @@ const Ac = (t) => {
|
|
|
3107
3116
|
]);
|
|
3108
3117
|
const s = e.useRef(null);
|
|
3109
3118
|
e.useImperativeHandle(i, () => s.current, []);
|
|
3110
|
-
const [p, m] = e.useState(!1), [
|
|
3119
|
+
const [p, m] = e.useState(!1), [b, g] = e.useState(!1), { type: w, onFocus: f, onBlur: h } = c, v = u(
|
|
3111
3120
|
o,
|
|
3112
3121
|
Te[De],
|
|
3113
3122
|
Te[`${De}--${t}`],
|
|
@@ -3118,7 +3127,7 @@ const Ac = (t) => {
|
|
|
3118
3127
|
[Te[`${De}--crop`]]: l,
|
|
3119
3128
|
[Te[`${De}--read-only`]]: c.readOnly
|
|
3120
3129
|
}
|
|
3121
|
-
), E = r ? "var(--content-disabled)" : "var(--content-default)", N =
|
|
3130
|
+
), E = r ? "var(--content-disabled)" : "var(--content-default)", N = b ? Xr : Qr, $ = _ && _.place === "left", y = _ && w !== "password" && _.place === "right", C = () => {
|
|
3122
3131
|
var D;
|
|
3123
3132
|
(D = s.current) == null || D.focus();
|
|
3124
3133
|
};
|
|
@@ -3126,7 +3135,7 @@ const Ac = (t) => {
|
|
|
3126
3135
|
I,
|
|
3127
3136
|
{
|
|
3128
3137
|
as: "div",
|
|
3129
|
-
className:
|
|
3138
|
+
className: v,
|
|
3130
3139
|
"aria-disabled": r,
|
|
3131
3140
|
"tab-index": "0",
|
|
3132
3141
|
onClick: C
|
|
@@ -3137,13 +3146,13 @@ const Ac = (t) => {
|
|
|
3137
3146
|
x(k({}, c), {
|
|
3138
3147
|
ref: s,
|
|
3139
3148
|
onFocus: (D) => {
|
|
3140
|
-
m(!0),
|
|
3149
|
+
m(!0), f == null || f(D);
|
|
3141
3150
|
},
|
|
3142
3151
|
onBlur: (D) => {
|
|
3143
3152
|
m(!1), h == null || h(D);
|
|
3144
3153
|
},
|
|
3145
3154
|
disabled: r,
|
|
3146
|
-
type: w && !
|
|
3155
|
+
type: w && !b ? w : "text"
|
|
3147
3156
|
})
|
|
3148
3157
|
),
|
|
3149
3158
|
y && sr(_, r),
|
|
@@ -3223,8 +3232,8 @@ const Ac = (t) => {
|
|
|
3223
3232
|
e.useEffect(() => {
|
|
3224
3233
|
if (!_)
|
|
3225
3234
|
return;
|
|
3226
|
-
const m = (
|
|
3227
|
-
|
|
3235
|
+
const m = (b) => {
|
|
3236
|
+
b.key === _e.esc && r();
|
|
3228
3237
|
};
|
|
3229
3238
|
return document.addEventListener("keyup", m, !0), () => document.removeEventListener("keyup", m, !0);
|
|
3230
3239
|
}, [_]);
|
|
@@ -3290,7 +3299,7 @@ const Ac = (t) => {
|
|
|
3290
3299
|
"onClose",
|
|
3291
3300
|
"contentClassName"
|
|
3292
3301
|
]);
|
|
3293
|
-
const p = u(pe[at], a), m = typeof t == "string",
|
|
3302
|
+
const p = u(pe[at], a), m = typeof t == "string", b = (g) => {
|
|
3294
3303
|
g.preventDefault(), g.stopPropagation(), c();
|
|
3295
3304
|
};
|
|
3296
3305
|
return /* @__PURE__ */ e.createElement(
|
|
@@ -3314,7 +3323,7 @@ const Ac = (t) => {
|
|
|
3314
3323
|
{
|
|
3315
3324
|
labelType: !!_,
|
|
3316
3325
|
customColor: "var(--color-white)",
|
|
3317
|
-
onClick:
|
|
3326
|
+
onClick: b
|
|
3318
3327
|
}
|
|
3319
3328
|
)),
|
|
3320
3329
|
!_ && r && /* @__PURE__ */ e.createElement("div", { className: pe[`${at}__header`] }, /* @__PURE__ */ e.createElement(
|
|
@@ -3325,7 +3334,7 @@ const Ac = (t) => {
|
|
|
3325
3334
|
className: pe[`${at}__heading`]
|
|
3326
3335
|
},
|
|
3327
3336
|
r
|
|
3328
|
-
), /* @__PURE__ */ e.createElement(ur, { onClick:
|
|
3337
|
+
), /* @__PURE__ */ e.createElement(ur, { onClick: b })),
|
|
3329
3338
|
/* @__PURE__ */ e.createElement(
|
|
3330
3339
|
"div",
|
|
3331
3340
|
{
|
|
@@ -3410,7 +3419,7 @@ const Ac = (t) => {
|
|
|
3410
3419
|
"style",
|
|
3411
3420
|
"onChange"
|
|
3412
3421
|
]);
|
|
3413
|
-
const m = e.useRef(null),
|
|
3422
|
+
const m = e.useRef(null), b = u(
|
|
3414
3423
|
ut[mt],
|
|
3415
3424
|
{
|
|
3416
3425
|
[ut[`${mt}--error`]]: a,
|
|
@@ -3418,12 +3427,12 @@ const Ac = (t) => {
|
|
|
3418
3427
|
[ut[`${mt}--disabled`]]: l
|
|
3419
3428
|
},
|
|
3420
3429
|
t
|
|
3421
|
-
), g = (y) => d(String(y)), w = (y) => _ !== void 0 && y > _ ? _ : o !== void 0 && y < o ? o : y,
|
|
3430
|
+
), g = (y) => d(String(y)), w = (y) => _ !== void 0 && y > _ ? _ : o !== void 0 && y < o ? o : y, f = (y) => {
|
|
3422
3431
|
const C = parseInt(r, 10) + y;
|
|
3423
3432
|
return g(w(C));
|
|
3424
3433
|
}, h = (y) => {
|
|
3425
|
-
y.key === _e.arrowDown && (y.preventDefault(),
|
|
3426
|
-
},
|
|
3434
|
+
y.key === _e.arrowDown && (y.preventDefault(), f(-1)), y.key === _e.arrowUp && (y.preventDefault(), f(1));
|
|
3435
|
+
}, v = (y, C) => C !== void 0 && parseInt(y, 10) === C, E = (y) => {
|
|
3427
3436
|
y.preventDefault(), y.stopPropagation();
|
|
3428
3437
|
const C = y.currentTarget.value.replace(
|
|
3429
3438
|
/((?!([-]|([-]?\d+))).)/,
|
|
@@ -3435,12 +3444,12 @@ const Ac = (t) => {
|
|
|
3435
3444
|
return g(w(D));
|
|
3436
3445
|
}, N = () => {
|
|
3437
3446
|
var y;
|
|
3438
|
-
return (y = m.current) == null || y.focus(),
|
|
3447
|
+
return (y = m.current) == null || y.focus(), f(1);
|
|
3439
3448
|
}, $ = () => {
|
|
3440
3449
|
var y;
|
|
3441
|
-
return (y = m.current) == null || y.focus(),
|
|
3450
|
+
return (y = m.current) == null || y.focus(), f(-1);
|
|
3442
3451
|
};
|
|
3443
|
-
return /* @__PURE__ */ e.createElement("div", { className:
|
|
3452
|
+
return /* @__PURE__ */ e.createElement("div", { className: b, style: i }, /* @__PURE__ */ e.createElement(
|
|
3444
3453
|
"input",
|
|
3445
3454
|
x(k({
|
|
3446
3455
|
type: "text",
|
|
@@ -3457,7 +3466,7 @@ const Ac = (t) => {
|
|
|
3457
3466
|
"button",
|
|
3458
3467
|
{
|
|
3459
3468
|
tabIndex: -1,
|
|
3460
|
-
disabled: l ||
|
|
3469
|
+
disabled: l || v(r, _),
|
|
3461
3470
|
onClick: N,
|
|
3462
3471
|
"aria-label": "Increment value",
|
|
3463
3472
|
className: ut[`${mt}__increment`],
|
|
@@ -3467,7 +3476,7 @@ const Ac = (t) => {
|
|
|
3467
3476
|
P,
|
|
3468
3477
|
{
|
|
3469
3478
|
source: ta,
|
|
3470
|
-
disabled: l ||
|
|
3479
|
+
disabled: l || v(r, _),
|
|
3471
3480
|
kind: "primary"
|
|
3472
3481
|
}
|
|
3473
3482
|
)
|
|
@@ -3475,7 +3484,7 @@ const Ac = (t) => {
|
|
|
3475
3484
|
"button",
|
|
3476
3485
|
{
|
|
3477
3486
|
tabIndex: -1,
|
|
3478
|
-
disabled: l ||
|
|
3487
|
+
disabled: l || v(r, o),
|
|
3479
3488
|
"aria-label": "Decrement value",
|
|
3480
3489
|
className: ut[`${mt}__decrement`],
|
|
3481
3490
|
onClick: $,
|
|
@@ -3486,7 +3495,7 @@ const Ac = (t) => {
|
|
|
3486
3495
|
{
|
|
3487
3496
|
source: Rt,
|
|
3488
3497
|
kind: "primary",
|
|
3489
|
-
disabled: l ||
|
|
3498
|
+
disabled: l || v(r, o)
|
|
3490
3499
|
}
|
|
3491
3500
|
)
|
|
3492
3501
|
)));
|
|
@@ -3635,15 +3644,15 @@ const ft = "select-all", Qo = (t, a) => {
|
|
|
3635
3644
|
getFloatingProps: s,
|
|
3636
3645
|
getItemProps: p,
|
|
3637
3646
|
emptyStateText: m = "No results found",
|
|
3638
|
-
pickerType:
|
|
3647
|
+
pickerType: b = "single",
|
|
3639
3648
|
listClassName: g,
|
|
3640
3649
|
virtuosoProps: w
|
|
3641
3650
|
}) => {
|
|
3642
|
-
const [
|
|
3651
|
+
const [f, h] = e.useState(0), v = o.length, E = e.useCallback(
|
|
3643
3652
|
($) => {
|
|
3644
|
-
$ !==
|
|
3653
|
+
$ !== f && ($ < _ ? h($ + (v - 1) * Ko) : h(_));
|
|
3645
3654
|
},
|
|
3646
|
-
[
|
|
3655
|
+
[v]
|
|
3647
3656
|
);
|
|
3648
3657
|
if (gt(() => {
|
|
3649
3658
|
i.current = new Array(o.length);
|
|
@@ -3678,7 +3687,7 @@ const ft = "select-all", Qo = (t, a) => {
|
|
|
3678
3687
|
"div",
|
|
3679
3688
|
k({
|
|
3680
3689
|
tabIndex: 0,
|
|
3681
|
-
"aria-multiselectable":
|
|
3690
|
+
"aria-multiselectable": b === "multi",
|
|
3682
3691
|
className: pt["listbox-wrapper"]
|
|
3683
3692
|
}, s({
|
|
3684
3693
|
onKeyDown($) {
|
|
@@ -3695,7 +3704,7 @@ const ft = "select-all", Qo = (t, a) => {
|
|
|
3695
3704
|
u_,
|
|
3696
3705
|
x(k({
|
|
3697
3706
|
totalListHeightChanged: E,
|
|
3698
|
-
style: { height: `${
|
|
3707
|
+
style: { height: `${f}px`, maxHeight: _ },
|
|
3699
3708
|
totalCount: o.length,
|
|
3700
3709
|
data: o,
|
|
3701
3710
|
increaseViewportBy: 200
|
|
@@ -3710,7 +3719,7 @@ const ft = "select-all", Qo = (t, a) => {
|
|
|
3710
3719
|
isSelected: N(y.key),
|
|
3711
3720
|
onSelect: n,
|
|
3712
3721
|
item: y,
|
|
3713
|
-
numberOfItems:
|
|
3722
|
+
numberOfItems: v
|
|
3714
3723
|
}
|
|
3715
3724
|
)
|
|
3716
3725
|
})
|
|
@@ -3749,7 +3758,7 @@ const ft = "select-all", Qo = (t, a) => {
|
|
|
3749
3758
|
isError: s,
|
|
3750
3759
|
onClear: p,
|
|
3751
3760
|
children: m,
|
|
3752
|
-
setTriggerFocus:
|
|
3761
|
+
setTriggerFocus: b
|
|
3753
3762
|
}) => {
|
|
3754
3763
|
const g = u(
|
|
3755
3764
|
ie[re],
|
|
@@ -3759,7 +3768,7 @@ const ft = "select-all", Qo = (t, a) => {
|
|
|
3759
3768
|
i && ie[`${re}--disabled`],
|
|
3760
3769
|
n && ie[`${re}--focused`],
|
|
3761
3770
|
s && ie[`${re}--error`]
|
|
3762
|
-
), w = !c && l && !i && !d,
|
|
3771
|
+
), w = !c && l && !i && !d, f = (h) => {
|
|
3763
3772
|
h.stopPropagation(), p();
|
|
3764
3773
|
};
|
|
3765
3774
|
return /* @__PURE__ */ e.createElement(
|
|
@@ -3773,8 +3782,8 @@ const ft = "select-all", Qo = (t, a) => {
|
|
|
3773
3782
|
ref: t,
|
|
3774
3783
|
type: "button"
|
|
3775
3784
|
}, a()), {
|
|
3776
|
-
onFocus: () =>
|
|
3777
|
-
onBlur: () =>
|
|
3785
|
+
onFocus: () => b(!0),
|
|
3786
|
+
onBlur: () => b(!1)
|
|
3778
3787
|
}),
|
|
3779
3788
|
/* @__PURE__ */ e.createElement(
|
|
3780
3789
|
I,
|
|
@@ -3801,7 +3810,7 @@ const ft = "select-all", Qo = (t, a) => {
|
|
|
3801
3810
|
{
|
|
3802
3811
|
"data-testid": `${re}__clear-icon`,
|
|
3803
3812
|
className: ie[`${re}__clear-icon`],
|
|
3804
|
-
onClick:
|
|
3813
|
+
onClick: f
|
|
3805
3814
|
},
|
|
3806
3815
|
/* @__PURE__ */ e.createElement(P, { kind: "primary", size: "small", source: Ae })
|
|
3807
3816
|
),
|
|
@@ -3851,7 +3860,7 @@ const ft = "select-all", Qo = (t, a) => {
|
|
|
3851
3860
|
tag__node: _l,
|
|
3852
3861
|
tag__content: ol
|
|
3853
3862
|
}, ve = "tag", ll = (t) => t ? Ua(t, "#FFFFFF") > 4.5 ? "text-white" : "text-black" : "", Mr = (w) => {
|
|
3854
|
-
var
|
|
3863
|
+
var f = w, {
|
|
3855
3864
|
className: t = "",
|
|
3856
3865
|
children: a,
|
|
3857
3866
|
dismissible: r = !1,
|
|
@@ -3865,8 +3874,8 @@ const ft = "select-all", Qo = (t, a) => {
|
|
|
3865
3874
|
rightNode: s,
|
|
3866
3875
|
customColor: p,
|
|
3867
3876
|
iconOnly: m = !1,
|
|
3868
|
-
value:
|
|
3869
|
-
} =
|
|
3877
|
+
value: b
|
|
3878
|
+
} = f, g = F(f, [
|
|
3870
3879
|
"className",
|
|
3871
3880
|
"children",
|
|
3872
3881
|
"dismissible",
|
|
@@ -3882,7 +3891,7 @@ const ft = "select-all", Qo = (t, a) => {
|
|
|
3882
3891
|
"iconOnly",
|
|
3883
3892
|
"value"
|
|
3884
3893
|
]);
|
|
3885
|
-
const h = _ || i && m,
|
|
3894
|
+
const h = _ || i && m, v = u(
|
|
3886
3895
|
fe[ve],
|
|
3887
3896
|
t,
|
|
3888
3897
|
fe[`${ve}--${l}`],
|
|
@@ -3906,7 +3915,7 @@ const ft = "select-all", Qo = (t, a) => {
|
|
|
3906
3915
|
return /* @__PURE__ */ e.createElement(
|
|
3907
3916
|
I,
|
|
3908
3917
|
x(k(k({
|
|
3909
|
-
className:
|
|
3918
|
+
className: v
|
|
3910
3919
|
}, g), $()), {
|
|
3911
3920
|
as: "div",
|
|
3912
3921
|
size: N
|
|
@@ -3919,7 +3928,7 @@ const ft = "select-all", Qo = (t, a) => {
|
|
|
3919
3928
|
style: { color: y() }
|
|
3920
3929
|
},
|
|
3921
3930
|
n
|
|
3922
|
-
), /* @__PURE__ */ e.createElement("div", { className: fe[`${ve}__content`] },
|
|
3931
|
+
), /* @__PURE__ */ e.createElement("div", { className: fe[`${ve}__content`] }, b || a), s && !m && /* @__PURE__ */ e.createElement(
|
|
3923
3932
|
"div",
|
|
3924
3933
|
{
|
|
3925
3934
|
"data-testid": "lc-tag-right-node",
|
|
@@ -3983,18 +3992,18 @@ const ft = "select-all", Qo = (t, a) => {
|
|
|
3983
3992
|
onFilter: s,
|
|
3984
3993
|
onClear: p,
|
|
3985
3994
|
searchPhrase: m,
|
|
3986
|
-
virtualItemRef:
|
|
3995
|
+
virtualItemRef: b,
|
|
3987
3996
|
isTriggerFocused: g
|
|
3988
3997
|
}) => {
|
|
3989
|
-
const w = t && !a,
|
|
3998
|
+
const w = t && !a, f = e.useRef(null);
|
|
3990
3999
|
e.useEffect(() => {
|
|
3991
|
-
c && (s(""),
|
|
4000
|
+
c && (s(""), f.current && (f.current.value = "", f.current.focus()));
|
|
3992
4001
|
}, [o, c]);
|
|
3993
4002
|
const h = (y) => {
|
|
3994
4003
|
y.key === "Backspace" && o && o.length > 0 && (y.preventDefault(), l === "multi" ? d(o[o.length - 1].key) : p()), y.key === "Delete" && (y.preventDefault(), p());
|
|
3995
4004
|
};
|
|
3996
4005
|
e.useEffect(() => (!t && g ? document.addEventListener("keydown", h) : document.removeEventListener("keydown", h), () => document.removeEventListener("keydown", h)), [t, o, g]);
|
|
3997
|
-
const
|
|
4006
|
+
const v = (y) => l === "single" && t && !a ? null : y != null && y.customElement ? /* @__PURE__ */ e.createElement("div", { className: de[`${ue}__item`] }, y.customElement.selectedItemBody) : /* @__PURE__ */ e.createElement("div", { className: de[`${ue}__item`] }, y.icon && /* @__PURE__ */ e.createElement(
|
|
3998
4007
|
P,
|
|
3999
4008
|
{
|
|
4000
4009
|
source: y.icon,
|
|
@@ -4009,11 +4018,11 @@ const ft = "select-all", Qo = (t, a) => {
|
|
|
4009
4018
|
}
|
|
4010
4019
|
), /* @__PURE__ */ e.createElement("div", { className: de[`${ue}__item__content`] }, y.name)), E = (y) => s(y.target.value), N = (y) => {
|
|
4011
4020
|
var C, D;
|
|
4012
|
-
(C =
|
|
4021
|
+
(C = b.current) != null && C.id && y.key === "Enter" && n((D = b.current) == null ? void 0 : D.id), l === "multi" && (y.key === "Backspace" || y.key === "Delete") && !m && o && (o == null ? void 0 : o.length) > 0 && d(o[o.length - 1].key);
|
|
4013
4022
|
}, $ = () => /* @__PURE__ */ e.createElement(
|
|
4014
4023
|
"input",
|
|
4015
4024
|
{
|
|
4016
|
-
ref:
|
|
4025
|
+
ref: f,
|
|
4017
4026
|
className: u(
|
|
4018
4027
|
de[`${ue}__input`],
|
|
4019
4028
|
de[`${ue}__input--${i}`]
|
|
@@ -4041,7 +4050,7 @@ const ft = "select-all", Qo = (t, a) => {
|
|
|
4041
4050
|
[de[`${ue}--single`]]: l === "single"
|
|
4042
4051
|
})
|
|
4043
4052
|
},
|
|
4044
|
-
/* @__PURE__ */ e.createElement("div", { className: de[`${ue}__item-container`] }, l === "single" ?
|
|
4053
|
+
/* @__PURE__ */ e.createElement("div", { className: de[`${ue}__item-container`] }, l === "single" ? v(o[0]) : o.map((y) => /* @__PURE__ */ e.createElement(
|
|
4045
4054
|
Mr,
|
|
4046
4055
|
{
|
|
4047
4056
|
key: y.name,
|
|
@@ -4054,7 +4063,7 @@ const ft = "select-all", Qo = (t, a) => {
|
|
|
4054
4063
|
C.stopPropagation(), d(y.key);
|
|
4055
4064
|
}
|
|
4056
4065
|
},
|
|
4057
|
-
|
|
4066
|
+
v(y)
|
|
4058
4067
|
))),
|
|
4059
4068
|
w && $()
|
|
4060
4069
|
);
|
|
@@ -4070,7 +4079,7 @@ const ft = "select-all", Qo = (t, a) => {
|
|
|
4070
4079
|
isOpen: d,
|
|
4071
4080
|
onVisibilityChange: n
|
|
4072
4081
|
}) => {
|
|
4073
|
-
const s = aa(), [p, m] = e.useState(!1), [
|
|
4082
|
+
const s = aa(), [p, m] = e.useState(!1), [b, g] = e.useState(null), [w, f] = e.useState(o), h = e.useRef([]), v = e.useRef(null), { refs: E, floatingStyles: N, context: $, isPositioned: y } = ra({
|
|
4074
4083
|
nodeId: s,
|
|
4075
4084
|
open: d,
|
|
4076
4085
|
strategy: l,
|
|
@@ -4084,7 +4093,7 @@ const ft = "select-all", Qo = (t, a) => {
|
|
|
4084
4093
|
Er({
|
|
4085
4094
|
apply({ availableHeight: q, rects: he, elements: oe }) {
|
|
4086
4095
|
Cr.flushSync(() => {
|
|
4087
|
-
|
|
4096
|
+
f(
|
|
4088
4097
|
Math.max(
|
|
4089
4098
|
Math.min(o, q),
|
|
4090
4099
|
_
|
|
@@ -4104,10 +4113,10 @@ const ft = "select-all", Qo = (t, a) => {
|
|
|
4104
4113
|
}, i)), D = sa($, { role: "listbox" }), L = na($, c), G = s_($, {
|
|
4105
4114
|
enabled: a.length > 0 && !t,
|
|
4106
4115
|
listRef: h,
|
|
4107
|
-
activeIndex:
|
|
4116
|
+
activeIndex: b,
|
|
4108
4117
|
onNavigate: g,
|
|
4109
4118
|
virtual: !0,
|
|
4110
|
-
virtualItemRef:
|
|
4119
|
+
virtualItemRef: v,
|
|
4111
4120
|
disabledIndices: Qo(
|
|
4112
4121
|
a,
|
|
4113
4122
|
(q) => !!q.disabled || !!q.groupHeader
|
|
@@ -4125,9 +4134,9 @@ const ft = "select-all", Qo = (t, a) => {
|
|
|
4125
4134
|
context: $,
|
|
4126
4135
|
nodeId: s,
|
|
4127
4136
|
setFloating: E.setFloating,
|
|
4128
|
-
activeIndex:
|
|
4137
|
+
activeIndex: b,
|
|
4129
4138
|
listElementsRef: h,
|
|
4130
|
-
virtualItemRef:
|
|
4139
|
+
virtualItemRef: v,
|
|
4131
4140
|
maxHeight: w,
|
|
4132
4141
|
pointer: p,
|
|
4133
4142
|
setPointer: m
|
|
@@ -4144,25 +4153,25 @@ const ft = "select-all", Qo = (t, a) => {
|
|
|
4144
4153
|
() => (t == null ? void 0 : t.map(Sa)) || []
|
|
4145
4154
|
), d = t !== void 0, n = d ? (t == null ? void 0 : t.map(Sa)) || [] : c, [s, p] = e.useState(""), m = e.useMemo(() => {
|
|
4146
4155
|
const h = r === "multi" && _;
|
|
4147
|
-
let
|
|
4148
|
-
return s && (
|
|
4156
|
+
let v = a;
|
|
4157
|
+
return s && (v = v.filter((E) => {
|
|
4149
4158
|
var C;
|
|
4150
4159
|
if (E.groupHeader)
|
|
4151
4160
|
return !1;
|
|
4152
4161
|
const N = s.toLowerCase(), $ = E.name.toLowerCase(), y = (C = E.secondaryText) == null ? void 0 : C.toLowerCase();
|
|
4153
4162
|
return $.includes(N) || (y == null ? void 0 : y.includes(N));
|
|
4154
|
-
})), h &&
|
|
4163
|
+
})), h && v.length > 1 && (v = [
|
|
4155
4164
|
{
|
|
4156
4165
|
key: ft,
|
|
4157
4166
|
name: _
|
|
4158
4167
|
},
|
|
4159
|
-
...
|
|
4160
|
-
]),
|
|
4161
|
-
}, [s, a, r, _]),
|
|
4162
|
-
const
|
|
4163
|
-
if (!((!
|
|
4168
|
+
...v
|
|
4169
|
+
]), v;
|
|
4170
|
+
}, [s, a, r, _]), b = (h) => {
|
|
4171
|
+
const v = a.find((E) => E.key === h);
|
|
4172
|
+
if (!((!v || v.disabled) && h !== ft))
|
|
4164
4173
|
if (r === "single")
|
|
4165
|
-
i(() => (
|
|
4174
|
+
i(() => (v && o([v]), [h])), l(!1);
|
|
4166
4175
|
else if (h === ft)
|
|
4167
4176
|
n.length === Ma(a).length ? i(() => (o(null), [])) : i(() => {
|
|
4168
4177
|
const E = Ma(a);
|
|
@@ -4181,9 +4190,9 @@ const ft = "select-all", Qo = (t, a) => {
|
|
|
4181
4190
|
selectedKeys: n,
|
|
4182
4191
|
items: m,
|
|
4183
4192
|
searchPhrase: s,
|
|
4184
|
-
handleSelect:
|
|
4193
|
+
handleSelect: b,
|
|
4185
4194
|
handleOnFilter: (h) => p(h),
|
|
4186
|
-
handleItemRemove: (h) =>
|
|
4195
|
+
handleItemRemove: (h) => b(h),
|
|
4187
4196
|
handleClear: () => {
|
|
4188
4197
|
!d && i([]), o(null), p(""), l(!1);
|
|
4189
4198
|
}
|
|
@@ -4205,12 +4214,12 @@ const ft = "select-all", Qo = (t, a) => {
|
|
|
4205
4214
|
placeholder: s = "Select option",
|
|
4206
4215
|
isRequired: p,
|
|
4207
4216
|
noSearchResultText: m = "No results found",
|
|
4208
|
-
selectAllOptionText:
|
|
4217
|
+
selectAllOptionText: b,
|
|
4209
4218
|
type: g = "single",
|
|
4210
4219
|
searchDisabled: w = !1,
|
|
4211
|
-
hideClearButton:
|
|
4220
|
+
hideClearButton: f,
|
|
4212
4221
|
isVisible: h,
|
|
4213
|
-
onOpen:
|
|
4222
|
+
onOpen: v,
|
|
4214
4223
|
onClose: E,
|
|
4215
4224
|
openedOnInit: N = !1,
|
|
4216
4225
|
clearSearchAfterSelection: $,
|
|
@@ -4251,7 +4260,7 @@ const ft = "select-all", Qo = (t, a) => {
|
|
|
4251
4260
|
"virtuosoProps"
|
|
4252
4261
|
]);
|
|
4253
4262
|
const [he, oe] = e.useState(N), [Ee, Oe] = e.useState(!1), $e = h !== void 0, Pe = $e ? h : he, je = (ht, ce) => {
|
|
4254
|
-
ht ? !Pe && (
|
|
4263
|
+
ht ? !Pe && (v == null || v(ce)) : Pe && (E == null || E(ce)), !$e && oe(ht);
|
|
4255
4264
|
}, {
|
|
4256
4265
|
selectedKeys: lt,
|
|
4257
4266
|
items: ct,
|
|
@@ -4264,7 +4273,7 @@ const ft = "select-all", Qo = (t, a) => {
|
|
|
4264
4273
|
selected: d,
|
|
4265
4274
|
options: i,
|
|
4266
4275
|
type: g,
|
|
4267
|
-
selectAllOptionText:
|
|
4276
|
+
selectAllOptionText: b,
|
|
4268
4277
|
onSelect: y,
|
|
4269
4278
|
setOpen: je
|
|
4270
4279
|
}), {
|
|
@@ -4303,7 +4312,7 @@ const ft = "select-all", Qo = (t, a) => {
|
|
|
4303
4312
|
isItemSelected: lt.length > 0,
|
|
4304
4313
|
isOpen: Pe,
|
|
4305
4314
|
onClear: Ie,
|
|
4306
|
-
hideClearButton:
|
|
4315
|
+
hideClearButton: f,
|
|
4307
4316
|
isDisabled: l,
|
|
4308
4317
|
isError: c,
|
|
4309
4318
|
isRequired: p,
|
|
@@ -4368,20 +4377,20 @@ const ft = "select-all", Qo = (t, a) => {
|
|
|
4368
4377
|
openedOnInit: s,
|
|
4369
4378
|
closeOnEsc: p = !0,
|
|
4370
4379
|
useDismissHookProps: m,
|
|
4371
|
-
useClickHookProps:
|
|
4380
|
+
useClickHookProps: b,
|
|
4372
4381
|
floatingStrategy: g
|
|
4373
4382
|
}) => {
|
|
4374
|
-
const [w,
|
|
4375
|
-
Oe ? r == null || r($e) : a == null || a($e), !E &&
|
|
4383
|
+
const [w, f] = e.useState(s), h = Ha(), v = aa(), E = n !== void 0, N = E ? n : w, $ = typeof _ == "string", y = typeof t == "function", C = (Oe, $e) => {
|
|
4384
|
+
Oe ? r == null || r($e) : a == null || a($e), !E && f(Oe);
|
|
4376
4385
|
}, { refs: D, context: L, floatingStyles: G } = ra({
|
|
4377
|
-
nodeId:
|
|
4386
|
+
nodeId: v,
|
|
4378
4387
|
open: N,
|
|
4379
4388
|
onOpenChange: C,
|
|
4380
4389
|
middleware: [_a(d), oa(i), Ga()],
|
|
4381
4390
|
placement: c,
|
|
4382
4391
|
strategy: g,
|
|
4383
4392
|
whileElementsMounted: la
|
|
4384
|
-
}), T = ca(L,
|
|
4393
|
+
}), T = ca(L, b), M = na(L, k({
|
|
4385
4394
|
escapeKey: p
|
|
4386
4395
|
}, m)), V = sa(L), { getReferenceProps: q, getFloatingProps: he } = ia([
|
|
4387
4396
|
T,
|
|
@@ -4396,7 +4405,7 @@ const ft = "select-all", Qo = (t, a) => {
|
|
|
4396
4405
|
className: l
|
|
4397
4406
|
}),
|
|
4398
4407
|
y ? t() : t
|
|
4399
|
-
), /* @__PURE__ */ e.createElement(da, { id:
|
|
4408
|
+
), /* @__PURE__ */ e.createElement(da, { id: v }, N && /* @__PURE__ */ e.createElement(Pa, { context: L, modal: !1 }, /* @__PURE__ */ e.createElement(
|
|
4400
4409
|
"div",
|
|
4401
4410
|
k({
|
|
4402
4411
|
className: oe,
|
|
@@ -4449,7 +4458,7 @@ const Dt = {
|
|
|
4449
4458
|
[Dt[`${Bt}--${t}`]]: t
|
|
4450
4459
|
},
|
|
4451
4460
|
r
|
|
4452
|
-
), m = 2 * Math.PI * ((s - n) / 2),
|
|
4461
|
+
), m = 2 * Math.PI * ((s - n) / 2), b = {
|
|
4453
4462
|
strokeDasharray: m.toFixed(3),
|
|
4454
4463
|
strokeDashoffset: `${((100 - d) / 100 * m).toFixed(3)}px`
|
|
4455
4464
|
}, g = `${s / 2} ${s / 2} ${s} ${s}`;
|
|
@@ -4474,7 +4483,7 @@ const Dt = {
|
|
|
4474
4483
|
"circle",
|
|
4475
4484
|
{
|
|
4476
4485
|
className: Dt[`${Bt}__indicator--${t}`],
|
|
4477
|
-
style:
|
|
4486
|
+
style: b,
|
|
4478
4487
|
cx: s,
|
|
4479
4488
|
cy: s,
|
|
4480
4489
|
r: (s - n) / 2,
|
|
@@ -4556,7 +4565,7 @@ const Dt = {
|
|
|
4556
4565
|
onClose: d,
|
|
4557
4566
|
onLinkClick: n
|
|
4558
4567
|
}) => {
|
|
4559
|
-
const s = e.useRef(null), [p, m] = e.useState("medium"),
|
|
4568
|
+
const s = e.useRef(null), [p, m] = e.useState("medium"), b = u(
|
|
4560
4569
|
Ne[Ce],
|
|
4561
4570
|
{
|
|
4562
4571
|
[Ne[`${Ce}--light`]]: l,
|
|
@@ -4566,12 +4575,12 @@ const Dt = {
|
|
|
4566
4575
|
t
|
|
4567
4576
|
);
|
|
4568
4577
|
e.useEffect(() => {
|
|
4569
|
-
const w = () => s.current && s.current.offsetWidth <= hl ? m("small") : s.current && s.current.offsetWidth >= kl ? m("large") : m("medium"),
|
|
4578
|
+
const w = () => s.current && s.current.offsetWidth <= hl ? m("small") : s.current && s.current.offsetWidth >= kl ? m("large") : m("medium"), f = xr(
|
|
4570
4579
|
w,
|
|
4571
4580
|
yl
|
|
4572
4581
|
);
|
|
4573
|
-
return window.addEventListener("resize",
|
|
4574
|
-
|
|
4582
|
+
return window.addEventListener("resize", f), w(), () => {
|
|
4583
|
+
f.cancel(), window.removeEventListener("resize", f);
|
|
4575
4584
|
};
|
|
4576
4585
|
}, []);
|
|
4577
4586
|
const g = /* @__PURE__ */ e.createElement("div", { className: Ne[`${Ce}__footer`] }, a && /* @__PURE__ */ e.createElement(
|
|
@@ -4584,7 +4593,7 @@ const Dt = {
|
|
|
4584
4593
|
},
|
|
4585
4594
|
a
|
|
4586
4595
|
), c && /* @__PURE__ */ e.createElement(W, { size: "compact", kind: "text", onClick: n }, c));
|
|
4587
|
-
return /* @__PURE__ */ e.createElement("div", { ref: s, className:
|
|
4596
|
+
return /* @__PURE__ */ e.createElement("div", { ref: s, className: b }, /* @__PURE__ */ e.createElement("div", { className: Ne[`${Ce}__content`] }, o && /* @__PURE__ */ e.createElement("img", { src: o, className: Ne[`${Ce}__img`] }), /* @__PURE__ */ e.createElement("div", { className: Ne[`${Ce}__wrapper`] }, /* @__PURE__ */ e.createElement("div", { className: Ne[`${Ce}__header`] }, _), /* @__PURE__ */ e.createElement(I, { as: "div" }, r), p !== "large" && g), p === "large" && g), d && /* @__PURE__ */ e.createElement(
|
|
4588
4597
|
"button",
|
|
4589
4598
|
{
|
|
4590
4599
|
type: "button",
|
|
@@ -4722,7 +4731,7 @@ const Dt = {
|
|
|
4722
4731
|
cropOnBlur: i = !0,
|
|
4723
4732
|
onChange: d
|
|
4724
4733
|
}) => {
|
|
4725
|
-
const [n, s] = e.useState(!0), [p, m] = e.useState(!1),
|
|
4734
|
+
const [n, s] = e.useState(!0), [p, m] = e.useState(!1), b = e.useRef(null), g = !!l && !a && !r, w = t && !n && "true", f = u(
|
|
4726
4735
|
c,
|
|
4727
4736
|
xe[Me],
|
|
4728
4737
|
xe[`${Me}--${o}`],
|
|
@@ -4737,11 +4746,11 @@ const Dt = {
|
|
|
4737
4746
|
const h = (C) => {
|
|
4738
4747
|
const D = C.currentTarget.value;
|
|
4739
4748
|
d(D);
|
|
4740
|
-
},
|
|
4749
|
+
}, v = () => {
|
|
4741
4750
|
d("");
|
|
4742
4751
|
}, E = () => {
|
|
4743
4752
|
var C;
|
|
4744
|
-
(C =
|
|
4753
|
+
(C = b.current) == null || C.focus();
|
|
4745
4754
|
}, N = () => {
|
|
4746
4755
|
t && s(!1), m(!0);
|
|
4747
4756
|
}, $ = () => {
|
|
@@ -4754,7 +4763,7 @@ const Dt = {
|
|
|
4754
4763
|
{
|
|
4755
4764
|
"aria-expanded": w,
|
|
4756
4765
|
role: "search",
|
|
4757
|
-
className:
|
|
4766
|
+
className: f,
|
|
4758
4767
|
onClick: E
|
|
4759
4768
|
},
|
|
4760
4769
|
/* @__PURE__ */ e.createElement(
|
|
@@ -4779,7 +4788,7 @@ const Dt = {
|
|
|
4779
4788
|
"input",
|
|
4780
4789
|
{
|
|
4781
4790
|
role: "searchbox",
|
|
4782
|
-
ref:
|
|
4791
|
+
ref: b,
|
|
4783
4792
|
type: "text",
|
|
4784
4793
|
value: l,
|
|
4785
4794
|
placeholder: _,
|
|
@@ -4797,7 +4806,7 @@ const Dt = {
|
|
|
4797
4806
|
"aria-label": "Clear search",
|
|
4798
4807
|
title: "Clear search",
|
|
4799
4808
|
className: xe[`${Me}__clear-icon`],
|
|
4800
|
-
onClick:
|
|
4809
|
+
onClick: v,
|
|
4801
4810
|
icon: /* @__PURE__ */ e.createElement(P, { source: Ae, kind: "primary" }),
|
|
4802
4811
|
kind: "text",
|
|
4803
4812
|
size: "compact"
|
|
@@ -4922,17 +4931,17 @@ const Dt = {
|
|
|
4922
4931
|
"innerRef",
|
|
4923
4932
|
"ariaLabel"
|
|
4924
4933
|
]);
|
|
4925
|
-
const
|
|
4926
|
-
() =>
|
|
4927
|
-
), [
|
|
4934
|
+
const b = o !== void 0, [g, w] = e.useState(
|
|
4935
|
+
() => b ? o : a
|
|
4936
|
+
), [f, h] = e.useState(!1), v = b ? o : g, E = i === "loading", N = i === "locked", $ = c === "large" ? "small" : "xsmall", y = v ? "on" : "off", C = r || E || N, D = C ? "disabled" : "enabled", L = u(
|
|
4928
4937
|
Q[X],
|
|
4929
4938
|
Q[`${X}--${c}`],
|
|
4930
4939
|
{
|
|
4931
|
-
[Q[`${X}--focused`]]:
|
|
4940
|
+
[Q[`${X}--focused`]]: f
|
|
4932
4941
|
},
|
|
4933
4942
|
t
|
|
4934
4943
|
), G = (T) => {
|
|
4935
|
-
l == null || l(T, !
|
|
4944
|
+
l == null || l(T, !v), b || (T.stopPropagation(), w((M) => !M));
|
|
4936
4945
|
};
|
|
4937
4946
|
return /* @__PURE__ */ e.createElement("span", { className: L }, /* @__PURE__ */ e.createElement(
|
|
4938
4947
|
"input",
|
|
@@ -4943,7 +4952,7 @@ const Dt = {
|
|
|
4943
4952
|
Q[`${X}__input--${D}`]
|
|
4944
4953
|
),
|
|
4945
4954
|
onChange: G,
|
|
4946
|
-
checked:
|
|
4955
|
+
checked: v,
|
|
4947
4956
|
name: _,
|
|
4948
4957
|
ref: d,
|
|
4949
4958
|
disabled: C,
|
|
@@ -4956,7 +4965,7 @@ const Dt = {
|
|
|
4956
4965
|
"span",
|
|
4957
4966
|
{
|
|
4958
4967
|
className: u(Q[`${X}__container`], {
|
|
4959
|
-
[Q[`${X}__container--focused`]]:
|
|
4968
|
+
[Q[`${X}__container--focused`]]: f
|
|
4960
4969
|
})
|
|
4961
4970
|
},
|
|
4962
4971
|
/* @__PURE__ */ e.createElement(
|
|
@@ -5102,7 +5111,7 @@ const Dt = {
|
|
|
5102
5111
|
}
|
|
5103
5112
|
_(g.innerText);
|
|
5104
5113
|
}
|
|
5105
|
-
},
|
|
5114
|
+
}, b = (g) => {
|
|
5106
5115
|
g.preventDefault();
|
|
5107
5116
|
const w = g.clipboardData.getData("text/plain");
|
|
5108
5117
|
document.execCommand("insertHTML", !1, Xa(w));
|
|
@@ -5113,7 +5122,7 @@ const Dt = {
|
|
|
5113
5122
|
ref: a,
|
|
5114
5123
|
className: t,
|
|
5115
5124
|
contentEditable: !0,
|
|
5116
|
-
onPaste:
|
|
5125
|
+
onPaste: b,
|
|
5117
5126
|
onBlur: m,
|
|
5118
5127
|
onKeyDown: p,
|
|
5119
5128
|
dangerouslySetInnerHTML: { __html: Xa(l) }
|
|
@@ -5149,7 +5158,7 @@ const Dt = {
|
|
|
5149
5158
|
_e.semicolon,
|
|
5150
5159
|
_e.comma
|
|
5151
5160
|
], Ll = [_e.backspace, _e.delete], Ol = (m) => {
|
|
5152
|
-
var
|
|
5161
|
+
var b = m, {
|
|
5153
5162
|
id: t,
|
|
5154
5163
|
tags: a,
|
|
5155
5164
|
onChange: r,
|
|
@@ -5161,7 +5170,7 @@ const Dt = {
|
|
|
5161
5170
|
inputClassName: d,
|
|
5162
5171
|
onBlur: n,
|
|
5163
5172
|
addOnBlur: s = !0
|
|
5164
|
-
} =
|
|
5173
|
+
} = b, p = F(b, [
|
|
5165
5174
|
"id",
|
|
5166
5175
|
"tags",
|
|
5167
5176
|
"onChange",
|
|
@@ -5184,23 +5193,23 @@ const Dt = {
|
|
|
5184
5193
|
d,
|
|
5185
5194
|
It[`${Xt}__input`],
|
|
5186
5195
|
It[`${Xt}__input--${c}`]
|
|
5187
|
-
), [
|
|
5196
|
+
), [f, h] = e.useState(""), v = e.useRef(null), E = (T) => {
|
|
5188
5197
|
T.trim() !== "" && (r([...a || [], T]), h(""));
|
|
5189
5198
|
}, N = (T) => {
|
|
5190
5199
|
const M = [...a || []];
|
|
5191
5200
|
M.splice(T, 1), r(M);
|
|
5192
5201
|
}, $ = (T) => h(T.target.value), y = (T) => {
|
|
5193
5202
|
if (Ml.includes(T.key)) {
|
|
5194
|
-
if (T.preventDefault(),
|
|
5203
|
+
if (T.preventDefault(), f === "")
|
|
5195
5204
|
return;
|
|
5196
|
-
E(
|
|
5205
|
+
E(f);
|
|
5197
5206
|
} else if (Ll.includes(T.key)) {
|
|
5198
|
-
if (
|
|
5207
|
+
if (f !== "" || !(a != null && a.length))
|
|
5199
5208
|
return;
|
|
5200
5209
|
N(a.length - 1);
|
|
5201
5210
|
}
|
|
5202
5211
|
}, C = (T) => {
|
|
5203
|
-
s && E(
|
|
5212
|
+
s && E(f), n == null || n(T);
|
|
5204
5213
|
}, D = (T, M) => {
|
|
5205
5214
|
const V = [...a || []];
|
|
5206
5215
|
V.reduce(
|
|
@@ -5218,7 +5227,7 @@ const Dt = {
|
|
|
5218
5227
|
key: `${M}${T}`,
|
|
5219
5228
|
update: D,
|
|
5220
5229
|
remove: N,
|
|
5221
|
-
inputRef:
|
|
5230
|
+
inputRef: v,
|
|
5222
5231
|
validator: _,
|
|
5223
5232
|
size: c
|
|
5224
5233
|
},
|
|
@@ -5230,7 +5239,7 @@ const Dt = {
|
|
|
5230
5239
|
key: `${M}${T.children}`,
|
|
5231
5240
|
update: D,
|
|
5232
5241
|
remove: N,
|
|
5233
|
-
inputRef:
|
|
5242
|
+
inputRef: v,
|
|
5234
5243
|
validator: _,
|
|
5235
5244
|
size: c,
|
|
5236
5245
|
tagProps: T
|
|
@@ -5241,10 +5250,10 @@ const Dt = {
|
|
|
5241
5250
|
"input",
|
|
5242
5251
|
x(k({}, p), {
|
|
5243
5252
|
id: t,
|
|
5244
|
-
ref:
|
|
5253
|
+
ref: v,
|
|
5245
5254
|
className: w,
|
|
5246
5255
|
placeholder: l,
|
|
5247
|
-
value:
|
|
5256
|
+
value: f,
|
|
5248
5257
|
onChange: $,
|
|
5249
5258
|
onKeyDown: y,
|
|
5250
5259
|
onPaste: L,
|
|
@@ -5362,7 +5371,7 @@ const Dt = {
|
|
|
5362
5371
|
},
|
|
5363
5372
|
t
|
|
5364
5373
|
);
|
|
5365
|
-
return /* @__PURE__ */ e.createElement("div", { className: i }, /* @__PURE__ */ e.createElement(Tr, { component: null }, a.map(({ id: d, kind: n, content: s, removable: p, action: m, onClose:
|
|
5374
|
+
return /* @__PURE__ */ e.createElement("div", { className: i }, /* @__PURE__ */ e.createElement(Tr, { component: null }, a.map(({ id: d, kind: n, content: s, removable: p, action: m, onClose: b }) => /* @__PURE__ */ e.createElement(
|
|
5366
5375
|
Dr,
|
|
5367
5376
|
{
|
|
5368
5377
|
key: d,
|
|
@@ -5378,7 +5387,7 @@ const Dt = {
|
|
|
5378
5387
|
Kl,
|
|
5379
5388
|
{
|
|
5380
5389
|
kind: n,
|
|
5381
|
-
onClose:
|
|
5390
|
+
onClose: b,
|
|
5382
5391
|
removable: p,
|
|
5383
5392
|
action: m
|
|
5384
5393
|
},
|
|
@@ -5399,14 +5408,14 @@ const Dt = {
|
|
|
5399
5408
|
[Qt[`${jt}--error`]]: a
|
|
5400
5409
|
}), m = (g) => {
|
|
5401
5410
|
s(!1), i == null || i(g);
|
|
5402
|
-
},
|
|
5411
|
+
}, b = (g) => {
|
|
5403
5412
|
s(!0), d == null || d(g);
|
|
5404
5413
|
};
|
|
5405
5414
|
return /* @__PURE__ */ e.createElement(I, { as: "div", className: p }, /* @__PURE__ */ e.createElement(
|
|
5406
5415
|
"textarea",
|
|
5407
5416
|
x(k({}, r), {
|
|
5408
5417
|
ref: _,
|
|
5409
|
-
onFocus:
|
|
5418
|
+
onFocus: b,
|
|
5410
5419
|
onBlur: m
|
|
5411
5420
|
})
|
|
5412
5421
|
));
|
|
@@ -5562,11 +5571,11 @@ const Dt = {
|
|
|
5562
5571
|
onCloseButtonClick: s,
|
|
5563
5572
|
onRetryButtonClick: p
|
|
5564
5573
|
}) => {
|
|
5565
|
-
const [m,
|
|
5574
|
+
const [m, b] = e.useState(o || !1), g = c === "error", w = c === "success", f = u(z[me], a, {
|
|
5566
5575
|
[z[`${me}--error`]]: g,
|
|
5567
5576
|
[z[`${me}--success`]]: w
|
|
5568
|
-
}), h = !(g && (p || s)),
|
|
5569
|
-
return n === "single" ? /* @__PURE__ */ e.createElement("div", { className:
|
|
5577
|
+
}), h = !(g && (p || s)), v = () => b(!m);
|
|
5578
|
+
return n === "single" ? /* @__PURE__ */ e.createElement("div", { className: f }, /* @__PURE__ */ e.createElement("div", { className: z[`${me}__wrapper`] }, /* @__PURE__ */ e.createElement("div", { className: z[`${Je}`] }, /* @__PURE__ */ e.createElement(
|
|
5570
5579
|
Ql,
|
|
5571
5580
|
{
|
|
5572
5581
|
title: g && l || _,
|
|
@@ -5582,11 +5591,11 @@ const Dt = {
|
|
|
5582
5591
|
onCloseButtonClick: s,
|
|
5583
5592
|
onRetryButtonClick: p
|
|
5584
5593
|
}
|
|
5585
|
-
))) : /* @__PURE__ */ e.createElement("div", { className:
|
|
5594
|
+
))) : /* @__PURE__ */ e.createElement("div", { className: f }, /* @__PURE__ */ e.createElement(
|
|
5586
5595
|
"div",
|
|
5587
5596
|
{
|
|
5588
5597
|
className: z[`${me}__wrapper`],
|
|
5589
|
-
onClick:
|
|
5598
|
+
onClick: v
|
|
5590
5599
|
},
|
|
5591
5600
|
/* @__PURE__ */ e.createElement("div", { className: z[`${Je}`] }, /* @__PURE__ */ e.createElement("div", { className: z[`${Je}__icon`] }, Zl(c, r)), /* @__PURE__ */ e.createElement("div", { className: z[`${Je}__title`] }, /* @__PURE__ */ e.createElement(I, { size: "sm", as: "div" }, g ? l : _)), h && /* @__PURE__ */ e.createElement(
|
|
5592
5601
|
"button",
|
|
@@ -5594,7 +5603,7 @@ const Dt = {
|
|
|
5594
5603
|
className: z[`${Je}__collapse-button`],
|
|
5595
5604
|
type: "button",
|
|
5596
5605
|
"aria-label": "Collapse button",
|
|
5597
|
-
onClick:
|
|
5606
|
+
onClick: v
|
|
5598
5607
|
},
|
|
5599
5608
|
m ? /* @__PURE__ */ e.createElement(P, { source: ta }) : /* @__PURE__ */ e.createElement(P, { source: Rt })
|
|
5600
5609
|
), c === "error" && /* @__PURE__ */ e.createElement("div", { className: z[`${Je}__actions-container`] }, /* @__PURE__ */ e.createElement(
|