@payfit/unity-components 2.68.14 → 2.68.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/README.md +6 -0
- package/dist/esm/components/action-bar/parts/ActionBarButton.d.ts +1 -15
- package/dist/esm/components/action-bar/parts/ActionBarButton.js +1 -2
- package/dist/esm/components/actionable/Actionable.d.ts +1 -1
- package/dist/esm/components/app-menu/parts/AppMenuHeader.js +30 -31
- package/dist/esm/components/avatar/parts/AvatarFallback.js +6 -6
- package/dist/esm/components/avatar-group/parts/AvatarGroupCount.d.ts +1 -1
- package/dist/esm/components/badge/Badge.js +1 -1
- package/dist/esm/components/breadcrumbs/parts/RawBreadcrumbLink.d.ts +1 -1
- package/dist/esm/components/button/Button.d.ts +1 -1
- package/dist/esm/components/button/Button.js +42 -48
- package/dist/esm/components/button/Button.variants.js +15 -17
- package/dist/esm/components/carousel/parts/CarouselHeader.d.ts +3 -3
- package/dist/esm/components/checkbox/Checkbox.variants.js +1 -1
- package/dist/esm/components/checkbox/parts/CheckboxIndicator.js +4 -4
- package/dist/esm/components/date-calendar/DateCalendar.js +74 -74
- package/dist/esm/components/date-calendar/DateCalendar.variants.js +3 -3
- package/dist/esm/components/date-picker/parts/DateInput.js +2 -3
- package/dist/esm/components/date-range-calendar/DateRangeCalendar.js +85 -85
- package/dist/esm/components/date-range-picker/parts/DateRangeInput.js +1 -1
- package/dist/esm/components/filter/parts/FilterPopover.js +27 -27
- package/dist/esm/components/form-field/parts/TanstackRawFormContextualLink.d.ts +1 -1
- package/dist/esm/components/form-field/parts/TanstackRawFormContextualLink.js +19 -20
- package/dist/esm/components/funnel-layout/FunnelLayout.d.ts +1 -1
- package/dist/esm/components/funnel-layout/parts/FunnelPageAction.d.ts +2 -2
- package/dist/esm/components/funnel-layout/parts/FunnelPageAction.js +24 -28
- package/dist/esm/components/funnel-layout/parts/FunnelSidebar.d.ts +0 -17
- package/dist/esm/components/funnel-layout/parts/FunnelSidebar.js +14 -23
- package/dist/esm/components/funnel-layout/parts/FunnelTopBar.d.ts +1 -27
- package/dist/esm/components/funnel-layout/parts/FunnelTopBar.js +43 -53
- package/dist/esm/components/icon-button/IconButton.d.ts +1 -1
- package/dist/esm/components/icon-button/IconButton.js +60 -66
- package/dist/esm/components/icon-button/IconButton.variants.js +15 -17
- package/dist/esm/components/link/RawLink.d.ts +1 -1
- package/dist/esm/components/link/RawLink.js +3 -3
- package/dist/esm/components/link-button/LinkButton.variants.js +12 -17
- package/dist/esm/components/link-button/RawLinkButton.js +41 -46
- package/dist/esm/components/menu/parts/MenuContent.d.ts +1 -10
- package/dist/esm/components/menu/parts/MenuContent.js +6 -6
- package/dist/esm/components/nav/parts/NavGroup.js +4 -4
- package/dist/esm/components/nav/parts/RawNavItem.js +9 -9
- package/dist/esm/components/navigation-card/NavigationCard.d.ts +1 -1
- package/dist/esm/components/navigation-card/NavigationCard.variants.js +2 -2
- package/dist/esm/components/page/parts/PageHeader.d.ts +3 -54
- package/dist/esm/components/page/parts/PageHeader.js +18 -28
- package/dist/esm/components/payfit-brand/PayFitBrand.d.ts +1 -11
- package/dist/esm/components/payfit-brand/PayFitBrand.js +48 -73
- package/dist/esm/components/payfit-brand/PayFitPreprod.d.ts +2 -6
- package/dist/esm/components/payfit-brand/PayFitPreprod.js +35 -44
- package/dist/esm/components/pill/Pill.d.ts +3 -3
- package/dist/esm/components/pill/Pill.js +1 -1
- package/dist/esm/components/radio-button-group/parts/RadioButton.js +23 -24
- package/dist/esm/components/radio-button-group/parts/RadioIndicator.d.ts +1 -2
- package/dist/esm/components/radio-button-group/parts/RadioIndicator.js +7 -38
- package/dist/esm/components/selectable-card/selectable-card-radio-group/parts/SelectableCardRadio.js +20 -22
- package/dist/esm/components/spinner/Spinner.js +1 -1
- package/dist/esm/components/tabs/Tabs.variant.js +6 -6
- package/dist/esm/components/tabs/parts/NavigationButton.js +2 -2
- package/dist/esm/components/task-menu/parts/RawSubTask.js +3 -3
- package/dist/esm/components/task-menu/parts/TaskGroup.js +3 -3
- package/dist/esm/components/task-menu/parts/task.variants.js +7 -7
- package/dist/esm/components/timeline/Timeline.variants.js +4 -4
- package/dist/esm/components/toast/UnityToast.js +2 -2
- package/dist/esm/components/toast/parts/ToastAction.js +10 -12
- package/dist/esm/components/toggle-switch/ToggleSwitch.js +4 -7
- package/dist/esm/hooks/use-tanstack-form.d.ts +6 -6
- package/dist/esm/index.d.ts +0 -21
- package/dist/esm/index.js +222 -243
- package/dist/esm/integrations/tanstack-router/components/form-contextual-link/TanstackFormContextualLink.js +7 -0
- package/dist/esm/integrations/tanstack-router/index.d.ts +1 -1
- package/dist/esm/integrations/tanstack-router.js +2 -2
- package/dist/esm/modules/ai-kit/components/ai-button/AIButton.d.ts +1 -1
- package/package.json +8 -11
- package/skills/unity-migrate-from-midnight/references/midnight-component-map.md +7 -7
- package/skills/unity-tanstack-form/SKILL.md +1 -25
- package/skills/unity-tanstack-form/references/schema-adapters.md +0 -27
- package/dist/esm/adapters/standardSchemaAdapter.js +0 -19
- package/dist/esm/adapters/zodAdapter.js +0 -60
- package/dist/esm/components/checkbox-field/CheckboxField.d.ts +0 -76
- package/dist/esm/components/checkbox-field/CheckboxField.js +0 -40
- package/dist/esm/components/checkbox-group-field/CheckboxGroupField.d.ts +0 -81
- package/dist/esm/components/checkbox-group-field/CheckboxGroupField.js +0 -37
- package/dist/esm/components/date-picker-field/DatePickerField.d.ts +0 -85
- package/dist/esm/components/date-picker-field/DatePickerField.js +0 -54
- package/dist/esm/components/form/Form.context.d.ts +0 -9
- package/dist/esm/components/form/Form.context.js +0 -17
- package/dist/esm/components/form/Form.d.ts +0 -43
- package/dist/esm/components/form/Form.js +0 -41
- package/dist/esm/components/form-field/FormField.context.d.ts +0 -33
- package/dist/esm/components/form-field/FormField.context.js +0 -47
- package/dist/esm/components/form-field/FormField.d.ts +0 -61
- package/dist/esm/components/form-field/FormField.js +0 -50
- package/dist/esm/components/form-field/parts/FormControl.d.ts +0 -32
- package/dist/esm/components/form-field/parts/FormControl.js +0 -42
- package/dist/esm/components/form-field/parts/FormFeedbackText.d.ts +0 -9
- package/dist/esm/components/form-field/parts/FormFeedbackText.js +0 -24
- package/dist/esm/components/form-field/parts/FormHelperText.d.ts +0 -9
- package/dist/esm/components/form-field/parts/FormHelperText.js +0 -21
- package/dist/esm/components/form-field/parts/FormLabel.d.ts +0 -10
- package/dist/esm/components/form-field/parts/FormLabel.js +0 -21
- package/dist/esm/components/form-field/parts/RawFormContextualLink.d.ts +0 -22
- package/dist/esm/components/form-field/parts/RawFormContextualLink.js +0 -33
- package/dist/esm/components/form-field/utils/isFieldRequired.d.ts +0 -8
- package/dist/esm/components/form-field/utils/isFieldRequired.js +0 -8
- package/dist/esm/components/multi-select-field/MultiSelectField.d.ts +0 -92
- package/dist/esm/components/multi-select-field/MultiSelectField.js +0 -57
- package/dist/esm/components/number-field/NumberField.d.ts +0 -49
- package/dist/esm/components/number-field/NumberField.js +0 -50
- package/dist/esm/components/radio-button-group-field/RadioButtonGroupField.d.ts +0 -49
- package/dist/esm/components/radio-button-group-field/RadioButtonGroupField.js +0 -37
- package/dist/esm/components/select-field/SelectField.d.ts +0 -52
- package/dist/esm/components/select-field/SelectField.js +0 -45
- package/dist/esm/components/selectable-button-group-field/SelectableButtonGroupField.d.ts +0 -61
- package/dist/esm/components/selectable-button-group-field/SelectableButtonGroupField.js +0 -42
- package/dist/esm/components/selectable-card-checkbox-group-field/SelectableCardCheckboxGroupField.d.ts +0 -33
- package/dist/esm/components/selectable-card-checkbox-group-field/SelectableCardCheckboxGroupField.js +0 -38
- package/dist/esm/components/selectable-card-radio-group-field/SelectableCardRadioGroupField.d.ts +0 -33
- package/dist/esm/components/selectable-card-radio-group-field/SelectableCardRadioGroupField.js +0 -38
- package/dist/esm/components/text-field/TextField.d.ts +0 -65
- package/dist/esm/components/text-field/TextField.js +0 -55
- package/dist/esm/components/toggle-switch-field/ToggleSwitchField.d.ts +0 -70
- package/dist/esm/components/toggle-switch-field/ToggleSwitchField.js +0 -35
- package/dist/esm/components/toggle-switch-group-field/ToggleSwitchGroupField.d.ts +0 -84
- package/dist/esm/components/toggle-switch-group-field/ToggleSwitchGroupField.js +0 -43
- package/dist/esm/hooks/use-form.d.ts +0 -50
- package/dist/esm/hooks/use-form.js +0 -38
- package/dist/esm/integrations/tanstack-router/components/form-contextual-link/FormContextualLink.d.ts +0 -45
- package/dist/esm/integrations/tanstack-router/components/form-contextual-link/FormContextualLink.js +0 -7
- package/dist/esm/utils/createSchemaAdapter.js +0 -8
|
@@ -3,7 +3,7 @@ import { ButtonProps } from '../../button/Button.js';
|
|
|
3
3
|
export interface FunnelPageActionProps extends PropsWithChildren<Omit<ButtonProps, 'variant' | 'color' | 'size'>> {
|
|
4
4
|
/**
|
|
5
5
|
* The action type determines the default styling and behavior.
|
|
6
|
-
* - 'previous': Uses
|
|
6
|
+
* - 'previous': Uses outlined variant for navigation back
|
|
7
7
|
* - 'next': Uses primary variant for progression forward
|
|
8
8
|
* - 'optional': Uses ghost variant for optional actions like skip
|
|
9
9
|
*/
|
|
@@ -27,7 +27,7 @@ export interface FunnelPageActionProps extends PropsWithChildren<Omit<ButtonProp
|
|
|
27
27
|
* ```
|
|
28
28
|
* @remarks
|
|
29
29
|
* - Automatically applies appropriate button variants based on action type
|
|
30
|
-
* - Previous actions use
|
|
30
|
+
* - Previous actions use outlined variant, next actions use primary variant
|
|
31
31
|
* - Optional actions use ghost variant for less prominent actions
|
|
32
32
|
* - Automatically sets DataDog's session replay privacy to `data-dd-privacy="allow"`
|
|
33
33
|
* @see {@link FunnelPageActionProps} for all available props
|
|
@@ -1,32 +1,28 @@
|
|
|
1
1
|
import { Button as e } from "../../button/Button.js";
|
|
2
2
|
import { forwardRef as t, useCallback as n } from "react";
|
|
3
|
-
import {
|
|
4
|
-
import { jsx as i } from "react/jsx-runtime";
|
|
3
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
5
4
|
//#region src/components/funnel-layout/parts/FunnelPageAction.tsx
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
});
|
|
29
|
-
});
|
|
30
|
-
a.displayName = "FunnelPageAction";
|
|
5
|
+
var i = t(({ actionType: t, children: i, ...a }, o) => /* @__PURE__ */ r(e, {
|
|
6
|
+
ref: o,
|
|
7
|
+
"data-dd-privacy": "allow",
|
|
8
|
+
...n((e) => {
|
|
9
|
+
switch (e) {
|
|
10
|
+
case "previous": return { variant: "outlined" };
|
|
11
|
+
case "next": return {
|
|
12
|
+
variant: "primary",
|
|
13
|
+
color: "primary"
|
|
14
|
+
};
|
|
15
|
+
case "optional": return {
|
|
16
|
+
variant: "ghost",
|
|
17
|
+
color: "neutral"
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
}, [])(t),
|
|
21
|
+
...a,
|
|
22
|
+
"data-unity-component": "FunnelPageAction",
|
|
23
|
+
"data-action-type": t,
|
|
24
|
+
children: i
|
|
25
|
+
}));
|
|
26
|
+
i.displayName = "FunnelPageAction";
|
|
31
27
|
//#endregion
|
|
32
|
-
export {
|
|
28
|
+
export { i as FunnelPageAction };
|
|
@@ -1,30 +1,18 @@
|
|
|
1
1
|
import { VariantProps } from '@payfit/unity-themes';
|
|
2
2
|
import { PropsWithChildren } from 'react';
|
|
3
3
|
export declare const funnelSidebar: import('tailwind-variants').TVReturnType<{
|
|
4
|
-
isSticky: {
|
|
5
|
-
true: "uy:sticky uy:top-8 uy:md:top-10 uy:z-9";
|
|
6
|
-
false: "uy:static";
|
|
7
|
-
};
|
|
8
4
|
position: {
|
|
9
5
|
sticky: string[];
|
|
10
6
|
static: string[];
|
|
11
7
|
fixed: string[];
|
|
12
8
|
};
|
|
13
9
|
}, undefined, string[], {
|
|
14
|
-
isSticky: {
|
|
15
|
-
true: "uy:sticky uy:top-8 uy:md:top-10 uy:z-9";
|
|
16
|
-
false: "uy:static";
|
|
17
|
-
};
|
|
18
10
|
position: {
|
|
19
11
|
sticky: string[];
|
|
20
12
|
static: string[];
|
|
21
13
|
fixed: string[];
|
|
22
14
|
};
|
|
23
15
|
}, undefined, import('tailwind-variants').TVReturnTypeLike<{
|
|
24
|
-
isSticky: {
|
|
25
|
-
true: "uy:sticky uy:top-8 uy:md:top-10 uy:z-9";
|
|
26
|
-
false: "uy:static";
|
|
27
|
-
};
|
|
28
16
|
position: {
|
|
29
17
|
sticky: string[];
|
|
30
18
|
static: string[];
|
|
@@ -32,11 +20,6 @@ export declare const funnelSidebar: import('tailwind-variants').TVReturnType<{
|
|
|
32
20
|
};
|
|
33
21
|
}, undefined>>;
|
|
34
22
|
export interface FunnelSidebarProps extends PropsWithChildren<VariantProps<typeof funnelSidebar>> {
|
|
35
|
-
/**
|
|
36
|
-
* Whether the sidebar is sticky or not
|
|
37
|
-
* `@deprecated` use position="sticky" instead
|
|
38
|
-
*/
|
|
39
|
-
isSticky?: VariantProps<typeof funnelSidebar>['isSticky'];
|
|
40
23
|
/**
|
|
41
24
|
* The sidebar's positioning scheme. It can be one of three values:
|
|
42
25
|
* - `static`: the sidebar does not scroll horizontally with the content
|
|
@@ -10,35 +10,26 @@ var a = n({
|
|
|
10
10
|
"uy:sticky uy:top-8 uy:z-9",
|
|
11
11
|
"uy:md:basis-1/3 uy:lg:basis-1/4 uy:md:shrink-0"
|
|
12
12
|
],
|
|
13
|
-
variants: {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
fixed: ["uy:md:sticky uy:md:top-[var(--uy-funnel-sidebar-offset)]"]
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
defaultVariants: {
|
|
25
|
-
isSticky: !0,
|
|
26
|
-
position: "sticky"
|
|
27
|
-
}
|
|
28
|
-
}), o = t(({ children: t, isSticky: n, position: o, "aria-label": s, ...c }, l) => {
|
|
29
|
-
let u = n === void 0 ? o : n ? "sticky" : "static", { ids: d } = e(), f = i();
|
|
13
|
+
variants: { position: {
|
|
14
|
+
sticky: ["uy:md:sticky uy:md:top-10"],
|
|
15
|
+
static: ["uy:md:static"],
|
|
16
|
+
fixed: ["uy:md:sticky uy:md:top-[var(--uy-funnel-sidebar-offset)]"]
|
|
17
|
+
} },
|
|
18
|
+
defaultVariants: { position: "sticky" }
|
|
19
|
+
}), o = t(({ children: t, position: n, "aria-label": o, ...s }, c) => {
|
|
20
|
+
let { ids: l } = e(), u = i();
|
|
30
21
|
return /* @__PURE__ */ r("aside", {
|
|
31
|
-
ref:
|
|
32
|
-
"aria-label":
|
|
22
|
+
ref: c,
|
|
23
|
+
"aria-label": o ?? u.formatMessage({
|
|
33
24
|
id: "unity:layout:funnel:sidebar:aria-label",
|
|
34
25
|
defaultMessage: "Process steps"
|
|
35
26
|
}),
|
|
36
|
-
"aria-describedby":
|
|
37
|
-
className: a({ position:
|
|
38
|
-
id:
|
|
27
|
+
"aria-describedby": l.funnelTitleId,
|
|
28
|
+
className: a({ position: n }),
|
|
29
|
+
id: l.asideId,
|
|
39
30
|
"data-unity-component": "FunnelSidebar",
|
|
40
31
|
"data-dd-privacy": "allow",
|
|
41
|
-
...
|
|
32
|
+
...s,
|
|
42
33
|
children: t
|
|
43
34
|
});
|
|
44
35
|
});
|
|
@@ -58,31 +58,6 @@ export interface FunnelTopBarProps extends VariantProps<typeof funnelTopBar> {
|
|
|
58
58
|
* ```
|
|
59
59
|
*/
|
|
60
60
|
leading?: React.ReactNode;
|
|
61
|
-
/**
|
|
62
|
-
* Label for the back button.
|
|
63
|
-
* @deprecated Use `leading` with <FunnelBackButton> instead. Will be removed in v2.0.
|
|
64
|
-
* @example
|
|
65
|
-
* ```tsx
|
|
66
|
-
* // Old way (deprecated)
|
|
67
|
-
* <FunnelTopBar
|
|
68
|
-
* backButtonLabel="Back"
|
|
69
|
-
* onBackButtonPress={handleBack}
|
|
70
|
-
* title="My Funnel"
|
|
71
|
-
* />
|
|
72
|
-
*
|
|
73
|
-
* // New way (recommended)
|
|
74
|
-
* <FunnelTopBar
|
|
75
|
-
* leading={<FunnelBackButton label="Back" onPress={handleBack} />}
|
|
76
|
-
* title="My Funnel"
|
|
77
|
-
* />
|
|
78
|
-
* ```
|
|
79
|
-
*/
|
|
80
|
-
backButtonLabel?: string;
|
|
81
|
-
/**
|
|
82
|
-
* Callback function to be called when the back button is pressed.
|
|
83
|
-
* @deprecated Use `leading` with <FunnelBackButton> instead. Will be removed in v2.0.
|
|
84
|
-
*/
|
|
85
|
-
onBackButtonPress?: () => void;
|
|
86
61
|
/** Optional actions slot to display in the top bar */
|
|
87
62
|
actions?: React.ReactNode;
|
|
88
63
|
/** Optional flag to show or hide the progress indicator. Defaults to false */
|
|
@@ -107,8 +82,7 @@ export interface FunnelTopBarProps extends VariantProps<typeof funnelTopBar> {
|
|
|
107
82
|
* return (
|
|
108
83
|
* <FunnelTopBar
|
|
109
84
|
* title="Setup Process"
|
|
110
|
-
*
|
|
111
|
-
* onBackButtonPress={handleBack}
|
|
85
|
+
* leading={<FunnelBackButton label="Back" onPress={handleBack} />}
|
|
112
86
|
* showProgress={true}
|
|
113
87
|
* progressValue={75}
|
|
114
88
|
* progressAnnouncement="2 out of 3 tasks completed"
|
|
@@ -1,88 +1,78 @@
|
|
|
1
1
|
import { useFunnelLayoutContext as e } from "../FunnelLayout.context.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { useIntl as c } from "react-intl";
|
|
2
|
+
import { FunnelProgressBar as t } from "./FunnelProgressBar.js";
|
|
3
|
+
import { forwardRef as n, useMemo as r } from "react";
|
|
4
|
+
import { uyTv as i } from "@payfit/unity-themes";
|
|
5
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
6
|
+
import { useIntl as s } from "react-intl";
|
|
8
7
|
//#region src/components/funnel-layout/parts/FunnelTopBar.tsx
|
|
9
|
-
var
|
|
8
|
+
var c = i({ slots: {
|
|
10
9
|
base: ["uy:bg-surface-neutral uy:shadow-raising uy:min-h-800"],
|
|
11
10
|
titleWrapper: ["uy:px-200 uy:py-150 uy:md:px-500 uy:min-h-[calc(var(--uy-spacing-800)-4px)]", "uy:flex uy:justify-between uy:items-center"],
|
|
12
11
|
title: ["uy:text-content-neutral uy:typography-body-strong uy:sm:typography-h4 uy:flex-1 uy:sm:flex-auto uy:text-center uy:col-2"]
|
|
13
|
-
} }),
|
|
14
|
-
let
|
|
15
|
-
|
|
16
|
-
onPress: f
|
|
17
|
-
})) : null : d, [
|
|
18
|
-
d,
|
|
19
|
-
a,
|
|
20
|
-
f
|
|
21
|
-
]);
|
|
22
|
-
process.env.NODE_ENV === "development" && d !== void 0 && (a || f) && console.warn("FunnelTopBar: Both leading and deprecated props (backButtonLabel/onBackButtonPress) provided. leading takes precedence.");
|
|
23
|
-
let T = i(() => ({
|
|
24
|
-
navigationDescription: y.formatMessage({
|
|
12
|
+
} }), l = n(({ actions: n, currentTaskDescription: i, leading: l, progressAnnouncement: u, progressValue: d, showProgress: f = !0, title: p, ...m }, h) => {
|
|
13
|
+
let g = s(), { ids: _ } = e(), { base: v, titleWrapper: y, title: b } = c(), x = r(() => ({
|
|
14
|
+
navigationDescription: g.formatMessage({
|
|
25
15
|
id: "unity:layout:funnel:top-bar:navigation-desc",
|
|
26
16
|
defaultMessage: "Process navigation"
|
|
27
17
|
}),
|
|
28
|
-
progressAnnouncement:
|
|
18
|
+
progressAnnouncement: u ?? g.formatMessage({
|
|
29
19
|
id: "unity:layout:funnel:top-bar:progress-announcement",
|
|
30
|
-
defaultMessage:
|
|
31
|
-
}, { progress:
|
|
20
|
+
defaultMessage: d === void 0 ? "Progress status unavailable" : `Process is ${d}% complete`
|
|
21
|
+
}, { progress: d })
|
|
32
22
|
}), [
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
23
|
+
g,
|
|
24
|
+
u,
|
|
25
|
+
d
|
|
36
26
|
]);
|
|
37
|
-
return /* @__PURE__ */
|
|
38
|
-
ref:
|
|
39
|
-
id:
|
|
40
|
-
className:
|
|
27
|
+
return /* @__PURE__ */ o("header", {
|
|
28
|
+
ref: h,
|
|
29
|
+
id: _.topbarId,
|
|
30
|
+
className: v(),
|
|
41
31
|
role: "banner",
|
|
42
|
-
"aria-labelledby":
|
|
43
|
-
"aria-describedby":
|
|
32
|
+
"aria-labelledby": _.funnelTitleId,
|
|
33
|
+
"aria-describedby": _.funnelStatusId,
|
|
44
34
|
"data-dd-privacy": "allow",
|
|
45
|
-
...
|
|
35
|
+
...m,
|
|
46
36
|
children: [
|
|
47
|
-
/* @__PURE__ */
|
|
48
|
-
className:
|
|
49
|
-
"aria-label":
|
|
37
|
+
/* @__PURE__ */ o("nav", {
|
|
38
|
+
className: y(),
|
|
39
|
+
"aria-label": x.navigationDescription,
|
|
50
40
|
children: [
|
|
51
|
-
/* @__PURE__ */
|
|
41
|
+
/* @__PURE__ */ a("div", {
|
|
52
42
|
className: "uy:grow-0 uy:basis-[100px]",
|
|
53
|
-
children:
|
|
43
|
+
children: l
|
|
54
44
|
}),
|
|
55
|
-
/* @__PURE__ */
|
|
56
|
-
className:
|
|
57
|
-
id:
|
|
58
|
-
children: [
|
|
45
|
+
/* @__PURE__ */ o("h1", {
|
|
46
|
+
className: b(),
|
|
47
|
+
id: _.funnelTitleId,
|
|
48
|
+
children: [p, i && /* @__PURE__ */ a("span", {
|
|
59
49
|
className: "uy:sr-only",
|
|
60
|
-
children:
|
|
50
|
+
children: i
|
|
61
51
|
})]
|
|
62
52
|
}),
|
|
63
|
-
/* @__PURE__ */
|
|
53
|
+
/* @__PURE__ */ a("div", {
|
|
64
54
|
className: "uy:grow-0 uy:basis-[100px]",
|
|
65
|
-
"aria-hidden": !
|
|
66
|
-
role:
|
|
67
|
-
children:
|
|
55
|
+
"aria-hidden": !n,
|
|
56
|
+
role: n ? "group" : "presentation",
|
|
57
|
+
children: n
|
|
68
58
|
})
|
|
69
59
|
]
|
|
70
60
|
}),
|
|
71
|
-
|
|
61
|
+
f && /* @__PURE__ */ a("div", {
|
|
72
62
|
"aria-hidden": "true",
|
|
73
|
-
children: /* @__PURE__ */
|
|
63
|
+
children: /* @__PURE__ */ a(t, { value: d ?? 0 })
|
|
74
64
|
}),
|
|
75
|
-
/* @__PURE__ */
|
|
76
|
-
id:
|
|
65
|
+
/* @__PURE__ */ a("div", {
|
|
66
|
+
id: _.funnelStatusId,
|
|
77
67
|
role: "status",
|
|
78
68
|
"aria-live": "polite",
|
|
79
69
|
"aria-atomic": "true",
|
|
80
70
|
className: "uy:sr-only",
|
|
81
|
-
children:
|
|
71
|
+
children: x.progressAnnouncement
|
|
82
72
|
})
|
|
83
73
|
]
|
|
84
74
|
});
|
|
85
75
|
});
|
|
86
|
-
|
|
76
|
+
l.displayName = "FunnelTopBar";
|
|
87
77
|
//#endregion
|
|
88
|
-
export {
|
|
78
|
+
export { l as FunnelTopBar, c as funnelTopBar };
|
|
@@ -51,5 +51,5 @@ type IconButtonVisualProps = Omit<IconButtonUnionProps, 'style'>;
|
|
|
51
51
|
export type IconButtonButtonProps = IconButtonVisualProps & IconButtonButtonElementProps;
|
|
52
52
|
export type IconButtonLinkProps = IconButtonVisualProps & IconButtonLinkElementProps;
|
|
53
53
|
export type IconButtonProps = IconButtonButtonProps | IconButtonLinkProps;
|
|
54
|
-
export declare const IconButton: import('react').ForwardRefExoticComponent<IconButtonProps & import('react').RefAttributes<
|
|
54
|
+
export declare const IconButton: import('react').ForwardRefExoticComponent<IconButtonProps & import('react').RefAttributes<HTMLButtonElement | HTMLAnchorElement>>;
|
|
55
55
|
export {};
|
|
@@ -4,97 +4,91 @@ import { Spinner as n } from "../spinner/Spinner.js";
|
|
|
4
4
|
import { Tooltip as r } from "../tooltip/Tooltip.js";
|
|
5
5
|
import { iconButtonFilled as i, iconButtonGhost as a, iconButtonOutlined as o } from "./IconButton.variants.js";
|
|
6
6
|
import { forwardRef as s, useMemo as c } from "react";
|
|
7
|
-
import { cn as l,
|
|
8
|
-
import { Fragment as
|
|
9
|
-
import { Button as
|
|
10
|
-
import { Link as
|
|
7
|
+
import { cn as l, uyMerge as u } from "@payfit/unity-themes";
|
|
8
|
+
import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
9
|
+
import { Button as m } from "react-aria-components/Button";
|
|
10
|
+
import { Link as h } from "react-aria-components/Link";
|
|
11
11
|
//#region src/components/icon-button/IconButton.tsx
|
|
12
|
-
var
|
|
13
|
-
let
|
|
12
|
+
var g = s(({ as: s = "button", variant: g, color: _ = "primary", icon: v, iconRole: y, label: b, isDisabled: x = !1, isLoading: S = !1, onClick: C, onPress: w, className: T, ...E }, D) => {
|
|
13
|
+
let O = `icon-button-label-${t()}`, k = x || S, A = c(() => {
|
|
14
14
|
let e = {
|
|
15
|
-
isDisabled:
|
|
16
|
-
isLoading:
|
|
15
|
+
isDisabled: x,
|
|
16
|
+
isLoading: S
|
|
17
17
|
};
|
|
18
|
-
switch (
|
|
19
|
-
case "primary": return
|
|
18
|
+
switch (g) {
|
|
19
|
+
case "primary": return u(i({
|
|
20
20
|
...e,
|
|
21
|
-
color:
|
|
21
|
+
color: _
|
|
22
22
|
}));
|
|
23
|
-
case "secondary":
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
return d(i({
|
|
27
|
-
...e,
|
|
28
|
-
color: t
|
|
29
|
-
}));
|
|
30
|
-
}
|
|
31
|
-
return d(o({
|
|
23
|
+
case "secondary": {
|
|
24
|
+
let t = _ === "inverted" ? "inverted.low" : "neutral";
|
|
25
|
+
return u(i({
|
|
32
26
|
...e,
|
|
33
|
-
color:
|
|
27
|
+
color: t
|
|
34
28
|
}));
|
|
35
|
-
|
|
29
|
+
}
|
|
30
|
+
case "ghost": return u(a({
|
|
36
31
|
...e,
|
|
37
|
-
color:
|
|
32
|
+
color: _
|
|
38
33
|
}));
|
|
39
|
-
case "outlined": return
|
|
34
|
+
case "outlined": return u(o({
|
|
40
35
|
...e,
|
|
41
|
-
color:
|
|
36
|
+
color: _
|
|
42
37
|
}));
|
|
43
38
|
}
|
|
44
39
|
}, [
|
|
40
|
+
g,
|
|
45
41
|
_,
|
|
46
|
-
|
|
47
|
-
S
|
|
48
|
-
|
|
49
|
-
A
|
|
50
|
-
]), P = { ...C && { "data-loading": C } }, F = /* @__PURE__ */ m(f, { children: [C ? /* @__PURE__ */ p(n, {
|
|
42
|
+
x,
|
|
43
|
+
S
|
|
44
|
+
]), j = { ...S && { "data-loading": S } }, M = /* @__PURE__ */ p(d, { children: [S ? /* @__PURE__ */ f(n, {
|
|
51
45
|
size: "small",
|
|
52
46
|
label: "Loading",
|
|
53
47
|
color: "inherit"
|
|
54
|
-
}) : /* @__PURE__ */
|
|
55
|
-
role:
|
|
56
|
-
src:
|
|
48
|
+
}) : /* @__PURE__ */ f(e, {
|
|
49
|
+
role: y,
|
|
50
|
+
src: v,
|
|
57
51
|
size: 20,
|
|
58
52
|
color: "inherit",
|
|
59
|
-
"aria-labelledby":
|
|
60
|
-
}), /* @__PURE__ */
|
|
61
|
-
id:
|
|
53
|
+
"aria-labelledby": O
|
|
54
|
+
}), /* @__PURE__ */ f("span", {
|
|
55
|
+
id: O,
|
|
62
56
|
className: "uy:sr-only",
|
|
63
|
-
children:
|
|
57
|
+
children: b
|
|
64
58
|
})] });
|
|
65
|
-
return s === "link" ? /* @__PURE__ */
|
|
66
|
-
title:
|
|
67
|
-
children: /* @__PURE__ */
|
|
68
|
-
ref:
|
|
59
|
+
return s === "link" ? /* @__PURE__ */ f(r, {
|
|
60
|
+
title: b,
|
|
61
|
+
children: /* @__PURE__ */ f(h, {
|
|
62
|
+
ref: D,
|
|
69
63
|
"data-dd-privacy": "allow",
|
|
70
|
-
...
|
|
71
|
-
...
|
|
72
|
-
className: l(
|
|
73
|
-
onPress:
|
|
74
|
-
isDisabled:
|
|
75
|
-
"aria-label":
|
|
76
|
-
"aria-disabled":
|
|
77
|
-
"aria-busy":
|
|
78
|
-
...
|
|
79
|
-
children:
|
|
64
|
+
...E,
|
|
65
|
+
...C && { onClick: C },
|
|
66
|
+
className: l(A, T),
|
|
67
|
+
onPress: w,
|
|
68
|
+
isDisabled: k,
|
|
69
|
+
"aria-label": b,
|
|
70
|
+
"aria-disabled": k ? !0 : void 0,
|
|
71
|
+
"aria-busy": S || void 0,
|
|
72
|
+
...j,
|
|
73
|
+
children: M
|
|
80
74
|
})
|
|
81
|
-
}) : /* @__PURE__ */
|
|
82
|
-
title:
|
|
83
|
-
children: /* @__PURE__ */
|
|
84
|
-
ref:
|
|
75
|
+
}) : /* @__PURE__ */ f(r, {
|
|
76
|
+
title: b,
|
|
77
|
+
children: /* @__PURE__ */ f(m, {
|
|
78
|
+
ref: D,
|
|
85
79
|
"data-dd-privacy": "allow",
|
|
86
|
-
...
|
|
87
|
-
className: l(
|
|
88
|
-
onPress:
|
|
89
|
-
isDisabled:
|
|
90
|
-
isPending:
|
|
91
|
-
"aria-label":
|
|
92
|
-
"aria-disabled":
|
|
93
|
-
...
|
|
94
|
-
children:
|
|
80
|
+
...E,
|
|
81
|
+
className: l(A, T),
|
|
82
|
+
onPress: w ?? C,
|
|
83
|
+
isDisabled: k,
|
|
84
|
+
isPending: S,
|
|
85
|
+
"aria-label": b,
|
|
86
|
+
"aria-disabled": k ? !0 : void 0,
|
|
87
|
+
...j,
|
|
88
|
+
children: M
|
|
95
89
|
})
|
|
96
90
|
});
|
|
97
91
|
});
|
|
98
|
-
|
|
92
|
+
g.displayName = "IconButton";
|
|
99
93
|
//#endregion
|
|
100
|
-
export {
|
|
94
|
+
export { g as IconButton };
|
|
@@ -28,10 +28,10 @@ var t = e({
|
|
|
28
28
|
variants: {
|
|
29
29
|
color: {
|
|
30
30
|
primary: [
|
|
31
|
-
"uy:
|
|
32
|
-
"
|
|
33
|
-
"uy:
|
|
34
|
-
"
|
|
31
|
+
"uy:bg-surface-neutral-highest-enabled uy:text-content-inverted-enabled",
|
|
32
|
+
" uy:not-data-[disabled]:data-[hovered=\"true\"]:bg-surface-neutral-highest-hover uy:not-data-[disabled]:data-[hovered=\"true\"]:text-content-inverted-hover",
|
|
33
|
+
"uy:not-data-[disabled]:active:bg-surface-neutral-highest-active uy:not-data-[disabled]:active:text-content-inverted-hover",
|
|
34
|
+
" uy:not-data-[disabled]:data-[pressed=\"true\"]:bg-surface-neutral-highest-pressed uy:not-data-[disabled]:data-[pressed=\"true\"]:text-content-inverted-pressed"
|
|
35
35
|
],
|
|
36
36
|
warning: [
|
|
37
37
|
"uy:bg-surface-warning-enabled uy:text-content-neutral-enabled",
|
|
@@ -40,10 +40,10 @@ var t = e({
|
|
|
40
40
|
"uy:not-data-[disabled]:data-[pressed=\"true\"]:bg-surface-warning-pressed uy:not-data-[disabled]:data-[pressed=\"true\"]:text-content-neutral-pressed"
|
|
41
41
|
],
|
|
42
42
|
danger: [
|
|
43
|
-
"uy:bg-surface-danger-enabled
|
|
44
|
-
"uy:not-data-[disabled]:data-[hovered=\"true\"]:bg-surface-danger-hover
|
|
45
|
-
"uy:not-data-[disabled]:active:bg-surface-danger-active
|
|
46
|
-
"uy:not-data-[disabled]:data-[pressed=\"true\"]:bg-surface-danger-pressed
|
|
43
|
+
"uy:bg-surface-danger-enabled uy:text-content-inverted",
|
|
44
|
+
"uy:not-data-[disabled]:data-[hovered=\"true\"]:bg-surface-danger-hover",
|
|
45
|
+
"uy:not-data-[disabled]:active:bg-surface-danger-active ",
|
|
46
|
+
"uy:not-data-[disabled]:data-[pressed=\"true\"]:bg-surface-danger-pressed"
|
|
47
47
|
],
|
|
48
48
|
neutral: [
|
|
49
49
|
"uy:bg-surface-neutral-low-enabled uy:text-content-neutral-enabled",
|
|
@@ -83,14 +83,12 @@ var t = e({
|
|
|
83
83
|
primary: [
|
|
84
84
|
"uy:text-content-neutral-enabled uy:border-border-neutral-high-enabled",
|
|
85
85
|
"uy:not-data-[disabled]:data-[hovered=\"true\"]:text-content-neutral-hover uy:not-data-[disabled]:data-[hovered=\"true\"]:border-border-neutral-high-hover",
|
|
86
|
-
"uy:
|
|
87
|
-
"uy:theme-rebrand:not-data-[disabled]:data-[pressed=\"true\"]:text-content-neutral-pressed uy:theme-rebrand:not-data-[disabled]:data-[pressed=\"true\"]:bg-surface-neutral-low-pressed uy:theme-rebrand:not-data-[disabled]:data-[pressed=\"true\"]:border-surface-neutral-low-pressed",
|
|
86
|
+
"uy:not-data-[disabled]:data-[pressed=\"true\"]:text-content-neutral-pressed uy:not-data-[disabled]:data-[pressed=\"true\"]:bg-surface-neutral-low-pressed uy:not-data-[disabled]:data-[pressed=\"true\"]:border-surface-neutral-low-pressed",
|
|
88
87
|
"uy:not-data-[disabled]:data-[focus-visible=\"true\"]:border-border-neutral-high-focus uy:not-data-[disabled]:data-[focus-visible=\"true\"]:text-content-neutral-focus"
|
|
89
88
|
],
|
|
90
89
|
inverted: [
|
|
91
90
|
"uy:text-content-inverted-enabled uy:border-border-inverted-enabled",
|
|
92
|
-
"uy:
|
|
93
|
-
"uy:theme-rebrand:not-data-[disabled]:data-[pressed=\"true\"]:text-content-neutral-pressed uy:theme-rebrand:not-data-[disabled]:data-[pressed=\"true\"]:bg-surface-neutral-low-pressed uy:theme-rebrand:not-data-[disabled]:data-[pressed=\"true\"]:border-surface-neutral-low-pressed",
|
|
91
|
+
"uy:not-data-[disabled]:data-[pressed=\"true\"]:text-content-neutral-pressed uy:not-data-[disabled]:data-[pressed=\"true\"]:bg-surface-neutral-low-pressed uy:not-data-[disabled]:data-[pressed=\"true\"]:border-surface-neutral-low-pressed",
|
|
94
92
|
"uy:not-data-[disabled]:data-[focus-visible=\"true\"]:outline-utility-inverted-focus-ring"
|
|
95
93
|
]
|
|
96
94
|
},
|
|
@@ -105,11 +103,11 @@ var t = e({
|
|
|
105
103
|
variants: {
|
|
106
104
|
color: {
|
|
107
105
|
primary: [
|
|
108
|
-
"uy:bg-transparent
|
|
109
|
-
"
|
|
110
|
-
"uy:
|
|
111
|
-
"
|
|
112
|
-
"uy:not-data-[disabled]:data-[focus-visible=\"true\"]:bg-transparent uy:
|
|
106
|
+
"uy:bg-transparent uy:text-content-neutral-enabled",
|
|
107
|
+
" uy:not-data-[disabled]:data-[hovered=\"true\"]:bg-surface-neutral-low-hover uy:not-data-[disabled]:data-[hovered=\"true\"]:text-content-neutral-low-hover",
|
|
108
|
+
"uy:not-data-[disabled]:active:bg-surface-neutral-low-active uy:not-data-[disabled]:active:text-content-neutral-low-active",
|
|
109
|
+
" uy:not-data-[disabled]:data-[pressed=\"true\"]:bg-surface-neutral-low-pressed uy:not-data-[disabled]:data-[pressed=\"true\"]:text-content-neutral-low-pressed",
|
|
110
|
+
"uy:not-data-[disabled]:data-[focus-visible=\"true\"]:bg-transparent uy:not-data-[disabled]:data-[focus-visible=\"true\"]:text-content-neutral-low-focus"
|
|
113
111
|
],
|
|
114
112
|
warning: [
|
|
115
113
|
"uy:bg-transparent uy:text-content-warning-enabled",
|
|
@@ -216,7 +216,7 @@ export type RawLinkProps = Omit<AriaLinkProps, 'style' | 'className'> & {
|
|
|
216
216
|
* - Links support mouse and touch interactions, keyboard navigation, and activation with Enter or Space.
|
|
217
217
|
* - Use a link when an action navigates or changes the URL. Use a button for actions without a meaningful destination.
|
|
218
218
|
*/
|
|
219
|
-
declare const RawLink: import('react').ForwardRefExoticComponent<Omit<AriaLinkProps, "
|
|
219
|
+
declare const RawLink: import('react').ForwardRefExoticComponent<Omit<AriaLinkProps, "className" | "style"> & {
|
|
220
220
|
/**
|
|
221
221
|
* The URL the link navigates to.
|
|
222
222
|
*/
|
|
@@ -33,8 +33,8 @@ var c = r({
|
|
|
33
33
|
inherit: { base: "uy:text-inherit" }
|
|
34
34
|
},
|
|
35
35
|
color: {
|
|
36
|
-
primary: { base: ["uy:text-content-primary-enabled uy:hover:text-content-primary-hover uy:active:text-content-primary-active uy:data-[pressed]:text-content-primary-active uy:data-[current]:text-content-primary-active uy:aria-[current]:text-content-primary-active", "uy:
|
|
37
|
-
secondary: { base: ["uy:text-content-neutral-enabled uy:hover:text-content-neutral-hover uy:active:text-content-neutral-active uy:data-[pressed]:text-content-neutral-pressed uy:data-[current]:text-content-neutral-active uy:aria-[current]:text-content-neutral-active", "uy:
|
|
36
|
+
primary: { base: ["uy:text-content-primary-enabled uy:hover:text-content-primary-hover uy:active:text-content-primary-active uy:data-[pressed]:text-content-primary-active uy:data-[current]:text-content-primary-active uy:aria-[current]:text-content-primary-active", "uy:text-content-neutral-enabled uy:hover:text-content-neutral-hover uy:active:text-content-neutral-active uy:data-[pressed]:text-content-neutral-pressed uy:data-[current]:text-content-neutral-active uy:aria-[current]:text-content-neutral-active"] },
|
|
37
|
+
secondary: { base: ["uy:text-content-neutral-enabled uy:hover:text-content-neutral-hover uy:active:text-content-neutral-active uy:data-[pressed]:text-content-neutral-pressed uy:data-[current]:text-content-neutral-active uy:aria-[current]:text-content-neutral-active", "uy:text-content-neutral-lowest-enabled uy:hover:text-content-neutral-lowest-hover uy:active:text-content-neutral-lowest-active uy:data-[pressed]:text-content-neutral-lowest-pressed uy:data-[current]:text-content-neutral-lowest-active uy:aria-[current]:text-content-neutral-lowest-active"] },
|
|
38
38
|
inherit: { base: "uy:text-(color:inherit)" }
|
|
39
39
|
},
|
|
40
40
|
isDisabled: {
|
|
@@ -50,7 +50,7 @@ var c = r({
|
|
|
50
50
|
{
|
|
51
51
|
color: "primary",
|
|
52
52
|
isDisabled: !0,
|
|
53
|
-
class: { base: ["uy:data-[disabled]:text-content-primary-disabled", "uy:
|
|
53
|
+
class: { base: ["uy:data-[disabled]:text-content-primary-disabled", "uy:data-[disabled]:text-content-neutral-disabled"] }
|
|
54
54
|
},
|
|
55
55
|
{
|
|
56
56
|
color: "secondary",
|