@coveord/plasma-mantine 55.6.0 → 55.7.0
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/.turbo/turbo-build.log +3 -3
- package/.turbo/turbo-test.log +50 -50
- package/dist/.tsbuildinfo +1 -1
- package/dist/cjs/components/index.d.ts +1 -0
- package/dist/cjs/components/index.d.ts.map +1 -1
- package/dist/cjs/components/index.js +1 -0
- package/dist/cjs/components/index.js.map +1 -1
- package/dist/cjs/components/modal/Modal.d.ts +11 -0
- package/dist/cjs/components/modal/Modal.d.ts.map +1 -0
- package/dist/cjs/components/modal/Modal.js +32 -0
- package/dist/cjs/components/modal/Modal.js.map +1 -0
- package/dist/cjs/components/modal/Modal.module.css +9 -0
- package/dist/cjs/components/modal/ModalFooter.d.ts +20 -0
- package/dist/cjs/components/modal/ModalFooter.d.ts.map +1 -0
- package/dist/cjs/components/modal/ModalFooter.js +46 -0
- package/dist/cjs/components/modal/ModalFooter.js.map +1 -0
- package/dist/cjs/components/modal/index.d.ts +3 -0
- package/dist/cjs/components/modal/index.d.ts.map +1 -0
- package/dist/cjs/components/modal/index.js +9 -0
- package/dist/cjs/components/modal/index.js.map +1 -0
- package/dist/cjs/components/prompt/Prompt.d.ts +3 -3
- package/dist/cjs/components/prompt/Prompt.d.ts.map +1 -1
- package/dist/cjs/components/prompt/Prompt.js +14 -16
- package/dist/cjs/components/prompt/Prompt.js.map +1 -1
- package/dist/cjs/components/sticky-footer/StickyFooter.d.ts +2 -0
- package/dist/cjs/components/sticky-footer/StickyFooter.d.ts.map +1 -1
- package/dist/cjs/components/sticky-footer/StickyFooter.js.map +1 -1
- package/dist/cjs/index.d.ts +1 -1
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +3 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/components/index.d.ts +1 -0
- package/dist/esm/components/index.d.ts.map +1 -1
- package/dist/esm/components/index.js +1 -0
- package/dist/esm/components/index.js.map +1 -1
- package/dist/esm/components/modal/Modal.d.ts +11 -0
- package/dist/esm/components/modal/Modal.d.ts.map +1 -0
- package/dist/esm/components/modal/Modal.js +20 -0
- package/dist/esm/components/modal/Modal.js.map +1 -0
- package/dist/esm/components/modal/Modal.module.css +9 -0
- package/dist/esm/components/modal/ModalFooter.d.ts +20 -0
- package/dist/esm/components/modal/ModalFooter.d.ts.map +1 -0
- package/dist/esm/components/modal/ModalFooter.js +32 -0
- package/dist/esm/components/modal/ModalFooter.js.map +1 -0
- package/dist/esm/components/modal/index.d.ts +3 -0
- package/dist/esm/components/modal/index.d.ts.map +1 -0
- package/dist/esm/components/modal/index.js +4 -0
- package/dist/esm/components/modal/index.js.map +1 -0
- package/dist/esm/components/prompt/Prompt.d.ts +3 -3
- package/dist/esm/components/prompt/Prompt.d.ts.map +1 -1
- package/dist/esm/components/prompt/Prompt.js +9 -7
- package/dist/esm/components/prompt/Prompt.js.map +1 -1
- package/dist/esm/components/sticky-footer/StickyFooter.d.ts +2 -0
- package/dist/esm/components/sticky-footer/StickyFooter.d.ts.map +1 -1
- package/dist/esm/components/sticky-footer/StickyFooter.js.map +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/package.json +24 -24
- package/src/components/index.ts +1 -0
- package/src/components/modal/Modal.module.css +9 -0
- package/src/components/modal/Modal.tsx +33 -0
- package/src/components/modal/ModalFooter.tsx +47 -0
- package/src/components/modal/__tests__/Modal.spec.tsx +25 -0
- package/src/components/modal/__tests__/ModalFooter.spec.tsx +35 -0
- package/src/components/modal/index.ts +2 -0
- package/src/components/prompt/Prompt.tsx +9 -8
- package/src/components/sticky-footer/StickyFooter.tsx +2 -0
- package/src/index.ts +2 -0
- package/dist/cjs/components/prompt/PromptFooter.d.ts +0 -6
- package/dist/cjs/components/prompt/PromptFooter.d.ts.map +0 -1
- package/dist/cjs/components/prompt/PromptFooter.js +0 -27
- package/dist/cjs/components/prompt/PromptFooter.js.map +0 -1
- package/dist/esm/components/prompt/PromptFooter.d.ts +0 -6
- package/dist/esm/components/prompt/PromptFooter.d.ts.map +0 -1
- package/dist/esm/components/prompt/PromptFooter.js +0 -9
- package/dist/esm/components/prompt/PromptFooter.js.map +0 -1
- package/src/components/prompt/PromptFooter.tsx +0 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC"}
|
|
@@ -15,6 +15,7 @@ _export_star._(require("./ellipsis-text"), exports);
|
|
|
15
15
|
_export_star._(require("./header"), exports);
|
|
16
16
|
_export_star._(require("./inline-confirm"), exports);
|
|
17
17
|
_export_star._(require("./menu"), exports);
|
|
18
|
+
_export_star._(require("./modal"), exports);
|
|
18
19
|
_export_star._(require("./prompt"), exports);
|
|
19
20
|
_export_star._(require("./read-only"), exports);
|
|
20
21
|
_export_star._(require("./sticky-footer"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/index.ts"],"sourcesContent":["export * from './action-icon';\nexport * from './blank-slate';\nexport * from './browser-preview';\nexport * from './button';\nexport * from './code-editor';\nexport * from './collection';\nexport * from './copyToClipboard';\nexport * from './date-range-picker';\nexport * from './ellipsis-text';\nexport * from './header';\nexport * from './inline-confirm';\nexport * from './menu';\nexport * from './prompt';\nexport * from './read-only';\nexport * from './sticky-footer';\nexport * from './table';\nexport * from './child-form';\n"],"names":[],"mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA"}
|
|
1
|
+
{"version":3,"sources":["../../../src/components/index.ts"],"sourcesContent":["export * from './action-icon';\nexport * from './blank-slate';\nexport * from './browser-preview';\nexport * from './button';\nexport * from './code-editor';\nexport * from './collection';\nexport * from './copyToClipboard';\nexport * from './date-range-picker';\nexport * from './ellipsis-text';\nexport * from './header';\nexport * from './inline-confirm';\nexport * from './menu';\nexport * from './modal';\nexport * from './prompt';\nexport * from './read-only';\nexport * from './sticky-footer';\nexport * from './table';\nexport * from './child-form';\n"],"names":[],"mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ModalFactory as MantineModalFactory } from '@mantine/core';
|
|
2
|
+
import { ModalFooter } from './ModalFooter';
|
|
3
|
+
type PlasmaModalFactory = Omit<MantineModalFactory, 'staticComponents'> & {
|
|
4
|
+
staticComponents: MantineModalFactory['staticComponents'] & {
|
|
5
|
+
Footer: typeof ModalFooter;
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
export declare const Modal: import("@mantine/core").MantineComponent<PlasmaModalFactory>;
|
|
9
|
+
export type ModalFactory = PlasmaModalFactory;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=Modal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../../src/components/modal/Modal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGH,YAAY,IAAI,mBAAmB,EAEtC,MAAM,eAAe,CAAC;AACvB,OAAO,EAAC,WAAW,EAAmC,MAAM,eAAe,CAAC;AAG5E,KAAK,kBAAkB,GAAG,IAAI,CAAC,mBAAmB,EAAE,kBAAkB,CAAC,GAAG;IACtE,gBAAgB,EAAE,mBAAmB,CAAC,kBAAkB,CAAC,GAAG;QACxD,MAAM,EAAE,OAAO,WAAW,CAAC;KAC9B,CAAC;CACL,CAAC;AAiBF,eAAO,MAAM,KAAK,8DAAc,CAAC;AAEjC,MAAM,MAAM,YAAY,GAAG,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "Modal", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return Modal;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
var _object_spread = require("@swc/helpers/_/_object_spread");
|
|
12
|
+
var _jsxruntime = require("react/jsx-runtime");
|
|
13
|
+
var _core = require("@mantine/core");
|
|
14
|
+
var _ModalFooter = require("./ModalFooter");
|
|
15
|
+
var PlasmaModal = (0, _core.factory)(function(props, ref) {
|
|
16
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_core.Modal, _object_spread._({
|
|
17
|
+
ref: ref
|
|
18
|
+
}, props));
|
|
19
|
+
});
|
|
20
|
+
PlasmaModal.displayName = '@coveord/plasma-mantine/Modal';
|
|
21
|
+
PlasmaModal.Root = _core.Modal.Root;
|
|
22
|
+
PlasmaModal.Body = _core.Modal.Body;
|
|
23
|
+
PlasmaModal.Overlay = _core.Modal.Overlay;
|
|
24
|
+
PlasmaModal.Content = _core.Modal.Content;
|
|
25
|
+
PlasmaModal.Header = _core.Modal.Header;
|
|
26
|
+
PlasmaModal.Title = _core.Modal.Title;
|
|
27
|
+
PlasmaModal.CloseButton = _core.Modal.CloseButton;
|
|
28
|
+
PlasmaModal.Stack = _core.Modal.Stack;
|
|
29
|
+
PlasmaModal.Footer = _ModalFooter.ModalFooter;
|
|
30
|
+
var Modal = PlasmaModal;
|
|
31
|
+
|
|
32
|
+
//# sourceMappingURL=Modal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/modal/Modal.tsx"],"sourcesContent":["import {\n factory,\n Modal as MantineModal,\n ModalFactory as MantineModalFactory,\n ModalProps as MantineModalProps,\n} from '@mantine/core';\nimport {ModalFooter, ModalFooter as PlasmaModalFooter} from './ModalFooter';\n\n// Need to redeclare the factory to override and add footer to the props type\ntype PlasmaModalFactory = Omit<MantineModalFactory, 'staticComponents'> & {\n staticComponents: MantineModalFactory['staticComponents'] & {\n Footer: typeof ModalFooter;\n };\n};\n\nconst PlasmaModal = factory<PlasmaModalFactory>((props: MantineModalProps, ref) => (\n <MantineModal ref={ref} {...props} />\n));\n\nPlasmaModal.displayName = '@coveord/plasma-mantine/Modal';\nPlasmaModal.Root = MantineModal.Root;\nPlasmaModal.Body = MantineModal.Body;\nPlasmaModal.Overlay = MantineModal.Overlay;\nPlasmaModal.Content = MantineModal.Content;\nPlasmaModal.Header = MantineModal.Header;\nPlasmaModal.Title = MantineModal.Title;\nPlasmaModal.CloseButton = MantineModal.CloseButton;\nPlasmaModal.Stack = MantineModal.Stack;\nPlasmaModal.Footer = PlasmaModalFooter;\n\nexport const Modal = PlasmaModal;\n\nexport type ModalFactory = PlasmaModalFactory;\n"],"names":["Modal","PlasmaModal","factory","props","ref","MantineModal","displayName","Root","Body","Overlay","Content","Header","Title","CloseButton","Stack","Footer","PlasmaModalFooter"],"mappings":";;;;+BA8BaA;;;eAAAA;;;;;oBAzBN;2BACqD;AAS5D,IAAMC,cAAcC,IAAAA,aAAO,EAAqB,SAACC,OAA0BC;yBACvE,qBAACC,WAAY;QAACD,KAAKA;OAASD;;AAGhCF,YAAYK,WAAW,GAAG;AAC1BL,YAAYM,IAAI,GAAGF,WAAY,CAACE,IAAI;AACpCN,YAAYO,IAAI,GAAGH,WAAY,CAACG,IAAI;AACpCP,YAAYQ,OAAO,GAAGJ,WAAY,CAACI,OAAO;AAC1CR,YAAYS,OAAO,GAAGL,WAAY,CAACK,OAAO;AAC1CT,YAAYU,MAAM,GAAGN,WAAY,CAACM,MAAM;AACxCV,YAAYW,KAAK,GAAGP,WAAY,CAACO,KAAK;AACtCX,YAAYY,WAAW,GAAGR,WAAY,CAACQ,WAAW;AAClDZ,YAAYa,KAAK,GAAGT,WAAY,CAACS,KAAK;AACtCb,YAAYc,MAAM,GAAGC,wBAAiB;AAE/B,IAAMhB,QAAQC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Factory } from '@mantine/core';
|
|
2
|
+
import { StickyFooterProps, StickyFooterStylesNames } from '../sticky-footer';
|
|
3
|
+
export interface ModalFooterProps extends Omit<StickyFooterProps, 'variant'> {
|
|
4
|
+
/**
|
|
5
|
+
* If the footer is sticky, its margin will be adjusted to counteract the padding of the Modal.Body, ensuring the footer visually sticks to the bottom of the modal.
|
|
6
|
+
*/
|
|
7
|
+
sticky?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export type ModalFooterStylesNames = StickyFooterStylesNames;
|
|
10
|
+
export type ModalFooterFactory = Factory<{
|
|
11
|
+
props: ModalFooterProps;
|
|
12
|
+
ref: HTMLDivElement;
|
|
13
|
+
stylesNames: ModalFooterStylesNames;
|
|
14
|
+
}>;
|
|
15
|
+
export declare const ModalFooter: import("@mantine/core").MantineComponent<{
|
|
16
|
+
props: ModalFooterProps;
|
|
17
|
+
ref: HTMLDivElement;
|
|
18
|
+
stylesNames: ModalFooterStylesNames;
|
|
19
|
+
}>;
|
|
20
|
+
//# sourceMappingURL=ModalFooter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModalFooter.d.ts","sourceRoot":"","sources":["../../../../src/components/modal/ModalFooter.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,OAAO,EAAU,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAe,iBAAiB,EAAE,uBAAuB,EAAC,MAAM,kBAAkB,CAAC;AAG1F,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,iBAAiB,EAAE,SAAS,CAAC;IACxE;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,MAAM,sBAAsB,GAAG,uBAAuB,CAAC;AAE7D,MAAM,MAAM,kBAAkB,GAAG,OAAO,CAAC;IACrC,KAAK,EAAE,gBAAgB,CAAC;IACxB,GAAG,EAAE,cAAc,CAAC;IACpB,WAAW,EAAE,sBAAsB,CAAC;CACvC,CAAC,CAAC;AAOH,eAAO,MAAM,WAAW;WAVb,gBAAgB;SAClB,cAAc;iBACN,sBAAsB;EA4BrC,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "ModalFooter", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return ModalFooter;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
var _define_property = require("@swc/helpers/_/_define_property");
|
|
12
|
+
var _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
13
|
+
var _object_spread = require("@swc/helpers/_/_object_spread");
|
|
14
|
+
var _object_without_properties = require("@swc/helpers/_/_object_without_properties");
|
|
15
|
+
var _jsxruntime = require("react/jsx-runtime");
|
|
16
|
+
var _react = require("react");
|
|
17
|
+
var _clsx = /*#__PURE__*/ _interop_require_default._(require("clsx"));
|
|
18
|
+
var _core = require("@mantine/core");
|
|
19
|
+
var _stickyfooter = require("../sticky-footer");
|
|
20
|
+
var _Modalmodulecss = /*#__PURE__*/ _interop_require_default._(require("./Modal.module.css"));
|
|
21
|
+
var ensuresFooterHasEvenHeight = function(footer) {
|
|
22
|
+
var remainder = footer.offsetHeight % 2;
|
|
23
|
+
footer.style.height = "".concat(footer.offsetHeight - remainder + 2, "px");
|
|
24
|
+
};
|
|
25
|
+
var ModalFooter = (0, _core.factory)(function(_param, ref) {
|
|
26
|
+
var sticky = _param.sticky, props = _object_without_properties._(_param, [
|
|
27
|
+
"sticky"
|
|
28
|
+
]);
|
|
29
|
+
var _ref = (0, _react.useRef)();
|
|
30
|
+
var footerRef = ref || _ref;
|
|
31
|
+
(0, _react.useEffect)(function() {
|
|
32
|
+
if (typeof footerRef !== 'function' && footerRef.current) {
|
|
33
|
+
ensuresFooterHasEvenHeight(footerRef.current);
|
|
34
|
+
}
|
|
35
|
+
// if ref === 'function', this is a callback ref. Haven't found any solution for adjusting the height in this case
|
|
36
|
+
}, [
|
|
37
|
+
ref,
|
|
38
|
+
props.h
|
|
39
|
+
]);
|
|
40
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_stickyfooter.StickyFooter, _object_spread._({
|
|
41
|
+
className: (0, _clsx.default)(_Modalmodulecss.default.footer, _define_property._({}, _Modalmodulecss.default.modalFooterSticky, !!sticky)),
|
|
42
|
+
ref: footerRef
|
|
43
|
+
}, props));
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
//# sourceMappingURL=ModalFooter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/modal/ModalFooter.tsx"],"sourcesContent":["import {useRef, useEffect} from 'react';\nimport clsx from 'clsx';\nimport {Factory, factory} from '@mantine/core';\nimport {StickyFooter, StickyFooterProps, StickyFooterStylesNames} from '../sticky-footer';\nimport classes from './Modal.module.css';\n\nexport interface ModalFooterProps extends Omit<StickyFooterProps, 'variant'> {\n /**\n * If the footer is sticky, its margin will be adjusted to counteract the padding of the Modal.Body, ensuring the footer visually sticks to the bottom of the modal.\n */\n sticky?: boolean;\n}\n\nexport type ModalFooterStylesNames = StickyFooterStylesNames;\n\nexport type ModalFooterFactory = Factory<{\n props: ModalFooterProps;\n ref: HTMLDivElement;\n stylesNames: ModalFooterStylesNames;\n}>;\n\nconst ensuresFooterHasEvenHeight = (footer: HTMLElement) => {\n const remainder = footer.offsetHeight % 2;\n footer.style.height = `${footer.offsetHeight - remainder + 2}px`;\n};\n\nexport const ModalFooter = factory<ModalFooterFactory>(({sticky, ...props}, ref) => {\n const _ref = useRef<HTMLDivElement>();\n\n const footerRef = ref || _ref;\n\n useEffect(() => {\n if (typeof footerRef !== 'function' && footerRef.current) {\n ensuresFooterHasEvenHeight(footerRef.current);\n }\n\n // if ref === 'function', this is a callback ref. Haven't found any solution for adjusting the height in this case\n }, [ref, props.h]);\n\n return (\n <StickyFooter\n className={clsx(classes.footer, {[classes.modalFooterSticky]: !!sticky})}\n ref={footerRef}\n {...props}\n />\n );\n});\n"],"names":["ModalFooter","ensuresFooterHasEvenHeight","footer","remainder","offsetHeight","style","height","factory","ref","sticky","props","_ref","useRef","footerRef","useEffect","current","h","StickyFooter","className","clsx","classes","modalFooterSticky"],"mappings":";;;;+BA0BaA;;;eAAAA;;;;;;;;qBA1BmB;6DACf;oBACc;4BACwC;uEACnD;AAiBpB,IAAMC,6BAA6B,SAACC;IAChC,IAAMC,YAAYD,OAAOE,YAAY,GAAG;IACxCF,OAAOG,KAAK,CAACC,MAAM,GAAG,AAAC,GAAsC,OAApCJ,OAAOE,YAAY,GAAGD,YAAY,GAAE;AACjE;AAEO,IAAMH,cAAcO,IAAAA,aAAO,EAAqB,iBAAqBC;QAAnBC,gBAAAA,QAAWC;QAAXD;;IACrD,IAAME,OAAOC,IAAAA,aAAM;IAEnB,IAAMC,YAAYL,OAAOG;IAEzBG,IAAAA,gBAAS,EAAC;QACN,IAAI,OAAOD,cAAc,cAAcA,UAAUE,OAAO,EAAE;YACtDd,2BAA2BY,UAAUE,OAAO;QAChD;IAEA,kHAAkH;IACtH,GAAG;QAACP;QAAKE,MAAMM,CAAC;KAAC;IAEjB,qBACI,qBAACC,0BAAY;QACTC,WAAWC,IAAAA,aAAI,EAACC,uBAAO,CAAClB,MAAM,EAAG,uBAACkB,uBAAO,CAACC,iBAAiB,EAAG,CAAC,CAACZ;QAChED,KAAKK;OACDH;AAGhB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/modal/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
var _export_star = require("@swc/helpers/_/_export_star");
|
|
6
|
+
_export_star._(require("./Modal"), exports);
|
|
7
|
+
_export_star._(require("./ModalFooter"), exports);
|
|
8
|
+
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/modal/index.ts"],"sourcesContent":["export * from './Modal';\nexport * from './ModalFooter';\n"],"names":[],"mappings":";;;;;uBAAc;uBACA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Factory, ModalRootProps, ModalStylesNames, StylesApiProps } from '@mantine/core';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
+
import { Modal } from '../modal';
|
|
3
4
|
import { PromptCancelButton, PromptCancelButtonStylesNamesVariant } from './PromptCancelButton';
|
|
4
5
|
import { PromptConfirmButton, PromptConfirmButtonStylesNamesVariant } from './PromptConfirmButton';
|
|
5
|
-
import { PromptFooter } from './PromptFooter';
|
|
6
6
|
export type PromptVariant = 'success' | 'warning' | 'critical' | 'info';
|
|
7
7
|
export type PromptVars = {
|
|
8
8
|
root: '--prompt-icon-size';
|
|
@@ -28,7 +28,7 @@ export type PromptFactory = Factory<{
|
|
|
28
28
|
staticComponents: {
|
|
29
29
|
CancelButton: typeof PromptCancelButton;
|
|
30
30
|
ConfirmButton: typeof PromptConfirmButton;
|
|
31
|
-
Footer: typeof
|
|
31
|
+
Footer: typeof Modal.Footer;
|
|
32
32
|
};
|
|
33
33
|
}>;
|
|
34
34
|
export declare const Prompt: import("@mantine/core").MantineComponent<{
|
|
@@ -40,7 +40,7 @@ export declare const Prompt: import("@mantine/core").MantineComponent<{
|
|
|
40
40
|
staticComponents: {
|
|
41
41
|
CancelButton: typeof PromptCancelButton;
|
|
42
42
|
ConfirmButton: typeof PromptConfirmButton;
|
|
43
|
-
Footer: typeof
|
|
43
|
+
Footer: typeof Modal.Footer;
|
|
44
44
|
};
|
|
45
45
|
}>;
|
|
46
46
|
//# sourceMappingURL=Prompt.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Prompt.d.ts","sourceRoot":"","sources":["../../../../src/components/prompt/Prompt.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIH,OAAO,
|
|
1
|
+
{"version":3,"file":"Prompt.d.ts","sourceRoot":"","sources":["../../../../src/components/prompt/Prompt.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIH,OAAO,EAEP,cAAc,EACd,gBAAgB,EAChB,cAAc,EAGjB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAyB,SAAS,EAAC,MAAM,OAAO,CAAC;AACxD,OAAO,EAAC,KAAK,EAAC,MAAM,UAAU,CAAC;AAO/B,OAAO,EAAC,kBAAkB,EAAE,oCAAoC,EAAC,MAAM,sBAAsB,CAAC;AAC9F,OAAO,EAAC,mBAAmB,EAAE,qCAAqC,EAAC,MAAM,uBAAuB,CAAC;AAEjG,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,GAAG,MAAM,CAAC;AACxE,MAAM,MAAM,UAAU,GAAG;IAAC,IAAI,EAAE,oBAAoB,CAAA;CAAC,CAAC;AACtD,MAAM,MAAM,iBAAiB,GACvB,gBAAgB,GAChB,MAAM,GACN,oCAAoC,GACpC,qCAAqC,CAAC;AAE5C,MAAM,WAAW,WACb,SAAQ,cAAc,CAAC,aAAa,CAAC,EACjC,IAAI,CAAC,cAAc,EAAE,YAAY,GAAG,QAAQ,GAAG,MAAM,CAAC;IAC1D;;;;OAIG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,QAAQ,EAAE,SAAS,CAAC;IACpB,KAAK,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,SAAS,CAAC;CACpB;AAED,MAAM,MAAM,aAAa,GAAG,OAAO,CAAC;IAChC,KAAK,EAAE,WAAW,CAAC;IACnB,GAAG,EAAE,cAAc,CAAC;IACpB,IAAI,EAAE,UAAU,CAAC;IACjB,OAAO,EAAE,aAAa,CAAC;IACvB,WAAW,EAAE,iBAAiB,CAAC;IAC/B,gBAAgB,EAAE;QACd,YAAY,EAAE,OAAO,kBAAkB,CAAC;QACxC,aAAa,EAAE,OAAO,mBAAmB,CAAC;QAC1C,MAAM,EAAE,OAAO,KAAK,CAAC,MAAM,CAAC;KAC/B,CAAC;CACL,CAAC,CAAC;AAoBH,eAAO,MAAM,MAAM;WA9BR,WAAW;SACb,cAAc;UACb,UAAU;aACP,aAAa;iBACT,iBAAiB;sBACZ;QACd,YAAY,EAAE,OAAO,kBAAkB,CAAC;QACxC,aAAa,EAAE,OAAO,mBAAmB,CAAC;QAC1C,MAAM,EAAE,OAAO,KAAK,CAAC,MAAM,CAAC;KAC/B;EAwEH,CAAC"}
|
|
@@ -15,6 +15,7 @@ var _object_without_properties = require("@swc/helpers/_/_object_without_propert
|
|
|
15
15
|
var _jsxruntime = require("react/jsx-runtime");
|
|
16
16
|
var _core = require("@mantine/core");
|
|
17
17
|
var _react = require("react");
|
|
18
|
+
var _modal = require("../modal");
|
|
18
19
|
var _criticalsvg = /*#__PURE__*/ _interop_require_default._(require("./icons/critical.svg"));
|
|
19
20
|
var _infosvg = /*#__PURE__*/ _interop_require_default._(require("./icons/info.svg"));
|
|
20
21
|
var _successsvg = /*#__PURE__*/ _interop_require_default._(require("./icons/success.svg"));
|
|
@@ -23,7 +24,6 @@ var _Promptcontext = require("./Prompt.context");
|
|
|
23
24
|
var _Promptmodulecss = /*#__PURE__*/ _interop_require_default._(require("./Prompt.module.css"));
|
|
24
25
|
var _PromptCancelButton = require("./PromptCancelButton");
|
|
25
26
|
var _PromptConfirmButton = require("./PromptConfirmButton");
|
|
26
|
-
var _PromptFooter = require("./PromptFooter");
|
|
27
27
|
var PROMPT_VARIANT_ICONS_SRC = {
|
|
28
28
|
success: _successsvg.default,
|
|
29
29
|
warning: _warningsvg.default,
|
|
@@ -72,28 +72,26 @@ var Prompt = (0, _core.factory)(function(_props, ref) {
|
|
|
72
72
|
classNames: classNames,
|
|
73
73
|
styles: styles
|
|
74
74
|
};
|
|
75
|
-
var
|
|
76
|
-
var otherChildren =
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
var footer = convertedChildren.find(function(child) {
|
|
80
|
-
return child.type === _PromptFooter.PromptFooter;
|
|
75
|
+
var footers = [];
|
|
76
|
+
var otherChildren = [];
|
|
77
|
+
_react.Children.forEach(children, function(child) {
|
|
78
|
+
(child.type === _modal.Modal.Footer ? footers : otherChildren).push(child);
|
|
81
79
|
});
|
|
82
80
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_Promptcontext.PromptContextProvider, {
|
|
83
81
|
value: {
|
|
84
82
|
variant: variant,
|
|
85
83
|
getStyles: getStyles
|
|
86
84
|
},
|
|
87
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(
|
|
85
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_modal.Modal.Root, _object_spread_props._(_object_spread._({
|
|
88
86
|
ref: ref,
|
|
89
87
|
variant: "prompt",
|
|
90
88
|
size: "sm"
|
|
91
89
|
}, others, getStyles('root')), {
|
|
92
90
|
children: [
|
|
93
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(
|
|
94
|
-
/*#__PURE__*/ (0, _jsxruntime.jsxs)(
|
|
91
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_modal.Modal.Overlay, _object_spread._({}, getStyles('overlay', stylesApiProps))),
|
|
92
|
+
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_modal.Modal.Content, _object_spread_props._(_object_spread._({}, getStyles('content', stylesApiProps)), {
|
|
95
93
|
children: [
|
|
96
|
-
/*#__PURE__*/ (0, _jsxruntime.jsxs)(
|
|
94
|
+
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_modal.Modal.Header, _object_spread_props._(_object_spread._({}, getStyles('header', stylesApiProps)), {
|
|
97
95
|
children: [
|
|
98
96
|
icon || icon === null ? icon : /*#__PURE__*/ (0, _jsxruntime.jsx)(_core.Image, _object_spread_props._(_object_spread._({
|
|
99
97
|
alt: "",
|
|
@@ -101,18 +99,18 @@ var Prompt = (0, _core.factory)(function(_props, ref) {
|
|
|
101
99
|
}, getStyles('icon', stylesApiProps)), {
|
|
102
100
|
src: PROMPT_VARIANT_ICONS_SRC[variant]
|
|
103
101
|
})),
|
|
104
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(
|
|
102
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_modal.Modal.Title, _object_spread_props._(_object_spread._({}, getStyles('title', stylesApiProps)), {
|
|
105
103
|
children: title
|
|
106
104
|
})),
|
|
107
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(
|
|
105
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_modal.Modal.CloseButton, _object_spread._({}, getStyles('close', stylesApiProps)))
|
|
108
106
|
]
|
|
109
107
|
})),
|
|
110
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(
|
|
108
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_modal.Modal.Body, _object_spread_props._(_object_spread._({}, getStyles('body', stylesApiProps)), {
|
|
111
109
|
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_core.Box, _object_spread_props._(_object_spread._({}, getStyles('inner', stylesApiProps)), {
|
|
112
110
|
children: otherChildren
|
|
113
111
|
}))
|
|
114
112
|
})),
|
|
115
|
-
|
|
113
|
+
footers
|
|
116
114
|
]
|
|
117
115
|
}))
|
|
118
116
|
]
|
|
@@ -121,6 +119,6 @@ var Prompt = (0, _core.factory)(function(_props, ref) {
|
|
|
121
119
|
});
|
|
122
120
|
Prompt.CancelButton = _PromptCancelButton.PromptCancelButton;
|
|
123
121
|
Prompt.ConfirmButton = _PromptConfirmButton.PromptConfirmButton;
|
|
124
|
-
Prompt.Footer =
|
|
122
|
+
Prompt.Footer = _modal.Modal.Footer;
|
|
125
123
|
|
|
126
124
|
//# sourceMappingURL=Prompt.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/prompt/Prompt.tsx"],"sourcesContent":["import {\n Box,\n createVarsResolver,\n factory,\n Factory,\n Image,\n
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/prompt/Prompt.tsx"],"sourcesContent":["import {\n Box,\n createVarsResolver,\n factory,\n Factory,\n Image,\n ModalRootProps,\n ModalStylesNames,\n StylesApiProps,\n useProps,\n useStyles,\n} from '@mantine/core';\nimport {Children, ReactElement, ReactNode} from 'react';\nimport {Modal} from '../modal';\nimport Critical from './icons/critical.svg';\nimport Info from './icons/info.svg';\nimport Success from './icons/success.svg';\nimport Warning from './icons/warning.svg';\nimport {PromptContextProvider} from './Prompt.context';\nimport classes from './Prompt.module.css';\nimport {PromptCancelButton, PromptCancelButtonStylesNamesVariant} from './PromptCancelButton';\nimport {PromptConfirmButton, PromptConfirmButtonStylesNamesVariant} from './PromptConfirmButton';\n\nexport type PromptVariant = 'success' | 'warning' | 'critical' | 'info';\nexport type PromptVars = {root: '--prompt-icon-size'};\nexport type PromptStylesNames =\n | ModalStylesNames\n | 'icon'\n | PromptCancelButtonStylesNamesVariant\n | PromptConfirmButtonStylesNamesVariant;\n\nexport interface PromptProps\n extends StylesApiProps<PromptFactory>,\n Omit<ModalRootProps, 'classNames' | 'styles' | 'vars'> {\n /**\n * Controls prompt appearance\n *\n * @default \"info\"\n */\n variant?: PromptVariant;\n children: ReactNode;\n title: ReactNode;\n icon?: ReactNode;\n}\n\nexport type PromptFactory = Factory<{\n props: PromptProps;\n ref: HTMLDivElement;\n vars: PromptVars;\n variant: PromptVariant;\n stylesNames: PromptStylesNames;\n staticComponents: {\n CancelButton: typeof PromptCancelButton;\n ConfirmButton: typeof PromptConfirmButton;\n Footer: typeof Modal.Footer;\n };\n}>;\n\nconst PROMPT_VARIANT_ICONS_SRC: Record<PromptVariant, string> = {\n success: Success,\n warning: Warning,\n critical: Critical,\n info: Info,\n};\n\nconst defaultProps: Partial<PromptProps> = {\n variant: 'info',\n centered: true,\n};\n\nconst varsResolver = createVarsResolver<PromptFactory>((_theme, {icon}) => ({\n root: {\n '--prompt-icon-size': icon ? undefined : '88px',\n },\n}));\n\nexport const Prompt = factory<PromptFactory>((_props, ref) => {\n const props = useProps('Prompt', defaultProps, _props);\n const {variant, title, icon, children, className, classNames, style, styles, unstyled, vars, ...others} = props;\n const getStyles = useStyles<PromptFactory>({\n name: 'Prompt',\n props,\n classes,\n className,\n style,\n classNames,\n styles,\n unstyled,\n vars,\n varsResolver,\n });\n const stylesApiProps = {classNames, styles};\n\n const footers: ReactElement[] = [];\n const otherChildren: ReactElement[] = [];\n\n Children.forEach(children, (child: ReactElement) => {\n (child.type === Modal.Footer ? footers : otherChildren).push(child);\n });\n\n return (\n <PromptContextProvider value={{variant, getStyles}}>\n <Modal.Root ref={ref} variant=\"prompt\" size=\"sm\" {...others} {...getStyles('root')}>\n <Modal.Overlay {...getStyles('overlay', stylesApiProps)} />\n <Modal.Content {...getStyles('content', stylesApiProps)}>\n <Modal.Header {...getStyles('header', stylesApiProps)}>\n {icon || icon === null ? (\n icon\n ) : (\n <Image\n alt=\"\"\n role=\"presentation\"\n {...getStyles('icon', stylesApiProps)}\n src={PROMPT_VARIANT_ICONS_SRC[variant]}\n />\n )}\n <Modal.Title {...getStyles('title', stylesApiProps)}>{title}</Modal.Title>\n <Modal.CloseButton {...getStyles('close', stylesApiProps)} />\n </Modal.Header>\n <Modal.Body {...getStyles('body', stylesApiProps)}>\n <Box {...getStyles('inner', stylesApiProps)}>{otherChildren}</Box>\n </Modal.Body>\n {footers}\n </Modal.Content>\n </Modal.Root>\n </PromptContextProvider>\n );\n});\n\nPrompt.CancelButton = PromptCancelButton;\nPrompt.ConfirmButton = PromptConfirmButton;\nPrompt.Footer = Modal.Footer;\n"],"names":["Prompt","PROMPT_VARIANT_ICONS_SRC","success","Success","warning","Warning","critical","Critical","info","Info","defaultProps","variant","centered","varsResolver","createVarsResolver","_theme","icon","root","undefined","factory","_props","ref","props","useProps","title","children","className","classNames","style","styles","unstyled","vars","others","getStyles","useStyles","name","classes","stylesApiProps","footers","otherChildren","Children","forEach","child","type","Modal","Footer","push","PromptContextProvider","value","Root","size","Overlay","Content","Header","Image","alt","role","src","Title","CloseButton","Body","Box","CancelButton","PromptCancelButton","ConfirmButton","PromptConfirmButton"],"mappings":";;;;+BA4EaA;;;eAAAA;;;;;;;;oBAjEN;qBACyC;qBAC5B;oEACC;gEACJ;mEACG;mEACA;6BACgB;wEAChB;kCACmD;mCACE;AAqCzE,IAAMC,2BAA0D;IAC5DC,SAASC,mBAAO;IAChBC,SAASC,mBAAO;IAChBC,UAAUC,oBAAQ;IAClBC,MAAMC,gBAAI;AACd;AAEA,IAAMC,eAAqC;IACvCC,SAAS;IACTC,UAAU;AACd;AAEA,IAAMC,eAAeC,IAAAA,wBAAkB,EAAgB,SAACC;QAASC,aAAAA;WAAW;QACxEC,MAAM;YACF,sBAAsBD,OAAOE,YAAY;QAC7C;IACJ;;AAEO,IAAMlB,SAASmB,IAAAA,aAAO,EAAgB,SAACC,QAAQC;IAClD,IAAMC,QAAQC,IAAAA,cAAQ,EAAC,UAAUb,cAAcU;IAC/C,IAAOT,UAAmGW,MAAnGX,SAASa,QAA0FF,MAA1FE,OAAOR,OAAmFM,MAAnFN,MAAMS,WAA6EH,MAA7EG,UAAUC,YAAmEJ,MAAnEI,WAAWC,aAAwDL,MAAxDK,YAAYC,QAA4CN,MAA5CM,OAAOC,SAAqCP,MAArCO,QAAQC,WAA6BR,MAA7BQ,UAAUC,OAAmBT,MAAnBS,MAASC,sCAAUV;QAAnGX;QAASa;QAAOR;QAAMS;QAAUC;QAAWC;QAAYC;QAAOC;QAAQC;QAAUC;;IACvF,IAAME,YAAYC,IAAAA,eAAS,EAAgB;QACvCC,MAAM;QACNb,OAAAA;QACAc,SAAAA,wBAAO;QACPV,WAAAA;QACAE,OAAAA;QACAD,YAAAA;QACAE,QAAAA;QACAC,UAAAA;QACAC,MAAAA;QACAlB,cAAAA;IACJ;IACA,IAAMwB,iBAAiB;QAACV,YAAAA;QAAYE,QAAAA;IAAM;IAE1C,IAAMS,UAA0B,EAAE;IAClC,IAAMC,gBAAgC,EAAE;IAExCC,eAAQ,CAACC,OAAO,CAAChB,UAAU,SAACiB;QACvBA,CAAAA,MAAMC,IAAI,KAAKC,YAAK,CAACC,MAAM,GAAGP,UAAUC,aAAY,EAAGO,IAAI,CAACJ;IACjE;IAEA,qBACI,qBAACK,oCAAqB;QAACC,OAAO;YAACrC,SAAAA;YAASsB,WAAAA;QAAS;kBAC7C,cAAA,sBAACW,YAAK,CAACK,IAAI;YAAC5B,KAAKA;YAAKV,SAAQ;YAASuC,MAAK;WAASlB,QAAYC,UAAU;;8BACvE,qBAACW,YAAK,CAACO,OAAO,uBAAKlB,UAAU,WAAWI;8BACxC,sBAACO,YAAK,CAACQ,OAAO,8CAAKnB,UAAU,WAAWI;;sCACpC,sBAACO,YAAK,CAACS,MAAM,8CAAKpB,UAAU,UAAUI;;gCACjCrB,QAAQA,SAAS,OACdA,qBAEA,qBAACsC,WAAK;oCACFC,KAAI;oCACJC,MAAK;mCACDvB,UAAU,QAAQI;oCACtBoB,KAAKxD,wBAAwB,CAACU,QAAQ;;8CAG9C,qBAACiC,YAAK,CAACc,KAAK,8CAAKzB,UAAU,SAASI;8CAAkBb;;8CACtD,qBAACoB,YAAK,CAACe,WAAW,uBAAK1B,UAAU,SAASI;;;sCAE9C,qBAACO,YAAK,CAACgB,IAAI,8CAAK3B,UAAU,QAAQI;sCAC9B,cAAA,qBAACwB,SAAG,8CAAK5B,UAAU,SAASI;0CAAkBE;;;wBAEjDD;;;;;;AAKrB;AAEAtC,OAAO8D,YAAY,GAAGC,sCAAkB;AACxC/D,OAAOgE,aAAa,GAAGC,wCAAmB;AAC1CjE,OAAO6C,MAAM,GAAGD,YAAK,CAACC,MAAM"}
|
|
@@ -14,6 +14,8 @@ export interface StickyFooterProps extends Omit<GroupProps, 'classNames' | 'styl
|
|
|
14
14
|
*
|
|
15
15
|
* The 'modal-footer' removes the modal's default padding so that the footer properly hugs the bottom of the modal.
|
|
16
16
|
* It also adds a border on top of the footer.
|
|
17
|
+
*
|
|
18
|
+
* @deprecated Use Modal.Footer from @coveord/plasma-mantine/Modal for modal footers. For other cases, the 'default' variant should suffice.
|
|
17
19
|
*/
|
|
18
20
|
variant?: 'default' | 'modal-footer';
|
|
19
21
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StickyFooter.d.ts","sourceRoot":"","sources":["../../../../src/components/sticky-footer/StickyFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAS,UAAU,EAAE,cAAc,EAA+B,MAAM,eAAe,CAAC;AAEvG,OAAO,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AAGhC,MAAM,WAAW,iBACb,SAAQ,IAAI,CAAC,UAAU,EAAE,YAAY,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAC,EAClE,cAAc,CAAC,mBAAmB,CAAC;IACvC;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB
|
|
1
|
+
{"version":3,"file":"StickyFooter.d.ts","sourceRoot":"","sources":["../../../../src/components/sticky-footer/StickyFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAS,UAAU,EAAE,cAAc,EAA+B,MAAM,eAAe,CAAC;AAEvG,OAAO,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AAGhC,MAAM,WAAW,iBACb,SAAQ,IAAI,CAAC,UAAU,EAAE,YAAY,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAC,EAClE,cAAc,CAAC,mBAAmB,CAAC;IACvC;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,cAAc,CAAC;CACxC;AAED,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC;AAE7C,MAAM,MAAM,mBAAmB,GAAG,OAAO,CAAC;IACtC,KAAK,EAAE,iBAAiB,CAAC;IACzB,GAAG,EAAE,cAAc,CAAC;IACpB,WAAW,EAAE,uBAAuB,CAAC;CACxC,CAAC,CAAC;AAOH,eAAO,MAAM,YAAY;WAVd,iBAAiB;SACnB,cAAc;iBACN,uBAAuB;EAoCtC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/sticky-footer/StickyFooter.tsx"],"sourcesContent":["import {Factory, Group, GroupProps, StylesApiProps, factory, useProps, useStyles} from '@mantine/core';\nimport clsx from 'clsx';\nimport {ReactNode} from 'react';\nimport classes from './StickyFooter.module.css';\n\nexport interface StickyFooterProps\n extends Omit<GroupProps, 'classNames' | 'styles' | 'vars' | 'variant'>,\n StylesApiProps<StickyFooterFactory> {\n /**\n * Whether a border is render on top of the footer\n */\n borderTop?: boolean;\n /**\n * Footer's children, usually buttons\n */\n children?: ReactNode;\n /**\n * Use variant 'modal-footer' when rendering the `StickyFooter` inside `Modal`.\n *\n * The 'modal-footer' removes the modal's default padding so that the footer properly hugs the bottom of the modal.\n * It also adds a border on top of the footer.\n */\n variant?: 'default' | 'modal-footer';\n}\n\nexport type StickyFooterStylesNames = 'root';\n\nexport type StickyFooterFactory = Factory<{\n props: StickyFooterProps;\n ref: HTMLDivElement;\n stylesNames: StickyFooterStylesNames;\n}>;\n\nconst defaultProps: Partial<StickyFooterProps> = {\n gap: 'sm',\n justify: 'flex-end',\n};\n\nexport const StickyFooter = factory<StickyFooterFactory>((props, ref) => {\n const {borderTop, justify, gap, children, className, classNames, style, styles, unstyled, vars, ...others} =\n useProps('StickyFooter', defaultProps, props);\n const getStyles = useStyles<StickyFooterFactory>({\n name: 'StickyFooter',\n classes,\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n });\n\n const css = getStyles('root');\n\n return (\n <Group\n justify={justify}\n gap={gap}\n className={clsx(css.className, {[classes.border]: !!borderTop})}\n style={css.style}\n ref={ref}\n {...others}\n >\n {children}\n </Group>\n );\n});\n"],"names":["StickyFooter","defaultProps","gap","justify","factory","props","ref","useProps","borderTop","children","className","classNames","style","styles","unstyled","vars","others","getStyles","useStyles","name","classes","css","Group","clsx","border"],"mappings":";;;;+
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/sticky-footer/StickyFooter.tsx"],"sourcesContent":["import {Factory, Group, GroupProps, StylesApiProps, factory, useProps, useStyles} from '@mantine/core';\nimport clsx from 'clsx';\nimport {ReactNode} from 'react';\nimport classes from './StickyFooter.module.css';\n\nexport interface StickyFooterProps\n extends Omit<GroupProps, 'classNames' | 'styles' | 'vars' | 'variant'>,\n StylesApiProps<StickyFooterFactory> {\n /**\n * Whether a border is render on top of the footer\n */\n borderTop?: boolean;\n /**\n * Footer's children, usually buttons\n */\n children?: ReactNode;\n /**\n * Use variant 'modal-footer' when rendering the `StickyFooter` inside `Modal`.\n *\n * The 'modal-footer' removes the modal's default padding so that the footer properly hugs the bottom of the modal.\n * It also adds a border on top of the footer.\n *\n * @deprecated Use Modal.Footer from @coveord/plasma-mantine/Modal for modal footers. For other cases, the 'default' variant should suffice.\n */\n variant?: 'default' | 'modal-footer';\n}\n\nexport type StickyFooterStylesNames = 'root';\n\nexport type StickyFooterFactory = Factory<{\n props: StickyFooterProps;\n ref: HTMLDivElement;\n stylesNames: StickyFooterStylesNames;\n}>;\n\nconst defaultProps: Partial<StickyFooterProps> = {\n gap: 'sm',\n justify: 'flex-end',\n};\n\nexport const StickyFooter = factory<StickyFooterFactory>((props, ref) => {\n const {borderTop, justify, gap, children, className, classNames, style, styles, unstyled, vars, ...others} =\n useProps('StickyFooter', defaultProps, props);\n const getStyles = useStyles<StickyFooterFactory>({\n name: 'StickyFooter',\n classes,\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n });\n\n const css = getStyles('root');\n\n return (\n <Group\n justify={justify}\n gap={gap}\n className={clsx(css.className, {[classes.border]: !!borderTop})}\n style={css.style}\n ref={ref}\n {...others}\n >\n {children}\n </Group>\n );\n});\n"],"names":["StickyFooter","defaultProps","gap","justify","factory","props","ref","useProps","borderTop","children","className","classNames","style","styles","unstyled","vars","others","getStyles","useStyles","name","classes","css","Group","clsx","border"],"mappings":";;;;+BAwCaA;;;eAAAA;;;;;;;;;oBAxC0E;6DACtE;8EAEG;AAgCpB,IAAMC,eAA2C;IAC7CC,KAAK;IACLC,SAAS;AACb;AAEO,IAAMH,eAAeI,IAAAA,aAAO,EAAsB,SAACC,OAAOC;IAC7D,IACIC,YAAAA,IAAAA,cAAQ,EAAC,gBAAgBN,cAAcI,QADpCG,YACHD,UADGC,WAAWL,UACdI,UADcJ,SAASD,MACvBK,UADuBL,KAAKO,WAC5BF,UAD4BE,UAAUC,YACtCH,UADsCG,WAAWC,aACjDJ,UADiDI,YAAYC,QAC7DL,UAD6DK,OAAOC,SACpEN,UADoEM,QAAQC,WAC5EP,UAD4EO,UAAUC,OACtFR,UADsFQ,MAASC,sCAC/FT;QADGC;QAAWL;QAASD;QAAKO;QAAUC;QAAWC;QAAYC;QAAOC;QAAQC;QAAUC;;IAE1F,IAAME,YAAYC,IAAAA,eAAS,EAAsB;QAC7CC,MAAM;QACNC,SAAAA,8BAAO;QACPf,OAAAA;QACAK,WAAAA;QACAE,OAAAA;QACAD,YAAAA;QACAE,QAAAA;QACAC,UAAAA;IACJ;IAEA,IAAMO,MAAMJ,UAAU;IAEtB,qBACI,qBAACK,WAAK;QACFnB,SAASA;QACTD,KAAKA;QACLQ,WAAWa,IAAAA,aAAI,EAACF,IAAIX,SAAS,EAAG,uBAACU,8BAAO,CAACI,MAAM,EAAG,CAAC,CAAChB;QACpDI,OAAOS,IAAIT,KAAK;QAChBN,KAAKA;OACDU;kBAEHP;;AAGb"}
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export { type NotificationsProps } from '@mantine/notifications';
|
|
|
11
11
|
export * from '@tanstack/table-core';
|
|
12
12
|
export * from './components';
|
|
13
13
|
export { noop };
|
|
14
|
-
export { ActionIcon, BrowserPreview, Button, CopyToClipboard, Header, Menu, PasswordInput, Select, Table, type ActionIconProps, type ButtonProps, type CopyToClipboardProps, type HeaderProps, type MenuItemProps, type TableProps, type TableState, } from './components';
|
|
14
|
+
export { ActionIcon, BrowserPreview, Button, CopyToClipboard, Header, Menu, Modal, PasswordInput, Select, Table, type ActionIconProps, type ButtonProps, type CopyToClipboardProps, type HeaderProps, type MenuItemProps, type ModalFactory, type TableProps, type TableState, } from './components';
|
|
15
15
|
export * from './theme';
|
|
16
16
|
declare module '@mantine/core' {
|
|
17
17
|
interface MantineThemeColorsOverride {
|
package/dist/cjs/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,kBAAkB,EAAE,IAAI,EAAC,MAAM,eAAe,CAAC;AACvD,OAAO,EAAC,KAAK,OAAO,EAAC,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAC,KAAK,YAAY,EAAC,MAAM,sBAAsB,CAAC;AAEvD,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAC,UAAU,EAAC,MAAM,eAAe,CAAC;AACzC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAC,KAAK,kBAAkB,EAAC,MAAM,wBAAwB,CAAC;AAC/D,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAC,IAAI,EAAC,CAAC;AAGd,OAAO,EACH,UAAU,EACV,cAAc,EACd,MAAM,EACN,eAAe,EACf,MAAM,EACN,IAAI,EACJ,aAAa,EACb,MAAM,EACN,KAAK,EACL,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,oBAAoB,EACzB,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,UAAU,EACf,KAAK,UAAU,GAClB,MAAM,cAAc,CAAC;AAEtB,cAAc,SAAS,CAAC;AAExB,OAAO,QAAQ,eAAe,CAAC;IAC3B,UAAiB,0BAA0B;QACvC,MAAM,EAAE,MAAM,CAAC,MAAM,OAAO,YAAY,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,EAAE,kBAAkB,CAAC,CAAC;KACjF;CACJ;AAED,OAAO,QAAQ,uBAAuB,CAAC;IACnC,UAAU,UAAU,CAAC,KAAK,SAAS,OAAO,EAAE,MAAM;QAC9C;;;;WAIG;QACH,aAAa,EAAE,OAAO,CAAC;KAC1B;CACJ"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,kBAAkB,EAAE,IAAI,EAAC,MAAM,eAAe,CAAC;AACvD,OAAO,EAAC,KAAK,OAAO,EAAC,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAC,KAAK,YAAY,EAAC,MAAM,sBAAsB,CAAC;AAEvD,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAC,UAAU,EAAC,MAAM,eAAe,CAAC;AACzC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAC,KAAK,kBAAkB,EAAC,MAAM,wBAAwB,CAAC;AAC/D,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAC,IAAI,EAAC,CAAC;AAGd,OAAO,EACH,UAAU,EACV,cAAc,EACd,MAAM,EACN,eAAe,EACf,MAAM,EACN,IAAI,EACJ,KAAK,EACL,aAAa,EACb,MAAM,EACN,KAAK,EACL,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,oBAAoB,EACzB,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,UAAU,EACf,KAAK,UAAU,GAClB,MAAM,cAAc,CAAC;AAEtB,cAAc,SAAS,CAAC;AAExB,OAAO,QAAQ,eAAe,CAAC;IAC3B,UAAiB,0BAA0B;QACvC,MAAM,EAAE,MAAM,CAAC,MAAM,OAAO,YAAY,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,EAAE,kBAAkB,CAAC,CAAC;KACjF;CACJ;AAED,OAAO,QAAQ,uBAAuB,CAAC;IACnC,UAAU,UAAU,CAAC,KAAK,SAAS,OAAO,EAAE,MAAM;QAC9C;;;;WAIG;QACH,aAAa,EAAE,OAAO,CAAC;KAC1B;CACJ"}
|
package/dist/cjs/index.js
CHANGED
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["import {MantineColorsTuple, noop} from '@mantine/core';\nimport {type RowData} from '@tanstack/table-core';\nimport {type PlasmaColors} from './theme/PlasmaColors';\n\nexport * from '@mantine/carousel';\nexport * from '@mantine/core';\nexport {Pagination} from '@mantine/core';\nexport * from '@mantine/form';\nexport * from '@mantine/hooks';\nexport * from '@mantine/notifications';\nexport {type NotificationsProps} from '@mantine/notifications';\nexport * from '@tanstack/table-core';\nexport * from './components';\nexport {noop};\n\n// explicitly overriding mantine components\nexport {\n ActionIcon,\n BrowserPreview,\n Button,\n CopyToClipboard,\n Header,\n Menu,\n PasswordInput,\n Select,\n Table,\n type ActionIconProps,\n type ButtonProps,\n type CopyToClipboardProps,\n type HeaderProps,\n type MenuItemProps,\n type TableProps,\n type TableState,\n} from './components';\n\nexport * from './theme';\n\ndeclare module '@mantine/core' {\n export interface MantineThemeColorsOverride {\n colors: Record<keyof typeof PlasmaColors | (string & {}), MantineColorsTuple>;\n }\n}\n\ndeclare module '@tanstack/react-table' {\n interface ColumnMeta<TData extends RowData, TValue> {\n /**\n * Whether the column is a control column.\n * Control columns are columns that are not part of the data but are used to control the table.\n * For example, a column that contains checkboxes to select rows.\n */\n controlColumn: boolean;\n }\n}\n"],"names":["ActionIcon","BrowserPreview","Button","CopyToClipboard","Header","Menu","Pagination","PasswordInput","Select","Table","noop"],"mappings":";;;;;;;;;;;IAiBIA,UAAU;eAAVA,sBAAU;;IACVC,cAAc;eAAdA,0BAAc;;IACdC,MAAM;eAANA,kBAAM;;IACNC,eAAe;eAAfA,2BAAe;;IACfC,MAAM;eAANA,kBAAM;;IACNC,IAAI;eAAJA,gBAAI;;
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["import {MantineColorsTuple, noop} from '@mantine/core';\nimport {type RowData} from '@tanstack/table-core';\nimport {type PlasmaColors} from './theme/PlasmaColors';\n\nexport * from '@mantine/carousel';\nexport * from '@mantine/core';\nexport {Pagination} from '@mantine/core';\nexport * from '@mantine/form';\nexport * from '@mantine/hooks';\nexport * from '@mantine/notifications';\nexport {type NotificationsProps} from '@mantine/notifications';\nexport * from '@tanstack/table-core';\nexport * from './components';\nexport {noop};\n\n// explicitly overriding mantine components\nexport {\n ActionIcon,\n BrowserPreview,\n Button,\n CopyToClipboard,\n Header,\n Menu,\n Modal,\n PasswordInput,\n Select,\n Table,\n type ActionIconProps,\n type ButtonProps,\n type CopyToClipboardProps,\n type HeaderProps,\n type MenuItemProps,\n type ModalFactory,\n type TableProps,\n type TableState,\n} from './components';\n\nexport * from './theme';\n\ndeclare module '@mantine/core' {\n export interface MantineThemeColorsOverride {\n colors: Record<keyof typeof PlasmaColors | (string & {}), MantineColorsTuple>;\n }\n}\n\ndeclare module '@tanstack/react-table' {\n interface ColumnMeta<TData extends RowData, TValue> {\n /**\n * Whether the column is a control column.\n * Control columns are columns that are not part of the data but are used to control the table.\n * For example, a column that contains checkboxes to select rows.\n */\n controlColumn: boolean;\n }\n}\n"],"names":["ActionIcon","BrowserPreview","Button","CopyToClipboard","Header","Menu","Modal","Pagination","PasswordInput","Select","Table","noop"],"mappings":";;;;;;;;;;;IAiBIA,UAAU;eAAVA,sBAAU;;IACVC,cAAc;eAAdA,0BAAc;;IACdC,MAAM;eAANA,kBAAM;;IACNC,eAAe;eAAfA,2BAAe;;IACfC,MAAM;eAANA,kBAAM;;IACNC,IAAI;eAAJA,gBAAI;;IACJC,KAAK;eAALA,iBAAK;;IAjBDC,UAAU;eAAVA,gBAAU;;IAkBdC,aAAa;eAAbA,yBAAa;;IACbC,MAAM;eAANA,kBAAM;;IACNC,KAAK;eAALA,iBAAK;;IAbDC,IAAI;eAAJA,UAAI;;;;mCAb2B;uBAIzB;uBAGA;uBACA;uBACA;uBAEA;yCACA;uBAyBA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/index.ts"],"sourcesContent":["export * from './action-icon';\nexport * from './blank-slate';\nexport * from './browser-preview';\nexport * from './button';\nexport * from './code-editor';\nexport * from './collection';\nexport * from './copyToClipboard';\nexport * from './date-range-picker';\nexport * from './ellipsis-text';\nexport * from './header';\nexport * from './inline-confirm';\nexport * from './menu';\nexport * from './prompt';\nexport * from './read-only';\nexport * from './sticky-footer';\nexport * from './table';\nexport * from './child-form';\n"],"names":[],"mappings":"AAAA,cAAc,gBAAgB;AAC9B,cAAc,gBAAgB;AAC9B,cAAc,oBAAoB;AAClC,cAAc,WAAW;AACzB,cAAc,gBAAgB;AAC9B,cAAc,eAAe;AAC7B,cAAc,oBAAoB;AAClC,cAAc,sBAAsB;AACpC,cAAc,kBAAkB;AAChC,cAAc,WAAW;AACzB,cAAc,mBAAmB;AACjC,cAAc,SAAS;AACvB,cAAc,WAAW;AACzB,cAAc,cAAc;AAC5B,cAAc,kBAAkB;AAChC,cAAc,UAAU;AACxB,cAAc,eAAe"}
|
|
1
|
+
{"version":3,"sources":["../../../src/components/index.ts"],"sourcesContent":["export * from './action-icon';\nexport * from './blank-slate';\nexport * from './browser-preview';\nexport * from './button';\nexport * from './code-editor';\nexport * from './collection';\nexport * from './copyToClipboard';\nexport * from './date-range-picker';\nexport * from './ellipsis-text';\nexport * from './header';\nexport * from './inline-confirm';\nexport * from './menu';\nexport * from './modal';\nexport * from './prompt';\nexport * from './read-only';\nexport * from './sticky-footer';\nexport * from './table';\nexport * from './child-form';\n"],"names":[],"mappings":"AAAA,cAAc,gBAAgB;AAC9B,cAAc,gBAAgB;AAC9B,cAAc,oBAAoB;AAClC,cAAc,WAAW;AACzB,cAAc,gBAAgB;AAC9B,cAAc,eAAe;AAC7B,cAAc,oBAAoB;AAClC,cAAc,sBAAsB;AACpC,cAAc,kBAAkB;AAChC,cAAc,WAAW;AACzB,cAAc,mBAAmB;AACjC,cAAc,SAAS;AACvB,cAAc,UAAU;AACxB,cAAc,WAAW;AACzB,cAAc,cAAc;AAC5B,cAAc,kBAAkB;AAChC,cAAc,UAAU;AACxB,cAAc,eAAe"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ModalFactory as MantineModalFactory } from '@mantine/core';
|
|
2
|
+
import { ModalFooter } from './ModalFooter';
|
|
3
|
+
type PlasmaModalFactory = Omit<MantineModalFactory, 'staticComponents'> & {
|
|
4
|
+
staticComponents: MantineModalFactory['staticComponents'] & {
|
|
5
|
+
Footer: typeof ModalFooter;
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
export declare const Modal: import("@mantine/core").MantineComponent<PlasmaModalFactory>;
|
|
9
|
+
export type ModalFactory = PlasmaModalFactory;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=Modal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../../src/components/modal/Modal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGH,YAAY,IAAI,mBAAmB,EAEtC,MAAM,eAAe,CAAC;AACvB,OAAO,EAAC,WAAW,EAAmC,MAAM,eAAe,CAAC;AAG5E,KAAK,kBAAkB,GAAG,IAAI,CAAC,mBAAmB,EAAE,kBAAkB,CAAC,GAAG;IACtE,gBAAgB,EAAE,mBAAmB,CAAC,kBAAkB,CAAC,GAAG;QACxD,MAAM,EAAE,OAAO,WAAW,CAAC;KAC9B,CAAC;CACL,CAAC;AAiBF,eAAO,MAAM,KAAK,8DAAc,CAAC;AAEjC,MAAM,MAAM,YAAY,GAAG,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { factory, Modal as MantineModal } from '@mantine/core';
|
|
3
|
+
import { ModalFooter as PlasmaModalFooter } from './ModalFooter';
|
|
4
|
+
const PlasmaModal = factory((props, ref)=>/*#__PURE__*/ _jsx(MantineModal, {
|
|
5
|
+
ref: ref,
|
|
6
|
+
...props
|
|
7
|
+
}));
|
|
8
|
+
PlasmaModal.displayName = '@coveord/plasma-mantine/Modal';
|
|
9
|
+
PlasmaModal.Root = MantineModal.Root;
|
|
10
|
+
PlasmaModal.Body = MantineModal.Body;
|
|
11
|
+
PlasmaModal.Overlay = MantineModal.Overlay;
|
|
12
|
+
PlasmaModal.Content = MantineModal.Content;
|
|
13
|
+
PlasmaModal.Header = MantineModal.Header;
|
|
14
|
+
PlasmaModal.Title = MantineModal.Title;
|
|
15
|
+
PlasmaModal.CloseButton = MantineModal.CloseButton;
|
|
16
|
+
PlasmaModal.Stack = MantineModal.Stack;
|
|
17
|
+
PlasmaModal.Footer = PlasmaModalFooter;
|
|
18
|
+
export const Modal = PlasmaModal;
|
|
19
|
+
|
|
20
|
+
//# sourceMappingURL=Modal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/modal/Modal.tsx"],"sourcesContent":["import {\n factory,\n Modal as MantineModal,\n ModalFactory as MantineModalFactory,\n ModalProps as MantineModalProps,\n} from '@mantine/core';\nimport {ModalFooter, ModalFooter as PlasmaModalFooter} from './ModalFooter';\n\n// Need to redeclare the factory to override and add footer to the props type\ntype PlasmaModalFactory = Omit<MantineModalFactory, 'staticComponents'> & {\n staticComponents: MantineModalFactory['staticComponents'] & {\n Footer: typeof ModalFooter;\n };\n};\n\nconst PlasmaModal = factory<PlasmaModalFactory>((props: MantineModalProps, ref) => (\n <MantineModal ref={ref} {...props} />\n));\n\nPlasmaModal.displayName = '@coveord/plasma-mantine/Modal';\nPlasmaModal.Root = MantineModal.Root;\nPlasmaModal.Body = MantineModal.Body;\nPlasmaModal.Overlay = MantineModal.Overlay;\nPlasmaModal.Content = MantineModal.Content;\nPlasmaModal.Header = MantineModal.Header;\nPlasmaModal.Title = MantineModal.Title;\nPlasmaModal.CloseButton = MantineModal.CloseButton;\nPlasmaModal.Stack = MantineModal.Stack;\nPlasmaModal.Footer = PlasmaModalFooter;\n\nexport const Modal = PlasmaModal;\n\nexport type ModalFactory = PlasmaModalFactory;\n"],"names":["factory","Modal","MantineModal","ModalFooter","PlasmaModalFooter","PlasmaModal","props","ref","displayName","Root","Body","Overlay","Content","Header","Title","CloseButton","Stack","Footer"],"mappings":";AAAA,SACIA,OAAO,EACPC,SAASC,YAAY,QAGlB,gBAAgB;AACvB,SAAqBC,eAAeC,iBAAiB,QAAO,gBAAgB;AAS5E,MAAMC,cAAcL,QAA4B,CAACM,OAA0BC,oBACvE,KAACL;QAAaK,KAAKA;QAAM,GAAGD,KAAK;;AAGrCD,YAAYG,WAAW,GAAG;AAC1BH,YAAYI,IAAI,GAAGP,aAAaO,IAAI;AACpCJ,YAAYK,IAAI,GAAGR,aAAaQ,IAAI;AACpCL,YAAYM,OAAO,GAAGT,aAAaS,OAAO;AAC1CN,YAAYO,OAAO,GAAGV,aAAaU,OAAO;AAC1CP,YAAYQ,MAAM,GAAGX,aAAaW,MAAM;AACxCR,YAAYS,KAAK,GAAGZ,aAAaY,KAAK;AACtCT,YAAYU,WAAW,GAAGb,aAAaa,WAAW;AAClDV,YAAYW,KAAK,GAAGd,aAAac,KAAK;AACtCX,YAAYY,MAAM,GAAGb;AAErB,OAAO,MAAMH,QAAQI,YAAY"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Factory } from '@mantine/core';
|
|
2
|
+
import { StickyFooterProps, StickyFooterStylesNames } from '../sticky-footer';
|
|
3
|
+
export interface ModalFooterProps extends Omit<StickyFooterProps, 'variant'> {
|
|
4
|
+
/**
|
|
5
|
+
* If the footer is sticky, its margin will be adjusted to counteract the padding of the Modal.Body, ensuring the footer visually sticks to the bottom of the modal.
|
|
6
|
+
*/
|
|
7
|
+
sticky?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export type ModalFooterStylesNames = StickyFooterStylesNames;
|
|
10
|
+
export type ModalFooterFactory = Factory<{
|
|
11
|
+
props: ModalFooterProps;
|
|
12
|
+
ref: HTMLDivElement;
|
|
13
|
+
stylesNames: ModalFooterStylesNames;
|
|
14
|
+
}>;
|
|
15
|
+
export declare const ModalFooter: import("@mantine/core").MantineComponent<{
|
|
16
|
+
props: ModalFooterProps;
|
|
17
|
+
ref: HTMLDivElement;
|
|
18
|
+
stylesNames: ModalFooterStylesNames;
|
|
19
|
+
}>;
|
|
20
|
+
//# sourceMappingURL=ModalFooter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModalFooter.d.ts","sourceRoot":"","sources":["../../../../src/components/modal/ModalFooter.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,OAAO,EAAU,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAe,iBAAiB,EAAE,uBAAuB,EAAC,MAAM,kBAAkB,CAAC;AAG1F,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,iBAAiB,EAAE,SAAS,CAAC;IACxE;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,MAAM,sBAAsB,GAAG,uBAAuB,CAAC;AAE7D,MAAM,MAAM,kBAAkB,GAAG,OAAO,CAAC;IACrC,KAAK,EAAE,gBAAgB,CAAC;IACxB,GAAG,EAAE,cAAc,CAAC;IACpB,WAAW,EAAE,sBAAsB,CAAC;CACvC,CAAC,CAAC;AAOH,eAAO,MAAM,WAAW;WAVb,gBAAgB;SAClB,cAAc;iBACN,sBAAsB;EA4BrC,CAAC"}
|