@livechat/design-system-react-components 1.17.1-alpha.2 → 1.17.1-alpha.4
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/chunks/{Tooltip-f6f4f9c2.js → Tooltip-1c5cb6fe.js} +5 -4
- package/dist/chunks/Tooltip-f9f79274.js +1 -0
- package/dist/components/ActionBar/index.cjs.js +1 -1
- package/dist/components/ActionBar/index.es.js +2 -2
- package/dist/components/ActionMenu/index.cjs.js +1 -1
- package/dist/components/ActionMenu/index.es.js +1 -1
- package/dist/components/Alert/index.cjs.js +1 -1
- package/dist/components/Alert/index.es.js +1 -1
- package/dist/components/Avatar/index.cjs.js +1 -1
- package/dist/components/Avatar/index.es.js +1 -1
- package/dist/components/Button/index.cjs.js +1 -1
- package/dist/components/Button/index.es.js +1 -1
- package/dist/components/Card/index.cjs.js +1 -1
- package/dist/components/Card/index.es.js +1 -1
- package/dist/components/Checkbox/index.cjs.js +1 -1
- package/dist/components/Checkbox/index.es.js +1 -1
- package/dist/components/DatePicker/index.cjs.js +1 -1
- package/dist/components/DatePicker/index.es.js +82 -82
- package/dist/components/DetailsCard/index.cjs.js +1 -1
- package/dist/components/DetailsCard/index.es.js +1 -1
- package/dist/components/FieldDescription/index.cjs.js +1 -1
- package/dist/components/FieldDescription/index.es.js +1 -1
- package/dist/components/FieldError/index.cjs.js +1 -1
- package/dist/components/FieldError/index.es.js +1 -1
- package/dist/components/FieldGroup/index.cjs.js +1 -1
- package/dist/components/FieldGroup/index.es.js +1 -1
- package/dist/components/FileUploadProgress/index.cjs.js +1 -1
- package/dist/components/FileUploadProgress/index.es.js +2 -2
- package/dist/components/FormField/index.cjs.js +1 -1
- package/dist/components/FormField/index.es.js +1 -1
- package/dist/components/Input/index.cjs.js +1 -1
- package/dist/components/Input/index.es.js +1 -1
- package/dist/components/Loader/index.cjs.js +1 -1
- package/dist/components/Loader/index.es.js +1 -1
- package/dist/components/Modal/index.cjs.js +1 -1
- package/dist/components/Modal/index.es.js +52 -53
- package/dist/components/Picker/index.cjs.js +1 -1
- package/dist/components/Picker/index.es.js +1 -1
- package/dist/components/Popover/index.cjs.js +1 -1
- package/dist/components/Popover/index.es.js +1 -1
- package/dist/components/Progress/index.cjs.js +1 -1
- package/dist/components/Progress/index.es.js +111 -54
- package/dist/components/PromoBanner/index.cjs.js +1 -1
- package/dist/components/PromoBanner/index.es.js +1 -1
- package/dist/components/PromoBannerV2/index.cjs.js +1 -1
- package/dist/components/PromoBannerV2/index.es.js +1 -1
- package/dist/components/RadioButton/index.cjs.js +1 -1
- package/dist/components/RadioButton/index.es.js +1 -1
- package/dist/components/Search/index.cjs.js +1 -1
- package/dist/components/Search/index.es.js +1 -1
- package/dist/components/SegmentedControl/index.cjs.js +1 -1
- package/dist/components/SegmentedControl/index.es.js +1 -1
- package/dist/components/Switch/index.cjs.js +1 -1
- package/dist/components/Switch/index.es.js +1 -1
- package/dist/components/Tab/index.cjs.js +1 -1
- package/dist/components/Tab/index.es.js +1 -1
- package/dist/components/Tag/index.cjs.js +1 -1
- package/dist/components/Tag/index.es.js +1 -1
- package/dist/components/TagInput/index.cjs.js +1 -1
- package/dist/components/TagInput/index.es.js +1 -1
- package/dist/components/Textarea/index.cjs.js +1 -1
- package/dist/components/Textarea/index.es.js +1 -1
- package/dist/components/Toast/index.cjs.js +1 -1
- package/dist/components/Toast/index.es.js +1 -1
- package/dist/components/Tooltip/components/UserGuide/index.cjs.js +1 -1
- package/dist/components/Tooltip/components/UserGuide/index.es.js +12 -12
- package/dist/components/Tooltip/components/index.cjs.js +1 -1
- package/dist/components/Tooltip/components/index.es.js +2 -2
- package/dist/components/Tooltip/index.cjs.js +1 -1
- package/dist/components/Tooltip/index.es.js +2 -2
- package/dist/components/UploadBar/index.cjs.js +1 -1
- package/dist/components/UploadBar/index.es.js +10 -11
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +116 -118
- package/dist/preview-stats.json +897 -903
- package/dist/style.css +1 -1
- package/package.json +2 -6
- package/dist/chunks/ProgressBar-3e0fd769.js +0 -87
- package/dist/chunks/ProgressBar-62d36b60.js +0 -1
- package/dist/chunks/Tooltip-8c427780.js +0 -1
|
@@ -22,7 +22,7 @@ var A = (e, t) => {
|
|
|
22
22
|
import * as s from "react";
|
|
23
23
|
import { useReducer as ae, useRef as re, useEffect as P, useCallback as R, useMemo as I } from "react";
|
|
24
24
|
import _e from "react-day-picker";
|
|
25
|
-
import { DoubleArrowLeft as ne, ChevronLeft as
|
|
25
|
+
import { DoubleArrowLeft as ne, ChevronLeft as de, ChevronRight as ce, DoubleArrowRight as oe } from "@livechat/design-system-icons";
|
|
26
26
|
import v from "clsx";
|
|
27
27
|
import { subMonths as S, differenceInCalendarMonths as F, addMonths as H, isSameMonth as g, isSameDay as L, isAfter as Y, differenceInCalendarDays as V } from "date-fns";
|
|
28
28
|
import { Icon as $ } from "../Icon/index.es.js";
|
|
@@ -67,7 +67,7 @@ const r = {
|
|
|
67
67
|
onMonthChange: a,
|
|
68
68
|
onNextClick: _,
|
|
69
69
|
showNextButton: i,
|
|
70
|
-
showPreviousButton:
|
|
70
|
+
showPreviousButton: c,
|
|
71
71
|
className: l,
|
|
72
72
|
classNames: E,
|
|
73
73
|
numberOfMonths: m,
|
|
@@ -88,7 +88,7 @@ const r = {
|
|
|
88
88
|
!Number.isNaN(o) && o > 12 ? 12 : o
|
|
89
89
|
);
|
|
90
90
|
return a(p);
|
|
91
|
-
},
|
|
91
|
+
}, d = () => {
|
|
92
92
|
if (!N) {
|
|
93
93
|
const f = H(u, 12);
|
|
94
94
|
return a(f);
|
|
@@ -105,7 +105,7 @@ const r = {
|
|
|
105
105
|
"data-testid": "date-picker-prev-year-button",
|
|
106
106
|
className: v({
|
|
107
107
|
[E.navButtonPrev]: !0,
|
|
108
|
-
[E.navButtonInteractionDisabled]: !
|
|
108
|
+
[E.navButtonInteractionDisabled]: !c
|
|
109
109
|
}),
|
|
110
110
|
onClick: M
|
|
111
111
|
},
|
|
@@ -116,11 +116,11 @@ const r = {
|
|
|
116
116
|
"data-testid": "date-picker-prev-month-button",
|
|
117
117
|
className: v({
|
|
118
118
|
[E.navButtonPrev]: !0,
|
|
119
|
-
[E.navButtonInteractionDisabled]: !
|
|
119
|
+
[E.navButtonInteractionDisabled]: !c
|
|
120
120
|
}),
|
|
121
121
|
onClick: b
|
|
122
122
|
},
|
|
123
|
-
/* @__PURE__ */ s.createElement($, { source:
|
|
123
|
+
/* @__PURE__ */ s.createElement($, { source: de, kind: "subtle" })
|
|
124
124
|
)), /* @__PURE__ */ s.createElement("div", { className: r[`${U}__navbar-buttons-wrapper`] }, /* @__PURE__ */ s.createElement(
|
|
125
125
|
"button",
|
|
126
126
|
{
|
|
@@ -131,7 +131,7 @@ const r = {
|
|
|
131
131
|
}),
|
|
132
132
|
onClick: C
|
|
133
133
|
},
|
|
134
|
-
/* @__PURE__ */ s.createElement($, { source:
|
|
134
|
+
/* @__PURE__ */ s.createElement($, { source: ce, kind: "subtle" })
|
|
135
135
|
), /* @__PURE__ */ s.createElement(
|
|
136
136
|
"button",
|
|
137
137
|
{
|
|
@@ -140,14 +140,14 @@ const r = {
|
|
|
140
140
|
[E.navButtonNext]: !0,
|
|
141
141
|
[E.navButtonInteractionDisabled]: !i
|
|
142
142
|
}),
|
|
143
|
-
onClick:
|
|
143
|
+
onClick: d
|
|
144
144
|
},
|
|
145
145
|
/* @__PURE__ */ s.createElement($, { source: oe, kind: "subtle" })
|
|
146
146
|
)));
|
|
147
|
-
},
|
|
147
|
+
}, n = "date-picker", Z = (e, t) => {
|
|
148
148
|
const { from: a, to: _ } = t;
|
|
149
149
|
return !(_ && !L(e, _) && Y(e, _) || a && !L(e, a) && !Y(e, a));
|
|
150
|
-
}, X = (e, t, a) => t ? e && !g(e, t) || a && g(t, a) ? S(t, 1) : t : S(a || /* @__PURE__ */ new Date(), 1),
|
|
150
|
+
}, X = (e, t, a) => t ? e && !g(e, t) || a && g(t, a) ? S(t, 1) : t : S(a || /* @__PURE__ */ new Date(), 1), se = (e, t) => {
|
|
151
151
|
const a = {
|
|
152
152
|
[r[`${n}__day--monday`]]: { daysOfWeek: [1] },
|
|
153
153
|
[r[`${n}__day--sunday`]]: { daysOfWeek: [0] },
|
|
@@ -165,7 +165,7 @@ const r = {
|
|
|
165
165
|
}, h = (e, t) => {
|
|
166
166
|
const a = t.find((_) => _.id === e);
|
|
167
167
|
return a || void 0;
|
|
168
|
-
}, G = (e, t) => !!(!e || e && t),
|
|
168
|
+
}, G = (e, t) => !!(!e || e && t), le = (e) => {
|
|
169
169
|
const t = {};
|
|
170
170
|
if (!e.initialSelectedItemKey)
|
|
171
171
|
return t;
|
|
@@ -174,7 +174,7 @@ const r = {
|
|
|
174
174
|
e.options
|
|
175
175
|
);
|
|
176
176
|
return a ? (t.selectedItem = e.initialSelectedItemKey, a.isManual && (e.initialFromDate && (t.from = e.initialFromDate), e.initialToDate && (t.to = e.initialToDate, t.temporaryTo = e.initialToDate)), t) : {};
|
|
177
|
-
},
|
|
177
|
+
}, ue = (e, t) => y({
|
|
178
178
|
container: v({
|
|
179
179
|
[r[`${n}`]]: !0,
|
|
180
180
|
[r[`${n}--range`]]: e
|
|
@@ -209,16 +209,16 @@ const r = {
|
|
|
209
209
|
outside: r[`${n}__day--outside`],
|
|
210
210
|
start: r[`${n}__day--start`],
|
|
211
211
|
end: r[`${n}__day--end`]
|
|
212
|
-
}, t), J = "date-picker",
|
|
212
|
+
}, t), J = "date-picker", pe = (e) => {
|
|
213
213
|
const t = e.getDate();
|
|
214
214
|
return /* @__PURE__ */ s.createElement("div", { className: r[`${J}__day-wrapper`] }, /* @__PURE__ */ s.createElement("div", { className: r[`${J}__day-content`] }, t));
|
|
215
|
-
},
|
|
215
|
+
}, ke = (e) => {
|
|
216
216
|
const p = e, {
|
|
217
217
|
classNames: t,
|
|
218
218
|
range: a,
|
|
219
219
|
toMonth: _,
|
|
220
220
|
month: i,
|
|
221
|
-
fromMonth:
|
|
221
|
+
fromMonth: c,
|
|
222
222
|
firstDayOfWeek: l,
|
|
223
223
|
numberOfMonths: E,
|
|
224
224
|
navbarElement: m,
|
|
@@ -239,7 +239,7 @@ const r = {
|
|
|
239
239
|
s.useEffect(() => {
|
|
240
240
|
i && i !== b && C(i);
|
|
241
241
|
}, [i, b]), s.useEffect(() => {
|
|
242
|
-
_ && (Z(b, { from:
|
|
242
|
+
_ && (Z(b, { from: c, to: _ }) || C(_));
|
|
243
243
|
}, [b, e.toMonth, e.fromMonth]);
|
|
244
244
|
const M = s.useCallback(
|
|
245
245
|
(f) => {
|
|
@@ -251,42 +251,42 @@ const r = {
|
|
|
251
251
|
},
|
|
252
252
|
[i, e.onMonthChange]
|
|
253
253
|
);
|
|
254
|
-
let
|
|
255
|
-
(l === 0 || l && l < 7) && (
|
|
254
|
+
let d = 1;
|
|
255
|
+
(l === 0 || l && l < 7) && (d = l);
|
|
256
256
|
const o = s.useMemo(
|
|
257
|
-
() =>
|
|
257
|
+
() => ue(a, t),
|
|
258
258
|
[a, t]
|
|
259
259
|
);
|
|
260
260
|
return /* @__PURE__ */ s.createElement(
|
|
261
261
|
_e,
|
|
262
262
|
y({
|
|
263
263
|
navbarElement: m || /* @__PURE__ */ s.createElement(
|
|
264
|
-
|
|
264
|
+
ie,
|
|
265
265
|
{
|
|
266
266
|
month: b,
|
|
267
267
|
classNames: o,
|
|
268
268
|
numberOfMonths: E,
|
|
269
269
|
onMonthChange: M,
|
|
270
270
|
toMonth: _,
|
|
271
|
-
fromMonth:
|
|
271
|
+
fromMonth: c
|
|
272
272
|
}
|
|
273
273
|
),
|
|
274
274
|
ref: T,
|
|
275
275
|
classNames: o,
|
|
276
276
|
numberOfMonths: E,
|
|
277
277
|
toMonth: _,
|
|
278
|
-
fromMonth:
|
|
279
|
-
firstDayOfWeek:
|
|
278
|
+
fromMonth: c,
|
|
279
|
+
firstDayOfWeek: d,
|
|
280
280
|
month: b,
|
|
281
|
-
renderDay: u ||
|
|
281
|
+
renderDay: u || pe
|
|
282
282
|
}, N)
|
|
283
283
|
);
|
|
284
|
-
},
|
|
285
|
-
(e, t) => /* @__PURE__ */ s.createElement(
|
|
284
|
+
}, me = s.forwardRef(
|
|
285
|
+
(e, t) => /* @__PURE__ */ s.createElement(ke, y({ innerRef: t }, e))
|
|
286
286
|
);
|
|
287
|
-
|
|
287
|
+
me.displayName = "DatePicker";
|
|
288
288
|
var k = /* @__PURE__ */ ((e) => (e.NEW_SELECTED_ITEM = "NEW_SELECTED_ITEM", e.NEW_TEMPORARY_TO_VALUE = "NEW_TEMPORARY_TO_VALUE", e.CLEAR = "CLEAR", e.SET_FROM = "SET_FROM", e.SET_TO = "SET_TO", e.SELECT_FIRST_DAY = "SELECT_FIRST_DAY", e.SELECT_SECOND_DAY_AS_FROM = "SELECT_SECOND_DAY_AS_FROM", e.SELECT_SECOND_DAY_AS_TO = "SELECT_SECOND_DAY_AS_TO", e.CURRENT_MONTH_CHANGE = "CURRENT_MONTH_CHANGE", e))(k || {});
|
|
289
|
-
const
|
|
289
|
+
const ye = (e) => {
|
|
290
290
|
const t = X(
|
|
291
291
|
e.initialFromDate,
|
|
292
292
|
e.initialToDate,
|
|
@@ -297,8 +297,8 @@ const fe = (e) => {
|
|
|
297
297
|
to: void 0,
|
|
298
298
|
temporaryTo: void 0,
|
|
299
299
|
currentMonth: t
|
|
300
|
-
}),
|
|
301
|
-
function i(
|
|
300
|
+
}), le(e));
|
|
301
|
+
function i(c, l) {
|
|
302
302
|
switch (l.type) {
|
|
303
303
|
case k.NEW_SELECTED_ITEM:
|
|
304
304
|
return {
|
|
@@ -309,61 +309,61 @@ const fe = (e) => {
|
|
|
309
309
|
currentMonth: t
|
|
310
310
|
};
|
|
311
311
|
case k.NEW_TEMPORARY_TO_VALUE:
|
|
312
|
-
return D(y({},
|
|
312
|
+
return D(y({}, c), {
|
|
313
313
|
temporaryTo: l.payload.date
|
|
314
314
|
});
|
|
315
315
|
case k.SELECT_FIRST_DAY:
|
|
316
|
-
return D(y({},
|
|
316
|
+
return D(y({}, c), {
|
|
317
317
|
from: l.payload.date,
|
|
318
318
|
to: void 0,
|
|
319
319
|
temporaryTo: void 0
|
|
320
320
|
});
|
|
321
321
|
case k.SELECT_SECOND_DAY_AS_FROM:
|
|
322
|
-
return D(y({},
|
|
322
|
+
return D(y({}, c), {
|
|
323
323
|
from: l.payload.date,
|
|
324
|
-
to:
|
|
325
|
-
temporaryTo:
|
|
324
|
+
to: c.from,
|
|
325
|
+
temporaryTo: c.from
|
|
326
326
|
});
|
|
327
327
|
case k.SELECT_SECOND_DAY_AS_TO:
|
|
328
|
-
return D(y({},
|
|
328
|
+
return D(y({}, c), {
|
|
329
329
|
to: l.payload.date,
|
|
330
330
|
temporaryTo: l.payload.date
|
|
331
331
|
});
|
|
332
332
|
case k.CURRENT_MONTH_CHANGE:
|
|
333
|
-
return D(y({},
|
|
333
|
+
return D(y({}, c), {
|
|
334
334
|
currentMonth: l.payload.date
|
|
335
335
|
});
|
|
336
336
|
case k.SET_FROM:
|
|
337
|
-
return D(y({},
|
|
337
|
+
return D(y({}, c), {
|
|
338
338
|
from: l.payload.date
|
|
339
339
|
});
|
|
340
340
|
case k.SET_TO:
|
|
341
|
-
return D(y({},
|
|
341
|
+
return D(y({}, c), {
|
|
342
342
|
to: l.payload.date
|
|
343
343
|
});
|
|
344
344
|
default:
|
|
345
|
-
return
|
|
345
|
+
return c;
|
|
346
346
|
}
|
|
347
347
|
}
|
|
348
348
|
return ae(i, _);
|
|
349
|
-
},
|
|
349
|
+
}, fe = ({
|
|
350
350
|
options: e,
|
|
351
351
|
initialSelectedItemKey: t,
|
|
352
352
|
initialFromDate: a,
|
|
353
353
|
initialToDate: _,
|
|
354
354
|
toMonth: i,
|
|
355
|
-
onChange:
|
|
355
|
+
onChange: c,
|
|
356
356
|
children: l
|
|
357
357
|
}) => {
|
|
358
358
|
const E = re(
|
|
359
359
|
t || null
|
|
360
|
-
), [m, u] =
|
|
360
|
+
), [m, u] = ye({
|
|
361
361
|
options: e,
|
|
362
362
|
initialSelectedItemKey: t,
|
|
363
363
|
initialFromDate: a,
|
|
364
364
|
initialToDate: _,
|
|
365
365
|
toMonth: i,
|
|
366
|
-
onChange:
|
|
366
|
+
onChange: c,
|
|
367
367
|
children: l
|
|
368
368
|
});
|
|
369
369
|
P(() => {
|
|
@@ -377,90 +377,90 @@ const fe = (e) => {
|
|
|
377
377
|
payload: { date: _ }
|
|
378
378
|
});
|
|
379
379
|
}, [_]), P(() => {
|
|
380
|
-
const
|
|
380
|
+
const d = X(
|
|
381
381
|
a,
|
|
382
382
|
_,
|
|
383
383
|
i
|
|
384
384
|
);
|
|
385
385
|
u({
|
|
386
386
|
type: k.CURRENT_MONTH_CHANGE,
|
|
387
|
-
payload: { date:
|
|
387
|
+
payload: { date: d }
|
|
388
388
|
});
|
|
389
389
|
}, [i, a, _]), P(() => {
|
|
390
|
-
const { from:
|
|
391
|
-
if (!(
|
|
390
|
+
const { from: d, selectedItem: o, to: p } = m;
|
|
391
|
+
if (!(d && p))
|
|
392
392
|
return;
|
|
393
393
|
const f = h(o, e);
|
|
394
|
-
f && (
|
|
394
|
+
f && (c == null || c(D(y({}, f), {
|
|
395
395
|
value: {
|
|
396
|
-
from:
|
|
396
|
+
from: d,
|
|
397
397
|
to: p
|
|
398
398
|
}
|
|
399
399
|
})));
|
|
400
|
-
}, [m.from, m.to, m.selectedItem, e,
|
|
401
|
-
const { selectedItem:
|
|
402
|
-
if (
|
|
400
|
+
}, [m.from, m.to, m.selectedItem, e, c]), P(() => {
|
|
401
|
+
const { selectedItem: d } = m;
|
|
402
|
+
if (d === E.current)
|
|
403
403
|
return;
|
|
404
|
-
if (!
|
|
405
|
-
|
|
404
|
+
if (!d) {
|
|
405
|
+
c(null);
|
|
406
406
|
return;
|
|
407
407
|
}
|
|
408
|
-
if (!h(
|
|
408
|
+
if (!h(d, e))
|
|
409
409
|
return;
|
|
410
410
|
const p = e.reduce(
|
|
411
411
|
(f, O) => D(y({}, f), { [O.id]: O }),
|
|
412
412
|
{}
|
|
413
413
|
);
|
|
414
|
-
|
|
415
|
-
}, [
|
|
414
|
+
c(p[d]);
|
|
415
|
+
}, [c, m.selectedItem, e]);
|
|
416
416
|
const T = R(
|
|
417
|
-
(
|
|
418
|
-
const o = i ? V(i,
|
|
417
|
+
(d) => {
|
|
418
|
+
const o = i ? V(i, d) >= 0 : !0;
|
|
419
419
|
!G(m.from, m.to) && o && u({
|
|
420
420
|
type: k.NEW_TEMPORARY_TO_VALUE,
|
|
421
|
-
payload: { date:
|
|
421
|
+
payload: { date: d }
|
|
422
422
|
});
|
|
423
423
|
},
|
|
424
424
|
[i, m.from, m.to]
|
|
425
425
|
), N = R(
|
|
426
|
-
(
|
|
426
|
+
(d) => {
|
|
427
427
|
const { from: o, to: p } = m;
|
|
428
|
-
Z(
|
|
428
|
+
Z(d, { to: i }) && (G(o, p) ? u({
|
|
429
429
|
type: k.SELECT_FIRST_DAY,
|
|
430
|
-
payload: { date:
|
|
431
|
-
}) : o && L(
|
|
430
|
+
payload: { date: d }
|
|
431
|
+
}) : o && L(d, o) || o && Y(d, o) ? u({
|
|
432
432
|
type: k.SELECT_SECOND_DAY_AS_TO,
|
|
433
|
-
payload: { date:
|
|
433
|
+
payload: { date: d }
|
|
434
434
|
}) : u({
|
|
435
435
|
type: k.SELECT_SECOND_DAY_AS_FROM,
|
|
436
|
-
payload: { date:
|
|
436
|
+
payload: { date: d }
|
|
437
437
|
}));
|
|
438
438
|
},
|
|
439
439
|
[i, m.from, m.to]
|
|
440
440
|
), b = R(
|
|
441
|
-
(
|
|
442
|
-
if (
|
|
441
|
+
(d) => {
|
|
442
|
+
if (d === null) {
|
|
443
443
|
u({
|
|
444
444
|
type: k.NEW_SELECTED_ITEM,
|
|
445
445
|
payload: { selectedItem: null }
|
|
446
446
|
});
|
|
447
447
|
return;
|
|
448
448
|
}
|
|
449
|
-
h(
|
|
449
|
+
h(d, e) && u({
|
|
450
450
|
type: k.NEW_SELECTED_ITEM,
|
|
451
|
-
payload: { selectedItem:
|
|
451
|
+
payload: { selectedItem: d }
|
|
452
452
|
});
|
|
453
453
|
},
|
|
454
454
|
[e]
|
|
455
|
-
), C = R((
|
|
455
|
+
), C = R((d) => {
|
|
456
456
|
u({
|
|
457
457
|
type: k.CURRENT_MONTH_CHANGE,
|
|
458
|
-
payload: { date:
|
|
458
|
+
payload: { date: d }
|
|
459
459
|
});
|
|
460
460
|
}, []);
|
|
461
461
|
return l((() => {
|
|
462
|
-
const { currentMonth:
|
|
463
|
-
() =>
|
|
462
|
+
const { currentMonth: d, from: o, selectedItem: p, temporaryTo: f, to: O } = m, j = I(
|
|
463
|
+
() => se(o, f),
|
|
464
464
|
[o, f]
|
|
465
465
|
), q = I(() => h(p, e), [e, p]), Q = I(() => [o, { from: o, to: f }], [o, f]), z = I(() => i ? { after: i } : void 0, [i]);
|
|
466
466
|
return {
|
|
@@ -474,7 +474,7 @@ const fe = (e) => {
|
|
|
474
474
|
},
|
|
475
475
|
datepicker: {
|
|
476
476
|
range: !0,
|
|
477
|
-
month:
|
|
477
|
+
month: d,
|
|
478
478
|
numberOfMonths: 2,
|
|
479
479
|
onDayClick: N,
|
|
480
480
|
selectedDays: Q,
|
|
@@ -489,7 +489,7 @@ const fe = (e) => {
|
|
|
489
489
|
};
|
|
490
490
|
})());
|
|
491
491
|
};
|
|
492
|
-
|
|
492
|
+
fe.defaultProps = {
|
|
493
493
|
options: [
|
|
494
494
|
{
|
|
495
495
|
id: "default",
|
|
@@ -502,15 +502,15 @@ Ee.defaultProps = {
|
|
|
502
502
|
}
|
|
503
503
|
]
|
|
504
504
|
};
|
|
505
|
-
const
|
|
506
|
-
const
|
|
505
|
+
const Se = (e) => {
|
|
506
|
+
const c = e, { className: t, children: a } = c, _ = A(c, ["className", "children"]), i = v(
|
|
507
507
|
t,
|
|
508
508
|
r["date-picker--range__calendars-wrapper"]
|
|
509
509
|
);
|
|
510
510
|
return /* @__PURE__ */ s.createElement("div", D(y({}, _), { className: i }), a);
|
|
511
511
|
};
|
|
512
512
|
export {
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
513
|
+
me as DatePicker,
|
|
514
|
+
Se as DatePickerRangeCalendarsWrapper,
|
|
515
|
+
fe as RangeDatePicker
|
|
516
516
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("react"),N=require("@livechat/design-system-icons"),c=require("clsx"),x=require("../Button/index.cjs.js"),y=require("../Icon/index.cjs.js"),q=require("../../chunks/Heading-617540b6.js");require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("react"),N=require("@livechat/design-system-icons"),c=require("clsx"),x=require("../Button/index.cjs.js"),y=require("../Icon/index.cjs.js"),q=require("../../chunks/Heading-617540b6.js");require("../../chunks/Typography.module-2558416b.js");require("../Loader/index.cjs.js");require("../../chunks/Text-df483689.js");function I(l){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(l){for(const r in l)if(r!=="default"){const i=Object.getOwnPropertyDescriptor(l,r);Object.defineProperty(s,r,i.get?i:{enumerable:!0,get:()=>l[r]})}}return s.default=l,Object.freeze(s)}const a=I(S),e={"details-card":"lc-DetailsCard-module__details-card___cVoS7","details-card__button--fading":"lc-DetailsCard-module__details-card__button--fading___tQA02","details-card--with-divider":"lc-DetailsCard-module__details-card--with-divider___xyXvc","details-card__label-wrapper":"lc-DetailsCard-module__details-card__label-wrapper___7W-BY","details-card__label-wrapper--hide":"lc-DetailsCard-module__details-card__label-wrapper--hide___H-U4O","details-card__label-wrapper--fading":"lc-DetailsCard-module__details-card__label-wrapper--fading___yiAoB","details-card__label":"lc-DetailsCard-module__details-card__label___nhDQE","details-card__label--with-margin":"lc-DetailsCard-module__details-card__label--with-margin___w2S8X","details-card__label__left-node":"lc-DetailsCard-module__details-card__label__left-node___Slmc6","details-card__label__right-node":"lc-DetailsCard-module__details-card__label__right-node___ZrOLh","details-card__label__content":"lc-DetailsCard-module__details-card__label__content___Cfip3","details-card__button":"lc-DetailsCard-module__details-card__button___FWUG5","details-card__button--closed":"lc-DetailsCard-module__details-card__button--closed___TkMaQ","details-card__button__icon":"lc-DetailsCard-module__details-card__button__icon___iOlKd","details-card__button__icon--open":"lc-DetailsCard-module__details-card__button__icon--open___TI0Xq","details-card__content-wrapper":"lc-DetailsCard-module__details-card__content-wrapper___2UOlE","details-card__content-wrapper--open":"lc-DetailsCard-module__details-card__content-wrapper--open___ESQxg","details-card__content":"lc-DetailsCard-module__details-card__content___RNVd2","details-card__content--spacing":"lc-DetailsCard-module__details-card__content--spacing___QecUa","details-card__content--full-space":"lc-DetailsCard-module__details-card__content--full-space___2ms8I"},t="details-card",H=({children:l,className:s,leftNode:r,rightNode:i,label:u,withDivider:g,fullSpaceContent:w,openOnInit:C=!1,hideLabelOnOpen:n,onClick:m})=>{const[_,D]=a.useState(C),[b,$]=a.useState(0),d=a.useRef(null),v=c(e[t],g&&e[`${t}--with-divider`],s),f=n&&_,h=typeof u=="string",E=p=>{D(o=>!o),p.currentTarget.blur(),m==null||m()};return a.useEffect(()=>{const p=!!window.IntersectionObserver;if(d.current&&p){const o=new ResizeObserver(()=>{d.current&&b!==d.current.offsetHeight&&$(d.current.offsetHeight)});return o.observe(d.current),()=>o.disconnect()}},[d]),a.createElement("div",{className:v},a.createElement("div",{className:c(e[`${t}__label-wrapper`],n&&e[`${t}__label-wrapper--fading`],f&&e[`${t}__label-wrapper--hide`],_&&e[`${t}__label-wrapper--open`]),"aria-expanded":_,"aria-hidden":f,"data-testid":"details-card-label"},a.createElement("div",{className:c(e[`${t}__label`],n&&e[`${t}__label--with-margin`])},r&&a.createElement("div",{className:e[`${t}__label__left-node`]},r),h?a.createElement(q.Heading,{size:"xs",className:e[`${t}__label__content`]},u):a.createElement("div",{className:e[`${t}__label__content`]},u),i&&a.createElement("div",{className:e[`${t}__label__right-node`]},i))),a.createElement(x.Button,{kind:_&&n?"float":"text",icon:a.createElement(y.Icon,{source:N.ChevronRight,className:c(e[`${t}__button__icon`],_&&e[`${t}__button__icon--open`])}),className:c(e[`${t}__button`],!_&&e[`${t}__button--closed`],_&&e[`${t}__button--open`],n&&e[`${t}__button--fading`]),onClick:E,"aria-expanded":_}),a.createElement("div",null,a.createElement("div",{className:c(e[`${t}__content-wrapper`],_&&e[`${t}__content-wrapper--open`]),style:{maxHeight:_?b:0}},a.createElement("div",{ref:d,className:c(e[`${t}__content`],w&&e[`${t}__content--full-space`],n&&e[`${t}__content--spacing`])},l))))};exports.DetailsCard=H;
|
|
@@ -4,9 +4,9 @@ import d from "clsx";
|
|
|
4
4
|
import { Button as x } from "../Button/index.es.js";
|
|
5
5
|
import { Icon as S } from "../Icon/index.es.js";
|
|
6
6
|
import { H } from "../../chunks/Heading-6b95d08b.js";
|
|
7
|
+
import "../../chunks/Typography.module-93efb34d.js";
|
|
7
8
|
import "../Loader/index.es.js";
|
|
8
9
|
import "../../chunks/Text-b31d1e9a.js";
|
|
9
|
-
import "../../chunks/Typography.module-93efb34d.js";
|
|
10
10
|
const e = {
|
|
11
11
|
"details-card": "lc-DetailsCard-module__details-card___cVoS7",
|
|
12
12
|
"details-card__button--fading": "lc-DetailsCard-module__details-card__button--fading___tQA02",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var f=Object.defineProperty,m=Object.defineProperties;var b=Object.getOwnPropertyDescriptors;var c=Object.getOwnPropertySymbols;var o=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable;var n=(e,t,r)=>t in e?f(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,a=(e,t)=>{for(var r in t||(t={}))o.call(t,r)&&n(e,r,t[r]);if(c)for(var r of c(t))l.call(t,r)&&n(e,r,t[r]);return e},u=(e,t)=>m(e,b(t));var d=(e,t)=>{var r={};for(var s in e)o.call(e,s)&&t.indexOf(s)<0&&(r[s]=e[s]);if(e!=null&&c)for(var s of c(e))t.indexOf(s)<0&&l.call(e,s)&&(r[s]=e[s]);return r};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("react"),_=require("clsx")
|
|
1
|
+
"use strict";var f=Object.defineProperty,m=Object.defineProperties;var b=Object.getOwnPropertyDescriptors;var c=Object.getOwnPropertySymbols;var o=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable;var n=(e,t,r)=>t in e?f(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,a=(e,t)=>{for(var r in t||(t={}))o.call(t,r)&&n(e,r,t[r]);if(c)for(var r of c(t))l.call(t,r)&&n(e,r,t[r]);return e},u=(e,t)=>m(e,b(t));var d=(e,t)=>{var r={};for(var s in e)o.call(e,s)&&t.indexOf(s)<0&&(r[s]=e[s]);if(e!=null&&c)for(var s of c(e))t.indexOf(s)<0&&l.call(e,s)&&(r[s]=e[s]);return r};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("react"),_=require("clsx");require("../../chunks/Typography.module-2558416b.js");const y=require("../../chunks/Text-df483689.js");function D(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const O=D(g),j={"field-description":"lc-FieldDescription-module__field-description___IcRDH"},q="field-description",S=s=>{var i=s,{children:e,className:t=""}=i,r=d(i,["children","className"]);const p=_(j[q],t);return O.createElement(y.Text,u(a({as:"span",size:"sm"},r),{className:p}),e)};exports.FieldDescription=S;
|
|
@@ -21,8 +21,8 @@ var p = (e, s) => {
|
|
|
21
21
|
};
|
|
22
22
|
import * as D from "react";
|
|
23
23
|
import u from "clsx";
|
|
24
|
-
import { T as C } from "../../chunks/Text-b31d1e9a.js";
|
|
25
24
|
import "../../chunks/Typography.module-93efb34d.js";
|
|
25
|
+
import { T as C } from "../../chunks/Text-b31d1e9a.js";
|
|
26
26
|
const F = {
|
|
27
27
|
"field-description": "lc-FieldDescription-module__field-description___IcRDH"
|
|
28
28
|
}, N = "field-description", y = (t) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var g=Object.defineProperty,p=Object.defineProperties;var y=Object.getOwnPropertyDescriptors;var n=Object.getOwnPropertySymbols;var l=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;var s=(e,r,t)=>r in e?g(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,a=(e,r)=>{for(var t in r||(r={}))l.call(r,t)&&s(e,t,r[t]);if(n)for(var t of n(r))i.call(r,t)&&s(e,t,r[t]);return e},u=(e,r)=>p(e,y(r));var d=(e,r)=>{var t={};for(var o in e)l.call(e,o)&&r.indexOf(o)<0&&(t[o]=e[o]);if(e!=null&&n)for(var o of n(e))r.indexOf(o)<0&&i.call(e,o)&&(t[o]=e[o]);return t};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("react"),E=require("@livechat/design-system-icons"),O=require("clsx"),j=require("../Icon/index.cjs.js")
|
|
1
|
+
"use strict";var g=Object.defineProperty,p=Object.defineProperties;var y=Object.getOwnPropertyDescriptors;var n=Object.getOwnPropertySymbols;var l=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;var s=(e,r,t)=>r in e?g(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,a=(e,r)=>{for(var t in r||(r={}))l.call(r,t)&&s(e,t,r[t]);if(n)for(var t of n(r))i.call(r,t)&&s(e,t,r[t]);return e},u=(e,r)=>p(e,y(r));var d=(e,r)=>{var t={};for(var o in e)l.call(e,o)&&r.indexOf(o)<0&&(t[o]=e[o]);if(e!=null&&n)for(var o of n(e))r.indexOf(o)<0&&i.call(e,o)&&(t[o]=e[o]);return t};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("react"),E=require("@livechat/design-system-icons"),O=require("clsx"),j=require("../Icon/index.cjs.js");require("../../chunks/Typography.module-2558416b.js");const I=require("../../chunks/Text-df483689.js");function N(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const _=N(q),m={"field-error":"lc-FieldError-module__field-error___IDkPT","field-error__icon":"lc-FieldError-module__field-error__icon___D4UNC"},f="field-error",S=o=>{var c=o,{children:e,className:r=""}=c,t=d(c,["children","className"]);const b=O(m[f],r);return _.createElement(I.Text,u(a({as:"span",size:"sm"},t),{className:b}),_.createElement(j.Icon,{source:E.Info,className:m[`${f}__icon`],size:"small"}),e)};exports.FieldError=S;
|
|
@@ -23,8 +23,8 @@ import * as d from "react";
|
|
|
23
23
|
import { Info as C } from "@livechat/design-system-icons";
|
|
24
24
|
import F from "clsx";
|
|
25
25
|
import { Icon as I } from "../Icon/index.es.js";
|
|
26
|
-
import { T } from "../../chunks/Text-b31d1e9a.js";
|
|
27
26
|
import "../../chunks/Typography.module-93efb34d.js";
|
|
27
|
+
import { T } from "../../chunks/Text-b31d1e9a.js";
|
|
28
28
|
const f = {
|
|
29
29
|
"field-error": "lc-FieldError-module__field-error___IDkPT",
|
|
30
30
|
"field-error__icon": "lc-FieldError-module__field-error__icon___D4UNC"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var F=Object.defineProperty,y=Object.defineProperties;var O=Object.getOwnPropertyDescriptors;var o=Object.getOwnPropertySymbols;var d=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;var s=(e,t,r)=>t in e?F(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,p=(e,t)=>{for(var r in t||(t={}))d.call(t,r)&&s(e,r,t[r]);if(o)for(var r of o(t))a.call(t,r)&&s(e,r,t[r]);return e},_=(e,t)=>y(e,O(t));var f=(e,t)=>{var r={};for(var l in e)d.call(e,l)&&t.indexOf(l)<0&&(r[l]=e[l]);if(e!=null&&o)for(var l of o(e))t.indexOf(l)<0&&a.call(e,l)&&(r[l]=e[l]);return r};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const j=require("react"),E=require("clsx"),G=require("../FieldDescription/index.cjs.js"),D=require("../FieldError/index.cjs.js");require("../../chunks/
|
|
1
|
+
"use strict";var F=Object.defineProperty,y=Object.defineProperties;var O=Object.getOwnPropertyDescriptors;var o=Object.getOwnPropertySymbols;var d=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;var s=(e,t,r)=>t in e?F(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,p=(e,t)=>{for(var r in t||(t={}))d.call(t,r)&&s(e,r,t[r]);if(o)for(var r of o(t))a.call(t,r)&&s(e,r,t[r]);return e},_=(e,t)=>y(e,O(t));var f=(e,t)=>{var r={};for(var l in e)d.call(e,l)&&t.indexOf(l)<0&&(r[l]=e[l]);if(e!=null&&o)for(var l of o(e))t.indexOf(l)<0&&a.call(e,l)&&(r[l]=e[l]);return r};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const j=require("react"),E=require("clsx"),G=require("../FieldDescription/index.cjs.js"),D=require("../FieldError/index.cjs.js");require("../../chunks/Typography.module-2558416b.js");require("../../chunks/Text-df483689.js");require("@livechat/design-system-icons");require("../Icon/index.cjs.js");function S(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const l=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,l.get?l:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const i=S(j),n={"field-group":"lc-FieldGroup-module__field-group___gy8lp","field-group--inline":"lc-FieldGroup-module__field-group--inline___or4qf","field-group--stretched":"lc-FieldGroup-module__field-group--stretched___6rkuO"},u="field-group",h=v=>{var c=v,{className:e="",children:t,description:r,error:l,inline:g,stretch:m}=c,b=f(c,["className","children","description","error","inline","stretch"]);const q=E(n[u],e,{[n[`${u}--inline`]]:g,[n[`${u}--stretched`]]:m});return i.createElement("div",_(p({},b),{className:q}),t,l&&i.createElement(D.FieldError,null,l),r&&i.createElement(G.FieldDescription,null,r))};exports.FieldGroup=h;
|
|
@@ -23,8 +23,8 @@ import * as t from "react";
|
|
|
23
23
|
import y from "clsx";
|
|
24
24
|
import { FieldDescription as C } from "../FieldDescription/index.es.js";
|
|
25
25
|
import { FieldError as N } from "../FieldError/index.es.js";
|
|
26
|
-
import "../../chunks/Text-b31d1e9a.js";
|
|
27
26
|
import "../../chunks/Typography.module-93efb34d.js";
|
|
27
|
+
import "../../chunks/Text-b31d1e9a.js";
|
|
28
28
|
import "@livechat/design-system-icons";
|
|
29
29
|
import "../Icon/index.es.js";
|
|
30
30
|
const m = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react"),n=require("@livechat/design-system-icons"),p=require("clsx"),u=require("../Icon/index.cjs.js"),E=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react"),n=require("@livechat/design-system-icons"),p=require("clsx"),u=require("../Icon/index.cjs.js"),E=require("../Progress/index.cjs.js");require("../../chunks/Typography.module-2558416b.js");const F=require("../../chunks/Text-df483689.js");function U(r){const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const s in r)if(s!=="default"){const c=Object.getOwnPropertyDescriptor(r,s);Object.defineProperty(l,s,c.get?c:{enumerable:!0,get:()=>r[s]})}}return l.default=r,Object.freeze(l)}const e=U(b),t={"file-upload-progress-actions":"lc-FileUploadProgressActions-module__file-upload-progress-actions___qOBr2","file-upload-progress-actions__close-button":"lc-FileUploadProgressActions-module__file-upload-progress-actions__close-button___Eh4um","file-upload-progress-actions__retry-button":"lc-FileUploadProgressActions-module__file-upload-progress-actions__retry-button___DqFEo"},i="file-upload-progress-actions",g=({status:r,onCloseButtonClick:l,onRetryButtonClick:s})=>e.createElement("div",{className:t[`${i}`]},s&&r==="error"&&e.createElement("button",{type:"button",className:t[`${i}__retry-button`],"aria-label":"Retry",onClick:s},e.createElement(u.Icon,{size:"small",source:n.Refresh})),l&&r!=="success"&&e.createElement("button",{type:"button",className:t[`${i}__close-button`],"aria-label":"Close",onClick:l},e.createElement(u.Icon,{size:"small",source:n.Close}))),o={"file-upload-progress":"lc-FileUploadProgress-module__file-upload-progress___xw8h8","file-upload-progress__icon":"lc-FileUploadProgress-module__file-upload-progress__icon___p8Rfz","file-upload-progress__icon--success":"lc-FileUploadProgress-module__file-upload-progress__icon--success___X40uH","file-upload-progress__wrapper":"lc-FileUploadProgress-module__file-upload-progress__wrapper___01Nkq","file-upload-progress__wrapper--with-icon":"lc-FileUploadProgress-module__file-upload-progress__wrapper--with-icon___GSXmA","file-upload-progress__wrapper__header":"lc-FileUploadProgress-module__file-upload-progress__wrapper__header___mYBGK","file-upload-progress__wrapper__header__actions":"lc-FileUploadProgress-module__file-upload-progress__wrapper__header__actions___tvhB3","file-upload-progress__wrapper__header__title":"lc-FileUploadProgress-module__file-upload-progress__wrapper__header__title___2IVuv","file-upload-progress__wrapper__header__title--success":"lc-FileUploadProgress-module__file-upload-progress__wrapper__header__title--success___E6DQl","file-upload-progress__wrapper__header__title--error":"lc-FileUploadProgress-module__file-upload-progress__wrapper__header__title--error___5BPpI"},_="file-upload-progress",d=`${_}__wrapper__header__title`,$=e.forwardRef(({actionsVisibility:r="hidden",className:l,icon:s,title:c,progressValue:m,size:f,status:a="normal",onCloseButtonClick:w,onRetryButtonClick:h},P)=>e.createElement("div",{className:o[_],ref:P},s&&a!=="success"&&e.createElement("div",{className:o[`${_}__icon`]},s),a==="success"&&e.createElement("div",{className:p(o[`${_}__icon`],o[`${_}__icon--success`])},e.createElement(u.Icon,{source:n.Check})),e.createElement("div",{className:p(o[`${_}__wrapper`],{[o[`${_}__wrapper--with-icon`]]:s})},e.createElement("div",{className:o[`${_}__wrapper__header`]},c&&e.createElement("div",{className:p(o[d],{[o[`${d}--success`]]:a==="success",[o[`${d}--error`]]:a==="error"})},e.createElement(F.Text,{size:"sm",as:"div"},c),"="," "),r!=="hidden"&&e.createElement("div",{className:p({[o[`${_}__wrapper__header__actions`]]:r==="hover"})},e.createElement(g,{status:a,onCloseButtonClick:w,onRetryButtonClick:h}))),a!=="success"&&e.createElement(E.ProgressBar,{className:l,percent:m,status:a,size:f}))));exports.FileUploadProgress=$;exports.FileUploadProgressActions=g;
|
|
@@ -2,9 +2,9 @@ import * as e from "react";
|
|
|
2
2
|
import { Refresh as h, Close as E, Check as P } from "@livechat/design-system-icons";
|
|
3
3
|
import p from "clsx";
|
|
4
4
|
import { Icon as d } from "../Icon/index.es.js";
|
|
5
|
-
import {
|
|
6
|
-
import { T as U } from "../../chunks/Text-b31d1e9a.js";
|
|
5
|
+
import { ProgressBar as F } from "../Progress/index.es.js";
|
|
7
6
|
import "../../chunks/Typography.module-93efb34d.js";
|
|
7
|
+
import { T as U } from "../../chunks/Text-b31d1e9a.js";
|
|
8
8
|
const c = {
|
|
9
9
|
"file-upload-progress-actions": "lc-FileUploadProgressActions-module__file-upload-progress-actions___qOBr2",
|
|
10
10
|
"file-upload-progress-actions__close-button": "lc-FileUploadProgressActions-module__file-upload-progress-actions__close-button___Eh4um",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("react"),i=require("clsx"),$=require("../FieldDescription/index.cjs.js"),g=require("../FieldError/index.cjs.js")
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("react"),i=require("clsx"),$=require("../FieldDescription/index.cjs.js"),g=require("../FieldError/index.cjs.js");require("../../chunks/Typography.module-2558416b.js");const w=require("../../chunks/Text-df483689.js");require("@livechat/design-system-icons");require("../Icon/index.cjs.js");function v(r){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(o,t,n.get?n:{enumerable:!0,get:()=>r[t]})}}return o.default=r,Object.freeze(o)}const e=v(E),l={"form-field":"lc-FormField-module__form-field___JqnX6","form-field--inline":"lc-FormField-module__form-field--inline___4DgIq","form-field__wrapper--inline":"lc-FormField-module__form-field__wrapper--inline___Ubvrn","form-field__label":"lc-FormField-module__form-field__label___hNCFS","form-field__label--inline":"lc-FormField-module__form-field__label--inline___QxyM6","form-field__label--no-text":"lc-FormField-module__form-field__label--no-text___Ohs-I","form-field__label-wrapper":"lc-FormField-module__form-field__label-wrapper___61-NO","form-field__label-wrapper--inline":"lc-FormField-module__form-field__label-wrapper--inline___YVYza","form-field__label-adornment":"lc-FormField-module__form-field__label-adornment___HB0z7","form-field__label-adornment--inline":"lc-FormField-module__form-field__label-adornment--inline___pwRXm","form-field__label-left-node":"lc-FormField-module__form-field__label-left-node___dvipB","form-field__label-right-node":"lc-FormField-module__form-field__label-right-node___LR-03","form-field__label-right-node--inline":"lc-FormField-module__form-field__label-right-node--inline___BkiPG","form-field__row-break":"lc-FormField-module__form-field__row-break___DCBjC","form-field__content":"lc-FormField-module__form-field__content___XaOx3","form-field__content__description":"lc-FormField-module__form-field__content__description___NpVw4"},_="form-field",h=({inline:r,error:o,description:t,labelText:n,labelAdornment:a,className:s,labelFor:u,children:F,labelRightNode:m})=>{const d=e.useRef(null),[b,c]=e.useState("auto"),p=i(l[_],{[l[`${_}--inline`]]:r},s);return e.useEffect(()=>{const f=d;return r&&f.current?c(`${f.current.clientHeight}px`):c("auto")}),e.createElement("div",{className:p},m&&r&&e.createElement(e.Fragment,null,e.createElement("div",{className:i(l[`${_}__label-right-node`],l[`${_}__label-right-node--inline`])},m),e.createElement("div",{className:l[`${_}__row-break`]})),e.createElement("div",{className:i(l[`${_}__wrapper`],r&&l[`${_}__wrapper--inline`])},(n||m)&&e.createElement("div",{className:i(l[`${_}__label`],r&&l[`${_}__label--inline`],!n&&l[`${_}__label--no-text`])},n&&e.createElement("div",{className:i(l[`${_}__label-wrapper`],r&&l[`${_}__label-wrapper--inline`]),style:{height:b}},e.createElement("label",{className:l[`${_}__label-left-node`],htmlFor:u},e.createElement(w.Text,{as:"span",size:"sm"},n)),a&&e.createElement("div",{className:i(l[`${_}__label-adornment`],r&&l[`${_}__label-adornment--inline`])},a)),m&&!r&&e.createElement("div",{className:i(l[`${_}__label-right-node`])},m)),e.createElement("div",{className:i(l[`${_}__content`])},e.createElement("div",{ref:d},F),o&&e.createElement(g.FieldError,null,o),!o&&t&&e.createElement($.FieldDescription,{className:i(l[`${_}__content__description`])},t))))};exports.FormField=h;
|
|
@@ -2,10 +2,10 @@ import * as e from "react";
|
|
|
2
2
|
import r from "clsx";
|
|
3
3
|
import { FieldDescription as $ } from "../FieldDescription/index.es.js";
|
|
4
4
|
import { FieldError as E } from "../FieldError/index.es.js";
|
|
5
|
+
import "../../chunks/Typography.module-93efb34d.js";
|
|
5
6
|
import { T as w } from "../../chunks/Text-b31d1e9a.js";
|
|
6
7
|
import "@livechat/design-system-icons";
|
|
7
8
|
import "../Icon/index.es.js";
|
|
8
|
-
import "../../chunks/Typography.module-93efb34d.js";
|
|
9
9
|
const l = {
|
|
10
10
|
"form-field": "lc-FormField-module__form-field___JqnX6",
|
|
11
11
|
"form-field--inline": "lc-FormField-module__form-field--inline___4DgIq",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var D=Object.defineProperty,Q=Object.defineProperties;var T=Object.getOwnPropertyDescriptors;var s=Object.getOwnPropertySymbols;var b=Object.prototype.hasOwnProperty,y=Object.prototype.propertyIsEnumerable;var I=(e,n,t)=>n in e?D(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,g=(e,n)=>{for(var t in n||(n={}))b.call(n,t)&&I(e,t,n[t]);if(s)for(var t of s(n))y.call(n,t)&&I(e,t,n[t]);return e},$=(e,n)=>Q(e,T(n));var S=(e,n)=>{var t={};for(var u in e)b.call(e,u)&&n.indexOf(u)<0&&(t[u]=e[u]);if(e!=null&&s)for(var u of s(e))n.indexOf(u)<0&&y.call(e,u)&&(t[u]=e[u]);return t};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const X=require("react"),O=require("@livechat/design-system-icons"),x=require("clsx"),k=require("../Button/index.cjs.js"),z=require("../Icon/index.cjs.js")
|
|
1
|
+
"use strict";var D=Object.defineProperty,Q=Object.defineProperties;var T=Object.getOwnPropertyDescriptors;var s=Object.getOwnPropertySymbols;var b=Object.prototype.hasOwnProperty,y=Object.prototype.propertyIsEnumerable;var I=(e,n,t)=>n in e?D(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,g=(e,n)=>{for(var t in n||(n={}))b.call(n,t)&&I(e,t,n[t]);if(s)for(var t of s(n))y.call(n,t)&&I(e,t,n[t]);return e},$=(e,n)=>Q(e,T(n));var S=(e,n)=>{var t={};for(var u in e)b.call(e,u)&&n.indexOf(u)<0&&(t[u]=e[u]);if(e!=null&&s)for(var u of s(e))n.indexOf(u)<0&&y.call(e,u)&&(t[u]=e[u]);return t};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const X=require("react"),O=require("@livechat/design-system-icons"),x=require("clsx"),k=require("../Button/index.cjs.js"),z=require("../Icon/index.cjs.js");require("../../chunks/Typography.module-2558416b.js");const K=require("../../chunks/Text-df483689.js");require("../Loader/index.cjs.js");function M(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const u=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,u.get?u:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const _=M(X),P="lc-Input-module__input___qeMAQ",o={input:P,"input--focused":"lc-Input-module__input--focused___wQH5-","input--disabled":"lc-Input-module__input--disabled___HidXX","input--crop":"lc-Input-module__input--crop___uzJS8","input--read-only":"lc-Input-module__input--read-only___4O-G3","input--error":"lc-Input-module__input--error___DlDbC","input--xsmall":"lc-Input-module__input--xsmall___9u99K","input--compact":"lc-Input-module__input--compact___iKSQZ","input--medium":"lc-Input-module__input--medium___3BjqQ","input--large":"lc-Input-module__input--large___jX5RW","input__icon--disabled":"lc-Input-module__input__icon--disabled___XO3dc","input__icon--left":"lc-Input-module__input__icon--left___BcySs","input__icon--right":"lc-Input-module__input__icon--right___VefSK","input__visibility-button":"lc-Input-module__input__visibility-button___eWrVe"},i="input",q=(e,n)=>_.cloneElement(e.source,{"data-testid":`input-icon-${e.place}`,className:x(o[`${i}__icon`],o[`${i}__icon--${e.place}`],{[o[`${i}__icon--disabled`]]:n})}),F=_.forwardRef((H,w)=>{var d=H,{inputSize:e="medium",error:n=!1,disabled:t,icon:u=null,className:v,cropOnBlur:j=!0}=d,r=S(d,["inputSize","error","disabled","icon","className","cropOnBlur"]);const[C,m]=_.useState(!1),[f,R]=_.useState(!1),{type:l,onFocus:p,onBlur:a}=r,h=x(v,o[i],o[`${i}--${e}`],{[o[`${i}--disabled`]]:t,[o[`${i}--focused`]]:C,[o[`${i}--error`]]:n,[o[`${i}--crop`]]:j,[o[`${i}--read-only`]]:r.readOnly}),V=t?"var(--content-disabled)":"var(--content-default)",E=f?O.VisibilityOn:O.VisibilityOff,N=u&&u.place==="left",B=u&&l!=="password"&&u.place==="right";return _.createElement(K.Text,{as:"div",className:h,"aria-disabled":t,"tab-index":"0"},N&&q(u,t),_.createElement("input",$(g({},r),{ref:w,onFocus:c=>{m(!0),p==null||p(c)},onBlur:c=>{m(!1),a==null||a(c)},disabled:t,type:l&&!f?l:"text"})),B&&q(u,t),l==="password"&&_.createElement(k.Button,{disabled:t,kind:"text",size:"compact",icon:_.createElement(z.Icon,{customColor:V,source:E}),onClick:()=>R(c=>!c),className:o[`${i}__visibility-button`]}))});exports.Input=F;
|
|
@@ -24,9 +24,9 @@ import { VisibilityOn as k, VisibilityOff as q } from "@livechat/design-system-i
|
|
|
24
24
|
import S from "clsx";
|
|
25
25
|
import { Button as z } from "../Button/index.es.js";
|
|
26
26
|
import { Icon as D } from "../Icon/index.es.js";
|
|
27
|
+
import "../../chunks/Typography.module-93efb34d.js";
|
|
27
28
|
import { T as F } from "../../chunks/Text-b31d1e9a.js";
|
|
28
29
|
import "../Loader/index.es.js";
|
|
29
|
-
import "../../chunks/Typography.module-93efb34d.js";
|
|
30
30
|
const H = "lc-Input-module__input___qeMAQ", o = {
|
|
31
31
|
input: H,
|
|
32
32
|
"input--focused": "lc-Input-module__input--focused___wQH5-",
|