@coveord/plasma-mantine 49.1.1 → 49.1.2
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 +9 -9
- package/dist/.tsbuildinfo +1 -1
- package/dist/cjs/components/button/Button.js +16 -8
- package/dist/cjs/components/button/Button.js.map +1 -1
- package/dist/cjs/components/button/ButtonWithDisabledTooltip.js +17 -36
- package/dist/cjs/components/button/ButtonWithDisabledTooltip.js.map +1 -1
- package/dist/cjs/components/inline-confirm/InlineConfirm.js +2 -0
- package/dist/cjs/components/inline-confirm/InlineConfirm.js.map +1 -1
- package/dist/cjs/components/inline-confirm/InlineConfirmButton.js +16 -11
- package/dist/cjs/components/inline-confirm/InlineConfirmButton.js.map +1 -1
- package/dist/cjs/components/inline-confirm/InlineConfirmMenuItem.js +33 -0
- package/dist/cjs/components/inline-confirm/InlineConfirmMenuItem.js.map +1 -0
- package/dist/cjs/components/menu/Menu.js +17 -6
- package/dist/cjs/components/menu/Menu.js.map +1 -1
- package/dist/cjs/theme/Theme.js +9 -2
- package/dist/cjs/theme/Theme.js.map +1 -1
- package/dist/definitions/components/button/Button.d.ts +1 -2
- package/dist/definitions/components/button/Button.d.ts.map +1 -1
- package/dist/definitions/components/button/ButtonWithDisabledTooltip.d.ts +10 -9
- package/dist/definitions/components/button/ButtonWithDisabledTooltip.d.ts.map +1 -1
- package/dist/definitions/components/inline-confirm/InlineConfirm.d.ts +2 -0
- package/dist/definitions/components/inline-confirm/InlineConfirm.d.ts.map +1 -1
- package/dist/definitions/components/inline-confirm/InlineConfirmButton.d.ts +4 -4
- package/dist/definitions/components/inline-confirm/InlineConfirmButton.d.ts.map +1 -1
- package/dist/definitions/components/inline-confirm/InlineConfirmMenuItem.d.ts +8 -0
- package/dist/definitions/components/inline-confirm/InlineConfirmMenuItem.d.ts.map +1 -0
- package/dist/definitions/components/menu/Menu.d.ts.map +1 -1
- package/dist/definitions/theme/Theme.d.ts.map +1 -1
- package/dist/esm/components/button/Button.js +17 -9
- package/dist/esm/components/button/Button.js.map +1 -1
- package/dist/esm/components/button/ButtonWithDisabledTooltip.js +18 -37
- package/dist/esm/components/button/ButtonWithDisabledTooltip.js.map +1 -1
- package/dist/esm/components/inline-confirm/InlineConfirm.js +2 -0
- package/dist/esm/components/inline-confirm/InlineConfirm.js.map +1 -1
- package/dist/esm/components/inline-confirm/InlineConfirmButton.js +16 -11
- package/dist/esm/components/inline-confirm/InlineConfirmButton.js.map +1 -1
- package/dist/esm/components/inline-confirm/InlineConfirmMenuItem.js +23 -0
- package/dist/esm/components/inline-confirm/InlineConfirmMenuItem.js.map +1 -0
- package/dist/esm/components/menu/Menu.js +17 -6
- package/dist/esm/components/menu/Menu.js.map +1 -1
- package/dist/esm/theme/Theme.js +9 -2
- package/dist/esm/theme/Theme.js.map +1 -1
- package/package.json +1 -1
- package/src/components/button/Button.tsx +12 -18
- package/src/components/button/ButtonWithDisabledTooltip.tsx +17 -38
- package/src/components/button/__tests__/ButtonWithDisabledTooltip.spec.tsx +22 -28
- package/src/components/inline-confirm/InlineConfirm.tsx +3 -0
- package/src/components/inline-confirm/InlineConfirmButton.tsx +15 -11
- package/src/components/inline-confirm/InlineConfirmMenuItem.tsx +21 -0
- package/src/components/inline-confirm/__tests__/InlineConfirm.spec.tsx +25 -0
- package/src/components/menu/Menu.tsx +13 -4
- package/src/theme/Theme.tsx +7 -0
|
@@ -9,20 +9,28 @@ Object.defineProperty(exports, "Button", {
|
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
11
|
var _objectSpread = require("@swc/helpers/lib/_object_spread.js").default;
|
|
12
|
+
var _objectWithoutProperties = require("@swc/helpers/lib/_object_without_properties.js").default;
|
|
12
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
14
|
var _core = require("@mantine/core");
|
|
14
15
|
var _react = require("react");
|
|
15
16
|
var _utils = require("../../utils");
|
|
16
17
|
var _buttonWithDisabledTooltip = require("./ButtonWithDisabledTooltip");
|
|
17
|
-
var _Button = /*#__PURE__*/ (0, _react.forwardRef)(function(
|
|
18
|
-
var
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
var _Button = /*#__PURE__*/ (0, _react.forwardRef)(function(_param, ref) /*#__PURE__*/ {
|
|
19
|
+
var disabledTooltip = _param.disabledTooltip, disabled = _param.disabled, disabledTooltipProps = _param.disabledTooltipProps, others = _objectWithoutProperties(_param, [
|
|
20
|
+
"disabledTooltip",
|
|
21
|
+
"disabled",
|
|
22
|
+
"disabledTooltipProps"
|
|
23
|
+
]);
|
|
24
|
+
return (0, _jsxRuntime.jsx)(_buttonWithDisabledTooltip.ButtonWithDisabledTooltip, {
|
|
25
|
+
disabled: disabled,
|
|
26
|
+
disabledTooltip: disabledTooltip,
|
|
27
|
+
disabledTooltipProps: disabledTooltipProps,
|
|
28
|
+
children: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_core.Button, _objectSpread({
|
|
29
|
+
ref: ref,
|
|
30
|
+
disabled: disabled
|
|
31
|
+
}, others))
|
|
32
|
+
});
|
|
24
33
|
});
|
|
25
34
|
var Button = (0, _utils.createPolymorphicComponent)(_Button);
|
|
26
|
-
Button.DisabledTooltip = _buttonWithDisabledTooltip.ButtonWithDisabledTooltip;
|
|
27
35
|
|
|
28
36
|
//# sourceMappingURL=Button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/button/Button.tsx"],"sourcesContent":["import {Button as MantineButton, ButtonProps as MantineButtonProps
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/button/Button.tsx"],"sourcesContent":["import {Button as MantineButton, ButtonProps as MantineButtonProps} from '@mantine/core';\nimport {forwardRef} from 'react';\n\nimport {createPolymorphicComponent} from '../../utils';\nimport {ButtonWithDisabledTooltip, ButtonWithDisabledTooltipProps} from './ButtonWithDisabledTooltip';\n\nexport interface ButtonProps extends MantineButtonProps, ButtonWithDisabledTooltipProps {}\n\nconst _Button = forwardRef<HTMLButtonElement, ButtonProps>(\n ({disabledTooltip, disabled, disabledTooltipProps, ...others}, ref) => (\n <ButtonWithDisabledTooltip\n disabled={disabled}\n disabledTooltip={disabledTooltip}\n disabledTooltipProps={disabledTooltipProps}\n >\n <MantineButton ref={ref} disabled={disabled} {...others} />\n </ButtonWithDisabledTooltip>\n )\n);\n\nexport const Button = createPolymorphicComponent<'button', ButtonProps, {Group: typeof MantineButton.Group}>(_Button);\n"],"names":["Button","_Button","forwardRef","ref","disabledTooltip","disabled","disabledTooltipProps","others","ButtonWithDisabledTooltip","MantineButton","createPolymorphicComponent"],"mappings":"AAAA;;;;+BAoBaA;;;eAAAA;;;;;;oBApB4D;qBAChD;qBAEgB;yCAC+B;AAIxE,IAAMC,wBAAUC,IAAAA,iBAAU,EACtB,iBAA+DC,mBAC3D;QADFC,yBAAAA,iBAAiBC,kBAAAA,UAAUC,8BAAAA,sBAAyBC;QAApDH;QAAiBC;QAAUC;;WACzB,qBAACE,oDAAyB;QACtBH,UAAUA;QACVD,iBAAiBA;QACjBE,sBAAsBA;kBAEtB,cAAA,qBAACG,YAAa;YAACN,KAAKA;YAAKE,UAAUA;WAAcE;;AAC1B;AAI5B,IAAMP,SAASU,IAAAA,iCAA0B,EAA6DT"}
|
|
@@ -16,48 +16,29 @@ var _core = require("@mantine/core");
|
|
|
16
16
|
var _react = require("react");
|
|
17
17
|
var _utils = require("../../utils");
|
|
18
18
|
var _ButtonWithDisabledTooltip = /*#__PURE__*/ (0, _react.forwardRef)(function(_param, ref) {
|
|
19
|
-
var disabledTooltip = _param.disabledTooltip, disabled = _param.disabled,
|
|
19
|
+
var disabledTooltip = _param.disabledTooltip, disabled = _param.disabled, children = _param.children, disabledTooltipProps = _param.disabledTooltipProps, others = _objectWithoutProperties(_param, [
|
|
20
20
|
"disabledTooltip",
|
|
21
21
|
"disabled",
|
|
22
|
-
"
|
|
23
|
-
"
|
|
22
|
+
"children",
|
|
23
|
+
"disabledTooltipProps"
|
|
24
24
|
]);
|
|
25
|
-
return disabledTooltip ? /*#__PURE__*/ (0, _jsxRuntime.jsx)(_core.Tooltip, {
|
|
25
|
+
return disabledTooltip ? /*#__PURE__*/ (0, _jsxRuntime.jsx)(_core.Tooltip, _objectSpreadProps(_objectSpread({
|
|
26
26
|
label: disabledTooltip,
|
|
27
|
-
disabled: !disabled
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
ref: ref
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
sx: function(theme) {
|
|
35
|
-
return {
|
|
36
|
-
"&[data-disabled]": {
|
|
37
|
-
pointerEvents: "all",
|
|
38
|
-
color: theme.colors.gray[5]
|
|
39
|
-
},
|
|
40
|
-
"&[data-disabled]:hover": {
|
|
41
|
-
backgroundColor: hoverColor,
|
|
42
|
-
cursor: "not-allowed"
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
},
|
|
46
|
-
onClick: function(event) {
|
|
47
|
-
if (disabled) {
|
|
48
|
-
event.preventDefault();
|
|
49
|
-
event.stopPropagation();
|
|
50
|
-
} else {
|
|
51
|
-
onClick === null || onClick === void 0 ? void 0 : onClick(event);
|
|
27
|
+
disabled: !disabled
|
|
28
|
+
}, disabledTooltipProps), {
|
|
29
|
+
children: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_core.Box, _objectSpreadProps(_objectSpread({
|
|
30
|
+
ref: ref,
|
|
31
|
+
sx: {
|
|
32
|
+
"&:hover": {
|
|
33
|
+
cursor: "not-allowed"
|
|
52
34
|
}
|
|
53
35
|
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}, others));
|
|
36
|
+
}, others), {
|
|
37
|
+
children: children
|
|
38
|
+
}))
|
|
39
|
+
})) : /*#__PURE__*/ (0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
40
|
+
children: children
|
|
41
|
+
});
|
|
61
42
|
});
|
|
62
43
|
var ButtonWithDisabledTooltip = (0, _utils.createPolymorphicComponent)(_ButtonWithDisabledTooltip);
|
|
63
44
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/button/ButtonWithDisabledTooltip.tsx"],"sourcesContent":["import {Box, Tooltip} from '@mantine/core';\nimport {
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/button/ButtonWithDisabledTooltip.tsx"],"sourcesContent":["import {Box, Tooltip, TooltipProps} from '@mantine/core';\nimport {forwardRef, ReactNode} from 'react';\n\nimport {createPolymorphicComponent} from '../../utils';\n\nexport interface ButtonWithDisabledTooltipProps {\n /**\n * The tooltip message to display when disabled\n */\n disabledTooltip?: string;\n /**\n * Whether the button underneath the tooltip is disabled\n */\n disabled?: boolean;\n children?: ReactNode;\n /**\n * Additional tooltip props to set on the disabled button tooltip\n */\n disabledTooltipProps?: Omit<TooltipProps, 'disabled' | 'label' | 'children'>;\n}\n\nconst _ButtonWithDisabledTooltip = forwardRef<HTMLDivElement, ButtonWithDisabledTooltipProps>(\n ({disabledTooltip, disabled, children, disabledTooltipProps, ...others}, ref) =>\n disabledTooltip ? (\n <Tooltip label={disabledTooltip} disabled={!disabled} {...disabledTooltipProps}>\n <Box ref={ref} sx={{'&:hover': {cursor: 'not-allowed'}}} {...others}>\n {children}\n </Box>\n </Tooltip>\n ) : (\n <>{children}</>\n )\n);\n\nexport const ButtonWithDisabledTooltip = createPolymorphicComponent<'div', ButtonWithDisabledTooltipProps>(\n _ButtonWithDisabledTooltip\n);\n"],"names":["ButtonWithDisabledTooltip","_ButtonWithDisabledTooltip","forwardRef","ref","disabledTooltip","disabled","children","disabledTooltipProps","others","Tooltip","label","Box","sx","cursor","createPolymorphicComponent"],"mappings":"AAAA;;;;+BAkCaA;;;eAAAA;;;;;;;oBAlC4B;qBACL;qBAEK;AAkBzC,IAAMC,2CAA6BC,IAAAA,iBAAU,EACzC,iBAAyEC,KACrEC;QADFA,yBAAAA,iBAAiBC,kBAAAA,UAAUC,kBAAAA,UAAUC,8BAAAA,sBAAyBC;QAA9DJ;QAAiBC;QAAUC;QAAUC;;WACnCH,gCACI,qBAACK,aAAO;QAACC,OAAON;QAAiBC,UAAU,CAACA;OAAcE;kBACtD,cAAA,qBAACI,SAAG;YAACR,KAAKA;YAAKS,IAAI;gBAAC,WAAW;oBAACC,QAAQ;gBAAa;YAAC;WAAOL;sBACxDF;;wBAIT;kBAAGA;MACN;AAAD;AAGD,IAAMN,4BAA4Bc,IAAAA,iCAA0B,EAC/Db"}
|
|
@@ -13,6 +13,7 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
13
13
|
var _react = require("react");
|
|
14
14
|
var _inlineConfirmButton = require("./InlineConfirmButton");
|
|
15
15
|
var _inlineConfirmContext = require("./InlineConfirmContext");
|
|
16
|
+
var _inlineConfirmMenuItem = require("./InlineConfirmMenuItem");
|
|
16
17
|
var _inlineConfirmPrompt = require("./InlineConfirmPrompt");
|
|
17
18
|
var InlineConfirm = function(param) {
|
|
18
19
|
var children = param.children;
|
|
@@ -35,5 +36,6 @@ var InlineConfirm = function(param) {
|
|
|
35
36
|
};
|
|
36
37
|
InlineConfirm.Prompt = _inlineConfirmPrompt.InlineConfirmPrompt;
|
|
37
38
|
InlineConfirm.Button = _inlineConfirmButton.InlineConfirmButton;
|
|
39
|
+
InlineConfirm.MenuItem = _inlineConfirmMenuItem.InlineConfirmMenuItem;
|
|
38
40
|
|
|
39
41
|
//# sourceMappingURL=InlineConfirm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/inline-confirm/InlineConfirm.tsx"],"sourcesContent":["import {Children, FunctionComponent, PropsWithChildren, ReactElement, useState} from 'react';\n\nimport {InlineConfirmButton} from './InlineConfirmButton';\nimport {InlineConfirmContext} from './InlineConfirmContext';\nimport {InlineConfirmPrompt} from './InlineConfirmPrompt';\n\ntype InlineConfirmType = FunctionComponent<PropsWithChildren> & {\n Prompt: typeof InlineConfirmPrompt;\n Button: typeof InlineConfirmButton;\n};\n\nexport const InlineConfirm: InlineConfirmType = ({children}) => {\n const [confirmingId, setConfirmingId] = useState<string | null>(null);\n\n const convertedChildren = Children.toArray(children) as ReactElement[];\n const prompt = convertedChildren.find(\n (child) => child.type === InlineConfirmPrompt && child.props.id === confirmingId\n );\n const clearConfirm = () => setConfirmingId(null);\n\n return (\n <InlineConfirmContext.Provider value={{confirmingId, setConfirmingId, clearConfirm}}>\n {prompt ?? children}\n </InlineConfirmContext.Provider>\n );\n};\n\nInlineConfirm.Prompt = InlineConfirmPrompt;\nInlineConfirm.Button = InlineConfirmButton;\n"],"names":["InlineConfirm","children","useState","confirmingId","setConfirmingId","convertedChildren","Children","toArray","prompt","find","child","type","InlineConfirmPrompt","props","id","clearConfirm","InlineConfirmContext","Provider","value","Prompt","Button","InlineConfirmButton"],"mappings":"AAAA;;;;+
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/inline-confirm/InlineConfirm.tsx"],"sourcesContent":["import {Children, FunctionComponent, PropsWithChildren, ReactElement, useState} from 'react';\n\nimport {InlineConfirmButton} from './InlineConfirmButton';\nimport {InlineConfirmContext} from './InlineConfirmContext';\nimport {InlineConfirmMenuItem} from './InlineConfirmMenuItem';\nimport {InlineConfirmPrompt} from './InlineConfirmPrompt';\n\ntype InlineConfirmType = FunctionComponent<PropsWithChildren> & {\n Prompt: typeof InlineConfirmPrompt;\n Button: typeof InlineConfirmButton;\n MenuItem: typeof InlineConfirmMenuItem;\n};\n\nexport const InlineConfirm: InlineConfirmType = ({children}) => {\n const [confirmingId, setConfirmingId] = useState<string | null>(null);\n\n const convertedChildren = Children.toArray(children) as ReactElement[];\n const prompt = convertedChildren.find(\n (child) => child.type === InlineConfirmPrompt && child.props.id === confirmingId\n );\n const clearConfirm = () => setConfirmingId(null);\n\n return (\n <InlineConfirmContext.Provider value={{confirmingId, setConfirmingId, clearConfirm}}>\n {prompt ?? children}\n </InlineConfirmContext.Provider>\n );\n};\n\nInlineConfirm.Prompt = InlineConfirmPrompt;\nInlineConfirm.Button = InlineConfirmButton;\nInlineConfirm.MenuItem = InlineConfirmMenuItem;\n"],"names":["InlineConfirm","children","useState","confirmingId","setConfirmingId","convertedChildren","Children","toArray","prompt","find","child","type","InlineConfirmPrompt","props","id","clearConfirm","InlineConfirmContext","Provider","value","Prompt","Button","InlineConfirmButton","MenuItem","InlineConfirmMenuItem"],"mappings":"AAAA;;;;+BAaaA;;;eAAAA;;;;;qBAbwE;mCAEnD;oCACC;qCACC;mCACF;AAQ3B,IAAMA,gBAAmC,gBAAgB;QAAdC,iBAAAA;IAC9C,IAAwCC,2BAAAA,IAAAA,eAAQ,EAAgB,IAAI,OAA7DC,eAAiCD,cAAnBE,kBAAmBF;IAExC,IAAMG,oBAAoBC,eAAQ,CAACC,OAAO,CAACN;IAC3C,IAAMO,SAASH,kBAAkBI,IAAI,CACjC,SAACC;eAAUA,MAAMC,IAAI,KAAKC,wCAAmB,IAAIF,MAAMG,KAAK,CAACC,EAAE,KAAKX;;IAExE,IAAMY,eAAe;eAAMX,gBAAgB,IAAI;;IAE/C,qBACI,qBAACY,0CAAoB,CAACC,QAAQ;QAACC,OAAO;YAACf,cAAAA;YAAcC,iBAAAA;YAAiBW,cAAAA;QAAY;kBAC7EP,mBAAAA,oBAAAA,SAAUP,QAAQ;;AAG/B;AAEAD,cAAcmB,MAAM,GAAGP,wCAAmB;AAC1CZ,cAAcoB,MAAM,GAAGC,wCAAmB;AAC1CrB,cAAcsB,QAAQ,GAAGC,4CAAqB"}
|
|
@@ -9,20 +9,25 @@ Object.defineProperty(exports, "InlineConfirmButton", {
|
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
11
|
var _objectSpread = require("@swc/helpers/lib/_object_spread.js").default;
|
|
12
|
-
var
|
|
12
|
+
var _objectWithoutProperties = require("@swc/helpers/lib/_object_without_properties.js").default;
|
|
13
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
|
-
var
|
|
14
|
+
var _core = require("@mantine/core");
|
|
15
|
+
var _react = require("react");
|
|
15
16
|
var _useInlineConfirm = require("./useInlineConfirm");
|
|
16
|
-
var InlineConfirmButton = function(
|
|
17
|
+
var InlineConfirmButton = /*#__PURE__*/ (0, _react.forwardRef)(function(_param, ref) {
|
|
18
|
+
var onClick = _param.onClick, id = _param.id, others = _objectWithoutProperties(_param, [
|
|
19
|
+
"onClick",
|
|
20
|
+
"id"
|
|
21
|
+
]);
|
|
17
22
|
var setConfirmingId = (0, _useInlineConfirm.useInlineConfirm)().setConfirmingId;
|
|
18
|
-
var
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
(_props_onClick = props.onClick) === null || _props_onClick === void 0 ? void 0 : _props_onClick.call(props, e);
|
|
23
|
+
var handleOnClick = function(e) {
|
|
24
|
+
setConfirmingId(id);
|
|
25
|
+
onClick === null || onClick === void 0 ? void 0 : onClick(e);
|
|
22
26
|
};
|
|
23
|
-
return /*#__PURE__*/ (0, _jsxRuntime.jsx)(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
};
|
|
27
|
+
return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_core.Button, _objectSpread({
|
|
28
|
+
ref: ref,
|
|
29
|
+
onClick: handleOnClick
|
|
30
|
+
}, others));
|
|
31
|
+
});
|
|
27
32
|
|
|
28
33
|
//# sourceMappingURL=InlineConfirmButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/inline-confirm/InlineConfirmButton.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/inline-confirm/InlineConfirmButton.tsx"],"sourcesContent":["import {Button} from '@mantine/core';\nimport {forwardRef, MouseEventHandler} from 'react';\n\nimport {ButtonProps} from '../button';\nimport {useInlineConfirm} from './useInlineConfirm';\n\nexport interface InlineConfirmButtonProps extends ButtonProps {\n id: string;\n onClick?: MouseEventHandler<HTMLButtonElement>;\n}\n\nexport const InlineConfirmButton = forwardRef<HTMLButtonElement, InlineConfirmButtonProps>(\n ({onClick, id, ...others}, ref) => {\n const {setConfirmingId} = useInlineConfirm();\n const handleOnClick: MouseEventHandler<HTMLButtonElement> = (e) => {\n setConfirmingId(id);\n onClick?.(e);\n };\n\n return <Button ref={ref} onClick={handleOnClick} {...others} />;\n }\n);\n"],"names":["InlineConfirmButton","forwardRef","ref","onClick","id","others","setConfirmingId","useInlineConfirm","handleOnClick","e","Button"],"mappings":"AAAA;;;;+BAWaA;;;eAAAA;;;;;;oBAXQ;qBACuB;gCAGb;AAOxB,IAAMA,oCAAsBC,IAAAA,iBAAU,EACzC,iBAA2BC,KAAQ;QAAjCC,iBAAAA,SAASC,YAAAA,IAAOC;QAAhBF;QAASC;;IACP,IAAM,AAACE,kBAAmBC,IAAAA,kCAAgB,IAAnCD;IACP,IAAME,gBAAsD,SAACC,GAAM;QAC/DH,gBAAgBF;QAChBD,oBAAAA,qBAAAA,KAAAA,IAAAA,QAAUM;IACd;IAEA,qBAAO,qBAACC,YAAM;QAACR,KAAKA;QAAKC,SAASK;OAAmBH;AACzD"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "InlineConfirmMenuItem", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return InlineConfirmMenuItem;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
var _objectSpread = require("@swc/helpers/lib/_object_spread.js").default;
|
|
12
|
+
var _objectWithoutProperties = require("@swc/helpers/lib/_object_without_properties.js").default;
|
|
13
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
|
+
var _react = require("react");
|
|
15
|
+
var _menu = require("../menu");
|
|
16
|
+
var _useInlineConfirm = require("./useInlineConfirm");
|
|
17
|
+
var InlineConfirmMenuItem = /*#__PURE__*/ (0, _react.forwardRef)(function(_param, ref) {
|
|
18
|
+
var onClick = _param.onClick, id = _param.id, others = _objectWithoutProperties(_param, [
|
|
19
|
+
"onClick",
|
|
20
|
+
"id"
|
|
21
|
+
]);
|
|
22
|
+
var setConfirmingId = (0, _useInlineConfirm.useInlineConfirm)().setConfirmingId;
|
|
23
|
+
var handleOnClick = function(e) {
|
|
24
|
+
setConfirmingId(id);
|
|
25
|
+
onClick === null || onClick === void 0 ? void 0 : onClick(e);
|
|
26
|
+
};
|
|
27
|
+
return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_menu.Menu.Item, _objectSpread({
|
|
28
|
+
ref: ref,
|
|
29
|
+
onClick: handleOnClick
|
|
30
|
+
}, others));
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
//# sourceMappingURL=InlineConfirmMenuItem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/inline-confirm/InlineConfirmMenuItem.tsx"],"sourcesContent":["import {forwardRef, MouseEventHandler} from 'react';\n\nimport {Menu, MenuItemProps} from '../menu';\nimport {useInlineConfirm} from './useInlineConfirm';\n\nexport interface InlineConfirmMenuItemProps extends MenuItemProps {\n id: string;\n onClick?: MouseEventHandler<HTMLButtonElement>;\n}\n\nexport const InlineConfirmMenuItem = forwardRef<HTMLButtonElement, InlineConfirmMenuItemProps>(\n ({onClick, id, ...others}, ref) => {\n const {setConfirmingId} = useInlineConfirm();\n const handleOnClick: MouseEventHandler<HTMLButtonElement> = (e) => {\n setConfirmingId(id);\n onClick?.(e);\n };\n\n return <Menu.Item ref={ref} onClick={handleOnClick} {...others} />;\n }\n);\n"],"names":["InlineConfirmMenuItem","forwardRef","ref","onClick","id","others","setConfirmingId","useInlineConfirm","handleOnClick","e","Menu","Item"],"mappings":"AAAA;;;;+BAUaA;;;eAAAA;;;;;;qBAV+B;oBAEV;gCACH;AAOxB,IAAMA,sCAAwBC,IAAAA,iBAAU,EAC3C,iBAA2BC,KAAQ;QAAjCC,iBAAAA,SAASC,YAAAA,IAAOC;QAAhBF;QAASC;;IACP,IAAM,AAACE,kBAAmBC,IAAAA,kCAAgB,IAAnCD;IACP,IAAME,gBAAsD,SAACC,GAAM;QAC/DH,gBAAgBF;QAChBD,oBAAAA,qBAAAA,KAAAA,IAAAA,QAAUM;IACd;IAEA,qBAAO,qBAACC,UAAI,CAACC,IAAI;QAACT,KAAKA;QAAKC,SAASK;OAAmBH;AAC5D"}
|
|
@@ -9,16 +9,27 @@ Object.defineProperty(exports, "Menu", {
|
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
11
|
var _objectSpread = require("@swc/helpers/lib/_object_spread.js").default;
|
|
12
|
+
var _objectWithoutProperties = require("@swc/helpers/lib/_object_without_properties.js").default;
|
|
12
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
14
|
var _core = require("@mantine/core");
|
|
14
15
|
var _react = require("react");
|
|
15
16
|
var _utils = require("../../utils");
|
|
16
|
-
var
|
|
17
|
-
var _MenuItem = /*#__PURE__*/ (0, _react.forwardRef)(function(
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
var _buttonWithDisabledTooltip = require("../button/ButtonWithDisabledTooltip");
|
|
18
|
+
var _MenuItem = /*#__PURE__*/ (0, _react.forwardRef)(function(_param, ref) /*#__PURE__*/ {
|
|
19
|
+
var disabledTooltip = _param.disabledTooltip, disabled = _param.disabled, disabledTooltipProps = _param.disabledTooltipProps, others = _objectWithoutProperties(_param, [
|
|
20
|
+
"disabledTooltip",
|
|
21
|
+
"disabled",
|
|
22
|
+
"disabledTooltipProps"
|
|
23
|
+
]);
|
|
24
|
+
return (0, _jsxRuntime.jsx)(_buttonWithDisabledTooltip.ButtonWithDisabledTooltip, {
|
|
25
|
+
disabled: disabled,
|
|
26
|
+
disabledTooltip: disabledTooltip,
|
|
27
|
+
disabledTooltipProps: disabledTooltipProps,
|
|
28
|
+
children: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_core.Menu.Item, _objectSpread({
|
|
29
|
+
ref: ref,
|
|
30
|
+
disabled: disabled
|
|
31
|
+
}, others))
|
|
32
|
+
});
|
|
22
33
|
});
|
|
23
34
|
var MenuItem = (0, _utils.createPolymorphicComponent)(_MenuItem);
|
|
24
35
|
var Menu = (0, _utils.overrideComponent)(_core.Menu, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/menu/Menu.tsx"],"sourcesContent":["import {Menu as MantineMenu, MenuItemProps as MantineMenuItemProps} from '@mantine/core';\nimport {forwardRef} from 'react';\n\nimport {createPolymorphicComponent, overrideComponent} from '../../utils';\nimport {
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/menu/Menu.tsx"],"sourcesContent":["import {Menu as MantineMenu, MenuItemProps as MantineMenuItemProps} from '@mantine/core';\nimport {forwardRef} from 'react';\n\nimport {createPolymorphicComponent, overrideComponent} from '../../utils';\nimport {ButtonWithDisabledTooltipProps} from '../button';\nimport {ButtonWithDisabledTooltip} from '../button/ButtonWithDisabledTooltip';\n\nexport interface MenuItemProps extends MantineMenuItemProps, ButtonWithDisabledTooltipProps {}\n\nconst _MenuItem = forwardRef<HTMLButtonElement, MenuItemProps>(\n ({disabledTooltip, disabled, disabledTooltipProps, ...others}, ref) => (\n <ButtonWithDisabledTooltip\n disabled={disabled}\n disabledTooltip={disabledTooltip}\n disabledTooltipProps={disabledTooltipProps}\n >\n <MantineMenu.Item ref={ref} disabled={disabled} {...others} />\n </ButtonWithDisabledTooltip>\n )\n);\n\nconst MenuItem = createPolymorphicComponent<'button', MenuItemProps>(_MenuItem);\n\nexport const Menu = overrideComponent(MantineMenu, {\n displayName: '@coveord/plasma-mantine/Menu',\n Item: MenuItem,\n});\n"],"names":["Menu","_MenuItem","forwardRef","ref","disabledTooltip","disabled","disabledTooltipProps","others","ButtonWithDisabledTooltip","MantineMenu","Item","MenuItem","createPolymorphicComponent","overrideComponent","displayName"],"mappings":"AAAA;;;;+BAuBaA;;;eAAAA;;;;;;oBAvB4D;qBAChD;qBAEmC;yCAEpB;AAIxC,IAAMC,0BAAYC,IAAAA,iBAAU,EACxB,iBAA+DC,mBAC3D;QADFC,yBAAAA,iBAAiBC,kBAAAA,UAAUC,8BAAAA,sBAAyBC;QAApDH;QAAiBC;QAAUC;;WACzB,qBAACE,oDAAyB;QACtBH,UAAUA;QACVD,iBAAiBA;QACjBE,sBAAsBA;kBAEtB,cAAA,qBAACG,UAAW,CAACC,IAAI;YAACP,KAAKA;YAAKE,UAAUA;WAAcE;;AAC7B;AAInC,IAAMI,WAAWC,IAAAA,iCAA0B,EAA0BX;AAE9D,IAAMD,OAAOa,IAAAA,wBAAiB,EAACJ,UAAW,EAAE;IAC/CK,aAAa;IACbJ,MAAMC;AACV"}
|
package/dist/cjs/theme/Theme.js
CHANGED
|
@@ -165,7 +165,8 @@ var plasmaTheme = {
|
|
|
165
165
|
defaultProps: {
|
|
166
166
|
color: "navy",
|
|
167
167
|
withArrow: true,
|
|
168
|
-
withinPortal: true
|
|
168
|
+
withinPortal: true,
|
|
169
|
+
multiline: true
|
|
169
170
|
}
|
|
170
171
|
},
|
|
171
172
|
Breadcrumbs: {
|
|
@@ -240,7 +241,13 @@ var plasmaTheme = {
|
|
|
240
241
|
},
|
|
241
242
|
ColorSwatch: {
|
|
242
243
|
defaultProps: {
|
|
243
|
-
size: 8
|
|
244
|
+
size: 8,
|
|
245
|
+
withShadow: false
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
MenuItem: {
|
|
249
|
+
defaultProps: {
|
|
250
|
+
fw: 300
|
|
244
251
|
}
|
|
245
252
|
}
|
|
246
253
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/theme/Theme.tsx"],"sourcesContent":["import {ArrowHeadRightSize24Px, InfoSize24Px} from '@coveord/plasma-react-icons';\nimport {color} from '@coveord/plasma-tokens';\nimport {ButtonStylesParams, MantineThemeOverride, ModalStylesParams} from '@mantine/core';\n\nimport {PlasmaColors} from './PlasmaColors';\n\nexport const plasmaTheme: MantineThemeOverride = {\n // These are overrides over https://github.com/mantinedev/mantine/blob/master/src/mantine-styles/src/theme/default-theme.ts\n colorScheme: 'light',\n fontFamily: 'canada-type-gibson, sans-serif',\n black: color.primary.gray[9],\n defaultRadius: 8,\n spacing: {\n xs: 8,\n sm: 16,\n md: 24,\n lg: 32,\n xl: 40,\n },\n primaryColor: 'action',\n headings: {\n fontFamily: 'canada-type-gibson, sans-serif',\n fontWeight: 500,\n sizes: {\n h1: {fontSize: 48, lineHeight: '56px', fontWeight: undefined},\n h2: {fontSize: 32, lineHeight: '40px', fontWeight: undefined},\n h3: {fontSize: 28, lineHeight: '40px', fontWeight: undefined},\n h4: {fontSize: 24, lineHeight: '32px', fontWeight: undefined},\n h5: {fontSize: 18, lineHeight: '28px', fontWeight: undefined},\n h6: {fontSize: 16, lineHeight: '24px', fontWeight: undefined},\n },\n },\n shadows: {\n xs: '0px 1px 0px rgba(4, 8, 31, 0.08)',\n sm: '0px 2px 4px rgba(4, 8, 31, 0.12)',\n md: '0px 4px 8px rgba(4, 8, 31, 0.08)',\n lg: '0px 8px 16px rgba(7, 12, 41, 0.06)',\n xl: '0px 16px 24px rgba(4, 8, 31, 0.06)',\n },\n colors: PlasmaColors,\n components: {\n Alert: {\n defaultProps: {\n icon: <InfoSize24Px height={24} />,\n color: 'navy',\n },\n styles: {\n title: {\n fontWeight: 500,\n },\n },\n },\n Title: {\n styles: (theme) => ({\n root: {\n '&:is(h1,h2,h3,h4,h5,h6)': {letterSpacing: '0.011em', color: theme.colors.gray[9]},\n },\n }),\n },\n Button: {\n styles: (theme, params: ButtonStylesParams) => ({\n root: {\n fontWeight: 400,\n backgroundColor: params.variant === 'outline' ? 'white' : undefined,\n },\n }),\n },\n Modal: {\n styles: (theme, {size, fullScreen}: ModalStylesParams) => ({\n modal: {\n width: fullScreen\n ? undefined\n : theme.fn.size({size, sizes: {xs: 440, sm: 550, md: 800, lg: 1334, xl: '85%'}}),\n },\n }),\n defaultProps: {\n overlayColor: color.primary.navy[9],\n overlayOpacity: 0.9,\n },\n },\n InputWrapper: {\n defaultProps: {\n withAsterisk: false,\n },\n styles: (theme) => ({\n label: {\n marginBottom: theme.spacing.xs,\n lineHeight: '20px',\n },\n description: {\n lineHeight: '20px',\n fontSize: theme.fontSizes.sm,\n color: theme.colors.gray[7],\n marginBottom: theme.spacing.xs,\n },\n invalid: {\n color: theme.colors.red[9],\n borderColor: theme.colors.red[6],\n },\n error: {\n color: theme.colors.red[9],\n },\n }),\n },\n TextInput: {\n defaultProps: {\n radius: 8,\n },\n },\n Tooltip: {\n defaultProps: {\n color: 'navy',\n withArrow: true,\n withinPortal: true,\n },\n },\n Breadcrumbs: {\n defaultProps: {\n separator: <ArrowHeadRightSize24Px height={24} />,\n },\n },\n Loader: {\n defaultProps: {\n variant: 'dots',\n color: 'action',\n },\n },\n DateRangePicker: {\n styles: {\n cell: {\n textAlign: 'center',\n },\n },\n },\n Anchor: {\n defaultProps: {\n color: 'action',\n },\n styles: (theme) => ({\n root: {\n ...theme.fn.hover({\n textDecoration: 'underline',\n color: theme.colors.action[8],\n }),\n },\n }),\n },\n Checkbox: {\n defaultProps: {\n radius: 'sm',\n },\n },\n List: {\n styles: () => ({\n root: {\n listStyleType: 'disc',\n },\n }),\n },\n Radio: {\n styles: {\n labelWrapper: {\n display: 'flex',\n alignItems: 'flex-start',\n },\n },\n },\n Popover: {\n defaultProps: {\n shadow: 'md',\n withArrow: true,\n },\n },\n Badge: {\n styles: {\n root: {\n textTransform: 'none',\n padding: '4px 8px',\n fontWeight: 500,\n },\n },\n },\n ColorSwatch: {\n defaultProps: {\n size: 8,\n },\n },\n },\n};\n"],"names":["plasmaTheme","colorScheme","fontFamily","black","color","primary","gray","defaultRadius","spacing","xs","sm","md","lg","xl","primaryColor","headings","fontWeight","sizes","h1","fontSize","lineHeight","undefined","h2","h3","h4","h5","h6","shadows","colors","PlasmaColors","components","Alert","defaultProps","icon","InfoSize24Px","height","styles","title","Title","theme","root","letterSpacing","Button","params","backgroundColor","variant","Modal","size","fullScreen","modal","width","fn","overlayColor","navy","overlayOpacity","InputWrapper","withAsterisk","label","marginBottom","description","fontSizes","invalid","red","borderColor","error","TextInput","radius","Tooltip","withArrow","withinPortal","Breadcrumbs","separator","ArrowHeadRightSize24Px","Loader","DateRangePicker","cell","textAlign","Anchor","hover","textDecoration","action","Checkbox","List","listStyleType","Radio","labelWrapper","display","alignItems","Popover","shadow","Badge","textTransform","padding","ColorSwatch"],"mappings":"AAAA;;;;+BAMaA;;;eAAAA;;;;;gCANsC;4BAC/B;4BAGO;AAEpB,IAAMA,cAAoC;IAC7C,2HAA2H;IAC3HC,aAAa;IACbC,YAAY;IACZC,OAAOC,mBAAK,CAACC,OAAO,CAACC,IAAI,CAAC,EAAE;IAC5BC,eAAe;IACfC,SAAS;QACLC,IAAI;QACJC,IAAI;QACJC,IAAI;QACJC,IAAI;QACJC,IAAI;IACR;IACAC,cAAc;IACdC,UAAU;QACNb,YAAY;QACZc,YAAY;QACZC,OAAO;YACHC,IAAI;gBAACC,UAAU;gBAAIC,YAAY;gBAAQJ,YAAYK;YAAS;YAC5DC,IAAI;gBAACH,UAAU;gBAAIC,YAAY;gBAAQJ,YAAYK;YAAS;YAC5DE,IAAI;gBAACJ,UAAU;gBAAIC,YAAY;gBAAQJ,YAAYK;YAAS;YAC5DG,IAAI;gBAACL,UAAU;gBAAIC,YAAY;gBAAQJ,YAAYK;YAAS;YAC5DI,IAAI;gBAACN,UAAU;gBAAIC,YAAY;gBAAQJ,YAAYK;YAAS;YAC5DK,IAAI;gBAACP,UAAU;gBAAIC,YAAY;gBAAQJ,YAAYK;YAAS;QAChE;IACJ;IACAM,SAAS;QACLlB,IAAI;QACJC,IAAI;QACJC,IAAI;QACJC,IAAI;QACJC,IAAI;IACR;IACAe,QAAQC,0BAAY;IACpBC,YAAY;QACRC,OAAO;YACHC,cAAc;gBACVC,oBAAM,qBA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"version":3,"sources":["../../../src/theme/Theme.tsx"],"sourcesContent":["import {ArrowHeadRightSize24Px, InfoSize24Px} from '@coveord/plasma-react-icons';\nimport {color} from '@coveord/plasma-tokens';\nimport {ButtonStylesParams, MantineThemeOverride, ModalStylesParams} from '@mantine/core';\n\nimport {PlasmaColors} from './PlasmaColors';\n\nexport const plasmaTheme: MantineThemeOverride = {\n // These are overrides over https://github.com/mantinedev/mantine/blob/master/src/mantine-styles/src/theme/default-theme.ts\n colorScheme: 'light',\n fontFamily: 'canada-type-gibson, sans-serif',\n black: color.primary.gray[9],\n defaultRadius: 8,\n spacing: {\n xs: 8,\n sm: 16,\n md: 24,\n lg: 32,\n xl: 40,\n },\n primaryColor: 'action',\n headings: {\n fontFamily: 'canada-type-gibson, sans-serif',\n fontWeight: 500,\n sizes: {\n h1: {fontSize: 48, lineHeight: '56px', fontWeight: undefined},\n h2: {fontSize: 32, lineHeight: '40px', fontWeight: undefined},\n h3: {fontSize: 28, lineHeight: '40px', fontWeight: undefined},\n h4: {fontSize: 24, lineHeight: '32px', fontWeight: undefined},\n h5: {fontSize: 18, lineHeight: '28px', fontWeight: undefined},\n h6: {fontSize: 16, lineHeight: '24px', fontWeight: undefined},\n },\n },\n shadows: {\n xs: '0px 1px 0px rgba(4, 8, 31, 0.08)',\n sm: '0px 2px 4px rgba(4, 8, 31, 0.12)',\n md: '0px 4px 8px rgba(4, 8, 31, 0.08)',\n lg: '0px 8px 16px rgba(7, 12, 41, 0.06)',\n xl: '0px 16px 24px rgba(4, 8, 31, 0.06)',\n },\n colors: PlasmaColors,\n components: {\n Alert: {\n defaultProps: {\n icon: <InfoSize24Px height={24} />,\n color: 'navy',\n },\n styles: {\n title: {\n fontWeight: 500,\n },\n },\n },\n Title: {\n styles: (theme) => ({\n root: {\n '&:is(h1,h2,h3,h4,h5,h6)': {letterSpacing: '0.011em', color: theme.colors.gray[9]},\n },\n }),\n },\n Button: {\n styles: (theme, params: ButtonStylesParams) => ({\n root: {\n fontWeight: 400,\n backgroundColor: params.variant === 'outline' ? 'white' : undefined,\n },\n }),\n },\n Modal: {\n styles: (theme, {size, fullScreen}: ModalStylesParams) => ({\n modal: {\n width: fullScreen\n ? undefined\n : theme.fn.size({size, sizes: {xs: 440, sm: 550, md: 800, lg: 1334, xl: '85%'}}),\n },\n }),\n defaultProps: {\n overlayColor: color.primary.navy[9],\n overlayOpacity: 0.9,\n },\n },\n InputWrapper: {\n defaultProps: {\n withAsterisk: false,\n },\n styles: (theme) => ({\n label: {\n marginBottom: theme.spacing.xs,\n lineHeight: '20px',\n },\n description: {\n lineHeight: '20px',\n fontSize: theme.fontSizes.sm,\n color: theme.colors.gray[7],\n marginBottom: theme.spacing.xs,\n },\n invalid: {\n color: theme.colors.red[9],\n borderColor: theme.colors.red[6],\n },\n error: {\n color: theme.colors.red[9],\n },\n }),\n },\n TextInput: {\n defaultProps: {\n radius: 8,\n },\n },\n Tooltip: {\n defaultProps: {\n color: 'navy',\n withArrow: true,\n withinPortal: true,\n multiline: true,\n },\n },\n Breadcrumbs: {\n defaultProps: {\n separator: <ArrowHeadRightSize24Px height={24} />,\n },\n },\n Loader: {\n defaultProps: {\n variant: 'dots',\n color: 'action',\n },\n },\n DateRangePicker: {\n styles: {\n cell: {\n textAlign: 'center',\n },\n },\n },\n Anchor: {\n defaultProps: {\n color: 'action',\n },\n styles: (theme) => ({\n root: {\n ...theme.fn.hover({\n textDecoration: 'underline',\n color: theme.colors.action[8],\n }),\n },\n }),\n },\n Checkbox: {\n defaultProps: {\n radius: 'sm',\n },\n },\n List: {\n styles: () => ({\n root: {\n listStyleType: 'disc',\n },\n }),\n },\n Radio: {\n styles: {\n labelWrapper: {\n display: 'flex',\n alignItems: 'flex-start',\n },\n },\n },\n Popover: {\n defaultProps: {\n shadow: 'md',\n withArrow: true,\n },\n },\n Badge: {\n styles: {\n root: {\n textTransform: 'none',\n padding: '4px 8px',\n fontWeight: 500,\n },\n },\n },\n ColorSwatch: {\n defaultProps: {\n size: 8,\n withShadow: false,\n },\n },\n MenuItem: {\n defaultProps: {\n fw: 300,\n },\n },\n },\n};\n"],"names":["plasmaTheme","colorScheme","fontFamily","black","color","primary","gray","defaultRadius","spacing","xs","sm","md","lg","xl","primaryColor","headings","fontWeight","sizes","h1","fontSize","lineHeight","undefined","h2","h3","h4","h5","h6","shadows","colors","PlasmaColors","components","Alert","defaultProps","icon","InfoSize24Px","height","styles","title","Title","theme","root","letterSpacing","Button","params","backgroundColor","variant","Modal","size","fullScreen","modal","width","fn","overlayColor","navy","overlayOpacity","InputWrapper","withAsterisk","label","marginBottom","description","fontSizes","invalid","red","borderColor","error","TextInput","radius","Tooltip","withArrow","withinPortal","multiline","Breadcrumbs","separator","ArrowHeadRightSize24Px","Loader","DateRangePicker","cell","textAlign","Anchor","hover","textDecoration","action","Checkbox","List","listStyleType","Radio","labelWrapper","display","alignItems","Popover","shadow","Badge","textTransform","padding","ColorSwatch","withShadow","MenuItem","fw"],"mappings":"AAAA;;;;+BAMaA;;;eAAAA;;;;;gCANsC;4BAC/B;4BAGO;AAEpB,IAAMA,cAAoC;IAC7C,2HAA2H;IAC3HC,aAAa;IACbC,YAAY;IACZC,OAAOC,mBAAK,CAACC,OAAO,CAACC,IAAI,CAAC,EAAE;IAC5BC,eAAe;IACfC,SAAS;QACLC,IAAI;QACJC,IAAI;QACJC,IAAI;QACJC,IAAI;QACJC,IAAI;IACR;IACAC,cAAc;IACdC,UAAU;QACNb,YAAY;QACZc,YAAY;QACZC,OAAO;YACHC,IAAI;gBAACC,UAAU;gBAAIC,YAAY;gBAAQJ,YAAYK;YAAS;YAC5DC,IAAI;gBAACH,UAAU;gBAAIC,YAAY;gBAAQJ,YAAYK;YAAS;YAC5DE,IAAI;gBAACJ,UAAU;gBAAIC,YAAY;gBAAQJ,YAAYK;YAAS;YAC5DG,IAAI;gBAACL,UAAU;gBAAIC,YAAY;gBAAQJ,YAAYK;YAAS;YAC5DI,IAAI;gBAACN,UAAU;gBAAIC,YAAY;gBAAQJ,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YACJ;QACJ;QACAC,SAAS;YACLzD,cAAc;gBACV0D,QAAQ;gBACRtB,WAAW,IAAI;YACnB;QACJ;QACAuB,OAAO;YACHvD,QAAQ;gBACJI,MAAM;oBACFoD,eAAe;oBACfC,SAAS;oBACT7E,YAAY;gBAChB;YACJ;QACJ;QACA8E,aAAa;YACT9D,cAAc;gBACVe,MAAM;gBACNgD,YAAY,KAAK;YACrB;QACJ;QACAC,UAAU;YACNhE,cAAc;gBACViE,IAAI;YACR;QACJ;IACJ;AACJ"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { Button as MantineButton, ButtonProps as MantineButtonProps } from '@mantine/core';
|
|
3
|
-
import {
|
|
3
|
+
import { ButtonWithDisabledTooltipProps } from './ButtonWithDisabledTooltip';
|
|
4
4
|
export interface ButtonProps extends MantineButtonProps, ButtonWithDisabledTooltipProps {
|
|
5
5
|
}
|
|
6
6
|
export declare const Button: (<C = "button">(props: import("@mantine/utils").PolymorphicComponentProps<C, ButtonProps>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>) & Omit<import("react").FunctionComponent<(ButtonProps & {
|
|
@@ -11,6 +11,5 @@ export declare const Button: (<C = "button">(props: import("@mantine/utils").Pol
|
|
|
11
11
|
component: import("react").ElementType<any>;
|
|
12
12
|
})>, never> & {
|
|
13
13
|
Group: typeof MantineButton.Group;
|
|
14
|
-
DisabledTooltip: typeof ButtonWithDisabledTooltip;
|
|
15
14
|
};
|
|
16
15
|
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/components/button/Button.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,MAAM,IAAI,aAAa,EAAE,WAAW,IAAI,kBAAkB,
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/components/button/Button.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,MAAM,IAAI,aAAa,EAAE,WAAW,IAAI,kBAAkB,EAAC,MAAM,eAAe,CAAC;AAIzF,OAAO,EAA4B,8BAA8B,EAAC,MAAM,6BAA6B,CAAC;AAEtG,MAAM,WAAW,WAAY,SAAQ,kBAAkB,EAAE,8BAA8B;CAAG;AAc1F,eAAO,MAAM,MAAM;;;;;;;WAA6D,OAAO,cAAc,KAAK;CAAW,CAAC"}
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { TooltipProps } from '@mantine/core';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
3
|
export interface ButtonWithDisabledTooltipProps {
|
|
4
|
-
disabled?: boolean;
|
|
5
|
-
onClick?: MouseEventHandler<HTMLButtonElement>;
|
|
6
4
|
/**
|
|
7
5
|
* The tooltip message to display when disabled
|
|
8
6
|
*/
|
|
9
7
|
disabledTooltip?: string;
|
|
10
8
|
/**
|
|
11
|
-
*
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
* Whether the button underneath the tooltip is disabled
|
|
10
|
+
*/
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
children?: ReactNode;
|
|
13
|
+
/**
|
|
14
|
+
* Additional tooltip props to set on the disabled button tooltip
|
|
14
15
|
*/
|
|
15
|
-
|
|
16
|
+
disabledTooltipProps?: Omit<TooltipProps, 'disabled' | 'label' | 'children'>;
|
|
16
17
|
}
|
|
17
|
-
export declare const ButtonWithDisabledTooltip: (<C = "
|
|
18
|
+
export declare const ButtonWithDisabledTooltip: (<C = "div">(props: import("@mantine/utils").PolymorphicComponentProps<C, ButtonWithDisabledTooltipProps>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>) & Omit<import("react").FunctionComponent<(ButtonWithDisabledTooltipProps & {
|
|
18
19
|
component?: any;
|
|
19
20
|
} & Omit<Pick<any, string | number | symbol>, "component" | keyof ButtonWithDisabledTooltipProps> & {
|
|
20
21
|
ref?: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonWithDisabledTooltip.d.ts","sourceRoot":"","sources":["../../../../src/components/button/ButtonWithDisabledTooltip.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ButtonWithDisabledTooltip.d.ts","sourceRoot":"","sources":["../../../../src/components/button/ButtonWithDisabledTooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAe,YAAY,EAAC,MAAM,eAAe,CAAC;AACzD,OAAO,EAAa,SAAS,EAAC,MAAM,OAAO,CAAC;AAI5C,MAAM,WAAW,8BAA8B;IAC3C;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;OAEG;IACH,oBAAoB,CAAC,EAAE,IAAI,CAAC,YAAY,EAAE,UAAU,GAAG,OAAO,GAAG,UAAU,CAAC,CAAC;CAChF;AAeD,eAAO,MAAM,yBAAyB;;;;;;mCAErC,CAAC"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { FunctionComponent, PropsWithChildren } from 'react';
|
|
2
2
|
import { InlineConfirmButton } from './InlineConfirmButton';
|
|
3
|
+
import { InlineConfirmMenuItem } from './InlineConfirmMenuItem';
|
|
3
4
|
import { InlineConfirmPrompt } from './InlineConfirmPrompt';
|
|
4
5
|
type InlineConfirmType = FunctionComponent<PropsWithChildren> & {
|
|
5
6
|
Prompt: typeof InlineConfirmPrompt;
|
|
6
7
|
Button: typeof InlineConfirmButton;
|
|
8
|
+
MenuItem: typeof InlineConfirmMenuItem;
|
|
7
9
|
};
|
|
8
10
|
export declare const InlineConfirm: InlineConfirmType;
|
|
9
11
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InlineConfirm.d.ts","sourceRoot":"","sources":["../../../../src/components/inline-confirm/InlineConfirm.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAW,iBAAiB,EAAE,iBAAiB,EAAyB,MAAM,OAAO,CAAC;AAE7F,OAAO,EAAC,mBAAmB,EAAC,MAAM,uBAAuB,CAAC;AAE1D,OAAO,EAAC,mBAAmB,EAAC,MAAM,uBAAuB,CAAC;AAE1D,KAAK,iBAAiB,GAAG,iBAAiB,CAAC,iBAAiB,CAAC,GAAG;IAC5D,MAAM,EAAE,OAAO,mBAAmB,CAAC;IACnC,MAAM,EAAE,OAAO,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"InlineConfirm.d.ts","sourceRoot":"","sources":["../../../../src/components/inline-confirm/InlineConfirm.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAW,iBAAiB,EAAE,iBAAiB,EAAyB,MAAM,OAAO,CAAC;AAE7F,OAAO,EAAC,mBAAmB,EAAC,MAAM,uBAAuB,CAAC;AAE1D,OAAO,EAAC,qBAAqB,EAAC,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAC,mBAAmB,EAAC,MAAM,uBAAuB,CAAC;AAE1D,KAAK,iBAAiB,GAAG,iBAAiB,CAAC,iBAAiB,CAAC,GAAG;IAC5D,MAAM,EAAE,OAAO,mBAAmB,CAAC;IACnC,MAAM,EAAE,OAAO,mBAAmB,CAAC;IACnC,QAAQ,EAAE,OAAO,qBAAqB,CAAC;CAC1C,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,iBAc3B,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { MouseEventHandler } from 'react';
|
|
2
2
|
import { ButtonProps } from '../button';
|
|
3
|
-
interface InlineConfirmButtonProps extends ButtonProps
|
|
3
|
+
export interface InlineConfirmButtonProps extends ButtonProps {
|
|
4
4
|
id: string;
|
|
5
|
+
onClick?: MouseEventHandler<HTMLButtonElement>;
|
|
5
6
|
}
|
|
6
|
-
export declare const InlineConfirmButton: (
|
|
7
|
-
export {};
|
|
7
|
+
export declare const InlineConfirmButton: import("react").ForwardRefExoticComponent<InlineConfirmButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
8
8
|
//# sourceMappingURL=InlineConfirmButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InlineConfirmButton.d.ts","sourceRoot":"","sources":["../../../../src/components/inline-confirm/InlineConfirmButton.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"InlineConfirmButton.d.ts","sourceRoot":"","sources":["../../../../src/components/inline-confirm/InlineConfirmButton.tsx"],"names":[],"mappings":"AACA,OAAO,EAAa,iBAAiB,EAAC,MAAM,OAAO,CAAC;AAEpD,OAAO,EAAC,WAAW,EAAC,MAAM,WAAW,CAAC;AAGtC,MAAM,WAAW,wBAAyB,SAAQ,WAAW;IACzD,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,CAAC,EAAE,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;CAClD;AAED,eAAO,MAAM,mBAAmB,wHAU/B,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { MouseEventHandler } from 'react';
|
|
2
|
+
import { MenuItemProps } from '../menu';
|
|
3
|
+
export interface InlineConfirmMenuItemProps extends MenuItemProps {
|
|
4
|
+
id: string;
|
|
5
|
+
onClick?: MouseEventHandler<HTMLButtonElement>;
|
|
6
|
+
}
|
|
7
|
+
export declare const InlineConfirmMenuItem: import("react").ForwardRefExoticComponent<InlineConfirmMenuItemProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
8
|
+
//# sourceMappingURL=InlineConfirmMenuItem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InlineConfirmMenuItem.d.ts","sourceRoot":"","sources":["../../../../src/components/inline-confirm/InlineConfirmMenuItem.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,iBAAiB,EAAC,MAAM,OAAO,CAAC;AAEpD,OAAO,EAAO,aAAa,EAAC,MAAM,SAAS,CAAC;AAG5C,MAAM,WAAW,0BAA2B,SAAQ,aAAa;IAC7D,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,CAAC,EAAE,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;CAClD;AAED,eAAO,MAAM,qBAAqB,0HAUjC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../../../../src/components/menu/Menu.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,IAAI,IAAI,WAAW,EAAE,aAAa,IAAI,oBAAoB,EAAC,MAAM,eAAe,CAAC;AAIzF,OAAO,
|
|
1
|
+
{"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../../../../src/components/menu/Menu.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,IAAI,IAAI,WAAW,EAAE,aAAa,IAAI,oBAAoB,EAAC,MAAM,eAAe,CAAC;AAIzF,OAAO,EAAC,8BAA8B,EAAC,MAAM,WAAW,CAAC;AAGzD,MAAM,WAAW,aAAc,SAAQ,oBAAoB,EAAE,8BAA8B;CAAG;AAgB9F,eAAO,MAAM,IAAI;;;;;;;;;CAGf,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Theme.d.ts","sourceRoot":"","sources":["../../../src/theme/Theme.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAqB,oBAAoB,EAAoB,MAAM,eAAe,CAAC;AAI1F,eAAO,MAAM,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"Theme.d.ts","sourceRoot":"","sources":["../../../src/theme/Theme.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAqB,oBAAoB,EAAoB,MAAM,eAAe,CAAC;AAI1F,eAAO,MAAM,WAAW,EAAE,oBA6LzB,CAAC"}
|
|
@@ -1,18 +1,26 @@
|
|
|
1
1
|
import _object_spread from "@swc/helpers/src/_object_spread.mjs";
|
|
2
|
+
import _object_without_properties from "@swc/helpers/src/_object_without_properties.mjs";
|
|
2
3
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { Button as MantineButton
|
|
4
|
+
import { Button as MantineButton } from "@mantine/core";
|
|
4
5
|
import { forwardRef } from "react";
|
|
5
6
|
import { createPolymorphicComponent } from "../../utils";
|
|
6
7
|
import { ButtonWithDisabledTooltip } from "./ButtonWithDisabledTooltip";
|
|
7
|
-
var _Button = /*#__PURE__*/ forwardRef(function(
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
var _Button = /*#__PURE__*/ forwardRef(function(_param, ref) /*#__PURE__*/ {
|
|
9
|
+
var disabledTooltip = _param.disabledTooltip, disabled = _param.disabled, disabledTooltipProps = _param.disabledTooltipProps, others = _object_without_properties(_param, [
|
|
10
|
+
"disabledTooltip",
|
|
11
|
+
"disabled",
|
|
12
|
+
"disabledTooltipProps"
|
|
13
|
+
]);
|
|
14
|
+
return _jsx(ButtonWithDisabledTooltip, {
|
|
15
|
+
disabled: disabled,
|
|
16
|
+
disabledTooltip: disabledTooltip,
|
|
17
|
+
disabledTooltipProps: disabledTooltipProps,
|
|
18
|
+
children: /*#__PURE__*/ _jsx(MantineButton, _object_spread({
|
|
19
|
+
ref: ref,
|
|
20
|
+
disabled: disabled
|
|
21
|
+
}, others))
|
|
22
|
+
});
|
|
14
23
|
});
|
|
15
24
|
export var Button = createPolymorphicComponent(_Button);
|
|
16
|
-
Button.DisabledTooltip = ButtonWithDisabledTooltip;
|
|
17
25
|
|
|
18
26
|
//# sourceMappingURL=Button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/button/Button.tsx"],"sourcesContent":["import {Button as MantineButton, ButtonProps as MantineButtonProps
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/button/Button.tsx"],"sourcesContent":["import {Button as MantineButton, ButtonProps as MantineButtonProps} from '@mantine/core';\nimport {forwardRef} from 'react';\n\nimport {createPolymorphicComponent} from '../../utils';\nimport {ButtonWithDisabledTooltip, ButtonWithDisabledTooltipProps} from './ButtonWithDisabledTooltip';\n\nexport interface ButtonProps extends MantineButtonProps, ButtonWithDisabledTooltipProps {}\n\nconst _Button = forwardRef<HTMLButtonElement, ButtonProps>(\n ({disabledTooltip, disabled, disabledTooltipProps, ...others}, ref) => (\n <ButtonWithDisabledTooltip\n disabled={disabled}\n disabledTooltip={disabledTooltip}\n disabledTooltipProps={disabledTooltipProps}\n >\n <MantineButton ref={ref} disabled={disabled} {...others} />\n </ButtonWithDisabledTooltip>\n )\n);\n\nexport const Button = createPolymorphicComponent<'button', ButtonProps, {Group: typeof MantineButton.Group}>(_Button);\n"],"names":["Button","MantineButton","forwardRef","createPolymorphicComponent","ButtonWithDisabledTooltip","_Button","ref","disabledTooltip","disabled","disabledTooltipProps","others"],"mappings":"AAAA;;;AAAA,SAAQA,UAAUC,aAAa,QAA0C,gBAAgB;AACzF,SAAQC,UAAU,QAAO,QAAQ;AAEjC,SAAQC,0BAA0B,QAAO,cAAc;AACvD,SAAQC,yBAAyB,QAAuC,8BAA8B;AAItG,IAAMC,wBAAUH,WACZ,iBAA+DI,mBAC3D;QADFC,yBAAAA,iBAAiBC,kBAAAA,UAAUC,8BAAAA,sBAAyBC;QAApDH;QAAiBC;QAAUC;;WACzB,KAACL;QACGI,UAAUA;QACVD,iBAAiBA;QACjBE,sBAAsBA;kBAEtB,cAAA,KAACR;YAAcK,KAAKA;YAAKE,UAAUA;WAAcE;;AAC1B;AAInC,OAAO,IAAMV,SAASG,2BAAuFE,SAAS"}
|