@layerfi/components 0.1.129-alpha → 0.1.129-alpha.1

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.
@@ -222,7 +222,7 @@ const getIntlLocale = (locale) => {
222
222
  return isSupportedLocale(locale) ? locale : DEFAULT_LOCALE;
223
223
  };
224
224
  const name = "@layerfi/components";
225
- const version$1 = "0.1.129-alpha";
225
+ const version$1 = "0.1.129-alpha.1";
226
226
  const description = "Layer React Components";
227
227
  const main = "dist/cjs/index.cjs";
228
228
  const module$1 = "dist/esm/index.mjs";
@@ -22088,7 +22088,7 @@ const LinkedAccountOptions = ({ children, config, showLedgerBalance }) => {
22088
22088
  }), children]
22089
22089
  });
22090
22090
  };
22091
- var getBadgeConfig = (quickbooksUiState, hasSynced) => {
22091
+ var getBadgeConfig$1 = (quickbooksUiState, hasSynced) => {
22092
22092
  if (!hasSynced) return _objectSpread2({
22093
22093
  variant: BadgeVariant.INFO,
22094
22094
  icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RefreshCcw_default, { size: 12 })
@@ -22129,7 +22129,7 @@ const IntegrationsQuickbooksItemThumb = () => {
22129
22129
  }, [t]);
22130
22130
  if (!quickbooksConnectionStatus) return null;
22131
22131
  const quickbooksUiState = getQuickbooksConnectionSyncUiState(quickbooksConnectionStatus);
22132
- const badgeConfig = getBadgeConfig(quickbooksUiState, hasSynced);
22132
+ const badgeConfig = getBadgeConfig$1(quickbooksUiState, hasSynced);
22133
22133
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(LinkedAccountOptions, {
22134
22134
  config: menuConfig,
22135
22135
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Card, {
@@ -32619,34 +32619,28 @@ const TasksList = ({ pageSize = 8, mobile }) => {
32619
32619
  })] }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TasksEmptyState, {})
32620
32620
  });
32621
32621
  };
32622
- var useBadgeConfig = (status, tasksCount) => {
32623
- const { t } = (0, react_i18next.useTranslation)();
32624
- const { formatNumber: formatNumber$1 } = useIntlFormatter();
32622
+ var buildLongLabel = (t, formatNumber$1, tasksCount) => tPlural(t, "bookkeeping:label.count_tasks", {
32623
+ count: tasksCount,
32624
+ displayCount: formatNumber$1(tasksCount),
32625
+ one: "{{displayCount}} task",
32626
+ other: "{{displayCount}} tasks"
32627
+ });
32628
+ var getBadgeConfig = (status, tasksCount, t, formatNumber$1) => {
32625
32629
  switch (status) {
32626
32630
  case BookkeepingPeriodStatus.IN_PROGRESS_AWAITING_BOOKKEEPER:
32627
32631
  case BookkeepingPeriodStatus.NOT_STARTED:
32628
32632
  case BookkeepingPeriodStatus.CLOSING_IN_REVIEW: return {
32629
32633
  color: "info",
32630
32634
  icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Clock_default, { size: 12 }),
32631
- label: tasksCount ? tPlural(t, "bookkeeping:label.count_tasks", {
32632
- count: tasksCount,
32633
- displayCount: formatNumber$1(tasksCount),
32634
- one: "{{displayCount}} task",
32635
- other: "{{displayCount}} tasks"
32636
- }) : void 0,
32635
+ label: tasksCount ? buildLongLabel(t, formatNumber$1, tasksCount) : void 0,
32637
32636
  labelShort: tasksCount ? formatNumber$1(tasksCount) : void 0
32638
32637
  };
32639
32638
  case BookkeepingPeriodStatus.IN_PROGRESS_AWAITING_CUSTOMER:
32640
32639
  case BookkeepingPeriodStatus.CLOSED_OPEN_TASKS: return {
32641
32640
  color: "warning",
32642
- label: tasksCount ? tPlural(t, "bookkeeping:label.count_tasks", {
32643
- count: tasksCount,
32644
- displayCount: formatNumber$1(tasksCount),
32645
- one: "{{displayCount}} task",
32646
- other: "{{displayCount}} tasks"
32647
- }) : void 0,
32648
- labelShort: tasksCount ? formatNumber$1(tasksCount) : void 0,
32649
- icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AlertCircle_default, { size: 12 })
32641
+ icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AlertCircle_default, { size: 12 }),
32642
+ label: tasksCount ? buildLongLabel(t, formatNumber$1, tasksCount) : void 0,
32643
+ labelShort: tasksCount ? formatNumber$1(tasksCount) : void 0
32650
32644
  };
