@inkeep/cxkit-primitives 0.0.0-dev-20250228203142 → 0.0.0-dev-20250228205857
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),c=require("@radix-ui/react-dialog"),i=require("./factory.cjs"),d=require("../atoms/icons/custom-icon.cjs"),u=require("./modal/use-inkeep-modal.cjs"),l=require("./modal/modal-provider.cjs"),m=require("../utils/compose-event-handlers.cjs"),p=require("../hooks/use-media-query.cjs"),
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),c=require("@radix-ui/react-dialog"),i=require("./factory.cjs"),d=require("../atoms/icons/custom-icon.cjs"),u=require("./modal/use-inkeep-modal.cjs"),l=require("./modal/modal-provider.cjs"),m=require("../utils/compose-event-handlers.cjs"),p=require("../hooks/use-media-query.cjs"),v=require("../utils/misc.cjs");function M(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return o.default=e,Object.freeze(o)}const s=M(c),y=i.ikp(s.Root,{_id:"modal"}),C=e=>{const{onOpenChange:o,config:t,...r}=e,a=u.useInkeepModal(t);return n.jsx(l.ModalProvider,{modal:a,children:n.jsx(y,{open:a.isOpen,onOpenChange:m.composeEventHandlers(o,a.handleOpenChange),...r})})},O=i.ikp(s.Overlay,{_id:"modal__Overlay"}),f=i.ikp(s.Content,{_id:"modal__Content","aria-describedby":void 0}),g=e=>{const o=p.useMediaQuery("(max-width: 768px)");return n.jsx(f,{"data-mobile":v.dataAttr(o),...e})},_=i.ikp(s.Close,{_id:"modal__Close",children:n.jsx(d.CustomIcon,{iconKey:"close"})}),b=e=>l.useModal()?n.jsx(_,{...e}):null;exports.Close=b;exports.Content=g;exports.Modal=C;exports.Overlay=O;
|
|
@@ -10,7 +10,7 @@ export interface PrimitiveModalProps extends ComponentPropsWithRef<typeof Modal>
|
|
|
10
10
|
config?: InkeepModalSettings;
|
|
11
11
|
}
|
|
12
12
|
declare const PrimitiveModal: (props: PrimitiveModalProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
declare const PrimitiveModalOverlay: ForwardRefExoticComponent< PolymorphicProps & Omit<DialogPrimitive.DialogOverlayProps & RefAttributes<HTMLDivElement>, "_id"
|
|
13
|
+
declare const PrimitiveModalOverlay: ForwardRefExoticComponent< PolymorphicProps & Omit<DialogPrimitive.DialogOverlayProps & RefAttributes<HTMLDivElement>, "_id"> & Partial<Pick<DialogPrimitive.DialogOverlayProps & RefAttributes<HTMLDivElement>, "_id">>>;
|
|
14
14
|
declare const ModalContent: ForwardRefExoticComponent< PolymorphicProps & Omit<DialogPrimitive.DialogContentProps & RefAttributes<HTMLDivElement>, "aria-describedby" | "_id"> & Partial<Pick<DialogPrimitive.DialogContentProps & RefAttributes<HTMLDivElement>, "aria-describedby" | "_id">>>;
|
|
15
15
|
declare const PrimitiveModalContent: (props: ComponentPropsWithRef<typeof ModalContent>) => import("react/jsx-runtime").JSX.Element;
|
|
16
16
|
declare const ModalClose: ForwardRefExoticComponent< PolymorphicProps & Omit<DialogPrimitive.DialogCloseProps & RefAttributes<HTMLButtonElement>, "children" | "_id"> & Partial<Pick<DialogPrimitive.DialogCloseProps & RefAttributes<HTMLButtonElement>, "children" | "_id">>>;
|
|
@@ -10,7 +10,7 @@ export interface PrimitiveModalProps extends ComponentPropsWithRef<typeof Modal>
|
|
|
10
10
|
config?: InkeepModalSettings;
|
|
11
11
|
}
|
|
12
12
|
declare const PrimitiveModal: (props: PrimitiveModalProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
declare const PrimitiveModalOverlay: ForwardRefExoticComponent< PolymorphicProps & Omit<DialogPrimitive.DialogOverlayProps & RefAttributes<HTMLDivElement>, "_id"
|
|
13
|
+
declare const PrimitiveModalOverlay: ForwardRefExoticComponent< PolymorphicProps & Omit<DialogPrimitive.DialogOverlayProps & RefAttributes<HTMLDivElement>, "_id"> & Partial<Pick<DialogPrimitive.DialogOverlayProps & RefAttributes<HTMLDivElement>, "_id">>>;
|
|
14
14
|
declare const ModalContent: ForwardRefExoticComponent< PolymorphicProps & Omit<DialogPrimitive.DialogContentProps & RefAttributes<HTMLDivElement>, "aria-describedby" | "_id"> & Partial<Pick<DialogPrimitive.DialogContentProps & RefAttributes<HTMLDivElement>, "aria-describedby" | "_id">>>;
|
|
15
15
|
declare const PrimitiveModalContent: (props: ComponentPropsWithRef<typeof ModalContent>) => import("react/jsx-runtime").JSX.Element;
|
|
16
16
|
declare const ModalClose: ForwardRefExoticComponent< PolymorphicProps & Omit<DialogPrimitive.DialogCloseProps & RefAttributes<HTMLButtonElement>, "children" | "_id"> & Partial<Pick<DialogPrimitive.DialogCloseProps & RefAttributes<HTMLButtonElement>, "children" | "_id">>>;
|
package/dist/components/modal.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as e } from "react/jsx-runtime";
|
|
3
|
-
import * as
|
|
3
|
+
import * as i from "@radix-ui/react-dialog";
|
|
4
4
|
import { ikp as n } from "./factory.js";
|
|
5
5
|
import { CustomIcon as d } from "../atoms/icons/custom-icon.js";
|
|
6
6
|
import { useInkeepModal as m } from "./modal/use-inkeep-modal.js";
|
|
@@ -8,31 +8,30 @@ import { ModalProvider as s, useModal as c } from "./modal/modal-provider.js";
|
|
|
8
8
|
import { composeEventHandlers as p } from "../utils/compose-event-handlers.js";
|
|
9
9
|
import { useMediaQuery as C } from "../hooks/use-media-query.js";
|
|
10
10
|
import { dataAttr as M } from "../utils/misc.js";
|
|
11
|
-
const
|
|
11
|
+
const v = n(i.Root, {
|
|
12
12
|
_id: "modal"
|
|
13
13
|
}), k = (o) => {
|
|
14
|
-
const { onOpenChange: t, config: a, ...l } = o,
|
|
15
|
-
return /* @__PURE__ */ e(s, { modal:
|
|
16
|
-
|
|
14
|
+
const { onOpenChange: t, config: a, ...l } = o, r = m(a);
|
|
15
|
+
return /* @__PURE__ */ e(s, { modal: r, children: /* @__PURE__ */ e(
|
|
16
|
+
v,
|
|
17
17
|
{
|
|
18
|
-
open:
|
|
19
|
-
onOpenChange: p(t,
|
|
18
|
+
open: r.isOpen,
|
|
19
|
+
onOpenChange: p(t, r.handleOpenChange),
|
|
20
20
|
...l
|
|
21
21
|
}
|
|
22
22
|
) });
|
|
23
|
-
}, I = n(
|
|
24
|
-
_id: "modal__Overlay"
|
|
25
|
-
|
|
26
|
-
}), f = n(r.Content, {
|
|
23
|
+
}, I = n(i.Overlay, {
|
|
24
|
+
_id: "modal__Overlay"
|
|
25
|
+
}), f = n(i.Content, {
|
|
27
26
|
_id: "modal__Content",
|
|
28
27
|
"aria-describedby": void 0
|
|
29
28
|
}), j = (o) => {
|
|
30
29
|
const t = C("(max-width: 768px)");
|
|
31
30
|
return /* @__PURE__ */ e(f, { "data-mobile": M(t), ...o });
|
|
32
|
-
},
|
|
31
|
+
}, u = n(i.Close, {
|
|
33
32
|
_id: "modal__Close",
|
|
34
33
|
children: /* @__PURE__ */ e(d, { iconKey: "close" })
|
|
35
|
-
}), w = (o) => c() ? /* @__PURE__ */ e(
|
|
34
|
+
}), w = (o) => c() ? /* @__PURE__ */ e(u, { ...o }) : null;
|
|
36
35
|
export {
|
|
37
36
|
w as Close,
|
|
38
37
|
j as Content,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inkeep/cxkit-primitives",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20250228205857",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "Inkeep, Inc. Customer License (IICL) v1.1",
|
|
6
6
|
"homepage": "",
|
|
@@ -54,9 +54,9 @@
|
|
|
54
54
|
"react-textarea-autosize": "8.5.7",
|
|
55
55
|
"rehype-raw": "7.0.0",
|
|
56
56
|
"unist-util-visit": "^5.0.0",
|
|
57
|
-
"@inkeep/cxkit-color-mode": "0.0.0-dev-
|
|
58
|
-
"@inkeep/cxkit-theme": "0.0.0-dev-
|
|
59
|
-
"@inkeep/cxkit-types": "0.0.0-dev-
|
|
57
|
+
"@inkeep/cxkit-color-mode": "0.0.0-dev-20250228205857",
|
|
58
|
+
"@inkeep/cxkit-theme": "0.0.0-dev-20250228205857",
|
|
59
|
+
"@inkeep/cxkit-types": "0.0.0-dev-20250228205857"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@biomejs/biome": "1.9.4",
|