@payfit/unity-components 2.60.15 → 2.60.16
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/empty-state/parts/EmptyStateContent.d.ts +6 -0
- package/dist/esm/components/empty-state/parts/EmptyStateContent.js +6 -5
- package/dist/esm/components/menu/parts/MenuContent.d.ts +6 -1
- package/dist/esm/components/menu/parts/MenuContent.js +14 -12
- package/dist/esm/components/menu/parts/RawMenuItem.d.ts +1 -0
- package/dist/esm/components/menu/parts/RawMenuItem.js +8 -7
- package/package.json +12 -12
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
import { TextProps } from '../../text/Text.js';
|
|
2
3
|
export interface EmptyStateContentProps {
|
|
3
4
|
/**
|
|
4
5
|
* The main title text for the empty state.
|
|
5
6
|
*/
|
|
6
7
|
title?: ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* Semantic element used for the title while retaining the EmptyState typography.
|
|
10
|
+
* @default 'h4'
|
|
11
|
+
*/
|
|
12
|
+
titleAsElement?: TextProps['asElement'];
|
|
7
13
|
/**
|
|
8
14
|
* Additional descriptive text providing context about the empty state.
|
|
9
15
|
*/
|
|
@@ -2,18 +2,19 @@ import { Text as e } from "../../text/Text.js";
|
|
|
2
2
|
import { forwardRef as t } from "react";
|
|
3
3
|
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
4
|
//#region src/components/empty-state/parts/EmptyStateContent.tsx
|
|
5
|
-
var i = t(({ title: t,
|
|
6
|
-
ref:
|
|
5
|
+
var i = t(({ title: t, titleAsElement: i, description: a, ...o }, s) => !t && !a ? null : /* @__PURE__ */ r("div", {
|
|
6
|
+
ref: s,
|
|
7
7
|
className: "uy:flex uy:flex-col uy:items-center uy:gap-100 uy:text-center",
|
|
8
|
-
...
|
|
8
|
+
...o,
|
|
9
9
|
children: [t && /* @__PURE__ */ n(e, {
|
|
10
10
|
variant: "h4",
|
|
11
|
+
asElement: i,
|
|
11
12
|
color: "content.neutral",
|
|
12
13
|
children: t
|
|
13
|
-
}),
|
|
14
|
+
}), a && /* @__PURE__ */ n(e, {
|
|
14
15
|
variant: "body",
|
|
15
16
|
color: "content.neutral.low",
|
|
16
|
-
children:
|
|
17
|
+
children: a
|
|
17
18
|
})]
|
|
18
19
|
}));
|
|
19
20
|
i.displayName = "EmptyStateContent";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { MenuProps as ReactAriaMenuProps } from 'react-aria-components/Menu';
|
|
2
3
|
import { PopoverProps } from 'react-aria-components/Popover';
|
|
3
4
|
interface MenuContent {
|
|
4
5
|
/**
|
|
@@ -10,8 +11,12 @@ interface MenuContent {
|
|
|
10
11
|
* @deprecated move it to the root Menu component
|
|
11
12
|
*/
|
|
12
13
|
triggerRef?: PopoverProps['triggerRef'];
|
|
14
|
+
/** Add custom classes to the menu content */
|
|
15
|
+
className?: string;
|
|
16
|
+
selectionMode?: ReactAriaMenuProps<object>['selectionMode'];
|
|
17
|
+
selectedKeys?: ReactAriaMenuProps<object>['selectedKeys'];
|
|
13
18
|
}
|
|
14
|
-
export declare function MenuContent({ children, placement, width, triggerRef, }: PropsWithChildren<MenuContent>): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare function MenuContent({ children, placement, width, triggerRef, className, selectionMode, selectedKeys, }: PropsWithChildren<MenuContent>): import("react/jsx-runtime").JSX.Element;
|
|
15
20
|
export declare namespace MenuContent {
|
|
16
21
|
var displayName: string;
|
|
17
22
|
}
|
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
import "react";
|
|
2
|
-
import {
|
|
3
|
-
import { jsx as
|
|
4
|
-
import { Menu as
|
|
2
|
+
import { uyMerge as e, uyTv as t } from "@payfit/unity-themes";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
import { Menu as r } from "react-aria-components/Menu";
|
|
5
5
|
//#region src/components/menu/parts/MenuContent.tsx
|
|
6
|
-
var
|
|
7
|
-
function
|
|
8
|
-
return /* @__PURE__ */
|
|
9
|
-
className:
|
|
6
|
+
var i = t({ base: ["uy:outline-none", "uy:w-(--uy-menu-content-width) uy:min-w-(--uy-menu-content-min-width)"] });
|
|
7
|
+
function a({ children: t, placement: a, width: o, triggerRef: s, className: c, selectionMode: l, selectedKeys: u }) {
|
|
8
|
+
return /* @__PURE__ */ n(r, {
|
|
9
|
+
className: e(i(), c),
|
|
10
|
+
selectionMode: l,
|
|
11
|
+
selectedKeys: u,
|
|
10
12
|
style: {
|
|
11
|
-
"--uy-menu-content-width":
|
|
12
|
-
"--uy-menu-content-min-width":
|
|
13
|
+
"--uy-menu-content-width": o ? `${o}px` : "auto",
|
|
14
|
+
"--uy-menu-content-min-width": o ? "" : "calc(var(--uy-spacing) * 40)"
|
|
13
15
|
},
|
|
14
|
-
children:
|
|
16
|
+
children: t
|
|
15
17
|
});
|
|
16
18
|
}
|
|
17
|
-
|
|
19
|
+
a.displayName = "MenuContent";
|
|
18
20
|
//#endregion
|
|
19
|
-
export {
|
|
21
|
+
export { a as MenuContent };
|
|
@@ -3,6 +3,7 @@ import { MenuItemProps as MenuItemAriaComponentProps } from 'react-aria-componen
|
|
|
3
3
|
import { DataAttributes } from '../../../types/DataAttributes.js';
|
|
4
4
|
export interface MenuItemProps extends DataAttributes {
|
|
5
5
|
children?: MenuItemAriaComponentProps['children'];
|
|
6
|
+
id?: MenuItemAriaComponentProps['id'];
|
|
6
7
|
href?: MenuItemAriaComponentProps['href'];
|
|
7
8
|
onAction?: MenuItemAriaComponentProps['onAction'];
|
|
8
9
|
isDisabled?: MenuItemAriaComponentProps['isDisabled'];
|
|
@@ -11,14 +11,15 @@ var a = t({ base: [
|
|
|
11
11
|
"uy:active:bg-surface-neutral-active",
|
|
12
12
|
"uy:data-[focused=true]:not-data-[focus-visible=true]:outline-0 uy:data-[focus-visible=true]:outline-2 uy:data-[focus-visible=true]:outline-offset-2 uy:data-[focus-visible=true]:outline-utility-focus-ring",
|
|
13
13
|
"uy:aria-disabled:text-content-neutral-disabled uy:aria-disabled:cursor-not-allowed"
|
|
14
|
-
] }), o = e(function({ prefix: e, children: t,
|
|
14
|
+
] }), o = e(function({ prefix: e, children: t, id: o, href: s, onAction: c, className: l, isDisabled: u, ...d }, f) {
|
|
15
15
|
return /* @__PURE__ */ r(i, {
|
|
16
|
-
ref:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
ref: f,
|
|
17
|
+
id: o,
|
|
18
|
+
href: s,
|
|
19
|
+
isDisabled: u,
|
|
20
|
+
onAction: c,
|
|
21
|
+
className: a({ className: l }),
|
|
22
|
+
...d,
|
|
22
23
|
children: [/* @__PURE__ */ n("div", {
|
|
23
24
|
className: "uy:text-content-neutral-low uy:group-aria-disabled:text-content-neutral-disabled",
|
|
24
25
|
children: e || null
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@payfit/unity-components",
|
|
3
|
-
"version": "2.60.
|
|
3
|
+
"version": "2.60.16",
|
|
4
4
|
"module": "./dist/esm/index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -71,8 +71,8 @@
|
|
|
71
71
|
"@react-aria/utils": "3.34.1",
|
|
72
72
|
"@react-types/shared": "3.26.0",
|
|
73
73
|
"@standard-schema/spec": "1.1.0",
|
|
74
|
-
"@tanstack/form-core": "1.33.
|
|
75
|
-
"@tanstack/react-form": "1.33.
|
|
74
|
+
"@tanstack/form-core": "1.33.3",
|
|
75
|
+
"@tanstack/react-form": "1.33.3",
|
|
76
76
|
"@tanstack/react-store": "0.11.0",
|
|
77
77
|
"@tanstack/react-virtual": "3.14.9",
|
|
78
78
|
"@use-gesture/react": "10.3.1",
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
"tailwind-variants": "3.2.2",
|
|
97
97
|
"usehooks-ts": "3.1.1",
|
|
98
98
|
"zod": "4.4.3",
|
|
99
|
-
"@payfit/unity-illustrations": "2.60.
|
|
99
|
+
"@payfit/unity-illustrations": "2.60.16"
|
|
100
100
|
},
|
|
101
101
|
"peerDependencies": {
|
|
102
102
|
"@hookform/devtools": "^4",
|
|
@@ -108,8 +108,8 @@
|
|
|
108
108
|
"react-hook-form": "^7",
|
|
109
109
|
"react-router-dom": "^5",
|
|
110
110
|
"zod": "^3 || ^4",
|
|
111
|
-
"@payfit/unity-icons": "2.60.
|
|
112
|
-
"@payfit/unity-themes": "2.60.
|
|
111
|
+
"@payfit/unity-icons": "2.60.16",
|
|
112
|
+
"@payfit/unity-themes": "2.60.16"
|
|
113
113
|
},
|
|
114
114
|
"devDependencies": {
|
|
115
115
|
"@figma/code-connect": "1.5.1",
|
|
@@ -126,7 +126,7 @@
|
|
|
126
126
|
"@storybook/react-vite": "10.5.4",
|
|
127
127
|
"@tanstack/intent": "0.3.6",
|
|
128
128
|
"@tanstack/react-devtools": "0.10.9",
|
|
129
|
-
"@tanstack/react-form-devtools": "0.2.
|
|
129
|
+
"@tanstack/react-form-devtools": "0.2.32",
|
|
130
130
|
"@tanstack/react-query": "5.101.4",
|
|
131
131
|
"@tanstack/react-router": "1.170.18",
|
|
132
132
|
"@tanstack/react-router-devtools": "1.167.0",
|
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
"react-docgen-typescript": "2.2.2",
|
|
147
147
|
"react-hot-toast": "2.5.1",
|
|
148
148
|
"storybook": "10.5.4",
|
|
149
|
-
"storybook-addon-pseudo-states": "10.5.
|
|
149
|
+
"storybook-addon-pseudo-states": "10.5.5",
|
|
150
150
|
"storybook-addon-tag-badges": "3.1.0",
|
|
151
151
|
"storybook-addon-test-codegen": "3.0.4",
|
|
152
152
|
"storybook-mock-date-decorator": "3.0.0",
|
|
@@ -158,11 +158,11 @@
|
|
|
158
158
|
"@payfit/hr-app-eslint": "0.0.0-use.local",
|
|
159
159
|
"@payfit/hr-apps-tsconfigs": "0.0.0-use.local",
|
|
160
160
|
"@payfit/storybook-addon-console-errors": "0.0.0-use.local",
|
|
161
|
-
"@payfit/
|
|
162
|
-
"@payfit/unity-
|
|
161
|
+
"@payfit/storybook-config": "0.0.0-use.local",
|
|
162
|
+
"@payfit/unity-icons": "2.60.16",
|
|
163
|
+
"@payfit/unity-themes": "2.60.16",
|
|
163
164
|
"@payfit/vite-configs": "0.0.0-use.local",
|
|
164
|
-
"@payfit/unity-illustrations": "2.60.
|
|
165
|
-
"@payfit/storybook-config": "0.0.0-use.local"
|
|
165
|
+
"@payfit/unity-illustrations": "2.60.16"
|
|
166
166
|
},
|
|
167
167
|
"peerDependenciesMeta": {
|
|
168
168
|
"@hookform/devtools": {
|