@lanaco/lnc-react-ui 4.0.5 → 4.0.6
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/Chip.cjs +1 -1
- package/dist/Chip.js +10 -9
- package/dist/MenuItem.cjs +2 -2
- package/dist/MenuItem.js +37 -36
- package/dist/NotificationContainer.cjs +2 -2
- package/dist/NotificationContainer.js +24 -23
- package/package.json +1 -1
package/dist/Chip.cjs
CHANGED
|
@@ -24,4 +24,4 @@
|
|
|
24
24
|
&:active {
|
|
25
25
|
background-color: ${e=>!e.disabled&&n.getColorRgbaValue(e.theme,"Chip",e.color,"active","background","backgroundOpacity")};
|
|
26
26
|
}
|
|
27
|
-
`,B=(e,o)=>`calc(${n.getSizeValueWithUnits(e,o)} - 8px)`,b=V.forwardRef((e,o)=>{const{label:l,leadingIcon:a,trailingIcon:i,avatar:
|
|
27
|
+
`,B=(e,o)=>`calc(${n.getSizeValueWithUnits(e,o)} - 8px)`,b=V.forwardRef((e,o)=>{const{label:l,leadingIcon:a,trailingIcon:i,avatar:c=!1,size:s="small",borderRadius:h="regular",disabled:d=!1,tabIndex:p=0,onFocus:y=()=>{},onBlur:f=()=>{},onClick:C=()=>{},onKeyDown:$=()=>{},onLeadingIconClick:P=()=>{},onTrailingIconClick:T=()=>{},className:k="",style:I={},color:v="primary",avatarProps:x,children:R,...w}=e,g=q.useTheme(),u={theme:g,color:v,style:I,size:s,className:"lnc-ui-chip "+k};return t.jsxs(N,{ref:o,size:s,...u,trailingIcon:i,leadingIcon:a,avatar:c,borderRadius:h,disabled:d,tabIndex:p,onClick:C,onKeyDown:$,onBlur:f,onFocus:y,...w,children:[c&&t.jsx(O,{...u,disabled:d,sizeInUnits:B(g,s),...x}),a&&t.jsx("i",{className:m(a),onClick:P}),t.jsxs(t.Fragment,{children:[l,R]}),i&&t.jsx("i",{className:m(i),onClick:T})]})});b.propTypes={label:r.PropTypes.string,leadingIcon:r.PropTypes.string,trailingIcon:r.PropTypes.string,avatar:r.PropTypes.bool,borderRadius:r.PropTypes.oneOf(["slight","regular","edged","curved","none"]),disabled:r.PropTypes.bool,tabIndex:r.PropTypes.number,onBlur:r.PropTypes.func,onFocus:r.PropTypes.func,onClick:r.PropTypes.func,onKeyDown:r.PropTypes.func,onLeadingIconClick:r.PropTypes.func,onTrailingIconClick:r.PropTypes.func,className:r.PropTypes.string,style:r.PropTypes.object,color:r.PropTypes.oneOf(["primary","secondary","success","warning","danger","information","neutral","gray"]),size:r.PropTypes.oneOf(["small","medium","large"]),avatarProps:r.PropTypes.any};module.exports=b;
|
package/dist/Chip.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as u, jsx as
|
|
1
|
+
import { jsxs as u, jsx as c, Fragment as N } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as S } from "react";
|
|
3
3
|
import { P as a } from "./index-BYnWp42a.js";
|
|
4
4
|
import { n as j } from "./emotion-styled.browser.esm-BiK8DcgW.js";
|
|
@@ -73,8 +73,8 @@ const h = (e) => {
|
|
|
73
73
|
label: l,
|
|
74
74
|
leadingIcon: r,
|
|
75
75
|
trailingIcon: o,
|
|
76
|
-
avatar:
|
|
77
|
-
size:
|
|
76
|
+
avatar: d = !1,
|
|
77
|
+
size: i = "small",
|
|
78
78
|
borderRadius: f = "regular",
|
|
79
79
|
disabled: s = !1,
|
|
80
80
|
tabIndex: y = 0,
|
|
@@ -102,17 +102,18 @@ const h = (e) => {
|
|
|
102
102
|
theme: m,
|
|
103
103
|
color: w,
|
|
104
104
|
style: O,
|
|
105
|
+
size: i,
|
|
105
106
|
className: "lnc-ui-chip " + x
|
|
106
107
|
};
|
|
107
108
|
return /* @__PURE__ */ u(
|
|
108
109
|
L,
|
|
109
110
|
{
|
|
110
111
|
ref: n,
|
|
111
|
-
size:
|
|
112
|
+
size: i,
|
|
112
113
|
...g,
|
|
113
114
|
trailingIcon: o,
|
|
114
115
|
leadingIcon: r,
|
|
115
|
-
avatar:
|
|
116
|
+
avatar: d,
|
|
116
117
|
borderRadius: f,
|
|
117
118
|
disabled: s,
|
|
118
119
|
tabIndex: y,
|
|
@@ -122,21 +123,21 @@ const h = (e) => {
|
|
|
122
123
|
onFocus: C,
|
|
123
124
|
...T,
|
|
124
125
|
children: [
|
|
125
|
-
|
|
126
|
+
d && /* @__PURE__ */ c(
|
|
126
127
|
W,
|
|
127
128
|
{
|
|
128
129
|
...g,
|
|
129
130
|
disabled: s,
|
|
130
|
-
sizeInUnits: z(m,
|
|
131
|
+
sizeInUnits: z(m, i),
|
|
131
132
|
...P
|
|
132
133
|
}
|
|
133
134
|
),
|
|
134
|
-
r && /* @__PURE__ */
|
|
135
|
+
r && /* @__PURE__ */ c("i", { className: h(r), onClick: I }),
|
|
135
136
|
/* @__PURE__ */ u(N, { children: [
|
|
136
137
|
l,
|
|
137
138
|
R
|
|
138
139
|
] }),
|
|
139
|
-
o && /* @__PURE__ */
|
|
140
|
+
o && /* @__PURE__ */ c(
|
|
140
141
|
"i",
|
|
141
142
|
{
|
|
142
143
|
className: h(o),
|
package/dist/MenuItem.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const c=require("react/jsx-runtime"),f=require("react"),s=require("./index-BIlhCoy2.cjs"),
|
|
1
|
+
"use strict";const c=require("react/jsx-runtime"),f=require("react"),s=require("./index-BIlhCoy2.cjs"),G=require("./emotion-styled.browser.esm-Cbp_XsK4.cjs"),M=require("./Icon.cjs"),l=require("./utils-DTAPpJXU.cjs"),H=require("./emotion-element-5486c51c.browser.esm-QRQ5FSjv.cjs"),J=G.newStyled.div`
|
|
2
2
|
box-sizing: border-box;
|
|
3
3
|
cursor: ${n=>n.disabled==!1?"pointer":"context-menu"};
|
|
4
4
|
width: 100%;
|
|
@@ -33,4 +33,4 @@
|
|
|
33
33
|
color: ${l.getColorRgbaValue(n.theme,"MenuItem",n.color,"hover","text")};
|
|
34
34
|
`}
|
|
35
35
|
}
|
|
36
|
-
`,h=f.forwardRef((n,a)=>{const{value:T,active:r=null,icon:E,disabled:m=!1,isNested:d=!1,showNested:P,justifyToEnd:
|
|
36
|
+
`,h=f.forwardRef((n,a)=>{const{value:T,active:r=null,icon:E,disabled:m=!1,isNested:d=!1,showNested:P,justifyToEnd:Q=!1,onFocus:N=()=>{},onBlur:k=()=>{},onClick:C=()=>{},onKeyDown:v=()=>{},onMouseEnter:W=()=>{},onMouseLeave:X=()=>{},toggleNested:u=()=>{},onItemSelected:w=()=>{},className:x="",style:_={},color:$="primary",size:R="small",iconProps:S,__TYPE__:Z="MENU_ITEM",children:A,...j}=n,q={theme:H.useTheme(),color:$,style:_,size:R},y=f.useRef(),[O,g]=f.useState(r??!1);f.useEffect(()=>{g(r)},[r]);const D=e=>{m==!1&&(d&&u&&u(),w(e,T)),C(C)},V=e=>{g(!0),N(e)},F=e=>{r==null&&g(!1),k(e)},z=e=>{e.preventDefault(),e.key=="ArrowDown"?b(a?a.current:y.current):e.key=="ArrowUp"?p(a?a.current:y.current):(e.key=="Enter"||e.keyCode==32)&&m==!1&&(d&&u&&u(),w(e,T)),v(e)},b=e=>{if(e!=null&&e.nextSibling){let o=B(e);if(o!=null&&o.node&&(o==null?void 0:o.type)=="item")o.node.focus();else if(o!=null&&o.node&&(o==null?void 0:o.type)=="nested"){let i=L(o.node);i&&i.focus()}else e!=null&&e.parentElement&&t(e.parentElement,"nested-item-lnc")&&b(e.parentElement)}else e!=null&&e.parentElement&&t(e.parentElement,"nested-item-lnc")&&b(e.parentElement)},p=e=>{if(e!=null&&e.previousSibling){let o=K(e);if(o!=null&&o.node&&(o==null?void 0:o.type)=="item")o.node.focus();else if(o!=null&&o.node&&(o==null?void 0:o.type)=="nested"){let i=U(o.node);i&&i.focus()}else e!=null&&e.parentElement&&t(e.parentElement,"nested-item-lnc")&&p(e.parentElement)}else e!=null&&e.parentElement&&t(e.parentElement,"nested-item-lnc")&&p(e.parentElement)},B=e=>{for(;e=e.nextSibling;){if(t(e,"menu-item-lnc"))return{node:e,type:"item"};if(t(e,"nested-item-lnc"))return{node:e,type:"nested"}}return null},K=e=>{for(;e=e.previousSibling;){if(t(e,"menu-item-lnc"))return{node:e,type:"item"};if(t(e,"nested-item-lnc"))return{node:e,type:"nested"}}return null},L=e=>{var o;return(o=Array.from(e.querySelectorAll(".menu-item-lnc")))==null?void 0:o[0]},U=e=>{var o;return(o=Array.from(e.querySelectorAll(".menu-item-lnc")))==null?void 0:o.pop()},t=(e,o)=>{var i=" "+e.className+" ",Y=" "+o+" ";return i.indexOf(Y)!=-1};return c.jsx(c.Fragment,{children:c.jsxs(J,{ref:a||y,className:"menu-item-lnc "+(d?"nested-menu-item-lnc ":"")+(P?"spread-nested-item-lnc ":"")+x,...q,disabled:m,tabIndex:0,onKeyDown:z,onFocus:V,onBlur:F,onClick:D,isActive:O,showNested:P,...j,children:[E&&c.jsx(M,{icon:E,className:"menu-icon-lnc",...S}),c.jsx("div",{children:A}),d&&c.jsx(M,{icon:"angle-down",className:"sub-menu-icon-lnc"})]})})});h.propTypes={value:s.PropTypes.any,active:s.PropTypes.bool,icon:s.PropTypes.string,disabled:s.PropTypes.bool,isNested:s.PropTypes.bool,justifyToEnd:s.PropTypes.bool,onBlur:s.PropTypes.func,onFocus:s.PropTypes.func,onClick:s.PropTypes.func,onKeyDown:s.PropTypes.func,onMouseEnter:s.PropTypes.func,onMouseLeave:s.PropTypes.func,className:s.PropTypes.string,style:s.PropTypes.object,color:s.PropTypes.oneOf(["primary","secondary","success","warning","danger","information","neutral","gray"]),iconProps:s.PropTypes.any,size:s.PropTypes.oneOf(["small","medium","large"]),__TYPE__:s.PropTypes.string};h.displayName="MENU_ITEM";module.exports=h;
|
package/dist/MenuItem.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsx as m, Fragment as
|
|
2
|
-
import { forwardRef as
|
|
1
|
+
import { jsx as m, Fragment as G, jsxs as H } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as J, useRef as Q, useState as W, useEffect as X } from "react";
|
|
3
3
|
import { P as o } from "./index-BYnWp42a.js";
|
|
4
|
-
import { n as
|
|
4
|
+
import { n as Z } from "./emotion-styled.browser.esm-BiK8DcgW.js";
|
|
5
5
|
import k from "./Icon.js";
|
|
6
|
-
import { a as i, g as
|
|
7
|
-
import { u as
|
|
8
|
-
const
|
|
6
|
+
import { a as i, g as I, h as v } from "./utils-C52T57HO.js";
|
|
7
|
+
import { u as ee } from "./emotion-element-5486c51c.browser.esm-Bb4VkP8U.js";
|
|
8
|
+
const ne = Z.div`
|
|
9
9
|
box-sizing: border-box;
|
|
10
10
|
cursor: ${(n) => n.disabled == !1 ? "pointer" : "context-menu"};
|
|
11
11
|
width: 100%;
|
|
@@ -16,7 +16,7 @@ const ee = X.div`
|
|
|
16
16
|
gap: 0.563rem;
|
|
17
17
|
padding: 0.563rem;
|
|
18
18
|
color: ${(n) => i(n.theme, "MenuItem", n.color, "enabled", "text")};
|
|
19
|
-
${(n) =>
|
|
19
|
+
${(n) => I(n.theme, "MenuItem", n.size, "enabled")};
|
|
20
20
|
& .menu-icon-lnc {
|
|
21
21
|
color: ${(n) => n.isActive && n.disabled == !1 ? i(
|
|
22
22
|
n.theme,
|
|
@@ -78,7 +78,7 @@ const ee = X.div`
|
|
|
78
78
|
)};
|
|
79
79
|
`}
|
|
80
80
|
}
|
|
81
|
-
`, C =
|
|
81
|
+
`, C = J((n, a) => {
|
|
82
82
|
const {
|
|
83
83
|
value: g,
|
|
84
84
|
active: c = null,
|
|
@@ -86,7 +86,7 @@ const ee = X.div`
|
|
|
86
86
|
disabled: r = !1,
|
|
87
87
|
isNested: d = !1,
|
|
88
88
|
showNested: M,
|
|
89
|
-
justifyToEnd:
|
|
89
|
+
justifyToEnd: le = !1,
|
|
90
90
|
//----------------
|
|
91
91
|
onFocus: p = () => {
|
|
92
92
|
},
|
|
@@ -96,9 +96,9 @@ const ee = X.div`
|
|
|
96
96
|
},
|
|
97
97
|
onKeyDown: x = () => {
|
|
98
98
|
},
|
|
99
|
-
onMouseEnter:
|
|
99
|
+
onMouseEnter: oe = () => {
|
|
100
100
|
},
|
|
101
|
-
onMouseLeave:
|
|
101
|
+
onMouseLeave: se = () => {
|
|
102
102
|
},
|
|
103
103
|
toggleNested: f = () => {
|
|
104
104
|
},
|
|
@@ -108,15 +108,16 @@ const ee = X.div`
|
|
|
108
108
|
className: A = "",
|
|
109
109
|
style: S = {},
|
|
110
110
|
color: T = "primary",
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
111
|
+
size: _ = "small",
|
|
112
|
+
iconProps: O,
|
|
113
|
+
__TYPE__: te = "MENU_ITEM",
|
|
114
|
+
children: P,
|
|
115
|
+
...D
|
|
116
|
+
} = n, F = { theme: ee(), color: T, style: S, size: _ }, u = Q(), [j, y] = W(c ?? !1);
|
|
117
|
+
X(() => {
|
|
117
118
|
y(c);
|
|
118
119
|
}, [c]);
|
|
119
|
-
const
|
|
120
|
+
const z = (e) => {
|
|
120
121
|
r == !1 && (d && f && f(), N(e, g)), w(w);
|
|
121
122
|
}, B = (e) => {
|
|
122
123
|
y(!0), p(e);
|
|
@@ -126,25 +127,25 @@ const ee = X.div`
|
|
|
126
127
|
e.preventDefault(), e.key == "ArrowDown" ? h(a ? a.current : u.current) : e.key == "ArrowUp" ? b(a ? a.current : u.current) : (e.key == "Enter" || e.keyCode == 32) && r == !1 && (d && f && f(), N(e, g)), x(e);
|
|
127
128
|
}, h = (e) => {
|
|
128
129
|
if (e != null && e.nextSibling) {
|
|
129
|
-
let l =
|
|
130
|
+
let l = L(e);
|
|
130
131
|
if (l != null && l.node && (l == null ? void 0 : l.type) == "item")
|
|
131
132
|
l.node.focus();
|
|
132
133
|
else if (l != null && l.node && (l == null ? void 0 : l.type) == "nested") {
|
|
133
|
-
let t =
|
|
134
|
+
let t = q(l.node);
|
|
134
135
|
t && t.focus();
|
|
135
136
|
} else e != null && e.parentElement && s(e.parentElement, "nested-item-lnc") && h(e.parentElement);
|
|
136
137
|
} else e != null && e.parentElement && s(e.parentElement, "nested-item-lnc") && h(e.parentElement);
|
|
137
138
|
}, b = (e) => {
|
|
138
139
|
if (e != null && e.previousSibling) {
|
|
139
|
-
let l =
|
|
140
|
+
let l = U(e);
|
|
140
141
|
if (l != null && l.node && (l == null ? void 0 : l.type) == "item")
|
|
141
142
|
l.node.focus();
|
|
142
143
|
else if (l != null && l.node && (l == null ? void 0 : l.type) == "nested") {
|
|
143
|
-
let t =
|
|
144
|
+
let t = Y(l.node);
|
|
144
145
|
t && t.focus();
|
|
145
146
|
} else e != null && e.parentElement && s(e.parentElement, "nested-item-lnc") && b(e.parentElement);
|
|
146
147
|
} else e != null && e.parentElement && s(e.parentElement, "nested-item-lnc") && b(e.parentElement);
|
|
147
|
-
},
|
|
148
|
+
}, L = (e) => {
|
|
148
149
|
for (; e = e.nextSibling; ) {
|
|
149
150
|
if (s(e, "menu-item-lnc"))
|
|
150
151
|
return { node: e, type: "item" };
|
|
@@ -152,7 +153,7 @@ const ee = X.div`
|
|
|
152
153
|
return { node: e, type: "nested" };
|
|
153
154
|
}
|
|
154
155
|
return null;
|
|
155
|
-
},
|
|
156
|
+
}, U = (e) => {
|
|
156
157
|
for (; e = e.previousSibling; ) {
|
|
157
158
|
if (s(e, "menu-item-lnc"))
|
|
158
159
|
return { node: e, type: "item" };
|
|
@@ -160,34 +161,34 @@ const ee = X.div`
|
|
|
160
161
|
return { node: e, type: "nested" };
|
|
161
162
|
}
|
|
162
163
|
return null;
|
|
163
|
-
},
|
|
164
|
+
}, q = (e) => {
|
|
164
165
|
var l;
|
|
165
166
|
return (l = Array.from(e.querySelectorAll(".menu-item-lnc"))) == null ? void 0 : l[0];
|
|
166
|
-
},
|
|
167
|
+
}, Y = (e) => {
|
|
167
168
|
var l;
|
|
168
169
|
return (l = Array.from(e.querySelectorAll(".menu-item-lnc"))) == null ? void 0 : l.pop();
|
|
169
170
|
}, s = (e, l) => {
|
|
170
|
-
var t = " " + e.className + " ",
|
|
171
|
-
return t.indexOf(
|
|
171
|
+
var t = " " + e.className + " ", V = " " + l + " ";
|
|
172
|
+
return t.indexOf(V) != -1;
|
|
172
173
|
};
|
|
173
|
-
return /* @__PURE__ */ m(
|
|
174
|
-
|
|
174
|
+
return /* @__PURE__ */ m(G, { children: /* @__PURE__ */ H(
|
|
175
|
+
ne,
|
|
175
176
|
{
|
|
176
177
|
ref: a || u,
|
|
177
178
|
className: "menu-item-lnc " + (d ? "nested-menu-item-lnc " : "") + (M ? "spread-nested-item-lnc " : "") + A,
|
|
178
|
-
...
|
|
179
|
+
...F,
|
|
179
180
|
disabled: r,
|
|
180
181
|
tabIndex: 0,
|
|
181
182
|
onKeyDown: R,
|
|
182
183
|
onFocus: B,
|
|
183
184
|
onBlur: K,
|
|
184
|
-
onClick:
|
|
185
|
-
isActive:
|
|
185
|
+
onClick: z,
|
|
186
|
+
isActive: j,
|
|
186
187
|
showNested: M,
|
|
187
|
-
...
|
|
188
|
+
...D,
|
|
188
189
|
children: [
|
|
189
|
-
E && /* @__PURE__ */ m(k, { icon: E, className: "menu-icon-lnc", ...
|
|
190
|
-
/* @__PURE__ */ m("div", { children:
|
|
190
|
+
E && /* @__PURE__ */ m(k, { icon: E, className: "menu-icon-lnc", ...O }),
|
|
191
|
+
/* @__PURE__ */ m("div", { children: P }),
|
|
191
192
|
d && /* @__PURE__ */ m(k, { icon: "angle-down", className: "sub-menu-icon-lnc" })
|
|
192
193
|
]
|
|
193
194
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const s=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";const s=require("react/jsx-runtime"),N=require("react"),o=require("./index-BIlhCoy2.cjs"),_=require("./emotion-styled.browser.esm-Cbp_XsK4.cjs"),R=require("./react-toastify.esm-Dqcb4SQT.cjs");;/* empty css */const t=require("./utils-DTAPpJXU.cjs"),v=require("./ThemeProvider.cjs"),O=_.newStyled.div`
|
|
2
2
|
& .lnc-notification {
|
|
3
3
|
& > div {
|
|
4
4
|
background-color: ${e=>t.getColorRgbaValue(e.theme,"Notification",e.color,"enabled","background","backgroundOpacity")};
|
|
@@ -34,4 +34,4 @@
|
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
-
`,r=
|
|
37
|
+
`,r=N.forwardRef((e,i)=>{const{position:a="top-right",autoClose:n=5e5,hideProgressBar:l=!0,newestOnTop:c=!0,closeOnClick:p=!0,rtl:u=!1,pauseOnFocusLoss:b=!1,draggable:g=!1,pauseOnHover:f=!1,closeButton:d=!0,className:m="",style:y={},size:T="small",toastContainerProps:h,...P}=e,{theme:x}=v.useTheme(),C={theme:x,className:"lnc-ui-notification "+m,style:y,size:T};return s.jsx(O,{ref:i,...C,...P,children:s.jsx(R.ToastContainer,{position:a,autoClose:n,hideProgressBar:l,newestOnTop:c,closeOnClick:p,rtl:u,pauseOnFocusLoss:b,draggable:g,pauseOnHover:f,closeButton:d,className:"lnc-notification",...h})})});r.propTypes={position:o.PropTypes.oneOf(["top-right","top-center","top-left","bottom-right","bottom-center","bottom-left"]),autoClose:o.PropTypes.number,hideProgressBar:o.PropTypes.bool,newestOnTop:o.PropTypes.bool,closeOnClick:o.PropTypes.bool,rtl:o.PropTypes.bool,pauseOnFocusLoss:o.PropTypes.bool,draggable:o.PropTypes.bool,pauseOnHover:o.PropTypes.bool,closeButton:o.PropTypes.bool,className:o.PropTypes.string,style:o.PropTypes.object,toastContainerProps:o.PropTypes.any};module.exports=r;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as
|
|
2
|
+
import { forwardRef as O } from "react";
|
|
3
3
|
import { P as t } from "./index-BYnWp42a.js";
|
|
4
|
-
import { n as
|
|
5
|
-
import { T as
|
|
4
|
+
import { n as _ } from "./emotion-styled.browser.esm-BiK8DcgW.js";
|
|
5
|
+
import { T as v } from "./react-toastify.esm-CkXGwKXL.js";
|
|
6
6
|
/* empty css */
|
|
7
|
-
import { a as e, b as
|
|
8
|
-
import { useTheme as
|
|
9
|
-
const
|
|
7
|
+
import { a as e, b as C } from "./utils-C52T57HO.js";
|
|
8
|
+
import { useTheme as $ } from "./ThemeProvider.js";
|
|
9
|
+
const P = _.div`
|
|
10
10
|
& .lnc-notification {
|
|
11
11
|
& > div {
|
|
12
12
|
background-color: ${(o) => e(
|
|
@@ -27,7 +27,7 @@ const $ = O.div`
|
|
|
27
27
|
"enabled",
|
|
28
28
|
"border"
|
|
29
29
|
)}`};
|
|
30
|
-
border-radius: ${(o) =>
|
|
30
|
+
border-radius: ${(o) => C(o.theme, "regular")};
|
|
31
31
|
}
|
|
32
32
|
& .Toastify__close-button {
|
|
33
33
|
& svg {
|
|
@@ -85,7 +85,7 @@ const $ = O.div`
|
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
|
-
`,
|
|
88
|
+
`, w = O((o, a) => {
|
|
89
89
|
const {
|
|
90
90
|
position: s = "top-right",
|
|
91
91
|
autoClose: n = 5e5,
|
|
@@ -93,22 +93,23 @@ const $ = O.div`
|
|
|
93
93
|
newestOnTop: l = !0,
|
|
94
94
|
closeOnClick: c = !0,
|
|
95
95
|
rtl: f = !1,
|
|
96
|
-
pauseOnFocusLoss:
|
|
97
|
-
draggable:
|
|
96
|
+
pauseOnFocusLoss: m = !1,
|
|
97
|
+
draggable: p = !1,
|
|
98
98
|
pauseOnHover: b = !1,
|
|
99
99
|
closeButton: d = !0,
|
|
100
100
|
className: u = "",
|
|
101
101
|
style: g = {},
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
...
|
|
105
|
-
} = o, { theme:
|
|
106
|
-
theme:
|
|
102
|
+
size: h = "small",
|
|
103
|
+
toastContainerProps: y,
|
|
104
|
+
...N
|
|
105
|
+
} = o, { theme: x } = $(), T = {
|
|
106
|
+
theme: x,
|
|
107
107
|
className: "lnc-ui-notification " + u,
|
|
108
|
-
style: g
|
|
108
|
+
style: g,
|
|
109
|
+
size: h
|
|
109
110
|
};
|
|
110
|
-
return /* @__PURE__ */ i(
|
|
111
|
-
|
|
111
|
+
return /* @__PURE__ */ i(P, { ref: a, ...T, ...N, children: /* @__PURE__ */ i(
|
|
112
|
+
v,
|
|
112
113
|
{
|
|
113
114
|
position: s,
|
|
114
115
|
autoClose: n,
|
|
@@ -116,16 +117,16 @@ const $ = O.div`
|
|
|
116
117
|
newestOnTop: l,
|
|
117
118
|
closeOnClick: c,
|
|
118
119
|
rtl: f,
|
|
119
|
-
pauseOnFocusLoss:
|
|
120
|
-
draggable:
|
|
120
|
+
pauseOnFocusLoss: m,
|
|
121
|
+
draggable: p,
|
|
121
122
|
pauseOnHover: b,
|
|
122
123
|
closeButton: d,
|
|
123
124
|
className: "lnc-notification",
|
|
124
|
-
...
|
|
125
|
+
...y
|
|
125
126
|
}
|
|
126
127
|
) });
|
|
127
128
|
});
|
|
128
|
-
|
|
129
|
+
w.propTypes = {
|
|
129
130
|
position: t.oneOf([
|
|
130
131
|
"top-right",
|
|
131
132
|
"top-center",
|
|
@@ -158,5 +159,5 @@ P.propTypes = {
|
|
|
158
159
|
toastContainerProps: t.any
|
|
159
160
|
};
|
|
160
161
|
export {
|
|
161
|
-
|
|
162
|
+
w as default
|
|
162
163
|
};
|