@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
@@ -1,10 +1,9 @@
1
- import { jsxs as o, jsx as e } from "react/jsx-runtime";
2
- import { forwardRef as f } from "react";
3
- import { uyTv as m } from "@payfit/unity-themes";
4
- import { Button as b, SelectValue as p } from "react-aria-components";
1
+ import { jsxs as l, jsx as e } from "react/jsx-runtime";
2
+ import { uyTv as b } from "@payfit/unity-themes";
3
+ import { Button as p, SelectValue as n } from "react-aria-components";
5
4
  import { useIntl as v } from "react-intl";
6
- import { Icon as a } from "../../icon/Icon.js";
7
- const x = m({
5
+ import { Icon as u } from "../../icon/Icon.js";
6
+ const x = b({
8
7
  slots: {
9
8
  base: "uy:flex uy:flex-row uy:gap-100 uy:h-5.5 uy:sm:h-500 uy:py-125 uy:sm:py-100 uy:px-150 uy:rounded-100 uy:sm:rounded-75 uy:border-solid uy:focus-visible:ring-2 uy:focus-visible:ring-utility-focus-ring uy:focus-visible:ring-offset-2 uy:outline-none uy:border",
10
9
  selectValue: [
@@ -52,49 +51,52 @@ const x = m({
52
51
  isInvalid: !1,
53
52
  isReadOnly: !1
54
53
  }
55
- }), h = f(
56
- ({ isDisabled: r, isInvalid: t, isReadOnly: s, isOpen: u }, l) => {
57
- const n = v(), { base: i, selectValue: d, iconWrapper: y, icon: c } = x({
54
+ }), h = ({
55
+ isDisabled: r,
56
+ isInvalid: t,
57
+ isReadOnly: i,
58
+ isOpen: d,
59
+ renderValue: o
60
+ }) => {
61
+ const c = v(), { base: y, selectValue: a, iconWrapper: f, icon: m } = x({
62
+ isDisabled: r,
63
+ isInvalid: t,
64
+ isReadOnly: i
65
+ });
66
+ return /* @__PURE__ */ l(
67
+ p,
68
+ {
69
+ "data-dd-privacy": "mask",
70
+ className: y(),
58
71
  isDisabled: r,
59
- isInvalid: t,
60
- isReadOnly: s
61
- });
62
- return /* @__PURE__ */ o(
63
- b,
64
- {
65
- "data-dd-privacy": "mask",
66
- className: i(),
67
- ref: l,
68
- isDisabled: r,
69
- "data-unity-slot": "select-button",
70
- children: [
71
- /* @__PURE__ */ e(p, { className: d(), translate: "no" }),
72
- /* @__PURE__ */ o("div", { className: y(), children: [
73
- t && /* @__PURE__ */ e(
74
- a,
75
- {
76
- src: "WarningCircleOutlined",
77
- color: "content.form.invalid",
78
- alt: n.formatMessage({
79
- id: "unity:component:form-field:form-input:error:alt",
80
- defaultMessage: "Error"
81
- })
82
- }
83
- ),
84
- /* @__PURE__ */ e(
85
- a,
86
- {
87
- className: c(),
88
- "aria-hidden": "true",
89
- src: u ? "CaretUpOutlined" : "CaretDownOutlined"
90
- }
91
- )
92
- ] })
93
- ]
94
- }
95
- );
96
- }
97
- );
72
+ "data-unity-slot": "select-button",
73
+ children: [
74
+ o ? /* @__PURE__ */ e(n, { className: a(), translate: "no", children: ({ state: s }) => s.selectedItems[0] ? o(s.selectedItems[0]) : null }) : /* @__PURE__ */ e(n, { className: a(), translate: "no" }),
75
+ /* @__PURE__ */ l("div", { className: f(), children: [
76
+ t && /* @__PURE__ */ e(
77
+ u,
78
+ {
79
+ src: "WarningCircleOutlined",
80
+ color: "content.form.invalid",
81
+ alt: c.formatMessage({
82
+ id: "unity:component:form-field:form-input:error:alt",
83
+ defaultMessage: "Error"
84
+ })
85
+ }
86
+ ),
87
+ /* @__PURE__ */ e(
88
+ u,
89
+ {
90
+ className: m(),
91
+ "aria-hidden": "true",
92
+ src: d ? "CaretUpOutlined" : "CaretDownOutlined"
93
+ }
94
+ )
95
+ ] })
96
+ ]
97
+ }
98
+ );
99
+ };
98
100
  h.displayName = "SelectButton";
99
101
  export {
100
102
  h as SelectButton
@@ -1,11 +1,11 @@
1
- import { jsxs as s, jsx as r } from "react/jsx-runtime";
2
- import { forwardRef as d } from "react";
3
- import { TanstackFormFeedbackText as f } from "../form-field/parts/TanstackFormFeedbackText.js";
4
- import { TanstackFormHelperText as k } from "../form-field/parts/TanstackFormHelperText.js";
5
- import { TanstackFormLabel as p } from "../form-field/parts/TanstackFormLabel.js";
6
- import { TanstackFormField as F } from "../form-field/TanstackFormField.js";
7
- import { TanstackSelect as T } from "../select/TanstackSelect.js";
8
- const S = ({
1
+ import { jsxs as d, jsx as r } from "react/jsx-runtime";
2
+ import { forwardRef as f } from "react";
3
+ import { TanstackFormFeedbackText as k } from "../form-field/parts/TanstackFormFeedbackText.js";
4
+ import { TanstackFormHelperText as p } from "../form-field/parts/TanstackFormHelperText.js";
5
+ import { TanstackFormLabel as F } from "../form-field/parts/TanstackFormLabel.js";
6
+ import { TanstackFormField as T } from "../form-field/TanstackFormField.js";
7
+ import { TanstackSelect as S } from "../select/TanstackSelect.js";
8
+ const x = ({
9
9
  label: a,
10
10
  helperText: t,
11
11
  contextualLink: e,
@@ -13,32 +13,34 @@ const S = ({
13
13
  isDisabled: c,
14
14
  isReadOnly: m,
15
15
  requiredVariant: n,
16
- ...i
17
- }, l) => /* @__PURE__ */ s(F, { children: [
16
+ renderValue: i,
17
+ ...l
18
+ }, s) => /* @__PURE__ */ d(T, { children: [
18
19
  /* @__PURE__ */ r(
19
- p,
20
+ F,
20
21
  {
21
22
  requiredVariant: n,
22
23
  isRequired: o,
23
24
  children: a
24
25
  }
25
26
  ),
26
- t && /* @__PURE__ */ r(k, { children: t }),
27
+ t && /* @__PURE__ */ r(p, { children: t }),
27
28
  /* @__PURE__ */ r(
28
- T,
29
+ S,
29
30
  {
30
- ref: l,
31
+ ref: s,
31
32
  isDisabled: c,
32
33
  isReadOnly: m,
33
- ...i
34
+ renderValue: i,
35
+ ...l
34
36
  }
35
37
  ),
36
- /* @__PURE__ */ r(f, {}),
38
+ /* @__PURE__ */ r(k, {}),
37
39
  e
38
- ] }), x = d(function(t, e) {
39
- return S(t, e);
40
+ ] }), u = f(function(t, e) {
41
+ return x(t, e);
40
42
  });
41
- x.displayName = "TanstackSelectField";
43
+ u.displayName = "TanstackSelectField";
42
44
  export {
43
- x as TanstackSelectField
45
+ u as TanstackSelectField
44
46
  };
@@ -57,6 +57,16 @@ export * from './components/promo-dialog/parts/PromoDialogSubtitle.js';
57
57
  export * from './components/promo-dialog/parts/PromoDialogContent.js';
58
58
  export * from './components/promo-dialog/parts/PromoDialogActions.js';
59
59
  export * from './components/promo-dialog/parts/PromoDialogTitle.js';
60
+ export * from './components/empty-state/EmptyState.js';
61
+ export * from './components/empty-state/parts/EmptyStateIcon.js';
62
+ export * from './components/empty-state/parts/EmptyStateContent.js';
63
+ export * from './components/empty-state/parts/EmptyStateActions.js';
64
+ export * from './components/empty-state/presets/EmptyStateGetStarted.js';
65
+ export * from './components/empty-state/presets/EmptyStateWaitingForData.js';
66
+ export * from './components/empty-state/presets/EmptyStateGoodJob.js';
67
+ export * from './components/empty-state/presets/EmptyStateUpgradeRequired.js';
68
+ export * from './components/empty-state/presets/EmptyStateNoSearchResults.js';
69
+ export * from './components/empty-state/presets/EmptyStateUseDesktop.js';
60
70
  export * from './components/error-state/ErrorState.js';
61
71
  export * from './components/fieldset/Fieldset.js';
62
72
  export * from './components/fieldset/parts/FieldGroup.js';