@loadsmart/loadsmart-ui 8.0.6 → 8.0.8

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.
@@ -20,5 +20,5 @@ export declare const typographyProperties: TypographyProperties;
20
20
  * @param variant Name of the variant
21
21
  * @param options Add boldness, italics and color
22
22
  */
23
- declare function typography<P>(variant?: TypographyVariants | ((props: P) => string), options?: TypographyOptions): FlattenInterpolation<ThemeProps<any>> | ((props: P) => FlattenInterpolation<ThemeProps<any>> | ((props: unknown) => FlattenInterpolation<ThemeProps<any>> | /*elided*/ any));
23
+ declare function typography<P>(variant?: TypographyVariants | ((props: P) => string), options?: TypographyOptions): ((props: P) => FlattenInterpolation<ThemeProps<any>> | ((props: unknown) => FlattenInterpolation<ThemeProps<any>> | /*elided*/ any)) | FlattenInterpolation<ThemeProps<any>>;
24
24
  export default typography;
@@ -1,281 +1,380 @@
1
- import { queries, fireEvent, act, waitFor, createEvent, within, waitForElementToBeRemoved, render } from "@testing-library/react";
2
- import { t as toArray } from "../toArray-BJJzFRD1.js";
1
+ import { alice } from "../themes.js";
2
+ import { toArray } from "../toArray.js";
3
+ import { DragDropFileContext } from "../DragDropFile.context.js";
4
+ import React from "react";
3
5
  import { isFunction } from "@loadsmart/utils-function";
4
- import { a as alice } from "../miranda-compatibility.theme-CIu9fa89.js";
5
- import React__default from "react";
6
- import { D as DragDropFileContext } from "../DragDropFile.context-oKnUu6d3.js";
6
+ import { act, createEvent, fireEvent, queries, render, waitFor, waitForElementToBeRemoved, within } from "@testing-library/react";
7
+ //#region src/testing/DatePickerEvent/DatePickerEvent.ts
7
8
  function getContainerFromInput(input) {
8
- return input.parentNode.parentNode.parentNode.parentNode;
9
+ return input.parentNode.parentNode.parentNode.parentNode;
9
10
  }
11
+ /**
12
+ * Expand the `DatePicker` calendar, if it not already expanded.
13
+ * @param input - You can refer to this element by the label you applied to the `DatePicker`
14
+ */
10
15
  async function expand$2(input) {
11
- const datePickerContainer = getContainerFromInput(input);
12
- if (queries.queryByRole(datePickerContainer, "menu")) {
13
- return;
14
- }
15
- fireEvent.click(input);
16
- await waitFor(() => {
17
- expect(queries.getByRole(datePickerContainer, "menu")).toBeInTheDocument();
18
- });
16
+ const datePickerContainer = getContainerFromInput(input);
17
+ if (queries.queryByRole(datePickerContainer, "menu")) return;
18
+ fireEvent.click(input);
19
+ await waitFor(() => {
20
+ expect(queries.getByRole(datePickerContainer, "menu")).toBeInTheDocument();
21
+ });
19
22
  }
23
+ /**
24
+ * Collapse the `DatePicker` calendar, if it not already collapsed.
25
+ * @param input - You can refer to this element by the label you applied to the `DatePicker`
26
+ */
20
27
  async function collapse$2(input) {
21
- const datePickerContainer = getContainerFromInput(input);
22
- if (!queries.queryByRole(datePickerContainer, "menu")) {
23
- return;
24
- }
25
- fireEvent.click(queries.getByText(datePickerContainer, "Close"));
26
- await waitFor(() => {
27
- expect(queries.queryByRole(datePickerContainer, "menu")).not.toBeInTheDocument();
28
- });
28
+ const datePickerContainer = getContainerFromInput(input);
29
+ if (!queries.queryByRole(datePickerContainer, "menu")) return;
30
+ fireEvent.click(queries.getByText(datePickerContainer, "Close"));
31
+ await waitFor(() => {
32
+ expect(queries.queryByRole(datePickerContainer, "menu")).not.toBeInTheDocument();
33
+ });
29
34
  }
