@alixpartners/ui-components 2.6.0 → 2.6.2
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/{RichTextEditor-JH6YBGiw.js → RichTextEditor-xCakhho7.js} +1 -1
- package/dist/{ToastProvider-DVycF0zU.js → ToastProvider-D5LImZ-Q.js} +26 -26
- package/dist/assets/Dialog.css +1 -1
- package/dist/components/Banner/Banner.d.ts +1 -1
- package/dist/components/Banner/Banner.test.js +1 -1
- package/dist/components/Button/Button.d.ts +1 -1
- package/dist/components/Button/Button.test.js +2 -2
- package/dist/components/Checkbox/Checkbox.d.ts +1 -1
- package/dist/components/Checkbox/Checkbox.js +3 -3
- package/dist/components/Checkbox/Checkbox.test.js +1 -1
- package/dist/components/CorusHeader/CorusHeader.d.ts +1 -1
- package/dist/components/CorusHeader/CorusHeader.js +1 -1
- package/dist/components/CorusHeader/DropdownItemContent.d.ts +1 -1
- package/dist/components/CorusHeader/DropdownItemContent.js +5 -5
- package/dist/components/CorusHeader/DropdownMenu.d.ts +1 -1
- package/dist/components/CorusHeader/DropdownMenu.js +1 -1
- package/dist/components/CorusHeader/MegaMenuContent.d.ts +1 -1
- package/dist/components/CorusHeader/MegaMenuContent.js +14 -14
- package/dist/components/CorusHeader/UserProfileIcon.d.ts +1 -1
- package/dist/components/Creatable/Creatable.d.ts +1 -1
- package/dist/components/Creatable/Creatable.js +1 -1
- package/dist/components/Datepicker/Datepicker.d.ts +1 -1
- package/dist/components/Datepicker/Datepicker.js +1 -1
- package/dist/components/Datepicker/Datepicker.test.js +1 -1
- package/dist/components/Dialog/Dialog.d.ts +8 -2
- package/dist/components/Dialog/Dialog.js +227 -195
- package/dist/components/Dialog/Dialog.test.js +227 -202
- package/dist/components/DragAndDrop/DragAndDrop.d.ts +1 -1
- package/dist/components/DragAndDrop/DragAndDrop.test.js +2 -2
- package/dist/components/Dropdown/Dropdown.d.ts +1 -1
- package/dist/components/Dropdown/Dropdown.js +1 -1
- package/dist/components/FilePicker/FilePicker.d.ts +9 -9
- package/dist/components/FilePicker/FilePicker.test.js +2 -2
- package/dist/components/Ghost/Ghost.d.ts +1 -1
- package/dist/components/Ghost/Ghost.test.js +1 -1
- package/dist/components/Icon/Icon.d.ts +1 -1
- package/dist/components/Icons/IconsGallery.d.ts +1 -1
- package/dist/components/Illustration/Illustration.d.ts +1 -1
- package/dist/components/Illustration/Illustration.test.js +1 -1
- package/dist/components/Input/Input.test.js +1 -1
- package/dist/components/Logo/Logo.d.ts +1 -1
- package/dist/components/Logos/LogosGallery.d.ts +1 -1
- package/dist/components/NavBar/NavBar.d.ts +1 -1
- package/dist/components/NavBar/NavBar.js +1 -1
- package/dist/components/Radio/Radio.d.ts +1 -1
- package/dist/components/Radio/Radio.js +9 -9
- package/dist/components/RadioGroup/RadioGroup.d.ts +1 -1
- package/dist/components/RadioGroup/RadioGroup.js +11 -11
- package/dist/components/RadioGroup/RadioGroup.test.js +1 -1
- package/dist/components/RichTextEditor/RichTextEditor.d.ts +1 -1
- package/dist/components/RichTextEditor/RichTextEditor.js +2 -2
- package/dist/components/RichTextEditor/RichTextEditor.test.js +2 -2
- package/dist/components/Search/Search.d.ts +1 -1
- package/dist/components/Search/Search.test.js +1 -1
- package/dist/components/Spinner/Spinner.d.ts +1 -1
- package/dist/components/SplitButton/SplitButton.d.ts +1 -1
- package/dist/components/SplitButton/SplitButton.js +3 -3
- package/dist/components/SplitButton/SplitButton.test.js +1 -1
- package/dist/components/Tab/Tab.d.ts +1 -1
- package/dist/components/TabNavigation/TabNavigation.d.ts +1 -1
- package/dist/components/Tag/Tag.d.ts +1 -1
- package/dist/components/Tag/Tag.test.js +1 -1
- package/dist/components/TagsFields/TagsFields.d.ts +1 -1
- package/dist/components/TagsFields/TagsFields.js +1 -1
- package/dist/components/Textarea/Textarea.d.ts +1 -1
- package/dist/components/Textarea/Textarea.test.js +1 -1
- package/dist/components/Toast/Toast.test.js +1 -1
- package/dist/components/ToastProvider/ToastProvider.d.ts +1 -2
- package/dist/components/ToastProvider/ToastProvider.js +1 -1
- package/dist/components/ToastProvider/ToastProvider.test.js +4 -4
- package/dist/components/Toggle/Toggle.d.ts +1 -1
- package/dist/components/Toggle/Toggle.js +126 -211
- package/dist/components/Toggle/Toggle.test.js +1 -1
- package/dist/components/Tooltip/Tooltip.d.ts +1 -1
- package/dist/components/Tooltip/Tooltip.js +61 -60
- package/dist/{index-6DGSlWJb.js → index-C2s_VtSb.js} +3 -3
- package/dist/index-C8H9A55g.js +222 -0
- package/dist/{index-CcsZYEYy.js → index-CCFDXH-J.js} +28 -29
- package/dist/index-CCnm5-ML.js +230 -0
- package/dist/{index-BVZdJVFB.js → index-CFqDEbIR.js} +191 -192
- package/dist/index-CfIcUHKK.js +70 -0
- package/dist/index-ChQc_Cm6.js +1544 -0
- package/dist/index-CmGGeUr0.js +142 -0
- package/dist/{index-IR8HlW5P.js → index-D_L0ncPJ.js} +4 -4
- package/dist/{index-banDzeKa.js → index-DkTDHhag.js} +1 -1
- package/dist/index-Ii4UOx3H.js +599 -0
- package/dist/{index-6j3vTf--.js → index-Nyh2Wa71.js} +5 -5
- package/dist/index-z_kiwVc3.js +237 -0
- package/dist/main.js +3 -3
- package/dist/storybook-docs-page.d.ts +1 -1
- package/dist/{useToast-CpwrYPvx.js → useToast-Cz5MGKnw.js} +1 -1
- package/dist/{vi.bdSIJ99Y-DWCVXj6K.js → vi.bdSIJ99Y-017e_Pkz.js} +3 -3
- package/package.json +1 -1
- package/dist/index-B4szHVNJ.js +0 -248
- package/dist/index-Bq1FiX6B.js +0 -93
- package/dist/index-CE9NpYQR.js +0 -604
- package/dist/index-CHy8gqvu.js +0 -353
- package/dist/index-CarlZuEo.js +0 -1610
- package/dist/index-DH9SO8qV.js +0 -221
- package/dist/index-kgC_DL6e.js +0 -216
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import * as a from "react";
|
|
2
|
+
import { d as T, h as A } from "./index-z_kiwVc3.js";
|
|
3
|
+
function E(n, e) {
|
|
4
|
+
return a.useReducer((r, t) => e[r][t] ?? r, n);
|
|
5
|
+
}
|
|
6
|
+
var R = (n) => {
|
|
7
|
+
const { present: e, children: r } = n, t = P(e), o = typeof r == "function" ? r({ present: t.isPresent }) : a.Children.only(r), c = T(t.ref, v(o));
|
|
8
|
+
return typeof r == "function" || t.isPresent ? a.cloneElement(o, { ref: c }) : null;
|
|
9
|
+
};
|
|
10
|
+
R.displayName = "Presence";
|
|
11
|
+
function P(n) {
|
|
12
|
+
const [e, r] = a.useState(), t = a.useRef(null), o = a.useRef(n), c = a.useRef("none"), p = n ? "mounted" : "unmounted", [N, s] = E(p, {
|
|
13
|
+
mounted: {
|
|
14
|
+
UNMOUNT: "unmounted",
|
|
15
|
+
ANIMATION_OUT: "unmountSuspended"
|
|
16
|
+
},
|
|
17
|
+
unmountSuspended: {
|
|
18
|
+
MOUNT: "mounted",
|
|
19
|
+
ANIMATION_END: "unmounted"
|
|
20
|
+
},
|
|
21
|
+
unmounted: {
|
|
22
|
+
MOUNT: "mounted"
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
return a.useEffect(() => {
|
|
26
|
+
const i = l(t.current);
|
|
27
|
+
c.current = N === "mounted" ? i : "none";
|
|
28
|
+
}, [N]), A(() => {
|
|
29
|
+
const i = t.current, m = o.current;
|
|
30
|
+
if (m !== n) {
|
|
31
|
+
const f = c.current, u = l(i);
|
|
32
|
+
n ? s("MOUNT") : u === "none" || (i == null ? void 0 : i.display) === "none" ? s("UNMOUNT") : s(m && f !== u ? "ANIMATION_OUT" : "UNMOUNT"), o.current = n;
|
|
33
|
+
}
|
|
34
|
+
}, [n, s]), A(() => {
|
|
35
|
+
if (e) {
|
|
36
|
+
let i;
|
|
37
|
+
const m = e.ownerDocument.defaultView ?? window, d = (u) => {
|
|
38
|
+
const g = l(t.current).includes(CSS.escape(u.animationName));
|
|
39
|
+
if (u.target === e && g && (s("ANIMATION_END"), !o.current)) {
|
|
40
|
+
const O = e.style.animationFillMode;
|
|
41
|
+
e.style.animationFillMode = "forwards", i = m.setTimeout(() => {
|
|
42
|
+
e.style.animationFillMode === "forwards" && (e.style.animationFillMode = O);
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
}, f = (u) => {
|
|
46
|
+
u.target === e && (c.current = l(t.current));
|
|
47
|
+
};
|
|
48
|
+
return e.addEventListener("animationstart", f), e.addEventListener("animationcancel", d), e.addEventListener("animationend", d), () => {
|
|
49
|
+
m.clearTimeout(i), e.removeEventListener("animationstart", f), e.removeEventListener("animationcancel", d), e.removeEventListener("animationend", d);
|
|
50
|
+
};
|
|
51
|
+
} else
|
|
52
|
+
s("ANIMATION_END");
|
|
53
|
+
}, [e, s]), {
|
|
54
|
+
isPresent: ["mounted", "unmountSuspended"].includes(N),
|
|
55
|
+
ref: a.useCallback((i) => {
|
|
56
|
+
t.current = i ? getComputedStyle(i) : null, r(i);
|
|
57
|
+
}, [])
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
function l(n) {
|
|
61
|
+
return (n == null ? void 0 : n.animationName) || "none";
|
|
62
|
+
}
|
|
63
|
+
function v(n) {
|
|
64
|
+
var t, o;
|
|
65
|
+
let e = (t = Object.getOwnPropertyDescriptor(n.props, "ref")) == null ? void 0 : t.get, r = e && "isReactWarning" in e && e.isReactWarning;
|
|
66
|
+
return r ? n.ref : (e = (o = Object.getOwnPropertyDescriptor(n, "ref")) == null ? void 0 : o.get, r = e && "isReactWarning" in e && e.isReactWarning, r ? n.props.ref : n.props.ref || n.ref);
|
|
67
|
+
}
|
|
68
|
+
export {
|
|
69
|
+
R as P
|
|
70
|
+
};
|