32651
32645
  case BookkeepingPeriodStatus.CLOSED_COMPLETE: return {
32652
32646
  color: "success",
@@ -32660,37 +32654,38 @@ var useBadgeConfig = (status, tasksCount) => {
32660
32654
  });
32661
32655
  }
32662
32656
  };
32663
- const TaskStatusBadge = ({ status, tasksCount }) => {
32664
- const badgeConfig = useBadgeConfig(status, tasksCount);
32657
+ var BadgeContent = ({ color, icon, display }) => {
32658
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(HStack, _objectSpread2(_objectSpread2({ className: "Layer__TasksBadge" }, toDataProperties({
32659
+ status: color,
32660
+ icononly: !display
32661
+ })), {}, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(HStack, {
32662
+ align: "center",
32663
+ justify: "center",
32664
+ className: "Layer__TasksBadge__Icon",
32665
+ "data-status": color,
32666
+ children: icon
32667
+ }), display ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Text, {
32668
+ className: "Layer__TasksBadge__Label",
32669
+ size: TextSize.sm,
32670
+ status: color,
32671
+ invertColor: color === "warning",
32672
+ weight: TextWeight.bold,
32673
+ children: display
32674
+ }) : null] }));
32675
+ };
32676
+ const TaskStatusBadge = ({ status, tasksCount, isMobile }) => {
32677
+ const { t } = (0, react_i18next.useTranslation)();
32678
+ const { formatNumber: formatNumber$1 } = useIntlFormatter();
32679
+ const badgeConfig = getBadgeConfig(status, tasksCount, t, formatNumber$1);
32665
32680
  if (!badgeConfig) return;
32666
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", _objectSpread2(_objectSpread2({ className: "Layer__tasks__badge" }, toDataProperties({
32667
- status: badgeConfig.color,
32668
- icononly: !badgeConfig.label
32669
- })), {}, { children: [
32670
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
32671
- className: "Layer__tasks__badge__icon-wrapper",
32672
- "data-status": badgeConfig.color,
32673
- children: badgeConfig.icon
32674
- }),
32675
- badgeConfig.label && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Text, {
32676
- className: "Layer__tasks__badge__label",
32677
- size: TextSize.sm,
32678
- status: badgeConfig.color,
32679
- invertColor: badgeConfig.color === "warning",
32680
- weight: TextWeight.bold,
32681
- children: badgeConfig.label
32682
- }),
32683
- badgeConfig.labelShort && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Text, {
32684
- className: "Layer__tasks__badge__label-short",
32685
- size: TextSize.sm,
32686
- status: badgeConfig.color,
32687
- invertColor: badgeConfig.color === "warning",
32688
- weight: TextWeight.bold,
32689
- children: badgeConfig.labelShort
32690
- })
32691
- ] }));
32681
+ const display = isMobile ? badgeConfig.labelShort : badgeConfig.label;
32682
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(BadgeContent, {
32683
+ color: badgeConfig.color,
32684
+ icon: badgeConfig.icon,
32685
+ display
32686
+ });
32692
32687
  };
32693
- const TaskMonthTile = ({ data, onClick, active, disabled }) => {
32688
+ const TaskMonthTile = ({ data, onClick, active, disabled, isMobile }) => {
32694
32689
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", _objectSpread2(_objectSpread2({
32695
32690
  className: "Layer__tasks-month-selector__month",
32696
32691
  onClick: () => !disabled && onClick(new Date(data.year, data.month - 1, 1))
@@ -32703,7 +32698,8 @@ const TaskMonthTile = ({ data, onClick, active, disabled }) => {
32703
32698
  children: data.monthStr
32704
32699
  }), data.status && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TaskStatusBadge, {
32705
32700
  status: data.status,
32706
- tasksCount: data.total - data.completed
32701
+ tasksCount: data.total - data.completed,
32702
+ isMobile
32707
32703
  })] }));
32708
32704
  };
32709
32705
  function useActiveYearBookkeepingPeriods() {
@@ -32714,7 +32710,7 @@ function useActiveYearBookkeepingPeriods() {
32714
32710
  return data === null || data === void 0 ? void 0 : data.filter((period) => period.year === activeYear);
32715
32711
  }, [data, activeYear]) };