35
+ /**
36
+ * Pick (select) the provided day in the current month/year.
37
+ * Notice that we programmatically expand the `DatePicker` calendar before picking the date.
38
+ * @param day - Label for the day to be picked, formatted as mm/dd/yyyy.
39
+ * @param input - You can refer to this element by the label you applied to the `DatePicker`
40
+ */
30
41
  async function pick$1(day, input) {
31
- const datePickerContainer = getContainerFromInput(input);
32
- await expand$2(input);
33
- act(() => {
34
- input.focus();
35
- });
36
- const dayElement = queries.getByLabelText(datePickerContainer, day);
37
- if (dayElement.getAttribute("aria-checked") == "false") {
38
- fireEvent.click(dayElement);
39
- }
40
- await collapse$2(input);
42
+ const datePickerContainer = getContainerFromInput(input);
43
+ await expand$2(input);
44
+ act(() => {
45
+ input.focus();
46
+ });
47
+ const dayElement = queries.getByLabelText(datePickerContainer, day);
48
+ if (dayElement.getAttribute("aria-checked") == "false") fireEvent.click(dayElement);
49
+ await collapse$2(input);
41
50
  }
51
+ /**
52
+ * Clear the selection, if there are any options selected.
53
+ * @param input - You can refer to this element by the label you applied to the `DatePicker`
54
+ */
42
55
  async function clear$2(input) {
43
- const datePickerContainer = getContainerFromInput(input);
44
- const clearButton = queries.getByLabelText(datePickerContainer, "Clear selection");
45
- fireEvent.click(clearButton);
46
- await collapse$2(input);
56
+ const datePickerContainer = getContainerFromInput(input);
57
+ const clearButton = queries.getByLabelText(datePickerContainer, "Clear selection");
58
+ fireEvent.click(clearButton);
59
+ await collapse$2(input);
47
60
  }
61
+ /**
62
+ * Get options elements currently selected in the `DatePicker` calendar.
63
+ * @param input - You can refer to this element by the label you applied to the `DatePicker`
64
+ */
48
65
  async function getSelectedDates$1(input) {
49
- const datePickerContainer = getContainerFromInput(input);
50
- await expand$2(input);
51
- const selectedDays = queries.queryAllByRole(datePickerContainer, "checkbox", {
52
- checked: true
53
- });
54
- await collapse$2(input);
55
- return selectedDays;
66
+ const datePickerContainer = getContainerFromInput(input);
67
+ await expand$2(input);
68
+ const selectedDays = queries.queryAllByRole(datePickerContainer, "checkbox", { checked: true });
69
+ await collapse$2(input);
70
+ return selectedDays;
56
71
  }
