@onesy/ui-react 1.0.191 → 1.0.192

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.
@@ -261,15 +261,6 @@ const Calendar = props__ => {
261
261
  if (refs.inProgressTransition.current) return;
262
262
  onUpdateCalendar((next ? _date.add : _date.remove)(1, unit, calendar));
263
263
  };
264
- const scrollToMiddleOfParent = element => {
265
- const parent = element.parentElement;
266
- if (!parent) return;
267
- const top = element.offsetTop - parent.clientHeight / 2 + element.offsetHeight / 2;
268
- parent.scrollTo({
269
- top,
270
- behavior: 'smooth'
271
- });
272
- };
273
264
  const onOpen = (valueUpdate = 'month') => {
274
265
  const valueNew_4 = open === valueUpdate ? null : valueUpdate;
275
266
  setOpen(valueNew_4);
@@ -281,8 +272,8 @@ const Calendar = props__ => {
281
272
  if (list) {
282
273
  const valueData = valueNew_4 === 'month' ? calendar.month - 1 : calendar.year;
283
274
  (0, _utils.Try)(() => {
284
- const element_0 = list.querySelector(`[data-value="${valueData}"]`);
285
- if (element_0) scrollToMiddleOfParent(element_0);
275
+ const element = list.querySelector(`[data-value="${valueData}"]`);
276
+ if (element) (0, _utils2.scrollToMiddleOfParent)(element);
286
277
  });
287
278
  }
288
279
  });
@@ -324,7 +315,7 @@ const Calendar = props__ => {
324
315
 
325
316
  // Prevent multiple moves of the calendar
326
317
  // before the previous transition is done
327
- const onTransition = (element_1, status) => {
318
+ const onTransition = (element_0, status) => {
328
319
  refs.inProgressTransition.current = !['entered', 'exited', 'removed'].includes(status);
329
320
  };
330
321
  const calendarMonthProps = _objectSpread({
@@ -0,0 +1,10 @@
1
+ declare const _default: {
2
+ symbol: string;
3
+ name: string;
4
+ symbol_native: string;
5
+ decimal_digits: number;
6
+ rounding: number;
7
+ code: string;
8
+ name_plural: string;
9
+ }[];
10
+ export default _default;