32716
32712
  }
32717
- function TasksMonthSelector() {
32713
+ function TasksMonthSelector({ isMobile }) {
32718
32714
  const { date } = useGlobalDate();
32719
32715
  const { formatDate: formatDate$1 } = useIntlFormatter();
32720
32716
  const { setMonthByPeriod } = useGlobalDatePeriodAlignedActions();
@@ -32764,7 +32760,8 @@ function TasksMonthSelector() {
32764
32760
  }),
32765
32761
  data: monthData,
32766
32762
  active: monthData.month === activeMonthNumber,
32767
- disabled: monthData.disabled
32763
+ disabled: monthData.disabled,
32764
+ isMobile
32768
32765
  }, idx);
32769
32766
  })
32770
32767
  });
@@ -33132,7 +33129,7 @@ const Tabs = ({ name: name$1, options, selected, onChange }) => {
33132
33129
  })
33133
33130
  });
33134
33131
  };
33135
- const TasksYearsTabs = () => {
33132
+ const TasksYearsTabs = ({ isMobile }) => {
33136
33133
  const { date } = useGlobalDate();
33137
33134
  const { setMonthByPeriod } = useGlobalDatePeriodAlignedActions();
33138
33135
  const { formatDate: formatDate$1 } = useIntlFormatter();
@@ -33153,11 +33150,16 @@ const TasksYearsTabs = () => {
33153
33150
  label: formatDate$1(new Date(y.year, 0, 1), DateFormat.Year),
33154
33151
  badge: !y.completed && y.unresolvedTasks ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TaskStatusBadge, {
33155
33152
  status: y.unresolvedTasks ? BookkeepingPeriodStatus.IN_PROGRESS_AWAITING_CUSTOMER : BookkeepingPeriodStatus.CLOSED_COMPLETE,
33156
- tasksCount: y.unresolvedTasks
33153
+ tasksCount: y.unresolvedTasks,
33154
+ isMobile
33157
33155
  }) : null
33158
33156
  };
33159
33157
  });
33160
- }, [formatDate$1, yearStatuses]),
33158
+ }, [
33159
+ formatDate$1,
33160
+ yearStatuses,
33161
+ isMobile
33162
+ ]),
33161
33163
  selected: activeYear.toString(),
33162
33164
  onChange: (year) => setCurrentYear(year.target.value)
33163
33165
  });
@@ -33175,6 +33177,7 @@ function Tasks({ mobile = false, tasksHeader, onClickReconnectAccounts, stringOv
33175
33177
  const { t } = (0, react_i18next.useTranslation)();
33176
33178
  const { data, isLoading } = useBookkeepingPeriods();
33177
33179
  const { data: callBookings, isLoading: isLoadingCallBookings } = useCallBookings();
33180
+ const { isMobile } = useSizeClass();
33178
33181
  const tasksState = (0, react.useMemo)(() => {
33179
33182
  var _data$length, _callBookings$some;
33180
33183
  if (isLoading || isLoadingCallBookings) return "loading";
@@ -33211,8 +33214,8 @@ function Tasks({ mobile = false, tasksHeader, onClickReconnectAccounts, stringOv
33211
33214
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(P, { children: t("bookkeeping:label.please_contact_support", "If you believe this is an error, please contact support.") })]
33212
33215
  }) }),
33213
33216
  children: () => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
33214
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TasksYearsTabs, {}),
33215
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TasksMonthSelector, {}),
33217
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TasksYearsTabs, { isMobile }),
33218
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TasksMonthSelector, { isMobile }),
33216
33219
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TasksPending, {}),
33217
33220
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TasksList, { mobile })
33218
33221
  ] })
@@ -194,7 +194,7 @@ const getIntlLocale = (locale) => {
194
194
  return isSupportedLocale(locale) ? locale : DEFAULT_LOCALE;
195
195
  };
196
196
  const name = "@layerfi/components";
197
- const version = "0.1.129-alpha";
197
+ const version = "0.1.129-alpha.1";
198
198
  const description = "Layer React Components";
199
199
  const main = "dist/cjs/index.cjs";
200
200
  const module = "dist/esm/index.mjs";
@@ -20474,7 +20474,7 @@ const LinkedAccountOptions = ({ children, config, showLedgerBalance }) => {
20474
20474
  }), children]
20475
20475
  });
