@payfit/unity-components 0.0.0-alpha.8 → 0.0.0-alpha.9

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 (165) hide show
  1. package/dist/cjs/components/actionable/Actionable.d.ts +6 -5
  2. package/dist/cjs/components/alert/Alert.js +1 -1
  3. package/dist/cjs/components/app-menu/parts/AppMenuFooter.js +1 -1
  4. package/dist/cjs/components/avatar/Avatar.js +1 -1
  5. package/dist/cjs/components/badge/Badge.js +1 -1
  6. package/dist/cjs/components/bottom-sheet/BottomSheet.d.ts +153 -0
  7. package/dist/cjs/components/bottom-sheet/BottomSheet.js +1 -0
  8. package/dist/cjs/components/bottom-sheet/parts/BottomSheetContent.d.ts +70 -0
  9. package/dist/cjs/components/bottom-sheet/parts/BottomSheetContent.js +1 -0
  10. package/dist/cjs/components/bottom-sheet/parts/BottomSheetDragIndicator.d.ts +54 -0
  11. package/dist/cjs/components/bottom-sheet/parts/BottomSheetDragIndicator.js +1 -0
  12. package/dist/cjs/components/bottom-sheet/parts/BottomSheetFooter.d.ts +27 -0
  13. package/dist/cjs/components/bottom-sheet/parts/BottomSheetFooter.js +1 -0
  14. package/dist/cjs/components/bottom-sheet/parts/BottomSheetHeader.d.ts +83 -0
  15. package/dist/cjs/components/bottom-sheet/parts/BottomSheetHeader.js +1 -0
  16. package/dist/cjs/components/breadcrumbs/Breadcrumbs.js +1 -1
  17. package/dist/cjs/components/breadcrumbs/parts/Breadcrumb.js +1 -1
  18. package/dist/cjs/components/button/Button.js +1 -1
  19. package/dist/cjs/components/button/Button.variants.js +1 -1
  20. package/dist/cjs/components/checkbox/Checkbox.js +1 -1
  21. package/dist/cjs/components/checkbox/parts/CheckboxIndicator.js +1 -1
  22. package/dist/cjs/components/checkbox-group/CheckboxGroup.js +1 -1
  23. package/dist/cjs/components/date-picker/DatePicker.js +1 -1
  24. package/dist/cjs/components/date-picker/parts/DateCalendar.js +1 -1
  25. package/dist/cjs/components/dialog/Dialog.d.ts +98 -11
  26. package/dist/cjs/components/dialog/Dialog.js +1 -1
  27. package/dist/cjs/components/dialog/parts/DialogActions.js +1 -1
  28. package/dist/cjs/components/dialog/parts/DialogContent.js +1 -1
  29. package/dist/cjs/components/dialog/parts/DialogTitle.js +1 -1
  30. package/dist/cjs/components/fieldset/Fieldset.js +1 -1
  31. package/dist/cjs/components/form/Form.js +1 -1
  32. package/dist/cjs/components/form-field/parts/FormContextualLink.js +1 -1
  33. package/dist/cjs/components/form-field/parts/FormFeedbackText.js +1 -1
  34. package/dist/cjs/components/form-field/parts/FormHelperText.js +1 -1
  35. package/dist/cjs/components/full-page-loader/FullPageLoader.js +1 -1
  36. package/dist/cjs/components/icon/Icon.js +1 -1
  37. package/dist/cjs/components/icon-button/CircularIconButton.d.ts +68 -3
  38. package/dist/cjs/components/icon-button/CircularIconButton.js +1 -1
  39. package/dist/cjs/components/icon-button/IconButton.js +1 -1
  40. package/dist/cjs/components/input/Input.js +1 -1
  41. package/dist/cjs/components/label/Label.js +1 -1
  42. package/dist/cjs/components/link/Link.d.ts +1 -1
  43. package/dist/cjs/components/link/Link.js +1 -1
  44. package/dist/cjs/components/menu/parts/MenuContent.js +1 -1
  45. package/dist/cjs/components/multi-select/MultiSelect.js +1 -1
  46. package/dist/cjs/components/multi-select/parts/MultiSelectButton.js +1 -1
  47. package/dist/cjs/components/multi-select/parts/MultiSelectOptGroup.js +1 -1
  48. package/dist/cjs/components/multi-select/parts/MultiSelectOption.js +1 -1
  49. package/dist/cjs/components/multi-select/parts/MultiSelectPopover.js +1 -1
  50. package/dist/cjs/components/multi-select-field/MultiSelectField.js +1 -1
  51. package/dist/cjs/components/pill/Pill.js +1 -1
  52. package/dist/cjs/components/progress-bar/ProgressBar.js +1 -1
  53. package/dist/cjs/components/select/parts/SearchInput.js +1 -1
  54. package/dist/cjs/components/select/parts/SelectButton.js +1 -1
  55. package/dist/cjs/components/select/parts/SelectOption.js +1 -1
  56. package/dist/cjs/components/select/parts/SelectOptionHelper.js +1 -1
  57. package/dist/cjs/components/selectable-button-group/SelectableButtonGroup.js +1 -1
  58. package/dist/cjs/components/selectable-button-group/parts/SelectableButton.js +1 -1
  59. package/dist/cjs/components/side-panel/SidePanel.d.ts +152 -0
  60. package/dist/cjs/components/side-panel/SidePanel.js +1 -0
  61. package/dist/cjs/components/side-panel/parts/SidePanelContent.d.ts +71 -0
  62. package/dist/cjs/components/side-panel/parts/SidePanelContent.js +1 -0
  63. package/dist/cjs/components/side-panel/parts/SidePanelDragIndicator.d.ts +54 -0
  64. package/dist/cjs/components/side-panel/parts/SidePanelDragIndicator.js +1 -0
  65. package/dist/cjs/components/side-panel/parts/SidePanelFooter.d.ts +27 -0
  66. package/dist/cjs/components/side-panel/parts/SidePanelFooter.js +1 -0
  67. package/dist/cjs/components/side-panel/parts/SidePanelHeader.d.ts +75 -0
  68. package/dist/cjs/components/side-panel/parts/SidePanelHeader.js +1 -0
  69. package/dist/cjs/components/spinner/Spinner.js +1 -1
  70. package/dist/cjs/components/tabs/Tabs.js +1 -1
  71. package/dist/cjs/components/tabs/Tabs.variant.js +1 -1
  72. package/dist/cjs/components/tabs/parts/TabList.js +1 -1
  73. package/dist/cjs/components/text/Text.js +1 -1
  74. package/dist/cjs/components/text-area/TextArea.js +1 -1
  75. package/dist/cjs/components/toast/UnityToast.d.ts +1 -1
  76. package/dist/cjs/components/toast/UnityToast.js +1 -1
  77. package/dist/cjs/components/toast/toast.d.ts +2 -1
  78. package/dist/cjs/components/toast/toast.js +1 -1
  79. package/dist/cjs/components/tooltip/Tooltip.d.ts +1 -1
  80. package/dist/cjs/components/tooltip/Tooltip.js +1 -1
  81. package/dist/cjs/index.d.ts +8 -0
  82. package/dist/cjs/index.js +1 -1
  83. package/dist/esm/components/actionable/Actionable.d.mts +6 -5
  84. package/dist/esm/components/alert/Alert.mjs +30 -20
  85. package/dist/esm/components/app-menu/parts/AppMenuFooter.mjs +11 -3
  86. package/dist/esm/components/avatar/Avatar.mjs +15 -14
  87. package/dist/esm/components/badge/Badge.mjs +7 -6
  88. package/dist/esm/components/bottom-sheet/BottomSheet.d.mts +153 -0
  89. package/dist/esm/components/bottom-sheet/BottomSheet.mjs +68 -0
  90. package/dist/esm/components/bottom-sheet/parts/BottomSheetContent.d.mts +70 -0
  91. package/dist/esm/components/bottom-sheet/parts/BottomSheetContent.mjs +26 -0
  92. package/dist/esm/components/bottom-sheet/parts/BottomSheetDragIndicator.d.mts +54 -0
  93. package/dist/esm/components/bottom-sheet/parts/BottomSheetDragIndicator.mjs +67 -0
  94. package/dist/esm/components/bottom-sheet/parts/BottomSheetFooter.d.mts +27 -0
  95. package/dist/esm/components/bottom-sheet/parts/BottomSheetFooter.mjs +28 -0
  96. package/dist/esm/components/bottom-sheet/parts/BottomSheetHeader.d.mts +83 -0
  97. package/dist/esm/components/bottom-sheet/parts/BottomSheetHeader.mjs +45 -0
  98. package/dist/esm/components/breadcrumbs/Breadcrumbs.mjs +11 -11
  99. package/dist/esm/components/breadcrumbs/parts/Breadcrumb.mjs +1 -1
  100. package/dist/esm/components/button/Button.mjs +25 -24
  101. package/dist/esm/components/button/Button.variants.mjs +2 -2
  102. package/dist/esm/components/checkbox/Checkbox.mjs +13 -5
  103. package/dist/esm/components/checkbox/parts/CheckboxIndicator.mjs +1 -1
  104. package/dist/esm/components/checkbox-group/CheckboxGroup.mjs +32 -25
  105. package/dist/esm/components/date-picker/DatePicker.mjs +2 -1
  106. package/dist/esm/components/date-picker/parts/DateCalendar.mjs +20 -20
  107. package/dist/esm/components/dialog/Dialog.d.mts +98 -11
  108. package/dist/esm/components/dialog/Dialog.mjs +50 -29
  109. package/dist/esm/components/dialog/parts/DialogActions.mjs +11 -4
  110. package/dist/esm/components/dialog/parts/DialogContent.mjs +16 -8
  111. package/dist/esm/components/dialog/parts/DialogTitle.mjs +5 -5
  112. package/dist/esm/components/fieldset/Fieldset.mjs +1 -0
  113. package/dist/esm/components/form/Form.mjs +13 -12
  114. package/dist/esm/components/form-field/parts/FormContextualLink.mjs +21 -19
  115. package/dist/esm/components/form-field/parts/FormFeedbackText.mjs +26 -23
  116. package/dist/esm/components/form-field/parts/FormHelperText.mjs +11 -10
  117. package/dist/esm/components/full-page-loader/FullPageLoader.mjs +24 -15
  118. package/dist/esm/components/icon/Icon.mjs +1 -0
  119. package/dist/esm/components/icon-button/CircularIconButton.d.mts +68 -3
  120. package/dist/esm/components/icon-button/CircularIconButton.mjs +58 -24
  121. package/dist/esm/components/icon-button/IconButton.mjs +16 -15
  122. package/dist/esm/components/input/Input.mjs +23 -22
  123. package/dist/esm/components/label/Label.mjs +9 -8
  124. package/dist/esm/components/link/Link.d.mts +1 -1
  125. package/dist/esm/components/link/Link.mjs +18 -17
  126. package/dist/esm/components/menu/parts/MenuContent.mjs +3 -2
  127. package/dist/esm/components/multi-select/MultiSelect.mjs +33 -32
  128. package/dist/esm/components/multi-select/parts/MultiSelectButton.mjs +16 -15
  129. package/dist/esm/components/multi-select/parts/MultiSelectOptGroup.mjs +8 -8
  130. package/dist/esm/components/multi-select/parts/MultiSelectOption.mjs +12 -10
  131. package/dist/esm/components/multi-select/parts/MultiSelectPopover.mjs +4 -4
  132. package/dist/esm/components/multi-select-field/MultiSelectField.mjs +14 -13
  133. package/dist/esm/components/pill/Pill.mjs +4 -3
  134. package/dist/esm/components/progress-bar/ProgressBar.mjs +8 -7
  135. package/dist/esm/components/select/parts/SearchInput.mjs +7 -7
  136. package/dist/esm/components/select/parts/SelectButton.mjs +40 -31
  137. package/dist/esm/components/select/parts/SelectOption.mjs +5 -4
  138. package/dist/esm/components/select/parts/SelectOptionHelper.mjs +11 -9
  139. package/dist/esm/components/selectable-button-group/SelectableButtonGroup.mjs +20 -11
  140. package/dist/esm/components/selectable-button-group/parts/SelectableButton.mjs +8 -7
  141. package/dist/esm/components/side-panel/SidePanel.d.mts +152 -0
  142. package/dist/esm/components/side-panel/SidePanel.mjs +67 -0
  143. package/dist/esm/components/side-panel/parts/SidePanelContent.d.mts +71 -0
  144. package/dist/esm/components/side-panel/parts/SidePanelContent.mjs +26 -0
  145. package/dist/esm/components/side-panel/parts/SidePanelDragIndicator.d.mts +54 -0
  146. package/dist/esm/components/side-panel/parts/SidePanelDragIndicator.mjs +67 -0
  147. package/dist/esm/components/side-panel/parts/SidePanelFooter.d.mts +27 -0
  148. package/dist/esm/components/side-panel/parts/SidePanelFooter.mjs +20 -0
  149. package/dist/esm/components/side-panel/parts/SidePanelHeader.d.mts +75 -0
  150. package/dist/esm/components/side-panel/parts/SidePanelHeader.mjs +43 -0
  151. package/dist/esm/components/spinner/Spinner.mjs +18 -17
  152. package/dist/esm/components/tabs/Tabs.mjs +19 -10
  153. package/dist/esm/components/tabs/Tabs.variant.mjs +1 -1
  154. package/dist/esm/components/tabs/parts/TabList.mjs +1 -1
  155. package/dist/esm/components/text/Text.mjs +11 -10
  156. package/dist/esm/components/text-area/TextArea.mjs +21 -20
  157. package/dist/esm/components/toast/UnityToast.d.mts +1 -1
  158. package/dist/esm/components/toast/UnityToast.mjs +23 -20
  159. package/dist/esm/components/toast/toast.d.mts +2 -1
  160. package/dist/esm/components/toast/toast.mjs +15 -13
  161. package/dist/esm/components/tooltip/Tooltip.d.mts +1 -1
  162. package/dist/esm/components/tooltip/Tooltip.mjs +12 -11
  163. package/dist/esm/index.d.mts +8 -0
  164. package/dist/esm/index.mjs +219 -192
  165. package/package.json +12 -7
