@payfit/unity-components 1.1.0 → 1.1.1-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/components/code/Code.d.ts +7 -0
- package/dist/esm/components/code/copyToClipboard.d.ts +1 -0
- package/dist/esm/components/collapsible/Collapsible.d.ts +1 -1
- package/dist/esm/components/collapsible/Collapsible.js +14 -13
- package/dist/esm/components/data-table/parts/ColumnSortHeader.js +13 -13
- package/dist/esm/components/funnel-layout/FunnelLayout.d.ts +1 -1
- package/dist/esm/components/funnel-layout/FunnelLayout.js +61 -110
- package/dist/esm/components/funnel-layout/parts/FunnelPage.js +8 -9
- package/dist/esm/components/funnel-layout/parts/FunnelPageFooter.js +6 -7
- package/dist/esm/components/funnel-layout/parts/FunnelPageHeader.d.ts +2 -2
- package/dist/esm/components/funnel-layout/parts/FunnelSidebar.d.ts +2 -2
- package/dist/esm/components/funnel-layout/parts/FunnelSidebar.js +9 -10
- package/dist/esm/components/funnel-layout/parts/FunnelTopBar.js +0 -1
- package/dist/esm/components/skip-links/SkipLinks.js +50 -43
- package/i18n/en-GB.json +1 -0
- package/i18n/es-ES.json +1 -0
- package/i18n/fr-FR.json +1 -0
- package/package.json +9 -6
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { VariantProps } from '@payfit/unity-themes';
|
|
2
|
+
export declare const code: import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, string[], {} | {}, undefined, import('tailwind-variants').TVReturnType<unknown, undefined, string[], unknown, unknown, undefined>>;
|
|
3
|
+
export interface CodeProps extends VariantProps<typeof code> {
|
|
4
|
+
children: string;
|
|
5
|
+
}
|
|
6
|
+
declare const Code: import('react').ForwardRefExoticComponent<CodeProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
7
|
+
export { Code };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function copyToClipboard(text: string): Promise<boolean>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { DisclosureProps } from 'react-aria-components';
|
|
3
|
-
export interface CollapsibleProps extends Omit<DisclosureProps, 'isDisabled' | '
|
|
3
|
+
export interface CollapsibleProps extends Omit<DisclosureProps, 'isDisabled' | 'className'> {
|
|
4
4
|
/**
|
|
5
5
|
* The content of the collapsible component.
|
|
6
6
|
* Typically includes a CollapsibleTitle and CollapsibleContent.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { uyTv as
|
|
4
|
-
import { Disclosure as
|
|
5
|
-
const
|
|
1
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as e } from "react";
|
|
3
|
+
import { uyTv as l } from "@payfit/unity-themes";
|
|
4
|
+
import { Disclosure as r } from "react-aria-components";
|
|
5
|
+
const n = l({
|
|
6
6
|
base: [
|
|
7
7
|
"uy:w-full uy:rounded-50",
|
|
8
8
|
"uy:data-[focus-visible-within=true]:not-has-data-[focus-visible-within=true]:outline-2",
|
|
@@ -10,20 +10,21 @@ const r = e({
|
|
|
10
10
|
"uy:data-[focus-visible-within=true]:not-has-data-[focus-visible-within=true]:outline-offset-2",
|
|
11
11
|
"uy:data-[focus-visible-within=true]:not-has-data-[focus-visible-within=true]:outline-utility-focus-ring"
|
|
12
12
|
]
|
|
13
|
-
}),
|
|
14
|
-
({ children: i, isExpanded: t,
|
|
15
|
-
|
|
13
|
+
}), f = e(
|
|
14
|
+
({ children: i, isExpanded: t, defaultExpanded: o, ...s }, a) => /* @__PURE__ */ u(
|
|
15
|
+
r,
|
|
16
16
|
{
|
|
17
17
|
"data-dd-privacy": "allow",
|
|
18
|
-
...
|
|
19
|
-
className:
|
|
20
|
-
ref:
|
|
18
|
+
...s,
|
|
19
|
+
className: n(),
|
|
20
|
+
ref: a,
|
|
21
|
+
defaultExpanded: o,
|
|
21
22
|
isExpanded: t,
|
|
22
23
|
children: i
|
|
23
24
|
}
|
|
24
25
|
)
|
|
25
26
|
);
|
|
26
|
-
|
|
27
|
+
f.displayName = "Collapsible";
|
|
27
28
|
export {
|
|
28
|
-
|
|
29
|
+
f as Collapsible
|
|
29
30
|
};
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { jsx as r, jsxs as
|
|
2
|
-
import { Actionable as
|
|
3
|
-
import { Icon as
|
|
1
|
+
import { jsx as r, jsxs as l, Fragment as c } from "react/jsx-runtime";
|
|
2
|
+
import { Actionable as i } from "../../actionable/Actionable.js";
|
|
3
|
+
import { Icon as m } from "../../icon/Icon.js";
|
|
4
4
|
function u({
|
|
5
|
-
children:
|
|
5
|
+
children: n,
|
|
6
6
|
header: o,
|
|
7
|
-
...
|
|
7
|
+
...t
|
|
8
8
|
}) {
|
|
9
9
|
return /* @__PURE__ */ r(
|
|
10
|
-
|
|
10
|
+
i,
|
|
11
11
|
{
|
|
12
|
-
...
|
|
12
|
+
...t,
|
|
13
13
|
className: "uy:flex uy:items-center uy:gap-50",
|
|
14
14
|
onPress: () => {
|
|
15
15
|
o.column.getCanSort() && o.column.toggleSorting();
|
|
16
16
|
},
|
|
17
17
|
children: ({ isHovered: e }) => {
|
|
18
|
-
const
|
|
19
|
-
return /* @__PURE__ */
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
const s = o.column.getCanSort() && (o.column.getIsSorted() || e);
|
|
19
|
+
return /* @__PURE__ */ l(c, { children: [
|
|
20
|
+
n,
|
|
21
|
+
s ? /* @__PURE__ */ r(
|
|
22
|
+
m,
|
|
23
23
|
{
|
|
24
24
|
src: o.column.getIsSorted() === "asc" ? "ArrowUpOutlined" : "ArrowDownOutlined",
|
|
25
25
|
role: "presentation",
|
|
26
26
|
size: 20
|
|
27
27
|
}
|
|
28
|
-
)
|
|
28
|
+
) : /* @__PURE__ */ r("span", { "aria-hidden": "true", className: "uy:size-250 uy:block" })
|
|
29
29
|
] });
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as React, PropsWithChildren } from 'react';
|
|
2
2
|
import { VariantProps } from '@payfit/unity-themes';
|
|
3
|
-
export declare const funnelLayout: import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, "uy:relative uy:h-dvh uy:flex uy:flex-col uy:bg-canvas", {} | {}, undefined, import('tailwind-variants').TVReturnType<unknown, undefined, "uy:relative uy:h-dvh uy:flex uy:flex-col uy:bg-canvas", unknown, unknown, undefined>>;
|
|
3
|
+
export declare const funnelLayout: import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, "uy:relative uy:h-dvh uy:flex uy:flex-col uy:bg-canvas uy:overflow-auto", {} | {}, undefined, import('tailwind-variants').TVReturnType<unknown, undefined, "uy:relative uy:h-dvh uy:flex uy:flex-col uy:bg-canvas uy:overflow-auto", unknown, unknown, undefined>>;
|
|
4
4
|
export interface FunnelLayoutProps extends PropsWithChildren<VariantProps<typeof funnelLayout>> {
|
|
5
5
|
/** The header content for the funnel layout, typically a FunnelTopBar component */
|
|
6
6
|
header: React.JSX.Element;
|
|
@@ -1,128 +1,79 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { uyTv as
|
|
4
|
-
import { useId as
|
|
5
|
-
import { FormattedMessage as
|
|
6
|
-
import {
|
|
1
|
+
import { jsx as e, jsxs as i } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as s, useMemo as f } from "react";
|
|
3
|
+
import { uyTv as y } from "@payfit/unity-themes";
|
|
4
|
+
import { useId as p } from "react-aria";
|
|
5
|
+
import { FormattedMessage as o } from "react-intl";
|
|
6
|
+
import { SkipLinks as c, SkipLink as a } from "../skip-links/SkipLinks.js";
|
|
7
7
|
import { FunnelLayoutProvider as m } from "./FunnelLayout.context.js";
|
|
8
|
-
const
|
|
9
|
-
base: "uy:relative uy:h-dvh uy:flex uy:flex-col uy:bg-canvas"
|
|
10
|
-
}),
|
|
11
|
-
({ children:
|
|
12
|
-
const
|
|
8
|
+
const I = y({
|
|
9
|
+
base: "uy:relative uy:h-dvh uy:flex uy:flex-col uy:bg-canvas uy:overflow-auto"
|
|
10
|
+
}), k = s(
|
|
11
|
+
({ children: u, header: l, ...r }, d) => {
|
|
12
|
+
const n = p(), t = f(
|
|
13
13
|
() => ({
|
|
14
|
-
mainContentId: `funnel-main-content-${
|
|
15
|
-
topbarId: `funnel-top-bar-${
|
|
16
|
-
asideId: `funnel-complementary-left-content-${
|
|
17
|
-
funnelTitleId: `funnel-title-${
|
|
18
|
-
funnelDescriptionId: `funnel-description-${
|
|
19
|
-
funnelStatusId: `funnel-status-${
|
|
20
|
-
footerId: `funnel-footer-${
|
|
14
|
+
mainContentId: `funnel-main-content-${n}`,
|
|
15
|
+
topbarId: `funnel-top-bar-${n}`,
|
|
16
|
+
asideId: `funnel-complementary-left-content-${n}`,
|
|
17
|
+
funnelTitleId: `funnel-title-${n}`,
|
|
18
|
+
funnelDescriptionId: `funnel-description-${n}`,
|
|
19
|
+
funnelStatusId: `funnel-status-${n}`,
|
|
20
|
+
footerId: `funnel-footer-${n}`
|
|
21
21
|
}),
|
|
22
|
-
[
|
|
22
|
+
[n]
|
|
23
23
|
);
|
|
24
|
-
return /* @__PURE__ */
|
|
24
|
+
return /* @__PURE__ */ e(m, { ids: t, children: /* @__PURE__ */ i(
|
|
25
25
|
"div",
|
|
26
26
|
{
|
|
27
27
|
"data-dd-privacy": "mask-user-input",
|
|
28
|
-
...
|
|
29
|
-
ref:
|
|
30
|
-
className:
|
|
28
|
+
...r,
|
|
29
|
+
ref: d,
|
|
30
|
+
className: I(),
|
|
31
31
|
"data-unity-component": "FunnelLayout",
|
|
32
32
|
children: [
|
|
33
|
-
/* @__PURE__ */
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
"a",
|
|
65
|
-
{
|
|
66
|
-
href: `#${t.mainContentId}`,
|
|
67
|
-
tabIndex: 0,
|
|
68
|
-
className: i(),
|
|
69
|
-
children: /* @__PURE__ */ n(
|
|
70
|
-
a,
|
|
71
|
-
{
|
|
72
|
-
id: "unity:layout:funnel:skip-links:main-content",
|
|
73
|
-
defaultMessage: "Main content"
|
|
74
|
-
}
|
|
75
|
-
)
|
|
76
|
-
}
|
|
77
|
-
) }),
|
|
78
|
-
/* @__PURE__ */ n("li", { children: /* @__PURE__ */ n(
|
|
79
|
-
"a",
|
|
80
|
-
{
|
|
81
|
-
href: `#${t.asideId}`,
|
|
82
|
-
tabIndex: 0,
|
|
83
|
-
className: i(),
|
|
84
|
-
children: /* @__PURE__ */ n(
|
|
85
|
-
a,
|
|
86
|
-
{
|
|
87
|
-
id: "unity:layout:funnel:skip-links:sidebar",
|
|
88
|
-
defaultMessage: "Sidebar"
|
|
89
|
-
}
|
|
90
|
-
)
|
|
91
|
-
}
|
|
92
|
-
) }),
|
|
93
|
-
/* @__PURE__ */ n("li", { children: /* @__PURE__ */ n(
|
|
94
|
-
"a",
|
|
95
|
-
{
|
|
96
|
-
href: `#${t.footerId}`,
|
|
97
|
-
tabIndex: 0,
|
|
98
|
-
className: i(),
|
|
99
|
-
children: /* @__PURE__ */ n(
|
|
100
|
-
a,
|
|
101
|
-
{
|
|
102
|
-
id: "unity:layout:funnel:skip-links:footer",
|
|
103
|
-
defaultMessage: "Footer"
|
|
104
|
-
}
|
|
105
|
-
)
|
|
106
|
-
}
|
|
107
|
-
) })
|
|
108
|
-
] })
|
|
109
|
-
]
|
|
110
|
-
}
|
|
111
|
-
),
|
|
112
|
-
/* @__PURE__ */ n(
|
|
33
|
+
/* @__PURE__ */ i(c, { children: [
|
|
34
|
+
/* @__PURE__ */ e(a, { targetId: t.topbarId, children: /* @__PURE__ */ e(
|
|
35
|
+
o,
|
|
36
|
+
{
|
|
37
|
+
id: "unity:layout:funnel:skip-links:top-bar",
|
|
38
|
+
defaultMessage: "Top bar"
|
|
39
|
+
}
|
|
40
|
+
) }),
|
|
41
|
+
/* @__PURE__ */ e(a, { targetId: t.mainContentId, children: /* @__PURE__ */ e(
|
|
42
|
+
o,
|
|
43
|
+
{
|
|
44
|
+
id: "unity:layout:funnel:skip-links:main-content",
|
|
45
|
+
defaultMessage: "Main content"
|
|
46
|
+
}
|
|
47
|
+
) }),
|
|
48
|
+
/* @__PURE__ */ e(a, { targetId: t.asideId, children: /* @__PURE__ */ e(
|
|
49
|
+
o,
|
|
50
|
+
{
|
|
51
|
+
id: "unity:layout:funnel:skip-links:sidebar",
|
|
52
|
+
defaultMessage: "Sidebar"
|
|
53
|
+
}
|
|
54
|
+
) }),
|
|
55
|
+
/* @__PURE__ */ e(a, { targetId: t.footerId, children: /* @__PURE__ */ e(
|
|
56
|
+
o,
|
|
57
|
+
{
|
|
58
|
+
id: "unity:layout:funnel:skip-links:footer",
|
|
59
|
+
defaultMessage: "Footer"
|
|
60
|
+
}
|
|
61
|
+
) })
|
|
62
|
+
] }),
|
|
63
|
+
/* @__PURE__ */ e(
|
|
113
64
|
"div",
|
|
114
65
|
{
|
|
115
66
|
"data-unity-component": "FunnelTopBar",
|
|
116
67
|
className: "uy:sticky uy:top-0 uy:z-10",
|
|
117
|
-
children:
|
|
68
|
+
children: l
|
|
118
69
|
}
|
|
119
70
|
),
|
|
120
|
-
/* @__PURE__ */
|
|
71
|
+
/* @__PURE__ */ e(
|
|
121
72
|
"div",
|
|
122
73
|
{
|
|
123
|
-
className: "uy:flex-1 uy:flex uy:md:block uy:overflow-
|
|
74
|
+
className: "uy:flex-1 uy:flex uy:md:block uy:overflow-visible",
|
|
124
75
|
"data-unity-slot": "funnel-layout-content-wrapper",
|
|
125
|
-
children:
|
|
76
|
+
children: u
|
|
126
77
|
}
|
|
127
78
|
)
|
|
128
79
|
]
|
|
@@ -130,8 +81,8 @@ const h = f({
|
|
|
130
81
|
) });
|
|
131
82
|
}
|
|
132
83
|
);
|
|
133
|
-
|
|
84
|
+
k.displayName = "FunnelLayout";
|
|
134
85
|
export {
|
|
135
|
-
|
|
136
|
-
|
|
86
|
+
k as FunnelLayout,
|
|
87
|
+
I as funnelLayout
|
|
137
88
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { uyTv as
|
|
2
|
+
import { forwardRef as o } from "react";
|
|
3
|
+
import { uyTv as d } from "@payfit/unity-themes";
|
|
4
4
|
import { useFunnelLayoutContext as i } from "../FunnelLayout.context.js";
|
|
5
|
-
const
|
|
5
|
+
const l = d({
|
|
6
6
|
base: [
|
|
7
7
|
"uy:group/funnelpage uy:bg-surface-neutral uy:p-100 uy:pb-500 uy:md:shadow-raising uy:md:border-border-neutral uy:md:border uy:md:border-solid uy:md:rounded-400",
|
|
8
8
|
"uy:basis-full uy:shrink-0 uy:grow-1 uy:md:shrink",
|
|
9
9
|
"uy:flex uy:flex-col",
|
|
10
10
|
"uy:md:max-w-container-lg uy:lg:max-w-container-xl"
|
|
11
11
|
]
|
|
12
|
-
}),
|
|
12
|
+
}), t = o(
|
|
13
13
|
({ children: n, ...r }, u) => {
|
|
14
14
|
const { ids: e } = i();
|
|
15
15
|
return /* @__PURE__ */ a(
|
|
@@ -21,16 +21,15 @@ const t = o({
|
|
|
21
21
|
id: e.mainContentId,
|
|
22
22
|
"aria-labelledby": e.funnelTitleId,
|
|
23
23
|
"aria-describedby": e.funnelDescriptionId,
|
|
24
|
-
|
|
25
|
-
className: t(),
|
|
24
|
+
className: l(),
|
|
26
25
|
"data-unity-component": "FunnelPage",
|
|
27
26
|
children: n
|
|
28
27
|
}
|
|
29
28
|
);
|
|
30
29
|
}
|
|
31
30
|
);
|
|
32
|
-
|
|
31
|
+
t.displayName = "FunnelPage";
|
|
33
32
|
export {
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
t as FunnelPage,
|
|
34
|
+
l as funnelPage
|
|
36
35
|
};
|
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as n } from "react";
|
|
3
|
-
import { uyTv as
|
|
4
|
-
import { useFunnelLayoutContext as
|
|
5
|
-
const
|
|
3
|
+
import { uyTv as m } from "@payfit/unity-themes";
|
|
4
|
+
import { useFunnelLayoutContext as u } from "../FunnelLayout.context.js";
|
|
5
|
+
const d = m({
|
|
6
6
|
base: "uy:px-300 uy:md:px-600"
|
|
7
7
|
}), s = n(
|
|
8
8
|
({ children: o, ...e }, t) => {
|
|
9
|
-
const { ids: r } =
|
|
9
|
+
const { ids: r } = u();
|
|
10
10
|
return /* @__PURE__ */ a(
|
|
11
11
|
"footer",
|
|
12
12
|
{
|
|
13
13
|
ref: t,
|
|
14
14
|
"data-dd-privacy": "allow",
|
|
15
15
|
...e,
|
|
16
|
-
className:
|
|
16
|
+
className: d(),
|
|
17
17
|
"data-unity-component": "FunnelPageFooter",
|
|
18
18
|
id: r.footerId,
|
|
19
|
-
tabIndex: -1,
|
|
20
19
|
children: o
|
|
21
20
|
}
|
|
22
21
|
);
|
|
@@ -25,5 +24,5 @@ const u = d({
|
|
|
25
24
|
s.displayName = "FunnelPageFooter";
|
|
26
25
|
export {
|
|
27
26
|
s as FunnelPageFooter,
|
|
28
|
-
|
|
27
|
+
d as funnelPageFooter
|
|
29
28
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { VariantProps } from '@payfit/unity-themes';
|
|
2
|
-
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { PropsWithChildren, ReactNode } from 'react';
|
|
3
3
|
export declare const funnelPageHeader: import('tailwind-variants').TVReturnType<{
|
|
4
4
|
gradient: {
|
|
5
5
|
default: {
|
|
@@ -36,7 +36,7 @@ export declare const funnelPageHeader: import('tailwind-variants').TVReturnType<
|
|
|
36
36
|
}, undefined, unknown, unknown, undefined>>;
|
|
37
37
|
export interface FunnelPageHeaderProps extends PropsWithChildren<VariantProps<typeof funnelPageHeader>> {
|
|
38
38
|
title: string;
|
|
39
|
-
subtitle:
|
|
39
|
+
subtitle: ReactNode;
|
|
40
40
|
style?: VariantProps<typeof funnelPageHeader>['gradient'];
|
|
41
41
|
imageSlot?: React.ReactNode;
|
|
42
42
|
imageSlotAltText?: string;
|
|
@@ -5,7 +5,7 @@ export declare const funnelSidebar: import('tailwind-variants').TVReturnType<{
|
|
|
5
5
|
true: string;
|
|
6
6
|
false: string;
|
|
7
7
|
};
|
|
8
|
-
}, undefined, "uy:w-full uy:self-start uy:shrink uy:grow-0 uy:md:
|
|
8
|
+
}, undefined, "uy:w-full uy:self-start uy:shrink uy:grow-0 uy:md:basis-1/3 uy:lg:basis-1/4 uy:md:shrink-0", {
|
|
9
9
|
isSticky: {
|
|
10
10
|
true: string;
|
|
11
11
|
false: string;
|
|
@@ -15,7 +15,7 @@ export declare const funnelSidebar: import('tailwind-variants').TVReturnType<{
|
|
|
15
15
|
true: string;
|
|
16
16
|
false: string;
|
|
17
17
|
};
|
|
18
|
-
}, undefined, "uy:w-full uy:self-start uy:shrink uy:grow-0 uy:md:
|
|
18
|
+
}, undefined, "uy:w-full uy:self-start uy:shrink uy:grow-0 uy:md:basis-1/3 uy:lg:basis-1/4 uy:md:shrink-0", unknown, unknown, undefined>>;
|
|
19
19
|
export interface FunnelSidebarProps extends PropsWithChildren<VariantProps<typeof funnelSidebar>> {
|
|
20
20
|
'aria-label'?: string;
|
|
21
21
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as l } from "react";
|
|
3
|
-
import { uyTv as
|
|
4
|
-
import { useIntl as
|
|
3
|
+
import { uyTv as o } from "@payfit/unity-themes";
|
|
4
|
+
import { useIntl as d } from "react-intl";
|
|
5
5
|
import { useFunnelLayoutContext as y } from "../FunnelLayout.context.js";
|
|
6
|
-
const m =
|
|
7
|
-
base: "uy:w-full uy:self-start uy:shrink uy:grow-0 uy:md:
|
|
6
|
+
const m = o({
|
|
7
|
+
base: "uy:w-full uy:self-start uy:shrink uy:grow-0 uy:md:basis-1/3 uy:lg:basis-1/4 uy:md:shrink-0",
|
|
8
8
|
variants: {
|
|
9
9
|
isSticky: {
|
|
10
|
-
true: "uy:sticky uy:top-
|
|
10
|
+
true: "uy:sticky uy:top-8 uy:md:top-10 uy:z-9",
|
|
11
11
|
false: "uy:static"
|
|
12
12
|
}
|
|
13
13
|
},
|
|
@@ -15,20 +15,19 @@ const m = d({
|
|
|
15
15
|
isSticky: !0
|
|
16
16
|
}
|
|
17
17
|
}), f = l(
|
|
18
|
-
({ children: e, isSticky:
|
|
19
|
-
const { ids: a } = y(), u =
|
|
18
|
+
({ children: e, isSticky: s, "aria-label": t, ...i }, r) => {
|
|
19
|
+
const { ids: a } = y(), u = d();
|
|
20
20
|
return /* @__PURE__ */ n(
|
|
21
21
|
"aside",
|
|
22
22
|
{
|
|
23
23
|
ref: r,
|
|
24
|
-
"aria-label":
|
|
24
|
+
"aria-label": t ?? u.formatMessage({
|
|
25
25
|
id: "unity:layout:funnel:sidebar:aria-label",
|
|
26
26
|
defaultMessage: "Process steps"
|
|
27
27
|
}),
|
|
28
28
|
"aria-describedby": a.funnelTitleId,
|
|
29
|
-
className: m({ isSticky:
|
|
29
|
+
className: m({ isSticky: s }),
|
|
30
30
|
id: a.asideId,
|
|
31
|
-
tabIndex: -1,
|
|
32
31
|
"data-unity-component": "FunnelSidebar",
|
|
33
32
|
"data-dd-privacy": "allow",
|
|
34
33
|
...i,
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as l, useId as
|
|
3
|
-
import { uyTv as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
1
|
+
import { jsxs as y, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as l, useId as p } from "react";
|
|
3
|
+
import { uyTv as f } from "@payfit/unity-themes";
|
|
4
|
+
import { Link as m } from "react-aria-components";
|
|
5
|
+
import { FormattedMessage as b } from "react-intl";
|
|
6
|
+
import { link as k } from "../link/Link.variants.js";
|
|
7
|
+
const h = f({
|
|
7
8
|
slots: {
|
|
8
9
|
base: [
|
|
9
10
|
"uy:sr-only",
|
|
10
11
|
"uy:focus-within:p-200",
|
|
11
12
|
"uy:focus-within:bg-surface-neutral",
|
|
13
|
+
"uy:focus-within:border-border-neutral uy:focus-within:border-solid uy:focus-within:border-1",
|
|
12
14
|
"uy:focus-within:shadow-raising",
|
|
13
15
|
"uy:focus-within:rounded-100",
|
|
14
16
|
"uy:focus-within:not-sr-only",
|
|
@@ -20,61 +22,66 @@ const b = p({
|
|
|
20
22
|
label: "uy:typography-h4",
|
|
21
23
|
list: "uy:mt-1 uy:space-y-1 uy:list-none"
|
|
22
24
|
}
|
|
23
|
-
}),
|
|
24
|
-
({ label: s, className:
|
|
25
|
-
const
|
|
26
|
-
if (!
|
|
25
|
+
}), w = l(
|
|
26
|
+
({ label: s, className: n, children: e, ...o }, a) => {
|
|
27
|
+
const r = `skip-links-label-${p()}`;
|
|
28
|
+
if (!e)
|
|
27
29
|
return null;
|
|
28
|
-
const { base:
|
|
29
|
-
return /* @__PURE__ */
|
|
30
|
+
const { base: u, label: c, list: d } = h();
|
|
31
|
+
return /* @__PURE__ */ y(
|
|
30
32
|
"nav",
|
|
31
33
|
{
|
|
32
34
|
"data-dd-privacy": "allow",
|
|
33
|
-
...
|
|
34
|
-
ref:
|
|
35
|
-
className:
|
|
35
|
+
...o,
|
|
36
|
+
ref: a,
|
|
37
|
+
className: u({ className: n }),
|
|
36
38
|
role: "navigation",
|
|
37
|
-
"aria-labelledby":
|
|
39
|
+
"aria-labelledby": r,
|
|
38
40
|
"data-unity-component": "SkipLinks",
|
|
39
41
|
children: [
|
|
40
|
-
/* @__PURE__ */ t("span", { id:
|
|
41
|
-
|
|
42
|
+
/* @__PURE__ */ t("span", { id: r, className: c(), children: s || /* @__PURE__ */ t(
|
|
43
|
+
b,
|
|
42
44
|
{
|
|
43
45
|
id: "unity:component:skip-links:label",
|
|
44
46
|
defaultMessage: "Skip to:"
|
|
45
47
|
}
|
|
46
48
|
) }),
|
|
47
|
-
/* @__PURE__ */ t("ol", { className:
|
|
49
|
+
/* @__PURE__ */ t("ol", { className: d(), children: e })
|
|
48
50
|
]
|
|
49
51
|
}
|
|
50
52
|
);
|
|
51
53
|
}
|
|
52
|
-
),
|
|
53
|
-
({ targetId: s, children:
|
|
54
|
-
|
|
55
|
-
{
|
|
56
|
-
...n,
|
|
57
|
-
ref: a,
|
|
54
|
+
), g = l(
|
|
55
|
+
({ targetId: s, children: n, ...e }, o) => {
|
|
56
|
+
const { base: a } = k({
|
|
58
57
|
size: "small",
|
|
59
58
|
color: "primary",
|
|
60
|
-
variant: "standalone"
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
59
|
+
variant: "standalone"
|
|
60
|
+
});
|
|
61
|
+
return /* @__PURE__ */ t("li", { children: /* @__PURE__ */ t(
|
|
62
|
+
m,
|
|
63
|
+
{
|
|
64
|
+
...e,
|
|
65
|
+
ref: o,
|
|
66
|
+
className: a(),
|
|
67
|
+
onPress: () => {
|
|
68
|
+
const i = document.getElementById(s);
|
|
69
|
+
i && (i.focus(), i.hasAttribute("tabindex") || (i.setAttribute("tabindex", "-1"), i.addEventListener(
|
|
70
|
+
"blur",
|
|
71
|
+
() => {
|
|
72
|
+
i.removeAttribute("tabindex");
|
|
73
|
+
},
|
|
74
|
+
{ once: !0 }
|
|
75
|
+
)));
|
|
76
|
+
},
|
|
77
|
+
children: n
|
|
78
|
+
}
|
|
79
|
+
) });
|
|
80
|
+
}
|
|
74
81
|
);
|
|
75
|
-
|
|
76
|
-
|
|
82
|
+
w.displayName = "SkipLinks";
|
|
83
|
+
g.displayName = "SkipLink";
|
|
77
84
|
export {
|
|
78
|
-
|
|
79
|
-
|
|
85
|
+
g as SkipLink,
|
|
86
|
+
w as SkipLinks
|
|
80
87
|
};
|
package/i18n/en-GB.json
CHANGED
package/i18n/es-ES.json
CHANGED
package/i18n/fr-FR.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@payfit/unity-components",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1-beta.1",
|
|
4
4
|
"module": "./dist/esm/index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -33,6 +33,9 @@
|
|
|
33
33
|
"dist",
|
|
34
34
|
"i18n"
|
|
35
35
|
],
|
|
36
|
+
"storybook": {
|
|
37
|
+
"url": "https://unity-components.payfit.io/"
|
|
38
|
+
},
|
|
36
39
|
"dependencies": {
|
|
37
40
|
"@ariakit/react": "0.4.18",
|
|
38
41
|
"@formatjs/intl": "3.1.3",
|
|
@@ -61,8 +64,8 @@
|
|
|
61
64
|
},
|
|
62
65
|
"peerDependencies": {
|
|
63
66
|
"@hookform/devtools": "4.4.0",
|
|
64
|
-
"@payfit/unity-icons": "1.1.
|
|
65
|
-
"@payfit/unity-themes": "1.1.
|
|
67
|
+
"@payfit/unity-icons": "1.1.1-beta.1",
|
|
68
|
+
"@payfit/unity-themes": "1.1.1-beta.1",
|
|
66
69
|
"@storybook/react-vite": "^9.1.2",
|
|
67
70
|
"@tanstack/react-table": "8.21.3",
|
|
68
71
|
"history": "4.10.1",
|
|
@@ -77,9 +80,9 @@
|
|
|
77
80
|
"@payfit/hr-app-eslint": "0.0.0-use.local",
|
|
78
81
|
"@payfit/hr-apps-tsconfigs": "0.0.0-use.local",
|
|
79
82
|
"@payfit/storybook-addon-console-errors": "0.0.0-use.local",
|
|
80
|
-
"@payfit/unity-icons": "1.1.
|
|
81
|
-
"@payfit/unity-illustrations": "1.1.
|
|
82
|
-
"@payfit/unity-themes": "1.1.
|
|
83
|
+
"@payfit/unity-icons": "1.1.1-beta.1",
|
|
84
|
+
"@payfit/unity-illustrations": "1.1.1-beta.1",
|
|
85
|
+
"@payfit/unity-themes": "1.1.1-beta.1",
|
|
83
86
|
"@payfit/vite-configs": "0.0.0-use.local",
|
|
84
87
|
"@storybook/addon-a11y": "9.1.5",
|
|
85
88
|
"@storybook/addon-docs": "9.1.5",
|