20476
20476
  };
20477
- var getBadgeConfig = (quickbooksUiState, hasSynced) => {
20477
+ var getBadgeConfig$1 = (quickbooksUiState, hasSynced) => {
20478
20478
  if (!hasSynced) return _objectSpread2({
20479
20479
  variant: BadgeVariant.INFO,
20480
20480
  icon: /* @__PURE__ */ jsx(RefreshCcw_default, { size: 12 })
@@ -20515,7 +20515,7 @@ const IntegrationsQuickbooksItemThumb = () => {
20515
20515
  }, [t]);
20516
20516
  if (!quickbooksConnectionStatus) return null;
20517
20517
  const quickbooksUiState = getQuickbooksConnectionSyncUiState(quickbooksConnectionStatus);
20518
- const badgeConfig = getBadgeConfig(quickbooksUiState, hasSynced);
20518
+ const badgeConfig = getBadgeConfig$1(quickbooksUiState, hasSynced);
20519
20519
  return /* @__PURE__ */ jsxs(LinkedAccountOptions, {
20520
20520
  config: menuConfig,
20521
20521
  children: [/* @__PURE__ */ jsxs(Card, {
@@ -30997,34 +30997,28 @@ const TasksList = ({ pageSize = 8, mobile }) => {
30997
30997
  })] }) : /* @__PURE__ */ jsx(TasksEmptyState, {})
30998
30998
  });
30999
30999
  };
31000
- var useBadgeConfig = (status, tasksCount) => {
31001
- const { t } = useTranslation();
31002
- const { formatNumber: formatNumber$1 } = useIntlFormatter();
31000
+ var buildLongLabel = (t, formatNumber$1, tasksCount) => tPlural(t, "bookkeeping:label.count_tasks", {
31001
+ count: tasksCount,
31002
+ displayCount: formatNumber$1(tasksCount),
31003
+ one: "{{displayCount}} task",
31004
+ other: "{{displayCount}} tasks"
31005
+ });
31006
+ var getBadgeConfig = (status, tasksCount, t, formatNumber$1) => {
31003
31007
  switch (status) {
31004
31008
  case BookkeepingPeriodStatus.IN_PROGRESS_AWAITING_BOOKKEEPER:
31005
31009
  case BookkeepingPeriodStatus.NOT_STARTED:
31006
31010
  case BookkeepingPeriodStatus.CLOSING_IN_REVIEW: return {
31007
31011
  color: "info",
31008
31012
  icon: /* @__PURE__ */ jsx(Clock_default, { size: 12 }),
31009
- label: tasksCount ? tPlural(t, "bookkeeping:label.count_tasks", {
31010
- count: tasksCount,
31011
- displayCount: formatNumber$1(tasksCount),
31012
- one: "{{displayCount}} task",
31013
- other: "{{displayCount}} tasks"
31014
- }) : void 0,
31013
+ label: tasksCount ? buildLongLabel(t, formatNumber$1, tasksCount) : void 0,
31015
31014
  labelShort: tasksCount ? formatNumber$1(tasksCount) : void 0
31016
31015
  };
31017
31016
  case BookkeepingPeriodStatus.IN_PROGRESS_AWAITING_CUSTOMER:
31018
31017
  case BookkeepingPeriodStatus.CLOSED_OPEN_TASKS: return {
31019
31018
  color: "warning",
31020
- label: tasksCount ? tPlural(t, "bookkeeping:label.count_tasks", {
31021
- count: tasksCount,
31022
- displayCount: formatNumber$1(tasksCount),
31023
- one: "{{displayCount}} task",
31024
- other: "{{displayCount}} tasks"
31025
- }) : void 0,
31026
- labelShort: tasksCount ? formatNumber$1(tasksCount) : void 0,
31027
- icon: /* @__PURE__ */ jsx(AlertCircle_default, { size: 12 })
31019
+ icon: /* @__PURE__ */ jsx(AlertCircle_default, { size: 12 }),
31020
+ label: tasksCount ? buildLongLabel(t, formatNumber$1, tasksCount) : void 0,
31021
+ labelShort: tasksCount ? formatNumber$1(tasksCount) : void 0
31028
31022
  };
31029
31023
  case BookkeepingPeriodStatus.CLOSED_COMPLETE: return {
31030
31024
  color: "success",
@@ -31038,37 +31032,38 @@ var useBadgeConfig = (status, tasksCount) => {
31038
31032
  });
31039
31033
  }
31040
31034
  };
31041
- const TaskStatusBadge = ({ status, tasksCount }) => {
31042
- const badgeConfig = useBadgeConfig(status, tasksCount);
31035
+ var BadgeContent = ({ color, icon, display }) => {
31036
+ return /* @__PURE__ */ jsxs(HStack, _objectSpread2(_objectSpread2({ className: "Layer__TasksBadge" }, toDataProperties({
31037
+ status: color,
31038
+ icononly: !display
31039
+ })), {}, { children: [/* @__PURE__ */ jsx(HStack, {
31040
+ align: "center",
31041
+ justify: "center",
31042
+ className: "Layer__TasksBadge__Icon",
31043
+ "data-status": color,
31044
+ children: icon
31045
+ }), display ? /* @__PURE__ */ jsx(Text$2, {
31046
+ className: "Layer__TasksBadge__Label",
31047
+ size: TextSize.sm,
31048
+ status: color,
31049
+ invertColor: color === "warning",
31050
+ weight: TextWeight.bold,
31051
+ children: display
31052
+ }) : null] }));
31053
+ };
31054
+ const TaskStatusBadge = ({ status, tasksCount, isMobile }) => {
31055
+ const { t } = useTranslation();
31056
+ const { formatNumber: formatNumber$1 } = useIntlFormatter();
31057
+ const badgeConfig = getBadgeConfig(status, tasksCount, t, formatNumber$1);
31043
31058
  if (!badgeConfig) return;
31044
- return /* @__PURE__ */ jsxs("span", _objectSpread2(_objectSpread2({ className: "Layer__tasks__badge" }, toDataProperties({
31045
- status: badgeConfig.color,
31046
- icononly: !badgeConfig.label
31047
- })), {}, { children: [
31048
- /* @__PURE__ */ jsx("span", {
31049
- className: "Layer__tasks__badge__icon-wrapper",
31050
- "data-status": badgeConfig.color,
31051
- children: badgeConfig.icon
31052
- }),
31053
- badgeConfig.label && /* @__PURE__ */ jsx(Text$2, {
31054
- className: "Layer__tasks__badge__label",
31055
- size: TextSize.sm,
31056
- status: badgeConfig.color,
31057
- invertColor: badgeConfig.color === "warning",
31058
- weight: TextWeight.bold,
31059
- children: badgeConfig.label
31060
- }),
31061
- badgeConfig.labelShort && /* @__PURE__ */ jsx(Text$2, {
31062
- className: "Layer__tasks__badge__label-short",
31063
- size: TextSize.sm,
31064
- status: badgeConfig.color,
31065
- invertColor: badgeConfig.color === "warning",
31066
- weight: TextWeight.bold,
31067
- children: badgeConfig.labelShort
31068
- })
31069
- ] }));
31059
+ const display = isMobile ? badgeConfig.labelShort : badgeConfig.label;
31060
+ return /* @__PURE__ */ jsx(BadgeContent, {
31061
+ color: badgeConfig.color,
31062
+ icon: badgeConfig.icon,
31063
+ display
31064
+ });
31070
31065
  };
31071
- const TaskMonthTile = ({ data, onClick, active, disabled }) => {
31066
+ const TaskMonthTile = ({ data, onClick, active, disabled, isMobile }) => {
31072
31067
  return /* @__PURE__ */ jsxs("div", _objectSpread2(_objectSpread2({
31073
31068
  className: "Layer__tasks-month-selector__month",
31074
31069
  onClick: () => !disabled && onClick(new Date(data.year, data.month - 1, 1))
@@ -31081,7 +31076,8 @@ const TaskMonthTile = ({ data, onClick, active, disabled }) => {
31081
31076
  children: data.monthStr
31082
31077
  }), data.status && /* @__PURE__ */ jsx(TaskStatusBadge, {
31083
31078
  status: data.status,
31084
- tasksCount: data.total - data.completed
31079
+ tasksCount: data.total - data.completed,
31080
+ isMobile
31085
31081
  })] }));
31086
31082
  };
31087
31083
  function useActiveYearBookkeepingPeriods() {
@@ -31092,7 +31088,7 @@ function useActiveYearBookkeepingPeriods() {
31092
31088
  return data === null || data === void 0 ? void 0 : data.filter((period) => period.year === activeYear);
31093
31089
  }, [data, activeYear]) };
31094
31090
  }
31095
- function TasksMonthSelector() {
31091
+ function TasksMonthSelector({ isMobile }) {
31096
31092
  const { date } = useGlobalDate();
31097
31093
  const { formatDate: formatDate$1 } = useIntlFormatter();
31098
31094
  const { setMonthByPeriod } = useGlobalDatePeriodAlignedActions();
@@ -31142,7 +31138,8 @@ function TasksMonthSelector() {
31142
31138
  }),
31143
31139
  data: monthData,
31144
31140
  active: monthData.month === activeMonthNumber,
31145
- disabled: monthData.disabled
31141
+ disabled: monthData.disabled,
31142
+ isMobile
31146
31143
  }, idx);
