@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.
- package/dist/cjs/components/actionable/Actionable.d.ts +6 -5
- package/dist/cjs/components/alert/Alert.js +1 -1
- package/dist/cjs/components/app-menu/parts/AppMenuFooter.js +1 -1
- package/dist/cjs/components/avatar/Avatar.js +1 -1
- package/dist/cjs/components/badge/Badge.js +1 -1
- package/dist/cjs/components/bottom-sheet/BottomSheet.d.ts +153 -0
- package/dist/cjs/components/bottom-sheet/BottomSheet.js +1 -0
- package/dist/cjs/components/bottom-sheet/parts/BottomSheetContent.d.ts +70 -0
- package/dist/cjs/components/bottom-sheet/parts/BottomSheetContent.js +1 -0
- package/dist/cjs/components/bottom-sheet/parts/BottomSheetDragIndicator.d.ts +54 -0
- package/dist/cjs/components/bottom-sheet/parts/BottomSheetDragIndicator.js +1 -0
- package/dist/cjs/components/bottom-sheet/parts/BottomSheetFooter.d.ts +27 -0
- package/dist/cjs/components/bottom-sheet/parts/BottomSheetFooter.js +1 -0
- package/dist/cjs/components/bottom-sheet/parts/BottomSheetHeader.d.ts +83 -0
- package/dist/cjs/components/bottom-sheet/parts/BottomSheetHeader.js +1 -0
- package/dist/cjs/components/breadcrumbs/Breadcrumbs.js +1 -1
- package/dist/cjs/components/breadcrumbs/parts/Breadcrumb.js +1 -1
- package/dist/cjs/components/button/Button.js +1 -1
- package/dist/cjs/components/button/Button.variants.js +1 -1
- package/dist/cjs/components/checkbox/Checkbox.js +1 -1
- package/dist/cjs/components/checkbox/parts/CheckboxIndicator.js +1 -1
- package/dist/cjs/components/checkbox-group/CheckboxGroup.js +1 -1
- package/dist/cjs/components/date-picker/DatePicker.js +1 -1
- package/dist/cjs/components/date-picker/parts/DateCalendar.js +1 -1
- package/dist/cjs/components/dialog/Dialog.d.ts +98 -11
- package/dist/cjs/components/dialog/Dialog.js +1 -1
- package/dist/cjs/components/dialog/parts/DialogActions.js +1 -1
- package/dist/cjs/components/dialog/parts/DialogContent.js +1 -1
- package/dist/cjs/components/dialog/parts/DialogTitle.js +1 -1
- package/dist/cjs/components/fieldset/Fieldset.js +1 -1
- package/dist/cjs/components/form/Form.js +1 -1
- package/dist/cjs/components/form-field/parts/FormContextualLink.js +1 -1
- package/dist/cjs/components/form-field/parts/FormFeedbackText.js +1 -1
- package/dist/cjs/components/form-field/parts/FormHelperText.js +1 -1
- package/dist/cjs/components/full-page-loader/FullPageLoader.js +1 -1
- package/dist/cjs/components/icon/Icon.js +1 -1
- package/dist/cjs/components/icon-button/CircularIconButton.d.ts +68 -3
- package/dist/cjs/components/icon-button/CircularIconButton.js +1 -1
- package/dist/cjs/components/icon-button/IconButton.js +1 -1
- package/dist/cjs/components/input/Input.js +1 -1
- package/dist/cjs/components/label/Label.js +1 -1
- package/dist/cjs/components/link/Link.d.ts +1 -1
- package/dist/cjs/components/link/Link.js +1 -1
- package/dist/cjs/components/menu/parts/MenuContent.js +1 -1
- package/dist/cjs/components/multi-select/MultiSelect.js +1 -1
- package/dist/cjs/components/multi-select/parts/MultiSelectButton.js +1 -1
- package/dist/cjs/components/multi-select/parts/MultiSelectOptGroup.js +1 -1
- package/dist/cjs/components/multi-select/parts/MultiSelectOption.js +1 -1
- package/dist/cjs/components/multi-select/parts/MultiSelectPopover.js +1 -1
- package/dist/cjs/components/multi-select-field/MultiSelectField.js +1 -1
- package/dist/cjs/components/pill/Pill.js +1 -1
- package/dist/cjs/components/progress-bar/ProgressBar.js +1 -1
- package/dist/cjs/components/select/parts/SearchInput.js +1 -1
- package/dist/cjs/components/select/parts/SelectButton.js +1 -1
- package/dist/cjs/components/select/parts/SelectOption.js +1 -1
- package/dist/cjs/components/select/parts/SelectOptionHelper.js +1 -1
- package/dist/cjs/components/selectable-button-group/SelectableButtonGroup.js +1 -1
- package/dist/cjs/components/selectable-button-group/parts/SelectableButton.js +1 -1
- package/dist/cjs/components/side-panel/SidePanel.d.ts +152 -0
- package/dist/cjs/components/side-panel/SidePanel.js +1 -0
- package/dist/cjs/components/side-panel/parts/SidePanelContent.d.ts +71 -0
- package/dist/cjs/components/side-panel/parts/SidePanelContent.js +1 -0
- package/dist/cjs/components/side-panel/parts/SidePanelDragIndicator.d.ts +54 -0
- package/dist/cjs/components/side-panel/parts/SidePanelDragIndicator.js +1 -0
- package/dist/cjs/components/side-panel/parts/SidePanelFooter.d.ts +27 -0
- package/dist/cjs/components/side-panel/parts/SidePanelFooter.js +1 -0
- package/dist/cjs/components/side-panel/parts/SidePanelHeader.d.ts +75 -0
- package/dist/cjs/components/side-panel/parts/SidePanelHeader.js +1 -0
- package/dist/cjs/components/spinner/Spinner.js +1 -1
- package/dist/cjs/components/tabs/Tabs.js +1 -1
- package/dist/cjs/components/tabs/Tabs.variant.js +1 -1
- package/dist/cjs/components/tabs/parts/TabList.js +1 -1
- package/dist/cjs/components/text/Text.js +1 -1
- package/dist/cjs/components/text-area/TextArea.js +1 -1
- package/dist/cjs/components/toast/UnityToast.d.ts +1 -1
- package/dist/cjs/components/toast/UnityToast.js +1 -1
- package/dist/cjs/components/toast/toast.d.ts +2 -1
- package/dist/cjs/components/toast/toast.js +1 -1
- package/dist/cjs/components/tooltip/Tooltip.d.ts +1 -1
- package/dist/cjs/components/tooltip/Tooltip.js +1 -1
- package/dist/cjs/index.d.ts +8 -0
- package/dist/cjs/index.js +1 -1
- package/dist/esm/components/actionable/Actionable.d.mts +6 -5
- package/dist/esm/components/alert/Alert.mjs +30 -20
- package/dist/esm/components/app-menu/parts/AppMenuFooter.mjs +11 -3
- package/dist/esm/components/avatar/Avatar.mjs +15 -14
- package/dist/esm/components/badge/Badge.mjs +7 -6
- package/dist/esm/components/bottom-sheet/BottomSheet.d.mts +153 -0
- package/dist/esm/components/bottom-sheet/BottomSheet.mjs +68 -0
- package/dist/esm/components/bottom-sheet/parts/BottomSheetContent.d.mts +70 -0
- package/dist/esm/components/bottom-sheet/parts/BottomSheetContent.mjs +26 -0
- package/dist/esm/components/bottom-sheet/parts/BottomSheetDragIndicator.d.mts +54 -0
- package/dist/esm/components/bottom-sheet/parts/BottomSheetDragIndicator.mjs +67 -0
- package/dist/esm/components/bottom-sheet/parts/BottomSheetFooter.d.mts +27 -0
- package/dist/esm/components/bottom-sheet/parts/BottomSheetFooter.mjs +28 -0
- package/dist/esm/components/bottom-sheet/parts/BottomSheetHeader.d.mts +83 -0
- package/dist/esm/components/bottom-sheet/parts/BottomSheetHeader.mjs +45 -0
- package/dist/esm/components/breadcrumbs/Breadcrumbs.mjs +11 -11
- package/dist/esm/components/breadcrumbs/parts/Breadcrumb.mjs +1 -1
- package/dist/esm/components/button/Button.mjs +25 -24
- package/dist/esm/components/button/Button.variants.mjs +2 -2
- package/dist/esm/components/checkbox/Checkbox.mjs +13 -5
- package/dist/esm/components/checkbox/parts/CheckboxIndicator.mjs +1 -1
- package/dist/esm/components/checkbox-group/CheckboxGroup.mjs +32 -25
- package/dist/esm/components/date-picker/DatePicker.mjs +2 -1
- package/dist/esm/components/date-picker/parts/DateCalendar.mjs +20 -20
- package/dist/esm/components/dialog/Dialog.d.mts +98 -11
- package/dist/esm/components/dialog/Dialog.mjs +50 -29
- package/dist/esm/components/dialog/parts/DialogActions.mjs +11 -4
- package/dist/esm/components/dialog/parts/DialogContent.mjs +16 -8
- package/dist/esm/components/dialog/parts/DialogTitle.mjs +5 -5
- package/dist/esm/components/fieldset/Fieldset.mjs +1 -0
- package/dist/esm/components/form/Form.mjs +13 -12
- package/dist/esm/components/form-field/parts/FormContextualLink.mjs +21 -19
- package/dist/esm/components/form-field/parts/FormFeedbackText.mjs +26 -23
- package/dist/esm/components/form-field/parts/FormHelperText.mjs +11 -10
- package/dist/esm/components/full-page-loader/FullPageLoader.mjs +24 -15
- package/dist/esm/components/icon/Icon.mjs +1 -0
- package/dist/esm/components/icon-button/CircularIconButton.d.mts +68 -3
- package/dist/esm/components/icon-button/CircularIconButton.mjs +58 -24
- package/dist/esm/components/icon-button/IconButton.mjs +16 -15
- package/dist/esm/components/input/Input.mjs +23 -22
- package/dist/esm/components/label/Label.mjs +9 -8
- package/dist/esm/components/link/Link.d.mts +1 -1
- package/dist/esm/components/link/Link.mjs +18 -17
- package/dist/esm/components/menu/parts/MenuContent.mjs +3 -2
- package/dist/esm/components/multi-select/MultiSelect.mjs +33 -32
- package/dist/esm/components/multi-select/parts/MultiSelectButton.mjs +16 -15
- package/dist/esm/components/multi-select/parts/MultiSelectOptGroup.mjs +8 -8
- package/dist/esm/components/multi-select/parts/MultiSelectOption.mjs +12 -10
- package/dist/esm/components/multi-select/parts/MultiSelectPopover.mjs +4 -4
- package/dist/esm/components/multi-select-field/MultiSelectField.mjs +14 -13
- package/dist/esm/components/pill/Pill.mjs +4 -3
- package/dist/esm/components/progress-bar/ProgressBar.mjs +8 -7
- package/dist/esm/components/select/parts/SearchInput.mjs +7 -7
- package/dist/esm/components/select/parts/SelectButton.mjs +40 -31
- package/dist/esm/components/select/parts/SelectOption.mjs +5 -4
- package/dist/esm/components/select/parts/SelectOptionHelper.mjs +11 -9
- package/dist/esm/components/selectable-button-group/SelectableButtonGroup.mjs +20 -11
- package/dist/esm/components/selectable-button-group/parts/SelectableButton.mjs +8 -7
- package/dist/esm/components/side-panel/SidePanel.d.mts +152 -0
- package/dist/esm/components/side-panel/SidePanel.mjs +67 -0
- package/dist/esm/components/side-panel/parts/SidePanelContent.d.mts +71 -0
- package/dist/esm/components/side-panel/parts/SidePanelContent.mjs +26 -0
- package/dist/esm/components/side-panel/parts/SidePanelDragIndicator.d.mts +54 -0
- package/dist/esm/components/side-panel/parts/SidePanelDragIndicator.mjs +67 -0
- package/dist/esm/components/side-panel/parts/SidePanelFooter.d.mts +27 -0
- package/dist/esm/components/side-panel/parts/SidePanelFooter.mjs +20 -0
- package/dist/esm/components/side-panel/parts/SidePanelHeader.d.mts +75 -0
- package/dist/esm/components/side-panel/parts/SidePanelHeader.mjs +43 -0
- package/dist/esm/components/spinner/Spinner.mjs +18 -17
- package/dist/esm/components/tabs/Tabs.mjs +19 -10
- package/dist/esm/components/tabs/Tabs.variant.mjs +1 -1
- package/dist/esm/components/tabs/parts/TabList.mjs +1 -1
- package/dist/esm/components/text/Text.mjs +11 -10
- package/dist/esm/components/text-area/TextArea.mjs +21 -20
- package/dist/esm/components/toast/UnityToast.d.mts +1 -1
- package/dist/esm/components/toast/UnityToast.mjs +23 -20
- package/dist/esm/components/toast/toast.d.mts +2 -1
- package/dist/esm/components/toast/toast.mjs +15 -13
- package/dist/esm/components/tooltip/Tooltip.d.mts +1 -1
- package/dist/esm/components/tooltip/Tooltip.mjs +12 -11
- package/dist/esm/index.d.mts +8 -0
- package/dist/esm/index.mjs +219 -192
- package/package.json +12 -7
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { tv as
|
|
1
|
+
import { jsxs as t, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as p } from "react";
|
|
3
|
+
import { tv as m } from "tailwind-variants";
|
|
4
4
|
import f from "../../hooks/use-id.mjs";
|
|
5
|
-
const h =
|
|
5
|
+
const h = m({
|
|
6
6
|
slots: {
|
|
7
7
|
base: "uy-flex uy-flex-col uy-items-center uy-gap-200",
|
|
8
8
|
indicator: "",
|
|
@@ -36,34 +36,35 @@ const h = p({
|
|
|
36
36
|
color: "primary"
|
|
37
37
|
}
|
|
38
38
|
});
|
|
39
|
-
function n({ label: l, color: o, size:
|
|
40
|
-
const
|
|
39
|
+
function n({ label: l, color: o, size: e, role: r = "status", ...s }, c) {
|
|
40
|
+
const a = `uy-spinner-label-${f()}`, {
|
|
41
41
|
base: d,
|
|
42
42
|
indicator: y,
|
|
43
43
|
label: u
|
|
44
44
|
} = h({
|
|
45
|
-
size:
|
|
45
|
+
size: e,
|
|
46
46
|
color: o
|
|
47
47
|
});
|
|
48
|
-
return /* @__PURE__ */
|
|
48
|
+
return /* @__PURE__ */ t(
|
|
49
49
|
"div",
|
|
50
50
|
{
|
|
51
51
|
...s,
|
|
52
52
|
ref: c,
|
|
53
53
|
role: r,
|
|
54
54
|
className: d(),
|
|
55
|
-
"aria-labelledby": r === "status" ?
|
|
55
|
+
"aria-labelledby": r === "status" ? a : void 0,
|
|
56
56
|
"aria-live": "polite",
|
|
57
|
+
"data-dd-privacy": "allow",
|
|
57
58
|
children: [
|
|
58
|
-
/* @__PURE__ */
|
|
59
|
+
/* @__PURE__ */ t(
|
|
59
60
|
"svg",
|
|
60
61
|
{
|
|
61
62
|
viewBox: "0 0 100 100",
|
|
62
63
|
"aria-hidden": "true",
|
|
63
64
|
className: y(),
|
|
64
65
|
children: [
|
|
65
|
-
/* @__PURE__ */
|
|
66
|
-
/* @__PURE__ */
|
|
66
|
+
/* @__PURE__ */ i("title", { children: "Loading" }),
|
|
67
|
+
/* @__PURE__ */ i(
|
|
67
68
|
"circle",
|
|
68
69
|
{
|
|
69
70
|
cx: "50",
|
|
@@ -85,12 +86,12 @@ function n({ label: l, color: o, size: i, role: r = "status", ...s }, c) {
|
|
|
85
86
|
]
|
|
86
87
|
}
|
|
87
88
|
),
|
|
88
|
-
/* @__PURE__ */
|
|
89
|
+
/* @__PURE__ */ i(
|
|
89
90
|
"span",
|
|
90
91
|
{
|
|
91
|
-
id:
|
|
92
|
+
id: a,
|
|
92
93
|
className: u(),
|
|
93
|
-
"aria-hidden":
|
|
94
|
+
"aria-hidden": e !== "small",
|
|
94
95
|
children: l
|
|
95
96
|
}
|
|
96
97
|
)
|
|
@@ -99,9 +100,9 @@ function n({ label: l, color: o, size: i, role: r = "status", ...s }, c) {
|
|
|
99
100
|
);
|
|
100
101
|
}
|
|
101
102
|
n.displayName = "Spinner";
|
|
102
|
-
const
|
|
103
|
+
const S = p(
|
|
103
104
|
n
|
|
104
105
|
);
|
|
105
106
|
export {
|
|
106
|
-
|
|
107
|
+
S as Spinner
|
|
107
108
|
};
|
|
@@ -1,15 +1,24 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { Tabs as
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as e } from "react";
|
|
3
|
+
import { Tabs as f } from "react-aria-components";
|
|
4
4
|
import { TabsProvider as p } from "./Tabs.context.mjs";
|
|
5
|
-
import { tabsVariant as
|
|
6
|
-
const
|
|
7
|
-
({ children:
|
|
8
|
-
const { base:
|
|
9
|
-
return /* @__PURE__ */
|
|
5
|
+
import { tabsVariant as d } from "./Tabs.variant.mjs";
|
|
6
|
+
const b = e(
|
|
7
|
+
({ children: s, variant: r, scrollable: a = !1, ...m }, t) => {
|
|
8
|
+
const { base: i } = d({ variant: r, scrollable: a });
|
|
9
|
+
return /* @__PURE__ */ o(p, { variant: r, scrollable: a, children: /* @__PURE__ */ o(
|
|
10
|
+
f,
|
|
11
|
+
{
|
|
12
|
+
"data-dd-privacy": "allow",
|
|
13
|
+
ref: t,
|
|
14
|
+
className: i(),
|
|
15
|
+
...m,
|
|
16
|
+
children: s
|
|
17
|
+
}
|
|
18
|
+
) });
|
|
10
19
|
}
|
|
11
20
|
);
|
|
12
|
-
|
|
21
|
+
b.displayName = "Tabs";
|
|
13
22
|
export {
|
|
14
|
-
|
|
23
|
+
b as Tabs
|
|
15
24
|
};
|
|
@@ -51,7 +51,7 @@ const C = T(
|
|
|
51
51
|
{
|
|
52
52
|
ref: r,
|
|
53
53
|
"data-testid": "scrollable-tab-list",
|
|
54
|
-
className: "uy-overflow-x-auto uy-overflow-y-hidden uy-border-b-[1.25px] uy-border-b-border-form-enabled",
|
|
54
|
+
className: "uy-overflow-x-auto uy-overflow-y-hidden uy-border-b-[1.25px] uy-border-solid uy-border-b-border-form-enabled",
|
|
55
55
|
onScroll: R,
|
|
56
56
|
children: /* @__PURE__ */ c(m, { ref: b, className: d(), children: f })
|
|
57
57
|
}
|
|
@@ -24,24 +24,25 @@ const y = {
|
|
|
24
24
|
({
|
|
25
25
|
children: e,
|
|
26
26
|
variant: o,
|
|
27
|
-
color:
|
|
28
|
-
isTruncated:
|
|
27
|
+
color: s,
|
|
28
|
+
isTruncated: a,
|
|
29
29
|
lineClamp: t,
|
|
30
|
-
asElement:
|
|
31
|
-
className:
|
|
32
|
-
...
|
|
30
|
+
asElement: n,
|
|
31
|
+
className: r,
|
|
32
|
+
...l
|
|
33
33
|
}, i) => {
|
|
34
34
|
const m = h({
|
|
35
35
|
variant: o,
|
|
36
|
-
color:
|
|
37
|
-
isTruncated:
|
|
36
|
+
color: s,
|
|
37
|
+
isTruncated: a,
|
|
38
38
|
isLineClamped: t !== void 0,
|
|
39
|
-
className:
|
|
39
|
+
className: r
|
|
40
40
|
}), p = y[o ?? "inherit"];
|
|
41
41
|
return /* @__PURE__ */ d(
|
|
42
|
-
|
|
42
|
+
n ?? p,
|
|
43
43
|
{
|
|
44
|
-
|
|
44
|
+
"data-dd-privacy": "mask",
|
|
45
|
+
...l,
|
|
45
46
|
ref: i,
|
|
46
47
|
className: m,
|
|
47
48
|
style: { "--uy-text-line-clamp": t },
|
|
@@ -56,51 +56,52 @@ const W = z({
|
|
|
56
56
|
isDisabled: !1,
|
|
57
57
|
isReadOnly: !1
|
|
58
58
|
}
|
|
59
|
-
}),
|
|
59
|
+
}), k = v(
|
|
60
60
|
({
|
|
61
|
-
isInvalid:
|
|
62
|
-
isLoading:
|
|
61
|
+
isInvalid: s,
|
|
62
|
+
isLoading: i,
|
|
63
63
|
isDisabled: t,
|
|
64
|
-
isReadOnly:
|
|
65
|
-
isResizable:
|
|
64
|
+
isReadOnly: a,
|
|
65
|
+
isResizable: n = !1,
|
|
66
66
|
...y
|
|
67
67
|
}, b) => {
|
|
68
|
-
const
|
|
69
|
-
isDisabled: !
|
|
68
|
+
const o = M(), { containerRef: l, handleResizeStart: m } = L({
|
|
69
|
+
isDisabled: !n || t || a
|
|
70
70
|
}), { base: c, inputWrapper: p, input: g, state: x, resizeHandle: h } = W({
|
|
71
|
-
isInvalid:
|
|
71
|
+
isInvalid: s,
|
|
72
72
|
isDisabled: t,
|
|
73
|
-
isReadOnly:
|
|
73
|
+
isReadOnly: a
|
|
74
74
|
});
|
|
75
75
|
return /* @__PURE__ */ r("div", { ref: l, className: c(), children: [
|
|
76
76
|
/* @__PURE__ */ r("div", { className: p(), children: [
|
|
77
77
|
/* @__PURE__ */ e(
|
|
78
78
|
w,
|
|
79
79
|
{
|
|
80
|
+
"data-dd-privacy": "mask",
|
|
80
81
|
...y,
|
|
81
82
|
ref: b,
|
|
82
83
|
className: g(),
|
|
83
|
-
"aria-busy":
|
|
84
|
+
"aria-busy": i
|
|
84
85
|
}
|
|
85
86
|
),
|
|
86
87
|
/* @__PURE__ */ r("div", { className: x(), children: [
|
|
87
|
-
|
|
88
|
+
i && /* @__PURE__ */ e(
|
|
88
89
|
N,
|
|
89
90
|
{
|
|
90
91
|
color: "inherit",
|
|
91
92
|
size: "small",
|
|
92
|
-
label:
|
|
93
|
+
label: o.formatMessage({
|
|
93
94
|
id: "unity:component:form-field:form-input:spinner:label",
|
|
94
95
|
defaultMessage: "Loading"
|
|
95
96
|
})
|
|
96
97
|
}
|
|
97
98
|
),
|
|
98
|
-
|
|
99
|
+
s && /* @__PURE__ */ e(
|
|
99
100
|
D,
|
|
100
101
|
{
|
|
101
102
|
src: "WarningCircleOutlined",
|
|
102
103
|
color: "content.form.invalid",
|
|
103
|
-
alt:
|
|
104
|
+
alt: o.formatMessage({
|
|
104
105
|
id: "unity:component:form-field:form-input:error:alt",
|
|
105
106
|
defaultMessage: "Error"
|
|
106
107
|
})
|
|
@@ -108,20 +109,20 @@ const W = z({
|
|
|
108
109
|
)
|
|
109
110
|
] })
|
|
110
111
|
] }),
|
|
111
|
-
|
|
112
|
+
n && !t && !a && /* @__PURE__ */ e(
|
|
112
113
|
"div",
|
|
113
114
|
{
|
|
114
115
|
className: h(),
|
|
115
116
|
onMouseDown: m,
|
|
116
117
|
role: "button",
|
|
117
118
|
tabIndex: 0,
|
|
118
|
-
"aria-label":
|
|
119
|
+
"aria-label": o.formatMessage({
|
|
119
120
|
id: "unity:component:form-field:textarea:resize-handle:label",
|
|
120
121
|
defaultMessage: "Resize textarea"
|
|
121
122
|
}),
|
|
122
123
|
onKeyDown: (u) => {
|
|
123
|
-
var
|
|
124
|
-
(u.key === "Enter" || u.key === " ") && (u.preventDefault(), (
|
|
124
|
+
var d, f;
|
|
125
|
+
(u.key === "Enter" || u.key === " ") && (u.preventDefault(), (f = (d = l.current) == null ? void 0 : d.querySelector("textarea")) == null || f.focus());
|
|
125
126
|
},
|
|
126
127
|
children: /* @__PURE__ */ r(
|
|
127
128
|
"svg",
|
|
@@ -154,8 +155,8 @@ const W = z({
|
|
|
154
155
|
] });
|
|
155
156
|
}
|
|
156
157
|
);
|
|
157
|
-
|
|
158
|
+
k.displayName = "TextArea";
|
|
158
159
|
export {
|
|
159
|
-
|
|
160
|
+
k as TextArea,
|
|
160
161
|
W as textArea
|
|
161
162
|
};
|
|
@@ -49,7 +49,7 @@ export interface UnityToastProps extends Required<Pick<VariantProps<typeof unity
|
|
|
49
49
|
* - `ToastAction`(optional): The action on the toast
|
|
50
50
|
*/
|
|
51
51
|
declare const UnityToast: {
|
|
52
|
-
({ children, onClose, variant, inline, }: PropsWithChildren<UnityToastProps>): import("react/jsx-runtime").JSX.Element;
|
|
52
|
+
({ children, onClose, variant, inline, ...rest }: PropsWithChildren<UnityToastProps>): import("react/jsx-runtime").JSX.Element;
|
|
53
53
|
displayName: string;
|
|
54
54
|
};
|
|
55
55
|
export { UnityToast };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as r, jsxs as l } from "react/jsx-runtime";
|
|
2
|
-
import { isValidElement as n, Fragment as
|
|
3
|
-
import { useIntl as
|
|
2
|
+
import { isValidElement as n, Fragment as c, Children as y } from "react";
|
|
3
|
+
import { useIntl as d } from "react-intl";
|
|
4
4
|
import { tv as m } from "tailwind-variants";
|
|
5
|
-
import { IconButton as
|
|
5
|
+
import { IconButton as p } from "../icon-button/IconButton.mjs";
|
|
6
6
|
import { Icon as f } from "../icon/Icon.mjs";
|
|
7
|
-
import { ToastTitle as
|
|
8
|
-
import { ToastProvider as
|
|
9
|
-
const
|
|
7
|
+
import { ToastTitle as b } from "./parts/ToastTitle.mjs";
|
|
8
|
+
import { ToastProvider as g } from "./Toast.context.mjs";
|
|
9
|
+
const x = m({
|
|
10
10
|
base: "sm:uy-w-[416px] uy-border uy-border-solid uy-rounded-75 uy-text-content-neutral uy-bg-surface-neutral uy-shadow-floating uy-p-100 uy-flex uy-gap-125",
|
|
11
11
|
variants: {
|
|
12
12
|
variant: {
|
|
@@ -14,24 +14,27 @@ const g = m({
|
|
|
14
14
|
error: "uy-border-border-danger"
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
-
}),
|
|
18
|
-
const s = n(e) && e.type ===
|
|
19
|
-
if (
|
|
20
|
-
(o) => n(o) && o.type ===
|
|
17
|
+
}), T = (e) => {
|
|
18
|
+
const s = n(e) && e.type === c ? e.props.children : e;
|
|
19
|
+
if (y.toArray(s).filter(
|
|
20
|
+
(o) => n(o) && o.type === b
|
|
21
21
|
).length !== 1)
|
|
22
22
|
throw new Error("UnityToast must have one ToastTitle component");
|
|
23
|
-
},
|
|
23
|
+
}, h = ({
|
|
24
24
|
children: e,
|
|
25
25
|
onClose: s,
|
|
26
26
|
variant: t,
|
|
27
|
-
inline: o = !0
|
|
27
|
+
inline: o = !0,
|
|
28
|
+
...i
|
|
28
29
|
}) => {
|
|
29
|
-
const a =
|
|
30
|
-
|
|
31
|
-
const u =
|
|
32
|
-
return /* @__PURE__ */ r(
|
|
30
|
+
const a = d();
|
|
31
|
+
T(e);
|
|
32
|
+
const u = x({ variant: t });
|
|
33
|
+
return /* @__PURE__ */ r(g, { inline: o, children: /* @__PURE__ */ l(
|
|
33
34
|
"div",
|
|
34
35
|
{
|
|
36
|
+
"data-dd-privacy": "mask",
|
|
37
|
+
...i,
|
|
35
38
|
tabIndex: -1,
|
|
36
39
|
role: t === "error" ? "alert" : "status",
|
|
37
40
|
"aria-atomic": "true",
|
|
@@ -63,11 +66,11 @@ const g = m({
|
|
|
63
66
|
"div",
|
|
64
67
|
{
|
|
65
68
|
role: "presentation",
|
|
66
|
-
className: "uy-border-l-[1px] uy-border-border-neutral uy-self-stretch"
|
|
69
|
+
className: "uy-border-l-[1px] uy-border-solid uy-border-border-neutral uy-self-stretch"
|
|
67
70
|
}
|
|
68
71
|
),
|
|
69
72
|
/* @__PURE__ */ r(
|
|
70
|
-
|
|
73
|
+
p,
|
|
71
74
|
{
|
|
72
75
|
icon: "CloseOutlined",
|
|
73
76
|
iconRole: "presentation",
|
|
@@ -84,7 +87,7 @@ const g = m({
|
|
|
84
87
|
}
|
|
85
88
|
) });
|
|
86
89
|
};
|
|
87
|
-
|
|
90
|
+
h.displayName = "UnityToast";
|
|
88
91
|
export {
|
|
89
|
-
|
|
92
|
+
h as UnityToast
|
|
90
93
|
};
|
|
@@ -4,6 +4,7 @@ import { UnityToastProps } from './UnityToast.mjs';
|
|
|
4
4
|
interface Base {
|
|
5
5
|
title: ReactNode;
|
|
6
6
|
content?: ReactNode;
|
|
7
|
+
datadogPrivacy?: 'allow' | 'mask' | 'hidden';
|
|
7
8
|
}
|
|
8
9
|
interface WithAction {
|
|
9
10
|
action: ReactNode;
|
|
@@ -39,5 +40,5 @@ interface ErrorParamsWithAction extends Base, WithAction {
|
|
|
39
40
|
* @param prop.actionOnPress (optional) the function to trigger when click on the action
|
|
40
41
|
* @param prop.duration (optional) to override the toast duration
|
|
41
42
|
*/
|
|
42
|
-
declare function toast({ title, content, variant, action, actionOnPress, duration, }: SuccessParams | ErrorParams | SuccessParamsWithAction | ErrorParamsWithAction): string;
|
|
43
|
+
declare function toast({ title, content, variant, action, actionOnPress, duration, datadogPrivacy, }: SuccessParams | ErrorParams | SuccessParamsWithAction | ErrorParamsWithAction): string;
|
|
43
44
|
export { toast };
|
|
@@ -1,37 +1,39 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as e, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import m from "react-hot-toast";
|
|
3
|
-
import { ToastAction as
|
|
4
|
-
import { ToastContent as
|
|
3
|
+
import { ToastAction as p } from "./parts/ToastAction.mjs";
|
|
4
|
+
import { ToastContent as f } from "./parts/ToastContent.mjs";
|
|
5
5
|
import { ToastTitle as T } from "./parts/ToastTitle.mjs";
|
|
6
6
|
import { TOAST_CONFIG as u } from "./ToastManager.mjs";
|
|
7
|
-
import { UnityToast as
|
|
8
|
-
function
|
|
7
|
+
import { UnityToast as c } from "./UnityToast.mjs";
|
|
8
|
+
function k({
|
|
9
9
|
title: s,
|
|
10
10
|
content: o,
|
|
11
11
|
variant: i,
|
|
12
12
|
action: t,
|
|
13
13
|
actionOnPress: n,
|
|
14
|
-
duration:
|
|
14
|
+
duration: d,
|
|
15
|
+
datadogPrivacy: l = "mask"
|
|
15
16
|
}) {
|
|
16
17
|
return m.custom(
|
|
17
|
-
(
|
|
18
|
-
|
|
18
|
+
(a) => /* @__PURE__ */ e(
|
|
19
|
+
c,
|
|
19
20
|
{
|
|
20
21
|
onClose: () => {
|
|
21
|
-
m.dismiss(
|
|
22
|
+
m.dismiss(a.id);
|
|
22
23
|
},
|
|
23
24
|
variant: i,
|
|
24
25
|
inline: !!o,
|
|
26
|
+
"data-dd-privacy": l,
|
|
25
27
|
children: [
|
|
26
28
|
/* @__PURE__ */ r(T, { children: s }),
|
|
27
|
-
o ? /* @__PURE__ */ r(
|
|
28
|
-
t ? /* @__PURE__ */ r(
|
|
29
|
+
o ? /* @__PURE__ */ r(f, { children: o }) : null,
|
|
30
|
+
t ? /* @__PURE__ */ r(p, { onPress: n, children: t }) : null
|
|
29
31
|
]
|
|
30
32
|
}
|
|
31
33
|
),
|
|
32
|
-
{ duration:
|
|
34
|
+
{ duration: d ?? u[i].duration }
|
|
33
35
|
);
|
|
34
36
|
}
|
|
35
37
|
export {
|
|
36
|
-
|
|
38
|
+
k as toast
|
|
37
39
|
};
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import { jsxs as l, jsx as
|
|
2
|
-
import { TooltipTrigger as
|
|
1
|
+
import { jsxs as l, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { TooltipTrigger as r, Tooltip as y, Button as u } from "react-aria-components";
|
|
3
3
|
import { Button as a } from "../button/Button.mjs";
|
|
4
|
-
const i = (t) => t.type === a || t.type ===
|
|
5
|
-
function d({ title: t, children:
|
|
6
|
-
return /* @__PURE__ */ l(
|
|
7
|
-
|
|
8
|
-
/* @__PURE__ */
|
|
9
|
-
|
|
4
|
+
const i = (t) => t.type === a || t.type === u;
|
|
5
|
+
function d({ title: t, children: o }) {
|
|
6
|
+
return /* @__PURE__ */ l(r, { delay: 500, closeDelay: 1500, children: [
|
|
7
|
+
o,
|
|
8
|
+
/* @__PURE__ */ e(
|
|
9
|
+
y,
|
|
10
10
|
{
|
|
11
|
-
|
|
11
|
+
"data-dd-privacy": "allow",
|
|
12
|
+
offset: i(o) ? 4 : 8,
|
|
12
13
|
className: "uy-inline-flex uy-rounded-50 uy-pl-100 uy-pr-100 uy-pt-50 uy-pb-50 uy-bg-grayscale-L12 uy-max-w-[300px]",
|
|
13
|
-
children: /* @__PURE__ */
|
|
14
|
+
children: /* @__PURE__ */ e("p", { className: "uy-typography-body-small uy-text-content-inverted uy-overflow-hidden uy-text-ellipsis uy-line-clamp-3", children: t })
|
|
14
15
|
}
|
|
15
16
|
)
|
|
16
17
|
] });
|
|
17
18
|
}
|
|
18
19
|
export {
|
|
19
|
-
d as
|
|
20
|
+
d as Tooltip
|
|
20
21
|
};
|
package/dist/esm/index.d.mts
CHANGED
|
@@ -16,6 +16,10 @@ export * from './components/avatar/parts/AvatarFallback.mjs';
|
|
|
16
16
|
export * from './components/avatar/parts/AvatarImage.mjs';
|
|
17
17
|
export * from './components/avatar/parts/AvatarPair.mjs';
|
|
18
18
|
export * from './components/badge/Badge.mjs';
|
|
19
|
+
export * from './components/bottom-sheet/BottomSheet.mjs';
|
|
20
|
+
export * from './components/bottom-sheet/parts/BottomSheetHeader.mjs';
|
|
21
|
+
export * from './components/bottom-sheet/parts/BottomSheetContent.mjs';
|
|
22
|
+
export * from './components/bottom-sheet/parts/BottomSheetFooter.mjs';
|
|
19
23
|
export * from './components/breadcrumbs/Breadcrumbs.mjs';
|
|
20
24
|
export * from './components/breadcrumbs/parts/Breadcrumb.mjs';
|
|
21
25
|
export * from './components/button/Button.mjs';
|
|
@@ -76,6 +80,10 @@ export * from './components/select/Select.mjs';
|
|
|
76
80
|
export * from './components/select-field/SelectField.mjs';
|
|
77
81
|
export * from './components/selectable-button-group/SelectableButtonGroup.mjs';
|
|
78
82
|
export * from './components/selectable-button-group/parts/SelectableButton.mjs';
|
|
83
|
+
export * from './components/side-panel/SidePanel.mjs';
|
|
84
|
+
export * from './components/side-panel/parts/SidePanelHeader.mjs';
|
|
85
|
+
export * from './components/side-panel/parts/SidePanelContent.mjs';
|
|
86
|
+
export * from './components/side-panel/parts/SidePanelFooter.mjs';
|
|
79
87
|
export * from './components/spinner/Spinner.mjs';
|
|
80
88
|
export * from './components/tabs/Tabs.mjs';
|
|
81
89
|
export * from './components/tabs/parts/Tab.mjs';
|