@mantine/modals 8.0.0-alpha.3 → 8.0.1
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/cjs/context.cjs.map +1 -1
- package/esm/context.mjs.map +1 -1
- package/lib/context.d.ts +1 -1
- package/package.json +3 -3
package/cjs/context.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.cjs","sources":["../src/context.ts"],"sourcesContent":["import { createContext, ReactNode } from 'react';\nimport { ModalProps } from '@mantine/core';\nimport type { ConfirmModalProps } from './ConfirmModal';\n\nexport type ModalSettings = Partial<Omit<ModalProps, 'opened'>> & { modalId?: string };\n\nexport type ConfirmLabels = Record<'confirm' | 'cancel', ReactNode>;\n\nexport interface OpenConfirmModal extends ModalSettings, ConfirmModalProps {}\nexport interface OpenContextModal<CustomProps extends Record<string, any> = {}>\n extends ModalSettings {\n innerProps: CustomProps;\n}\n\nexport interface ContextModalProps<T extends Record<string, any> = {}> {\n context: ModalsContextProps;\n innerProps: T;\n id: string;\n}\n\nexport type ModalState =\n | { id: string; props: ModalSettings; type: 'content' }\n | { id: string; props: OpenConfirmModal; type: 'confirm' }\n | { id: string; props: OpenContextModal; type: 'context'; ctx: string };\n\nexport interface ModalsContextProps {\n modalProps: ModalSettings;\n modals: ModalState[];\n openModal: (props: ModalSettings) => string;\n openConfirmModal: (props: OpenConfirmModal) => string;\n openContextModal: <TKey extends MantineModal>(\n modal: TKey,\n props: OpenContextModal<Parameters<MantineModals[TKey]>[0]['innerProps']>\n ) => string;\n closeModal: (id: string, canceled?: boolean) => void;\n closeContextModal: <TKey extends MantineModal>(id: TKey, canceled?: boolean) => void;\n closeAll: () => void;\n updateModal: (payload: { modalId: string } & Partial<
|
|
1
|
+
{"version":3,"file":"context.cjs","sources":["../src/context.ts"],"sourcesContent":["import { createContext, ReactNode } from 'react';\nimport { ModalProps } from '@mantine/core';\nimport type { ConfirmModalProps } from './ConfirmModal';\n\nexport type ModalSettings = Partial<Omit<ModalProps, 'opened'>> & { modalId?: string };\n\nexport type ConfirmLabels = Record<'confirm' | 'cancel', ReactNode>;\n\nexport interface OpenConfirmModal extends ModalSettings, ConfirmModalProps {}\nexport interface OpenContextModal<CustomProps extends Record<string, any> = {}>\n extends ModalSettings {\n innerProps: CustomProps;\n}\n\nexport interface ContextModalProps<T extends Record<string, any> = {}> {\n context: ModalsContextProps;\n innerProps: T;\n id: string;\n}\n\nexport type ModalState =\n | { id: string; props: ModalSettings; type: 'content' }\n | { id: string; props: OpenConfirmModal; type: 'confirm' }\n | { id: string; props: OpenContextModal; type: 'context'; ctx: string };\n\nexport interface ModalsContextProps {\n modalProps: ModalSettings;\n modals: ModalState[];\n openModal: (props: ModalSettings) => string;\n openConfirmModal: (props: OpenConfirmModal) => string;\n openContextModal: <TKey extends MantineModal>(\n modal: TKey,\n props: OpenContextModal<Parameters<MantineModals[TKey]>[0]['innerProps']>\n ) => string;\n closeModal: (id: string, canceled?: boolean) => void;\n closeContextModal: <TKey extends MantineModal>(id: TKey, canceled?: boolean) => void;\n closeAll: () => void;\n updateModal: (payload: { modalId: string } & Partial<OpenConfirmModal>) => void;\n updateContextModal: (payload: { modalId: string } & Partial<OpenContextModal<any>>) => void;\n}\n\nexport interface MantineModalsOverride {}\n\nexport type MantineModalsOverwritten = MantineModalsOverride extends {\n modals: Record<string, React.FC<ContextModalProps<any>>>;\n}\n ? MantineModalsOverride\n : {\n modals: Record<string, React.FC<ContextModalProps<any>>>;\n };\n\nexport type MantineModals = MantineModalsOverwritten['modals'];\n\nexport type MantineModal = keyof MantineModals;\n\nexport const ModalsContext = createContext<ModalsContextProps>(null as any);\nModalsContext.displayName = '@mantine/modals/ModalsContext';\n"],"names":["createContext"],"mappings":";;;;;AAuDa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAgBA,oBAAkC,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA;AAC1E,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAc,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;;"}
|
package/esm/context.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.mjs","sources":["../src/context.ts"],"sourcesContent":["import { createContext, ReactNode } from 'react';\nimport { ModalProps } from '@mantine/core';\nimport type { ConfirmModalProps } from './ConfirmModal';\n\nexport type ModalSettings = Partial<Omit<ModalProps, 'opened'>> & { modalId?: string };\n\nexport type ConfirmLabels = Record<'confirm' | 'cancel', ReactNode>;\n\nexport interface OpenConfirmModal extends ModalSettings, ConfirmModalProps {}\nexport interface OpenContextModal<CustomProps extends Record<string, any> = {}>\n extends ModalSettings {\n innerProps: CustomProps;\n}\n\nexport interface ContextModalProps<T extends Record<string, any> = {}> {\n context: ModalsContextProps;\n innerProps: T;\n id: string;\n}\n\nexport type ModalState =\n | { id: string; props: ModalSettings; type: 'content' }\n | { id: string; props: OpenConfirmModal; type: 'confirm' }\n | { id: string; props: OpenContextModal; type: 'context'; ctx: string };\n\nexport interface ModalsContextProps {\n modalProps: ModalSettings;\n modals: ModalState[];\n openModal: (props: ModalSettings) => string;\n openConfirmModal: (props: OpenConfirmModal) => string;\n openContextModal: <TKey extends MantineModal>(\n modal: TKey,\n props: OpenContextModal<Parameters<MantineModals[TKey]>[0]['innerProps']>\n ) => string;\n closeModal: (id: string, canceled?: boolean) => void;\n closeContextModal: <TKey extends MantineModal>(id: TKey, canceled?: boolean) => void;\n closeAll: () => void;\n updateModal: (payload: { modalId: string } & Partial<
|
|
1
|
+
{"version":3,"file":"context.mjs","sources":["../src/context.ts"],"sourcesContent":["import { createContext, ReactNode } from 'react';\nimport { ModalProps } from '@mantine/core';\nimport type { ConfirmModalProps } from './ConfirmModal';\n\nexport type ModalSettings = Partial<Omit<ModalProps, 'opened'>> & { modalId?: string };\n\nexport type ConfirmLabels = Record<'confirm' | 'cancel', ReactNode>;\n\nexport interface OpenConfirmModal extends ModalSettings, ConfirmModalProps {}\nexport interface OpenContextModal<CustomProps extends Record<string, any> = {}>\n extends ModalSettings {\n innerProps: CustomProps;\n}\n\nexport interface ContextModalProps<T extends Record<string, any> = {}> {\n context: ModalsContextProps;\n innerProps: T;\n id: string;\n}\n\nexport type ModalState =\n | { id: string; props: ModalSettings; type: 'content' }\n | { id: string; props: OpenConfirmModal; type: 'confirm' }\n | { id: string; props: OpenContextModal; type: 'context'; ctx: string };\n\nexport interface ModalsContextProps {\n modalProps: ModalSettings;\n modals: ModalState[];\n openModal: (props: ModalSettings) => string;\n openConfirmModal: (props: OpenConfirmModal) => string;\n openContextModal: <TKey extends MantineModal>(\n modal: TKey,\n props: OpenContextModal<Parameters<MantineModals[TKey]>[0]['innerProps']>\n ) => string;\n closeModal: (id: string, canceled?: boolean) => void;\n closeContextModal: <TKey extends MantineModal>(id: TKey, canceled?: boolean) => void;\n closeAll: () => void;\n updateModal: (payload: { modalId: string } & Partial<OpenConfirmModal>) => void;\n updateContextModal: (payload: { modalId: string } & Partial<OpenContextModal<any>>) => void;\n}\n\nexport interface MantineModalsOverride {}\n\nexport type MantineModalsOverwritten = MantineModalsOverride extends {\n modals: Record<string, React.FC<ContextModalProps<any>>>;\n}\n ? MantineModalsOverride\n : {\n modals: Record<string, React.FC<ContextModalProps<any>>>;\n };\n\nexport type MantineModals = MantineModalsOverwritten['modals'];\n\nexport type MantineModal = keyof MantineModals;\n\nexport const ModalsContext = createContext<ModalsContextProps>(null as any);\nModalsContext.displayName = '@mantine/modals/ModalsContext';\n"],"names":[],"mappings":";;;AAuDa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAgB,cAAkC,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA;AAC1E,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAc,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;;"}
|
package/lib/context.d.ts
CHANGED
|
@@ -40,7 +40,7 @@ export interface ModalsContextProps {
|
|
|
40
40
|
closeAll: () => void;
|
|
41
41
|
updateModal: (payload: {
|
|
42
42
|
modalId: string;
|
|
43
|
-
} & Partial<
|
|
43
|
+
} & Partial<OpenConfirmModal>) => void;
|
|
44
44
|
updateContextModal: (payload: {
|
|
45
45
|
modalId: string;
|
|
46
46
|
} & Partial<OpenContextModal<any>>) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mantine/modals",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.1",
|
|
4
4
|
"description": "Modals manager based on Mantine components",
|
|
5
5
|
"homepage": "https://mantine.dev/x/modals/",
|
|
6
6
|
"license": "MIT",
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"directory": "packages/@mantine/modals"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@mantine/core": "8.0.
|
|
43
|
-
"@mantine/hooks": "8.0.
|
|
42
|
+
"@mantine/core": "8.0.1",
|
|
43
|
+
"@mantine/hooks": "8.0.1",
|
|
44
44
|
"react": "^18.x || ^19.x",
|
|
45
45
|
"react-dom": "^18.x || ^19.x"
|
|
46
46
|
},
|