@payfit/unity-components 2.5.7 → 2.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/dist/esm/components/empty-state/EmptyState.d.ts +48 -0
  2. package/dist/esm/components/empty-state/EmptyState.js +25 -0
  3. package/dist/esm/components/empty-state/EmptyState.variants.d.ts +59 -0
  4. package/dist/esm/components/empty-state/EmptyState.variants.js +24 -0
  5. package/dist/esm/components/empty-state/parts/EmptyStateActions.d.ts +39 -0
  6. package/dist/esm/components/empty-state/parts/EmptyStateActions.js +17 -0
  7. package/dist/esm/components/empty-state/parts/EmptyStateContent.d.ts +40 -0
  8. package/dist/esm/components/empty-state/parts/EmptyStateContent.js +21 -0
  9. package/dist/esm/components/empty-state/parts/EmptyStateIcon.d.ts +41 -0
  10. package/dist/esm/components/empty-state/parts/EmptyStateIcon.js +14 -0
  11. package/dist/esm/components/empty-state/presets/EmptyStateGetStarted.d.ts +41 -0
  12. package/dist/esm/components/empty-state/presets/EmptyStateGetStarted.js +28 -0
  13. package/dist/esm/components/empty-state/presets/EmptyStateGoodJob.d.ts +29 -0
  14. package/dist/esm/components/empty-state/presets/EmptyStateGoodJob.js +55 -0
  15. package/dist/esm/components/empty-state/presets/EmptyStateNoSearchResults.d.ts +38 -0
  16. package/dist/esm/components/empty-state/presets/EmptyStateNoSearchResults.js +28 -0
  17. package/dist/esm/components/empty-state/presets/EmptyStateUpgradeRequired.d.ts +37 -0
  18. package/dist/esm/components/empty-state/presets/EmptyStateUpgradeRequired.js +28 -0
  19. package/dist/esm/components/empty-state/presets/EmptyStateUseDesktop.d.ts +28 -0
  20. package/dist/esm/components/empty-state/presets/EmptyStateUseDesktop.js +26 -0
  21. package/dist/esm/components/empty-state/presets/EmptyStateWaitingForData.d.ts +38 -0
  22. package/dist/esm/components/empty-state/presets/EmptyStateWaitingForData.js +28 -0
  23. package/dist/esm/components/inline-field/InlineField.js +15 -6
  24. package/dist/esm/components/inline-field-group/InlineFieldGroup.context.d.ts +12 -0
  25. package/dist/esm/components/inline-field-group/InlineFieldGroup.d.ts +39 -0
  26. package/dist/esm/components/inline-field-group/InlineFieldGroup.js +119 -93
  27. package/dist/esm/components/inline-field-group/parts/InlineFieldGroupActions.d.ts +24 -0
  28. package/dist/esm/components/inline-field-group/parts/InlineFieldGroupActions.js +158 -0
  29. package/dist/esm/components/inline-field-group/parts/InlineFieldGroupHeader.d.ts +11 -35
  30. package/dist/esm/components/inline-field-group/parts/InlineFieldGroupHeader.js +27 -94
  31. package/dist/esm/components/select/Select.d.ts +4 -0
  32. package/dist/esm/components/select/Select.js +30 -28
  33. package/dist/esm/components/select/TanstackSelect.js +24 -17
  34. package/dist/esm/components/select/parts/SelectButton.d.ts +13 -2
  35. package/dist/esm/components/select/parts/SelectButton.js +50 -48
  36. package/dist/esm/components/select-field/TanstackSelectField.js +22 -20
  37. package/dist/esm/index.d.ts +10 -0
  38. package/dist/esm/index.js +431 -411
  39. package/i18n/en-GB.json +9 -0
  40. package/i18n/es-ES.json +9 -0
  41. package/i18n/fr-FR.json +9 -0
  42. package/package.json +7 -7
