@northlight/ui 2.35.2 → 2.35.3

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.
@@ -7304,6 +7304,44 @@ const getQuickSelectOptions = (state, locale, fiscalStartMonth, fiscalStartDay)
7304
7304
  },
7305
7305
  label: "Year to Date"
7306
7306
  };
7307
+ const S1 = {
7308
+ value: {
7309
+ start: startOfMonthWithDays(
7310
+ startOfYear(thisDay).subtract({ years: offsetFiscalYear }),
7311
+ {
7312
+ months: fiscalStartMonth,
7313
+ days: fiscalStartDay
7314
+ }
7315
+ ),
7316
+ end: endOfMonthWithDays(
7317
+ startOfYear(thisDay).subtract({ years: offsetFiscalYear }),
7318
+ {
7319
+ months: fiscalStartMonth + 6,
7320
+ days: fiscalStartDay
7321
+ }
7322
+ )
7323
+ },
7324
+ label: fiscalStartMonth === 0 ? "S1" : "FS1"
7325
+ };
7326
+ const S2 = {
7327
+ value: {
7328
+ start: startOfMonthWithDays(
7329
+ startOfYear(thisDay).subtract({ years: offsetFiscalYear }),
7330
+ {
7331
+ months: fiscalStartMonth + 6,
7332
+ days: fiscalStartDay
7333
+ }
7334
+ ),
7335
+ end: endOfMonthWithDays(
7336
+ startOfYear(thisDay).subtract({ years: offsetFiscalYear }),
7337
+ {
7338
+ months: fiscalStartMonth + 12,
7339
+ days: fiscalStartDay
7340
+ }
7341
+ )
7342
+ },
7343
+ label: fiscalStartMonth === 0 ? "S2" : "FS2"
7344
+ };
7307
7345
  const F1 = {
7308
7346
  value: {
7309
7347
  start: startOfMonthWithDays(
@@ -7380,6 +7418,7 @@ const getQuickSelectOptions = (state, locale, fiscalStartMonth, fiscalStartDay)
7380
7418
  },
7381
7419
  label: fiscalStartMonth === 0 ? "Q4" : "FQ4"
7382
7420
  };
7421
+ const fiscalSemesters = [S1, S2];
7383
7422
  const fiscalQuarters = [F1, F2, F3, F4];
7384
7423
  const fiscalYears = fiscalStartMonth === 0 ? [] : [thisFiscalYear, lastFiscalYear];
7385
7424
  const quickDates = [
@@ -7397,7 +7436,7 @@ const getQuickSelectOptions = (state, locale, fiscalStartMonth, fiscalStartDay)
7397
7436
  nextYear,
7398
7437
  ...fiscalYears
7399
7438
  ];
7400
- return { quickDates, fiscalQuarters };
7439
+ return { quickDates, fiscalQuarters, fiscalSemesters };
7401
7440
  };
7402
7441
 
7403
7442
  const seperator = `1px solid ${palette.gray["100"]}`;
@@ -7408,7 +7447,7 @@ const QuickSelect = ({
7408
7447
  locale = "",
7409
7448
  height = "17.5rem"
7410
7449
  }) => {
7411
- const { quickDates, fiscalQuarters } = useMemo(
7450
+ const { quickDates, fiscalQuarters, fiscalSemesters } = useMemo(
7412
7451
  () => getQuickSelectOptions(state, locale, fiscalStartMonth, fiscalStartDay),
7413
7452
  []
7414
7453
  );
@@ -7451,10 +7490,31 @@ const QuickSelect = ({
7451
7490
  ), /* @__PURE__ */ React.createElement(Spacer, null), /* @__PURE__ */ React.createElement(
7452
7491
  Flex,
7453
7492
  {
7454
- justifyContent: "space-between",
7493
+ justifyContent: "space-around",
7455
7494
  w: "full",
7456
7495
  pt: "2",
7457
7496
  pr: "4",
7497
+ display: shouldShow(fiscalSemesters) ? "flex" : "none"
7498
+ },
7499
+ map(
7500
+ (semester) => validRange(semester.value, state) && /* @__PURE__ */ React.createElement(
7501
+ DateButton,
7502
+ {
7503
+ onClick: updateDate(semester.value),
7504
+ isActive: getIsActive(semester),
7505
+ key: `quick-select-${semester.label}`
7506
+ },
7507
+ semester.label
7508
+ ),
7509
+ fiscalSemesters
7510
+ )
7511
+ ), /* @__PURE__ */ React.createElement(
7512
+ Flex,
7513
+ {
7514
+ justifyContent: "space-around",
7515
+ w: "full",
7516
+ pt: shouldShow(fiscalSemesters) ? "0" : "2",
7517
+ pr: "4",
7458
7518
  display: shouldShow(fiscalQuarters) ? "flex" : "none"
7459
7519
  },
7460
7520
  map(