57
- const datePickerEvent = {
58
- getContainer: getContainerFromInput,
59
- expand: expand$2,
60
- collapse: collapse$2,
61
- pick: pick$1,
62
- clear: clear$2,
63
- getSelectedDates: getSelectedDates$1
72
+ var datePickerEvent = {
73
+ getContainer: getContainerFromInput,
74
+ expand: expand$2,
75
+ collapse: collapse$2,
76
+ pick: pick$1,
77
+ clear: clear$2,
78
+ getSelectedDates: getSelectedDates$1
64
79
  };
80
+ //#endregion
81
+ //#region src/testing/DatePickerEvent/DateRangePickerEvent.ts
82
+ /**
83
+ * Expand the `DatePicker` calendar, if it not already expanded.
84
+ * @param input - You can refer to this element by the label you applied to the `DatePicker`
85
+ */
65
86
  async function expand$1(input) {
66
- await datePickerEvent.expand(input);
87
+ await datePickerEvent.expand(input);
67
88
  }
89
+ /**
90
+ * Collapse the `DatePicker` calendar, if it not already collapsed.
91
+ * @param input - You can refer to this element by the label you applied to the `DatePicker`
92
+ */
68
93
  async function collapse$1(input) {
69
- await datePickerEvent.collapse(input);
94
+ await datePickerEvent.collapse(input);
70
95
  }
96
+ /**
97
+ * Pick (select) the provided day in the current month/year.
98
+ * Notice that we programmatically expand the `DatePicker` calendar before picking the date.
99
+ * @param day - Label for the day to be picked, formatted as mm/dd/yyyy.
100
+ * @param input - You can refer to this element by the label you applied to the `DatePicker`
101
+ */
71
102
  async function pick(range, input) {
72
- const dateRangePickerContainer = datePickerEvent.getContainer(input);
73
- await expand$1(input);
74
- const [rangeStart, rangeEnd] = range;
75
- if (rangeStart != null) {
76
- const dateRangeStartInput = queries.getByTestId(dateRangePickerContainer, "input-date-range-start");
77
- await datePickerEvent.pick(rangeStart, dateRangeStartInput);
78
- }
79
- if (rangeEnd != null) {
80
- const dateRangeEndInput = queries.getByTestId(dateRangePickerContainer, "input-date-range-end");
81
- await datePickerEvent.pick(rangeEnd, dateRangeEndInput);
82
- }
83
- await collapse$1(input);
103
+ const dateRangePickerContainer = datePickerEvent.getContainer(input);
104
+ await expand$1(input);
105
+ const [rangeStart, rangeEnd] = range;
106
+ if (rangeStart != null) {
107
+ const dateRangeStartInput = queries.getByTestId(dateRangePickerContainer, "input-date-range-start");
108
+ await datePickerEvent.pick(rangeStart, dateRangeStartInput);
109
+ }
110
+ if (rangeEnd != null) {
111
+ const dateRangeEndInput = queries.getByTestId(dateRangePickerContainer, "input-date-range-end");
112
+ await datePickerEvent.pick(rangeEnd, dateRangeEndInput);
113
+ }
114
+ await collapse$1(input);
84
115
  }
116
+ /**
117
+ * Clear the selection, if there are any options selected.
118
+ * @param input - You can refer to this element by the label you applied to the `DatePicker`
119
+ */
85
120
  async function clear$1(input) {
86
- await datePickerEvent.clear(input);
121
+ await datePickerEvent.clear(input);
87
122
  }
123
+ /**
124
+ * Get options elements currently selected in the `DatePicker` calendar.
125
+ * @param input - You can refer to this element by the label you applied to the `DatePicker`
126
+ */
88
127
  async function getSelectedDates(input) {
89
- return datePickerEvent.getSelectedDates(input);
128
+ return datePickerEvent.getSelectedDates(input);
90
129
  }
91
- const dateRangePickerEvent = {
92
- getContainer: datePickerEvent.getContainer,
93
- expand: expand$1,
94
- collapse: collapse$1,
95
- pick,
96
- clear: clear$1,
97
- getSelectedDates
130
+ var dateRangePickerEvent = {
131
+ getContainer: datePickerEvent.getContainer,
132
+ expand: expand$1,
133
+ collapse: collapse$1,
134
+ pick,
135
+ clear: clear$1,
136
+ getSelectedDates
98
137
  };
99
- const getDropZoneFromInput = (input) => input.parentNode;
100
- const dragOver = (input) => {
101
- const dropzone = getDropZoneFromInput(input);
102
- const dragOverEvent = createEvent.dragOver(dropzone);
103
- fireEvent(dropzone, dragOverEvent);
138
+ //#endregion
139
+ //#region src/testing/DragDropFileEvent/DragDropFileEvent.ts
140
+ /**
141
+ * Get the input dropzone, which is the input parent (label).
142
+ * @param input - You can refer to this element by the aria-label you provide to the DragDropFile component
143
+ */
144
+ var getDropZoneFromInput = (input) => input.parentNode;
145
+ /**
146
+ * Simulates the onDragOver event on the drop zone.
147
+ * @param input - You can refer to this element by the aria-label you provide to the DragDropFile component
148
+ */
149
+ var dragOver = (input) => {
150
+ const dropzone = getDropZoneFromInput(input);
151
+ fireEvent(dropzone, createEvent.dragOver(dropzone));
104
152
  };
105
- const dragLeave = (input) => {
106
- const dropzone = getDropZoneFromInput(input);
107
- const dragLeaveEvent = createEvent.dragLeave(dropzone);
108
- fireEvent(dropzone, dragLeaveEvent);
153
+ /**
154
+ * Simulates the onDragLeave event on the drop zone.
155
+ * @param input - You can refer to this element by the aria-label you provide to the DragDropFile component
156
+ */
157
+ var dragLeave = (input) => {
158
+ const dropzone = getDropZoneFromInput(input);
159
+ fireEvent(dropzone, createEvent.dragLeave(dropzone));
109
160
  };
110
- const dropFiles = (input, files) => {
111
- const dropzone = getDropZoneFromInput(input);
112
- const fileDropEvent = createEvent.drop(dropzone);
113
- Object.defineProperty(fileDropEvent, "dataTransfer", {
114
- value: {
115
- files: toArray(files)
116
- }
117
- });
118
- fireEvent(dropzone, fileDropEvent);
161
+ /**
162
+ * Simulates the onDrop event on the drop zone. You can provide a list of files or a single file.
163
+ * @param input - You can refer to this element by the aria-label you provide to the DragDropFile component
164
+ */
165
+ var dropFiles = (input, files) => {
166
+ const dropzone = getDropZoneFromInput(input);
167
+ const fileDropEvent = createEvent.drop(dropzone);
168
+ Object.defineProperty(fileDropEvent, "dataTransfer", { value: { files: toArray(files) } });
169
+ fireEvent(dropzone, fileDropEvent);
119
170
  };
120
- const DragDropFileEvent = {
121
- dragOver,
122
- dragLeave,
123
- dropFiles
171
+ var DragDropFileEvent = {
172
+ dragOver,
173
+ dragLeave,
174
+ dropFiles
124
175
  };
176
+ //#endregion
177
+ //#region src/testing/SelectEvent/SelectEvent.ts
125
178
  function getSelectContainer(input) {
126
- return input.parentNode.parentNode.parentNode;
179
+ return input.parentNode.parentNode.parentNode;
127
180
  }
181
+ /**
182
+ * Please, make sure to call expand before trying to get the menu container
183
+ */
128
184
  function getSelectMenu(input) {
129
- return input.parentNode.parentNode.nextSibling;
185
+ return input.parentNode.parentNode.nextSibling;
130
186
  }
131
187
  function getSelectTriggerHandle(input) {
132
- return input.parentNode.nextSibling.nextSibling;
188
+ return input.parentNode.nextSibling.nextSibling;
133
189
  }
134
190
  function getSelectSearchContainer(input) {
135
- return input.parentNode;
191
+ return input.parentNode;
136
192
  }
137
193
  function isSelectMenuExpanded(input) {
138
- const selectContainer = getSelectContainer(input);
139
- return selectContainer.children.length === 3;
194
+ /**
195
+ * Once the select is expanded, we have the following structure:
196
+ * +-------------+
197
+ * | Close button (visually hidden)
198
+ * +-------------+
199
+ * | DropdownTrigger
200
+ * +-------------+
201
+ * | Popover
202
+ * +-------------+
203
+ *
204
+ * This, if the container has 3 children, we assume the menu is expanded
205
+ */
206
+ return getSelectContainer(input).children.length === 3;
140
207
  }
208
+ /**
209
+ * This is needed because some datasources might be asynchronous.
210
+ * To ensure that the data they retrieve will be available, we wait for the
211
+ * querying phase to finish.
212
+ * @param input - You can refer to this element by the label you applied to the `Select`.
213
+ */
141
214
  async function waitForPendingQuery(input) {
142
- const searchContainer = getSelectSearchContainer(input);
143
- if (!within(searchContainer).queryByTestId("select-trigger-loading")) {
144
- return;
145
- }
146
- await waitForElementToBeRemoved(() => within(searchContainer).queryByTestId("select-trigger-loading"), {
147
- timeout: 2500
148
- });
215
+ const searchContainer = getSelectSearchContainer(input);
216
+ if (!within(searchContainer).queryByTestId("select-trigger-loading")) return;
217
+ await waitForElementToBeRemoved(() => within(searchContainer).queryByTestId("select-trigger-loading"), { timeout: 2500 });
149
218
  }
219
+ /**
220
+ * Expand the `Select` menu, if it not already expanded.
221
+ * input - You can refer to this element by the label you applied to the `Select`.
222
+ */
150
223
  async function expand(input) {
151
- await waitForPendingQuery(input);
152
- if (isSelectMenuExpanded(input)) {
153
- return;
154
- }
155
- const triggerHandle = getSelectTriggerHandle(input);
156
- await waitFor(() => {
157
- expect(triggerHandle).toBeEnabled();
158
- });
159
- act(() => {
160
- input.dispatchEvent(new MouseEvent("click", {
161
- bubbles: true
162
- }));
163
- });
164
- await waitFor(() => {
165
- expect(within(getSelectContainer(input)).getByRole("listbox")).toBeInTheDocument();
166
- });
224
+ await waitForPendingQuery(input);
225
+ if (isSelectMenuExpanded(input)) return;
226
+ const triggerHandle = getSelectTriggerHandle(input);
227
+ await waitFor(() => {
228
+ expect(triggerHandle).toBeEnabled();
229
+ });
230
+ /**
231
+ * Using act and a manually dispatched event so we can account for the
232
+ * state changes that happen when the search input is clicked.
233
+ * This is mainly related to the `handleEvent` from the `useClickOutside` hook.
234
+ */
235
+ act(() => {
236
+ input.dispatchEvent(new MouseEvent("click", { bubbles: true }));
237
+ });
238
+ await waitFor(() => {
239
+ expect(within(getSelectContainer(input)).getByRole("listbox")).toBeInTheDocument();
240
+ });
167
241
  }
242
+ /**
243
+ * Collapse the `Select` menu, if it not already collapsed.
244
+ * @param input - You can refer to this element by the label you applied to the `Select`.
245
+ */
168
246
  async function collapse(input) {
169
- if (!isSelectMenuExpanded(input)) {
170
- return;
171
- }
172
- const triggerHandle = getSelectTriggerHandle(input);
173
- fireEvent.click(triggerHandle);
174
- await waitFor(() => {
175
- expect(within(getSelectContainer(input)).queryByRole("listbox")).not.toBeInTheDocument();
176
- });
247
+ if (!isSelectMenuExpanded(input)) return;
248
+ const triggerHandle = getSelectTriggerHandle(input);
249
+ fireEvent.click(triggerHandle);
250
+ await waitFor(() => {
251
+ expect(within(getSelectContainer(input)).queryByRole("listbox")).not.toBeInTheDocument();
252
+ });
177
253
  }
254
+ /**
255
+ * Select the provided option(s), if they are present in the menu.
256
+ * Notice that we programatically expand the `Select` menu before select the item
257
+ * @param option - Label for the option to be selected.
258
+ * @param input - You can refer to this element by the label you applied to the `Select`.
259
+ */
178
260
  async function select(option, input) {
179
- await expand(input);
180
- const menuContainer = getSelectMenu(input);
181
- const optionElement = await within(menuContainer).findByLabelText(option);
182
- if (optionElement.getAttribute("aria-selected") == "false") {
183
- fireEvent.mouseDown(optionElement);
184
- act(() => {
185
- optionElement.focus();
186
- });
187
- fireEvent.mouseUp(optionElement);
188
- fireEvent.click(optionElement);
189
- }
190
- await collapse(input);
261
+ await expand(input);
262
+ const optionElement = await within(getSelectMenu(input)).findByLabelText(option);
263
+ if (optionElement.getAttribute("aria-selected") == "false") {
264
+ /**
265
+ * This is a replacement for the `userEvent.click`.
266
+ * We are adopting this approach to remove the peer dep to @testing-library/user-event for
267
+ * applications using this helper, so they are not tied to the same user-event as this library.
268
+ * It follows the same sequence of event stated in the documentation available at:
269
+ * https://testing-library.com/docs/guide-events/#interactions-vs-events
270
+ */
271
+ fireEvent.mouseDown(optionElement);
272
+ act(() => {
273
+ optionElement.focus();
274
+ });
275
+ fireEvent.mouseUp(optionElement);
276
+ fireEvent.click(optionElement);
277
+ }
278
+ await collapse(input);
191
279
  }
280
+ /**
281
+ * Unselect the provided option(s), if they are present in the menu AND are selected.
282
+ * Notice that we programatically expand the `Select` menu before select the item
283
+ * @param option - Label for the option to be unselected.
284
+ * @param input - You can refer to this element by the label you applied to the `Select`.
285
+ */
192
286
  async function unselect(option, input) {
193
- await expand(input);
194
- const menuContainer = getSelectMenu(input);
195
- const optionElement = await within(menuContainer).findByLabelText(option);
196
- if (optionElement.getAttribute("aria-selected") === "true") {
197
- fireEvent.click(optionElement);
198
- }
199
- await collapse(input);
287
+ await expand(input);
288
+ const optionElement = await within(getSelectMenu(input)).findByLabelText(option);
289
+ if (optionElement.getAttribute("aria-selected") === "true") fireEvent.click(optionElement);
290
+ await collapse(input);
200
291
  }
292
+ /**
293
+ * Clear the selection, if there are any options selected.
294
+ * @param input - You can refer to this element by the label you applied to the `Select`.
295
+ */
201
296
  async function clear(input) {
202
- await waitForPendingQuery(input);
203
- const searchContainer = getSelectSearchContainer(input);
204
- const clearButton = within(searchContainer).getByTestId("select-trigger-clear");
205
- fireEvent.click(clearButton);
297
+ await waitForPendingQuery(input);
298
+ const clearButton = within(getSelectSearchContainer(input)).getByTestId("select-trigger-clear");
299
+ fireEvent.click(clearButton);
206
300
  }
301
+ /**
302
+ * Perform search based on the given `query`. It will fail if the option is not found.
303
+ * @param query - Search term.
304
+ * @param input - You can refer to this element by the label you applied to the `Select`.
305
+ */
207
306
  async function search(query, input) {
208
- fireEvent.change(input, {
209
- target: {
210
- value: query
211
- }
212
- });
213
- await waitForPendingQuery(input);
214
- const menuContainer = getSelectMenu(input);
215
- await within(menuContainer).findAllByRole("option");
307
+ fireEvent.change(input, { target: { value: query } });
308
+ await waitForPendingQuery(input);
309
+ await within(getSelectMenu(input)).findAllByRole("option");
216
310
  }
311
+ /**
312
+ * Get options elements currently available in the `Select` menu.
313
+ * @param input - You can refer to this element by the label you applied to the `Select`.
314
+ */
217
315
  async function getOptions(input) {
218
- await expand(input);
219
- const menuContainer = getSelectMenu(input);
220
- const options = within(menuContainer).queryAllByRole("option");
221
- await collapse(input);
222
- return options;
316
+ await expand(input);
317
+ const options = within(getSelectMenu(input)).queryAllByRole("option");
318
+ await collapse(input);
319
+ return options;
223
320
  }
321
+ /**
322
+ * Get options elements currently selected in the `Select` menu.
323
+ * @param input - You can refer to this element by the label you applied to the `Select`.
324
+ */
224
325
  async function getSelectedOptions(input) {
225
- await expand(input);
226
- const menuContainer = getSelectMenu(input);
227
- let selectedOptions = [];
228
- try {
229
- selectedOptions = await within(menuContainer).findAllByRole("option", {
230
- selected: true
231
- });
232
- } catch {
233
- selectedOptions = [];
234
- }
235
- await collapse(input);
236
- return selectedOptions;
326
+ await expand(input);
327
+ const menuContainer = getSelectMenu(input);
328
+ let selectedOptions = [];
329
+ try {
330
+ selectedOptions = await within(menuContainer).findAllByRole("option", { selected: true });
331
+ } catch {
332
+ selectedOptions = [];
333
+ }
334
+ await collapse(input);
335
+ return selectedOptions;
237
336
  }
238
- const selectEvent = {
239
- select,
240
- unselect,
241
- clear,
242
- search,
243
- expand,
244
- collapse,
245
- getOptions,
246
- getSelectedOptions,
247
- isMenuExpanded: isSelectMenuExpanded
337
+ var selectEvent = {
338
+ select,
339
+ unselect,
340
+ clear,
341
+ search,
342
+ expand,
343
+ collapse,
344
+ getOptions,
345
+ getSelectedOptions,
346
+ isMenuExpanded: isSelectMenuExpanded
248
347
  };
348
+ //#endregion
349
+ //#region src/testing/getInterpolatedStyles/getInterpolatedStyles.ts
350
+ /**
351
+ * Use this function to simulate the CSS that would be generated by styled-components
352
+ * @param styles - A `css` reference with interpolated styles
353
+ * @returns The final CSS
354
+ */
249
355
  function getInterpolatedStyles(styles) {
250
- return toArray(styles).map((interpolation) => {
251
- while (isFunction(interpolation)) {
252
- interpolation = interpolation({
253
- theme: alice
254
- });
255
- }
256
- return interpolation;
257
- }).join("");
356
+ return toArray(styles).map((interpolation) => {
357
+ while (isFunction(interpolation)) interpolation = interpolation({ theme: alice });
358
+ return interpolation;
359
+ }).join("");
258
360
  }
259
- const defaultContextValueMock = {
260
- fileList: [],
261
- onFilesAdded: jest.fn(),
262
- onRetryUpload: jest.fn(),
263
- onRemoveFile: jest.fn()
361
+ //#endregion
362
+ //#region src/testing/renderWithDragDropFileProvider/renderWithDragDropFileProvider.tsx
363
+ var defaultContextValueMock = {
364
+ fileList: [],
365
+ onFilesAdded: jest.fn(),
366
+ onRetryUpload: jest.fn(),
367
+ onRemoveFile: jest.fn()
264
368
  };
265
- const renderWithDragDropFileProvider = (ui, customContext) => {
266
- const contextValue = {
267
- ...defaultContextValueMock,
268
- ...customContext
269
- };
270
- const renderedUi = (children) => /* @__PURE__ */ React__default.createElement(DragDropFileContext.Provider, { value: contextValue }, children);
271
- return render(renderedUi(ui));
369
+ var renderWithDragDropFileProvider = (ui, customContext) => {
370
+ const contextValue = {
371
+ ...defaultContextValueMock,
372
+ ...customContext
373
+ };
374
+ const renderedUi = (children) => /* @__PURE__ */ React.createElement(DragDropFileContext.Provider, { value: contextValue }, children);
375
+ return render(renderedUi(ui));
272
376
  };
273
- export {
274
- datePickerEvent as DatePickerEvent,
275
- dateRangePickerEvent as DateRangePickerEvent,
276
- DragDropFileEvent,
277
- selectEvent as SelectEvent,
278
- getInterpolatedStyles,
279
- renderWithDragDropFileProvider
280
- };
281
- //# sourceMappingURL=index.js.map
377
+ //#endregion
378
+ export { datePickerEvent as DatePickerEvent, dateRangePickerEvent as DateRangePickerEvent, DragDropFileEvent, selectEvent as SelectEvent, getInterpolatedStyles, renderWithDragDropFileProvider };
379
+
380
+ //# sourceMappingURL=index.js.map