@lanaco/lnc-react-ui 4.0.9 → 4.0.10
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/Popover.cjs +1 -1
- package/dist/Popover.js +7 -8
- package/dist/PopoverDescription.cjs +1 -1
- package/dist/PopoverDescription.js +8 -8
- package/dist/PopoverHeading.cjs +1 -1
- package/dist/PopoverHeading.js +8 -8
- package/dist/PopoverTrigger.cjs +1 -1
- package/dist/PopoverTrigger.js +11 -11
- package/package.json +1 -1
package/dist/Popover.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const s=require("react/jsx-runtime")
|
|
1
|
+
"use strict";const s=require("react/jsx-runtime"),e=require("./index-BIlhCoy2.cjs"),i=require("./PopoverContext.cjs"),u=require("./usePopover.cjs");function o({children:t,modal:r=!1,...p}){const n=u({modal:r,...p});return s.jsx(i.Provider,{value:n,children:t})}o.propTypes={initialOpen:e.PropTypes.bool,placement:e.PropTypes.oneOf(["center","top","right","bottom","left","top-start","top-end","right-start","right-end","bottom-start","bottom-end","left-start","left-end"]),modal:e.PropTypes.bool,offsetValue:e.PropTypes.number,open:e.PropTypes.bool,onOpenChange:e.PropTypes.func};module.exports=o;
|
package/dist/Popover.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import "react";
|
|
3
2
|
import { P as o } from "./index-BYnWp42a.js";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
function
|
|
7
|
-
const p =
|
|
8
|
-
return /* @__PURE__ */ n(
|
|
3
|
+
import a from "./PopoverContext.js";
|
|
4
|
+
import f from "./usePopover.js";
|
|
5
|
+
function m({ children: t, modal: e = !1, ...r }) {
|
|
6
|
+
const p = f({ modal: e, ...r });
|
|
7
|
+
return /* @__PURE__ */ n(a.Provider, { value: p, children: t });
|
|
9
8
|
}
|
|
10
|
-
|
|
9
|
+
m.propTypes = {
|
|
11
10
|
initialOpen: o.bool,
|
|
12
11
|
placement: o.oneOf([
|
|
13
12
|
"center",
|
|
@@ -32,5 +31,5 @@ f.propTypes = {
|
|
|
32
31
|
onOpenChange: o.func
|
|
33
32
|
};
|
|
34
33
|
export {
|
|
35
|
-
|
|
34
|
+
m as default
|
|
36
35
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const i=require("react/jsx-runtime"),u=require("./floating-ui.react.esm-C4vrBVJU.cjs"),r=require("react"),p=require("./PopoverContext.cjs"),a=()=>{const e=r.useContext(p);if(e==null)throw new Error("Popover components must be wrapped in <Popover />");return e},f=forwardRef(function({children:n,...s},c){const{setDescriptionId:o}=a(),t=u.useId();return r.useLayoutEffect(()=>(o(t),()=>o(void 0)),[t,o]),i.jsx("p",{...s,ref:c,id:t,children:n})});module.exports=f;
|
|
1
|
+
"use strict";const i=require("react/jsx-runtime"),u=require("./floating-ui.react.esm-C4vrBVJU.cjs"),r=require("react"),p=require("./PopoverContext.cjs"),a=()=>{const e=r.useContext(p);if(e==null)throw new Error("Popover components must be wrapped in <Popover />");return e},f=r.forwardRef(function({children:n,...s},c){const{setDescriptionId:o}=a(),t=u.useId();return r.useLayoutEffect(()=>(o(t),()=>o(void 0)),[t,o]),i.jsx("p",{...s,ref:c,id:t,children:n})});module.exports=f;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import { u as i } from "./floating-ui.react.esm-72DKnou_.js";
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
const
|
|
6
|
-
const o =
|
|
3
|
+
import { forwardRef as u, useLayoutEffect as c, useContext as f } from "react";
|
|
4
|
+
import m from "./PopoverContext.js";
|
|
5
|
+
const a = () => {
|
|
6
|
+
const o = f(m);
|
|
7
7
|
if (o == null)
|
|
8
8
|
throw new Error("Popover components must be wrapped in <Popover />");
|
|
9
9
|
return o;
|
|
10
|
-
},
|
|
11
|
-
const { setDescriptionId: t } =
|
|
12
|
-
return
|
|
10
|
+
}, w = u(function({ children: e, ...n }, p) {
|
|
11
|
+
const { setDescriptionId: t } = a(), r = i();
|
|
12
|
+
return c(() => (t(r), () => t(void 0)), [r, t]), /* @__PURE__ */ s("p", { ...n, ref: p, id: r, children: e });
|
|
13
13
|
});
|
|
14
14
|
export {
|
|
15
|
-
|
|
15
|
+
w as default
|
|
16
16
|
};
|
package/dist/PopoverHeading.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const c=require("react/jsx-runtime"),r=require("react"),i=require("./floating-ui.react.esm-C4vrBVJU.cjs"),a=require("./PopoverContext.cjs"),p=()=>{const e=useContext(a);if(e==null)throw new Error("Popover components must be wrapped in <Popover />");return e},d=r.forwardRef(function({children:n,...s},u){const{setLabelId:o}=p(),t=i.useId();return r.useLayoutEffect(()=>(o(t),()=>o(void 0)),[t,o]),c.jsx("h2",{...s,ref:u,id:t,children:n})});module.exports=d;
|
|
1
|
+
"use strict";const c=require("react/jsx-runtime"),r=require("react"),i=require("./floating-ui.react.esm-C4vrBVJU.cjs"),a=require("./PopoverContext.cjs"),p=()=>{const e=r.useContext(a);if(e==null)throw new Error("Popover components must be wrapped in <Popover />");return e},d=r.forwardRef(function({children:n,...s},u){const{setLabelId:o}=p(),t=i.useId();return r.useLayoutEffect(()=>(o(t),()=>o(void 0)),[t,o]),c.jsx("h2",{...s,ref:u,id:t,children:n})});module.exports=d;
|
package/dist/PopoverHeading.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { jsx as p } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as u, useLayoutEffect as f } from "react";
|
|
3
|
-
import { u as
|
|
4
|
-
import
|
|
5
|
-
const
|
|
6
|
-
const o =
|
|
2
|
+
import { forwardRef as u, useLayoutEffect as f, useContext as i } from "react";
|
|
3
|
+
import { u as a } from "./floating-ui.react.esm-72DKnou_.js";
|
|
4
|
+
import m from "./PopoverContext.js";
|
|
5
|
+
const c = () => {
|
|
6
|
+
const o = i(m);
|
|
7
7
|
if (o == null)
|
|
8
8
|
throw new Error("Popover components must be wrapped in <Popover />");
|
|
9
9
|
return o;
|
|
10
|
-
},
|
|
11
|
-
const { setLabelId: e } =
|
|
10
|
+
}, l = u(function({ children: r, ...n }, s) {
|
|
11
|
+
const { setLabelId: e } = c(), t = a();
|
|
12
12
|
return f(() => (e(t), () => e(void 0)), [t, e]), /* @__PURE__ */ p("h2", { ...n, ref: s, id: t, children: r });
|
|
13
13
|
});
|
|
14
14
|
export {
|
|
15
|
-
|
|
15
|
+
l as default
|
|
16
16
|
};
|
package/dist/PopoverTrigger.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const u=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";const u=require("react/jsx-runtime"),o=require("react"),f=require("./floating-ui.react.esm-C4vrBVJU.cjs"),l=require("./index-BIlhCoy2.cjs"),P=require("./PopoverContext.cjs"),d=()=>{const r=o.useContext(P);if(r==null)throw new Error("Popover components must be wrapped in <Popover />");return r},c=o.forwardRef(function({children:e,asChild:p,...n},i){const t=d(),a=e.ref,s=f.useMergeRefs([t.reference,i,a]);return p&&o.isValidElement(e)?o.cloneElement(e,t.getReferenceProps({ref:s,...n,...e.props,"data-state":t.open?"open":"closed"})):u.jsx("div",{ref:s,"data-state":t.open?"open":"closed",style:{width:"max-content"},...t.getReferenceProps(n),children:e})});c.propTypes={asChild:l.PropTypes.bool};module.exports=c;
|
package/dist/PopoverTrigger.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsx as f } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as m, isValidElement as c, cloneElement as i } from "react";
|
|
3
|
-
import { a as
|
|
4
|
-
import { P } from "./index-BYnWp42a.js";
|
|
5
|
-
import
|
|
6
|
-
const
|
|
7
|
-
const t =
|
|
2
|
+
import { forwardRef as m, isValidElement as c, cloneElement as i, useContext as u } from "react";
|
|
3
|
+
import { a as P } from "./floating-ui.react.esm-72DKnou_.js";
|
|
4
|
+
import { P as l } from "./index-BYnWp42a.js";
|
|
5
|
+
import d from "./PopoverContext.js";
|
|
6
|
+
const g = () => {
|
|
7
|
+
const t = u(d);
|
|
8
8
|
if (t == null)
|
|
9
9
|
throw new Error("Popover components must be wrapped in <Popover />");
|
|
10
10
|
return t;
|
|
11
|
-
},
|
|
12
|
-
const o =
|
|
11
|
+
}, v = m(function({ children: e, asChild: s, ...r }, p) {
|
|
12
|
+
const o = g(), a = e.ref, n = P([o.reference, p, a]);
|
|
13
13
|
return s && c(e) ? i(
|
|
14
14
|
e,
|
|
15
15
|
o.getReferenceProps({
|
|
@@ -29,10 +29,10 @@ const d = () => {
|
|
|
29
29
|
}
|
|
30
30
|
);
|
|
31
31
|
});
|
|
32
|
-
|
|
32
|
+
v.propTypes = {
|
|
33
33
|
/** Allows the user to pass any element as the anchor */
|
|
34
|
-
asChild:
|
|
34
|
+
asChild: l.bool
|
|
35
35
|
};
|
|
36
36
|
export {
|
|
37
|
-
|
|
37
|
+
v as default
|
|
38
38
|
};
|