@payfit/unity-components 2.19.3 → 2.20.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/action-bar/ActionBar.d.ts +61 -120
- package/dist/esm/components/action-bar/ActionBar.js +48 -151
- package/dist/esm/components/action-bar/ActionBar.types.d.ts +116 -0
- package/dist/esm/components/action-bar/ActionBar.variants.d.ts +31 -0
- package/dist/esm/components/action-bar/ActionBar.variants.js +26 -0
- package/dist/esm/components/action-bar/hooks/use-action-bar-state.d.ts +19 -0
- package/dist/esm/components/action-bar/hooks/use-action-bar-state.js +22 -0
- package/dist/esm/components/action-bar/parts/ActionBarButton.d.ts +58 -0
- package/dist/esm/components/action-bar/parts/ActionBarButton.js +35 -0
- package/dist/esm/components/action-bar/parts/ActionBarIconButton.d.ts +61 -0
- package/dist/esm/components/action-bar/parts/ActionBarIconButton.js +41 -0
- package/dist/esm/components/action-bar/parts/ActionBarOverflowMenu.d.ts +10 -0
- package/dist/esm/components/action-bar/parts/ActionBarOverflowMenu.js +45 -0
- package/dist/esm/components/action-bar/parts/ActionBarPrefixArea.d.ts +11 -0
- package/dist/esm/components/action-bar/parts/ActionBarPrefixArea.js +35 -0
- package/dist/esm/components/action-bar/parts/ActionBarRoot.d.ts +23 -0
- package/dist/esm/components/action-bar/parts/ActionBarRoot.js +23 -13
- package/dist/esm/components/action-bar/utils/action-bar-helpers.d.ts +14 -0
- package/dist/esm/components/action-bar/utils/action-bar-helpers.js +29 -0
- package/dist/esm/components/data-table/parts/DataTableBulkActions.d.ts +16 -6
- package/dist/esm/components/data-table/parts/DataTableBulkActions.js +122 -37
- package/dist/esm/components/icon-button/IconButton.d.ts +4 -0
- package/dist/esm/components/icon-button/IconButton.js +40 -31
- package/dist/esm/components/menu/parts/RawMenuItem.d.ts +2 -1
- package/dist/esm/components/menu/parts/RawMenuItem.js +14 -12
- package/dist/esm/index.d.ts +2 -1
- package/dist/esm/index.js +545 -543
- package/i18n/en-GB.json +2 -0
- package/i18n/es-ES.json +2 -0
- package/i18n/fr-FR.json +2 -0
- package/package.json +17 -17
- package/dist/esm/components/action-bar/parts/ActionBarAction.d.ts +0 -44
- package/dist/esm/components/action-bar/parts/ActionBarAction.js +0 -45
package/i18n/en-GB.json
CHANGED
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
"unity:component:common:next": "Next",
|
|
9
9
|
"unity:component:common:customer-support:url": "https://support.payfit.com/en/inbox/",
|
|
10
10
|
"unity:component:common:scrollable-content:label": "Scrollable content",
|
|
11
|
+
"unity:component:action-bar:actions:label": "Available Actions",
|
|
12
|
+
"unity:component:action-bar:actions:more-actions": "More Actions",
|
|
11
13
|
"unity:component:action-bar:toolbar-label": "Bulk actions toolbar",
|
|
12
14
|
"unity:component:action-bar:selection-count-text": "{selectionCount, plural, =0 {no items} one {{selectionCount} item} other {{selectionCount} items}} selected",
|
|
13
15
|
"unity:component:action-bar:key-shortcuts-text": "Use {keyShortcuts} to focus the action bar",
|
package/i18n/es-ES.json
CHANGED
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
"unity:component:common:next": "Siguiente",
|
|
9
9
|
"unity:component:common:customer-support:url": "https://support.payfit.com/es/inbox/",
|
|
10
10
|
"unity:component:common:scrollable-content:label": "Contenido desplazable",
|
|
11
|
+
"unity:component:action-bar:actions:label": "Acciones Disponibles",
|
|
12
|
+
"unity:component:action-bar:actions:more-actions": "Acciones adicionales",
|
|
11
13
|
"unity:component:action-bar:toolbar-label": "Barra de acciones en lote",
|
|
12
14
|
"unity:component:action-bar:selection-count-text": "{selectionCount, plural, =0 {ningún elemento seleccionado} one {{selectionCount} elemento seleccionado} other {{selectionCount} elementos seleccionados}}",
|
|
13
15
|
"unity:component:action-bar:key-shortcuts-text": "Use {keyShortcuts} para enfocar la barra de acciones",
|
package/i18n/fr-FR.json
CHANGED
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
"unity:component:common:next": "Suivant",
|
|
9
9
|
"unity:component:common:customer-support:url": "https://support.payfit.com/fr/inbox/",
|
|
10
10
|
"unity:component:common:scrollable-content:label": "Contenu défilable",
|
|
11
|
+
"unity:component:action-bar:actions:label": "Actions disponibles",
|
|
12
|
+
"unity:component:action-bar:actions:more-actions": "actions supplémentaires",
|
|
11
13
|
"unity:component:action-bar:toolbar-label": "barre d'outils d'actions groupées",
|
|
12
14
|
"unity:component:action-bar:selection-count-text": "{selectionCount, plural, =0 {aucun élément sélectionné} one {{selectionCount} élément sélectionné} other {{selectionCount} éléments sélectionnés}}",
|
|
13
15
|
"unity:component:action-bar:key-shortcuts-text": "Appuyez sur {keyShortcuts} pour accéder à la barre d'actions",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@payfit/unity-components",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.20.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.0",
|
|
45
|
-
"@payfit/unity-illustrations": "2.
|
|
45
|
+
"@payfit/unity-illustrations": "2.20.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.27.1",
|
|
@@ -67,16 +67,16 @@
|
|
|
67
67
|
"react-international-phone": "4.5.0",
|
|
68
68
|
"react-intl": "7.1.14",
|
|
69
69
|
"react-stately": "3.45.0",
|
|
70
|
-
"storybook": "10.2
|
|
70
|
+
"storybook": "10.3.2",
|
|
71
71
|
"tailwind-variants": "3.2.2",
|
|
72
72
|
"usehooks-ts": "3.1.1",
|
|
73
73
|
"zod": "4.3.6"
|
|
74
74
|
},
|
|
75
75
|
"peerDependencies": {
|
|
76
76
|
"@hookform/devtools": "^4",
|
|
77
|
-
"@payfit/unity-icons": "2.
|
|
78
|
-
"@payfit/unity-themes": "2.
|
|
79
|
-
"@storybook/react-vite": "^10.
|
|
77
|
+
"@payfit/unity-icons": "2.20.1",
|
|
78
|
+
"@payfit/unity-themes": "2.20.1",
|
|
79
|
+
"@storybook/react-vite": "^10.3.2",
|
|
80
80
|
"@tanstack/react-query": "^5",
|
|
81
81
|
"@tanstack/react-router": "^1.131",
|
|
82
82
|
"@tanstack/react-router-devtools": "^1.131",
|
|
@@ -95,16 +95,16 @@
|
|
|
95
95
|
"@payfit/hr-apps-tsconfigs": "0.0.0-use.local",
|
|
96
96
|
"@payfit/storybook-addon-console-errors": "0.0.0-use.local",
|
|
97
97
|
"@payfit/storybook-config": "0.0.0-use.local",
|
|
98
|
-
"@payfit/unity-icons": "2.
|
|
99
|
-
"@payfit/unity-illustrations": "2.
|
|
100
|
-
"@payfit/unity-themes": "2.
|
|
98
|
+
"@payfit/unity-icons": "2.20.1",
|
|
99
|
+
"@payfit/unity-illustrations": "2.20.1",
|
|
100
|
+
"@payfit/unity-themes": "2.20.1",
|
|
101
101
|
"@payfit/vite-configs": "0.0.0-use.local",
|
|
102
|
-
"@storybook/addon-a11y": "10.2
|
|
102
|
+
"@storybook/addon-a11y": "10.3.2",
|
|
103
103
|
"@storybook/addon-designs": "11.1.2",
|
|
104
|
-
"@storybook/addon-docs": "10.2
|
|
105
|
-
"@storybook/addon-links": "10.2
|
|
106
|
-
"@storybook/addon-vitest": "10.2
|
|
107
|
-
"@storybook/react-vite": "10.2
|
|
104
|
+
"@storybook/addon-docs": "10.3.2",
|
|
105
|
+
"@storybook/addon-links": "10.3.2",
|
|
106
|
+
"@storybook/addon-vitest": "10.3.2",
|
|
107
|
+
"@storybook/react-vite": "10.3.2",
|
|
108
108
|
"@tanstack/react-devtools": "0.10.0",
|
|
109
109
|
"@tanstack/react-form-devtools": "0.2.19",
|
|
110
110
|
"@tanstack/react-query": "5.90.21",
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
"@types/react-router-dom": "5.3.3",
|
|
118
118
|
"@vitejs/plugin-react": "5.1.0",
|
|
119
119
|
"@vitest/browser": "4.1.0",
|
|
120
|
-
"eslint-plugin-storybook": "10.
|
|
120
|
+
"eslint-plugin-storybook": "10.3.2",
|
|
121
121
|
"glob": "11.0.1",
|
|
122
122
|
"msw": "2.8.4",
|
|
123
123
|
"msw-storybook-addon": "^2.0.6",
|
|
@@ -125,8 +125,8 @@
|
|
|
125
125
|
"prettier": "3.1.0",
|
|
126
126
|
"react-docgen-typescript": "2.2.2",
|
|
127
127
|
"react-hot-toast": "2.5.1",
|
|
128
|
-
"storybook": "10.2
|
|
129
|
-
"storybook-addon-pseudo-states": "10.
|
|
128
|
+
"storybook": "10.3.2",
|
|
129
|
+
"storybook-addon-pseudo-states": "10.3.2",
|
|
130
130
|
"storybook-addon-tag-badges": "3.0.6",
|
|
131
131
|
"storybook-mock-date-decorator": "3.0.0",
|
|
132
132
|
"tailwindcss": "4.1.18",
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { ButtonProps } from '../../button/Button.js';
|
|
2
|
-
export type ActionBarActionProps = Omit<ButtonProps, 'variant' | 'size' | 'color'> & {
|
|
3
|
-
/**
|
|
4
|
-
* The visual variant of the action.
|
|
5
|
-
* @default 'secondary'
|
|
6
|
-
*/
|
|
7
|
-
variant?: 'primary' | 'secondary';
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* The ActionBarAction component represents an individual action within an ActionBar.
|
|
11
|
-
* It renders as a button with appropriate styling for the inverted ActionBar context.
|
|
12
|
-
* @param {ActionBarActionProps} props - Props for the action. Identical to the `Button` component props.
|
|
13
|
-
* @example
|
|
14
|
-
* ```tsx
|
|
15
|
-
* import { ActionBarAction } from '@payfit/unity-components'
|
|
16
|
-
*
|
|
17
|
-
* function Example() {
|
|
18
|
-
* return (
|
|
19
|
-
* <ActionBarAction
|
|
20
|
-
* variant="primary"
|
|
21
|
-
* onPress={() => console.log('Action clicked')}
|
|
22
|
-
* prefixIcon="TrashOutlined"
|
|
23
|
-
* >
|
|
24
|
-
* Delete Items
|
|
25
|
-
* </ActionBarAction>
|
|
26
|
-
* )
|
|
27
|
-
* }
|
|
28
|
-
* ```
|
|
29
|
-
* @remarks
|
|
30
|
-
* - Automatically uses inverted button variants to work on dark ActionBar background
|
|
31
|
-
* - Secondary actions use 'ghost-inverted' button variant
|
|
32
|
-
* - Primary actions use 'inverted-primary' button variant
|
|
33
|
-
* @see {@link ActionBarActionProps} for all available props
|
|
34
|
-
* @see Source code in {@link https://github.com/PayFit/hr-apps/tree/master/libs/shared/unity/components/src/components/action-bar GitHub}
|
|
35
|
-
* @see Design specs {@link https://www.figma.com/design/poaMyU7abAgL9VRhx4ygyy/Unity-DS-%3E-Components-Library Figma}
|
|
36
|
-
*/
|
|
37
|
-
declare const ActionBarAction: import('react').ForwardRefExoticComponent<Omit<ButtonProps, "size" | "color" | "variant"> & {
|
|
38
|
-
/**
|
|
39
|
-
* The visual variant of the action.
|
|
40
|
-
* @default 'secondary'
|
|
41
|
-
*/
|
|
42
|
-
variant?: "primary" | "secondary";
|
|
43
|
-
} & import('react').RefAttributes<HTMLButtonElement>>;
|
|
44
|
-
export { ActionBarAction };
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as e } from "react";
|
|
3
|
-
import { uyTv as d } from "@payfit/unity-themes";
|
|
4
|
-
import { Button as m } from "../../button/Button.js";
|
|
5
|
-
const u = d({
|
|
6
|
-
base: "uy:w-auto",
|
|
7
|
-
variants: {
|
|
8
|
-
variant: {
|
|
9
|
-
primary: "",
|
|
10
|
-
secondary: "uy:hidden uy:md:block"
|
|
11
|
-
}
|
|
12
|
-
},
|
|
13
|
-
defaultVariants: {
|
|
14
|
-
variant: "secondary"
|
|
15
|
-
}
|
|
16
|
-
}), y = e(
|
|
17
|
-
({ variant: r = "secondary", children: o, onPress: n, ...i }, c) => {
|
|
18
|
-
const t = {
|
|
19
|
-
primary: {
|
|
20
|
-
variant: "primary",
|
|
21
|
-
color: "inverted"
|
|
22
|
-
},
|
|
23
|
-
secondary: {
|
|
24
|
-
variant: "ghost",
|
|
25
|
-
color: "inverted"
|
|
26
|
-
}
|
|
27
|
-
}[r], s = u({ variant: r });
|
|
28
|
-
return /* @__PURE__ */ a("div", { className: s, children: /* @__PURE__ */ a(
|
|
29
|
-
m,
|
|
30
|
-
{
|
|
31
|
-
ref: c,
|
|
32
|
-
variant: t.variant,
|
|
33
|
-
color: t.color,
|
|
34
|
-
onPress: n,
|
|
35
|
-
size: "default",
|
|
36
|
-
...i,
|
|
37
|
-
children: o
|
|
38
|
-
}
|
|
39
|
-
) });
|
|
40
|
-
}
|
|
41
|
-
);
|
|
42
|
-
y.displayName = "ActionBarAction";
|
|
43
|
-
export {
|
|
44
|
-
y as ActionBarAction
|
|
45
|
-
};
|