@payfit/unity-components 1.2.0 → 2.0.0

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.
Files changed (136) hide show
  1. package/dist/esm/components/action-bar/ActionBar.js +14 -14
  2. package/dist/esm/components/actionable/Actionable.js +31 -28
  3. package/dist/esm/components/app-layout/AppLayout.js +17 -17
  4. package/dist/esm/components/app-menu/parts/AppMenuHeader.d.ts +86 -4
  5. package/dist/esm/components/app-menu/parts/AppMenuHeader.js +25 -25
  6. package/dist/esm/components/breadcrumbs/Breadcrumbs.context.js +3 -3
  7. package/dist/esm/components/breadcrumbs/Breadcrumbs.d.ts +19 -11
  8. package/dist/esm/components/breadcrumbs/Breadcrumbs.js +29 -18
  9. package/dist/esm/components/breadcrumbs/parts/Breadcrumb.d.ts +30 -5
  10. package/dist/esm/components/breadcrumbs/parts/Breadcrumb.js +35 -27
  11. package/dist/esm/components/breadcrumbs/parts/RawBreadcrumbLink.d.ts +37 -0
  12. package/dist/esm/components/breadcrumbs/parts/RawBreadcrumbLink.js +36 -0
  13. package/dist/esm/components/client-side-pagination/ClientSidePagination.d.ts +103 -0
  14. package/dist/esm/components/client-side-pagination/ClientSidePagination.js +177 -0
  15. package/dist/esm/components/client-side-pagination/parts/PaginationEllipsis.d.ts +11 -0
  16. package/dist/esm/components/client-side-pagination/parts/PaginationEllipsis.js +30 -0
  17. package/dist/esm/components/client-side-pagination/parts/PaginationJumpDialog.d.ts +8 -0
  18. package/dist/esm/components/{pagination/parts/PaginationLink.d.ts → client-side-pagination/parts/RawPaginationLink.d.ts} +2 -2
  19. package/dist/esm/components/{pagination/parts/PaginationLink.js → client-side-pagination/parts/RawPaginationLink.js} +2 -2
  20. package/dist/esm/components/client-side-pagination/utils/pagination-window.d.ts +8 -0
  21. package/dist/esm/components/client-side-pagination/utils/pagination-window.js +33 -0
  22. package/dist/esm/components/error-state/ErrorState.d.ts +13 -1
  23. package/dist/esm/components/error-state/ErrorState.js +133 -92
  24. package/dist/esm/components/error-state/initConfig.js +1 -1
  25. package/dist/esm/components/fieldset/Fieldset.d.ts +19 -0
  26. package/dist/esm/components/fieldset/Fieldset.js +32 -26
  27. package/dist/esm/components/flex/Flex.js +52 -37
  28. package/dist/esm/components/form-field/FormField.js +12 -12
  29. package/dist/esm/components/form-field/parts/{FormContextualLink.d.ts → RawFormContextualLink.d.ts} +2 -2
  30. package/dist/esm/components/form-field/parts/RawFormContextualLink.js +39 -0
  31. package/dist/esm/components/funnel-layout/parts/FunnelSidebar.d.ts +2 -2
  32. package/dist/esm/components/icon/Icon.js +23 -19
  33. package/dist/esm/components/link/{Link.variants.d.ts → RawLink.d.ts} +92 -0
  34. package/dist/esm/components/link/{Link.variants.js → RawLink.js} +70 -4
  35. package/dist/esm/components/menu/parts/{MenuItem.d.ts → RawMenuItem.d.ts} +3 -4
  36. package/dist/esm/components/menu/parts/{MenuItem.js → RawMenuItem.js} +9 -9
  37. package/dist/esm/components/nav/parts/NavGroup.d.ts +3 -3
  38. package/dist/esm/components/nav/parts/NavGroup.js +62 -51
  39. package/dist/esm/components/nav/parts/{NavItem.d.ts → RawNavItem.d.ts} +102 -5
  40. package/dist/esm/components/nav/parts/RawNavItem.js +106 -0
  41. package/dist/esm/components/page/Page.js +1 -1
  42. package/dist/esm/components/page/parts/PageHeader.d.ts +79 -9
  43. package/dist/esm/components/page/parts/PageHeader.js +22 -20
  44. package/dist/esm/components/pagination/Pagination.d.ts +23 -44
  45. package/dist/esm/components/pagination/Pagination.js +89 -163
  46. package/dist/esm/components/pagination/PaginationContext.d.ts +11 -0
  47. package/dist/esm/components/pagination/PaginationContext.js +15 -0
  48. package/dist/esm/components/pagination/hooks/use-pagination-state.d.ts +63 -0
  49. package/dist/esm/components/pagination/hooks/use-pagination-state.js +27 -0
  50. package/dist/esm/components/pagination/hooks/use-pagination-window.d.ts +64 -0
  51. package/dist/esm/components/pagination/hooks/use-pagination-window.js +15 -0
  52. package/dist/esm/components/pagination/parts/PaginationContent.d.ts +30 -0
  53. package/dist/esm/components/pagination/parts/PaginationContent.js +37 -0
  54. package/dist/esm/components/pagination/parts/PaginationEllipsis.d.ts +23 -4
  55. package/dist/esm/components/pagination/parts/PaginationEllipsis.js +20 -16
  56. package/dist/esm/components/pagination/parts/PaginationItem.d.ts +38 -0
  57. package/dist/esm/components/pagination/parts/PaginationItem.js +22 -0
  58. package/dist/esm/components/pagination/parts/RawPaginationLink.d.ts +11 -0
  59. package/dist/esm/components/pagination/parts/RawPaginationLink.js +60 -0
  60. package/dist/esm/components/pagination/parts/RawPaginationNext.d.ts +22 -0
  61. package/dist/esm/components/pagination/parts/RawPaginationNext.js +70 -0
  62. package/dist/esm/components/pagination/parts/RawPaginationPrevious.d.ts +22 -0
  63. package/dist/esm/components/pagination/parts/RawPaginationPrevious.js +67 -0
  64. package/dist/esm/components/pagination/utils/pagination-window.js +29 -20
  65. package/dist/esm/components/select/Select.js +63 -45
  66. package/dist/esm/components/select/parts/SelectOption.js +9 -9
  67. package/dist/esm/components/skip-links/SkipLinks.js +1 -1
  68. package/dist/esm/components/table/Table.d.ts +1 -0
  69. package/dist/esm/components/table/Table.js +82 -73
  70. package/dist/esm/components/table/hooks/useTableKeyboardNavigation.js +6 -6
  71. package/dist/esm/components/table/parts/TableCell.js +29 -26
  72. package/dist/esm/components/table/parts/TablePagination.d.ts +5 -5
  73. package/dist/esm/components/table/parts/TablePagination.js +10 -10
  74. package/dist/esm/components/table/parts/TableRow.js +21 -18
  75. package/dist/esm/components/tabs/parts/{Tab.d.ts → RawTab.d.ts} +2 -2
  76. package/dist/esm/components/tabs/parts/{Tab.js → RawTab.js} +6 -6
  77. package/dist/esm/components/task-menu/TaskMenu.d.ts +4 -4
  78. package/dist/esm/components/task-menu/parts/{SubTask.d.ts → RawSubTask.d.ts} +7 -7
  79. package/dist/esm/components/task-menu/parts/{SubTask.js → RawSubTask.js} +19 -19
  80. package/dist/esm/components/task-menu/parts/{Task.d.ts → RawTask.d.ts} +7 -7
  81. package/dist/esm/components/task-menu/parts/{Task.js → RawTask.js} +17 -17
  82. package/dist/esm/components/task-menu/parts/TaskGroup.d.ts +5 -5
  83. package/dist/esm/components/text/Text.js +30 -27
  84. package/dist/esm/hooks/use-container-query-level.d.ts +42 -0
  85. package/dist/esm/hooks/use-container-query-level.js +33 -0
  86. package/dist/esm/index.d.ts +21 -11
  87. package/dist/esm/index.js +424 -399
  88. package/dist/esm/integrations/tanstack-router/components/breadcrumbs/Breadcrumb.d.ts +23 -0
  89. package/dist/esm/integrations/tanstack-router/components/breadcrumbs/BreadcrumbLink.d.ts +38 -0
  90. package/dist/esm/integrations/tanstack-router/components/breadcrumbs/BreadcrumbLink.js +7 -0
  91. package/dist/esm/integrations/tanstack-router/components/breadcrumbs/Breadcrumbs.d.ts +23 -0
  92. package/dist/esm/integrations/tanstack-router/components/breadcrumbs/use-route-breadcrumb.d.ts +53 -0
  93. package/dist/esm/integrations/tanstack-router/components/form-contextual-link/FormContextualLink.d.ts +40 -0
  94. package/dist/esm/integrations/tanstack-router/components/form-contextual-link/FormContextualLink.js +7 -0
  95. package/dist/esm/integrations/tanstack-router/components/link/Link.d.ts +33 -0
  96. package/dist/esm/integrations/tanstack-router/components/link/Link.js +7 -0
  97. package/dist/esm/integrations/tanstack-router/components/menu-item/MenuItem.d.ts +49 -0
  98. package/dist/esm/integrations/tanstack-router/components/menu-item/MenuItem.js +16 -0
  99. package/dist/esm/integrations/tanstack-router/components/nav-item/NavItem.d.ts +52 -0
  100. package/dist/esm/integrations/tanstack-router/components/nav-item/NavItem.js +29 -0
  101. package/dist/esm/integrations/tanstack-router/components/pagination/PaginationLink.d.ts +54 -0
  102. package/dist/esm/integrations/tanstack-router/components/pagination/PaginationLink.js +21 -0
  103. package/dist/esm/integrations/tanstack-router/components/pagination/PaginationNext.d.ts +52 -0
  104. package/dist/esm/integrations/tanstack-router/components/pagination/PaginationNext.js +22 -0
  105. package/dist/esm/integrations/tanstack-router/components/pagination/PaginationPrevious.d.ts +51 -0
  106. package/dist/esm/integrations/tanstack-router/components/pagination/PaginationPrevious.js +22 -0
  107. package/dist/esm/integrations/tanstack-router/components/tabs/Tabs.d.ts +82 -0
  108. package/dist/esm/integrations/tanstack-router/components/tabs/Tabs.js +41 -0
  109. package/dist/esm/integrations/tanstack-router/components/tabs/parts/Tab.d.ts +52 -0
  110. package/dist/esm/integrations/tanstack-router/components/tabs/parts/Tab.js +15 -0
  111. package/dist/esm/integrations/tanstack-router/components/tabs/parts/TabList.d.ts +5 -0
  112. package/dist/esm/integrations/tanstack-router/components/tabs/parts/TabPanel.d.ts +77 -0
  113. package/dist/esm/integrations/tanstack-router/components/tabs/parts/TabPanel.js +16 -0
  114. package/dist/esm/integrations/tanstack-router/components/task-menu/SubTask.d.ts +69 -0
  115. package/dist/esm/integrations/tanstack-router/components/task-menu/SubTask.js +14 -0
  116. package/dist/esm/integrations/tanstack-router/components/task-menu/Task.d.ts +64 -0
  117. package/dist/esm/integrations/tanstack-router/components/task-menu/Task.js +14 -0
  118. package/dist/esm/integrations/tanstack-router/index.d.ts +16 -0
  119. package/dist/esm/integrations/tanstack-router/utils/decorators.d.ts +23 -0
  120. package/dist/esm/integrations/tanstack-router.js +34 -0
  121. package/dist/esm/providers/router/RouterProvider.d.ts +7 -2
  122. package/dist/esm/providers/router/RouterProvider.js +14 -10
  123. package/dist/esm/types/DataAttributes.d.ts +1 -1
  124. package/i18n/en-GB.json +1 -0
  125. package/i18n/es-ES.json +1 -0
  126. package/i18n/fr-FR.json +1 -0
  127. package/package.json +47 -25
  128. package/dist/esm/components/form-field/parts/FormContextualLink.js +0 -37
  129. package/dist/esm/components/link/Link.d.ts +0 -93
  130. package/dist/esm/components/link/Link.js +0 -68
  131. package/dist/esm/components/nav/parts/NavItem.js +0 -95
  132. /package/dist/esm/components/{pagination → client-side-pagination}/hooks/use-pagination.d.ts +0 -0
  133. /package/dist/esm/components/{pagination → client-side-pagination}/hooks/use-pagination.js +0 -0
  134. /package/dist/esm/components/{pagination → client-side-pagination}/parts/PaginationJumpDialog.js +0 -0
  135. /package/dist/esm/components/{pagination → client-side-pagination}/parts/PaginationNavButton.d.ts +0 -0
  136. /package/dist/esm/components/{pagination → client-side-pagination}/parts/PaginationNavButton.js +0 -0