31147
31144
  })
31148
31145
  });
@@ -31510,7 +31507,7 @@ const Tabs = ({ name: name$1, options, selected, onChange }) => {
31510
31507
  })
31511
31508
  });
31512
31509
  };
31513
- const TasksYearsTabs = () => {
31510
+ const TasksYearsTabs = ({ isMobile }) => {
31514
31511
  const { date } = useGlobalDate();
31515
31512
  const { setMonthByPeriod } = useGlobalDatePeriodAlignedActions();
31516
31513
  const { formatDate: formatDate$1 } = useIntlFormatter();
@@ -31531,11 +31528,16 @@ const TasksYearsTabs = () => {
31531
31528
  label: formatDate$1(new Date(y.year, 0, 1), DateFormat.Year),
31532
31529
  badge: !y.completed && y.unresolvedTasks ? /* @__PURE__ */ jsx(TaskStatusBadge, {
31533
31530
  status: y.unresolvedTasks ? BookkeepingPeriodStatus.IN_PROGRESS_AWAITING_CUSTOMER : BookkeepingPeriodStatus.CLOSED_COMPLETE,
31534
- tasksCount: y.unresolvedTasks
31531
+ tasksCount: y.unresolvedTasks,
31532
+ isMobile
31535
31533
  }) : null
31536
31534
  };
31537
31535
  });
