@payfit/unity-components 2.55.17 → 2.55.18

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.
@@ -0,0 +1,3 @@
1
+ declare const TaskGroupContext: import('react').Context<string | null>;
2
+ declare const useTaskGroupId: () => string | null;
3
+ export { TaskGroupContext, useTaskGroupId };
@@ -0,0 +1,5 @@
1
+ import { createContext as e, useContext as t } from "react";
2
+ //#region src/components/task-menu/TaskGroup.context.ts
3
+ var n = e(null), r = () => t(n);
4
+ //#endregion
5
+ export { n as TaskGroupContext, r as useTaskGroupId };
@@ -7,7 +7,7 @@ export interface CurrentTask {
7
7
  }
8
8
  type TaskMenuContextValue = {
9
9
  currentTask: CurrentTask | null | undefined;
10
- setCurrentTask: ((currentTask: CurrentTask) => void) | undefined;
10
+ setCurrentTask: ((currentTask: CurrentTask, taskGroupId?: string) => void) | undefined;
11
11
  toggleTaskGroup: ((open: string) => void) | undefined;
12
12
  expandedTaskGroup: string | null | undefined;
13
13
  taskMenuId: string;
@@ -1,10 +1,10 @@
1
- import { createContext as e, useContext as t, useRef as n, useState as r } from "react";
2
- import { jsx as i } from "react/jsx-runtime";
3
- import { useId as a } from "react-aria/useId";
4
- import { useOverlayTriggerState as o } from "react-stately/useOverlayTriggerState";
5
- import { useOverlayTrigger as s } from "react-aria/useOverlayTrigger";
1
+ import { createContext as e, useCallback as t, useContext as n, useRef as r, useState as i } from "react";
2
+ import { jsx as a } from "react/jsx-runtime";
3
+ import { useId as o } from "react-aria/useId";
4
+ import { useOverlayTriggerState as s } from "react-stately/useOverlayTriggerState";
5
+ import { useOverlayTrigger as c } from "react-aria/useOverlayTrigger";
6
6
  //#region src/components/task-menu/TaskMenu.context.tsx
7
- var c = e({
7
+ var l = e({
8
8
  currentTask: void 0,
9
9
  setCurrentTask: void 0,
10
10
  toggleTaskGroup: void 0,
@@ -17,31 +17,33 @@ var c = e({
17
17
  triggerProps: {},
18
18
  overlayProps: {}
19
19
  });
20
- function l({ children: e }) {
21
- let t = a(), [l, u] = r(null), [d, f] = r(null), [p, m] = r(null), h = o({}), g = n(null), _ = n(null), { triggerProps: v, overlayProps: y } = s({ type: "dialog" }, h, g), b = `task-menu-${t}`;
22
- return /* @__PURE__ */ i(c.Provider, {
20
+ function u({ children: e }) {
21
+ let n = o(), [u, d] = i(null), [f, p] = i(null), [m, h] = i(null), g = s({}), _ = r(null), v = r(null), { triggerProps: y, overlayProps: b } = c({ type: "dialog" }, g, _), x = `task-menu-${n}`, S = t((e, t) => {
22
+ d(e), h(t ?? null), p(t ?? null);
23
+ }, []);
24
+ return /* @__PURE__ */ a(l.Provider, {
23
25
  value: {
24
- currentTask: l,
25
- setCurrentTask: u,
26
+ currentTask: u,
27
+ setCurrentTask: S,
26
28
  toggleTaskGroup: (e) => {
27
- e === p ? (m(null), f(null)) : (m(e), f(d === e ? null : e));
29
+ e === m ? (h(null), p(null)) : (h(e), p(f === e ? null : e));
28
30
  },
29
- expandedTaskGroup: d,
30
- taskMenuId: t,
31
- taskMenuContentId: b,
32
- state: h,
33
- triggerRef: g,
34
- overlayRef: _,
35
- triggerProps: v,
36
- overlayProps: y
31
+ expandedTaskGroup: f,
32
+ taskMenuId: n,
33
+ taskMenuContentId: x,
34
+ state: g,
35
+ triggerRef: _,
36
+ overlayRef: v,
37
+ triggerProps: y,
38
+ overlayProps: b
37
39
  },
38
40
  children: e
39
41
  });
40
42
  }
41
- function u() {
42
- let e = t(c);
43
+ function d() {
44
+ let e = n(l);
43
45
  if (!e) throw Error("useTaskMenuContext must be used within an TaskMenuProvider");
44
46
  return e;
45
47
  }
46
48
  //#endregion
47
- export { c as TaskMenuContext, l as TaskMenuProvider, u as useTaskMenuContext };
49
+ export { l as TaskMenuContext, u as TaskMenuProvider, d as useTaskMenuContext };
@@ -2,17 +2,18 @@ import { Icon as e } from "../../icon/Icon.js";
2
2
  import { Text as t } from "../../text/Text.js";
3
3
  import { useRouter as n } from "../../../providers/router/RouterProvider.js";
4
4
  import { useTaskMenuContext as r } from "../TaskMenu.context.js";
5
- import i from "./dot.js";
6
- import { commonTask as a } from "./task.variants.js";
7
- import { forwardRef as o, useEffect as s } from "react";
8
- import { uyTv as c } from "@payfit/unity-themes";
9
- import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
10
- import { FormattedMessage as f, useIntl as p } from "react-intl";
11
- import { Button as m } from "react-aria-components/Button";
12
- import { Link as h } from "react-aria-components/Link";
5
+ import { useTaskGroupId as i } from "../TaskGroup.context.js";
6
+ import a from "./dot.js";
7
+ import { commonTask as o } from "./task.variants.js";
8
+ import { forwardRef as s, useEffect as c } from "react";
9
+ import { uyTv as l } from "@payfit/unity-themes";
10
+ import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
11
+ import { FormattedMessage as p, useIntl as m } from "react-intl";
12
+ import { Button as h } from "react-aria-components/Button";
13
+ import { Link as g } from "react-aria-components/Link";
13
14
  //#region src/components/task-menu/parts/RawSubTask.tsx
14
- var g = c({
15
- extend: a,
15
+ var _ = l({
16
+ extend: o,
16
17
  slots: {
17
18
  base: ["uy:gap-300 uy:py-100", "uy:md:py-50"],
18
19
  dot: [
@@ -44,9 +45,9 @@ var g = c({
44
45
  element: ["uy:rounded-50"],
45
46
  number: ["uy:group-data-[task-status=uncompleted]/base:group-[&[data-pressed]:not([aria-current=page])]/element:bg-surface-neutral-pressed"]
46
47
  }
47
- }), _ = (t, n, r) => {
48
+ }), v = (t, n, r) => {
48
49
  switch (t) {
49
- case "completed": return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u(e, {
50
+ case "completed": return /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d(e, {
50
51
  className: r?.completed,
51
52
  src: "CheckCircleOutlined",
52
53
  size: 20,
@@ -55,14 +56,14 @@ var g = c({
55
56
  id: "unity:component:task-menu:task:completed:label",
56
57
  defaultMessage: "Completed"
57
58
  })
58
- }), /* @__PURE__ */ u("span", {
59
+ }), /* @__PURE__ */ d("span", {
59
60
  className: "uy:sr-only",
60
- children: /* @__PURE__ */ u(f, {
61
+ children: /* @__PURE__ */ d(p, {
61
62
  id: "unity:component:task-menu:task:completed:label",
62
63
  defaultMessage: "Completed"
63
64
  })
64
65
  })] });
65
- case "locked": return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u(e, {
66
+ case "locked": return /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d(e, {
66
67
  "aria-hidden": "true",
67
68
  className: r?.locked,
68
69
  src: "LockOutlined",
@@ -72,70 +73,71 @@ var g = c({
72
73
  id: "unity:component:task-menu:task:lock:label",
73
74
  defaultMessage: "Locked"
74
75
  })
75
- }), /* @__PURE__ */ u("span", {
76
+ }), /* @__PURE__ */ d("span", {
76
77
  className: "uy:sr-only",
77
- children: /* @__PURE__ */ u(f, {
78
+ children: /* @__PURE__ */ d(p, {
78
79
  id: "unity:component:task-menu:task:lock:label",
79
80
  defaultMessage: "Locked"
80
81
  })
81
82
  })] });
82
83
  default: return null;
83
84
  }
84
- }, v = o(({ href: e, label: a, taskStatus: o = "uncompleted", isExact: c, isDisabled: l, onPress: f, uniqueId: v, ...y }, b) => {
85
- let x = p(), S = n(), { currentTask: C, setCurrentTask: w, state: T } = r();
86
- s(() => {
87
- e && S?.isActive(e.toString(), c) && w?.({
88
- uniqueId: v,
89
- label: a
90
- });
85
+ }, y = s(({ href: e, label: o, taskStatus: s = "uncompleted", isExact: l, isDisabled: u, onPress: p, uniqueId: y, ...b }, x) => {
86
+ let S = m(), C = n(), w = i(), { currentTask: T, setCurrentTask: E, state: D } = r();
87
+ c(() => {
88
+ e && C?.isActive(e.toString(), l) && E?.({
89
+ uniqueId: y,
90
+ label: o
91
+ }, w ?? void 0);
91
92
  }, [
92
93
  e,
93
- c,
94
- S,
95
- v,
96
- a,
94
+ l,
95
+ C,
96
+ y,
97
+ o,
98
+ E,
97
99
  w
98
100
  ]);
99
- let E = C?.uniqueId === v, { base: D, element: O, text: k, dot: A, lock: j } = g({ taskStatus: o }), M = {
100
- "data-current": E,
101
- "aria-current": E ? "page" : void 0
102
- }, N = e ? h : m;
103
- return /* @__PURE__ */ d("li", {
104
- ref: b,
105
- "data-task-status": o,
106
- className: D(),
107
- ...E ? { "data-current": !0 } : {},
108
- ...y,
109
- children: [/* @__PURE__ */ u(i, {
101
+ let O = T?.uniqueId === y, { base: k, element: A, text: j, dot: M, lock: N } = _({ taskStatus: s }), P = {
102
+ "data-current": O,
103
+ "aria-current": O ? "page" : void 0
104
+ }, F = e ? g : h;
105
+ return /* @__PURE__ */ f("li", {
106
+ ref: x,
107
+ "data-task-status": s,
108
+ className: k(),
109
+ ...O ? { "data-current": !0 } : {},
110
+ ...b,
111
+ children: [/* @__PURE__ */ d(a, {
110
112
  width: 8,
111
113
  height: 8,
112
- className: A(),
114
+ className: M(),
113
115
  role: "presentation"
114
- }), /* @__PURE__ */ d(N, {
115
- className: O(),
116
+ }), /* @__PURE__ */ f(F, {
117
+ className: A(),
116
118
  href: e,
117
119
  onPress: (e) => {
118
- w?.({
119
- uniqueId: v,
120
- label: a
121
- }), T?.toggle(), f?.(e);
120
+ E?.({
121
+ uniqueId: y,
122
+ label: o
123
+ }, w ?? void 0), D?.toggle(), p?.(e);
122
124
  },
123
- isDisabled: l,
124
- ...M,
125
- ...y,
126
- children: [/* @__PURE__ */ u(t, {
125
+ isDisabled: u,
126
+ ...P,
127
+ ...b,
128
+ children: [/* @__PURE__ */ d(t, {
127
129
  asElement: "span",
128
- className: k(),
129
- variant: E ? "bodyStrong" : "body",
130
- children: a
131
- }), _(o, x, {
132
- locked: j(),
130
+ className: j(),
131
+ variant: O ? "bodyStrong" : "body",
132
+ children: o
133
+ }), v(s, S, {
134
+ locked: N(),
133
135
  completed: "uy:self-center",
134
136
  uncompleted: ""
135
137
  })]
136
138
  })]
137
139
  });
138
140
  });
139
- v.displayName = "RawSubTask";
141
+ y.displayName = "RawSubTask";
140
142
  //#endregion
141
- export { v as RawSubTask, g as rawSubTask };
143
+ export { y as RawSubTask, _ as rawSubTask };
@@ -26,7 +26,7 @@ var h = s({
26
26
  number: ""
27
27
  }
28
28
  }), g = a(({ href: i, isExact: a = !1, label: s, onPress: g, taskNumber: _, taskStatus: v = "uncompleted", children: y, uniqueId: b, ...x }, S) => {
29
- let C = n(), w = f(), { currentTask: T, setCurrentTask: E, state: D, expandedTaskGroup: O, toggleTaskGroup: k } = r(), A = i ? m : p;
29
+ let C = n(), w = f(), { currentTask: T, setCurrentTask: E, state: D } = r(), O = i ? m : p;
30
30
  o(() => {
31
31
  i && C?.isActive(i.toString(), a) && E?.({
32
32
  uniqueId: b,
@@ -40,30 +40,30 @@ var h = s({
40
40
  b,
41
41
  E
42
42
  ]);
43
- let j = T?.uniqueId === b, M = {
44
- "data-current": j,
45
- "aria-current": j ? "page" : void 0
46
- }, { base: N, number: P, element: F, text: I, lock: L } = h({ taskStatus: v });
43
+ let k = T?.uniqueId === b, A = {
44
+ "data-current": k,
45
+ "aria-current": k ? "page" : void 0
46
+ }, { base: j, number: M, element: N, text: P, lock: F } = h({ taskStatus: v });
47
47
  return /* @__PURE__ */ u("li", {
48
48
  ref: S,
49
49
  "data-task-status": v,
50
- className: N(),
51
- ...j ? { "data-current": !0 } : {},
50
+ className: j(),
51
+ ...k ? { "data-current": !0 } : {},
52
52
  ...x,
53
- children: [/* @__PURE__ */ u(A, {
54
- className: F(),
53
+ children: [/* @__PURE__ */ u(O, {
54
+ className: N(),
55
55
  href: i,
56
56
  onPress: (e) => {
57
57
  E?.({
58
58
  uniqueId: b,
59
59
  label: s
60
- }), D?.toggle(), O && k?.(O), g?.(e);
60
+ }), D?.toggle(), g?.(e);
61
61
  },
62
- ...M,
62
+ ...A,
63
63
  ...x,
64
64
  children: [
65
65
  /* @__PURE__ */ l("div", {
66
- className: P(),
66
+ className: M(),
67
67
  children: v === "completed" ? /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l(e, {
68
68
  size: 24,
69
69
  "aria-hidden": "true",
@@ -80,20 +80,20 @@ var h = s({
80
80
  })
81
81
  })] }) : /* @__PURE__ */ l(t, {
82
82
  asElement: "span",
83
- variant: j ? "bodyStrong" : "body",
83
+ variant: k ? "bodyStrong" : "body",
84
84
  className: "uy:leading-[1]",
85
85
  children: _
86
86
  })
87
87
  }),
88
88
  /* @__PURE__ */ l(t, {
89
89
  asElement: "span",
90
- className: I(),
91
- variant: j ? "bodyStrong" : "body",
90
+ className: P(),
91
+ variant: k ? "bodyStrong" : "body",
92
92
  children: s
93
93
  }),
94
94
  v === "locked" && /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l(e, {
95
95
  "aria-hidden": "true",
96
- className: L(),
96
+ className: F(),
97
97
  src: "LockOutlined",
98
98
  alt: w.formatMessage({
99
99
  id: "unity:component:task-menu:task:lock:label",
@@ -1,16 +1,17 @@
1
1
  import { Icon as e } from "../../icon/Icon.js";
2
2
  import { Text as t } from "../../text/Text.js";
3
3
  import { useTaskMenuContext as n } from "../TaskMenu.context.js";
4
- import { commonTask as r } from "./task.variants.js";
5
- import { Children as i, cloneElement as a, forwardRef as o, isValidElement as s } from "react";
6
- import { uyTv as c } from "@payfit/unity-themes";
7
- import { jsx as l, jsxs as u } from "react/jsx-runtime";
8
- import { useIntl as d } from "react-intl";
9
- import { Button as f } from "react-aria-components/Button";
10
- import { useId as p } from "react-aria/useId";
4
+ import { TaskGroupContext as r } from "../TaskGroup.context.js";
5
+ import { commonTask as i } from "./task.variants.js";
6
+ import { Children as a, cloneElement as o, forwardRef as s, isValidElement as c } from "react";
7
+ import { uyTv as l } from "@payfit/unity-themes";
8
+ import { jsx as u, jsxs as d } from "react/jsx-runtime";
9
+ import { useIntl as f } from "react-intl";
10
+ import { Button as p } from "react-aria-components/Button";
11
+ import { useId as m } from "react-aria/useId";
11
12
  //#region src/components/task-menu/parts/TaskGroup.tsx
12
- var m = c({
13
- extend: r,
13
+ var h = l({
14
+ extend: i,
14
15
  slots: {
15
16
  base: ["uy:relative uy:flex-col uy:px-200", "uy:md:px-0"],
16
17
  element: [
@@ -33,71 +34,74 @@ var m = c({
33
34
  ],
34
35
  text: ["uy:theme-legacy:group-[&[data-task-status=uncompleted][data-active-group=true]]/base:text-content-primary-active", "uy:theme-rebrand:group-[&[data-task-status=uncompleted][data-active-group=true]]/base:text-content-neutral-active"]
35
36
  }
36
- }), h = (e, t) => e ? i.toArray(t).some((t) => s(t) && t.props.uniqueId === e) : !1, g = (e) => e ? i.toArray(e).find((e) => s(e) && e.props.taskStatus !== "completed" && e.props.taskStatus !== "locked") : null, _ = o(({ children: r, label: o, taskNumber: c, taskStatus: _ = "uncompleted", uniqueId: v, ...y }, b) => {
37
- let { currentTask: x, setCurrentTask: S, toggleTaskGroup: C, expandedTaskGroup: w } = n(), T = p(), E = d(), D = w === v, O = (e) => {
38
- if (C?.(v), !e) {
39
- let e = g(r);
40
- if (s(e)) {
37
+ }), g = (e, t) => e ? a.toArray(t).some((t) => c(t) && t.props.uniqueId === e) : !1, _ = (e) => e ? a.toArray(e).find((e) => c(e) && e.props.taskStatus !== "completed" && e.props.taskStatus !== "locked") : null, v = s(({ children: i, label: s, taskNumber: l, taskStatus: v = "uncompleted", uniqueId: y, ...b }, x) => {
38
+ let { currentTask: S, setCurrentTask: C, toggleTaskGroup: w, expandedTaskGroup: T } = n(), E = m(), D = f(), O = T === y, k = (e) => {
39
+ if (w?.(y), !e) {
40
+ let e = _(i);
41
+ if (c(e)) {
41
42
  let { uniqueId: t, label: n } = e.props;
42
- S?.({
43
+ C?.({
43
44
  uniqueId: t,
44
45
  label: n
45
- });
46
+ }, y);
46
47
  }
47
48
  }
48
- }, k = i.map(r, (e) => s(e) ? a(e, { isDisabled: !D }) : e), A = `${T}-toggle`, j = `${T}-content`, M = h(x?.uniqueId, r), { base: N, number: P, text: F, bar: I, element: L, containerSubTasks: R } = m({ taskStatus: _ });
49
- return /* @__PURE__ */ u("li", {
50
- ref: b,
49
+ }, A = a.map(i, (e) => c(e) ? o(e, { isDisabled: !O }) : e), j = `${E}-toggle`, M = `${E}-content`, N = g(S?.uniqueId, i), { base: P, number: F, text: I, bar: L, element: R, containerSubTasks: z } = h({ taskStatus: v });
50
+ return /* @__PURE__ */ d("li", {
51
+ ref: x,
51
52
  "data-group": "true",
52
- "data-task-status": _,
53
- "data-expanded": D,
54
- "data-active-group": M,
55
- className: N(),
56
- children: [/* @__PURE__ */ u(f, {
57
- id: A,
58
- className: L(),
53
+ "data-task-status": v,
54
+ "data-expanded": O,
55
+ "data-active-group": N,
56
+ className: P(),
57
+ children: [/* @__PURE__ */ d(p, {
58
+ id: j,
59
+ className: R(),
59
60
  onPress: () => {
60
- O(D);
61
+ k(O);
61
62
  },
62
- "aria-expanded": D,
63
- "aria-controls": j,
64
- ...y,
65
- children: [/* @__PURE__ */ l("div", {
66
- className: P(),
67
- children: _ === "completed" ? /* @__PURE__ */ l(e, {
63
+ "aria-expanded": O,
64
+ "aria-controls": M,
65
+ ...b,
66
+ children: [/* @__PURE__ */ u("div", {
67
+ className: F(),
68
+ children: v === "completed" ? /* @__PURE__ */ u(e, {
68
69
  size: 24,
69
70
  src: "CheckOutlined",
70
- alt: E.formatMessage({
71
+ alt: D.formatMessage({
71
72
  id: "unity:component:task-menu:task:completed:label",
72
73
  defaultMessage: "Completed"
73
74
  })
74
- }) : /* @__PURE__ */ l(t, {
75
+ }) : /* @__PURE__ */ u(t, {
75
76
  asElement: "span",
76
- variant: M ? "bodyStrong" : "body",
77
+ variant: N ? "bodyStrong" : "body",
77
78
  className: "uy:leading-[1]",
78
- children: c
79
+ children: l
79
80
  })
80
- }), /* @__PURE__ */ l(t, {
81
+ }), /* @__PURE__ */ u(t, {
81
82
  asElement: "span",
82
- className: F(),
83
- variant: M ? "bodyStrong" : "body",
84
- children: o
83
+ className: I(),
84
+ variant: N ? "bodyStrong" : "body",
85
+ children: s
85
86
  })]
86
- }), /* @__PURE__ */ u("div", {
87
- style: { maxHeight: D ? 1e3 : 0 },
88
- children: [/* @__PURE__ */ l("ol", {
89
- id: j,
90
- "aria-labelledby": A,
91
- "aria-hidden": !D,
92
- className: R(),
93
- children: k
94
- }), D && /* @__PURE__ */ l("div", {
87
+ }), /* @__PURE__ */ d("div", {
88
+ style: { maxHeight: O ? 1e3 : 0 },
89
+ children: [/* @__PURE__ */ u("ol", {
90
+ id: M,
91
+ "aria-labelledby": j,
92
+ "aria-hidden": !O,
93
+ className: z(),
94
+ children: /* @__PURE__ */ u(r.Provider, {
95
+ value: y,
96
+ children: A
97
+ })
98
+ }), O && /* @__PURE__ */ u("div", {
95
99
  role: "presentation",
96
- className: I()
100
+ className: L()
97
101
  })]
98
102
  })]
99
103
  });
100
104
  });
101
- _.displayName = "TaskGroup";
105
+ v.displayName = "TaskGroup";
102
106
  //#endregion
103
- export { _ as TaskGroup };
107
+ export { v as TaskGroup };
@@ -1,17 +1,39 @@
1
- import { RawSubTask as e } from "../../../../components/task-menu/parts/RawSubTask.js";
2
- import { jsx as t } from "react/jsx-runtime";
3
- import { createLink as n } from "@tanstack/react-router";
1
+ import { useTaskMenuContext as e } from "../../../../components/task-menu/TaskMenu.context.js";
2
+ import { useTaskGroupId as t } from "../../../../components/task-menu/TaskGroup.context.js";
3
+ import { RawSubTask as n } from "../../../../components/task-menu/parts/RawSubTask.js";
4
+ import { useEffect as r } from "react";
5
+ import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
6
+ import { createLink as s, useLinkProps as c } from "@tanstack/react-router";
4
7
  //#region src/integrations/tanstack-router/components/task-menu/SubTask.tsx
5
- var r = n(e);
6
- function i(n) {
7
- if ("to" in n || "href" in n) {
8
- let e = { "data-current": !0 };
9
- return /* @__PURE__ */ t(r, {
10
- ...n,
11
- activeProps: e
12
- });
13
- } else return /* @__PURE__ */ t(e, { ...n });
8
+ var l = s(n);
9
+ function u({ label: t, taskGroupId: n, uniqueId: i }) {
10
+ let { setCurrentTask: a } = e();
11
+ return r(() => {
12
+ a?.({
13
+ uniqueId: i,
14
+ label: t
15
+ }, n ?? void 0);
16
+ }, [
17
+ t,
18
+ a,
19
+ n,
20
+ i
21
+ ]), null;
14
22
  }
15
- i.displayName = "SubTask";
23
+ function d({ subTaskProps: e }) {
24
+ let n = { "data-current": !0 }, r = c(e), s = t();
25
+ return /* @__PURE__ */ o(i, { children: [r["aria-current"] === "page" && /* @__PURE__ */ a(u, {
26
+ label: e.label,
27
+ taskGroupId: s,
28
+ uniqueId: e.uniqueId
29
+ }), /* @__PURE__ */ a(l, {
30
+ ...e,
31
+ activeProps: n
32
+ })] });
33
+ }
34
+ function f(e) {
35
+ return "to" in e || "href" in e ? /* @__PURE__ */ a(d, { subTaskProps: e }) : /* @__PURE__ */ a(n, { ...e });
36
+ }
37
+ f.displayName = "SubTask";
16
38
  //#endregion
17
- export { i as SubTask };
39
+ export { f as SubTask };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@payfit/unity-components",
3
- "version": "2.55.17",
3
+ "version": "2.55.18",
4
4
  "module": "./dist/esm/index.js",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -93,7 +93,7 @@
93
93
  "tailwind-variants": "3.2.2",
94
94
  "usehooks-ts": "3.1.1",
95
95
  "zod": "4.4.3",
96
- "@payfit/unity-illustrations": "2.55.17"
96
+ "@payfit/unity-illustrations": "2.55.18"
97
97
  },
98
98
  "peerDependencies": {
99
99
  "@hookform/devtools": "^4",
@@ -105,8 +105,8 @@
105
105
  "react-hook-form": "^7",
106
106
  "react-router-dom": "^5",
107
107
  "zod": "^3 || ^4",
108
- "@payfit/unity-icons": "2.55.17",
109
- "@payfit/unity-themes": "2.55.17"
108
+ "@payfit/unity-icons": "2.55.18",
109
+ "@payfit/unity-themes": "2.55.18"
110
110
  },
111
111
  "devDependencies": {
112
112
  "@figma/code-connect": "1.4.8",
@@ -156,10 +156,10 @@
156
156
  "@payfit/hr-apps-tsconfigs": "0.0.0-use.local",
157
157
  "@payfit/storybook-addon-console-errors": "0.0.0-use.local",
158
158
  "@payfit/storybook-config": "0.0.0-use.local",
159
- "@payfit/unity-illustrations": "2.55.17",
160
- "@payfit/vite-configs": "0.0.0-use.local",
161
- "@payfit/unity-themes": "2.55.17",
162
- "@payfit/unity-icons": "2.55.17"
159
+ "@payfit/unity-icons": "2.55.18",
160
+ "@payfit/unity-illustrations": "2.55.18",
161
+ "@payfit/unity-themes": "2.55.18",
162
+ "@payfit/vite-configs": "0.0.0-use.local"
163
163
  },
164
164
  "peerDependenciesMeta": {
165
165
  "@hookform/devtools": {