@@ -1,8 +1,8 @@
1
- import { jsx as h } from "react/jsx-runtime";
2
- import { memo as v, forwardRef as g } from "react";
3
- import { uyTv as C } from "@payfit/unity-themes";
4
- import { useTableContext as T } from "../Table.context.js";
5
- const w = C({
1
+ import { jsx as C } from "react/jsx-runtime";
2
+ import { memo as v, forwardRef as g, useMemo as T } from "react";
3
+ import { uyTv as w } from "@payfit/unity-themes";
4
+ import { useTableContext as k } from "../Table.context.js";
5
+ const D = w({
6
6
  base: [
7
7
  "uy:px-200 uy:py-150 uy:text-content-neutral uy:typography-body",
8
8
  "uy:focus-visible:outline-2 uy:focus-visible:outline-solid uy:focus-visible:outline-offset-[-2px] uy:focus-visible:outline-utility-focus-ring"
@@ -14,46 +14,49 @@ const w = C({
14
14
  right: "uy:text-right"
15
15
  }
16
16
  }
17
- }), k = v(
17
+ }), K = v(
18
18
  g(
19
19
  ({
20
- children: a,
20
+ children: s,
21
21
  colIndex: t = 0,
22
- rowIndex: n = 0,
23
- align: i,
24
- onKeyDown: u,
22
+ rowIndex: u = 0,
23
+ align: o,
24
+ onKeyDown: i,
25
25
  onFocus: r,
26
- className: s,
27
- isRowHeader: o = !1,
28
- isFocusable: l = !0,
26
+ className: l,
27
+ isRowHeader: a = !1,
28
+ isFocusable: n = !0,
29
29
  ...y
30
30
  }, c) => {
31
- const { keyboardNavigation: f } = T(), { isCellFocused: d, handleCellKeyDown: b, handleCellFocus: m } = f, p = l && d(n, t), x = (e) => {
32
- e.key !== "Tab" && (b(e), u?.(e));
31
+ const { keyboardNavigation: f } = k(), { isCellFocused: b, handleCellKeyDown: d, handleCellFocus: m } = f, p = T(
32
+ () => D({ align: o, className: l }),
33
+ [o, l]
34
+ ), x = n && b(u, t), h = (e) => {
35
+ e.key !== "Tab" && (d(e), i?.(e));
33
36
  };
34
- return /* @__PURE__ */ h(
35
- o ? "th" : "td",
37
+ return /* @__PURE__ */ C(
38
+ a ? "th" : "td",
36
39
  {
37
40
  ref: c,
38
- role: o ? "rowheader" : "gridcell",
41
+ role: a ? "rowheader" : "gridcell",
39
42
  "aria-colindex": t + 1,
40
- tabIndex: p ? 0 : -1,
41
- "data-focusable": l,
42
- className: w({ align: i, className: s }),
43
- onKeyDown: x,
43
+ tabIndex: x ? 0 : -1,
44
+ "data-focusable": n,
45
+ className: p,
46
+ onKeyDown: h,
44
47
  onFocus: (e) => {
45
48
  m(e), r?.(e);
46
49
  },
47
50
  "data-dd-privacy": "mask",
48
51
  ...y,
49
- children: a
52
+ children: s
50
53
  }
51
54
  );
52
55
  }
53
56
  )
54
57
  );
55
- k.displayName = "TableCell";
58
+ K.displayName = "TableCell";
56
59
  export {
57
- k as TableCell,
58
- w as tableCell
60
+ K as TableCell,
61
+ D as tableCell
59
62
  };
@@ -1,6 +1,6 @@
1
1
  import { VariantProps } from '@payfit/unity-themes';
2
2
  import { PropsWithChildren } from 'react';
3
- import { PaginationProps } from '../../pagination/Pagination.js';
3
+ import { ClientSidePaginationProps } from '../../client-side-pagination/ClientSidePagination.js';
4
4
  export declare const tablePagination: import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, string[], {} | {}, undefined, import('tailwind-variants').TVReturnType<unknown, undefined, string[], unknown, unknown, undefined>>;
5
5
  type PageSizeOption = {
6
6
  value: string;
@@ -44,22 +44,22 @@ export interface TablePaginationProps extends PropsWithChildren<VariantProps<typ
44
44
  * This function is intended for handling hover events on individual pagination controls or elements.
45
45
  * It is derived from the `onPageHover` property in the `Pagination` component.
46
46
  */
47
- onPageHover?: PaginationProps['onPageHover'];
47
+ onPageHover?: ClientSidePaginationProps['onPageHover'];
48
48
  /**
49
49
  * Callback fired when the page changes
50
50
  * @param page - The new page number
51
51
  * @param previous - The previous page number
52
52
  * @param direction - The direction of navigation (1 for forward, -1 for backward)
53
53
  */
54
- onPageChange?: PaginationProps['onPageChange'];
54
+ onPageChange?: ClientSidePaginationProps['onPageChange'];
55
55
  /**
56
56
  * Optional callback for next button press
57
57
  */
58
- onNextPress?: PaginationProps['onNextPress'];
58
+ onNextPress?: ClientSidePaginationProps['onNextPress'];
59
59
  /**
60
60
  * Optional callback for previous button press
61
61
  */
62
- onPreviousPress?: PaginationProps['onPreviousPress'];
62
+ onPreviousPress?: ClientSidePaginationProps['onPreviousPress'];
63
63
  /**
64
64
  * The options for the number of rows per page selection dropdown.
65
65
  * If not provided, the default options will be used.
@@ -1,12 +1,12 @@
1
1
  import { jsxs as d, jsx as e } from "react/jsx-runtime";
2
- import { forwardRef as I, useState as j } from "react";
3
- import { uyTv as C } from "@payfit/unity-themes";
2
+ import { forwardRef as C, useState as I } from "react";
3
+ import { uyTv as j } from "@payfit/unity-themes";
4
4
  import { useId as L } from "react-aria";
5
5
  import { useIntl as T } from "react-intl";
6
- import { Pagination as O } from "../../pagination/Pagination.js";
6
+ import { ClientSidePagination as O } from "../../client-side-pagination/ClientSidePagination.js";
7
7
  import { SelectOption as R } from "../../select/parts/SelectOption.js";
8
8
  import { Select as E } from "../../select/Select.js";
9
- const _ = C({
9
+ const _ = j({
10
10
  base: [
11
11
  "uy:bg-surface-neutral-lowest",
12
12
  "uy:sticky uy:bottom-0",
@@ -18,7 +18,7 @@ const _ = C({
18
18
  { value: "50", label: "50" },
19
19
  { value: "100", label: "100" },
20
20
  { value: "200", label: "200" }
21
- ], A = I(
21
+ ], A = C(
22
22
  (b, y) => {
23
23
  const {
24
24
  pageCount: i,
@@ -31,18 +31,18 @@ const _ = C({
31
31
  onPageChange: P,
32
32
  onNextPress: v,
33
33
  onPreviousPress: N,
34
- onPageSizeChange: z,
35
- onPageHover: S,
34
+ onPageSizeChange: S,
35
+ onPageHover: z,
36
36
  itemLabel: g = "unity:component:table:pagination:item",
37
37
  ...w
38
- } = b, a = L(), t = T(), [M, $] = j(h), x = {
38
+ } = b, a = L(), t = T(), [M, $] = I(h), x = {
39
39
  pageCount: i,
40
40
  defaultPage: u,
41
41
  currentPage: r,
42
42
  onPageChange: P,
43
43
  onNextPress: v,
44
44
  onPreviousPress: N,
45
- onPageHover: S
45
+ onPageHover: z
46
46
  }, o = Math.max(((r ?? u ?? 1) - 1) * s + 1, 1), p = Math.min(o + s - 1, n), c = {
47
47
  singular: t.formatMessage(
48
48
  {
@@ -122,7 +122,7 @@ const _ = C({
122
122
  value: `${M}`,
123
123
  onChange: (l) => {
124
124
  const m = parseInt(l, 10);
125
- z?.(m), $(m);
125
+ S?.(m), $(m);
126
126
  },
127
127
  "aria-labelledby": `table-pagination-${a}-pagesize-label`,
128
128
  children: (l) => /* @__PURE__ */ e(R, { id: l.value, children: l.label })
@@ -1,7 +1,7 @@
1
- import { jsx as b } from "react/jsx-runtime";
2
- import d, { memo as y, forwardRef as c, useMemo as f, Children as m, cloneElement as p } from "react";
3
- import { uyTv as v } from "@payfit/unity-themes";
4
- const w = v({
1
+ import { jsx as y } from "react/jsx-runtime";
2
+ import c, { memo as f, forwardRef as m, useMemo as a, Children as p, cloneElement as v } from "react";
3
+ import { uyTv as w } from "@payfit/unity-themes";
4
+ const R = w({
5
5
  base: [
6
6
  "uy:group uy:h-500",
7
7
  "uy:bg-surface-neutral uy:border-b uy:border-solid uy:border-b-border-neutral-enabled",
@@ -10,32 +10,35 @@ const w = v({
10
10
  "uy:aria-[selected=true]:bg-surface-neutral-selected uy:aria-[selected=true]:border-b-border-neutral-selected",
11
11
  "uy:focus-visible:outline-2 uy:focus-visible:outline-solid uy:focus-visible:outline-offset-[-2px] uy:focus-visible:outline-utility-focus-ring"
12
12
  ]
13
- }), g = y(
14
- c(
15
- ({ children: o, className: t, rowIndex: r = 0, onKeyDown: a, isSelected: u, ...s }, l) => {
16
- const i = f(() => m.map(o, (e, n) => d.isValidElement(e) ? p(
13
+ }), g = f(
14
+ m(
15
+ ({ children: o, className: u, rowIndex: r = 0, onKeyDown: s, isSelected: t, ...l }, i) => {
16
+ const n = a(
17
+ () => R({ className: u }),
18
+ [u]
19
+ ), b = a(() => p.map(o, (e, d) => c.isValidElement(e) ? v(
17
20
  e,
18
21
  {
19
22
  rowIndex: r,
20
- colIndex: n,
23
+ colIndex: d,
21
24
  ...e.props
22
25
  }
23
26
  ) : e), [o, r]);
24
- return /* @__PURE__ */ b(
27
+ return /* @__PURE__ */ y(
25
28
  "tr",
26
29
  {
27
- ref: l,
30
+ ref: i,
28
31
  role: "row",
29
- className: w({ className: t }),
32
+ className: n,
30
33
  "aria-rowindex": r + 1,
31
- "aria-selected": u,
34
+ "aria-selected": t,
32
35
  onKeyDown: (e) => {
33
- a?.(e);
36
+ s?.(e);
34
37
  },
35
38
  "data-dd-privacy": "mask",
36
- "data-selectable": u !== void 0,
37
- ...s,
38
- children: i
39
+ "data-selectable": t !== void 0,
40
+ ...l,
41
+ children: b
39
42
  }
40
43
  );
41
44
  }
@@ -44,5 +47,5 @@ const w = v({
44
47
  g.displayName = "TableRow";
45
48
  export {
46
49
  g as TableRow,
47
- w as tableRow
50
+ R as tableRow
48
51
  };
@@ -4,7 +4,7 @@ export interface TabProps extends Omit<AriaTabProps, 'isDisabled' | 'className'
4
4
  id: Key | undefined;
5
5
  suffix?: ReactNode;
6
6
  }
7
- declare const Tab: import('react').ForwardRefExoticComponent<TabProps & {
7
+ declare const RawTab: import('react').ForwardRefExoticComponent<TabProps & {
8
8
  children?: ReactNode | undefined;
9
9
  } & import('react').RefAttributes<HTMLDivElement>>;
10
- export { Tab };
10
+ export { RawTab };
@@ -1,18 +1,18 @@
1
1
  import { jsxs as i, jsx as l } from "react/jsx-runtime";
2
- import { forwardRef as b } from "react";
3
- import { Tab as p } from "react-aria-components";
2
+ import { forwardRef as p } from "react";
3
+ import { Tab as b } from "react-aria-components";
4
4
  import { useTabsContext as c } from "../Tabs.context.js";
5
5
  import { tabsVariant as f } from "../Tabs.variant.js";
6
- const T = b(
6
+ const d = p(
7
7
  ({ children: a, suffix: r, id: o, ...t }, s) => {
8
8
  const { variant: m, scrollable: n } = c(), { tab: e } = f({ variant: m, scrollable: n });
9
- return /* @__PURE__ */ i(p, { ref: s, id: o, ...t, className: e(), children: [
9
+ return /* @__PURE__ */ i(b, { ...t, ref: s, id: o, className: e(), children: [
10
10
  a,
11
11
  r ? /* @__PURE__ */ l("span", { children: r }) : null
12
12
  ] });
13
13
  }
14
14
  );
15
- T.displayName = "Tab";
15
+ d.displayName = "RawTab";
16
16
  export {
17
- T as Tab
17
+ d as RawTab
18
18
  };
@@ -38,14 +38,14 @@ export interface TaskMenuProps extends PropsWithChildren<VariantProps<typeof tas
38
38
  * import { TaskMenu, Task, TaskGroup, SubTask } from '@payfit/unity-components'
39
39
  *
40
40
  * <TaskMenu>
41
- * <Task
41
+ * <RawTask
42
42
  * uniqueId="task1"
43
43
  * label="Complete Profile"
44
44
  * taskNumber={1}
45
45
  * taskStatus="completed"
46
46
  * href="/profile"
47
47
  * />
48
- * <Task
48
+ * <RawTask
49
49
  * uniqueId="task2"
50
50
  * label="Upload Documents"
51
51
  * taskNumber={2}
@@ -58,13 +58,13 @@ export interface TaskMenuProps extends PropsWithChildren<VariantProps<typeof tas
58
58
  * taskNumber={3}
59
59
  * taskStatus="uncompleted"
60
60
  * >
61
- * <SubTask
61
+ * <RawSubTask
62
62
  * uniqueId="step1"
63
63
  * label="Welcome Video"
64
64
  * href="/onboarding/welcome"
65
65
  * taskStatus="completed"
66
66
  * />
67
- * <SubTask
67
+ * <RawSubTask
68
68
  * uniqueId="step2"
69
69
  * label="Company Policies"
70
70
  * href="/onboarding/policies"
@@ -1,5 +1,5 @@
1
- import { TaskProps } from './Task.js';
2
- export declare const subTask: import('tailwind-variants').TVReturnType<{
1
+ import { TaskProps } from './RawTask.js';
2
+ export declare const rawSubTask: import('tailwind-variants').TVReturnType<{
3
3
  taskStatus: {
4
4
  uncompleted: {
5
5
  dot: string[];
@@ -138,7 +138,7 @@ export interface SubTaskProps extends Omit<TaskProps, 'taskNumber'> {
138
138
  *
139
139
  * ```tsx
140
140
  * // Link-based subtask for navigation within a task group
141
- * <SubTask
141
+ * <RawSubTask
142
142
  * uniqueId="profile-setup"
143
143
  * label="Complete Profile Information"
144
144
  * taskStatus="uncompleted"
@@ -146,7 +146,7 @@ export interface SubTaskProps extends Omit<TaskProps, 'taskNumber'> {
146
146
  * />
147
147
  *
148
148
  * // Button-based subtask for custom interactions
149
- * <SubTask
149
+ * <RawSubTask
150
150
  * uniqueId="validate-email"
151
151
  * label="Validate Email Address"
152
152
  * taskStatus="completed"
@@ -154,7 +154,7 @@ export interface SubTaskProps extends Omit<TaskProps, 'taskNumber'> {
154
154
  * />
155
155
  *
156
156
  * // Locked subtask that cannot be interacted with
157
- * <SubTask
157
+ * <RawSubTask
158
158
  * uniqueId="final-approval"
159
159
  * label="Manager Approval"
160
160
  * taskStatus="locked"
@@ -162,5 +162,5 @@ export interface SubTaskProps extends Omit<TaskProps, 'taskNumber'> {
162
162
  * ```
163
163
  * @see {@link SubTaskProps} for all available props
164
164
  */
165
- declare const SubTask: import('react').ForwardRefExoticComponent<SubTaskProps & import('react').RefAttributes<HTMLLIElement>>;
166
- export { SubTask };
165
+ declare const RawSubTask: import('react').ForwardRefExoticComponent<SubTaskProps & import('react').RefAttributes<HTMLLIElement>>;
166
+ export { RawSubTask };
@@ -1,15 +1,15 @@
1
1
  import { jsxs as a, jsx as e, Fragment as d } from "react/jsx-runtime";
2
- import { forwardRef as L, useEffect as j } from "react";
3
- import { uyTv as O } from "@payfit/unity-themes";
4
- import { Link as z, Button as E } from "react-aria-components";
5
- import { useIntl as F, FormattedMessage as i } from "react-intl";
6
- import { useRouter as P } from "../../../providers/router/RouterProvider.js";
2
+ import { forwardRef as L, useEffect as R } from "react";
3
+ import { uyTv as j } from "@payfit/unity-themes";
4
+ import { Link as O, Button as z } from "react-aria-components";
5
+ import { useIntl as E, FormattedMessage as i } from "react-intl";
6
+ import { useRouter as F } from "../../../providers/router/RouterProvider.js";
7
7
  import { Icon as p } from "../../icon/Icon.js";
8
- import { Text as R } from "../../text/Text.js";
8
+ import { Text as P } from "../../text/Text.js";
9
9
  import { useTaskMenuContext as A } from "../TaskMenu.context.js";
10
10
  import D from "./dot.svg.js";
11
11
  import { commonTask as I } from "./task.variants.js";
12
- const V = O({
12
+ const V = j({
13
13
  extend: I,
14
14
  slots: {
15
15
  base: ["uy:gap-300 uy:py-100", "uy:md:py-50"],
@@ -134,20 +134,20 @@ const V = O({
134
134
  uniqueId: r,
135
135
  ...c
136
136
  }, g) => {
137
- const k = F(), u = P(), { currentTask: b, setCurrentTask: m, state: h } = A();
138
- j(() => {
137
+ const k = E(), u = F(), { currentTask: b, setCurrentTask: m, state: h } = A();
138
+ R(() => {
139
139
  t && u?.isActive(t.toString(), l) && m?.({ uniqueId: r, label: o });
140
140
  }, [t, l, u, r, o]);
141
- const s = b?.uniqueId === r, { base: v, element: S, text: x, dot: N, lock: M } = V({
141
+ const s = b?.uniqueId === r, { base: v, element: S, text: x, dot: N, lock: w } = V({
142
142
  isSelected: s,
143
143
  taskStatus: n
144
- }), T = Object.assign(
144
+ }), M = Object.assign(
145
145
  {},
146
146
  s !== void 0 && {
147
147
  "data-current": s,
148
148
  "aria-current": s ? "page" : void 0
149
149
  }
150
- ), w = t ? z : E;
150
+ ), T = t ? O : z;
151
151
  return /* @__PURE__ */ a(
152
152
  "li",
153
153
  {
@@ -158,7 +158,7 @@ const V = O({
158
158
  children: [
159
159
  /* @__PURE__ */ e(D, { width: 8, height: 8, className: N(), role: "presentation" }),
160
160
  /* @__PURE__ */ a(
161
- w,
161
+ T,
162
162
  {
163
163
  className: S(),
164
164
  href: t,
@@ -166,11 +166,11 @@ const V = O({
166
166
  m?.({ uniqueId: r, label: o }), h?.toggle(), f?.(C);
167
167
  },
168
168
  isDisabled: y,
169
- ...T,
169
+ ...M,
170
170
  ...c,
171
171
  children: [
172
172
  /* @__PURE__ */ e(
173
- R,
173
+ P,
174
174
  {
175
175
  asElement: "span",
176
176
  className: x(),
@@ -179,7 +179,7 @@ const V = O({
179
179
  }
180
180
  ),
181
181
  B(n, k, {
182
- locked: M(),
182
+ locked: w(),
183
183
  completed: "uy:self-center"
184
184
  })
185
185
  ]
@@ -190,8 +190,8 @@ const V = O({
190
190
  );
191
191
  }
192
192
  );
193
- G.displayName = "SubTask";
193
+ G.displayName = "RawSubTask";
194
194
  export {
195
- G as SubTask,
196
- V as subTask
195
+ G as RawSubTask,
196
+ V as rawSubTask
197
197
  };
@@ -1,7 +1,7 @@
1
1
  import { VariantProps } from '@payfit/unity-themes';
2
2
  import { PropsWithChildren } from 'react';
3
3
  import { AriaButtonProps } from 'react-aria';
4
- export declare const task: import('tailwind-variants').TVReturnType<{
4
+ export declare const rawTask: import('tailwind-variants').TVReturnType<{
5
5
  isSelected: {
6
6
  false: string;
7
7
  true: string;
@@ -117,7 +117,7 @@ export declare const task: import('tailwind-variants').TVReturnType<{
117
117
  * Props for the Task component, defining the configuration options for individual task items.
118
118
  * Supports both link-based navigation and button-based interactions with various visual states.
119
119
  */
120
- export interface TaskProps extends PropsWithChildren<Omit<VariantProps<typeof task>, 'isSelected'>> {
120
+ export interface TaskProps extends PropsWithChildren<Omit<VariantProps<typeof rawTask>, 'isSelected'>> {
121
121
  /**
122
122
  * Unique identifier for the task, used for state management and accessibility.
123
123
  * This ID is used to track the current selected task and manage focus states.
@@ -148,7 +148,7 @@ export interface TaskProps extends PropsWithChildren<Omit<VariantProps<typeof ta
148
148
  *
149
149
  * ```tsx
150
150
  * // Link-based task for navigation
151
- * <Task
151
+ * <RawTask
152
152
  * uniqueId="setup-profile"
153
153
  * label="Complete Profile Setup"
154
154
  * taskNumber={1}
@@ -157,7 +157,7 @@ export interface TaskProps extends PropsWithChildren<Omit<VariantProps<typeof ta
157
157
  * />
158
158
  *
159
159
  * // Button-based task for custom interactions
160
- * <Task
160
+ * <RawTask
161
161
  * uniqueId="validate-data"
162
162
  * label="Validate Information"
163
163
  * taskNumber={2}
@@ -166,7 +166,7 @@ export interface TaskProps extends PropsWithChildren<Omit<VariantProps<typeof ta
166
166
  * />
167
167
  *
168
168
  * // Locked task that cannot be interacted with
169
- * <Task
169
+ * <RawTask
170
170
  * uniqueId="final-review"
171
171
  * label="Final Review"
172
172
  * taskNumber={3}
@@ -175,5 +175,5 @@ export interface TaskProps extends PropsWithChildren<Omit<VariantProps<typeof ta
175
175
  * ```
176
176
  * @see {@link TaskProps} for all available props
177
177
  */
178
- declare const Task: import('react').ForwardRefExoticComponent<TaskProps & import('react').RefAttributes<HTMLLIElement>>;
179
- export { Task };
178
+ declare const RawTask: import('react').ForwardRefExoticComponent<TaskProps & import('react').RefAttributes<HTMLLIElement>>;
179
+ export { RawTask };
@@ -1,14 +1,14 @@
1
1
  import { jsxs as r, jsx as e, Fragment as p } from "react/jsx-runtime";
2
- import { forwardRef as G, useEffect as P } from "react";
3
- import { uyTv as R } from "@payfit/unity-themes";
4
- import { Link as w, Button as z } from "react-aria-components";
2
+ import { forwardRef as O, useEffect as F } from "react";
3
+ import { uyTv as G } from "@payfit/unity-themes";
4
+ import { Link as P, Button as z } from "react-aria-components";
5
5
  import { useIntl as A, FormattedMessage as g } from "react-intl";
6
6
  import { useRouter as B } from "../../../providers/router/RouterProvider.js";
7
7
  import { Icon as y } from "../../icon/Icon.js";
8
8
  import { Text as k } from "../../text/Text.js";
9
9
  import { useTaskMenuContext as V } from "../TaskMenu.context.js";
10
10
  import { commonTask as D } from "./task.variants.js";
11
- const H = R({
11
+ const H = G({
12
12
  extend: D,
13
13
  slots: {
14
14
  base: [],
@@ -55,7 +55,7 @@ const H = R({
55
55
  }
56
56
  }
57
57
  ]
58
- }), I = G(
58
+ }), I = O(
59
59
  ({
60
60
  href: s,
61
61
  isExact: l = !1,
@@ -73,8 +73,8 @@ const H = R({
73
73
  state: N,
74
74
  expandedTaskGroup: i,
75
75
  toggleTaskGroup: T
76
- } = V(), S = s ? w : z;
77
- P(() => {
76
+ } = V(), S = s ? P : z;
77
+ F(() => {
78
78
  s && c?.isActive(s.toString(), l) && d?.({ uniqueId: n, label: a });
79
79
  }, [s, l, c, a, n]);
80
80
  const t = x?.uniqueId === n, M = Object.assign(
@@ -83,7 +83,7 @@ const H = R({
83
83
  "data-current": t,
84
84
  "aria-current": t ? "page" : void 0
85
85
  }
86
- ), { base: C, number: L, element: j, text: E, lock: O } = H({
86
+ ), { base: C, number: w, element: L, text: R, lock: j } = H({
87
87
  isSelected: t,
88
88
  taskStatus: o
89
89
  });
@@ -91,15 +91,15 @@ const H = R({
91
91
  /* @__PURE__ */ r(
92
92
  S,
93
93
  {
94
- className: j(),
94
+ className: L(),
95
95
  href: s,
96
- onPress: (F) => {
97
- d?.({ uniqueId: n, label: a }), N?.toggle(), i && T?.(i), f?.(F);
96
+ onPress: (E) => {
97
+ d?.({ uniqueId: n, label: a }), N?.toggle(), i && T?.(i), f?.(E);
98
98
  },
99
99
  ...M,
100
100
  ...u,
101
101
  children: [
102
- /* @__PURE__ */ e("div", { className: L(), children: o === "completed" ? /* @__PURE__ */ r(p, { children: [
102
+ /* @__PURE__ */ e("div", { className: w(), children: o === "completed" ? /* @__PURE__ */ r(p, { children: [
103
103
  /* @__PURE__ */ e(
104
104
  y,
105
105
  {
@@ -132,7 +132,7 @@ const H = R({
132
132
  k,
133
133
  {
134
134
  asElement: "span",
135
- className: E(),
135
+ className: R(),
136
136
  variant: t ? "bodyStrong" : "body",
137
137
  children: a
138
138
  }
@@ -142,7 +142,7 @@ const H = R({
142
142
  y,
143
143
  {
144
144
  "aria-hidden": "true",
145
- className: O(),
145
+ className: j(),
146
146
  src: "LockOutlined",
147
147
  alt: m.formatMessage({
148
148
  id: "unity:component:task-menu:task:lock:label",
@@ -165,8 +165,8 @@ const H = R({
165
165
  ] });
166
166
  }
167
167
  );
168
- I.displayName = "Task";
168
+ I.displayName = "RawTask";
169
169
  export {
170
- I as Task,
171
- H as task
170
+ I as RawTask,
171
+ H as rawTask
172
172
  };
@@ -1,7 +1,7 @@
1
1
  import { ReactElement } from 'react';
2
2
  import { DataAttributes } from '../../../types/DataAttributes.js';
3
- import { SubTaskProps } from './SubTask.js';
4
- import { TaskProps } from './Task.js';
3
+ import { SubTaskProps } from './RawSubTask.js';
4
+ import { TaskProps } from './RawTask.js';
5
5
  export interface TaskGroupProps extends Omit<TaskProps, 'href' | 'isExact' | 'isCurrent' | 'onPress' | 'isSelected'>, DataAttributes {
6
6
  /**
7
7
  * The subtasks that belong to this task group. Can be a single SubTask or an array of SubTask components.
@@ -19,9 +19,9 @@ export interface TaskGroupProps extends Omit<TaskProps, 'href' | 'isExact' | 'is
19
19
  * taskNumber={1}
20
20
  * taskStatus="uncompleted"
21
21
  * >
22
- * <SubTask uniqueId="profile" label="Complete Profile" href="/profile" />
23
- * <SubTask uniqueId="documents" label="Upload Documents" href="/documents" />
24
- * <SubTask uniqueId="training" label="Complete Training" href="/training" />
22
+ * <RawSubTask uniqueId="profile" label="Complete Profile" href="/profile" />
23
+ * <RawSubTask uniqueId="documents" label="Upload Documents" href="/documents" />
24
+ * <RawSubTask uniqueId="training" label="Complete Training" href="/training" />
25
25
  * </TaskGroup>
26
26
  * ```
27
27
  * @see {@link TaskGroupProps} for all available props