31538
- }, [formatDate$1, yearStatuses]),
31536
+ }, [
31537
+ formatDate$1,
31538
+ yearStatuses,
31539
+ isMobile
31540
+ ]),
31539
31541
  selected: activeYear.toString(),
31540
31542
  onChange: (year) => setCurrentYear(year.target.value)
31541
31543
  });
@@ -31553,6 +31555,7 @@ function Tasks({ mobile = false, tasksHeader, onClickReconnectAccounts, stringOv
31553
31555
  const { t } = useTranslation();
31554
31556
  const { data, isLoading } = useBookkeepingPeriods();
31555
31557
  const { data: callBookings, isLoading: isLoadingCallBookings } = useCallBookings();
31558
+ const { isMobile } = useSizeClass();
31556
31559
  const tasksState = useMemo(() => {
31557
31560
  var _data$length, _callBookings$some;
31558
31561
  if (isLoading || isLoadingCallBookings) return "loading";
@@ -31589,8 +31592,8 @@ function Tasks({ mobile = false, tasksHeader, onClickReconnectAccounts, stringOv
31589
31592
  }), /* @__PURE__ */ jsx(P, { children: t("bookkeeping:label.please_contact_support", "If you believe this is an error, please contact support.") })]
31590
31593
  }) }),
31591
31594
  children: () => /* @__PURE__ */ jsxs(Fragment$1, { children: [
31592
- /* @__PURE__ */ jsx(TasksYearsTabs, {}),
31593
- /* @__PURE__ */ jsx(TasksMonthSelector, {}),
31595
+ /* @__PURE__ */ jsx(TasksYearsTabs, { isMobile }),
31596
+ /* @__PURE__ */ jsx(TasksMonthSelector, { isMobile }),
31594
31597
  /* @__PURE__ */ jsx(TasksPending, {}),
31595
31598
  /* @__PURE__ */ jsx(TasksList, { mobile })
31596
31599
  ] })
package/dist/index.css CHANGED
@@ -4123,15 +4123,6 @@
4123
4123
 
4124
4124
  .Layer__tabs--initialized .Layer__tabs__thumb {
4125
4125
  transition: left 150ms ease, width 150ms ease;
4126
- }
4127
-
4128
- @container (width <= 400px) {
4129
- .Layer__tabs-option .Layer__tasks__badge .Layer__tasks__badge__label {
4130
- display: none;
4131
- }
4132
- .Layer__tabs-option .Layer__tasks__badge .Layer__tasks__badge__label-short {
4133
- display: flex;
4134
- }
4135
4126
  }body .calendly-overlay .calendly-popup {
4136
4127
  max-height: 1024px;
4137
4128
  }
