@livechat/design-system-react-components 1.17.1-alpha.3 → 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/Heading-617540b6.js +1 -0
- package/dist/chunks/Heading-6b95d08b.js +64 -0
- package/dist/chunks/Text-b31d1e9a.js +66 -0
- package/dist/chunks/Text-df483689.js +1 -0
- package/dist/chunks/Tooltip-1c5cb6fe.js +182 -0
- package/dist/chunks/Tooltip-f9f79274.js +1 -0
- package/dist/chunks/Typography.module-2558416b.js +1 -0
- package/dist/chunks/Typography.module-93efb34d.js +23 -0
- package/dist/chunks/keyCodes-30323e90.js +15 -0
- package/dist/chunks/keyCodes-c4c35e49.js +1 -0
- package/dist/components/ActionBar/index.cjs.js +1 -0
- package/dist/components/ActionBar/index.es.js +192 -0
- package/dist/components/ActionMenu/index.cjs.js +1 -0
- package/dist/components/ActionMenu/index.es.js +199 -0
- package/dist/components/Alert/index.cjs.js +1 -0
- package/dist/components/Alert/index.es.js +129 -0
- package/dist/components/Avatar/index.cjs.js +1 -0
- package/dist/components/Avatar/index.es.js +190 -0
- package/dist/components/Badge/index.cjs.js +1 -0
- package/dist/components/Badge/index.es.js +65 -0
- package/dist/components/Button/index.cjs.js +1 -0
- package/dist/components/Button/index.es.js +143 -0
- package/dist/components/Card/index.cjs.js +1 -0
- package/dist/components/Card/index.es.js +96 -0
- package/dist/components/Checkbox/index.cjs.js +1 -0
- package/dist/components/Checkbox/index.es.js +64 -0
- package/dist/components/DatePicker/index.cjs.js +1 -0
- package/dist/components/DatePicker/index.es.js +516 -0
- package/dist/components/DetailsCard/index.cjs.js +1 -0
- package/dist/components/DetailsCard/index.es.js +140 -0
- package/dist/components/DetailsCardInfo/index.cjs.js +1 -0
- package/dist/components/DetailsCardInfo/index.es.js +12 -0
- package/dist/components/FieldDescription/index.cjs.js +1 -0
- package/dist/components/FieldDescription/index.es.js +41 -0
- package/dist/components/FieldError/index.cjs.js +1 -0
- package/dist/components/FieldError/index.es.js +51 -0
- package/dist/components/FieldGroup/index.cjs.js +1 -0
- package/dist/components/FieldGroup/index.es.js +58 -0
- package/dist/components/FileUploadProgress/index.cjs.js +1 -0
- package/dist/components/FileUploadProgress/index.es.js +109 -0
- package/dist/components/Form/index.cjs.js +1 -0
- package/dist/components/Form/index.es.js +50 -0
- package/dist/components/FormField/index.cjs.js +1 -0
- package/dist/components/FormField/index.es.js +116 -0
- package/dist/components/FormGroup/index.cjs.js +1 -0
- package/dist/components/FormGroup/index.es.js +58 -0
- package/dist/components/Icon/index.cjs.js +1 -0
- package/dist/components/Icon/index.es.js +103 -0
- package/dist/components/Input/index.cjs.js +1 -0
- package/dist/components/Input/index.es.js +123 -0
- package/dist/components/Link/index.cjs.js +1 -0
- package/dist/components/Link/index.es.js +47 -0
- package/dist/components/Loader/index.cjs.js +1 -0
- package/dist/components/Loader/index.es.js +39 -0
- package/dist/components/Modal/index.cjs.js +1 -0
- package/dist/components/Modal/index.es.js +249 -0
- package/dist/components/NumericInput/index.cjs.js +1 -0
- package/dist/components/NumericInput/index.es.js +139 -0
- package/dist/components/Picker/index.cjs.js +1 -0
- package/dist/components/Picker/index.es.js +740 -0
- package/dist/components/Popover/index.cjs.js +1 -0
- package/dist/components/Popover/index.es.js +75 -0
- package/dist/components/Progress/index.cjs.js +1 -0
- package/dist/components/Progress/index.es.js +160 -0
- package/dist/components/PromoBanner/index.cjs.js +1 -0
- package/dist/components/PromoBanner/index.es.js +74 -0
- package/dist/components/PromoBannerV2/index.cjs.js +1 -0
- package/dist/components/PromoBannerV2/index.es.js +79 -0
- package/dist/components/RadioButton/index.cjs.js +1 -0
- package/dist/components/RadioButton/index.es.js +58 -0
- package/dist/components/Search/index.cjs.js +1 -0
- package/dist/components/Search/index.es.js +117 -0
- package/dist/components/SegmentedControl/index.cjs.js +1 -0
- package/dist/components/SegmentedControl/index.es.js +55 -0
- package/dist/components/Switch/index.cjs.js +1 -0
- package/dist/components/Switch/index.es.js +145 -0
- package/dist/components/Tab/index.cjs.js +1 -0
- package/dist/components/Tab/index.es.js +93 -0
- package/dist/components/Tag/index.cjs.js +1 -0
- package/dist/components/Tag/index.es.js +143 -0
- package/dist/components/TagInput/index.cjs.js +1 -0
- package/dist/components/TagInput/index.es.js +244 -0
- package/dist/components/Textarea/index.cjs.js +1 -0
- package/dist/components/Textarea/index.es.js +55 -0
- package/dist/components/Toast/index.cjs.js +1 -0
- package/dist/components/Toast/index.es.js +163 -0
- package/dist/components/Tooltip/components/UserGuide/index.cjs.js +1 -0
- package/dist/components/Tooltip/components/UserGuide/index.es.js +196 -0
- package/dist/components/Tooltip/components/index.cjs.js +1 -0
- package/dist/components/Tooltip/components/index.es.js +117 -0
- package/dist/components/Tooltip/index.cjs.js +1 -0
- package/dist/components/Tooltip/index.es.js +21 -0
- package/dist/components/Typography/index.cjs.js +1 -0
- package/dist/components/Typography/index.es.js +48 -0
- package/dist/components/UploadBar/index.cjs.js +1 -0
- package/dist/components/UploadBar/index.es.js +111 -0
- package/dist/foundations/index.cjs.js +1 -0
- package/dist/foundations/index.es.js +353 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +133 -5231
- package/dist/preview-stats.json +1231 -1237
- package/dist/style.css +1 -1
- package/dist/utils/index.cjs.js +1 -0
- package/dist/utils/index.es.js +4 -0
- package/package.json +2 -6
|
@@ -0,0 +1,516 @@
|
|
|
1
|
+
var K = Object.defineProperty, ee = Object.defineProperties;
|
|
2
|
+
var te = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var w = Object.getOwnPropertySymbols;
|
|
4
|
+
var B = Object.prototype.hasOwnProperty, x = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var W = (e, t, a) => t in e ? K(e, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[t] = a, y = (e, t) => {
|
|
6
|
+
for (var a in t || (t = {}))
|
|
7
|
+
B.call(t, a) && W(e, a, t[a]);
|
|
8
|
+
if (w)
|
|
9
|
+
for (var a of w(t))
|
|
10
|
+
x.call(t, a) && W(e, a, t[a]);
|
|
11
|
+
return e;
|
|
12
|
+
}, D = (e, t) => ee(e, te(t));
|
|
13
|
+
var A = (e, t) => {
|
|
14
|
+
var a = {};
|
|
15
|
+
for (var _ in e)
|
|
16
|
+
B.call(e, _) && t.indexOf(_) < 0 && (a[_] = e[_]);
|
|
17
|
+
if (e != null && w)
|
|
18
|
+
for (var _ of w(e))
|
|
19
|
+
t.indexOf(_) < 0 && x.call(e, _) && (a[_] = e[_]);
|
|
20
|
+
return a;
|
|
21
|
+
};
|
|
22
|
+
import * as s from "react";
|
|
23
|
+
import { useReducer as ae, useRef as re, useEffect as P, useCallback as R, useMemo as I } from "react";
|
|
24
|
+
import _e from "react-day-picker";
|
|
25
|
+
import { DoubleArrowLeft as ne, ChevronLeft as de, ChevronRight as ce, DoubleArrowRight as oe } from "@livechat/design-system-icons";
|
|
26
|
+
import v from "clsx";
|
|
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
|
+
import { Icon as $ } from "../Icon/index.es.js";
|
|
29
|
+
const r = {
|
|
30
|
+
"date-picker": "lc-DatePicker-module__date-picker___9AqJ2",
|
|
31
|
+
"date-picker--interaction-disabled": "lc-DatePicker-module__date-picker--interaction-disabled___-zn8o",
|
|
32
|
+
"date-picker__day": "lc-DatePicker-module__date-picker__day___ZTSw9",
|
|
33
|
+
"date-picker__day--disabled": "lc-DatePicker-module__date-picker__day--disabled___4O6yW",
|
|
34
|
+
"date-picker__day--selected": "lc-DatePicker-module__date-picker__day--selected___1D1tC",
|
|
35
|
+
"date-picker__day--outside": "lc-DatePicker-module__date-picker__day--outside___ptNdC",
|
|
36
|
+
"date-picker__day-content": "lc-DatePicker-module__date-picker__day-content___rDIa0",
|
|
37
|
+
"date-picker__wrapper": "lc-DatePicker-module__date-picker__wrapper___tNp4l",
|
|
38
|
+
"date-picker__months": "lc-DatePicker-module__date-picker__months___QuPb0",
|
|
39
|
+
"date-picker__month": "lc-DatePicker-module__date-picker__month___239nh",
|
|
40
|
+
"date-picker__nav-bar": "lc-DatePicker-module__date-picker__nav-bar___u-l17",
|
|
41
|
+
"date-picker__nav-button": "lc-DatePicker-module__date-picker__nav-button___1Ysdp",
|
|
42
|
+
"date-picker__nav-button--interaction-disabled": "lc-DatePicker-module__date-picker__nav-button--interaction-disabled___Ivjrx",
|
|
43
|
+
"date-picker__caption": "lc-DatePicker-module__date-picker__caption___XPgZJ",
|
|
44
|
+
"date-picker__weekdays": "lc-DatePicker-module__date-picker__weekdays___kpTY9",
|
|
45
|
+
"date-picker__weekdays-row": "lc-DatePicker-module__date-picker__weekdays-row___tGgay",
|
|
46
|
+
"date-picker__weekday": "lc-DatePicker-module__date-picker__weekday___3FCx8",
|
|
47
|
+
"date-picker__body": "lc-DatePicker-module__date-picker__body___toP1u",
|
|
48
|
+
"date-picker__week": "lc-DatePicker-module__date-picker__week___nZI1x",
|
|
49
|
+
"date-picker__day-wrapper": "lc-DatePicker-module__date-picker__day-wrapper___gGeeJ",
|
|
50
|
+
"date-picker__day--today": "lc-DatePicker-module__date-picker__day--today___LL51c",
|
|
51
|
+
"date-picker__footer": "lc-DatePicker-module__date-picker__footer___cXMQ5",
|
|
52
|
+
"date-picker__input": "lc-DatePicker-module__date-picker__input___r6qih",
|
|
53
|
+
"date-picker__input-overlay-wrapper": "lc-DatePicker-module__date-picker__input-overlay-wrapper___vmC0M",
|
|
54
|
+
"date-picker__input-overlay": "lc-DatePicker-module__date-picker__input-overlay___eJ9D0",
|
|
55
|
+
"date-picker--range": "lc-DatePicker-module__date-picker--range___ZU-7k",
|
|
56
|
+
"date-picker__day--start": "lc-DatePicker-module__date-picker__day--start___-oB8U",
|
|
57
|
+
"date-picker__day--end": "lc-DatePicker-module__date-picker__day--end___TtN5P",
|
|
58
|
+
"date-picker__day--single": "lc-DatePicker-module__date-picker__day--single___biWcB",
|
|
59
|
+
"date-picker__day--sunday": "lc-DatePicker-module__date-picker__day--sunday___JEnhV",
|
|
60
|
+
"date-picker__day--monday": "lc-DatePicker-module__date-picker__day--monday___NXYIr",
|
|
61
|
+
"date-picker--range__select-input": "lc-DatePicker-module__date-picker--range__select-input___6pyj3",
|
|
62
|
+
"date-picker--range__calendars-wrapper": "lc-DatePicker-module__date-picker--range__calendars-wrapper___8nWaW",
|
|
63
|
+
"date-picker__navbar-buttons-wrapper": "lc-DatePicker-module__date-picker__navbar-buttons-wrapper___Hnksb"
|
|
64
|
+
}, U = "date-picker", ie = (e) => {
|
|
65
|
+
const {
|
|
66
|
+
onPreviousClick: t,
|
|
67
|
+
onMonthChange: a,
|
|
68
|
+
onNextClick: _,
|
|
69
|
+
showNextButton: i,
|
|
70
|
+
showPreviousButton: c,
|
|
71
|
+
className: l,
|
|
72
|
+
classNames: E,
|
|
73
|
+
numberOfMonths: m,
|
|
74
|
+
month: u,
|
|
75
|
+
fromMonth: T,
|
|
76
|
+
toMonth: N
|
|
77
|
+
} = e, b = () => {
|
|
78
|
+
typeof t == "function" && t();
|
|
79
|
+
}, C = () => {
|
|
80
|
+
typeof _ == "function" && _();
|
|
81
|
+
}, M = () => {
|
|
82
|
+
if (!T) {
|
|
83
|
+
const f = S(u, 12);
|
|
84
|
+
return a(f);
|
|
85
|
+
}
|
|
86
|
+
const o = Math.abs(F(u, T)), p = S(
|
|
87
|
+
u,
|
|
88
|
+
!Number.isNaN(o) && o > 12 ? 12 : o
|
|
89
|
+
);
|
|
90
|
+
return a(p);
|
|
91
|
+
}, d = () => {
|
|
92
|
+
if (!N) {
|
|
93
|
+
const f = H(u, 12);
|
|
94
|
+
return a(f);
|
|
95
|
+
}
|
|
96
|
+
const o = Math.abs(F(N, u)), p = H(
|
|
97
|
+
u,
|
|
98
|
+
!Number.isNaN(o) && o > 12 ? 12 : o
|
|
99
|
+
);
|
|
100
|
+
return m === 2 && g(p, N) ? a(S(p, 1)) : a(p);
|
|
101
|
+
};
|
|
102
|
+
return /* @__PURE__ */ s.createElement("div", { className: l }, /* @__PURE__ */ s.createElement("div", { className: r[`${U}__navbar-buttons-wrapper`] }, /* @__PURE__ */ s.createElement(
|
|
103
|
+
"button",
|
|
104
|
+
{
|
|
105
|
+
"data-testid": "date-picker-prev-year-button",
|
|
106
|
+
className: v({
|
|
107
|
+
[E.navButtonPrev]: !0,
|
|
108
|
+
[E.navButtonInteractionDisabled]: !c
|
|
109
|
+
}),
|
|
110
|
+
onClick: M
|
|
111
|
+
},
|
|
112
|
+
/* @__PURE__ */ s.createElement($, { source: ne, kind: "subtle" })
|
|
113
|
+
), /* @__PURE__ */ s.createElement(
|
|
114
|
+
"button",
|
|
115
|
+
{
|
|
116
|
+
"data-testid": "date-picker-prev-month-button",
|
|
117
|
+
className: v({
|
|
118
|
+
[E.navButtonPrev]: !0,
|
|
119
|
+
[E.navButtonInteractionDisabled]: !c
|
|
120
|
+
}),
|
|
121
|
+
onClick: b
|
|
122
|
+
},
|
|
123
|
+
/* @__PURE__ */ s.createElement($, { source: de, kind: "subtle" })
|
|
124
|
+
)), /* @__PURE__ */ s.createElement("div", { className: r[`${U}__navbar-buttons-wrapper`] }, /* @__PURE__ */ s.createElement(
|
|
125
|
+
"button",
|
|
126
|
+
{
|
|
127
|
+
"data-testid": "date-picker-next-month-button",
|
|
128
|
+
className: v({
|
|
129
|
+
[E.navButtonNext]: !0,
|
|
130
|
+
[E.navButtonInteractionDisabled]: !i
|
|
131
|
+
}),
|
|
132
|
+
onClick: C
|
|
133
|
+
},
|
|
134
|
+
/* @__PURE__ */ s.createElement($, { source: ce, kind: "subtle" })
|
|
135
|
+
), /* @__PURE__ */ s.createElement(
|
|
136
|
+
"button",
|
|
137
|
+
{
|
|
138
|
+
"data-testid": "date-picker-next-year-button",
|
|
139
|
+
className: v({
|
|
140
|
+
[E.navButtonNext]: !0,
|
|
141
|
+
[E.navButtonInteractionDisabled]: !i
|
|
142
|
+
}),
|
|
143
|
+
onClick: d
|
|
144
|
+
},
|
|
145
|
+
/* @__PURE__ */ s.createElement($, { source: oe, kind: "subtle" })
|
|
146
|
+
)));
|
|
147
|
+
}, n = "date-picker", Z = (e, t) => {
|
|
148
|
+
const { from: a, to: _ } = t;
|
|
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), se = (e, t) => {
|
|
151
|
+
const a = {
|
|
152
|
+
[r[`${n}__day--monday`]]: { daysOfWeek: [1] },
|
|
153
|
+
[r[`${n}__day--sunday`]]: { daysOfWeek: [0] },
|
|
154
|
+
[r[`${n}__day--start`]]: e,
|
|
155
|
+
[r[`${n}__day--end`]]: e
|
|
156
|
+
};
|
|
157
|
+
if (!t || !e)
|
|
158
|
+
return a;
|
|
159
|
+
const _ = V(t, e);
|
|
160
|
+
return _ > 0 ? D(y({}, a), {
|
|
161
|
+
[r[`${n}__day--end`]]: t
|
|
162
|
+
}) : _ < 0 ? D(y({}, a), {
|
|
163
|
+
[r[`${n}__day--start`]]: t
|
|
164
|
+
}) : a;
|
|
165
|
+
}, h = (e, t) => {
|
|
166
|
+
const a = t.find((_) => _.id === e);
|
|
167
|
+
return a || void 0;
|
|
168
|
+
}, G = (e, t) => !!(!e || e && t), le = (e) => {
|
|
169
|
+
const t = {};
|
|
170
|
+
if (!e.initialSelectedItemKey)
|
|
171
|
+
return t;
|
|
172
|
+
const a = h(
|
|
173
|
+
e.initialSelectedItemKey,
|
|
174
|
+
e.options
|
|
175
|
+
);
|
|
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
|
+
}, ue = (e, t) => y({
|
|
178
|
+
container: v({
|
|
179
|
+
[r[`${n}`]]: !0,
|
|
180
|
+
[r[`${n}--range`]]: e
|
|
181
|
+
}),
|
|
182
|
+
wrapper: r[`${n}__wrapper`],
|
|
183
|
+
interactionDisabled: r[`${n}--interaction-disabled`],
|
|
184
|
+
months: r[`${n}__months`],
|
|
185
|
+
month: r[`${n}__month`],
|
|
186
|
+
navBar: r[`${n}__nav-bar`],
|
|
187
|
+
navButtonPrev: v(
|
|
188
|
+
r[`${n}__nav-button`],
|
|
189
|
+
r[`${n}__nav-button--prev`]
|
|
190
|
+
),
|
|
191
|
+
navButtonNext: v(
|
|
192
|
+
r[`${n}__nav-button`],
|
|
193
|
+
r[`${n}__nav-button--next`]
|
|
194
|
+
),
|
|
195
|
+
navButtonInteractionDisabled: r[`${n}__nav-button--interaction-disabled`],
|
|
196
|
+
caption: r[`${n}__caption`],
|
|
197
|
+
weekdays: r[`${n}__weekdays`],
|
|
198
|
+
weekdaysRow: r[`${n}__weekdays-row`],
|
|
199
|
+
weekday: r[`${n}__weekday`],
|
|
200
|
+
body: r[`${n}__body`],
|
|
201
|
+
week: r[`${n}__week`],
|
|
202
|
+
weekNumber: r[`${n}__week-number`],
|
|
203
|
+
day: r[`${n}__day`],
|
|
204
|
+
footer: r[`${n}__footer`],
|
|
205
|
+
todayButton: r[`${n}__today-button`],
|
|
206
|
+
today: r[`${n}__day--today`],
|
|
207
|
+
selected: r[`${n}__day--selected`],
|
|
208
|
+
disabled: r[`${n}__day--disabled`],
|
|
209
|
+
outside: r[`${n}__day--outside`],
|
|
210
|
+
start: r[`${n}__day--start`],
|
|
211
|
+
end: r[`${n}__day--end`]
|
|
212
|
+
}, t), J = "date-picker", pe = (e) => {
|
|
213
|
+
const t = e.getDate();
|
|
214
|
+
return /* @__PURE__ */ s.createElement("div", { className: r[`${J}__day-wrapper`] }, /* @__PURE__ */ s.createElement("div", { className: r[`${J}__day-content`] }, t));
|
|
215
|
+
}, ke = (e) => {
|
|
216
|
+
const p = e, {
|
|
217
|
+
classNames: t,
|
|
218
|
+
range: a,
|
|
219
|
+
toMonth: _,
|
|
220
|
+
month: i,
|
|
221
|
+
fromMonth: c,
|
|
222
|
+
firstDayOfWeek: l,
|
|
223
|
+
numberOfMonths: E,
|
|
224
|
+
navbarElement: m,
|
|
225
|
+
renderDay: u,
|
|
226
|
+
innerRef: T
|
|
227
|
+
} = p, N = A(p, [
|
|
228
|
+
"classNames",
|
|
229
|
+
"range",
|
|
230
|
+
"toMonth",
|
|
231
|
+
"month",
|
|
232
|
+
"fromMonth",
|
|
233
|
+
"firstDayOfWeek",
|
|
234
|
+
"numberOfMonths",
|
|
235
|
+
"navbarElement",
|
|
236
|
+
"renderDay",
|
|
237
|
+
"innerRef"
|
|
238
|
+
]), [b, C] = s.useState(i || /* @__PURE__ */ new Date());
|
|
239
|
+
s.useEffect(() => {
|
|
240
|
+
i && i !== b && C(i);
|
|
241
|
+
}, [i, b]), s.useEffect(() => {
|
|
242
|
+
_ && (Z(b, { from: c, to: _ }) || C(_));
|
|
243
|
+
}, [b, e.toMonth, e.fromMonth]);
|
|
244
|
+
const M = s.useCallback(
|
|
245
|
+
(f) => {
|
|
246
|
+
if (e.onMonthChange && f) {
|
|
247
|
+
e.onMonthChange(f);
|
|
248
|
+
return;
|
|
249
|
+
}
|
|
250
|
+
C(f);
|
|
251
|
+
},
|
|
252
|
+
[i, e.onMonthChange]
|
|
253
|
+
);
|
|
254
|
+
let d = 1;
|
|
255
|
+
(l === 0 || l && l < 7) && (d = l);
|
|
256
|
+
const o = s.useMemo(
|
|
257
|
+
() => ue(a, t),
|
|
258
|
+
[a, t]
|
|
259
|
+
);
|
|
260
|
+
return /* @__PURE__ */ s.createElement(
|
|
261
|
+
_e,
|
|
262
|
+
y({
|
|
263
|
+
navbarElement: m || /* @__PURE__ */ s.createElement(
|
|
264
|
+
ie,
|
|
265
|
+
{
|
|
266
|
+
month: b,
|
|
267
|
+
classNames: o,
|
|
268
|
+
numberOfMonths: E,
|
|
269
|
+
onMonthChange: M,
|
|
270
|
+
toMonth: _,
|
|
271
|
+
fromMonth: c
|
|
272
|
+
}
|
|
273
|
+
),
|
|
274
|
+
ref: T,
|
|
275
|
+
classNames: o,
|
|
276
|
+
numberOfMonths: E,
|
|
277
|
+
toMonth: _,
|
|
278
|
+
fromMonth: c,
|
|
279
|
+
firstDayOfWeek: d,
|
|
280
|
+
month: b,
|
|
281
|
+
renderDay: u || pe
|
|
282
|
+
}, N)
|
|
283
|
+
);
|
|
284
|
+
}, me = s.forwardRef(
|
|
285
|
+
(e, t) => /* @__PURE__ */ s.createElement(ke, y({ innerRef: t }, e))
|
|
286
|
+
);
|
|
287
|
+
me.displayName = "DatePicker";
|
|
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 ye = (e) => {
|
|
290
|
+
const t = X(
|
|
291
|
+
e.initialFromDate,
|
|
292
|
+
e.initialToDate,
|
|
293
|
+
e.toMonth
|
|
294
|
+
), _ = y(y({}, {
|
|
295
|
+
selectedItem: null,
|
|
296
|
+
from: void 0,
|
|
297
|
+
to: void 0,
|
|
298
|
+
temporaryTo: void 0,
|
|
299
|
+
currentMonth: t
|
|
300
|
+
}), le(e));
|
|
301
|
+
function i(c, l) {
|
|
302
|
+
switch (l.type) {
|
|
303
|
+
case k.NEW_SELECTED_ITEM:
|
|
304
|
+
return {
|
|
305
|
+
selectedItem: l.payload.selectedItem,
|
|
306
|
+
from: void 0,
|
|
307
|
+
to: void 0,
|
|
308
|
+
temporaryTo: void 0,
|
|
309
|
+
currentMonth: t
|
|
310
|
+
};
|
|
311
|
+
case k.NEW_TEMPORARY_TO_VALUE:
|
|
312
|
+
return D(y({}, c), {
|
|
313
|
+
temporaryTo: l.payload.date
|
|
314
|
+
});
|
|
315
|
+
case k.SELECT_FIRST_DAY:
|
|
316
|
+
return D(y({}, c), {
|
|
317
|
+
from: l.payload.date,
|
|
318
|
+
to: void 0,
|
|
319
|
+
temporaryTo: void 0
|
|
320
|
+
});
|
|
321
|
+
case k.SELECT_SECOND_DAY_AS_FROM:
|
|
322
|
+
return D(y({}, c), {
|
|
323
|
+
from: l.payload.date,
|
|
324
|
+
to: c.from,
|
|
325
|
+
temporaryTo: c.from
|
|
326
|
+
});
|
|
327
|
+
case k.SELECT_SECOND_DAY_AS_TO:
|
|
328
|
+
return D(y({}, c), {
|
|
329
|
+
to: l.payload.date,
|
|
330
|
+
temporaryTo: l.payload.date
|
|
331
|
+
});
|
|
332
|
+
case k.CURRENT_MONTH_CHANGE:
|
|
333
|
+
return D(y({}, c), {
|
|
334
|
+
currentMonth: l.payload.date
|
|
335
|
+
});
|
|
336
|
+
case k.SET_FROM:
|
|
337
|
+
return D(y({}, c), {
|
|
338
|
+
from: l.payload.date
|
|
339
|
+
});
|
|
340
|
+
case k.SET_TO:
|
|
341
|
+
return D(y({}, c), {
|
|
342
|
+
to: l.payload.date
|
|
343
|
+
});
|
|
344
|
+
default:
|
|
345
|
+
return c;
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
return ae(i, _);
|
|
349
|
+
}, fe = ({
|
|
350
|
+
options: e,
|
|
351
|
+
initialSelectedItemKey: t,
|
|
352
|
+
initialFromDate: a,
|
|
353
|
+
initialToDate: _,
|
|
354
|
+
toMonth: i,
|
|
355
|
+
onChange: c,
|
|
356
|
+
children: l
|
|
357
|
+
}) => {
|
|
358
|
+
const E = re(
|
|
359
|
+
t || null
|
|
360
|
+
), [m, u] = ye({
|
|
361
|
+
options: e,
|
|
362
|
+
initialSelectedItemKey: t,
|
|
363
|
+
initialFromDate: a,
|
|
364
|
+
initialToDate: _,
|
|
365
|
+
toMonth: i,
|
|
366
|
+
onChange: c,
|
|
367
|
+
children: l
|
|
368
|
+
});
|
|
369
|
+
P(() => {
|
|
370
|
+
u({
|
|
371
|
+
type: k.SET_FROM,
|
|
372
|
+
payload: { date: a }
|
|
373
|
+
});
|
|
374
|
+
}, [a]), P(() => {
|
|
375
|
+
u({
|
|
376
|
+
type: k.SET_TO,
|
|
377
|
+
payload: { date: _ }
|
|
378
|
+
});
|
|
379
|
+
}, [_]), P(() => {
|
|
380
|
+
const d = X(
|
|
381
|
+
a,
|
|
382
|
+
_,
|
|
383
|
+
i
|
|
384
|
+
);
|
|
385
|
+
u({
|
|
386
|
+
type: k.CURRENT_MONTH_CHANGE,
|
|
387
|
+
payload: { date: d }
|
|
388
|
+
});
|
|
389
|
+
}, [i, a, _]), P(() => {
|
|
390
|
+
const { from: d, selectedItem: o, to: p } = m;
|
|
391
|
+
if (!(d && p))
|
|
392
|
+
return;
|
|
393
|
+
const f = h(o, e);
|
|
394
|
+
f && (c == null || c(D(y({}, f), {
|
|
395
|
+
value: {
|
|
396
|
+
from: d,
|
|
397
|
+
to: p
|
|
398
|
+
}
|
|
399
|
+
})));
|
|
400
|
+
}, [m.from, m.to, m.selectedItem, e, c]), P(() => {
|
|
401
|
+
const { selectedItem: d } = m;
|
|
402
|
+
if (d === E.current)
|
|
403
|
+
return;
|
|
404
|
+
if (!d) {
|
|
405
|
+
c(null);
|
|
406
|
+
return;
|
|
407
|
+
}
|
|
408
|
+
if (!h(d, e))
|
|
409
|
+
return;
|
|
410
|
+
const p = e.reduce(
|
|
411
|
+
(f, O) => D(y({}, f), { [O.id]: O }),
|
|
412
|
+
{}
|
|
413
|
+
);
|
|
414
|
+
c(p[d]);
|
|
415
|
+
}, [c, m.selectedItem, e]);
|
|
416
|
+
const T = R(
|
|
417
|
+
(d) => {
|
|
418
|
+
const o = i ? V(i, d) >= 0 : !0;
|
|
419
|
+
!G(m.from, m.to) && o && u({
|
|
420
|
+
type: k.NEW_TEMPORARY_TO_VALUE,
|
|
421
|
+
payload: { date: d }
|
|
422
|
+
});
|
|
423
|
+
},
|
|
424
|
+
[i, m.from, m.to]
|
|
425
|
+
), N = R(
|
|
426
|
+
(d) => {
|
|
427
|
+
const { from: o, to: p } = m;
|
|
428
|
+
Z(d, { to: i }) && (G(o, p) ? u({
|
|
429
|
+
type: k.SELECT_FIRST_DAY,
|
|
430
|
+
payload: { date: d }
|
|
431
|
+
}) : o && L(d, o) || o && Y(d, o) ? u({
|
|
432
|
+
type: k.SELECT_SECOND_DAY_AS_TO,
|
|
433
|
+
payload: { date: d }
|
|
434
|
+
}) : u({
|
|
435
|
+
type: k.SELECT_SECOND_DAY_AS_FROM,
|
|
436
|
+
payload: { date: d }
|
|
437
|
+
}));
|
|
438
|
+
},
|
|
439
|
+
[i, m.from, m.to]
|
|
440
|
+
), b = R(
|
|
441
|
+
(d) => {
|
|
442
|
+
if (d === null) {
|
|
443
|
+
u({
|
|
444
|
+
type: k.NEW_SELECTED_ITEM,
|
|
445
|
+
payload: { selectedItem: null }
|
|
446
|
+
});
|
|
447
|
+
return;
|
|
448
|
+
}
|
|
449
|
+
h(d, e) && u({
|
|
450
|
+
type: k.NEW_SELECTED_ITEM,
|
|
451
|
+
payload: { selectedItem: d }
|
|
452
|
+
});
|
|
453
|
+
},
|
|
454
|
+
[e]
|
|
455
|
+
), C = R((d) => {
|
|
456
|
+
u({
|
|
457
|
+
type: k.CURRENT_MONTH_CHANGE,
|
|
458
|
+
payload: { date: d }
|
|
459
|
+
});
|
|
460
|
+
}, []);
|
|
461
|
+
return l((() => {
|
|
462
|
+
const { currentMonth: d, from: o, selectedItem: p, temporaryTo: f, to: O } = m, j = I(
|
|
463
|
+
() => se(o, f),
|
|
464
|
+
[o, f]
|
|
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
|
+
return {
|
|
467
|
+
select: {
|
|
468
|
+
onItemSelect: b,
|
|
469
|
+
selected: p || ""
|
|
470
|
+
},
|
|
471
|
+
inputs: {
|
|
472
|
+
fromDate: o,
|
|
473
|
+
toDate: O
|
|
474
|
+
},
|
|
475
|
+
datepicker: {
|
|
476
|
+
range: !0,
|
|
477
|
+
month: d,
|
|
478
|
+
numberOfMonths: 2,
|
|
479
|
+
onDayClick: N,
|
|
480
|
+
selectedDays: Q,
|
|
481
|
+
modifiers: j,
|
|
482
|
+
initialMonth: i && S(i, 1),
|
|
483
|
+
toMonth: i,
|
|
484
|
+
disabledDays: z,
|
|
485
|
+
onDayMouseEnter: T,
|
|
486
|
+
onMonthChange: C
|
|
487
|
+
},
|
|
488
|
+
selectedOption: q
|
|
489
|
+
};
|
|
490
|
+
})());
|
|
491
|
+
};
|
|
492
|
+
fe.defaultProps = {
|
|
493
|
+
options: [
|
|
494
|
+
{
|
|
495
|
+
id: "default",
|
|
496
|
+
label: "Default option",
|
|
497
|
+
isManual: !0,
|
|
498
|
+
value: {
|
|
499
|
+
from: void 0,
|
|
500
|
+
to: void 0
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
]
|
|
504
|
+
};
|
|
505
|
+
const Se = (e) => {
|
|
506
|
+
const c = e, { className: t, children: a } = c, _ = A(c, ["className", "children"]), i = v(
|
|
507
|
+
t,
|
|
508
|
+
r["date-picker--range__calendars-wrapper"]
|
|
509
|
+
);
|
|
510
|
+
return /* @__PURE__ */ s.createElement("div", D(y({}, _), { className: i }), a);
|
|
511
|
+
};
|
|
512
|
+
export {
|
|
513
|
+
me as DatePicker,
|
|
514
|
+
Se as DatePickerRangeCalendarsWrapper,
|
|
515
|
+
fe as RangeDatePicker
|
|
516
|
+
};
|
|
@@ -0,0 +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("../../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;
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import * as a from "react";
|
|
2
|
+
import { ChevronRight as N } from "@livechat/design-system-icons";
|
|
3
|
+
import d from "clsx";
|
|
4
|
+
import { Button as x } from "../Button/index.es.js";
|
|
5
|
+
import { Icon as S } from "../Icon/index.es.js";
|
|
6
|
+
import { H } from "../../chunks/Heading-6b95d08b.js";
|
|
7
|
+
import "../../chunks/Typography.module-93efb34d.js";
|
|
8
|
+
import "../Loader/index.es.js";
|
|
9
|
+
import "../../chunks/Text-b31d1e9a.js";
|
|
10
|
+
const e = {
|
|
11
|
+
"details-card": "lc-DetailsCard-module__details-card___cVoS7",
|
|
12
|
+
"details-card__button--fading": "lc-DetailsCard-module__details-card__button--fading___tQA02",
|
|
13
|
+
"details-card--with-divider": "lc-DetailsCard-module__details-card--with-divider___xyXvc",
|
|
14
|
+
"details-card__label-wrapper": "lc-DetailsCard-module__details-card__label-wrapper___7W-BY",
|
|
15
|
+
"details-card__label-wrapper--hide": "lc-DetailsCard-module__details-card__label-wrapper--hide___H-U4O",
|
|
16
|
+
"details-card__label-wrapper--fading": "lc-DetailsCard-module__details-card__label-wrapper--fading___yiAoB",
|
|
17
|
+
"details-card__label": "lc-DetailsCard-module__details-card__label___nhDQE",
|
|
18
|
+
"details-card__label--with-margin": "lc-DetailsCard-module__details-card__label--with-margin___w2S8X",
|
|
19
|
+
"details-card__label__left-node": "lc-DetailsCard-module__details-card__label__left-node___Slmc6",
|
|
20
|
+
"details-card__label__right-node": "lc-DetailsCard-module__details-card__label__right-node___ZrOLh",
|
|
21
|
+
"details-card__label__content": "lc-DetailsCard-module__details-card__label__content___Cfip3",
|
|
22
|
+
"details-card__button": "lc-DetailsCard-module__details-card__button___FWUG5",
|
|
23
|
+
"details-card__button--closed": "lc-DetailsCard-module__details-card__button--closed___TkMaQ",
|
|
24
|
+
"details-card__button__icon": "lc-DetailsCard-module__details-card__button__icon___iOlKd",
|
|
25
|
+
"details-card__button__icon--open": "lc-DetailsCard-module__details-card__button__icon--open___TI0Xq",
|
|
26
|
+
"details-card__content-wrapper": "lc-DetailsCard-module__details-card__content-wrapper___2UOlE",
|
|
27
|
+
"details-card__content-wrapper--open": "lc-DetailsCard-module__details-card__content-wrapper--open___ESQxg",
|
|
28
|
+
"details-card__content": "lc-DetailsCard-module__details-card__content___RNVd2",
|
|
29
|
+
"details-card__content--spacing": "lc-DetailsCard-module__details-card__content--spacing___QecUa",
|
|
30
|
+
"details-card__content--full-space": "lc-DetailsCard-module__details-card__content--full-space___2ms8I"
|
|
31
|
+
}, _ = "details-card", X = ({
|
|
32
|
+
children: b,
|
|
33
|
+
className: f,
|
|
34
|
+
leftNode: o,
|
|
35
|
+
rightNode: m,
|
|
36
|
+
label: s,
|
|
37
|
+
withDivider: w,
|
|
38
|
+
fullSpaceContent: C,
|
|
39
|
+
openOnInit: g = !1,
|
|
40
|
+
hideLabelOnOpen: r,
|
|
41
|
+
onClick: i
|
|
42
|
+
}) => {
|
|
43
|
+
const [t, D] = a.useState(g), [p, $] = a.useState(0), l = a.useRef(null), v = d(
|
|
44
|
+
e[_],
|
|
45
|
+
w && e[`${_}--with-divider`],
|
|
46
|
+
f
|
|
47
|
+
), u = r && t, h = typeof s == "string", E = (n) => {
|
|
48
|
+
D((c) => !c), n.currentTarget.blur(), i == null || i();
|
|
49
|
+
};
|
|
50
|
+
return a.useEffect(() => {
|
|
51
|
+
const n = !!window.IntersectionObserver;
|
|
52
|
+
if (l.current && n) {
|
|
53
|
+
const c = new ResizeObserver(() => {
|
|
54
|
+
l.current && p !== l.current.offsetHeight && $(l.current.offsetHeight);
|
|
55
|
+
});
|
|
56
|
+
return c.observe(l.current), () => c.disconnect();
|
|
57
|
+
}
|
|
58
|
+
}, [l]), /* @__PURE__ */ a.createElement("div", { className: v }, /* @__PURE__ */ a.createElement(
|
|
59
|
+
"div",
|
|
60
|
+
{
|
|
61
|
+
className: d(
|
|
62
|
+
e[`${_}__label-wrapper`],
|
|
63
|
+
r && e[`${_}__label-wrapper--fading`],
|
|
64
|
+
u && e[`${_}__label-wrapper--hide`],
|
|
65
|
+
t && e[`${_}__label-wrapper--open`]
|
|
66
|
+
),
|
|
67
|
+
"aria-expanded": t,
|
|
68
|
+
"aria-hidden": u,
|
|
69
|
+
"data-testid": "details-card-label"
|
|
70
|
+
},
|
|
71
|
+
/* @__PURE__ */ a.createElement(
|
|
72
|
+
"div",
|
|
73
|
+
{
|
|
74
|
+
className: d(
|
|
75
|
+
e[`${_}__label`],
|
|
76
|
+
r && e[`${_}__label--with-margin`]
|
|
77
|
+
)
|
|
78
|
+
},
|
|
79
|
+
o && /* @__PURE__ */ a.createElement("div", { className: e[`${_}__label__left-node`] }, o),
|
|
80
|
+
h ? /* @__PURE__ */ a.createElement(
|
|
81
|
+
H,
|
|
82
|
+
{
|
|
83
|
+
size: "xs",
|
|
84
|
+
className: e[`${_}__label__content`]
|
|
85
|
+
},
|
|
86
|
+
s
|
|
87
|
+
) : /* @__PURE__ */ a.createElement("div", { className: e[`${_}__label__content`] }, s),
|
|
88
|
+
m && /* @__PURE__ */ a.createElement("div", { className: e[`${_}__label__right-node`] }, m)
|
|
89
|
+
)
|
|
90
|
+
), /* @__PURE__ */ a.createElement(
|
|
91
|
+
x,
|
|
92
|
+
{
|
|
93
|
+
kind: t && r ? "float" : "text",
|
|
94
|
+
icon: /* @__PURE__ */ a.createElement(
|
|
95
|
+
S,
|
|
96
|
+
{
|
|
97
|
+
source: N,
|
|
98
|
+
className: d(
|
|
99
|
+
e[`${_}__button__icon`],
|
|
100
|
+
t && e[`${_}__button__icon--open`]
|
|
101
|
+
)
|
|
102
|
+
}
|
|
103
|
+
),
|
|
104
|
+
className: d(
|
|
105
|
+
e[`${_}__button`],
|
|
106
|
+
!t && e[`${_}__button--closed`],
|
|
107
|
+
t && e[`${_}__button--open`],
|
|
108
|
+
r && e[`${_}__button--fading`]
|
|
109
|
+
),
|
|
110
|
+
onClick: E,
|
|
111
|
+
"aria-expanded": t
|
|
112
|
+
}
|
|
113
|
+
), /* @__PURE__ */ a.createElement("div", null, /* @__PURE__ */ a.createElement(
|
|
114
|
+
"div",
|
|
115
|
+
{
|
|
116
|
+
className: d(
|
|
117
|
+
e[`${_}__content-wrapper`],
|
|
118
|
+
t && e[`${_}__content-wrapper--open`]
|
|
119
|
+
),
|
|
120
|
+
style: {
|
|
121
|
+
maxHeight: t ? p : 0
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
/* @__PURE__ */ a.createElement(
|
|
125
|
+
"div",
|
|
126
|
+
{
|
|
127
|
+
ref: l,
|
|
128
|
+
className: d(
|
|
129
|
+
e[`${_}__content`],
|
|
130
|
+
C && e[`${_}__content--full-space`],
|
|
131
|
+
r && e[`${_}__content--spacing`]
|
|
132
|
+
)
|
|
133
|
+
},
|
|
134
|
+
b
|
|
135
|
+
)
|
|
136
|
+
)));
|
|
137
|
+
};
|
|
138
|
+
export {
|
|
139
|
+
X as DetailsCard
|
|
140
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react");function r(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const o=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,o.get?o:{enumerable:!0,get:()=>e[a]})}}return t.default=e,Object.freeze(t)}const l=r(s),n={"details-card-info":"lc-DetailsCardInfo-module__details-card-info___D4VRk","details-card-info__label":"lc-DetailsCardInfo-module__details-card-info__label___U-KsO","details-card-info__content":"lc-DetailsCardInfo-module__details-card-info__content___TFEXS"},c="details-card-info",i=({children:e,label:t})=>l.createElement("div",{className:n[c]},l.createElement("div",{className:n[`${c}__label`]},t),l.createElement("div",{className:n[`${c}__content`]},e));exports.DetailsCardInfo=i;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as e from "react";
|
|
2
|
+
const a = {
|
|
3
|
+
"details-card-info": "lc-DetailsCardInfo-module__details-card-info___D4VRk",
|
|
4
|
+
"details-card-info__label": "lc-DetailsCardInfo-module__details-card-info__label___U-KsO",
|
|
5
|
+
"details-card-info__content": "lc-DetailsCardInfo-module__details-card-info__content___TFEXS"
|
|
6
|
+
}, l = "details-card-info", _ = ({
|
|
7
|
+
children: t,
|
|
8
|
+
label: s
|
|
9
|
+
}) => /* @__PURE__ */ e.createElement("div", { className: a[l] }, /* @__PURE__ */ e.createElement("div", { className: a[`${l}__label`] }, s), /* @__PURE__ */ e.createElement("div", { className: a[`${l}__content`] }, t));
|
|
10
|
+
export {
|
|
11
|
+
_ as DetailsCardInfo
|
|
12
|
+
};
|
|
@@ -0,0 +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");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;
|