@northlight/ui 2.42.3 → 2.43.0

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.
@@ -1,8 +1,7 @@
1
1
  import React, { useRef } from 'react'
2
- import { FocusScope } from '@react-aria/focus'
3
2
  import { useDateRangePickerState } from '@react-stately/datepicker'
4
3
  import { useDateRangePicker } from '@react-aria/datepicker'
5
- import { useMultiStyleConfig, useOutsideClick } from '@chakra-ui/react'
4
+ import { useMultiStyleConfig } from '@chakra-ui/react'
6
5
  import { CheckSolid, XCloseSolid } from '@northlight/icons'
7
6
  import { identity, isNil } from 'ramda'
8
7
  import { DateValue, parseDate } from '@internationalized/date'
@@ -185,11 +184,6 @@ export const DateRangePicker = (props: DateRangePickerProps) => {
185
184
  state.setOpen(false)
186
185
  }
187
186
 
188
- useOutsideClick({
189
- ref,
190
- handler: () => state.setOpen(false),
191
- })
192
-
193
187
  const ResetButton = CustomResetButton || (
194
188
  <IconButton
195
189
  aria-label="reset-date"
@@ -301,22 +295,20 @@ export const DateRangePicker = (props: DateRangePickerProps) => {
301
295
  <PortalWrapper renderInPortal={ renderInPortal }>
302
296
  { state.isOpen && (
303
297
  <PopoverContent { ...dialogProps } ref={ ref } w="max-content">
304
- <FocusScope contain={ true } restoreFocus={ true }>
305
- <DatePickerLocaleWrapper firstDayOfWeek={ firstDayOfWeek }>
306
- <RangeCalendar
307
- { ...calendarProps }
308
- resetDate={ cancelOrResetDateChange }
309
- handleClose={ handleModalClose }
310
- fiscalStartMonth={ fiscalStartMonth || 0 }
311
- fiscalStartDay={ fiscalStartDay || 0 }
312
- isClearable={ isClearable }
313
- firstDayOfWeek={ firstDayOfWeek }
314
- onSave={ onSave }
315
- clearButtonLabel={ clearButtonLabel }
316
- buttonLabel={ buttonLabel }
317
- />
318
- </DatePickerLocaleWrapper>
319
- </FocusScope>
298
+ <DatePickerLocaleWrapper firstDayOfWeek={ firstDayOfWeek }>
299
+ <RangeCalendar
300
+ { ...calendarProps }
301
+ resetDate={ cancelOrResetDateChange }
302
+ handleClose={ handleModalClose }
303
+ fiscalStartMonth={ fiscalStartMonth || 0 }
304
+ fiscalStartDay={ fiscalStartDay || 0 }
305
+ isClearable={ isClearable }
306
+ firstDayOfWeek={ firstDayOfWeek }
307
+ onSave={ onSave }
308
+ clearButtonLabel={ clearButtonLabel }
309
+ buttonLabel={ buttonLabel }
310
+ />
311
+ </DatePickerLocaleWrapper>
320
312
  </PopoverContent>
321
313
  ) }
322
314
  </PortalWrapper>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@northlight/ui",
3
- "version": "2.42.3",
3
+ "version": "2.43.0",
4
4
  "description": "Northlight UI library, based on Chakra-ui",
5
5
  "license": "MIT",
6
6
  "author": "Camphouse",
@@ -14,7 +14,8 @@
14
14
  },
15
15
  "./sandbox": {
16
16
  "types": "./dist/sandbox/index.d.ts",
17
- "import": "./dist/sandbox/index.js"
17
+ "import": "./dist/sandbox/index.js",
18
+ "require": "./dist/sandbox/index.cjs"
18
19
  }
19
20
  },
20
21
  "bin": {
@@ -125,5 +126,5 @@
125
126
  "react-dom": ">=18.0.0",
126
127
  "react-router-dom": "^5.0.0"
127
128
  },
128
- "gitHead": "12e9a8ed274aa3c23d6dbd5a98a086d245d012ec"
129
+ "gitHead": "078df3268b7f469d6f7bffebf30c551837b3b86d"
129
130
  }