@@ -7818,7 +7809,7 @@ tbody .Layer__table__empty-row:first-child {
7818
7809
  .Layer__tasks-header__notification__button:hover {
7819
7810
  background: var(--color-base-1000);
7820
7811
  }
7821
- .Layer__tasks__badge {
7812
+ .Layer__TasksBadge {
7822
7813
  display: flex;
7823
7814
  gap: var(--spacing-3xs);
7824
7815
  align-items: center;
@@ -7829,48 +7820,34 @@ tbody .Layer__table__empty-row:first-child {
7829
7820
  color: var(--color-info-warning-bg);
7830
7821
  white-space: nowrap;
7831
7822
  }
7832
- .Layer__tasks__badge .Layer__tasks__badge__label-short {
7833
- display: none;
7834
- }
7835
- @container (width <= 130px) {
7836
- .Layer__tasks__badge .Layer__tasks__badge__label {
7837
- display: none;
7838
- }
7839
- .Layer__tasks__badge .Layer__tasks__badge__label-short {
7840
- display: flex;
7841
- }
7842
- }
7843
- .Layer__tasks__badge[data-icononly] {
7823
+ .Layer__TasksBadge[data-icononly] {
7844
7824
  gap: 0;
7845
7825
  height: 16px;
7846
7826
  width: 16px;
7847
7827
  padding: 0;
7848
7828
  border-radius: 50%;
7849
7829
  }
7850
- .Layer__tasks__badge .Layer__text {
7830
+ .Layer__TasksBadge .Layer__text {
7851
7831
  line-height: 10px;
7852
7832
  }
7853
- .Layer__tasks__badge .Layer__tasks__badge__icon-wrapper {
7854
- display: flex;
7855
- align-items: center;
7856
- justify-content: center;
7833
+ .Layer__TasksBadge .Layer__TasksBadge__Icon {
7857
7834
  height: 16px;
7858
7835
  width: 16px;
7859
7836
  border-radius: 50%;
7860
7837
  }
7861
- .Layer__tasks__badge[data-status=info] {
7838
+ .Layer__TasksBadge[data-status=info] {
7862
7839
  background: var(--color-info-bg);
7863
7840
  color: var(--color-info-fg);
7864
7841
  }
7865
- .Layer__tasks__badge[data-status=warning] {
7842
+ .Layer__TasksBadge[data-status=warning] {
7866
7843
  background: var(--color-info-warning);
7867
7844
  color: var(--color-info-warning-bg);
7868
7845
  }
7869
- .Layer__tasks__badge[data-status=success] {
7846
+ .Layer__TasksBadge[data-status=success] {
7870
7847
  background: var(--color-info-success-bg);
7871
7848
  color: var(--color-info-success-fg);
7872
7849
  }
7873
- .Layer__tasks__badge[data-status=error] {
7850
+ .Layer__TasksBadge[data-status=error] {
7874
7851
  background: var(--color-info-error-bg);
7875
7852
  color: var(--color-info-error);
7876
7853
  }
@@ -7887,16 +7864,6 @@ tbody .Layer__table__empty-row:first-child {
7887
7864
  grid-template-columns: repeat(4, 1fr);
7888
7865
  }
7889
7866
  }
7890
- @container (max-width: 400px) {
7891
- .Layer__tasks-month-selector {
7892
- grid-template-columns: repeat(2, 1fr);
7893
- }
7894
- }
7895
- @container (max-width: 340px) {
7896
- .Layer__tasks-month-selector {
7897
- grid-template-columns: repeat(1, 1fr);
7898
- }
7899
- }
7900
7867
  .Layer__tasks-month-selector__month {
7901
7868
  display: flex;
7902
7869
  flex: 1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@layerfi/components",
3
- "version": "0.1.129-alpha",
3
+ "version": "0.1.129-alpha.1",
4
4
  "description": "Layer React Components",
5
5
  "main": "dist/cjs/index.cjs",
6
6
  "module": "dist/esm/index.mjs",
@@ -124,4 +124,4 @@
124
124
  "uuid": "^11.1.0",
125
125
  "zustand": "^5.0.4"
126
126
  }
127
- }
127
+ }