@northlight/ui 2.24.5 → 2.24.6

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.
@@ -877,6 +877,7 @@ interface DateRangePickerProps extends Omit<AriaDateRangePickerProps<DateValue>,
877
877
  maxValue?: string | undefined;
878
878
  fiscalStartMonth?: number;
879
879
  fiscalStartDay?: number;
880
+ renderInPortal?: boolean;
880
881
  }
881
882
  interface DatePickerFieldProps extends Omit<InputProps, 'onChange'>, InputFieldProps {
882
883
  name: string;
@@ -7233,6 +7233,15 @@ const parseValue = (value) => {
7233
7233
  return null;
7234
7234
  return { start: parseDate(value.startDate), end: parseDate(value.endDate) };
7235
7235
  };
7236
+ const PortalWrapper = ({
7237
+ renderInPortal,
7238
+ children
7239
+ }) => {
7240
+ if (renderInPortal) {
7241
+ return /* @__PURE__ */ React.createElement(Portal, null, children);
7242
+ }
7243
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, children);
7244
+ };
7236
7245
  const DateRangePicker = (props) => {
7237
7246
  const {
7238
7247
  isDisabled,
@@ -7246,7 +7255,8 @@ const DateRangePicker = (props) => {
7246
7255
  onChange: onChangeCallback = identity,
7247
7256
  value,
7248
7257
  minValue = "1994-03-08",
7249
- maxValue
7258
+ maxValue,
7259
+ renderInPortal = false
7250
7260
  } = props;
7251
7261
  const ref = useRef();
7252
7262
  const { group } = useMultiStyleConfig("DatePicker");
@@ -7317,7 +7327,7 @@ const DateRangePicker = (props) => {
7317
7327
  icon: /* @__PURE__ */ React.createElement(Icon$1, { as: XCloseSolid })
7318
7328
  }
7319
7329
  ))),
7320
- /* @__PURE__ */ React.createElement(Portal, null, state.isOpen && /* @__PURE__ */ React.createElement(PopoverContent, __spreadProps$d(__spreadValues$1o({}, dialogProps), { ref, w: "max-content" }), /* @__PURE__ */ React.createElement(FocusScope, { contain: true, restoreFocus: true }, /* @__PURE__ */ React.createElement(
7330
+ /* @__PURE__ */ React.createElement(PortalWrapper, { renderInPortal }, state.isOpen && /* @__PURE__ */ React.createElement(PopoverContent, __spreadProps$d(__spreadValues$1o({}, dialogProps), { ref, w: "max-content" }), /* @__PURE__ */ React.createElement(FocusScope, { contain: true, restoreFocus: true }, /* @__PURE__ */ React.createElement(
7321
7331
  RangeCalendar,
7322
7332
  __spreadProps$d(__spreadValues$1o({}, calendarProps), {
7323
7333
  resetDate,