@payfit/unity-components 2.34.0 → 2.35.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/task-menu/parts/RawSubTask.d.ts +46 -84
- package/dist/esm/components/task-menu/parts/RawSubTask.js +83 -115
- package/dist/esm/components/task-menu/parts/RawTask.d.ts +49 -72
- package/dist/esm/components/task-menu/parts/RawTask.js +130 -162
- package/dist/esm/components/task-menu/parts/TaskGroup.js +73 -112
- package/dist/esm/components/task-menu/parts/task.variants.d.ts +12 -51
- package/dist/esm/components/task-menu/parts/task.variants.js +46 -37
- package/dist/esm/components/toast/UnityToast.js +17 -17
- package/dist/esm/components/toast/parts/ToastAction.js +7 -5
- package/package.json +7 -7
|
@@ -1,56 +1,65 @@
|
|
|
1
|
-
import { uyTv as
|
|
2
|
-
const
|
|
1
|
+
import { uyTv as t } from "@payfit/unity-themes";
|
|
2
|
+
const a = t({
|
|
3
3
|
slots: {
|
|
4
|
-
base: [
|
|
4
|
+
base: [
|
|
5
|
+
"uy:group/base",
|
|
6
|
+
"uy:list-none uy:width-full uy:flex",
|
|
7
|
+
"uy:transition-all",
|
|
8
|
+
"uy:group-data-[task-status=uncompleted]/base:text-content-neutral-enabled",
|
|
9
|
+
"uy:group-data-[task-status=completed]/base:text-content-neutral-enabled"
|
|
10
|
+
],
|
|
5
11
|
number: [
|
|
6
|
-
"uy:rounded-200 uy:w-300 uy:h-300 uy:place-content-center uy:text-center uy:self-center"
|
|
12
|
+
"uy:rounded-200 uy:w-300 uy:h-300 uy:place-content-center uy:text-center uy:self-center",
|
|
13
|
+
"uy:group-data-[task-status=uncompleted]/base:bg-surface-neutral-lowest",
|
|
14
|
+
"uy:group-data-[task-status=completed]/base:bg-surface-success",
|
|
15
|
+
"uy:group-data-[task-status=completed]/base:text-content-inverted",
|
|
16
|
+
"uy:group-data-[task-status=locked]/base:bg-surface-neutral-disabled",
|
|
17
|
+
"uy:group-data-[task-status=locked]/base:text-content-neutral-lowest",
|
|
18
|
+
"uy:group-data-[task-status=uncompleted]/base:group-hover/element:bg-surface-neutral-lowest-hover",
|
|
19
|
+
"uy:group-data-[task-status=uncompleted]/base:group-hover/element:text-content-neutral-hover",
|
|
20
|
+
"uy:group-data-[task-status=uncompleted]/base:group-data-[hovered=true]/element:bg-surface-neutral-lowest-hover",
|
|
21
|
+
"uy:group-data-[task-status=uncompleted]/base:group-data-[hovered=true]/element:text-content-neutral-hover",
|
|
22
|
+
"uy:group-data-[task-status=locked]/base:group-hover/element:text-content-neutral-hover",
|
|
23
|
+
"uy:group-data-[task-status=locked]/base:group-data-[hovered=true]/element:text-content-neutral-hover",
|
|
24
|
+
"uy:group-data-[task-status=uncompleted]/base:group-data-[pressed=true]/element:bg-surface-neutral-lowest",
|
|
25
|
+
"uy:group-data-[task-status=locked]/base:group-data-[pressed=true]/element:bg-surface-neutral-lowest",
|
|
26
|
+
"uy:theme-legacy:group-data-[task-status=uncompleted]/base:group-data-[current=true]/base:bg-surface-primary-active",
|
|
27
|
+
"uy:theme-legacy:group-data-[task-status=uncompleted]/base:group-data-[current=true]/base:text-content-inverted-active",
|
|
28
|
+
"uy:theme-rebrand:group-data-[task-status=uncompleted]/base:group-data-[current=true]/base:bg-surface-neutral-highest-active",
|
|
29
|
+
"uy:theme-rebrand:group-data-[task-status=uncompleted]/base:group-data-[current=true]/base:text-content-inverted-active"
|
|
7
30
|
],
|
|
8
31
|
element: [
|
|
9
32
|
"uy:group/element",
|
|
10
33
|
"uy:gap-75 uy:flex uy:flex-1 uy:flex-row uy:items-stretch uy:outline-none uy:rounded-50",
|
|
11
|
-
'uy:data-[focus-visible="true"]:outline-2 uy:data-[focus-visible="true"]:outline-solid uy:data-[focus-visible="true"]:outline-offset-2 uy:data-[focus-visible="true"]:outline-utility-focus-ring'
|
|
34
|
+
'uy:data-[focus-visible="true"]:outline-2 uy:data-[focus-visible="true"]:outline-solid uy:data-[focus-visible="true"]:outline-offset-2 uy:data-[focus-visible="true"]:outline-utility-focus-ring',
|
|
35
|
+
"uy:group-data-[task-status=uncompleted]/base:data-[pressed]:text-content-neutral-pressed"
|
|
12
36
|
],
|
|
13
37
|
text: [
|
|
14
38
|
"uy:px-150 uy:py-25 uy:rounded-75 uy:grow uy:text-left uy:min-h-400 uy:leading-[1] uy:content-center",
|
|
15
39
|
"uy:md:min-h-[28px]",
|
|
16
|
-
"uy:md:py-50"
|
|
40
|
+
"uy:md:py-50",
|
|
41
|
+
"uy:group-data-[task-status=completed]/base:text-content-neutral-active",
|
|
42
|
+
"uy:group-data-[task-status=locked]/base:text-content-neutral-enabled",
|
|
43
|
+
"uy:group-data-[task-status=locked]/base:bg-[transparent]",
|
|
44
|
+
"uy:group-data-[task-status=uncompleted]/base:group-data-[hovered=true]/element:text-content-neutral-hover",
|
|
45
|
+
"uy:group-data-[task-status=locked]/base:group-data-[hovered=true]/element:text-content-neutral-hover",
|
|
46
|
+
"uy:theme-legacy:group-data-[task-status=uncompleted]/base:group-data-[current=true]/base:text-content-primary-active",
|
|
47
|
+
"uy:theme-rebrand:group-data-[task-status=uncompleted]/base:group-data-[current=true]/base:text-content-neutral-active",
|
|
48
|
+
"uy:theme-rebrand:group-data-[task-status=uncompleted]/base:group-data-[current=true]/base:bg-surface-neutral-selected"
|
|
17
49
|
],
|
|
18
|
-
lock:
|
|
50
|
+
lock: [
|
|
51
|
+
"uy:text-content-neutral-lowest uy:bg-surface-neutral-lowest uy:p-25 uy:rounded-75 uy:my-50 uy:self-center",
|
|
52
|
+
"uy:md:my-0"
|
|
53
|
+
]
|
|
19
54
|
},
|
|
20
55
|
variants: {
|
|
21
56
|
taskStatus: {
|
|
22
|
-
uncompleted:
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
number: [
|
|
26
|
-
"uy:bg-surface-neutral-lowest",
|
|
27
|
-
"uy:group-data-[pressed=true]/element:bg-surface-neutral-lowest-pressed",
|
|
28
|
-
"uy:group-hover/element:bg-surface-neutral-lowest-hover uy:group-hover/element:text-content-neutral-hover",
|
|
29
|
-
'uy:group-data-[current="true"]/element:bg-surface-primary-active uy:group-data-[current="true"]/element:text-content-inverted-active'
|
|
30
|
-
],
|
|
31
|
-
text: [
|
|
32
|
-
'uy:group-data-[current="true"]/element:text-content-primary-active'
|
|
33
|
-
]
|
|
34
|
-
},
|
|
35
|
-
completed: {
|
|
36
|
-
base: ["uy:text-content-neutral-enabled"],
|
|
37
|
-
number: ["uy:bg-surface-success uy:text-content-inverted"],
|
|
38
|
-
text: ["uy:text-content-neutral-active"]
|
|
39
|
-
},
|
|
40
|
-
locked: {
|
|
41
|
-
text: ["uy:text-content-neutral-enabled uy:bg-[transparent]"],
|
|
42
|
-
number: [
|
|
43
|
-
"uy:bg-surface-neutral-disabled uy:text-content-neutral-lowest",
|
|
44
|
-
"uy:group-data-[pressed=true]/element:bg-surface-neutral-pressed"
|
|
45
|
-
],
|
|
46
|
-
lock: [
|
|
47
|
-
"uy:text-content-neutral-lowest uy:bg-surface-neutral-lowest uy:p-25 uy:rounded-75 uy:my-50",
|
|
48
|
-
"uy:md:my-0"
|
|
49
|
-
]
|
|
50
|
-
}
|
|
57
|
+
uncompleted: "",
|
|
58
|
+
completed: "",
|
|
59
|
+
locked: ""
|
|
51
60
|
}
|
|
52
61
|
}
|
|
53
62
|
});
|
|
54
63
|
export {
|
|
55
|
-
|
|
64
|
+
a as commonTask
|
|
56
65
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { jsx as o, jsxs as n } from "react/jsx-runtime";
|
|
2
|
-
import { isValidElement as l, Fragment as
|
|
2
|
+
import { isValidElement as l, Fragment as m, Children as d } from "react";
|
|
3
3
|
import { uyTv as p } from "@payfit/unity-themes";
|
|
4
4
|
import { useIntl as f } from "react-intl";
|
|
5
|
-
import { IconButton as
|
|
6
|
-
import { Icon as
|
|
7
|
-
import { ToastTitle as
|
|
8
|
-
import { ToastProvider as
|
|
9
|
-
const
|
|
5
|
+
import { IconButton as g } from "../icon-button/IconButton.js";
|
|
6
|
+
import { Icon as h } from "../icon/Icon.js";
|
|
7
|
+
import { ToastTitle as b } from "./parts/ToastTitle.js";
|
|
8
|
+
import { ToastProvider as x } from "./Toast.context.js";
|
|
9
|
+
const T = p({
|
|
10
10
|
slots: {
|
|
11
|
-
base: "uy:sm:w-[416px] uy:border uy:border-solid uy:rounded-150 uy:text-content-neutral uy:bg-surface-neutral uy:shadow-300 uy:p-100 uy:flex uy:gap-125 uy:border-border-neutral",
|
|
11
|
+
base: "uy:sm:w-[416px] uy:border uy:border-solid uy:theme-legacy:rounded-150 uy:theme-rebrand:rounded-125 uy:text-content-neutral uy:bg-surface-neutral uy:shadow-300 uy:p-100 uy:flex uy:gap-125 uy:border-border-neutral",
|
|
12
12
|
contentWrapper: "uy:flex uy:grow uy:ml-125",
|
|
13
|
-
divider: "uy:border-l-[1px] uy:border-solid uy:border-border-neutral uy:self-stretch"
|
|
13
|
+
divider: "uy:theme-legacy:border-l-[1px] uy:theme-legacy:border-solid uy:theme-legacy:border-border-neutral uy:theme-legacy:self-stretch uy:theme-rebrand:hidden"
|
|
14
14
|
},
|
|
15
15
|
variants: {
|
|
16
16
|
variant: {
|
|
@@ -26,10 +26,10 @@ const v = p({
|
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
|
-
}),
|
|
30
|
-
const s = l(e) && e.type ===
|
|
31
|
-
if (
|
|
32
|
-
(r) => l(r) && r.type ===
|
|
29
|
+
}), v = (e) => {
|
|
30
|
+
const s = l(e) && e.type === m ? e.props.children : e;
|
|
31
|
+
if (d.toArray(s).filter(
|
|
32
|
+
(r) => l(r) && r.type === b
|
|
33
33
|
).length !== 1)
|
|
34
34
|
throw new Error("UnityToast must have one ToastTitle component");
|
|
35
35
|
}, w = ({
|
|
@@ -40,12 +40,12 @@ const v = p({
|
|
|
40
40
|
...i
|
|
41
41
|
}) => {
|
|
42
42
|
const a = f();
|
|
43
|
-
|
|
44
|
-
const { base: u, contentWrapper: c, divider: y } =
|
|
43
|
+
v(e);
|
|
44
|
+
const { base: u, contentWrapper: c, divider: y } = T({
|
|
45
45
|
variant: t,
|
|
46
46
|
isInline: r
|
|
47
47
|
});
|
|
48
|
-
return /* @__PURE__ */ o(
|
|
48
|
+
return /* @__PURE__ */ o(x, { inline: r, children: /* @__PURE__ */ n(
|
|
49
49
|
"div",
|
|
50
50
|
{
|
|
51
51
|
"data-dd-privacy": "mask",
|
|
@@ -58,7 +58,7 @@ const v = p({
|
|
|
58
58
|
children: [
|
|
59
59
|
/* @__PURE__ */ n("div", { className: "uy:flex uy:flex-row uy:grow", children: [
|
|
60
60
|
/* @__PURE__ */ o(
|
|
61
|
-
|
|
61
|
+
h,
|
|
62
62
|
{
|
|
63
63
|
src: t === "success" ? "CheckCircleFilled" : "WarningCircleFilled",
|
|
64
64
|
color: t === "success" ? "content.success" : "content.danger",
|
|
@@ -73,7 +73,7 @@ const v = p({
|
|
|
73
73
|
] }),
|
|
74
74
|
/* @__PURE__ */ o("div", { role: "presentation", className: y() }),
|
|
75
75
|
/* @__PURE__ */ o(
|
|
76
|
-
|
|
76
|
+
g,
|
|
77
77
|
{
|
|
78
78
|
icon: "CloseOutlined",
|
|
79
79
|
iconRole: "presentation",
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import { useUnityTheme as e } from "@payfit/unity-themes";
|
|
3
|
+
import { Button as a } from "../../button/Button.js";
|
|
4
|
+
function i({
|
|
4
5
|
children: t,
|
|
5
6
|
onPress: r
|
|
6
7
|
}) {
|
|
7
|
-
|
|
8
|
+
const { theme: n } = e();
|
|
9
|
+
return /* @__PURE__ */ o("div", { className: "uy:self-end", children: /* @__PURE__ */ o(a, { variant: n === "rebrand" ? "secondary" : "ghost", color: "primary", onPress: r, children: t }) });
|
|
8
10
|
}
|
|
9
|
-
|
|
11
|
+
i.displayName = "ToastAction";
|
|
10
12
|
export {
|
|
11
|
-
|
|
13
|
+
i as ToastAction
|
|
12
14
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@payfit/unity-components",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.35.1",
|
|
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.35.1",
|
|
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.35.1",
|
|
78
|
+
"@payfit/unity-themes": "2.35.1",
|
|
79
79
|
"@storybook/react-vite": "^10.3.2",
|
|
80
80
|
"@tanstack/react-query": "^5",
|
|
81
81
|
"@tanstack/react-router": "^1.131",
|
|
@@ -89,9 +89,9 @@
|
|
|
89
89
|
"@figma/code-connect": "1.4.3",
|
|
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.35.1",
|
|
93
|
+
"@payfit/unity-illustrations": "2.35.1",
|
|
94
|
+
"@payfit/unity-themes": "2.35.1",
|
|
95
95
|
"@storybook/addon-a11y": "10.3.5",
|
|
96
96
|
"@storybook/addon-designs": "11.1.3",
|
|
97
97
|
"@storybook/addon-docs": "10.3.5",
|