@notificationapi/react 0.0.5 → 0.0.7

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.
@@ -0,0 +1,66 @@
1
+ import { _ as R, C as w, a as I } from "./colors.js";
2
+ import * as e from "react";
3
+ import { I as j, u as y } from "./index3.js";
4
+ var z = { icon: { tag: "svg", attrs: { "fill-rule": "evenodd", viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z" } }] }, name: "close", theme: "outlined" }, E = function(s, c) {
5
+ return /* @__PURE__ */ e.createElement(j, R({}, s, {
6
+ ref: c,
7
+ icon: z
8
+ }));
9
+ }, _ = /* @__PURE__ */ e.forwardRef(E);
10
+ function S(n) {
11
+ return (s) => /* @__PURE__ */ e.createElement(w, {
12
+ theme: {
13
+ token: {
14
+ motion: !1,
15
+ zIndexPopupBase: 0
16
+ }
17
+ }
18
+ }, /* @__PURE__ */ e.createElement(n, Object.assign({}, s)));
19
+ }
20
+ const M = (n, s, c, L) => S((o) => {
21
+ const {
22
+ prefixCls: f,
23
+ style: p
24
+ } = o, a = e.useRef(null), [g, m] = e.useState(0), [v, P] = e.useState(0), [l, C] = y(!1, {
25
+ value: o.open
26
+ }), {
27
+ getPrefixCls: h
28
+ } = e.useContext(I), O = h("select", f);
29
+ e.useEffect(() => {
30
+ if (C(!0), typeof ResizeObserver < "u") {
31
+ const i = new ResizeObserver((t) => {
32
+ const r = t[0].target;
33
+ m(r.offsetHeight + 8), P(r.offsetWidth);
34
+ }), u = setInterval(() => {
35
+ var t;
36
+ const r = `.${O}-dropdown`, d = (t = a.current) === null || t === void 0 ? void 0 : t.querySelector(r);
37
+ d && (clearInterval(u), i.observe(d));
38
+ }, 10);
39
+ return () => {
40
+ clearInterval(u), i.disconnect();
41
+ };
42
+ }
43
+ }, []);
44
+ let b = Object.assign(Object.assign({}, o), {
45
+ style: Object.assign(Object.assign({}, p), {
46
+ margin: 0
47
+ }),
48
+ open: l,
49
+ visible: l,
50
+ getPopupContainer: () => a.current
51
+ });
52
+ const x = {
53
+ paddingBottom: g,
54
+ position: "relative",
55
+ minWidth: v
56
+ };
57
+ return /* @__PURE__ */ e.createElement("div", {
58
+ ref: a,
59
+ style: x
60
+ }, /* @__PURE__ */ e.createElement(n, Object.assign({}, b)));
61
+ });
62
+ export {
63
+ _ as R,
64
+ M as g,
65
+ S as w
66
+ };