@payfit/unity-components 2.26.1 → 2.28.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.
- package/dist/esm/components/breadcrumbs/Breadcrumbs.d.ts +16 -4
- package/dist/esm/components/breadcrumbs/Breadcrumbs.js +149 -28
- package/dist/esm/components/breadcrumbs/Breadcrumbs.variant.js +2 -2
- package/dist/esm/components/breadcrumbs/parts/Breadcrumb.d.ts +0 -1
- package/dist/esm/components/breadcrumbs/parts/Breadcrumb.js +29 -28
- package/dist/esm/components/breadcrumbs/parts/RawBreadcrumbLink.d.ts +5 -3
- package/dist/esm/components/breadcrumbs/parts/RawBreadcrumbLink.js +52 -26
- package/dist/esm/components/link/RawLink.d.ts +3 -1
- package/dist/esm/components/link/RawLink.js +49 -48
- package/dist/esm/components/menu/parts/MenuContent.js +8 -8
- package/dist/esm/index.js +122 -122
- package/package.json +9 -7
|
@@ -4,6 +4,8 @@ import { BreadcrumbsProps as AriaBreadcrumbsProps } from 'react-aria-components/
|
|
|
4
4
|
import { AriaBreadcrumbsProps as AriaAriaBreadcrumbsProps } from 'react-aria/useBreadcrumbs';
|
|
5
5
|
import { Breadcrumb } from './parts/Breadcrumb.js';
|
|
6
6
|
import { breadcrumbsVariant } from './Breadcrumbs.variant.js';
|
|
7
|
+
type BreadcrumbWrap = VariantProps<typeof breadcrumbsVariant>['wrap'];
|
|
8
|
+
export type BreadcrumbType = 'collapsed' | 'non-collapsed';
|
|
7
9
|
export interface BreadcrumbsProps extends AriaAriaBreadcrumbsProps, Pick<AriaBreadcrumbsProps<never>, 'onAction'> {
|
|
8
10
|
items?: never;
|
|
9
11
|
/**
|
|
@@ -11,9 +13,14 @@ export interface BreadcrumbsProps extends AriaAriaBreadcrumbsProps, Pick<AriaBre
|
|
|
11
13
|
*/
|
|
12
14
|
children: ReactNode;
|
|
13
15
|
/**
|
|
14
|
-
*
|
|
16
|
+
* Controls breadcrumbs layout: wrap or nowrap
|
|
15
17
|
*/
|
|
16
|
-
wrap:
|
|
18
|
+
wrap: BreadcrumbWrap;
|
|
19
|
+
/**
|
|
20
|
+
* Defines breadcrumb rendering strategy.
|
|
21
|
+
* @default 'non-collapsed'
|
|
22
|
+
*/
|
|
23
|
+
type?: BreadcrumbType;
|
|
17
24
|
}
|
|
18
25
|
export interface BreadcrumbsWithItemProps<TItem extends {
|
|
19
26
|
label: string;
|
|
@@ -27,9 +34,14 @@ export interface BreadcrumbsWithItemProps<TItem extends {
|
|
|
27
34
|
*/
|
|
28
35
|
children: (item: TItem) => ReactElement<ComponentPropsWithoutRef<typeof Breadcrumb>>;
|
|
29
36
|
/**
|
|
30
|
-
*
|
|
37
|
+
* Controls breadcrumbs layout: wrap or nowrap
|
|
38
|
+
*/
|
|
39
|
+
wrap: BreadcrumbWrap;
|
|
40
|
+
/**
|
|
41
|
+
* Defines breadcrumb rendering strategy.
|
|
42
|
+
* @default 'non-collapsed'
|
|
31
43
|
*/
|
|
32
|
-
|
|
44
|
+
type?: BreadcrumbType;
|
|
33
45
|
}
|
|
34
46
|
declare const Breadcrumbs: (<TItem extends {
|
|
35
47
|
label: string;
|
|
@@ -1,41 +1,162 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { Breadcrumbs as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { jsxs as b, Fragment as x, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as O, cloneElement as g, Children as S, isValidElement as f } from "react";
|
|
3
|
+
import { Breadcrumbs as N, Breadcrumb as R } from "react-aria-components/Breadcrumbs";
|
|
4
|
+
import { Button as $ } from "react-aria-components/Button";
|
|
5
|
+
import { useIntl as j } from "react-intl";
|
|
6
|
+
import { useBreakpointListener as D } from "../../hooks/use-breakpoint-listener.js";
|
|
7
|
+
import { Icon as h } from "../icon/Icon.js";
|
|
8
|
+
import { Menu as T } from "../menu/Menu.js";
|
|
9
|
+
import { MenuContent as H } from "../menu/parts/MenuContent.js";
|
|
10
|
+
import { MenuTrigger as K } from "../menu/parts/MenuTrigger.js";
|
|
11
|
+
import { RawMenuItem as L } from "../menu/parts/RawMenuItem.js";
|
|
12
|
+
import { BreadcrumbsProvider as U } from "./Breadcrumbs.context.js";
|
|
13
|
+
import { breadcrumbsVariant as V } from "./Breadcrumbs.variant.js";
|
|
14
|
+
const W = /* @__PURE__ */ new Set([
|
|
15
|
+
"href",
|
|
16
|
+
"target",
|
|
17
|
+
"rel",
|
|
18
|
+
"download",
|
|
19
|
+
"isDisabled",
|
|
20
|
+
"onClick",
|
|
21
|
+
"onPress",
|
|
22
|
+
"onPressStart",
|
|
23
|
+
"onPressEnd",
|
|
24
|
+
"onPressChange",
|
|
25
|
+
"onPressUp",
|
|
26
|
+
"onFocus",
|
|
27
|
+
"onBlur",
|
|
28
|
+
"onKeyDown",
|
|
29
|
+
"onKeyUp",
|
|
30
|
+
"onHoverStart",
|
|
31
|
+
"onHoverChange",
|
|
32
|
+
"onHoverEnd",
|
|
33
|
+
"id"
|
|
34
|
+
]), _ = (r) => {
|
|
35
|
+
const t = {};
|
|
36
|
+
if (!f(r))
|
|
37
|
+
return { menuItemProps: t, originalOnAction: void 0 };
|
|
38
|
+
const n = r.props;
|
|
39
|
+
for (const [e, s] of Object.entries(n))
|
|
40
|
+
e !== "children" && e !== "onAction" && (W.has(e) || e.startsWith("aria-") || e.startsWith("data-")) && (t[e] = s);
|
|
41
|
+
const o = typeof n.onAction == "function" ? n.onAction : void 0;
|
|
42
|
+
return { menuItemProps: t, originalOnAction: o };
|
|
43
|
+
}, F = (r, t) => "id" in r && r.id && typeof r.id == "string" ? r.id : `${r.label}-${t}`, z = (r, t) => r ? r.map((n, o) => {
|
|
44
|
+
if (typeof t != "function")
|
|
45
|
+
return null;
|
|
46
|
+
const e = t(n), s = F(n, o);
|
|
47
|
+
return f(e) ? g(e, { key: s }) : null;
|
|
48
|
+
}).filter((n) => n !== null) : typeof t == "function" ? [] : S.toArray(t).filter(
|
|
49
|
+
f
|
|
50
|
+
), q = (r, t) => r.slice(1, -1).map((o, e) => {
|
|
51
|
+
const s = o.props.children, { menuItemProps: l, originalOnAction: u } = _(s), c = o.props.id ?? o.key, d = typeof c == "string" || typeof c == "number" ? c : `collapsed-breadcrumb-${e}`, m = f(s) && typeof s.props.children == "string" ? s.props.children : t(e + 2);
|
|
52
|
+
return { key: d, label: m, menuItemProps: l, originalOnAction: u };
|
|
10
53
|
});
|
|
11
|
-
function
|
|
12
|
-
|
|
13
|
-
|
|
54
|
+
function G({
|
|
55
|
+
menuItems: r,
|
|
56
|
+
onAction: t,
|
|
57
|
+
breadcrumbClassName: n,
|
|
58
|
+
triggerAriaLabel: o
|
|
59
|
+
}) {
|
|
60
|
+
return /* @__PURE__ */ b(R, { className: n, children: [
|
|
61
|
+
/* @__PURE__ */ b(T, { children: [
|
|
62
|
+
/* @__PURE__ */ a(K, { asChild: !0, children: /* @__PURE__ */ a(
|
|
63
|
+
$,
|
|
64
|
+
{
|
|
65
|
+
"aria-label": o,
|
|
66
|
+
className: "uy:flex uy:h-300 uy:w-300 uy:cursor-pointer uy:items-center uy:justify-center uy:rounded-75 uy:text-content-neutral-enabled uy:hover:bg-surface-neutral-hover uy:hover:text-content-neutral-hover uy:active:bg-surface-neutral-active uy:active:text-content-neutral-active uy:data-[pressed=true]:bg-surface-neutral-pressed uy:data-[pressed=true]:text-content-neutral-pressed uy:focus-visible:outline-none uy:focus-visible:ring-2 uy:focus-visible:ring-offset-2 uy:focus-visible:ring-utility-focus-ring",
|
|
67
|
+
children: /* @__PURE__ */ a(
|
|
68
|
+
h,
|
|
69
|
+
{
|
|
70
|
+
src: "DotsThreeOutlined",
|
|
71
|
+
"aria-hidden": "true",
|
|
72
|
+
color: "inherit",
|
|
73
|
+
size: 20
|
|
74
|
+
}
|
|
75
|
+
)
|
|
76
|
+
}
|
|
77
|
+
) }),
|
|
78
|
+
/* @__PURE__ */ a(H, { width: 248, placement: "bottom start", children: r.map((e) => /* @__PURE__ */ a(
|
|
79
|
+
L,
|
|
80
|
+
{
|
|
81
|
+
...e.menuItemProps,
|
|
82
|
+
onAction: () => {
|
|
83
|
+
e.originalOnAction?.(), t?.(e.key);
|
|
84
|
+
},
|
|
85
|
+
children: e.label
|
|
86
|
+
},
|
|
87
|
+
e.key
|
|
88
|
+
)) })
|
|
89
|
+
] }),
|
|
90
|
+
/* @__PURE__ */ a(
|
|
91
|
+
h,
|
|
92
|
+
{
|
|
93
|
+
src: "CaretRightOutlined",
|
|
94
|
+
"aria-hidden": "true",
|
|
95
|
+
color: "content.neutral.lowest"
|
|
96
|
+
}
|
|
97
|
+
)
|
|
98
|
+
] });
|
|
99
|
+
}
|
|
100
|
+
function J({
|
|
101
|
+
items: r,
|
|
102
|
+
children: t,
|
|
14
103
|
wrap: n = "nowrap",
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
104
|
+
type: o = "non-collapsed",
|
|
105
|
+
...e
|
|
106
|
+
}, s) {
|
|
107
|
+
const l = D(), u = j(), c = l === "xs" || l === "sm", d = o === "collapsed", m = d ? "nowrap" : n, { base: v, breadcrumb: B } = V({ wrap: m }), C = r === void 0, i = z(r, t), y = d && i.length > 2, I = Math.max(i.length - 2, 0), M = u.formatMessage(
|
|
108
|
+
{
|
|
109
|
+
id: "unity:component:breadcrumbs:collapsed:trigger:label",
|
|
110
|
+
defaultMessage: "Show {count} more breadcrumbs"
|
|
111
|
+
},
|
|
112
|
+
{ count: I }
|
|
113
|
+
), w = y ? q(
|
|
114
|
+
i,
|
|
115
|
+
(p) => u.formatMessage(
|
|
116
|
+
{
|
|
117
|
+
id: "unity:component:breadcrumbs:collapsed:item:fallback",
|
|
118
|
+
defaultMessage: "Level {level}"
|
|
119
|
+
},
|
|
120
|
+
{ level: p }
|
|
121
|
+
)
|
|
122
|
+
) : [], P = i.at(0), k = i.at(-1), A = y ? /* @__PURE__ */ b(x, { children: [
|
|
123
|
+
P,
|
|
124
|
+
/* @__PURE__ */ a(
|
|
125
|
+
G,
|
|
126
|
+
{
|
|
127
|
+
menuItems: w,
|
|
128
|
+
onAction: e.onAction,
|
|
129
|
+
breadcrumbClassName: B(),
|
|
130
|
+
triggerAriaLabel: M
|
|
131
|
+
}
|
|
132
|
+
),
|
|
133
|
+
k
|
|
134
|
+
] }) : i.map(
|
|
135
|
+
(p, E) => g(p, {
|
|
136
|
+
key: `visible-${String(p.key ?? E)}`
|
|
137
|
+
})
|
|
138
|
+
);
|
|
139
|
+
return /* @__PURE__ */ a(
|
|
140
|
+
U,
|
|
20
141
|
{
|
|
21
|
-
wrap:
|
|
142
|
+
wrap: m,
|
|
22
143
|
isMobile: c,
|
|
23
|
-
isStaticApi:
|
|
24
|
-
children: /* @__PURE__ */
|
|
25
|
-
|
|
144
|
+
isStaticApi: C,
|
|
145
|
+
children: /* @__PURE__ */ a(
|
|
146
|
+
N,
|
|
26
147
|
{
|
|
27
148
|
"data-dd-privacy": "allow",
|
|
28
|
-
ref:
|
|
29
|
-
className:
|
|
30
|
-
...
|
|
31
|
-
children:
|
|
149
|
+
ref: s,
|
|
150
|
+
className: v(),
|
|
151
|
+
...e,
|
|
152
|
+
children: A
|
|
32
153
|
}
|
|
33
154
|
)
|
|
34
155
|
}
|
|
35
156
|
);
|
|
36
157
|
}
|
|
37
|
-
const
|
|
38
|
-
|
|
158
|
+
const Q = O(J);
|
|
159
|
+
Q.displayName = "Breadcrumbs";
|
|
39
160
|
export {
|
|
40
|
-
|
|
161
|
+
Q as Breadcrumbs
|
|
41
162
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { uyTv as a } from "@payfit/unity-themes";
|
|
2
2
|
const r = a({
|
|
3
3
|
slots: {
|
|
4
|
-
base: "uy:flex uy:gap-50 uy:list-none uy:text-content-neutral-enabled uy:typography-action",
|
|
5
|
-
breadcrumb: "uy:flex uy:gap-50 uy:
|
|
4
|
+
base: "uy:flex uy:gap-50 uy:list-none uy:text-content-neutral-enabled uy:typography-action-large uy:sm:typography-action",
|
|
5
|
+
breadcrumb: "uy:flex uy:gap-50 uy:items-center uy:leading-[1.5] uy:sm:leading-[1.75]"
|
|
6
6
|
},
|
|
7
7
|
variants: {
|
|
8
8
|
wrap: {
|
|
@@ -27,7 +27,6 @@ export interface BreadcrumbProps extends Omit<AriaBreadcrumbProps, 'children' |
|
|
|
27
27
|
* - Only accepts a single BreadcrumbLink component as a child
|
|
28
28
|
* - Automatically handles current page styling (disabled state)
|
|
29
29
|
* - Displays caret icons as separators between breadcrumb items
|
|
30
|
-
* - On mobile, displays a back arrow for the previous breadcrumb
|
|
31
30
|
* @see {@link BreadcrumbProps} for all available props
|
|
32
31
|
*/
|
|
33
32
|
declare const Breadcrumb: import('react').ForwardRefExoticComponent<BreadcrumbProps & import('react').RefAttributes<HTMLLIElement>>;
|
|
@@ -1,30 +1,31 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { Breadcrumb as
|
|
4
|
-
import { Icon as
|
|
5
|
-
import { useBreadcrumbsContext as
|
|
6
|
-
import { breadcrumbsVariant as
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
r
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
1
|
+
import { jsx as t, jsxs as s, Fragment as u } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as i } from "react";
|
|
3
|
+
import { Breadcrumb as d } from "react-aria-components/Breadcrumbs";
|
|
4
|
+
import { Icon as l } from "../../icon/Icon.js";
|
|
5
|
+
import { useBreadcrumbsContext as p } from "../Breadcrumbs.context.js";
|
|
6
|
+
import { breadcrumbsVariant as b } from "../Breadcrumbs.variant.js";
|
|
7
|
+
const f = 280;
|
|
8
|
+
function x({ content: r }) {
|
|
9
|
+
return /* @__PURE__ */ t(
|
|
10
|
+
"span",
|
|
11
|
+
{
|
|
12
|
+
title: typeof r == "string" ? r : void 0,
|
|
13
|
+
className: "uy:text-nowrap uy:text-content-neutral-lowest uy:truncate",
|
|
14
|
+
style: { maxWidth: `${f}px` },
|
|
15
|
+
"aria-current": "page",
|
|
16
|
+
children: r
|
|
17
|
+
}
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
const B = i(
|
|
21
|
+
({ children: r, ...e }, a) => {
|
|
22
|
+
const { wrap: o } = p(), { breadcrumb: n } = b({ wrap: o });
|
|
23
|
+
return /* @__PURE__ */ t(d, { ref: a, ...e, className: n(), children: ({ isCurrent: c }) => {
|
|
24
|
+
const m = r.props.children;
|
|
25
|
+
return c ? /* @__PURE__ */ t(x, { content: m }) : /* @__PURE__ */ s(u, { children: [
|
|
25
26
|
r,
|
|
26
|
-
/* @__PURE__ */
|
|
27
|
-
|
|
27
|
+
/* @__PURE__ */ t(
|
|
28
|
+
l,
|
|
28
29
|
{
|
|
29
30
|
src: "CaretRightOutlined",
|
|
30
31
|
"aria-hidden": "true",
|
|
@@ -35,7 +36,7 @@ const x = b(
|
|
|
35
36
|
} });
|
|
36
37
|
}
|
|
37
38
|
);
|
|
38
|
-
|
|
39
|
+
B.displayName = "Breadcrumb";
|
|
39
40
|
export {
|
|
40
|
-
|
|
41
|
+
B as Breadcrumb
|
|
41
42
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { RawLinkProps } from '../../link/RawLink.js';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const BREADCRUMB_ITEM_MAX_WIDTH = 180;
|
|
3
3
|
export type RawBreadcrumbLinkProps = RawLinkProps;
|
|
4
4
|
/**
|
|
5
5
|
* A styled link component for breadcrumbs that enforces Unity design system styling.
|
|
6
|
-
* This component
|
|
6
|
+
* This component truncates long labels with a fixed max width and displays a tooltip when overflow happens.
|
|
7
7
|
* @param props - Link props from RawLink {@see {@link RawLinkProps}}
|
|
8
8
|
* @example
|
|
9
9
|
* ```tsx
|
|
@@ -19,7 +19,8 @@ export type RawBreadcrumbLinkProps = RawLinkProps;
|
|
|
19
19
|
* ```
|
|
20
20
|
* @remarks
|
|
21
21
|
* - The component enforces breadcrumb-specific styling that cannot be overridden
|
|
22
|
-
* -
|
|
22
|
+
* - Labels are truncated with a max width of 180px
|
|
23
|
+
* - Tooltip is displayed only when rendered text actually overflows
|
|
23
24
|
* - Uses the 'secondary' color variant for breadcrumb links
|
|
24
25
|
* @see {@link RawBreadcrumbLinkProps} for all available props
|
|
25
26
|
*/
|
|
@@ -33,5 +34,6 @@ declare const RawBreadcrumbLink: import('react').ForwardRefExoticComponent<Omit<
|
|
|
33
34
|
isCurrent?: Pick<import('react').HTMLAttributes<HTMLAnchorElement>, "aria-current"> | undefined;
|
|
34
35
|
isExact?: boolean;
|
|
35
36
|
maxCharactersTruncation?: number;
|
|
37
|
+
maxWidthTruncation?: import('react').CSSProperties["maxWidth"];
|
|
36
38
|
} & import('react').RefAttributes<HTMLAnchorElement>>;
|
|
37
39
|
export { RawBreadcrumbLink };
|
|
@@ -1,36 +1,62 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as i } from "react";
|
|
3
|
-
import { RawLink as
|
|
4
|
-
import { Tooltip as
|
|
5
|
-
const
|
|
6
|
-
({ children:
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
e
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
href: a,
|
|
13
|
-
color: "secondary",
|
|
14
|
-
maxCharactersTruncation: t,
|
|
15
|
-
ref: s,
|
|
16
|
-
...n,
|
|
17
|
-
children: o
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as w, useState as R, useRef as E, useCallback as d, useLayoutEffect as L, useEffect as i } from "react";
|
|
3
|
+
import { RawLink as b } from "../../link/RawLink.js";
|
|
4
|
+
import { Tooltip as y } from "../../tooltip/Tooltip.js";
|
|
5
|
+
const T = 180, k = w(
|
|
6
|
+
({ children: r, href: l, ...m }, n) => {
|
|
7
|
+
const o = typeof r == "string" ? r : "", [p, c] = R(!1), s = E(null), t = d(() => {
|
|
8
|
+
const e = s.current;
|
|
9
|
+
if (!e || !o) {
|
|
10
|
+
c(!1);
|
|
11
|
+
return;
|
|
18
12
|
}
|
|
19
|
-
|
|
20
|
-
|
|
13
|
+
c(e.scrollWidth > e.clientWidth);
|
|
14
|
+
}, [o]), v = d(
|
|
15
|
+
(e) => {
|
|
16
|
+
s.current = e, typeof n == "function" ? n(e) : n && (n.current = e);
|
|
17
|
+
},
|
|
18
|
+
[n]
|
|
19
|
+
);
|
|
20
|
+
L(() => {
|
|
21
|
+
t();
|
|
22
|
+
}, [t, r]), i(() => {
|
|
23
|
+
const e = s.current;
|
|
24
|
+
if (!e || typeof ResizeObserver > "u")
|
|
25
|
+
return;
|
|
26
|
+
const f = new ResizeObserver(t);
|
|
27
|
+
return f.observe(e), () => {
|
|
28
|
+
f.disconnect();
|
|
29
|
+
};
|
|
30
|
+
}, [t]), i(() => {
|
|
31
|
+
if (!(typeof window > "u"))
|
|
32
|
+
return window.addEventListener("resize", t), () => {
|
|
33
|
+
window.removeEventListener("resize", t);
|
|
34
|
+
};
|
|
35
|
+
}, [t]), i(() => {
|
|
36
|
+
if (!("fonts" in document))
|
|
37
|
+
return;
|
|
38
|
+
const e = document.fonts;
|
|
39
|
+
return e.addEventListener("loadingdone", t), () => {
|
|
40
|
+
e.removeEventListener("loadingdone", t);
|
|
41
|
+
};
|
|
42
|
+
}, [t]);
|
|
43
|
+
const u = /* @__PURE__ */ a(
|
|
44
|
+
b,
|
|
21
45
|
{
|
|
22
46
|
isExact: !0,
|
|
23
|
-
href:
|
|
47
|
+
href: l,
|
|
24
48
|
color: "secondary",
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
49
|
+
maxWidthTruncation: T,
|
|
50
|
+
ref: v,
|
|
51
|
+
...m,
|
|
52
|
+
children: r
|
|
28
53
|
}
|
|
29
54
|
);
|
|
55
|
+
return p && o ? /* @__PURE__ */ a(y, { title: o, children: u }) : u;
|
|
30
56
|
}
|
|
31
57
|
);
|
|
32
|
-
|
|
58
|
+
k.displayName = "BreadcrumbLink";
|
|
33
59
|
export {
|
|
34
|
-
|
|
35
|
-
|
|
60
|
+
T as BREADCRUMB_ITEM_MAX_WIDTH,
|
|
61
|
+
k as RawBreadcrumbLink
|
|
36
62
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { VariantProps } from '@payfit/unity-themes';
|
|
2
|
-
import { HTMLAttributes } from 'react';
|
|
2
|
+
import { CSSProperties, HTMLAttributes } from 'react';
|
|
3
3
|
import { LinkProps as AriaLinkProps } from 'react-aria-components/Link';
|
|
4
4
|
export declare const link: import('tailwind-variants').TVReturnType<{
|
|
5
5
|
variant: {
|
|
@@ -208,6 +208,7 @@ export type RawLinkProps = Omit<AriaLinkProps, 'style' | 'className'> & {
|
|
|
208
208
|
*/
|
|
209
209
|
isExact?: boolean;
|
|
210
210
|
maxCharactersTruncation?: number;
|
|
211
|
+
maxWidthTruncation?: CSSProperties['maxWidth'];
|
|
211
212
|
};
|
|
212
213
|
/**
|
|
213
214
|
* Links allow users to navigate to different pages or sections.
|
|
@@ -252,6 +253,7 @@ declare const RawLink: import('react').ForwardRefExoticComponent<Omit<AriaLinkPr
|
|
|
252
253
|
*/
|
|
253
254
|
isExact?: boolean;
|
|
254
255
|
maxCharactersTruncation?: number;
|
|
256
|
+
maxWidthTruncation?: CSSProperties["maxWidth"];
|
|
255
257
|
} & {
|
|
256
258
|
children?: import('react').ReactNode | undefined;
|
|
257
259
|
} & import('react').RefAttributes<HTMLAnchorElement>>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsxs as h, jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { IconSprite as
|
|
4
|
-
import { uyTv as
|
|
5
|
-
import { Link as
|
|
6
|
-
import { useRouter as
|
|
7
|
-
import { isExternalUrl as
|
|
8
|
-
const
|
|
1
|
+
import { jsxs as h, jsx as w } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as k } from "react";
|
|
3
|
+
import { IconSprite as D } from "@payfit/unity-icons";
|
|
4
|
+
import { uyTv as z } from "@payfit/unity-themes";
|
|
5
|
+
import { Link as A } from "react-aria-components/Link";
|
|
6
|
+
import { useRouter as E } from "../../providers/router/RouterProvider.js";
|
|
7
|
+
import { isExternalUrl as L } from "./utils.js";
|
|
8
|
+
const N = z({
|
|
9
9
|
slots: {
|
|
10
10
|
base: [
|
|
11
11
|
"uy:rounded-50 uy:underline uy:transition-colors uy:underline-offset-3",
|
|
@@ -83,51 +83,52 @@ const L = D({
|
|
|
83
83
|
isDisabled: !1,
|
|
84
84
|
size: "inherit"
|
|
85
85
|
}
|
|
86
|
-
}),
|
|
86
|
+
}), R = k(
|
|
87
87
|
({
|
|
88
|
-
href:
|
|
89
|
-
children:
|
|
90
|
-
variant:
|
|
91
|
-
color:
|
|
92
|
-
isDisabled:
|
|
93
|
-
isExact:
|
|
94
|
-
isCurrent:
|
|
95
|
-
isExternal:
|
|
96
|
-
maxCharactersTruncation:
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
"
|
|
88
|
+
href: r,
|
|
89
|
+
children: u,
|
|
90
|
+
variant: y = "inline",
|
|
91
|
+
color: c = "primary",
|
|
92
|
+
isDisabled: s = !1,
|
|
93
|
+
isExact: d = !1,
|
|
94
|
+
isCurrent: p,
|
|
95
|
+
isExternal: b,
|
|
96
|
+
maxCharactersTruncation: i,
|
|
97
|
+
maxWidthTruncation: e,
|
|
98
|
+
size: m = "inherit",
|
|
99
|
+
...t
|
|
100
|
+
}, v) => {
|
|
101
|
+
const n = E(), a = b ?? L(r), o = !a && n ? n.isActive(r.toString(), d) : p, { base: f, icon: x } = N({
|
|
102
|
+
variant: y,
|
|
103
|
+
color: c,
|
|
104
|
+
isDisabled: s,
|
|
105
|
+
size: m,
|
|
106
|
+
isTruncated: !!i || !!e
|
|
107
|
+
}), l = i !== void 0 ? `${i}ch` : e !== void 0 ? typeof e == "number" ? `${e}px` : e : void 0, g = n && {
|
|
108
|
+
...o !== void 0 && {
|
|
109
|
+
"data-current": o,
|
|
110
|
+
"aria-current": o ? "page" : void 0
|
|
110
111
|
}
|
|
111
112
|
};
|
|
112
113
|
return /* @__PURE__ */ h(
|
|
113
|
-
|
|
114
|
+
A,
|
|
114
115
|
{
|
|
115
116
|
"data-dd-privacy": "allow",
|
|
116
|
-
...
|
|
117
|
-
href:
|
|
118
|
-
ref:
|
|
119
|
-
style:
|
|
120
|
-
"--uy-link-max-w":
|
|
117
|
+
...t,
|
|
118
|
+
href: r,
|
|
119
|
+
ref: v,
|
|
120
|
+
style: l ? {
|
|
121
|
+
"--uy-link-max-w": l
|
|
121
122
|
} : {},
|
|
122
|
-
className:
|
|
123
|
-
isDisabled:
|
|
124
|
-
target:
|
|
125
|
-
rel:
|
|
126
|
-
...
|
|
123
|
+
className: f(),
|
|
124
|
+
isDisabled: s,
|
|
125
|
+
target: a ? "_blank" : t.target,
|
|
126
|
+
rel: a && !t.rel ? "noopener noreferrer" : t.rel,
|
|
127
|
+
...g,
|
|
127
128
|
children: [
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
129
|
+
u,
|
|
130
|
+
a && /* @__PURE__ */ w(
|
|
131
|
+
D,
|
|
131
132
|
{
|
|
132
133
|
src: "ArrowSquareOutOutlined",
|
|
133
134
|
color: "currentColor",
|
|
@@ -142,8 +143,8 @@ const L = D({
|
|
|
142
143
|
);
|
|
143
144
|
}
|
|
144
145
|
);
|
|
145
|
-
|
|
146
|
+
R.displayName = "Link";
|
|
146
147
|
export {
|
|
147
|
-
|
|
148
|
-
|
|
148
|
+
R as RawLink,
|
|
149
|
+
N as link
|
|
149
150
|
};
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { Popover as a, Menu as y } from "react-aria-components/Menu";
|
|
3
|
-
function
|
|
3
|
+
function d({
|
|
4
4
|
children: r,
|
|
5
5
|
placement: o,
|
|
6
|
-
width:
|
|
6
|
+
width: u,
|
|
7
7
|
triggerRef: t
|
|
8
8
|
}) {
|
|
9
|
-
const n =
|
|
10
|
-
return /* @__PURE__ */
|
|
9
|
+
const n = u ? `uy:w-[${u}px] uy:min-w-[${u}px]` : "";
|
|
10
|
+
return /* @__PURE__ */ e(
|
|
11
11
|
a,
|
|
12
12
|
{
|
|
13
13
|
triggerRef: t,
|
|
14
14
|
placement: o,
|
|
15
15
|
className: "uy:flex uy:flex-col uy:justify-end uy:items-start uy:p-100 uy:rounded-100 uy:border uy:border-solid uy:border-border-neutral uy:bg-surface-neutral uy:shadow-300",
|
|
16
16
|
"data-dd-privacy": "allow",
|
|
17
|
-
children: /* @__PURE__ */
|
|
17
|
+
children: /* @__PURE__ */ e(y, { autoFocus: "first", className: `${u ? "" : "uy:min-w-[320px]"} ${n}`, children: r })
|
|
18
18
|
}
|
|
19
19
|
);
|
|
20
20
|
}
|
|
21
|
-
|
|
21
|
+
d.displayName = "MenuContent";
|
|
22
22
|
export {
|
|
23
|
-
|
|
23
|
+
d as MenuContent
|
|
24
24
|
};
|
package/dist/esm/index.js
CHANGED
|
@@ -10,13 +10,13 @@ import { AlertTitle as T } from "./components/alert/parts/AlertTitle.js";
|
|
|
10
10
|
import { Anchor as P } from "./components/anchor/Anchor.js";
|
|
11
11
|
import { AppLayout as A } from "./components/app-layout/AppLayout.js";
|
|
12
12
|
import { AppMenu as R } from "./components/app-menu/AppMenu.js";
|
|
13
|
-
import { AppMenuContext as
|
|
14
|
-
import { AppMenuFooter as
|
|
15
|
-
import { AppMenuHeader as
|
|
16
|
-
import { AppMenuNavContent as
|
|
17
|
-
import { Autocomplete as
|
|
13
|
+
import { AppMenuContext as w, AppMenuContextProvider as D, useAppMenuContext as h } from "./components/app-menu/parts/AppMenu.context.js";
|
|
14
|
+
import { AppMenuFooter as G } from "./components/app-menu/parts/AppMenuFooter.js";
|
|
15
|
+
import { AppMenuHeader as M } from "./components/app-menu/parts/AppMenuHeader.js";
|
|
16
|
+
import { AppMenuNavContent as E } from "./components/app-menu/parts/AppMenuNavContent.js";
|
|
17
|
+
import { Autocomplete as N } from "./components/autocomplete/Autocomplete.js";
|
|
18
18
|
import { AutocompleteItem as V, autocompleteItem as _ } from "./components/autocomplete/parts/AutocompleteItem.js";
|
|
19
|
-
import { AutocompleteItemGroup as K, autocompleteItemGroup as
|
|
19
|
+
import { AutocompleteItemGroup as K, autocompleteItemGroup as W } from "./components/autocomplete/parts/AutocompleteItemGroup.js";
|
|
20
20
|
import { Avatar as q } from "./components/avatar/Avatar.js";
|
|
21
21
|
import { AvatarFallback as X } from "./components/avatar/parts/AvatarFallback.js";
|
|
22
22
|
import { AvatarIcon as z } from "./components/avatar/parts/AvatarIcon.js";
|
|
@@ -30,16 +30,16 @@ import { BottomSheetFooter as uo, bottomSheetFooter as co } from "./components/b
|
|
|
30
30
|
import { BottomSheetHeader as so, bottomSheetHeader as So } from "./components/bottom-sheet/parts/BottomSheetHeader.js";
|
|
31
31
|
import { Breadcrumbs as Co } from "./components/breadcrumbs/Breadcrumbs.js";
|
|
32
32
|
import { Breadcrumb as Fo } from "./components/breadcrumbs/parts/Breadcrumb.js";
|
|
33
|
-
import {
|
|
33
|
+
import { BREADCRUMB_ITEM_MAX_WIDTH as Bo, RawBreadcrumbLink as Ao } from "./components/breadcrumbs/parts/RawBreadcrumbLink.js";
|
|
34
34
|
import { Button as Ro } from "./components/button/Button.js";
|
|
35
|
-
import { Card as
|
|
36
|
-
import { CardTitle as
|
|
35
|
+
import { Card as wo, card as Do } from "./components/card/Card.js";
|
|
36
|
+
import { CardTitle as yo } from "./components/card/parts/CardTitle.js";
|
|
37
37
|
import { CardContent as Lo } from "./components/card/parts/CardContent.js";
|
|
38
|
-
import { CheckboxGroup as vo, checkboxGroup as
|
|
39
|
-
import { Checkbox as
|
|
38
|
+
import { CheckboxGroup as vo, checkboxGroup as Eo } from "./components/checkbox-group/CheckboxGroup.js";
|
|
39
|
+
import { Checkbox as No } from "./components/checkbox/Checkbox.js";
|
|
40
40
|
import { CheckboxStandalone as Vo } from "./components/checkbox/CheckboxStandalone.js";
|
|
41
41
|
import { Collapsible as Uo } from "./components/collapsible/Collapsible.js";
|
|
42
|
-
import { CollapsibleContent as
|
|
42
|
+
import { CollapsibleContent as Wo } from "./components/collapsible/parts/CollapsibleContent.js";
|
|
43
43
|
import { CollapsibleTitle as qo } from "./components/collapsible/parts/CollapsibleTitle.js";
|
|
44
44
|
import { DataTable as Xo } from "./components/data-table/DataTable.js";
|
|
45
45
|
import { DataTableRoot as zo, dataTableRoot as Yo } from "./components/data-table/parts/DataTableRoot.js";
|
|
@@ -56,16 +56,16 @@ import { DialogContent as be } from "./components/dialog/parts/DialogContent.js"
|
|
|
56
56
|
import { DialogTitle as Te } from "./components/dialog/parts/DialogTitle.js";
|
|
57
57
|
import { PromoDialog as Pe, promoDialog as Be } from "./components/promo-dialog/PromoDialog.js";
|
|
58
58
|
import { PromoDialogHero as ke } from "./components/promo-dialog/parts/PromoDialogHero.js";
|
|
59
|
-
import { PromoDialogSubtitle as
|
|
59
|
+
import { PromoDialogSubtitle as Ie } from "./components/promo-dialog/parts/PromoDialogSubtitle.js";
|
|
60
60
|
import { PromoDialogContent as De } from "./components/promo-dialog/parts/PromoDialogContent.js";
|
|
61
|
-
import { PromoDialogActions as
|
|
61
|
+
import { PromoDialogActions as ye } from "./components/promo-dialog/parts/PromoDialogActions.js";
|
|
62
62
|
import { PromoDialogTitle as Le } from "./components/promo-dialog/parts/PromoDialogTitle.js";
|
|
63
63
|
import { EmptyState as ve } from "./components/empty-state/EmptyState.js";
|
|
64
|
-
import { EmptyStateIcon as
|
|
64
|
+
import { EmptyStateIcon as He } from "./components/empty-state/parts/EmptyStateIcon.js";
|
|
65
65
|
import { EmptyStateContent as Oe } from "./components/empty-state/parts/EmptyStateContent.js";
|
|
66
66
|
import { EmptyStateActions as _e } from "./components/empty-state/parts/EmptyStateActions.js";
|
|
67
67
|
import { EmptyStateGetStarted as Ke } from "./components/empty-state/presets/EmptyStateGetStarted.js";
|
|
68
|
-
import { EmptyStateWaitingForData as
|
|
68
|
+
import { EmptyStateWaitingForData as Qe } from "./components/empty-state/presets/EmptyStateWaitingForData.js";
|
|
69
69
|
import { EmptyStateGoodJob as Je } from "./components/empty-state/presets/EmptyStateGoodJob.js";
|
|
70
70
|
import { EmptyStateUpgradeRequired as je } from "./components/empty-state/presets/EmptyStateUpgradeRequired.js";
|
|
71
71
|
import { EmptyStateNoSearchResults as Ye } from "./components/empty-state/presets/EmptyStateNoSearchResults.js";
|
|
@@ -78,13 +78,13 @@ import { FloatingActionBar as gr, floatingActionBar as sr } from "./components/f
|
|
|
78
78
|
import { FilterToolbar as br, filterToolbar as Cr } from "./components/filter-toolbar/FilterToolbar.js";
|
|
79
79
|
import { Flex as Fr, Stack as Pr } from "./components/flex/Flex.js";
|
|
80
80
|
import { flex as Ar, flexItem as kr } from "./components/flex/Flex.variants.js";
|
|
81
|
-
import { FlexItem as
|
|
82
|
-
import { Form as
|
|
83
|
-
import { FullPageLoader as
|
|
84
|
-
import { FunnelLayout as vr, funnelLayout as
|
|
85
|
-
import { FunnelBody as
|
|
81
|
+
import { FlexItem as Ir, StackItem as wr } from "./components/flex/FlexItem.js";
|
|
82
|
+
import { Form as hr } from "./components/form/Form.js";
|
|
83
|
+
import { FullPageLoader as Gr, fullPageLoader as Lr } from "./components/full-page-loader/FullPageLoader.js";
|
|
84
|
+
import { FunnelLayout as vr, funnelLayout as Er } from "./components/funnel-layout/FunnelLayout.js";
|
|
85
|
+
import { FunnelBody as Nr, funnelBody as Or } from "./components/funnel-layout/parts/FunnelBody.js";
|
|
86
86
|
import { FunnelPage as _r, funnelPage as Ur } from "./components/funnel-layout/parts/FunnelPage.js";
|
|
87
|
-
import { FunnelPageAction as
|
|
87
|
+
import { FunnelPageAction as Wr } from "./components/funnel-layout/parts/FunnelPageAction.js";
|
|
88
88
|
import { FunnelPageActions as qr, funnelPageActions as Jr } from "./components/funnel-layout/parts/FunnelPageActions.js";
|
|
89
89
|
import { FunnelPageContent as jr, funnelPageContent as zr } from "./components/funnel-layout/parts/FunnelPageContent.js";
|
|
90
90
|
import { FunnelBackButton as Zr } from "./components/funnel-layout/parts/FunnelBackButton.js";
|
|
@@ -99,14 +99,14 @@ import { IconButton as Ct } from "./components/icon-button/IconButton.js";
|
|
|
99
99
|
import { CircularIconButton as Ft, circularIconButton as Pt } from "./components/icon-button/CircularIconButton.js";
|
|
100
100
|
import { Icon as At } from "./components/icon/Icon.js";
|
|
101
101
|
import { Input as Rt } from "./components/input/Input.js";
|
|
102
|
-
import { Label as
|
|
103
|
-
import { RawLink as
|
|
102
|
+
import { Label as wt } from "./components/label/Label.js";
|
|
103
|
+
import { RawLink as ht, link as yt } from "./components/link/RawLink.js";
|
|
104
104
|
import { RawLinkButton as Lt } from "./components/link-button/RawLinkButton.js";
|
|
105
105
|
import { ListView as vt } from "./components/list-view/ListView.js";
|
|
106
|
-
import { RawListViewItem as
|
|
106
|
+
import { RawListViewItem as Ht, listViewItem as Nt } from "./components/list-view/parts/RawListViewItem.js";
|
|
107
107
|
import { ListViewSection as Vt, listViewSection as _t } from "./components/list-view/parts/ListViewSection.js";
|
|
108
108
|
import { ListViewItemLabel as Kt } from "./components/list-view/parts/ListViewItemLabel.js";
|
|
109
|
-
import { ListViewItemText as
|
|
109
|
+
import { ListViewItemText as Qt } from "./components/list-view/parts/ListViewItemText.js";
|
|
110
110
|
import { Menu as Jt } from "./components/menu/Menu.js";
|
|
111
111
|
import { MenuContent as jt } from "./components/menu/parts/MenuContent.js";
|
|
112
112
|
import { MenuHeader as Yt } from "./components/menu/parts/MenuHeader.js";
|
|
@@ -123,13 +123,13 @@ import { RawNavigationCard as bp } from "./components/navigation-card/Navigation
|
|
|
123
123
|
import { NavigationCardGroup as Tp, navigationCardGroup as Fp } from "./components/navigation-card/parts/NavigationCardGroup.js";
|
|
124
124
|
import { NavigationCardLabel as Bp } from "./components/navigation-card/parts/NavigationCardLabel.js";
|
|
125
125
|
import { NavigationCardDescription as kp } from "./components/navigation-card/parts/NavigationCardDescription.js";
|
|
126
|
-
import { NumberInput as
|
|
127
|
-
import { Page as
|
|
128
|
-
import { PageHeader as Lp, pageHeader as
|
|
129
|
-
import { PageHeading as
|
|
130
|
-
import { Pagination as
|
|
126
|
+
import { NumberInput as Ip, numberInput as wp } from "./components/number-input/NumberInput.js";
|
|
127
|
+
import { Page as hp, page as yp } from "./components/page/Page.js";
|
|
128
|
+
import { PageHeader as Lp, pageHeader as Mp } from "./components/page/parts/PageHeader.js";
|
|
129
|
+
import { PageHeading as Ep } from "./components/page/parts/PageHeading.js";
|
|
130
|
+
import { Pagination as Np, pagination as Op } from "./components/pagination/Pagination.js";
|
|
131
131
|
import { PaginationContent as _p, paginationContent as Up } from "./components/pagination/parts/PaginationContent.js";
|
|
132
|
-
import { PaginationItem as
|
|
132
|
+
import { PaginationItem as Wp } from "./components/pagination/parts/PaginationItem.js";
|
|
133
133
|
import { RawPaginationLink as qp, paginationLink as Jp } from "./components/pagination/parts/RawPaginationLink.js";
|
|
134
134
|
import { RawPaginationPrevious as jp } from "./components/pagination/parts/RawPaginationPrevious.js";
|
|
135
135
|
import { RawPaginationNext as Yp } from "./components/pagination/parts/RawPaginationNext.js";
|
|
@@ -146,15 +146,15 @@ import { RadioButtonGroup as Sa } from "./components/radio-button-group/RadioBut
|
|
|
146
146
|
import { RadioButton as Ca, radioButton as Ta } from "./components/radio-button-group/parts/RadioButton.js";
|
|
147
147
|
import { RadioButtonHelper as Pa } from "./components/radio-button-group/parts/RadioButtonHelper.js";
|
|
148
148
|
import { Search as Aa, search as ka } from "./components/search/Search.js";
|
|
149
|
-
import { SegmentedButtonGroup as
|
|
149
|
+
import { SegmentedButtonGroup as Ia } from "./components/segmented-button-group/SegmentedButtonGroup.js";
|
|
150
150
|
import { ToggleButton as Da } from "./components/segmented-button-group/parts/ToggleButton.js";
|
|
151
|
-
import { SelectableButtonGroup as
|
|
152
|
-
import { SelectableButton as
|
|
153
|
-
import { SelectableCardCheckboxGroup as
|
|
151
|
+
import { SelectableButtonGroup as ya, selectableButtonGroup as Ga } from "./components/selectable-button-group/SelectableButtonGroup.js";
|
|
152
|
+
import { SelectableButton as Ma, selectableButton as va } from "./components/selectable-button-group/parts/SelectableButton.js";
|
|
153
|
+
import { SelectableCardCheckboxGroup as Ha } from "./components/selectable-card/selectable-card-checkbox-group/SelectableCardCheckboxGroup.js";
|
|
154
154
|
import { SelectableCardCheckbox as Oa } from "./components/selectable-card/selectable-card-checkbox-group/parts/SelectableCardCheckbox.js";
|
|
155
155
|
import { SelectableCardRadioGroup as _a } from "./components/selectable-card/selectable-card-radio-group/SelectableCardRadioGroup.js";
|
|
156
156
|
import { SelectableCardRadio as Ka } from "./components/selectable-card/selectable-card-radio-group/parts/SelectableCardRadio.js";
|
|
157
|
-
import { Select as
|
|
157
|
+
import { Select as Qa } from "./components/select/Select.js";
|
|
158
158
|
import { SelectButton as Ja } from "./components/select/parts/SelectButton.js";
|
|
159
159
|
import { SelectOption as ja } from "./components/select/parts/SelectOption.js";
|
|
160
160
|
import { SelectOptionGroup as Ya } from "./components/select/parts/SelectOptionGroup.js";
|
|
@@ -168,11 +168,11 @@ import { Spinner as sm } from "./components/spinner/Spinner.js";
|
|
|
168
168
|
import { Table as bm, TableRoot as Cm } from "./components/table/Table.js";
|
|
169
169
|
import { TableBody as Fm, tableBody as Pm } from "./components/table/parts/TableBody.js";
|
|
170
170
|
import { TableCell as Am, tableCell as km } from "./components/table/parts/TableCell.js";
|
|
171
|
-
import { TableColumnHeader as
|
|
172
|
-
import { TableEmptyState as
|
|
173
|
-
import { TableHeader as
|
|
171
|
+
import { TableColumnHeader as Im, tableColumnHeader as wm } from "./components/table/parts/TableColumnHeader.js";
|
|
172
|
+
import { TableEmptyState as hm, TableEmptyStateError as ym, TableEmptyStateLoading as Gm, TableEmptyStateNoData as Lm, TableEmptyStateText as Mm, TableNoSearchResults as vm, tableEmptyState as Em } from "./components/table/parts/TableEmptyState.js";
|
|
173
|
+
import { TableHeader as Nm, tableHeader as Om } from "./components/table/parts/TableHeader.js";
|
|
174
174
|
import { TablePagination as _m, tablePagination as Um } from "./components/table/parts/TablePagination.js";
|
|
175
|
-
import { TableRow as
|
|
175
|
+
import { TableRow as Wm, tableRow as Qm } from "./components/table/parts/TableRow.js";
|
|
176
176
|
import { Tabs as Jm } from "./components/tabs/Tabs.js";
|
|
177
177
|
import { RawTab as jm } from "./components/tabs/parts/RawTab.js";
|
|
178
178
|
import { TabList as Ym } from "./components/tabs/parts/TabList.js";
|
|
@@ -188,12 +188,12 @@ import { Timeline as Cx } from "./components/timeline/Timeline.js";
|
|
|
188
188
|
import { TimelineStep as Fx } from "./components/timeline/parts/TimelineStep.js";
|
|
189
189
|
import { TimelineStepHeader as Bx } from "./components/timeline/parts/TimelineStepHeader.js";
|
|
190
190
|
import { TimelineStepDescription as kx } from "./components/timeline/parts/TimelineStepDescription.js";
|
|
191
|
-
import { TOAST_CONFIG as
|
|
192
|
-
import { toast as
|
|
193
|
-
import { ToggleSwitchGroup as
|
|
194
|
-
import { ToggleSwitch as vx, toggleSwitch as
|
|
195
|
-
import { Tooltip as
|
|
196
|
-
import { DESKTOP_BREAKPOINTS as Vx, MOBILE_BREAKPOINTS as _x, isDesktopBreakpoint as Ux, isMobileBreakpoint as Kx, useBreakpointListener as
|
|
191
|
+
import { TOAST_CONFIG as Ix, ToastManager as wx } from "./components/toast/ToastManager.js";
|
|
192
|
+
import { toast as hx } from "./components/toast/toast.js";
|
|
193
|
+
import { ToggleSwitchGroup as Gx, toggleSwitchGroup as Lx } from "./components/toggle-switch-group/ToggleSwitchGroup.js";
|
|
194
|
+
import { ToggleSwitch as vx, toggleSwitch as Ex } from "./components/toggle-switch/ToggleSwitch.js";
|
|
195
|
+
import { Tooltip as Nx } from "./components/tooltip/Tooltip.js";
|
|
196
|
+
import { DESKTOP_BREAKPOINTS as Vx, MOBILE_BREAKPOINTS as _x, isDesktopBreakpoint as Ux, isMobileBreakpoint as Kx, useBreakpointListener as Wx } from "./hooks/use-breakpoint-listener.js";
|
|
197
197
|
import { useContainerQueryLevel as qx } from "./hooks/use-container-query-level.js";
|
|
198
198
|
import { useMediaQuery as Xx } from "./hooks/use-media-query.js";
|
|
199
199
|
import { useUnityForm as zx } from "./hooks/use-form.js";
|
|
@@ -211,14 +211,14 @@ import { NumberField as Cn, numberField as Tn } from "./components/number-field/
|
|
|
211
211
|
import { RadioButtonGroupField as Pn } from "./components/radio-button-group-field/RadioButtonGroupField.js";
|
|
212
212
|
import { SelectableButtonGroupField as An } from "./components/selectable-button-group-field/SelectableButtonGroupField.js";
|
|
213
213
|
import { SelectableCardCheckboxGroupField as Rn } from "./components/selectable-card-checkbox-group-field/SelectableCardCheckboxGroupField.js";
|
|
214
|
-
import { SelectableCardRadioGroupField as
|
|
215
|
-
import { SelectField as
|
|
216
|
-
import { TextField as
|
|
217
|
-
import { ToggleSwitchField as
|
|
218
|
-
import { ToggleSwitchGroupField as
|
|
219
|
-
import { useTanstackUnityForm as
|
|
214
|
+
import { SelectableCardRadioGroupField as wn } from "./components/selectable-card-radio-group-field/SelectableCardRadioGroupField.js";
|
|
215
|
+
import { SelectField as hn } from "./components/select-field/SelectField.js";
|
|
216
|
+
import { TextField as Gn } from "./components/text-field/TextField.js";
|
|
217
|
+
import { ToggleSwitchField as Mn } from "./components/toggle-switch-field/ToggleSwitchField.js";
|
|
218
|
+
import { ToggleSwitchGroupField as En } from "./components/toggle-switch-group-field/ToggleSwitchGroupField.js";
|
|
219
|
+
import { useTanstackUnityForm as Nn, withFieldGroup as On, withForm as Vn } from "./hooks/use-tanstack-form.js";
|
|
220
220
|
import { useFieldContext as Un, useFormContext as Kn } from "./hooks/tanstack-form-context.js";
|
|
221
|
-
import { useFieldA11yContext as
|
|
221
|
+
import { useFieldA11yContext as Qn } from "./components/form-field/TanstackFormField.context.js";
|
|
222
222
|
import { fieldRevalidateLogic as Jn } from "./utils/field-revalidate-logic.js";
|
|
223
223
|
import { NoopRouterProvider as jn, RouterProvider as zn, useRouter as Yn } from "./providers/router/RouterProvider.js";
|
|
224
224
|
import { Carousel as $n, carousel as of } from "./components/carousel/Carousel.js";
|
|
@@ -243,12 +243,12 @@ export {
|
|
|
243
243
|
P as Anchor,
|
|
244
244
|
A as AppLayout,
|
|
245
245
|
R as AppMenu,
|
|
246
|
-
|
|
246
|
+
w as AppMenuContext,
|
|
247
247
|
D as AppMenuContextProvider,
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
248
|
+
G as AppMenuFooter,
|
|
249
|
+
M as AppMenuHeader,
|
|
250
|
+
E as AppMenuNavContent,
|
|
251
|
+
N as Autocomplete,
|
|
252
252
|
V as AutocompleteItem,
|
|
253
253
|
K as AutocompleteItemGroup,
|
|
254
254
|
q as Avatar,
|
|
@@ -256,7 +256,7 @@ export {
|
|
|
256
256
|
z as AvatarIcon,
|
|
257
257
|
Z as AvatarImage,
|
|
258
258
|
oo as AvatarPair,
|
|
259
|
-
Bo as
|
|
259
|
+
Bo as BREADCRUMB_ITEM_MAX_WIDTH,
|
|
260
260
|
po as Badge,
|
|
261
261
|
mo as BottomSheet,
|
|
262
262
|
fo as BottomSheetContent,
|
|
@@ -265,22 +265,22 @@ export {
|
|
|
265
265
|
Fo as Breadcrumb,
|
|
266
266
|
Co as Breadcrumbs,
|
|
267
267
|
Ro as Button,
|
|
268
|
-
|
|
268
|
+
wo as Card,
|
|
269
269
|
Lo as CardContent,
|
|
270
|
-
|
|
270
|
+
yo as CardTitle,
|
|
271
271
|
$n as Carousel,
|
|
272
272
|
nf as CarouselContent,
|
|
273
273
|
rf as CarouselHeader,
|
|
274
274
|
af as CarouselNav,
|
|
275
275
|
uf as CarouselSlide,
|
|
276
|
-
|
|
276
|
+
No as Checkbox,
|
|
277
277
|
Zx as CheckboxField,
|
|
278
278
|
vo as CheckboxGroup,
|
|
279
279
|
on as CheckboxGroupField,
|
|
280
280
|
Vo as CheckboxStandalone,
|
|
281
281
|
Ft as CircularIconButton,
|
|
282
282
|
Uo as Collapsible,
|
|
283
|
-
|
|
283
|
+
Wo as CollapsibleContent,
|
|
284
284
|
qo as CollapsibleTitle,
|
|
285
285
|
Vx as DESKTOP_BREAKPOINTS,
|
|
286
286
|
Xo as DataTable,
|
|
@@ -303,11 +303,11 @@ export {
|
|
|
303
303
|
Oe as EmptyStateContent,
|
|
304
304
|
Ke as EmptyStateGetStarted,
|
|
305
305
|
Je as EmptyStateGoodJob,
|
|
306
|
-
|
|
306
|
+
He as EmptyStateIcon,
|
|
307
307
|
Ye as EmptyStateNoSearchResults,
|
|
308
308
|
je as EmptyStateUpgradeRequired,
|
|
309
309
|
$e as EmptyStateUseDesktop,
|
|
310
|
-
|
|
310
|
+
Qe as EmptyStateWaitingForData,
|
|
311
311
|
er as ErrorState,
|
|
312
312
|
xr as FieldGroup,
|
|
313
313
|
pr as Fieldset,
|
|
@@ -317,20 +317,20 @@ export {
|
|
|
317
317
|
lr as FilterLabels,
|
|
318
318
|
br as FilterToolbar,
|
|
319
319
|
Fr as Flex,
|
|
320
|
-
|
|
320
|
+
Ir as FlexItem,
|
|
321
321
|
gr as FloatingActionBar,
|
|
322
|
-
|
|
322
|
+
hr as Form,
|
|
323
323
|
nn as FormControl,
|
|
324
324
|
ln as FormFeedbackText,
|
|
325
325
|
pn as FormField,
|
|
326
326
|
dn as FormHelperText,
|
|
327
327
|
gn as FormLabel,
|
|
328
|
-
|
|
328
|
+
Gr as FullPageLoader,
|
|
329
329
|
Zr as FunnelBackButton,
|
|
330
|
-
|
|
330
|
+
Nr as FunnelBody,
|
|
331
331
|
vr as FunnelLayout,
|
|
332
332
|
_r as FunnelPage,
|
|
333
|
-
|
|
333
|
+
Wr as FunnelPageAction,
|
|
334
334
|
qr as FunnelPageActions,
|
|
335
335
|
jr as FunnelPageContent,
|
|
336
336
|
ot as FunnelPageFooter,
|
|
@@ -342,10 +342,10 @@ export {
|
|
|
342
342
|
At as Icon,
|
|
343
343
|
Ct as IconButton,
|
|
344
344
|
Rt as Input,
|
|
345
|
-
|
|
345
|
+
wt as Label,
|
|
346
346
|
vt as ListView,
|
|
347
347
|
Kt as ListViewItemLabel,
|
|
348
|
-
|
|
348
|
+
Qt as ListViewItemText,
|
|
349
349
|
Vt as ListViewSection,
|
|
350
350
|
_x as MOBILE_BREAKPOINTS,
|
|
351
351
|
Jt as Menu,
|
|
@@ -364,14 +364,14 @@ export {
|
|
|
364
364
|
Bp as NavigationCardLabel,
|
|
365
365
|
jn as NoopRouterProvider,
|
|
366
366
|
Cn as NumberField,
|
|
367
|
-
|
|
368
|
-
|
|
367
|
+
Ip as NumberInput,
|
|
368
|
+
hp as Page,
|
|
369
369
|
Lp as PageHeader,
|
|
370
|
-
|
|
371
|
-
|
|
370
|
+
Ep as PageHeading,
|
|
371
|
+
Np as Pagination,
|
|
372
372
|
_p as PaginationContent,
|
|
373
373
|
$p as PaginationEllipsis,
|
|
374
|
-
|
|
374
|
+
Wp as PaginationItem,
|
|
375
375
|
aa as PayFitBrand,
|
|
376
376
|
xa as PayFitBrandPreprod,
|
|
377
377
|
fa as PhoneNumberInput,
|
|
@@ -380,10 +380,10 @@ export {
|
|
|
380
380
|
sf as PopoverTrigger,
|
|
381
381
|
ga as ProgressBar,
|
|
382
382
|
Pe as PromoDialog,
|
|
383
|
-
|
|
383
|
+
ye as PromoDialogActions,
|
|
384
384
|
De as PromoDialogContent,
|
|
385
385
|
ke as PromoDialogHero,
|
|
386
|
-
|
|
386
|
+
Ie as PromoDialogSubtitle,
|
|
387
387
|
Le as PromoDialogTitle,
|
|
388
388
|
Ca as RadioButton,
|
|
389
389
|
Sa as RadioButtonGroup,
|
|
@@ -391,9 +391,9 @@ export {
|
|
|
391
391
|
Pa as RadioButtonHelper,
|
|
392
392
|
Ao as RawBreadcrumbLink,
|
|
393
393
|
mn as RawFormContextualLink,
|
|
394
|
-
|
|
394
|
+
ht as RawLink,
|
|
395
395
|
Lt as RawLinkButton,
|
|
396
|
-
|
|
396
|
+
Ht as RawListViewItem,
|
|
397
397
|
$t as RawMenuItem,
|
|
398
398
|
gp as RawNavItem,
|
|
399
399
|
bp as RawNavigationCard,
|
|
@@ -405,22 +405,22 @@ export {
|
|
|
405
405
|
xx as RawTask,
|
|
406
406
|
zn as RouterProvider,
|
|
407
407
|
Aa as Search,
|
|
408
|
-
|
|
409
|
-
|
|
408
|
+
Ia as SegmentedButtonGroup,
|
|
409
|
+
Qa as Select,
|
|
410
410
|
Ja as SelectButton,
|
|
411
|
-
|
|
411
|
+
hn as SelectField,
|
|
412
412
|
ja as SelectOption,
|
|
413
413
|
Ya as SelectOptionGroup,
|
|
414
414
|
$a as SelectOptionHelper,
|
|
415
|
-
|
|
416
|
-
|
|
415
|
+
Ma as SelectableButton,
|
|
416
|
+
ya as SelectableButtonGroup,
|
|
417
417
|
An as SelectableButtonGroupField,
|
|
418
418
|
Oa as SelectableCardCheckbox,
|
|
419
|
-
|
|
419
|
+
Ha as SelectableCardCheckboxGroup,
|
|
420
420
|
Rn as SelectableCardCheckboxGroupField,
|
|
421
421
|
Ka as SelectableCardRadio,
|
|
422
422
|
_a as SelectableCardRadioGroup,
|
|
423
|
-
|
|
423
|
+
wn as SelectableCardRadioGroupField,
|
|
424
424
|
em as SidePanel,
|
|
425
425
|
pm as SidePanelContent,
|
|
426
426
|
xm as SidePanelFooter,
|
|
@@ -429,44 +429,44 @@ export {
|
|
|
429
429
|
cm as SkipLinks,
|
|
430
430
|
sm as Spinner,
|
|
431
431
|
Pr as Stack,
|
|
432
|
-
|
|
433
|
-
|
|
432
|
+
wr as StackItem,
|
|
433
|
+
Ix as TOAST_CONFIG,
|
|
434
434
|
Ym as TabList,
|
|
435
435
|
$m as TabPanel,
|
|
436
436
|
bm as Table,
|
|
437
437
|
Fm as TableBody,
|
|
438
438
|
Am as TableCell,
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
439
|
+
Im as TableColumnHeader,
|
|
440
|
+
hm as TableEmptyState,
|
|
441
|
+
ym as TableEmptyStateError,
|
|
442
|
+
Gm as TableEmptyStateLoading,
|
|
443
443
|
Lm as TableEmptyStateNoData,
|
|
444
|
-
|
|
445
|
-
|
|
444
|
+
Mm as TableEmptyStateText,
|
|
445
|
+
Nm as TableHeader,
|
|
446
446
|
vm as TableNoSearchResults,
|
|
447
447
|
_m as TablePagination,
|
|
448
448
|
Cm as TableRoot,
|
|
449
|
-
|
|
449
|
+
Wm as TableRow,
|
|
450
450
|
Jm as Tabs,
|
|
451
451
|
ix as TaskGroup,
|
|
452
452
|
ex as TaskMenu,
|
|
453
453
|
gx as Text,
|
|
454
454
|
ux as TextArea,
|
|
455
|
-
|
|
455
|
+
Gn as TextField,
|
|
456
456
|
Cx as Timeline,
|
|
457
457
|
Fx as TimelineStep,
|
|
458
458
|
kx as TimelineStepDescription,
|
|
459
459
|
Bx as TimelineStepHeader,
|
|
460
|
-
|
|
460
|
+
wx as ToastManager,
|
|
461
461
|
Da as ToggleButton,
|
|
462
462
|
vx as ToggleSwitch,
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
463
|
+
Mn as ToggleSwitchField,
|
|
464
|
+
Gx as ToggleSwitchGroup,
|
|
465
|
+
En as ToggleSwitchGroupField,
|
|
466
|
+
Nx as Tooltip,
|
|
467
467
|
u as actionBarRoot,
|
|
468
468
|
_ as autocompleteItem,
|
|
469
|
-
|
|
469
|
+
W as autocompleteItemGroup,
|
|
470
470
|
xo as bottomSheet,
|
|
471
471
|
io as bottomSheetContent,
|
|
472
472
|
co as bottomSheetFooter,
|
|
@@ -477,7 +477,7 @@ export {
|
|
|
477
477
|
tf as carouselHeader,
|
|
478
478
|
mf as carouselNav,
|
|
479
479
|
df as carouselSlide,
|
|
480
|
-
|
|
480
|
+
Eo as checkboxGroup,
|
|
481
481
|
Pt as circularIconButton,
|
|
482
482
|
Yo as dataTableRoot,
|
|
483
483
|
ue as dialog,
|
|
@@ -492,7 +492,7 @@ export {
|
|
|
492
492
|
sr as floatingActionBar,
|
|
493
493
|
Lr as fullPageLoader,
|
|
494
494
|
Or as funnelBody,
|
|
495
|
-
|
|
495
|
+
Er as funnelLayout,
|
|
496
496
|
Ur as funnelPage,
|
|
497
497
|
Jr as funnelPageActions,
|
|
498
498
|
zr as funnelPageContent,
|
|
@@ -505,15 +505,15 @@ export {
|
|
|
505
505
|
gt as gridItem,
|
|
506
506
|
Ux as isDesktopBreakpoint,
|
|
507
507
|
Kx as isMobileBreakpoint,
|
|
508
|
-
|
|
509
|
-
|
|
508
|
+
yt as link,
|
|
509
|
+
Nt as listViewItem,
|
|
510
510
|
_t as listViewSection,
|
|
511
511
|
sp as navItemBase,
|
|
512
512
|
Fp as navigationCardGroup,
|
|
513
513
|
Tn as numberField,
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
514
|
+
wp as numberInput,
|
|
515
|
+
yp as page,
|
|
516
|
+
Mp as pageHeader,
|
|
517
517
|
Op as pagination,
|
|
518
518
|
Up as paginationContent,
|
|
519
519
|
Jp as paginationLink,
|
|
@@ -523,36 +523,36 @@ export {
|
|
|
523
523
|
nx as rawTask,
|
|
524
524
|
ka as search,
|
|
525
525
|
va as selectableButton,
|
|
526
|
-
|
|
526
|
+
Ga as selectableButtonGroup,
|
|
527
527
|
rm as sidePanel,
|
|
528
528
|
am as sidePanelContent,
|
|
529
529
|
nm as sidePanelFooter,
|
|
530
530
|
lm as sidePanelHeader,
|
|
531
531
|
Pm as tableBody,
|
|
532
532
|
km as tableCell,
|
|
533
|
-
|
|
534
|
-
|
|
533
|
+
wm as tableColumnHeader,
|
|
534
|
+
Em as tableEmptyState,
|
|
535
535
|
Om as tableHeader,
|
|
536
536
|
Um as tablePagination,
|
|
537
|
-
|
|
537
|
+
Qm as tableRow,
|
|
538
538
|
rx as taskMenu,
|
|
539
539
|
Sx as text,
|
|
540
540
|
dx as textArea,
|
|
541
|
-
|
|
542
|
-
|
|
541
|
+
hx as toast,
|
|
542
|
+
Ex as toggleSwitch,
|
|
543
543
|
Lx as toggleSwitchGroup,
|
|
544
|
-
|
|
544
|
+
h as useAppMenuContext,
|
|
545
545
|
Tf as useAsyncList,
|
|
546
|
-
|
|
546
|
+
Wx as useBreakpointListener,
|
|
547
547
|
qx as useContainerQueryLevel,
|
|
548
|
-
|
|
548
|
+
Qn as useFieldA11yContext,
|
|
549
549
|
Un as useFieldContext,
|
|
550
550
|
Kn as useFormContext,
|
|
551
551
|
Xx as useMediaQuery,
|
|
552
552
|
ta as usePaginationState,
|
|
553
553
|
ea as usePaginationWindow,
|
|
554
554
|
Yn as useRouter,
|
|
555
|
-
|
|
555
|
+
Nn as useTanstackUnityForm,
|
|
556
556
|
zx as useUnityForm,
|
|
557
557
|
On as withFieldGroup,
|
|
558
558
|
Vn as withForm
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@payfit/unity-components",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.28.0",
|
|
4
4
|
"module": "./dist/esm/index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"@hookform/devtools": "4.4.0",
|
|
43
43
|
"@hookform/resolvers": "5.2.1",
|
|
44
44
|
"@internationalized/date": "3.12.1",
|
|
45
|
-
"@payfit/unity-illustrations": "2.
|
|
45
|
+
"@payfit/unity-illustrations": "2.28.0",
|
|
46
46
|
"@radix-ui/react-avatar": "1.1.11",
|
|
47
47
|
"@radix-ui/react-slot": "1.2.4",
|
|
48
48
|
"@react-aria/interactions": "3.28.0",
|
|
@@ -74,8 +74,8 @@
|
|
|
74
74
|
},
|
|
75
75
|
"peerDependencies": {
|
|
76
76
|
"@hookform/devtools": "^4",
|
|
77
|
-
"@payfit/unity-icons": "2.
|
|
78
|
-
"@payfit/unity-themes": "2.
|
|
77
|
+
"@payfit/unity-icons": "2.28.0",
|
|
78
|
+
"@payfit/unity-themes": "2.28.0",
|
|
79
79
|
"@storybook/react-vite": "^10.3.2",
|
|
80
80
|
"@tanstack/react-query": "^5",
|
|
81
81
|
"@tanstack/react-router": "^1.131",
|
|
@@ -89,13 +89,15 @@
|
|
|
89
89
|
"@figma/code-connect": "1.4.1",
|
|
90
90
|
"@hookform/devtools": "4.4.0",
|
|
91
91
|
"@internationalized/date": "3.12.1",
|
|
92
|
-
"@payfit/unity-icons": "2.
|
|
93
|
-
"@payfit/unity-illustrations": "2.
|
|
94
|
-
"@payfit/unity-themes": "2.
|
|
92
|
+
"@payfit/unity-icons": "2.28.0",
|
|
93
|
+
"@payfit/unity-illustrations": "2.28.0",
|
|
94
|
+
"@payfit/unity-themes": "2.28.0",
|
|
95
95
|
"@storybook/addon-a11y": "10.3.5",
|
|
96
96
|
"@storybook/addon-designs": "11.1.3",
|
|
97
97
|
"@storybook/addon-docs": "10.3.5",
|
|
98
98
|
"@storybook/addon-links": "10.3.5",
|
|
99
|
+
"@storybook/addon-mcp": "0.6.0",
|
|
100
|
+
"@storybook/addon-themes": "10.3.5",
|
|
99
101
|
"@storybook/addon-vitest": "10.3.5",
|
|
100
102
|
"@storybook/react-vite": "10.3.5",
|
|
101
103
|
"@tanstack/react-devtools": "0.10.1",
|