@northlight/ui 2.24.3 → 2.24.5

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.
@@ -2392,7 +2392,7 @@
2392
2392
  }
2393
2393
  return a;
2394
2394
  };
2395
- const Popover = (props) => /* @__PURE__ */ React.createElement(react.Popover, __spreadValues$1P({ isLazy: true }, props));
2395
+ const Popover$1 = (props) => /* @__PURE__ */ React.createElement(react.Popover, __spreadValues$1P({ isLazy: true }, props));
2396
2396
 
2397
2397
  const ColorsExpandButton = ({
2398
2398
  onClick,
@@ -2528,7 +2528,7 @@
2528
2528
  onChange(color);
2529
2529
  };
2530
2530
  return /* @__PURE__ */ React.createElement(react.Box, { "data-testid": "color-picker-test-id" }, /* @__PURE__ */ React.createElement(
2531
- Popover,
2531
+ Popover$1,
2532
2532
  __spreadValues$1O({
2533
2533
  isOpen,
2534
2534
  onClose,
@@ -5695,6 +5695,15 @@
5695
5695
  }
5696
5696
  };
5697
5697
 
5698
+ const Popover = {
5699
+ parts: ["popper"],
5700
+ baseStyle: {
5701
+ popper: {
5702
+ zIndex: "popover"
5703
+ }
5704
+ }
5705
+ };
5706
+
5698
5707
  var components = /*#__PURE__*/Object.freeze({
5699
5708
  __proto__: null,
5700
5709
  Alert: Alert,
@@ -5735,6 +5744,7 @@
5735
5744
  P: P,
5736
5745
  PaneDivider: PaneDivider$1,
5737
5746
  PinInput: PinInput$1,
5747
+ Popover: Popover,
5738
5748
  Radio: Radio$1,
5739
5749
  Select: Select$1,
5740
5750
  Small: Small,
@@ -6653,7 +6663,7 @@
6653
6663
  );
6654
6664
  const togglePopup = () => state.setOpen(!state.isOpen);
6655
6665
  return /* @__PURE__ */ React.createElement(
6656
- Popover,
6666
+ Popover$1,
6657
6667
  {
6658
6668
  isOpen: state.isOpen,
6659
6669
  onClose: () => state.setOpen(false),
@@ -6848,15 +6858,16 @@
6848
6858
  },
6849
6859
  label: "Next Year"
6850
6860
  };
6861
+ const offsetFiscalYear = thisDay.month < fiscalStartMonth || thisDay.month === fiscalStartMonth && thisDay.day < fiscalStartDay ? 1 : 0;
6851
6862
  const thisFiscalYear = {
6852
6863
  value: {
6853
6864
  start: startOfMonthWithDays(
6854
- date.startOfYear(thisDay),
6865
+ date.startOfYear(thisDay).subtract({ years: offsetFiscalYear }),
6855
6866
  { months: fiscalStartMonth, days: fiscalStartDay }
6856
6867
  ),
6857
6868
  end: endOfMonthWithDays(
6858
- date.startOfYear(thisDay),
6859
- { months: fiscalStartMonth + 11, days: fiscalStartDay }
6869
+ date.startOfYear(thisDay).subtract({ years: offsetFiscalYear }),
6870
+ { months: fiscalStartMonth + 12, days: fiscalStartDay }
6860
6871
  )
6861
6872
  },
6862
6873
  label: "This Fiscal Year"
@@ -6864,22 +6875,28 @@
6864
6875
  const lastFiscalYear = {
6865
6876
  value: {
6866
6877
  start: startOfMonthWithDays(
6867
- date.startOfYear(thisDay).subtract({ years: 1 }),
6868
- { months: fiscalStartMonth, days: fiscalStartDay - 1 }
6878
+ date.startOfYear(thisDay).subtract({ years: offsetFiscalYear + 1 }),
6879
+ {
6880
+ months: fiscalStartMonth,
6881
+ days: fiscalStartDay
6882
+ }
6869
6883
  ),
6870
6884
  end: endOfMonthWithDays(
6871
- date.startOfYear(thisDay).subtract({ years: 1 }),
6872
- { months: fiscalStartMonth + 11, days: fiscalStartDay }
6885
+ date.startOfYear(thisDay).subtract({ years: offsetFiscalYear + 1 }),
6886
+ {
6887
+ months: fiscalStartMonth + 12,
6888
+ days: fiscalStartDay
6889
+ }
6873
6890
  )
6874
6891
  },
6875
6892
  label: "Last Fiscal Year"
6876
6893
  };
6877
6894
  const yearToDate = {
6878
6895
  value: {
6879
- start: startOfMonthWithDays(
6880
- date.startOfYear(thisDay),
6881
- { months: fiscalStartMonth, days: fiscalStartDay }
6882
- ),
6896
+ start: startOfMonthWithDays(date.startOfYear(thisDay), {
6897
+ months: fiscalStartMonth,
6898
+ days: fiscalStartDay
6899
+ }),
6883
6900
  end: thisDay
6884
6901
  },
6885
6902
  label: "Year to Date"
@@ -6887,12 +6904,18 @@
6887
6904
  const F1 = {
6888
6905
  value: {
6889
6906
  start: startOfMonthWithDays(
6890
- date.startOfYear(thisDay),
6891
- { months: fiscalStartMonth, days: fiscalStartDay }
6907
+ date.startOfYear(thisDay).subtract({ years: offsetFiscalYear }),
6908
+ {
6909
+ months: fiscalStartMonth,
6910
+ days: fiscalStartDay
6911
+ }
6892
6912
  ),
6893
6913
  end: endOfMonthWithDays(
6894
- date.startOfYear(thisDay),
6895
- { months: fiscalStartMonth + 3, days: fiscalStartDay }
6914
+ date.startOfYear(thisDay).subtract({ years: offsetFiscalYear }),
6915
+ {
6916
+ months: fiscalStartMonth + 3,
6917
+ days: fiscalStartDay
6918
+ }
6896
6919
  )
6897
6920
  },
6898
6921
  label: fiscalStartMonth === 0 ? "Q1" : "FQ1"
@@ -6900,12 +6923,18 @@
6900
6923
  const F2 = {
6901
6924
  value: {
6902
6925
  start: startOfMonthWithDays(
6903
- date.startOfYear(thisDay),
6904
- { months: fiscalStartMonth + 3, days: fiscalStartDay }
6926
+ date.startOfYear(thisDay).subtract({ years: offsetFiscalYear }),
6927
+ {
6928
+ months: fiscalStartMonth + 3,
6929
+ days: fiscalStartDay
6930
+ }
6905
6931
  ),
6906
6932
  end: endOfMonthWithDays(
6907
- date.startOfYear(thisDay),
6908
- { months: fiscalStartMonth + 6, days: fiscalStartDay }
6933
+ date.startOfYear(thisDay).subtract({ years: offsetFiscalYear }),
6934
+ {
6935
+ months: fiscalStartMonth + 6,
6936
+ days: fiscalStartDay
6937
+ }
6909
6938
  )
6910
6939
  },
6911
6940
  label: fiscalStartMonth === 0 ? "Q2" : "FQ2"
@@ -6913,12 +6942,18 @@
6913
6942
  const F3 = {
6914
6943
  value: {
6915
6944
  start: startOfMonthWithDays(
6916
- date.startOfYear(thisDay),
6917
- { months: fiscalStartMonth + 6, days: fiscalStartDay }
6945
+ date.startOfYear(thisDay).subtract({ years: offsetFiscalYear }),
6946
+ {
6947
+ months: fiscalStartMonth + 6,
6948
+ days: fiscalStartDay
6949
+ }
6918
6950
  ),
6919
6951
  end: endOfMonthWithDays(
6920
- date.startOfYear(thisDay),
6921
- { months: fiscalStartMonth + 9, days: fiscalStartDay }
6952
+ date.startOfYear(thisDay).subtract({ years: offsetFiscalYear }),
6953
+ {
6954
+ months: fiscalStartMonth + 9,
6955
+ days: fiscalStartDay
6956
+ }
6922
6957
  )
6923
6958
  },
6924
6959
  label: fiscalStartMonth === 0 ? "Q3" : "FQ3"
@@ -6926,12 +6961,18 @@
6926
6961
  const F4 = {
6927
6962
  value: {
6928
6963
  start: startOfMonthWithDays(
6929
- date.startOfYear(thisDay),
6930
- { months: fiscalStartMonth + 9, days: fiscalStartDay }
6964
+ date.startOfYear(thisDay).subtract({ years: offsetFiscalYear }),
6965
+ {
6966
+ months: fiscalStartMonth + 9,
6967
+ days: fiscalStartDay
6968
+ }
6931
6969
  ),
6932
6970
  end: endOfMonthWithDays(
6933
- date.startOfYear(thisDay),
6934
- { months: fiscalStartMonth + 12, days: fiscalStartDay }
6971
+ date.startOfYear(thisDay).subtract({ years: offsetFiscalYear }),
6972
+ {
6973
+ months: fiscalStartMonth + 12,
6974
+ days: fiscalStartDay
6975
+ }
6935
6976
  )
6936
6977
  },
6937
6978
  label: fiscalStartMonth === 0 ? "Q4" : "FQ4"
@@ -7206,7 +7247,7 @@
7206
7247
  state.setOpen(false);
7207
7248
  };
7208
7249
  return /* @__PURE__ */ React.createElement(
7209
- Popover,
7250
+ Popover$1,
7210
7251
  {
7211
7252
  isOpen: state.isOpen,
7212
7253
  onClose: handleClose,
@@ -7239,7 +7280,7 @@
7239
7280
  icon: /* @__PURE__ */ React.createElement(Icon$1, { as: icons.XCloseSolid })
7240
7281
  }
7241
7282
  ))),
7242
- state.isOpen && /* @__PURE__ */ React.createElement(react.PopoverContent, __spreadProps$d(__spreadValues$1o({}, dialogProps), { ref, w: "max-content" }), /* @__PURE__ */ React.createElement(focus.FocusScope, { contain: true, restoreFocus: true }, /* @__PURE__ */ React.createElement(
7283
+ /* @__PURE__ */ React.createElement(react.Portal, null, state.isOpen && /* @__PURE__ */ React.createElement(react.PopoverContent, __spreadProps$d(__spreadValues$1o({}, dialogProps), { ref, w: "max-content" }), /* @__PURE__ */ React.createElement(focus.FocusScope, { contain: true, restoreFocus: true }, /* @__PURE__ */ React.createElement(
7243
7284
  RangeCalendar,
7244
7285
  __spreadProps$d(__spreadValues$1o({}, calendarProps), {
7245
7286
  resetDate,
@@ -7248,7 +7289,7 @@
7248
7289
  fiscalStartDay: fiscalStartDay || 0,
7249
7290
  isClearable
7250
7291
  })
7251
- )))
7292
+ ))))
7252
7293
  );
7253
7294
  };
7254
7295
 
@@ -14693,7 +14734,7 @@
14693
14734
  exports.PaneDivider = PaneDivider;
14694
14735
  exports.PaneItem = PaneItem;
14695
14736
  exports.PinInput = PinInput;
14696
- exports.Popover = Popover;
14737
+ exports.Popover = Popover$1;
14697
14738
  exports.ProgressBar = ProgressBar;
14698
14739
  exports.Radio = Radio;
14699
14740
  exports.RadioGroup = RadioGroup;