@@ -0,0 +1,48 @@
1
+ import { PropsWithChildren } from 'react';
2
+ export interface EmptyStateProps extends PropsWithChildren {
3
+ /**
4
+ * The ARIA role for the empty state container.
5
+ * @default 'status'
6
+ */
7
+ role?: string;
8
+ /**
9
+ * Additional CSS class names.
10
+ */
11
+ className?: string;
12
+ }
13
+ /**
14
+ * EmptyState communicates the absence of data or content to users while providing clear guidance on next steps.
15
+ * Use this component when there's no data to display, when filters return no results, when a feature requires prerequisites, or when celebrating task completion.
16
+ * The component provides a flexible composition system through its parts (`EmptyStateIcon`, `EmptyStateContent`, `EmptyStateActions`) for creating custom empty states, as well as preset components for common scenarios.
17
+ * @param {EmptyStateProps} props - The component props including optional `role` and `className`.
18
+ * @example
19
+ * ```tsx
20
+ * import { EmptyState, EmptyStateIcon, EmptyStateContent, EmptyStateActions, Button } from '@payfit/unity-components'
21
+ *
22
+ * function DocumentList() {
23
+ * return (
24
+ * <EmptyState>
25
+ * <EmptyStateIcon icon="DocumentOutlined" variant="neutral" />
26
+ * <EmptyStateContent
27
+ * title="No documents yet"
28
+ * description="Create your first document to get started."
29
+ * />
30
+ * <EmptyStateActions>
31
+ * <Button variant="ghost">Create document</Button>
32
+ * </EmptyStateActions>
33
+ * </EmptyState>
34
+ * )
35
+ * }
36
+ * ```
37
+ * @remarks
38
+ * - The component is composable through its part components for maximum flexibility
39
+ * - For common use cases, use preset components like `EmptyStateGetStarted`, `EmptyStateNoSearchResults`, etc.
40
+ * - The component uses `role="status"` by default for accessibility, announcing changes to screen readers
41
+ * - All empty state presets include built-in internationalization support
42
+ * @see {@link EmptyStateProps} for all available props
43
+ * @see Source code in {@link https://github.com/PayFit/hr-apps/tree/master/libs/shared/unity/components/src/components/empty-state GitHub}
44
+ * @see Design specs in {@link https://www.figma.com/design/poaMyU7abAgL9VRhx4ygyy/Unity-DS-%3E-Components-Library?node-id=16600-5334 Figma}
45
+ * @see Developer docs in {@link https://unity-components.payfit.io/?path=/docs/component-reference-emptystate--docs unity-components.payfit.io}
46
+ */
47
+ declare const EmptyState: import('react').ForwardRefExoticComponent<EmptyStateProps & import('react').RefAttributes<HTMLDivElement>>;
48
+ export { EmptyState };
@@ -0,0 +1,25 @@
1
+ import { jsx as i } from "react/jsx-runtime";
2
+ import { forwardRef as p } from "react";
3
+ import { emptyState as s } from "./EmptyState.variants.js";
4
+ const d = p(
5
+ ({ children: t, role: a = "status", className: r, ...e }, o) => {
6
+ const { base: m } = s();
7
+ return /* @__PURE__ */ i(
8
+ "div",
9
+ {
10
+ "data-dd-privacy": "allow",
11
+ ref: o,
12
+ role: a,
13
+ className: m({ className: r }),
14
+ "aria-live": "polite",
15
+ "aria-atomic": "true",
16
+ ...e,
17
+ children: t
18
+ }
19
+ );
20
+ }
21
+ );
22
+ d.displayName = "EmptyState";
23
+ export {
24
+ d as EmptyState
25
+ };
@@ -0,0 +1,59 @@
1
+ export declare const emptyState: import('tailwind-variants').TVReturnType<{
2
+ [key: string]: {
3
+ [key: string]: import('tailwind-merge').ClassNameValue | {
4
+ content?: import('tailwind-merge').ClassNameValue;
5
+ base?: import('tailwind-merge').ClassNameValue;
6
+ actions?: import('tailwind-merge').ClassNameValue;
7
+ iconContainer?: import('tailwind-merge').ClassNameValue;
8
+ };
9
+ };
10
+ } | {
11
+ [x: string]: {
12
+ [x: string]: import('tailwind-merge').ClassNameValue | {
13
+ content?: import('tailwind-merge').ClassNameValue;
14
+ base?: import('tailwind-merge').ClassNameValue;
15
+ actions?: import('tailwind-merge').ClassNameValue;
16
+ iconContainer?: import('tailwind-merge').ClassNameValue;
17
+ };
18
+ };
19
+ } | {}, {
20
+ base: string;
21
+ iconContainer: string;
22
+ content: string;
23
+ actions: string;
24
+ }, undefined, {
25
+ [key: string]: {
26
+ [key: string]: import('tailwind-merge').ClassNameValue | {
27
+ content?: import('tailwind-merge').ClassNameValue;
28
+ base?: import('tailwind-merge').ClassNameValue;
29
+ actions?: import('tailwind-merge').ClassNameValue;
30
+ iconContainer?: import('tailwind-merge').ClassNameValue;
31
+ };
32
+ };
33
+ } | {}, {
34
+ base: string;
35
+ iconContainer: string;
36
+ content: string;
37
+ actions: string;
38
+ }, import('tailwind-variants').TVReturnType<unknown, {
39
+ base: string;
40
+ iconContainer: string;
41
+ content: string;
42
+ actions: string;
43
+ }, undefined, unknown, unknown, undefined>>;
44
+ export declare const emptyStateIcon: import('tailwind-variants').TVReturnType<{
45
+ variant: {
46
+ neutral: string;
47
+ success: string;
48
+ };
49
+ }, undefined, "uy:flex uy:items-center uy:justify-center uy:rounded-125 uy:p-100", {
50
+ variant: {
51
+ neutral: string;
52
+ success: string;
53
+ };
54
+ }, undefined, import('tailwind-variants').TVReturnType<{
55
+ variant: {
56
+ neutral: string;
57
+ success: string;
58
+ };
59
+ }, undefined, "uy:flex uy:items-center uy:justify-center uy:rounded-125 uy:p-100", unknown, unknown, undefined>>;
@@ -0,0 +1,24 @@
1
+ import { uyTv as e } from "@payfit/unity-themes";
2
+ const u = e({
3
+ slots: {
4
+ base: "uy:flex uy:flex-col uy:items-center uy:justify-center uy:w-full uy:min-h-30 uy:gap-250 uy:py-400",
5
+ iconContainer: "",
6
+ content: "uy:flex uy:flex-col uy:items-center uy:gap-100 uy:max-w-60",
7
+ actions: "uy:flex uy:flex-col uy:items-center uy:gap-100"
8
+ }
9
+ }), y = e({
10
+ base: "uy:flex uy:items-center uy:justify-center uy:rounded-125 uy:p-100",
11
+ variants: {
12
+ variant: {
13
+ neutral: "uy:bg-surface-neutral-lowest uy:text-content-neutral-low",
14
+ success: "uy:bg-surface-success-lowest uy:text-content-success"
15
+ }
16
+ },
17
+ defaultVariants: {
18
+ variant: "neutral"
19
+ }
20
+ });
21
+ export {
22
+ u as emptyState,
23
+ y as emptyStateIcon
24
+ };
@@ -0,0 +1,39 @@
1
+ import { PropsWithChildren } from 'react';
2
+ export type EmptyStateActionsProps = PropsWithChildren;
3
+ /**
4
+ * EmptyStateActions provides an actionable path forward by containing buttons, links, or other interactive elements.
5
+ * Use this component to help users resolve the empty state by offering clear next steps or alternative actions.
6
+ * The component arranges action elements vertically with consistent spacing. Place buttons or links as children to guide users toward resolving the empty state. This will display them in a centered, stacked layout.
7
+ * @param {EmptyStateActionsProps} props - The component children containing action elements.
8
+ * @example
9
+ * ```tsx
10
+ * import { EmptyState, EmptyStateContent, EmptyStateActions, Button } from '@payfit/unity-components'
11
+ *
12
+ * function NoDocuments() {
13
+ * return (
14
+ * <EmptyState>
15
+ * <EmptyStateContent
16
+ * title="No documents yet"
17
+ * description="Upload your first document to get started."
18
+ * />
19
+ * <EmptyStateActions>
20
+ * <Button variant="ghost" onPress={handleUpload}>
21
+ * Upload document
22
+ * </Button>
23
+ * </EmptyStateActions>
24
+ * </EmptyState>
25
+ * )
26
+ * }
27
+ * ```
28
+ * @remarks
29
+ * - The component returns null if no children are provided
30
+ * - Multiple actions are stacked vertically for clarity
31
+ * - Limit to 1-2 primary actions to avoid overwhelming users
32
+ * - Use ghost or secondary button variants to maintain visual hierarchy
33
+ * @see {@link EmptyStateActionsProps} for all available props
34
+ * @see Source code in {@link https://github.com/PayFit/hr-apps/tree/master/libs/shared/unity/components/src/components/empty-state GitHub}
35
+ */
36
+ declare const EmptyStateActions: import('react').ForwardRefExoticComponent<{
37
+ children?: import('react').ReactNode | undefined;
38
+ } & import('react').RefAttributes<HTMLDivElement>>;
39
+ export { EmptyStateActions };
@@ -0,0 +1,17 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { forwardRef as m } from "react";
3
+ const a = m(
4
+ ({ children: t, ...e }, r) => t ? /* @__PURE__ */ o(
5
+ "div",
6
+ {
7
+ ref: r,
8
+ className: "uy:flex uy:flex-col uy:items-center uy:gap-100",
9
+ ...e,
10
+ children: t
11
+ }
12
+ ) : null
13
+ );
14
+ a.displayName = "EmptyStateActions";
15
+ export {
16
+ a as EmptyStateActions
17
+ };
@@ -0,0 +1,40 @@
1
+ export interface EmptyStateContentProps {
2
+ /**
3
+ * The main title text for the empty state.
4
+ */
5
+ title?: string;
6
+ /**
7
+ * Additional descriptive text providing context about the empty state.
8
+ */
9
+ description?: string;
10
+ }
11
+ /**
12
+ * EmptyStateContent communicates the reason for the empty state through a title and optional description.
13
+ * Use this component to provide clear messaging about why content is absent and guide users on what they can do next.
14
+ * The component displays a heading for the primary message and an optional description for additional context. Set the `title` prop to provide the main message, and use the `description` prop to add supportive details, suggestions, or next steps.
15
+ * @param {EmptyStateContentProps} props - The component props including optional `title` and `description`.
16
+ * @example
17
+ * ```tsx
18
+ * import { EmptyState, EmptyStateContent } from '@payfit/unity-components'
19
+ *
20
+ * function SearchResults() {
21
+ * return (
22
+ * <EmptyState>
23
+ * <EmptyStateContent
24
+ * title="No results found"
25
+ * description="Try adjusting your search or filters to find what you're looking for."
26
+ * />
27
+ * </EmptyState>
28
+ * )
29
+ * }
30
+ * ```
31
+ * @remarks
32
+ * - The content is automatically centered and constrained to optimal reading width
33
+ * - The component returns null if both title and description are empty
34
+ * - Keep titles concise (2-5 words) and descriptions under 2 sentences for best readability
35
+ * - Use positive, actionable language to guide users forward
36
+ * @see {@link EmptyStateContentProps} for all available props
37
+ * @see Source code in {@link https://github.com/PayFit/hr-apps/tree/master/libs/shared/unity/components/src/components/empty-state GitHub}
38
+ */
39
+ declare const EmptyStateContent: import('react').ForwardRefExoticComponent<EmptyStateContentProps & import('react').RefAttributes<HTMLDivElement>>;
40
+ export { EmptyStateContent };
@@ -0,0 +1,21 @@
1
+ import { jsxs as l, jsx as e } from "react/jsx-runtime";
2
+ import { forwardRef as m } from "react";
3
+ import { Text as n } from "../../text/Text.js";
4
+ const c = m(
5
+ ({ title: t, description: r, ...o }, a) => !t && !r ? null : /* @__PURE__ */ l(
6
+ "div",
7
+ {
8
+ ref: a,
9
+ className: "uy:flex uy:flex-col uy:items-center uy:gap-100 uy:text-center",
10
+ ...o,
11
+ children: [
12
+ t && /* @__PURE__ */ e(n, { variant: "h4", color: "inherit", children: t }),
13
+ r && /* @__PURE__ */ e(n, { variant: "body", color: "content.neutral.low", children: r })
14
+ ]
15
+ }
16
+ )
17
+ );
18
+ c.displayName = "EmptyStateContent";
19
+ export {
20
+ c as EmptyStateContent
21
+ };
@@ -0,0 +1,41 @@
1
+ import { UnityIcon } from '@payfit/unity-icons';
2
+ import { VariantProps } from '@payfit/unity-themes';
3
+ import { emptyStateIcon } from '../EmptyState.variants.js';
4
+ export interface EmptyStateIconProps extends VariantProps<typeof emptyStateIcon> {
5
+ /**
6
+ * The Unity icon to display.
7
+ */
8
+ icon: UnityIcon;
9
+ /**
10
+ * The visual style of the icon container.
11
+ * @default 'neutral'
12
+ */
13
+ variant?: 'neutral' | 'success';
14
+ }
15
+ /**
16
+ * EmptyStateIcon provides visual representation for empty states through an icon in a styled container.
17
+ * Use this component to reinforce the message of your empty state with appropriate iconography.
18
+ * The component displays Unity icons in a circular container with background color based on the variant. Use the `neutral` variant for standard empty states and informational messages, and the `success` variant to celebrate completed tasks or positive outcomes.
19
+ * @param {EmptyStateIconProps} props - The component props including the `icon` name and optional `variant`.
20
+ * @example
21
+ * ```tsx
22
+ * import { EmptyState, EmptyStateIcon, EmptyStateContent } from '@payfit/unity-components'
23
+ *
24
+ * function NoDocuments() {
25
+ * return (
26
+ * <EmptyState>
27
+ * <EmptyStateIcon icon="DocumentOutlined" variant="neutral" />
28
+ * <EmptyStateContent title="No documents found" />
29
+ * </EmptyState>
30
+ * )
31
+ * }
32
+ * ```
33
+ * @remarks
34
+ * - The icon is automatically sized to 24px for consistency across empty states
35
+ * - The icon has `aria-hidden="true"` as it's decorative and shouldn't be announced by screen readers
36
+ * - Choose icons that clearly represent the empty state context
37
+ * @see {@link EmptyStateIconProps} for all available props
38
+ * @see Source code in {@link https://github.com/PayFit/hr-apps/tree/master/libs/shared/unity/components/src/components/empty-state GitHub}
39
+ */
40
+ declare const EmptyStateIcon: import('react').ForwardRefExoticComponent<EmptyStateIconProps & import('react').RefAttributes<HTMLDivElement>>;
41
+ export { EmptyStateIcon };
@@ -0,0 +1,14 @@
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import { forwardRef as a } from "react";
3
+ import { Icon as n } from "../../icon/Icon.js";
4
+ import { emptyStateIcon as c } from "../EmptyState.variants.js";
5
+ const s = a(
6
+ ({ icon: r, variant: o = "neutral", ...e }, m) => {
7
+ const i = c({ variant: o });
8
+ return /* @__PURE__ */ t("div", { ref: m, className: i, ...e, children: /* @__PURE__ */ t(n, { src: r, size: 24, color: "inherit", "aria-hidden": "true" }) });
9
+ }
10
+ );
11
+ s.displayName = "EmptyStateIcon";
12
+ export {
13
+ s as EmptyStateIcon
14
+ };
@@ -0,0 +1,41 @@
1
+ import { ComponentPropsWithoutRef, ReactNode } from 'react';
2
+ import { EmptyState } from '../EmptyState.js';
3
+ export interface EmptyStateGetStartedProps extends Omit<ComponentPropsWithoutRef<typeof EmptyState>, 'children'> {
4
+ /**
5
+ * Custom title text. If not provided, uses the default i18n message.
6
+ */
7
+ title?: string;
8
+ /**
9
+ * Description text providing context about getting started.
10
+ * Defaults to placeholder text if not provided.
11
+ */
12
+ description?: string;
13
+ /**
14
+ * Optional action elements (buttons, links) to display.
15
+ * Pass Button or Link components as children.
16
+ */
17
+ actions?: ReactNode;
18
+ }
19
+ /**
20
+ * EmptyStateGetStarted is a preset for encouraging users to create their first item.
21
+ * It displays a puzzle piece icon and provides an optional actions slot for buttons or links.
22
+ * @param {EmptyStateGetStartedProps} props - The component props
23
+ * @example
24
+ * ```tsx
25
+ * import { EmptyStateGetStarted, Button } from '@payfit/unity-components'
26
+ *
27
+ * <EmptyStateGetStarted
28
+ * description="Create your first project to get started with the platform."
29
+ * actions={
30
+ * <>
31
+ * <Button variant="ghost" onPress={() => console.log('Create')}>
32
+ * Create item
33
+ * </Button>
34
+ * <Link href="/help">Learn more</Link>
35
+ * </>
36
+ * }
37
+ * />
38
+ * ```
39
+ */
40
+ declare const EmptyStateGetStarted: import('react').ForwardRefExoticComponent<EmptyStateGetStartedProps & import('react').RefAttributes<HTMLDivElement>>;
41
+ export { EmptyStateGetStarted };
@@ -0,0 +1,28 @@
1
+ import { jsxs as n, jsx as t } from "react/jsx-runtime";
2
+ import { forwardRef as p } from "react";
3
+ import { useIntl as s } from "react-intl";
4
+ import { EmptyState as l } from "../EmptyState.js";
5
+ import { EmptyStateActions as d } from "../parts/EmptyStateActions.js";
6
+ import { EmptyStateContent as f } from "../parts/EmptyStateContent.js";
7
+ import { EmptyStateIcon as c } from "../parts/EmptyStateIcon.js";
8
+ const y = p(({ title: r, description: o, actions: e, ...m }, a) => {
9
+ const i = s().formatMessage({
10
+ id: "unity:component:empty-state:get-started:title",
11
+ defaultMessage: "Get started"
12
+ });
13
+ return /* @__PURE__ */ n(l, { ref: a, ...m, children: [
14
+ /* @__PURE__ */ t(c, { icon: "PuzzlePieceOutlined", variant: "neutral" }),
15
+ /* @__PURE__ */ t(
16
+ f,
17
+ {
18
+ title: r || i,
19
+ description: o
20
+ }
21
+ ),
22
+ e && /* @__PURE__ */ t(d, { children: e })
23
+ ] });
24
+ });
25
+ y.displayName = "EmptyStateGetStarted";
26
+ export {
27
+ y as EmptyStateGetStarted
28
+ };
@@ -0,0 +1,29 @@
1
+ import { ComponentPropsWithoutRef } from 'react';
2
+ import { EmptyState } from '../EmptyState.js';
3
+ export interface EmptyStateGoodJobProps extends Omit<ComponentPropsWithoutRef<typeof EmptyState>, 'children'> {
4
+ /**
5
+ * Custom title text. If not provided, uses the default i18n message.
6
+ */
7
+ title?: string;
8
+ /**
9
+ * Description text providing context about the completion.
10
+ * Defaults to placeholder text if not provided.
11
+ */
12
+ description?: string;
13
+ }
14
+ /**
15
+ * EmptyStateGoodJob is a preset for celebrating task completion.
16
+ * It features a success icon with a decorative grid background that fades at the edges.
17
+ * The background is not customizable to maintain consistent celebration aesthetics.
18
+ * @param {EmptyStateGoodJobProps} props - The component props
19
+ * @example
20
+ * ```tsx
21
+ * import { EmptyStateGoodJob } from '@payfit/unity-components'
22
+ *
23
+ * <EmptyStateGoodJob
24
+ * description="You've completed all tasks in this section."
25
+ * />
26
+ * ```
27
+ */
28
+ declare const EmptyStateGoodJob: import('react').ForwardRefExoticComponent<EmptyStateGoodJobProps & import('react').RefAttributes<HTMLDivElement>>;
29
+ export { EmptyStateGoodJob };
@@ -0,0 +1,55 @@
1
+ import { jsxs as t, jsx as e } from "react/jsx-runtime";
2
+ import { forwardRef as s } from "react";
3
+ import { useIntl as p } from "react-intl";
4
+ import { EmptyState as l } from "../EmptyState.js";
5
+ import { EmptyStateContent as m } from "../parts/EmptyStateContent.js";
6
+ import { EmptyStateIcon as u } from "../parts/EmptyStateIcon.js";
7
+ const y = s(
8
+ ({ title: a, description: r, ...o }, n) => {
9
+ const i = p().formatMessage({
10
+ id: "unity:component:empty-state:good-job:title",
11
+ defaultMessage: "Good job"
12
+ });
13
+ return /* @__PURE__ */ t("div", { className: "uy:relative uy:w-full uy:min-h-[200px] uy:isolate", children: [
14
+ /* @__PURE__ */ t(l, { ref: n, className: "uy:relative uy:z-2", ...o, children: [
15
+ /* @__PURE__ */ e(u, { icon: "CheckOutlined", variant: "success" }),
16
+ /* @__PURE__ */ e(
17
+ m,
18
+ {
19
+ title: a || i,
20
+ description: r
21
+ }
22
+ )
23
+ ] }),
24
+ /* @__PURE__ */ e(
25
+ "div",
26
+ {
27
+ className: "uy:absolute uy:top-0 uy:z-0 uy:left-1/2 uy:-translate-x-1/2 uy:h-full uy:pointer-events-none uy:aspect-square uy:mask-radial-at-center uy:mask-radial-from-0% uy:mask-radial-to-70%",
28
+ style: {
29
+ backgroundImage: `
30
+ repeating-linear-gradient(
31
+ 0deg,
32
+ #e5e7eb 0px,
33
+ #e5e7eb 1px,
34
+ transparent 1px,
35
+ transparent 32px
36
+ ),
37
+ repeating-linear-gradient(
38
+ 90deg,
39
+ #e5e7eb 0px,
40
+ #e5e7eb 1px,
41
+ transparent 1px,
42
+ transparent 32px
43
+ )
44
+ `
45
+ },
46
+ "aria-hidden": "true"
47
+ }
48
+ )
49
+ ] });
50
+ }
51
+ );
52
+ y.displayName = "EmptyStateGoodJob";
53
+ export {
54
+ y as EmptyStateGoodJob
55
+ };
@@ -0,0 +1,38 @@
1
+ import { ComponentPropsWithoutRef, ReactNode } from 'react';
2
+ import { EmptyState } from '../EmptyState.js';
3
+ export interface EmptyStateNoSearchResultsProps extends Omit<ComponentPropsWithoutRef<typeof EmptyState>, 'children'> {
4
+ /**
5
+ * Custom title text. If not provided, uses the default i18n message.
6
+ */
7
+ title?: string;
8
+ /**
9
+ * Description text providing context about the lack of search results.
10
+ * Defaults to placeholder text if not provided.
11
+ */
12
+ description?: string;
13
+ /**
14
+ * Optional action elements (buttons, links) to display.
15
+ * Pass Button or Link components as children.
16
+ */
17
+ actions?: ReactNode;
18
+ }
19
+ /**
20
+ * EmptyStateNoSearchResults is a preset for informing users that their search or filter returned no results.
21
+ * It displays a magnifying glass icon and provides an optional actions slot.
22
+ * @param {EmptyStateNoSearchResultsProps} props - The component props
23
+ * @example
24
+ * ```tsx
25
+ * import { EmptyStateNoSearchResults, Button } from '@payfit/unity-components'
26
+ *
27
+ * <EmptyStateNoSearchResults
28
+ * description="Try adjusting your search criteria or filters."
29
+ * actions={
30
+ * <Button variant="ghost" onPress={() => console.log('Reset')}>
31
+ * Reset filters
32
+ * </Button>
33
+ * }
34
+ * />
35
+ * ```
36
+ */
37
+ declare const EmptyStateNoSearchResults: import('react').ForwardRefExoticComponent<EmptyStateNoSearchResultsProps & import('react').RefAttributes<HTMLDivElement>>;
38
+ export { EmptyStateNoSearchResults };
@@ -0,0 +1,28 @@
1
+ import { jsxs as s, jsx as t } from "react/jsx-runtime";
2
+ import { forwardRef as a } from "react";
3
+ import { useIntl as l } from "react-intl";
4
+ import { EmptyState as p } from "../EmptyState.js";
5
+ import { EmptyStateActions as f } from "../parts/EmptyStateActions.js";
6
+ import { EmptyStateContent as c } from "../parts/EmptyStateContent.js";
7
+ import { EmptyStateIcon as d } from "../parts/EmptyStateIcon.js";
8
+ const u = a(({ title: r, description: o, actions: e, ...n }, i) => {
9
+ const m = l().formatMessage({
10
+ id: "unity:component:empty-state:no-search-results:title",
11
+ defaultMessage: "We didn't find any results"
12
+ });
13
+ return /* @__PURE__ */ s(p, { ref: i, ...n, children: [
14
+ /* @__PURE__ */ t(d, { icon: "MagnifyingGlassOutlined", variant: "neutral" }),
15
+ /* @__PURE__ */ t(
16
+ c,
17
+ {
18
+ title: r || m,
19
+ description: o
20
+ }
21
+ ),
22
+ e && /* @__PURE__ */ t(f, { children: e })
23
+ ] });
24
+ });
25
+ u.displayName = "EmptyStateNoSearchResults";
26
+ export {
27
+ u as EmptyStateNoSearchResults
28
+ };
@@ -0,0 +1,37 @@
1
+ import { ComponentPropsWithoutRef, ReactNode } from 'react';
2
+ import { EmptyState } from '../EmptyState.js';
3
+ export interface EmptyStateUpgradeRequiredProps extends Omit<ComponentPropsWithoutRef<typeof EmptyState>, 'children'> {
4
+ /**
5
+ * Custom title text. If not provided, uses the default i18n message.
6
+ */
7
+ title?: string;
8
+ /**
9
+ * Description text explaining why an upgrade is required.
10
+ * Defaults to placeholder text if not provided.
11
+ */
12
+ description?: string;
13
+ /**
14
+ * Optional action elements (buttons, links) to display.
15
+ * Pass Button or Link components as children.
16
+ * Typically uses a primary link for the upgrade action.
17
+ */
18
+ actions?: ReactNode;
19
+ }
20
+ /**
21
+ * EmptyStateUpgradeRequired is a preset for prompting users to upgrade for feature access.
22
+ * It displays a lock icon and provides an optional actions slot.
23
+ * @param {EmptyStateUpgradeRequiredProps} props - The component props
24
+ * @example
25
+ * ```tsx
26
+ * import { EmptyStateUpgradeRequired } from '@payfit/unity-components'
27
+ *
28
+ * <EmptyStateUpgradeRequired
29
+ * description="Unlock advanced reporting features with a premium plan."
30
+ * actions={
31
+ * <Link href="/upgrade">Upgrade now</Link>
32
+ * }
33
+ * />
34
+ * ```
35
+ */
36
+ declare const EmptyStateUpgradeRequired: import('react').ForwardRefExoticComponent<EmptyStateUpgradeRequiredProps & import('react').RefAttributes<HTMLDivElement>>;
37
+ export { EmptyStateUpgradeRequired };
@@ -0,0 +1,28 @@
1
+ import { jsxs as p, jsx as t } from "react/jsx-runtime";
2
+ import { forwardRef as n } from "react";
3
+ import { useIntl as d } from "react-intl";
4
+ import { EmptyState as l } from "../EmptyState.js";
5
+ import { EmptyStateActions as s } from "../parts/EmptyStateActions.js";
6
+ import { EmptyStateContent as f } from "../parts/EmptyStateContent.js";
7
+ import { EmptyStateIcon as u } from "../parts/EmptyStateIcon.js";
8
+ const c = n(({ title: r, description: o, actions: e, ...i }, m) => {
9
+ const a = d().formatMessage({
10
+ id: "unity:component:empty-state:upgrade-required:title",
11
+ defaultMessage: "Upgrade required"
12
+ });
13
+ return /* @__PURE__ */ p(l, { ref: m, ...i, children: [
14
+ /* @__PURE__ */ t(u, { icon: "LockOutlined", variant: "neutral" }),
15
+ /* @__PURE__ */ t(
16
+ f,
17
+ {
18
+ title: r || a,
19
+ description: o
20
+ }
21
+ ),
22
+ e && /* @__PURE__ */ t(s, { children: e })
23
+ ] });
24
+ });
25
+ c.displayName = "EmptyStateUpgradeRequired";
26
+ export {
27
+ c as EmptyStateUpgradeRequired
28
+ };
@@ -0,0 +1,28 @@
1
+ import { ComponentPropsWithoutRef } from 'react';
2
+ import { EmptyState } from '../EmptyState.js';
3
+ export interface EmptyStateUseDesktopProps extends Omit<ComponentPropsWithoutRef<typeof EmptyState>, 'children'> {
4
+ /**
5
+ * Custom title text. If not provided, uses the default i18n message.
6
+ */
7
+ title?: string;
8
+ /**
9
+ * Description text explaining why desktop is recommended.
10
+ * Defaults to placeholder text if not provided.
11
+ */
12
+ description?: string;
13
+ }
14
+ /**
15
+ * EmptyStateUseDesktop is a preset for recommending the desktop experience.
16
+ * It displays a devices icon and does not include any actions by default.
17
+ * @param {EmptyStateUseDesktopProps} props - The component props
18
+ * @example
19
+ * ```tsx
20
+ * import { EmptyStateUseDesktop } from '@payfit/unity-components'
21
+ *
22
+ * <EmptyStateUseDesktop
23
+ * description="This feature works best on larger screens."
24
+ * />
25
+ * ```
26
+ */
27
+ declare const EmptyStateUseDesktop: import('react').ForwardRefExoticComponent<EmptyStateUseDesktopProps & import('react').RefAttributes<HTMLDivElement>>;
28
+ export { EmptyStateUseDesktop };