@@ -100,6 +100,7 @@ function f({
100
100
  return /* @__PURE__ */ e(
101
101
  "span",
102
102
  {
103
+ "data-dd-privacy": "allow",
103
104
  ...t,
104
105
  role: a,
105
106
  "aria-label": t["aria-labelledby"] ? void 0 : n,
@@ -1,12 +1,77 @@
1
1
  import { UnityIcon } from '@payfit/unity-icons';
2
2
  import { ButtonProps as AriaButtonProps } from 'react-aria-components';
3
- export type CircularIconButtonProps = AriaButtonProps & {
3
+ import { VariantProps } from 'tailwind-variants';
4
+ export declare const circularIconButton: import('tailwind-variants').TVReturnType<{
5
+ size: {
6
+ default: string;
7
+ large: string;
8
+ };
9
+ color: {
10
+ 'content.neutral': string;
11
+ 'content.neutral.low': string;
12
+ };
13
+ }, undefined, "uy-rounded-circle uy-flex uy-items-center uy-justify-center uy-transition-colors hover:uy-bg-surface-neutral-hover active:uy-bg-surface-neutral-active data-[pressed]:uy-bg-surface-neutral-pressed focus-visible:uy-outline-2 focus-visible:uy-outline-offset-2 focus-visible:uy-outline-utility-focus-ring disabled:uy-cursor-not-allowed disabled:uy-text-content-neutral-disabled aria-busy:uy-cursor-not-allowed aria-busy:uy-text-content-neutral-disabled", import('tailwind-variants/dist/config').TVConfig<{
14
+ size: {
15
+ default: string;
16
+ large: string;
17
+ };
18
+ color: {
19
+ 'content.neutral': string;
20
+ 'content.neutral.low': string;
21
+ };
22
+ }, {
23
+ size: {
24
+ default: string;
25
+ large: string;
26
+ };
27
+ color: {
28
+ 'content.neutral': string;
29
+ 'content.neutral.low': string;
30
+ };
31
+ }>, {
32
+ size: {
33
+ default: string;
34
+ large: string;
35
+ };
36
+ color: {
37
+ 'content.neutral': string;
38
+ 'content.neutral.low': string;
39
+ };
40
+ }, undefined, import('tailwind-variants').TVReturnType<{
41
+ size: {
42
+ default: string;
43
+ large: string;
44
+ };
45
+ color: {
46
+ 'content.neutral': string;
47
+ 'content.neutral.low': string;
48
+ };
49
+ }, undefined, "uy-rounded-circle uy-flex uy-items-center uy-justify-center uy-transition-colors hover:uy-bg-surface-neutral-hover active:uy-bg-surface-neutral-active data-[pressed]:uy-bg-surface-neutral-pressed focus-visible:uy-outline-2 focus-visible:uy-outline-offset-2 focus-visible:uy-outline-utility-focus-ring disabled:uy-cursor-not-allowed disabled:uy-text-content-neutral-disabled aria-busy:uy-cursor-not-allowed aria-busy:uy-text-content-neutral-disabled", import('tailwind-variants/dist/config').TVConfig<{
50
+ size: {
51
+ default: string;
52
+ large: string;
53
+ };
54
+ color: {
55
+ 'content.neutral': string;
56
+ 'content.neutral.low': string;
57
+ };
58
+ }, {
59
+ size: {
60
+ default: string;
61
+ large: string;
62
+ };
63
+ color: {
64
+ 'content.neutral': string;
65
+ 'content.neutral.low': string;
66
+ };
67
+ }>, unknown, unknown, undefined>>;
68
+ export interface CircularIconButtonProps extends AriaButtonProps, VariantProps<typeof circularIconButton> {
4
69
  icon: UnityIcon;
5
70
  title: string;
71
+ asElement?: 'button' | 'default';
6
72
  isLoading?: boolean;
7
73
  isDisabled?: boolean;
8
- };
9
- export declare const circularIconButton: import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, "uy-w-300 uy-h-300 uy-rounded-circle uy-flex uy-items-center uy-justify-center uy-text-content-neutral uy-transition-colors hover:uy-bg-surface-neutral-hover active:uy-bg-surface-neutral-active data-[pressed]:uy-bg-surface-neutral-pressed focus-visible:uy-outline-2 focus-visible:uy-outline-offset-2 focus-visible:uy-outline-utility-focus-ring disabled:uy-cursor-not-allowed disabled:uy-text-content-neutral-disabled aria-busy:uy-cursor-not-allowed aria-busy:uy-text-content-neutral-disabled", import('tailwind-variants/dist/config').TVConfig<unknown, {} | {}>, {} | {}, undefined, import('tailwind-variants').TVReturnType<unknown, undefined, "uy-w-300 uy-h-300 uy-rounded-circle uy-flex uy-items-center uy-justify-center uy-text-content-neutral uy-transition-colors hover:uy-bg-surface-neutral-hover active:uy-bg-surface-neutral-active data-[pressed]:uy-bg-surface-neutral-pressed focus-visible:uy-outline-2 focus-visible:uy-outline-offset-2 focus-visible:uy-outline-utility-focus-ring disabled:uy-cursor-not-allowed disabled:uy-text-content-neutral-disabled aria-busy:uy-cursor-not-allowed aria-busy:uy-text-content-neutral-disabled", import('tailwind-variants/dist/config').TVConfig<unknown, {} | {}>, unknown, unknown, undefined>>;
74
+ }
10
75
  export declare function CircularIconButton(props: CircularIconButtonProps): import("react/jsx-runtime").JSX.Element;
11
76
  export declare namespace CircularIconButton {
12
77
  var displayName: string;
@@ -1,32 +1,66 @@
1
- import { jsx as e, jsxs as c } from "react/jsx-runtime";
2
- import { Pressable as d } from "react-aria-components";
3
- import { tv as y } from "tailwind-variants";
4
- import b from "../../hooks/use-id.mjs";
5
- import { Icon as f } from "../icon/Icon.mjs";
6
- import { Spinner as m } from "../spinner/Spinner.mjs";
7
- import p from "../tooltip/Tooltip.mjs";
8
- const h = y({
9
- base: "uy-w-300 uy-h-300 uy-rounded-circle uy-flex uy-items-center uy-justify-center uy-text-content-neutral uy-transition-colors hover:uy-bg-surface-neutral-hover active:uy-bg-surface-neutral-active data-[pressed]:uy-bg-surface-neutral-pressed focus-visible:uy-outline-2 focus-visible:uy-outline-offset-2 focus-visible:uy-outline-utility-focus-ring disabled:uy-cursor-not-allowed disabled:uy-text-content-neutral-disabled aria-busy:uy-cursor-not-allowed aria-busy:uy-text-content-neutral-disabled"
1
+ import { jsx as e, jsxs as f } from "react/jsx-runtime";
2
+ import { Button as m, Pressable as p } from "react-aria-components";
3
+ import { tv as v } from "tailwind-variants";
4
+ import h from "../../hooks/use-id.mjs";
5
+ import { Icon as g } from "../icon/Icon.mjs";
6
+ import { Spinner as x } from "../spinner/Spinner.mjs";
7
+ import { Tooltip as w } from "../tooltip/Tooltip.mjs";
8
+ const I = v({
9
+ base: "uy-rounded-circle uy-flex uy-items-center uy-justify-center uy-transition-colors hover:uy-bg-surface-neutral-hover active:uy-bg-surface-neutral-active data-[pressed]:uy-bg-surface-neutral-pressed focus-visible:uy-outline-2 focus-visible:uy-outline-offset-2 focus-visible:uy-outline-utility-focus-ring disabled:uy-cursor-not-allowed disabled:uy-text-content-neutral-disabled aria-busy:uy-cursor-not-allowed aria-busy:uy-text-content-neutral-disabled",
10
+ variants: {
11
+ size: {
12
+ default: "uy-w-300 uy-h-300",
13
+ large: "uy-w-400 uy-h-400"
14
+ },
15
+ color: {
16
+ "content.neutral": "uy-text-content-neutral",
17
+ "content.neutral.low": "uy-text-content-neutral-low"
18
+ }
19
+ },
20
+ defaultVariants: {
21
+ size: "default",
22
+ color: "content.neutral"
23
+ }
10
24
  });
11
- function v(i) {
12
- const s = b(), { onPress: n, icon: l, isLoading: r, title: t, isDisabled: u, ...a } = i, o = `icon-button-label-${s}`;
13
- return /* @__PURE__ */ e(p, { title: t, children: /* @__PURE__ */ e(
14
- d,
25
+ function z(l) {
26
+ const i = h(), {
27
+ onPress: a,
28
+ icon: s,
29
+ color: u,
30
+ size: o,
31
+ isLoading: t,
32
+ title: r,
33
+ isDisabled: c,
34
+ asElement: d = "default",
35
+ ...y
36
+ } = l, n = `icon-button-label-${i}`, b = I({ color: u, size: o });
37
+ return /* @__PURE__ */ e(w, { title: r, children: /* @__PURE__ */ e(
38
+ d === "button" ? m : p,
15
39
  {
16
- ...a,
17
- onPress: n,
18
- isDisabled: u || r,
19
- "aria-labelledby": o,
20
- "aria-busy": r,
21
- children: /* @__PURE__ */ c("div", { className: h(), role: "button", children: [
22
- r ? /* @__PURE__ */ e(m, { size: "small", label: "Loading", color: "inherit" }) : /* @__PURE__ */ e(f, { src: l, color: "inherit", role: "presentation" }),
23
- /* @__PURE__ */ e("span", { id: o, className: "uy-sr-only", children: t })
40
+ "data-dd-privacy": "allow",
41
+ ...y,
42
+ onPress: a,
43
+ isDisabled: c || t,
44
+ "aria-labelledby": n,
45
+ "aria-busy": t,
46
+ className: b,
47
+ children: /* @__PURE__ */ f("div", { role: "button", children: [
48
+ t ? /* @__PURE__ */ e(x, { size: "small", label: "Loading", color: "inherit" }) : /* @__PURE__ */ e(
49
+ g,
50
+ {
51
+ src: s,
52
+ size: o === "large" ? 24 : 20,
53
+ color: "inherit",
54
+ role: "presentation"
55
+ }
56
+ ),
57
+ /* @__PURE__ */ e("span", { id: n, className: "uy-sr-only", children: r })
24
58
  ] })
25
59
  }
26
60
  ) });
27
61
  }
28
- v.displayName = "CircularIconButton";
62
+ z.displayName = "CircularIconButton";
29
63
  export {
30
- v as CircularIconButton,
31
- h as circularIconButton
64
+ z as CircularIconButton,
65
+ I as circularIconButton
32
66
  };
@@ -1,9 +1,9 @@
1
- import { jsx as e, jsxs as f } from "react/jsx-runtime";
2
- import { Button as p } from "react-aria-components";
3
- import b from "../../hooks/use-id.mjs";
4
- import { Icon as y } from "../icon/Icon.mjs";
1
+ import { jsx as i, jsxs as p } from "react/jsx-runtime";
2
+ import { Button as f } from "react-aria-components";
3
+ import y from "../../hooks/use-id.mjs";
4
+ import { Icon as b } from "../icon/Icon.mjs";
5
5
  import { Spinner as B } from "../spinner/Spinner.mjs";
6
- import h from "../tooltip/Tooltip.mjs";
6
+ import { Tooltip as h } from "../tooltip/Tooltip.mjs";
7
7
  import { iconButtonPrimary as I, iconButtonSecondary as N, iconButtonGhost as x } from "./IconButton.variants.mjs";
8
8
  const j = ({
9
9
  variant: o,
@@ -27,27 +27,28 @@ const j = ({
27
27
  isLoading: t
28
28
  });
29
29
  function C(o) {
30
- const n = b(), { button: t, icon: r } = j(o), { onClick: s, icon: m, isLoading: l, label: i, isDisabled: a, iconRole: u, ...d } = o, c = `icon-button-label-${n}`;
31
- return /* @__PURE__ */ e(h, { title: i, children: /* @__PURE__ */ f(
32
- p,
30
+ const n = y(), { button: t, icon: r } = j(o), { onClick: s, icon: a, isLoading: l, label: e, isDisabled: m, iconRole: u, ...d } = o, c = `icon-button-label-${n}`;
31
+ return /* @__PURE__ */ i(h, { title: e, children: /* @__PURE__ */ p(
32
+ f,
33
33
  {
34
+ "data-dd-privacy": "allow",
35
+ ...d,
34
36
  className: t({ class: o.className }),
35
37
  onPress: s,
36
- isDisabled: a || l,
37
- "aria-label": i,
38
- ...d,
38
+ isDisabled: m || l,
39
+ "aria-label": e,
39
40
  children: [
40
- l ? /* @__PURE__ */ e(B, { size: "small", label: "Loading", color: "inherit" }) : /* @__PURE__ */ e(
41
- y,
41
+ l ? /* @__PURE__ */ i(B, { size: "small", label: "Loading", color: "inherit" }) : /* @__PURE__ */ i(
42
+ b,
42
43
  {
43
44
  role: u,
44
- src: m,
45
+ src: a,
45
46
  className: r(),
46
47
  "aria-labelledby": c,
47
48
  color: "inherit"
48
49
  }
49
50
  ),
50
- /* @__PURE__ */ e("span", { id: c, className: "uy-sr-only", children: i })
51
+ /* @__PURE__ */ i("span", { id: c, className: "uy-sr-only", children: e })
51
52
  ]
52
53
  }
53
54
  ) });
@@ -1,4 +1,4 @@
1
- import { jsxs as n, jsx as e } from "react/jsx-runtime";
1
+ import { jsxs as d, jsx as r } from "react/jsx-runtime";
2
2
  import { forwardRef as v } from "react";
3
3
  import { Input as h } from "react-aria-components";
4
4
  import { useIntl as I } from "react-intl";
@@ -9,11 +9,11 @@ import { Spinner as O } from "../spinner/Spinner.mjs";
9
9
  const S = N({
10
10
  slots: {
11
11
  base: "uy-flex uy-h-500 uy-border uy-border-solid uy-rounded-100 focus-within:uy-outline-none focus-within:uy-ring-2 focus-within:uy-ring-utility-focus-ring focus-within:uy-ring-offset-2 active:uy-border-border-form-active",
12
- prefix: "uy-flex-grow-0 uy-content-center uy-pt-100 uy-pb-100 uy-pl-150 uy-pr-150 uy-border-r uy-rounded-l-100 active:uy-border-border-form-active",
12
+ prefix: "uy-flex-grow-0 uy-content-center uy-pt-100 uy-pb-100 uy-pl-150 uy-pr-150 uy-border-r uy-border-solid uy-rounded-l-100 active:uy-border-border-form-active",
13
13
  inputWrapper: "uy-flex uy-gap-50 uy-flex-grow uy-flex-nowrap uy-pt-100 uy-pb-100 uy-pl-150 uy-pr-150 uy-rounded-100 uy-max-w-full uy-justify-between",
14
- input: "uy-w-full uy-max-w-full uy-flex-1 uy-outline-none uy-typography-body placeholder:uy-text-content-neutral-lowest uy-min-w-0 uy-max-w-full",
14
+ input: "uy-w-full uy-flex-1 uy-outline-none uy-typography-body placeholder:uy-text-content-neutral-lowest uy-min-w-0 uy-max-w-full",
15
15
  state: "uy-flex uy-gap-50 uy-items-center uy-shrink-0",
16
- suffix: "uy-flex-grow-0 uy-content-center uy-pt-100 uy-pb-100 uy-pl-150 uy-pr-150 uy-border-l uy-rounded-r-100 active:uy-border-border-form-active"
16
+ suffix: "uy-flex-grow-0 uy-content-center uy-pt-100 uy-pb-100 uy-pl-150 uy-pr-150 uy-border-l uy-border-solid uy-rounded-r-100 active:uy-border-border-form-active"
17
17
  },
18
18
  variants: {
19
19
  isInvalid: {
@@ -63,14 +63,14 @@ const S = N({
63
63
  }), j = v(
64
64
  ({
65
65
  type: s = "text",
66
- prefix: d,
67
- suffix: f,
68
- isInvalid: l,
69
- isLoading: r,
66
+ prefix: n,
67
+ suffix: i,
68
+ isInvalid: f,
69
+ isLoading: e,
70
70
  isDisabled: o,
71
71
  isReadOnly: u,
72
72
  onClearButtonPress: t,
73
- ...i
73
+ ...l
74
74
  }, y) => {
75
75
  const a = I(), {
76
76
  base: b,
@@ -80,27 +80,28 @@ const S = N({
80
80
  state: x,
81
81
  suffix: g
82
82
  } = S({
83
- isInvalid: !!l,
83
+ isInvalid: !!f,
84
84
  isReadOnly: !!u,
85
85
  isDisabled: !!o
86
- }), w = i.value && !r && !u && !o;
87
- return /* @__PURE__ */ n("div", { className: b(), children: [
88
- d ? /* @__PURE__ */ e("span", { className: m(), children: d }) : null,
89
- /* @__PURE__ */ n("div", { className: c(), children: [
90
- /* @__PURE__ */ e(
86
+ }), w = l.value && !e && !u && !o;
87
+ return /* @__PURE__ */ d("div", { className: b(), children: [
88
+ n ? /* @__PURE__ */ r("span", { className: m(), children: n }) : null,
89
+ /* @__PURE__ */ d("div", { className: c(), children: [
90
+ /* @__PURE__ */ r(
91
91
  h,
92
92
  {
93
- ...i,
93
+ "data-dd-privacy": "mask",
94
+ ...l,
94
95
  ref: y,
95
96
  type: s,
96
97
  className: p(),
97
- "aria-busy": r,
98
+ "aria-busy": e,
98
99
  readOnly: u,
99
100
  disabled: o
100
101
  }
101
102
  ),
102
- /* @__PURE__ */ n("div", { className: x(), children: [
103
- r && /* @__PURE__ */ e(
103
+ /* @__PURE__ */ d("div", { className: x(), children: [
104
+ e && /* @__PURE__ */ r(
104
105
  O,
105
106
  {
106
107
  color: "inherit",
@@ -111,7 +112,7 @@ const S = N({
111
112
  })
112
113
  }
113
114
  ),
114
- l && /* @__PURE__ */ e(
115
+ f && /* @__PURE__ */ r(
115
116
  M,
116
117
  {
117
118
  src: "WarningCircleOutlined",
@@ -122,7 +123,7 @@ const S = N({
122
123
  })
123
124
  }
124
125
  ),
125
- w && /* @__PURE__ */ e(
126
+ w && /* @__PURE__ */ r(
126
127
  W,
127
128
  {
128
129
  title: a.formatMessage({
@@ -138,7 +139,7 @@ const S = N({
138
139
  )
139
140
  ] })
140
141
  ] }),
141
- f ? /* @__PURE__ */ e("span", { className: g(), children: f }) : null
142
+ i ? /* @__PURE__ */ r("span", { className: g(), children: i }) : null
142
143
  ] });
143
144
  }
144
145
  );
@@ -1,5 +1,5 @@
1
1
  import { jsxs as o, jsx as t } from "react/jsx-runtime";
2
- import { forwardRef as c } from "react";
2
+ import { forwardRef as m } from "react";
3
3
  import { mergeProps as u } from "react-aria";
4
4
  import { useSlottedContext as b, InputContext as g, Label as f } from "react-aria-components";
5
5
  import { tv as N } from "tailwind-variants";
@@ -22,7 +22,7 @@ const h = N({
22
22
  defaultVariants: {
23
23
  variant: "strong"
24
24
  }
25
- }), q = c(
25
+ }), q = m(
26
26
  ({ children: n, ...a }, l) => {
27
27
  const e = b(g), i = u(
28
28
  { isRequired: e == null ? void 0 : e["aria-required"] },
@@ -30,21 +30,22 @@ const h = N({
30
30
  ), {
31
31
  isRequired: r = !1,
32
32
  requiredVariant: s = "required",
33
- ...p
34
- } = i, { base: y, asterisk: d, optionalTag: m } = h();
33
+ ...d
34
+ } = i, { base: p, asterisk: y, optionalTag: c } = h();
35
35
  return /* @__PURE__ */ o(
36
36
  f,
37
37
  {
38
- ...p,
38
+ "data-dd-privacy": "allow",
39
+ ...d,
39
40
  ref: l,
40
- className: y({ className: a.className }),
41
+ className: p({ className: a.className }),
41
42
  children: [
42
43
  n,
43
- s === "required" && r && /* @__PURE__ */ o("span", { className: d(), children: [
44
+ s === "required" && r && /* @__PURE__ */ o("span", { className: y(), children: [
44
45
  "*",
45
46
  /* @__PURE__ */ t("span", { className: "uy-sr-only", children: "required" })
46
47
  ] }),
47
- s === "optional" && !r && /* @__PURE__ */ t("span", { className: m({ className: a.className }), children: "(optional)" })
48
+ s === "optional" && !r && /* @__PURE__ */ t("span", { className: c({ className: a.className }), children: "(optional)" })
48
49
  ]
49
50
  }
50
51
  );
@@ -37,7 +37,7 @@ export type LinkProps = Omit<AriaLinkProps, 'style' | 'className'> & {
37
37
  /**
38
38
  * Links allow users to navigate to different pages or sections.
39
39
  */
40
- declare const Link: import('react').ForwardRefExoticComponent<Omit<AriaLinkProps, "style" | "className"> & {
40
+ declare const Link: import('react').ForwardRefExoticComponent<Omit<AriaLinkProps, "className" | "style"> & {
41
41
  /**
42
42
  * The URL the link navigates to.
43
43
  */
@@ -1,38 +1,39 @@
1
1
  import { jsxs as f, jsx as k } from "react/jsx-runtime";
2
2
  import { forwardRef as y } from "react";
3
- import { IconSprite as g } from "@payfit/unity-icons";
4
- import { Link as v } from "react-aria-components";
5
- import { useRouter as x } from "../../providers/router/RouterProvider.mjs";
6
- import { link as w } from "./Link.variants.mjs";
3
+ import { IconSprite as v } from "@payfit/unity-icons";
4
+ import { Link as g } from "react-aria-components";
5
+ import { useRouter as w } from "../../providers/router/RouterProvider.mjs";
6
+ import { link as x } from "./Link.variants.mjs";
7
7
  import { isExternalUrl as L } from "./utils.mjs";
8
8
  const A = y(
9
9
  ({
10
10
  href: o,
11
- children: s,
12
- variant: m = "inline",
13
- color: a = "primary",
11
+ children: a,
12
+ variant: s = "inline",
13
+ color: c = "primary",
14
14
  isDisabled: n = !1,
15
- isCurrent: c = void 0,
15
+ isCurrent: m = void 0,
16
16
  isExternal: p,
17
17
  maxCharactersTruncation: t,
18
18
  ...r
19
- }, u) => {
20
- const l = x(), e = p ?? L(o), i = !e && l ? l.isActive(o.toString()) : c, d = w({
21
- variant: m,
22
- color: a,
19
+ }, d) => {
20
+ const l = w(), e = p ?? L(o), i = !e && l ? l.isActive(o.toString()) : m, u = x({
21
+ variant: s,
22
+ color: c,
23
23
  isDisabled: n,
24
24
  isTruncated: !!t
25
25
  });
26
26
  return /* @__PURE__ */ f(
27
- v,
27
+ g,
28
28
  {
29
+ "data-dd-privacy": "allow",
29
30
  ...r,
30
31
  href: o,
31
- ref: u,
32
+ ref: d,
32
33
  style: !!t ? {
33
34
  "--uy-link-max-w": `${t}ch`
34
35
  } : {},
35
- className: d,
36
+ className: u,
36
37
  isDisabled: n,
37
38
  target: e ? "_blank" : r.target,
38
39
  rel: e && !r.rel ? "noopener noreferrer" : r.rel,
@@ -41,9 +42,9 @@ const A = y(
41
42
  "aria-current": i ? "page" : void 0
42
43
  },
43
44
  children: [
44
- s,
45
+ a,
45
46
  e && /* @__PURE__ */ k(
46
- g,
47
+ v,
47
48
  {
48
49
  src: "ArrowSquareOutOutlined",
49
50
  color: "currentColor",
@@ -1,5 +1,5 @@
1
1
  import { jsx as u } from "react/jsx-runtime";
2
- import { Popover as n, Menu as s } from "react-aria-components";
2
+ import { Popover as n, Menu as a } from "react-aria-components";
3
3
  function y({
4
4
  children: r,
5
5
  placement: o,
@@ -11,7 +11,8 @@ function y({
11
11
  {
12
12
  placement: o,
13
13
  className: "uy-flex uy-flex-col uy-justify-end uy-items-start uy-p-100 uy-rounded-100 uy-border uy-border-solid uy-border-border-neutral uy-bg-surface-neutral uy-shadow-floating",
14
- children: /* @__PURE__ */ u(s, { autoFocus: "first", className: `uy-min-w-[320px] ${t}`, children: r })
14
+ "data-dd-privacy": "allow",
15
+ children: /* @__PURE__ */ u(a, { autoFocus: "first", className: `uy-min-w-[320px] ${t}`, children: r })
15
16
  }
16
17
  );
17
18
  }
@@ -1,15 +1,15 @@
1
1
  import { jsx as u, jsxs as q } from "react/jsx-runtime";
2
- import { forwardRef as ye, useMemo as S, useCallback as d } from "react";
3
- import { ComboboxProvider as Se, SelectProvider as z } from "@ariakit/react";
4
- import { useComboboxFilter as pe } from "./hooks/use-combobox-filter.mjs";
5
- import { useMultiSelectionState as he } from "./hooks/use-multiselection-state.mjs";
2
+ import { forwardRef as Se, useMemo as S, useCallback as d } from "react";
3
+ import { ComboboxProvider as pe, SelectProvider as z } from "@ariakit/react";
4
+ import { useComboboxFilter as he } from "./hooks/use-combobox-filter.mjs";
5
+ import { useMultiSelectionState as ve } from "./hooks/use-multiselection-state.mjs";
6
6
  import { MultiSelectContext as J } from "./Multiselect.context.mjs";
7
7
  import { MultiSelectButton as U } from "./parts/MultiSelectButton.mjs";
8
8
  import { MultiSelectPopover as W } from "./parts/MultiSelectPopover.mjs";
9
9
  function X(t) {
10
10
  return t instanceof Map;
11
11
  }
12
- function ve(t) {
12
+ function Ve(t) {
13
13
  return !Object.prototype.hasOwnProperty.call(t, "items");
14
14
  }
15
15
  function a(t) {
@@ -25,7 +25,7 @@ function Y(t) {
25
25
  return new Set(Z(t));
26
26
  }
27
27
  const $ = (t, w) => {
28
- const o = ve(t), C = (e) => {
28
+ const o = Ve(t), C = (e) => {
29
29
  if (Object.hasOwnProperty.call(e, "value"))
30
30
  return e.value;
31
31
  if (Object.prototype.hasOwnProperty.call(e, "id"))
@@ -37,9 +37,9 @@ const $ = (t, w) => {
37
37
  }, ee = o ? (e) => Array.from(e).map(String).join(", ") : (e) => Array.from(e).map((n) => C(n)).join(", "), m = t, O = t, c = S(
38
38
  () => o ? void 0 : m.items,
39
39
  [o, m.items]
40
- ), r = o ? void 0 : m.getItemValue ?? C, te = t.renderValue ?? ee, { children: v } = o ? O : m, re = o ? void 0 : m.searchOptions, { children: g } = O, {
40
+ ), r = o ? void 0 : m.getItemValue ?? C, { children: v } = o ? O : m, te = o ? void 0 : m.searchOptions, { children: g } = O, {
41
41
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
42
- children: Ke,
42
+ children: Pe,
43
43
  value: V,
44
44
  defaultValue: f,
45
45
  onChange: b,
@@ -51,12 +51,13 @@ const $ = (t, w) => {
51
51
  isSearchable: h,
52
52
  placeholder: I,
53
53
  onClearButtonPress: F,
54
+ renderValue: re,
54
55
  maxVisibleItems: N = 7,
55
56
  ...B
56
- } = t, y = d(() => o || !c ? [] : X(c) ? Array.from(c.values()).flat() : Array.from(c), [c, o]), ne = d(() => {
57
+ } = t, ne = re ?? ee, y = d(() => o || !c ? [] : X(c) ? Array.from(c.values()).flat() : Array.from(c), [c, o]), oe = d(() => {
57
58
  if ("value" in t)
58
59
  return V ? Y(V) : /* @__PURE__ */ new Set();
59
- }, [t, V]), oe = d(() => f ? Y(f) : /* @__PURE__ */ new Set(), [f]), se = d(
60
+ }, [t, V]), se = d(() => f ? Y(f) : /* @__PURE__ */ new Set(), [f]), le = d(
60
61
  (e) => {
61
62
  if (!b) return;
62
63
  const n = new Set(
@@ -69,21 +70,21 @@ const $ = (t, w) => {
69
70
  selectedKeys: i,
70
71
  selectKey: L,
71
72
  unselectKey: T
72
- } = he({
73
- selectedKeys: ne(),
74
- defaultSelectedKeys: oe(),
75
- onSelectionChange: se
76
- }), le = d(
73
+ } = ve({
74
+ selectedKeys: oe(),
75
+ defaultSelectedKeys: se(),
76
+ onSelectionChange: le
77
+ }), ae = d(
77
78
  (e) => {
78
79
  L(a(e));
79
80
  },
80
81
  [L]
81
- ), ae = d(
82
+ ), ce = d(
82
83
  (e) => {
83
84
  T(a(e));
84
85
  },
85
86
  [T]
86
- ), { setSearchQuery: ce, matchingItems: K } = pe({
87
+ ), { setSearchQuery: ie, matchingItems: K } = he({
87
88
  items: y(),
88
89
  extractSearchableText: (e) => o ? [""] : [
89
90
  a(
@@ -91,8 +92,8 @@ const $ = (t, w) => {
91
92
  )
92
93
  ],
93
94
  enabled: h,
94
- searchOptions: re
95
- }), ie = () => {
95
+ searchOptions: te
96
+ }), ue = () => {
96
97
  if (o) return Array.from(i);
97
98
  const e = y();
98
99
  return Array.from(i).map((n) => {
@@ -103,7 +104,7 @@ const $ = (t, w) => {
103
104
  );
104
105
  return l && r ? r(l) : p(n);
105
106
  });
106
- }, ue = () => {
107
+ }, de = () => {
107
108
  if (o)
108
109
  return new Set(
109
110
  Array.from(i).map((l) => p(l))
@@ -117,32 +118,32 @@ const $ = (t, w) => {
117
118
  );
118
119
  s && n.add(s);
119
120
  }), n;
120
- }, de = () => {
121
+ }, fe = () => {
121
122
  if (f)
122
123
  return Z(f);
123
- }, P = S(ie, [
124
+ }, P = S(ue, [
124
125
  i,
125
126
  o,
126
127
  r,
127
128
  y
128
- ]), G = S(ue, [
129
+ ]), G = S(de, [
129
130
  i,
130
131
  o,
131
132
  r,
132
133
  y
133
- ]), k = S(de, [f]), E = (e) => {
134
+ ]), k = S(fe, [f]), E = (e) => {
134
135
  const n = new Set(e), l = new Set(
135
136
  P.map((s) => a(s))
136
137
  );
137
138
  for (const s of n)
138
- l.has(s) || le(p(s));
139
+ l.has(s) || ae(p(s));
139
140
  for (const s of l)
140
- n.has(s) || ae(p(s));
141
+ n.has(s) || ce(p(s));
141
142
  }, H = d(() => o ? g : c ? X(c) ? Array.from(c.entries()).map(([e, n]) => {
142
143
  const l = n.filter(
143
144
  (s) => K.some((A) => {
144
- const fe = (r == null ? void 0 : r(s)) || "", me = (r == null ? void 0 : r(A)) || "";
145
- return a(me) === a(fe);
145
+ const me = (r == null ? void 0 : r(s)) || "", ye = (r == null ? void 0 : r(A)) || "";
146
+ return a(ye) === a(me);
146
147
  })
147
148
  );
148
149
  return v(e, l);
@@ -150,8 +151,8 @@ const $ = (t, w) => {
150
151
  (e) => v(
151
152
  e
152
153
  )
153
- ) : null, [v, c, K, g, r, o]), Q = S(() => H(), [H]), _ = te;
154
- return h ? /* @__PURE__ */ u(Se, { resetValueOnHide: !0, setValue: ce, children: /* @__PURE__ */ u(
154
+ ) : null, [v, c, K, g, r, o]), Q = S(() => H(), [H]), _ = ne;
155
+ return h ? /* @__PURE__ */ u(pe, { resetValueOnHide: !0, setValue: ie, children: /* @__PURE__ */ u(
155
156
  z,
156
157
  {
157
158
  value: P.map(
@@ -222,9 +223,9 @@ const $ = (t, w) => {
222
223
  );
223
224
  };
224
225
  $.displayName = "MultiSelect";
225
- const je = ye(
226
+ const De = Se(
226
227
  $
227
228
  );
228
229
  export {
229
- je as MultiSelect
230
+ De as MultiSelect
230
231
  };