@coveord/plasma-mantine 49.0.2 → 49.1.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 +13 -11
- package/dist/.tsbuildinfo +1 -1
- package/dist/cjs/components/button/Button.js +28 -0
- package/dist/cjs/components/button/Button.js.map +1 -0
- package/dist/cjs/components/button/ButtonWithDisabledTooltip.js +64 -0
- package/dist/cjs/components/button/ButtonWithDisabledTooltip.js.map +1 -0
- package/dist/cjs/components/button/index.js +8 -0
- package/dist/cjs/components/button/index.js.map +1 -0
- package/dist/cjs/components/collection/Collection.js +2 -1
- package/dist/cjs/components/collection/Collection.js.map +1 -1
- package/dist/cjs/components/date-range-picker/DateRangePickerInlineCalendar.js +3 -2
- package/dist/cjs/components/date-range-picker/DateRangePickerInlineCalendar.js.map +1 -1
- package/dist/cjs/components/index.js +2 -0
- package/dist/cjs/components/index.js.map +1 -1
- package/dist/cjs/components/inline-confirm/InlineConfirmButton.js +2 -2
- package/dist/cjs/components/inline-confirm/InlineConfirmButton.js.map +1 -1
- package/dist/cjs/components/inline-confirm/InlineConfirmPrompt.js +3 -2
- package/dist/cjs/components/inline-confirm/InlineConfirmPrompt.js.map +1 -1
- package/dist/cjs/components/menu/Menu.js +29 -0
- package/dist/cjs/components/menu/Menu.js.map +1 -0
- package/dist/cjs/components/menu/index.js +8 -0
- package/dist/cjs/components/menu/index.js.map +1 -0
- package/dist/cjs/components/modal-wizard/ModalWizard.js +4 -3
- package/dist/cjs/components/modal-wizard/ModalWizard.js.map +1 -1
- package/dist/cjs/components/table/TableDateRangePicker.js +2 -1
- package/dist/cjs/components/table/TableDateRangePicker.js.map +1 -1
- package/dist/cjs/components/table/TableHeader.js +2 -1
- package/dist/cjs/components/table/TableHeader.js.map +1 -1
- package/dist/cjs/index.js +6 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/utils/createPolymorphicComponent.js +14 -0
- package/dist/cjs/utils/createPolymorphicComponent.js.map +1 -0
- package/dist/cjs/utils/index.js +9 -0
- package/dist/cjs/utils/index.js.map +1 -0
- package/dist/cjs/utils/overrideComponent.js +29 -0
- package/dist/cjs/utils/overrideComponent.js.map +1 -0
- package/dist/definitions/components/button/Button.d.ts +16 -0
- package/dist/definitions/components/button/Button.d.ts.map +1 -0
- package/dist/definitions/components/button/ButtonWithDisabledTooltip.d.ts +24 -0
- package/dist/definitions/components/button/ButtonWithDisabledTooltip.d.ts.map +1 -0
- package/dist/definitions/components/button/index.d.ts +3 -0
- package/dist/definitions/components/button/index.d.ts.map +1 -0
- package/dist/definitions/components/collection/Collection.d.ts.map +1 -1
- package/dist/definitions/components/date-range-picker/DateRangePickerInlineCalendar.d.ts.map +1 -1
- package/dist/definitions/components/index.d.ts +2 -0
- package/dist/definitions/components/index.d.ts.map +1 -1
- package/dist/definitions/components/inline-confirm/InlineConfirmButton.d.ts +1 -1
- package/dist/definitions/components/inline-confirm/InlineConfirmButton.d.ts.map +1 -1
- package/dist/definitions/components/inline-confirm/InlineConfirmPrompt.d.ts.map +1 -1
- package/dist/definitions/components/menu/Menu.d.ts +16 -0
- package/dist/definitions/components/menu/Menu.d.ts.map +1 -0
- package/dist/definitions/components/menu/index.d.ts +2 -0
- package/dist/definitions/components/menu/index.d.ts.map +1 -0
- package/dist/definitions/components/modal-wizard/ModalWizard.d.ts.map +1 -1
- package/dist/definitions/components/table/TableDateRangePicker.d.ts.map +1 -1
- package/dist/definitions/components/table/TableHeader.d.ts.map +1 -1
- package/dist/definitions/index.d.ts +1 -1
- package/dist/definitions/index.d.ts.map +1 -1
- package/dist/definitions/utils/createPolymorphicComponent.d.ts +3 -0
- package/dist/definitions/utils/createPolymorphicComponent.d.ts.map +1 -0
- package/dist/definitions/utils/index.d.ts +3 -0
- package/dist/definitions/utils/index.d.ts.map +1 -0
- package/dist/definitions/utils/overrideComponent.d.ts +10 -0
- package/dist/definitions/utils/overrideComponent.d.ts.map +1 -0
- package/dist/esm/components/button/Button.js +18 -0
- package/dist/esm/components/button/Button.js.map +1 -0
- package/dist/esm/components/button/ButtonWithDisabledTooltip.js +54 -0
- package/dist/esm/components/button/ButtonWithDisabledTooltip.js.map +1 -0
- package/dist/esm/components/button/index.js +3 -0
- package/dist/esm/components/button/index.js.map +1 -0
- package/dist/esm/components/collection/Collection.js +2 -1
- package/dist/esm/components/collection/Collection.js.map +1 -1
- package/dist/esm/components/date-range-picker/DateRangePickerInlineCalendar.js +2 -1
- package/dist/esm/components/date-range-picker/DateRangePickerInlineCalendar.js.map +1 -1
- package/dist/esm/components/index.js +2 -0
- package/dist/esm/components/index.js.map +1 -1
- package/dist/esm/components/inline-confirm/InlineConfirmButton.js +1 -1
- package/dist/esm/components/inline-confirm/InlineConfirmButton.js.map +1 -1
- package/dist/esm/components/inline-confirm/InlineConfirmPrompt.js +2 -1
- package/dist/esm/components/inline-confirm/InlineConfirmPrompt.js.map +1 -1
- package/dist/esm/components/menu/Menu.js +19 -0
- package/dist/esm/components/menu/Menu.js.map +1 -0
- package/dist/esm/components/menu/index.js +3 -0
- package/dist/esm/components/menu/index.js.map +1 -0
- package/dist/esm/components/modal-wizard/ModalWizard.js +3 -2
- package/dist/esm/components/modal-wizard/ModalWizard.js.map +1 -1
- package/dist/esm/components/table/TableDateRangePicker.js +2 -1
- package/dist/esm/components/table/TableDateRangePicker.js.map +1 -1
- package/dist/esm/components/table/TableHeader.js +2 -1
- package/dist/esm/components/table/TableHeader.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/utils/createPolymorphicComponent.js +8 -0
- package/dist/esm/utils/createPolymorphicComponent.js.map +1 -0
- package/dist/esm/utils/index.js +4 -0
- package/dist/esm/utils/index.js.map +1 -0
- package/dist/esm/utils/overrideComponent.js +19 -0
- package/dist/esm/utils/overrideComponent.js.map +1 -0
- package/package.json +5 -3
- package/src/components/button/Button.tsx +27 -0
- package/src/components/button/ButtonWithDisabledTooltip.tsx +58 -0
- package/src/components/button/__tests__/ButtonWithDisabledTooltip.spec.tsx +52 -0
- package/src/components/button/index.ts +2 -0
- package/src/components/collection/Collection.tsx +1 -1
- package/src/components/date-range-picker/DateRangePickerInlineCalendar.tsx +2 -1
- package/src/components/index.ts +2 -0
- package/src/components/inline-confirm/InlineConfirmButton.tsx +2 -1
- package/src/components/inline-confirm/InlineConfirmPrompt.tsx +2 -1
- package/src/components/menu/Menu.tsx +18 -0
- package/src/components/menu/index.ts +1 -0
- package/src/components/modal-wizard/ModalWizard.tsx +4 -2
- package/src/components/table/TableDateRangePicker.tsx +3 -1
- package/src/components/table/TableHeader.tsx +2 -1
- package/src/components/table/__tests__/TableActions.spec.tsx +1 -1
- package/src/index.ts +1 -1
- package/src/utils/__tests__/overrideComponent.spec.tsx +74 -0
- package/src/utils/createPolymorphicComponent.ts +8 -0
- package/src/utils/index.ts +2 -0
- package/src/utils/overrideComponent.ts +18 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "createPolymorphicComponent", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return createPolymorphicComponent;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
var _utils = require("@mantine/utils");
|
|
12
|
+
var createPolymorphicComponent = _utils.createPolymorphicComponent;
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=createPolymorphicComponent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/utils/createPolymorphicComponent.ts"],"sourcesContent":["import {createPolymorphicComponent as mantineCreatePolymorphicComponent} from '@mantine/utils';\n\n/*\n * createPolymorphicComponent is already exported from @mantine/core, but there is an issue when using pnpm + typescript\n * that forces us to use it directly from @mantine/utils (see https://github.com/microsoft/TypeScript/issues/47663)\n * We are simply rexporting it here to avoid having to deal with this issue everywhere\n */\nexport const createPolymorphicComponent = mantineCreatePolymorphicComponent;\n"],"names":["createPolymorphicComponent","mantineCreatePolymorphicComponent"],"mappings":"AAAA;;;;+BAOaA;;;eAAAA;;;qBAPiE;AAOvE,IAAMA,6BAA6BC,iCAAiC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
var _exportStar = require("@swc/helpers/lib/_export_star.js").default;
|
|
6
|
+
_exportStar(require("./createPolymorphicComponent"), exports);
|
|
7
|
+
_exportStar(require("./overrideComponent"), exports);
|
|
8
|
+
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/utils/index.ts"],"sourcesContent":["export * from './createPolymorphicComponent';\nexport * from './overrideComponent';\n"],"names":[],"mappings":"AAAA;;;;;oBAAc;oBACA"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Allows to override static properties from a component function
|
|
3
|
+
*
|
|
4
|
+
* @param component The component which holds the static properties
|
|
5
|
+
* @param properties The new static properties to assign on the component
|
|
6
|
+
* @returns A new component with the specified properties. It doesn't change the original component
|
|
7
|
+
* @example const Menu = overrideComponent(MantineMenu, {Item: MyMenuItem}); // Menu.Item will equal MyMenuItem
|
|
8
|
+
*/ "use strict";
|
|
9
|
+
Object.defineProperty(exports, "__esModule", {
|
|
10
|
+
value: true
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "overrideComponent", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function() {
|
|
15
|
+
return overrideComponent;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
var _toConsumableArray = require("@swc/helpers/lib/_to_consumable_array.js").default;
|
|
19
|
+
var overrideComponent = function(component, properties) {
|
|
20
|
+
var componentClone = function() {
|
|
21
|
+
for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
|
|
22
|
+
args[_key] = arguments[_key];
|
|
23
|
+
}
|
|
24
|
+
return component.apply(void 0, _toConsumableArray(args));
|
|
25
|
+
};
|
|
26
|
+
return Object.assign(componentClone, component, properties);
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
//# sourceMappingURL=overrideComponent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/utils/overrideComponent.ts"],"sourcesContent":["/**\n * Allows to override static properties from a component function\n *\n * @param component The component which holds the static properties\n * @param properties The new static properties to assign on the component\n * @returns A new component with the specified properties. It doesn't change the original component\n * @example const Menu = overrideComponent(MantineMenu, {Item: MyMenuItem}); // Menu.Item will equal MyMenuItem\n */\nexport const overrideComponent = <\n Component extends (...args: Parameters<Component>) => ReturnType<Component>,\n StaticProperties = Record<keyof Component, never>\n>(\n component: Component,\n properties: StaticProperties\n): ((...args: Parameters<Component>) => ReturnType<Component>) & Component & StaticProperties => {\n const componentClone = (...args: Parameters<Component>) => component(...args);\n return Object.assign(componentClone, component, properties);\n};\n"],"names":["overrideComponent","component","properties","componentClone","args","Object","assign"],"mappings":"AAAA;;;;;;;CAOC,GACD;;;;+BAAaA;;;eAAAA;;;;AAAN,IAAMA,oBAAoB,SAI7BC,WACAC,YAC6F;IAC7F,IAAMC,iBAAiB;yCAAIC;YAAAA;;eAAgCH,UAAAA,MAAAA,KAAAA,GAAU,mBAAGG;;IACxE,OAAOC,OAAOC,MAAM,CAACH,gBAAgBF,WAAWC;AACpD"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Button as MantineButton, ButtonProps as MantineButtonProps } from '@mantine/core';
|
|
3
|
+
import { ButtonWithDisabledTooltip, ButtonWithDisabledTooltipProps } from './ButtonWithDisabledTooltip';
|
|
4
|
+
export interface ButtonProps extends MantineButtonProps, ButtonWithDisabledTooltipProps {
|
|
5
|
+
}
|
|
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 & {
|
|
7
|
+
component?: any;
|
|
8
|
+
} & Omit<Pick<any, string | number | symbol>, "component" | keyof ButtonProps> & {
|
|
9
|
+
ref?: any;
|
|
10
|
+
}) | (ButtonProps & {
|
|
11
|
+
component: import("react").ElementType<any>;
|
|
12
|
+
})>, never> & {
|
|
13
|
+
Group: typeof MantineButton.Group;
|
|
14
|
+
DisabledTooltip: typeof ButtonWithDisabledTooltip;
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -0,0 +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,EAAkB,MAAM,eAAe,CAAC;AAI1G,OAAO,EAAC,yBAAyB,EAAE,8BAA8B,EAAC,MAAM,6BAA6B,CAAC;AAEtG,MAAM,WAAW,WAAY,SAAQ,kBAAkB,EAAE,8BAA8B;CAAG;AAc1F,eAAO,MAAM,MAAM;;;;;;;WAGP,OAAO,cAAc,KAAK;qBAAmB,gCAAgC;CAC/E,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Property } from 'csstype';
|
|
2
|
+
import { MouseEventHandler } from 'react';
|
|
3
|
+
export interface ButtonWithDisabledTooltipProps {
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
onClick?: MouseEventHandler<HTMLButtonElement>;
|
|
6
|
+
/**
|
|
7
|
+
* The tooltip message to display when disabled
|
|
8
|
+
*/
|
|
9
|
+
disabledTooltip?: string;
|
|
10
|
+
/**
|
|
11
|
+
* The background color when disabled
|
|
12
|
+
*
|
|
13
|
+
* @default 'unset'
|
|
14
|
+
*/
|
|
15
|
+
disabledHoverColor?: Property.BackgroundColor;
|
|
16
|
+
}
|
|
17
|
+
export declare const ButtonWithDisabledTooltip: (<C = "button">(props: import("@mantine/utils").PolymorphicComponentProps<C, ButtonWithDisabledTooltipProps>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>) & Omit<import("react").FunctionComponent<(ButtonWithDisabledTooltipProps & {
|
|
18
|
+
component?: any;
|
|
19
|
+
} & Omit<Pick<any, string | number | symbol>, "component" | keyof ButtonWithDisabledTooltipProps> & {
|
|
20
|
+
ref?: any;
|
|
21
|
+
}) | (ButtonWithDisabledTooltipProps & {
|
|
22
|
+
component: import("react").ElementType<any>;
|
|
23
|
+
})>, never> & Record<string, never>;
|
|
24
|
+
//# sourceMappingURL=ButtonWithDisabledTooltip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonWithDisabledTooltip.d.ts","sourceRoot":"","sources":["../../../../src/components/button/ButtonWithDisabledTooltip.tsx"],"names":[],"mappings":"AACA,OAAO,EAAC,QAAQ,EAAC,MAAM,SAAS,CAAC;AACjC,OAAO,EAAa,iBAAiB,EAAC,MAAM,OAAO,CAAC;AAIpD,MAAM,WAAW,8BAA8B;IAC3C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;IAC/C;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,QAAQ,CAAC,eAAe,CAAC;CACjD;AAoCD,eAAO,MAAM,yBAAyB;;;;;;mCAErC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/button/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,OAAO,EAAC,KAAK,8BAA8B,EAAC,MAAM,6BAA6B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Collection.d.ts","sourceRoot":"","sources":["../../../../src/components/collection/Collection.tsx"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"Collection.d.ts","sourceRoot":"","sources":["../../../../src/components/collection/Collection.tsx"],"names":[],"mappings":"AACA,OAAO,EAEH,YAAY,EAGZ,qBAAqB,EACrB,iBAAiB,EACjB,SAAS,EAIZ,MAAM,eAAe,CAAC;AACvB,OAAO,EAAC,cAAc,EAAC,MAAM,yBAAyB,CAAC;AAEvD,OAAO,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AAIhC,OAAO,SAAS,MAAM,qBAAqB,CAAC;AAG5C,UAAU,eAAe,CAAC,CAAC,CACvB,SAAQ,IAAI,CAAC,qBAAqB,EAAE,gBAAgB,GAAG,mBAAmB,CAAC,EACvE,YAAY,CAAC,SAAS,CAAC,OAAO,SAAS,CAAC,CAAC;IAC7C;;OAEG;IACH,OAAO,EAAE,CAAC,CAAC;IACX;;;;;OAKG;IACH,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,SAAS,CAAC;IAChD;;;;OAIG;IACH,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC;IACZ;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,IAAI,CAAC;IAChC;;;;OAIG;IACH,YAAY,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C;;;;OAIG;IACH,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,IAAI,CAAC;IAClD;;;;;OAKG;IACH,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACjD;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,EAAE,KAAK,OAAO,CAAC;IACpC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;;OAIG;IACH,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAWD,eAAO,MAAM,UAAU,+CAsHtB,CAAC"}
|
package/dist/definitions/components/date-range-picker/DateRangePickerInlineCalendar.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateRangePickerInlineCalendar.d.ts","sourceRoot":"","sources":["../../../../src/components/date-range-picker/DateRangePickerInlineCalendar.tsx"],"names":[],"mappings":";AACA,OAAO,EAAC,oBAAoB,EAAiB,kBAAkB,EAAC,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"DateRangePickerInlineCalendar.d.ts","sourceRoot":"","sources":["../../../../src/components/date-range-picker/DateRangePickerInlineCalendar.tsx"],"names":[],"mappings":";AACA,OAAO,EAAC,oBAAoB,EAAiB,kBAAkB,EAAC,MAAM,gBAAgB,CAAC;AAIvF,OAAO,EAAC,qBAAqB,EAA8B,MAAM,+BAA+B,CAAC;AACjG,OAAO,EAA0B,4BAA4B,EAAC,MAAM,2BAA2B,CAAC;AAEhG,MAAM,WAAW,kCACb,SAAQ,IAAI,CAAC,4BAA4B,EAAE,YAAY,GAAG,UAAU,CAAC;IACrE;;OAEG;IACH,YAAY,EAAE,oBAAoB,CAAC;IACnC;;;;OAIG;IACH,OAAO,EAAE,CAAC,KAAK,EAAE,oBAAoB,KAAK,IAAI,CAAC;IAC/C;;OAEG;IACH,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB;;;;;;;;;OASG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAC;IAChD;;OAEG;IACH,kBAAkB,CAAC,EAAE,IAAI,CAAC,kBAAkB,EAAE,OAAO,GAAG,UAAU,CAAC,CAAC;CACvE;AAED,eAAO,MAAM,6BAA6B,4FAQvC,kCAAkC,gBAiEpC,CAAC"}
|
|
@@ -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,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,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,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InlineConfirmButton.d.ts","sourceRoot":"","sources":["../../../../src/components/inline-confirm/InlineConfirmButton.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"InlineConfirmButton.d.ts","sourceRoot":"","sources":["../../../../src/components/inline-confirm/InlineConfirmButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAoB,MAAM,OAAO,CAAC;AAExD,OAAO,EAAS,WAAW,EAAC,MAAM,WAAW,CAAC;AAG9C,UAAU,wBAAyB,SAAQ,WAAW,EAAE,IAAI,CAAC,cAAc,CAAC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IACpG,EAAE,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,mBAAmB,UAAW,wBAAwB,gBAQlE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InlineConfirmPrompt.d.ts","sourceRoot":"","sources":["../../../../src/components/inline-confirm/InlineConfirmPrompt.tsx"],"names":[],"mappings":"AACA,OAAO,EAAC,iBAAiB,EAAE,SAAS,EAAY,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"InlineConfirmPrompt.d.ts","sourceRoot":"","sources":["../../../../src/components/inline-confirm/InlineConfirmPrompt.tsx"],"names":[],"mappings":"AACA,OAAO,EAAC,iBAAiB,EAAE,SAAS,EAAY,MAAM,OAAO,CAAC;AAK9D,UAAU,wBAAwB;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,SAAS,CAAC;IACjB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,WAAW,CAAC,EAAE,SAAS,CAAC;CAC3B;AAED,eAAO,MAAM,mBAAmB,EAAE,iBAAiB,CAAC,wBAAwB,CAkC3E,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Menu as MantineMenu, MenuItemProps as MantineMenuItemProps } from '@mantine/core';
|
|
3
|
+
import { ButtonWithDisabledTooltipProps } from '../button';
|
|
4
|
+
export interface MenuItemProps extends MantineMenuItemProps, ButtonWithDisabledTooltipProps {
|
|
5
|
+
}
|
|
6
|
+
export declare const Menu: ((props: import("@mantine/core").MenuProps) => JSX.Element) & typeof MantineMenu & {
|
|
7
|
+
displayName: string;
|
|
8
|
+
Item: (<C = "button">(props: import("@mantine/utils").PolymorphicComponentProps<C, MenuItemProps>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>) & Omit<import("react").FunctionComponent<(MenuItemProps & {
|
|
9
|
+
component?: any;
|
|
10
|
+
} & Omit<Pick<any, string | number | symbol>, "component" | keyof MenuItemProps> & {
|
|
11
|
+
ref?: any;
|
|
12
|
+
}) | (MenuItemProps & {
|
|
13
|
+
component: import("react").ElementType<any>;
|
|
14
|
+
})>, never> & Record<string, never>;
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=Menu.d.ts.map
|
|
@@ -0,0 +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,EAAS,8BAA8B,EAAC,MAAM,WAAW,CAAC;AAEjE,MAAM,WAAW,aAAc,SAAQ,oBAAoB,EAAE,8BAA8B;CAAG;AAQ9F,eAAO,MAAM,IAAI;;;;;;;;;CAGf,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/menu/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModalWizard.d.ts","sourceRoot":"","sources":["../../../../src/components/modal-wizard/ModalWizard.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"ModalWizard.d.ts","sourceRoot":"","sources":["../../../../src/components/modal-wizard/ModalWizard.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAoB,YAAY,EAAS,UAAU,EAAY,SAAS,EAAC,MAAM,eAAe,CAAC;AACtG,OAAO,EAAW,YAAY,EAAoB,MAAM,OAAO,CAAC;AAKhE,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAElD,QAAA,MAAM,SAAS;;;;CAUZ,CAAC;AAEJ,KAAK,sBAAsB,GAAG,SAAS,CAAC,OAAO,SAAS,CAAC,CAAC;AAE1D,UAAU,gBACN,SAAQ,IAAI,CAAC,YAAY,CAAC,sBAAsB,CAAC,EAAE,YAAY,GAAG,QAAQ,CAAC,EACvE,IAAI,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC;IAC1C;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAE7B;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,OAAO,CAAC;IAEvB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,OAAO,CAAC;IAE3B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,OAAO,CAAC;IAEzB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC;IAExB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,OAAO,CAAC;IAEjC;;SAEK;IACL,QAAQ,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC,CAAC;CACxD;AAED,UAAU,eAAe;IACrB,CAAC,KAAK,EAAE,gBAAgB,GAAG,YAAY,CAAC;IAExC,IAAI,EAAE,OAAO,eAAe,CAAC;CAChC;AAED,eAAO,MAAM,WAAW,EAAE,eA0HzB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableDateRangePicker.d.ts","sourceRoot":"","sources":["../../../../src/components/table/TableDateRangePicker.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAC,iBAAiB,EAAW,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"TableDateRangePicker.d.ts","sourceRoot":"","sources":["../../../../src/components/table/TableDateRangePicker.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAC,iBAAiB,EAAW,MAAM,OAAO,CAAC;AAGlD,OAAO,EAAgC,kCAAkC,EAAC,MAAM,sBAAsB,CAAC;AACvG,OAAO,EAAC,qBAAqB,EAAC,MAAM,kDAAkD,CAAC;AAGvF,UAAU,yBACN,SAAQ,IAAI,CAAC,kCAAkC,EAAE,YAAY,GAAG,UAAU,GAAG,oBAAoB,CAAC;IAClG;;;;;;;;;;OAUG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAC;CACnD;AAED,eAAO,MAAM,oBAAoB,EAAE,iBAAiB,CAAC,yBAAyB,CAuC7E,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableHeader.d.ts","sourceRoot":"","sources":["../../../../src/components/table/TableHeader.tsx"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"TableHeader.d.ts","sourceRoot":"","sources":["../../../../src/components/table/TableHeader.tsx"],"names":[],"mappings":"AACA,OAAO,EAAe,YAAY,EAAS,SAAS,EAAiB,MAAM,eAAe,CAAC;AAC3F,OAAO,EAAC,iBAAiB,EAAE,SAAS,EAAC,MAAM,OAAO,CAAC;AAKnD,QAAA,MAAM,SAAS;;;;CAQZ,CAAC;AAEJ,KAAK,sBAAsB,GAAG,SAAS,CAAC,OAAO,SAAS,CAAC,CAAC;AAC1D,UAAU,gBAAiB,SAAQ,YAAY,CAAC,sBAAsB,CAAC;IAEnE,QAAQ,CAAC,EAAE,SAAS,CAAC;CACxB;AACD,eAAO,MAAM,WAAW,EAAE,iBAAiB,CAAC,gBAAgB,CA8B3D,CAAC"}
|
|
@@ -7,7 +7,7 @@ export * from '@mantine/hooks';
|
|
|
7
7
|
export { createColumnHelper, type ColumnDef } from '@tanstack/table-core';
|
|
8
8
|
export * from './components';
|
|
9
9
|
export * from '@mantine/form';
|
|
10
|
-
export { Header, Table, type HeaderProps, Modal } from './components';
|
|
10
|
+
export { Header, Table, type HeaderProps, Modal, Button, type ButtonProps, Menu, type MenuItemProps } from './components';
|
|
11
11
|
export { useForm, createFormContext } from './form';
|
|
12
12
|
export * from './theme';
|
|
13
13
|
declare module '@mantine/core' {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAC,MAAM,eAAe,CAAC;AAEpC,OAAO,EAAC,YAAY,EAAC,MAAM,sBAAsB,CAAC;AAElD,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,YAAY,EAAC,iBAAiB,EAAC,MAAM,yBAAyB,CAAC;AAC/D,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EAAC,kBAAkB,EAAE,KAAK,SAAS,EAAC,MAAM,sBAAsB,CAAC;AACxE,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAE9B,OAAO,EAAC,MAAM,EAAE,KAAK,EAAE,KAAK,WAAW,EAAE,KAAK,EAAC,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAC,MAAM,eAAe,CAAC;AAEpC,OAAO,EAAC,YAAY,EAAC,MAAM,sBAAsB,CAAC;AAElD,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,YAAY,EAAC,iBAAiB,EAAC,MAAM,yBAAyB,CAAC;AAC/D,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EAAC,kBAAkB,EAAE,KAAK,SAAS,EAAC,MAAM,sBAAsB,CAAC;AACxE,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAE9B,OAAO,EAAC,MAAM,EAAE,KAAK,EAAE,KAAK,WAAW,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,IAAI,EAAE,KAAK,aAAa,EAAC,MAAM,cAAc,CAAC;AACxH,OAAO,EAAC,OAAO,EAAE,iBAAiB,EAAC,MAAM,QAAQ,CAAC;AAElD,cAAc,SAAS,CAAC;AAExB,OAAO,QAAQ,eAAe,CAAC;IAC3B,UAAiB,0BAA0B;QAEvC,MAAM,EAAE,MAAM,CAAC,MAAM,OAAO,YAAY,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,EAAE,KAAK,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC;KAChF;CACJ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createPolymorphicComponent.d.ts","sourceRoot":"","sources":["../../../src/utils/createPolymorphicComponent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,0BAA0B,IAAI,iCAAiC,EAAC,MAAM,gBAAgB,CAAC;AAO/F,eAAO,MAAM,0BAA0B,0CAAoC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Allows to override static properties from a component function
|
|
3
|
+
*
|
|
4
|
+
* @param component The component which holds the static properties
|
|
5
|
+
* @param properties The new static properties to assign on the component
|
|
6
|
+
* @returns A new component with the specified properties. It doesn't change the original component
|
|
7
|
+
* @example const Menu = overrideComponent(MantineMenu, {Item: MyMenuItem}); // Menu.Item will equal MyMenuItem
|
|
8
|
+
*/
|
|
9
|
+
export declare const overrideComponent: <Component extends (...args: Parameters<Component>) => ReturnType<Component>, StaticProperties = Record<keyof Component, never>>(component: Component, properties: StaticProperties) => ((...args: Parameters<Component>) => ReturnType<Component>) & Component & StaticProperties;
|
|
10
|
+
//# sourceMappingURL=overrideComponent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"overrideComponent.d.ts","sourceRoot":"","sources":["../../../src/utils/overrideComponent.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,oRAS7B,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import _object_spread from "@swc/helpers/src/_object_spread.mjs";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Button as MantineButton, useMantineTheme } from "@mantine/core";
|
|
4
|
+
import { forwardRef } from "react";
|
|
5
|
+
import { createPolymorphicComponent } from "../../utils";
|
|
6
|
+
import { ButtonWithDisabledTooltip } from "./ButtonWithDisabledTooltip";
|
|
7
|
+
var _Button = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
8
|
+
var theme = useMantineTheme();
|
|
9
|
+
return /*#__PURE__*/ _jsx(ButtonWithDisabledTooltip, _object_spread({
|
|
10
|
+
component: MantineButton,
|
|
11
|
+
ref: ref,
|
|
12
|
+
disabledHoverColor: theme.colors.gray[2]
|
|
13
|
+
}, props));
|
|
14
|
+
});
|
|
15
|
+
export var Button = createPolymorphicComponent(_Button);
|
|
16
|
+
Button.DisabledTooltip = ButtonWithDisabledTooltip;
|
|
17
|
+
|
|
18
|
+
//# sourceMappingURL=Button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/button/Button.tsx"],"sourcesContent":["import {Button as MantineButton, ButtonProps as MantineButtonProps, useMantineTheme} 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>((props, ref) => {\n const theme = useMantineTheme();\n return (\n <ButtonWithDisabledTooltip\n component={MantineButton}\n ref={ref}\n disabledHoverColor={theme.colors.gray[2]}\n {...props}\n />\n );\n});\n\nexport const Button = createPolymorphicComponent<\n 'button',\n ButtonProps,\n {Group: typeof MantineButton.Group; DisabledTooltip: typeof ButtonWithDisabledTooltip}\n>(_Button);\n\nButton.DisabledTooltip = ButtonWithDisabledTooltip;\n"],"names":["Button","MantineButton","useMantineTheme","forwardRef","createPolymorphicComponent","ButtonWithDisabledTooltip","_Button","props","ref","theme","component","disabledHoverColor","colors","gray","DisabledTooltip"],"mappings":"AAAA;;AAAA,SAAQA,UAAUC,aAAa,EAAqCC,eAAe,QAAO,gBAAgB;AAC1G,SAAQC,UAAU,QAAO,QAAQ;AAEjC,SAAQC,0BAA0B,QAAO,cAAc;AACvD,SAAQC,yBAAyB,QAAuC,8BAA8B;AAItG,IAAMC,wBAAUH,WAA2C,SAACI,OAAOC,KAAQ;IACvE,IAAMC,QAAQP;IACd,qBACI,KAACG;QACGK,WAAWT;QACXO,KAAKA;QACLG,oBAAoBF,MAAMG,MAAM,CAACC,IAAI,CAAC,EAAE;OACpCN;AAGhB;AAEA,OAAO,IAAMP,SAASI,2BAIpBE,SAAS;AAEXN,OAAOc,eAAe,GAAGT"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import _object_spread from "@swc/helpers/src/_object_spread.mjs";
|
|
2
|
+
import _object_spread_props from "@swc/helpers/src/_object_spread_props.mjs";
|
|
3
|
+
import _object_without_properties from "@swc/helpers/src/_object_without_properties.mjs";
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
import { Box, Tooltip } from "@mantine/core";
|
|
6
|
+
import { forwardRef } from "react";
|
|
7
|
+
import { createPolymorphicComponent } from "../../utils";
|
|
8
|
+
var _ButtonWithDisabledTooltip = /*#__PURE__*/ forwardRef(function(_param, ref) {
|
|
9
|
+
var disabledTooltip = _param.disabledTooltip, disabled = _param.disabled, onClick = _param.onClick, tmp = _param.disabledHoverColor, hoverColor = tmp === void 0 ? "unset" : tmp, others = _object_without_properties(_param, [
|
|
10
|
+
"disabledTooltip",
|
|
11
|
+
"disabled",
|
|
12
|
+
"onClick",
|
|
13
|
+
"disabledHoverColor"
|
|
14
|
+
]);
|
|
15
|
+
return disabledTooltip ? /*#__PURE__*/ _jsx(Tooltip, {
|
|
16
|
+
label: disabledTooltip,
|
|
17
|
+
disabled: !disabled,
|
|
18
|
+
children: /*#__PURE__*/ _jsx(Box, _object_spread(_object_spread_props(_object_spread({
|
|
19
|
+
component: "button",
|
|
20
|
+
ref: ref
|
|
21
|
+
}, disabled ? {
|
|
22
|
+
"data-disabled": true
|
|
23
|
+
} : {}), {
|
|
24
|
+
sx: function(theme) {
|
|
25
|
+
return {
|
|
26
|
+
"&[data-disabled]": {
|
|
27
|
+
pointerEvents: "all",
|
|
28
|
+
color: theme.colors.gray[5]
|
|
29
|
+
},
|
|
30
|
+
"&[data-disabled]:hover": {
|
|
31
|
+
backgroundColor: hoverColor,
|
|
32
|
+
cursor: "not-allowed"
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
},
|
|
36
|
+
onClick: function(event) {
|
|
37
|
+
if (disabled) {
|
|
38
|
+
event.preventDefault();
|
|
39
|
+
event.stopPropagation();
|
|
40
|
+
} else {
|
|
41
|
+
onClick === null || onClick === void 0 ? void 0 : onClick(event);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}), others))
|
|
45
|
+
}) : /*#__PURE__*/ _jsx(Box, _object_spread({
|
|
46
|
+
component: "button",
|
|
47
|
+
ref: ref,
|
|
48
|
+
disabled: disabled,
|
|
49
|
+
onClick: onClick
|
|
50
|
+
}, others));
|
|
51
|
+
});
|
|
52
|
+
export var ButtonWithDisabledTooltip = createPolymorphicComponent(_ButtonWithDisabledTooltip);
|
|
53
|
+
|
|
54
|
+
//# sourceMappingURL=ButtonWithDisabledTooltip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/button/ButtonWithDisabledTooltip.tsx"],"sourcesContent":["import {Box, Tooltip} from '@mantine/core';\nimport {Property} from 'csstype';\nimport {forwardRef, MouseEventHandler} from 'react';\n\nimport {createPolymorphicComponent} from '../../utils';\n\nexport interface ButtonWithDisabledTooltipProps {\n disabled?: boolean;\n onClick?: MouseEventHandler<HTMLButtonElement>;\n /**\n * The tooltip message to display when disabled\n */\n disabledTooltip?: string;\n /**\n * The background color when disabled\n *\n * @default 'unset'\n */\n disabledHoverColor?: Property.BackgroundColor;\n}\n\nconst _ButtonWithDisabledTooltip = forwardRef<HTMLButtonElement, ButtonWithDisabledTooltipProps>(\n ({disabledTooltip, disabled, onClick, disabledHoverColor: hoverColor = 'unset', ...others}, ref) =>\n disabledTooltip ? (\n <Tooltip label={disabledTooltip} disabled={!disabled}>\n <Box\n component=\"button\"\n ref={ref}\n {...(disabled ? {'data-disabled': true} : {})}\n sx={(theme) => ({\n '&[data-disabled]': {\n pointerEvents: 'all',\n color: theme.colors.gray[5],\n },\n '&[data-disabled]:hover': {\n backgroundColor: hoverColor,\n cursor: 'not-allowed',\n },\n })}\n onClick={(event) => {\n if (disabled) {\n event.preventDefault();\n event.stopPropagation();\n } else {\n onClick?.(event);\n }\n }}\n {...others}\n />\n </Tooltip>\n ) : (\n <Box component=\"button\" ref={ref} disabled={disabled} onClick={onClick} {...others} />\n )\n);\n\nexport const ButtonWithDisabledTooltip = createPolymorphicComponent<'button', ButtonWithDisabledTooltipProps>(\n _ButtonWithDisabledTooltip\n);\n"],"names":["Box","Tooltip","forwardRef","createPolymorphicComponent","_ButtonWithDisabledTooltip","ref","disabledTooltip","disabled","onClick","hoverColor","disabledHoverColor","others","label","component","sx","theme","pointerEvents","color","colors","gray","backgroundColor","cursor","event","preventDefault","stopPropagation","ButtonWithDisabledTooltip"],"mappings":"AAAA;;;;AAAA,SAAQA,GAAG,EAAEC,OAAO,QAAO,gBAAgB;AAE3C,SAAQC,UAAU,QAA0B,QAAQ;AAEpD,SAAQC,0BAA0B,QAAO,cAAc;AAiBvD,IAAMC,2CAA6BF,WAC/B,iBAA4FG;QAA1FC,yBAAAA,iBAAiBC,kBAAAA,UAAUC,iBAAAA,SAA6BC,aAApBC,oBAAoBD,aAAAA,iBAAa,UAAbA,KAAyBE;QAAjFL;QAAiBC;QAAUC;QAASE;;IAClCJ,OAAAA,gCACI,KAACL;QAAQW,OAAON;QAAiBC,UAAU,CAACA;kBACxC,cAAA,KAACP;YACGa,WAAU;YACVR,KAAKA;WACAE,WAAW;YAAC,iBAAiB,IAAI;QAAA,IAAI,CAAC,CAAC;YAC5CO,IAAI,SAACC;uBAAW;oBACZ,oBAAoB;wBAChBC,eAAe;wBACfC,OAAOF,MAAMG,MAAM,CAACC,IAAI,CAAC,EAAE;oBAC/B;oBACA,0BAA0B;wBACtBC,iBAAiBX;wBACjBY,QAAQ;oBACZ;gBACJ;;YACAb,SAAS,SAACc,OAAU;gBAChB,IAAIf,UAAU;oBACVe,MAAMC,cAAc;oBACpBD,MAAME,eAAe;gBACzB,OAAO;oBACHhB,oBAAAA,qBAAAA,KAAAA,IAAAA,QAAUc;gBACd,CAAC;YACL;YACIX;uBAIZ,KAACX;QAAIa,WAAU;QAASR,KAAKA;QAAKE,UAAUA;QAAUC,SAASA;OAAaG,QAC/E;;AAGT,OAAO,IAAMc,4BAA4BtB,2BACrCC,4BACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/button/index.ts"],"sourcesContent":["export * from './Button';\nexport {type ButtonWithDisabledTooltipProps} from './ButtonWithDisabledTooltip';\n"],"names":[],"mappings":"AAAA,cAAc,WAAW"}
|
|
@@ -3,9 +3,10 @@ import _object_spread_props from "@swc/helpers/src/_object_spread_props.mjs";
|
|
|
3
3
|
import _object_without_properties from "@swc/helpers/src/_object_without_properties.mjs";
|
|
4
4
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { AddSize16Px } from "@coveord/plasma-react-icons";
|
|
6
|
-
import { Box,
|
|
6
|
+
import { Box, Group, Input, Stack, Tooltip, useComponentDefaultProps } from "@mantine/core";
|
|
7
7
|
import { useDidUpdate, useId } from "@mantine/hooks";
|
|
8
8
|
import { DragDropContext, Droppable } from "react-beautiful-dnd";
|
|
9
|
+
import { Button } from "../button";
|
|
9
10
|
import useStyles from "./Collection.styles";
|
|
10
11
|
import { CollectionItem } from "./CollectionItem";
|
|
11
12
|
var defaultProps = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/collection/Collection.tsx"],"sourcesContent":["import {AddSize16Px} from '@coveord/plasma-react-icons';\nimport {\n Box,\n Button,\n DefaultProps,\n Group,\n Input,\n InputWrapperBaseProps,\n MantineNumberSize,\n Selectors,\n Stack,\n Tooltip,\n useComponentDefaultProps,\n} from '@mantine/core';\nimport {ReorderPayload} from '@mantine/form/lib/types';\nimport {useDidUpdate, useId} from '@mantine/hooks';\nimport {ReactNode} from 'react';\nimport {DragDropContext, Droppable} from 'react-beautiful-dnd';\n\nimport useStyles from './Collection.styles';\nimport {CollectionItem} from './CollectionItem';\n\ninterface CollectionProps<T>\n extends Omit<InputWrapperBaseProps, 'inputContainer' | 'inputWrapperOrder'>,\n DefaultProps<Selectors<typeof useStyles>> {\n /**\n * The default value each new item should have\n */\n newItem: T;\n /**\n * A render function called for each item passed in the `value` prop.\n *\n * @param item The current item's value\n * @param index The current item's index\n */\n children: (item: T, index: number) => ReactNode;\n /**\n * The list of items to display inside the collection\n *\n * @default []\n */\n value?: T[];\n /**\n * Unused, has no effect\n */\n onFocus?: () => void;\n /**\n * Function called whenever the value needs to be updated\n *\n * @param value The whole list of items after the change\n */\n onChange?: (value: T[]) => void;\n /**\n * Function called after an item is removed from the collection using the remove button\n *\n * @param itemIndex The index of the item that was removed\n */\n onRemoveItem?: (itemIndex: number) => void;\n /**\n * Function that gets called whenever a collection item needs to be reordered\n *\n * @param payload The origin and destination index of the item to reorder\n */\n onReorderItem?: (payload: ReorderPayload) => void;\n /**\n * Function that gets called when a new item needs to be added to the collection\n *\n * @param value The the value of the item to insert\n * @param index The index of the new item to insert\n */\n onInsertItem?: (value: T, index: number) => void;\n /**\n * Whether the collection should have drag and drop behavior enabled\n *\n * @default false\n */\n draggable?: boolean;\n /**\n * Whether the collection is disabled, or in other words in read only mode\n *\n * @default false\n */\n disabled?: boolean;\n /**\n * Function that determines if the add item button should be enabled given the current items of the collection.\n * The button is always enabled if this props remains undefined\n *\n * @param values The current items of the collection\n */\n allowAdd?: (values: T[]) => boolean;\n /**\n * The label of the add item button\n *\n * @default \"Add item\"\n */\n addLabel?: string;\n /**\n * The tooltip text displayed when hovering over the disabled add item button\n *\n * @default 'There is already an empty item'\n */\n addDisabledTooltip?: string;\n /**\n * The spacing between the colleciton items\n *\n * @default 'xs'\n */\n spacing?: MantineNumberSize;\n /**\n * Whether the collection is required. When required is true, the collection will hide the remove button if there is only one item\n *\n * @default false\n */\n required?: boolean;\n}\n\nconst defaultProps: Partial<CollectionProps<unknown>> = {\n draggable: false,\n addLabel: 'Add item',\n addDisabledTooltip: 'There is already an empty item',\n disabled: false,\n spacing: 'xs',\n required: false,\n};\n\nexport const Collection = <T,>(props: CollectionProps<T>) => {\n const {\n value,\n onChange,\n onRemoveItem,\n onReorderItem,\n onInsertItem,\n disabled,\n draggable,\n children,\n spacing,\n required,\n newItem,\n addLabel,\n addDisabledTooltip,\n allowAdd,\n label,\n labelProps,\n description,\n descriptionProps,\n error,\n errorProps,\n\n // Style props\n classNames,\n className,\n styles,\n unstyled,\n\n ...others\n } = useComponentDefaultProps('Collection', defaultProps as CollectionProps<T>, props);\n const {classes, cx} = useStyles(null, {classNames, name: 'Collection', styles, unstyled});\n const collectionID = useId('dnd-droppable');\n\n const hasOnlyOneItem = value.length === 1;\n\n /**\n * Enforcing onChange when the value is modified will make sure the errors are carried through.\n */\n useDidUpdate(() => {\n onChange?.(value);\n }, [JSON.stringify(value)]);\n\n const _label = label ? (\n <Input.Label required={required} {...labelProps}>\n {label}\n </Input.Label>\n ) : null;\n\n const _description = description ? (\n <Input.Description {...descriptionProps}>{description}</Input.Description>\n ) : null;\n const _error = error ? <Input.Error {...errorProps}>{error}</Input.Error> : null;\n const _header =\n _label || _description ? (\n <Box mb=\"sm\">\n {_label}\n {_description}\n </Box>\n ) : null;\n\n const items = value.map((item, index) => (\n <CollectionItem\n key={index}\n disabled={disabled}\n draggable={draggable}\n index={index}\n onRemove={() => onRemoveItem?.(index)}\n styles={styles}\n removable={!(required && hasOnlyOneItem)}\n >\n {children(item, index)}\n </CollectionItem>\n ));\n\n const addAllowed = allowAdd?.(value) ?? true;\n\n const _addButton = disabled ? null : (\n <Group>\n <Tooltip label={addDisabledTooltip} disabled={addAllowed}>\n <Box>\n <Button\n variant=\"subtle\"\n leftIcon={<AddSize16Px height={16} />}\n onClick={() => onInsertItem(newItem, value?.length ?? 0)}\n disabled={!addAllowed}\n >\n {addLabel}\n </Button>\n </Box>\n </Tooltip>\n </Group>\n );\n\n return (\n <DragDropContext\n onDragEnd={({destination, source}) => onReorderItem({from: source.index, to: destination?.index || 0})}\n >\n <Droppable direction=\"vertical\" droppableId={collectionID}>\n {(provided) => (\n <Box\n {...provided.droppableProps}\n ref={provided.innerRef}\n className={cx(classes.root, className)}\n {...others}\n >\n {_header}\n <Stack spacing={spacing}>\n {items}\n {provided.placeholder}\n {_addButton}\n {_error}\n </Stack>\n </Box>\n )}\n </Droppable>\n </DragDropContext>\n );\n};\n"],"names":["AddSize16Px","Box","Button","Group","Input","Stack","Tooltip","useComponentDefaultProps","useDidUpdate","useId","DragDropContext","Droppable","useStyles","CollectionItem","defaultProps","draggable","addLabel","addDisabledTooltip","disabled","spacing","required","Collection","props","value","onChange","onRemoveItem","onReorderItem","onInsertItem","children","newItem","allowAdd","label","labelProps","description","descriptionProps","error","errorProps","classNames","className","styles","unstyled","others","name","classes","cx","collectionID","hasOnlyOneItem","length","JSON","stringify","_label","Label","_description","Description","_error","Error","_header","mb","items","map","item","index","onRemove","removable","addAllowed","_addButton","variant","leftIcon","height","onClick","onDragEnd","destination","source","from","to","direction","droppableId","provided","droppableProps","ref","innerRef","root","placeholder"],"mappings":"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"}
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/collection/Collection.tsx"],"sourcesContent":["import {AddSize16Px} from '@coveord/plasma-react-icons';\nimport {\n Box,\n DefaultProps,\n Group,\n Input,\n InputWrapperBaseProps,\n MantineNumberSize,\n Selectors,\n Stack,\n Tooltip,\n useComponentDefaultProps,\n} from '@mantine/core';\nimport {ReorderPayload} from '@mantine/form/lib/types';\nimport {useDidUpdate, useId} from '@mantine/hooks';\nimport {ReactNode} from 'react';\nimport {DragDropContext, Droppable} from 'react-beautiful-dnd';\n\nimport {Button} from '../button';\nimport useStyles from './Collection.styles';\nimport {CollectionItem} from './CollectionItem';\n\ninterface CollectionProps<T>\n extends Omit<InputWrapperBaseProps, 'inputContainer' | 'inputWrapperOrder'>,\n DefaultProps<Selectors<typeof useStyles>> {\n /**\n * The default value each new item should have\n */\n newItem: T;\n /**\n * A render function called for each item passed in the `value` prop.\n *\n * @param item The current item's value\n * @param index The current item's index\n */\n children: (item: T, index: number) => ReactNode;\n /**\n * The list of items to display inside the collection\n *\n * @default []\n */\n value?: T[];\n /**\n * Unused, has no effect\n */\n onFocus?: () => void;\n /**\n * Function called whenever the value needs to be updated\n *\n * @param value The whole list of items after the change\n */\n onChange?: (value: T[]) => void;\n /**\n * Function called after an item is removed from the collection using the remove button\n *\n * @param itemIndex The index of the item that was removed\n */\n onRemoveItem?: (itemIndex: number) => void;\n /**\n * Function that gets called whenever a collection item needs to be reordered\n *\n * @param payload The origin and destination index of the item to reorder\n */\n onReorderItem?: (payload: ReorderPayload) => void;\n /**\n * Function that gets called when a new item needs to be added to the collection\n *\n * @param value The the value of the item to insert\n * @param index The index of the new item to insert\n */\n onInsertItem?: (value: T, index: number) => void;\n /**\n * Whether the collection should have drag and drop behavior enabled\n *\n * @default false\n */\n draggable?: boolean;\n /**\n * Whether the collection is disabled, or in other words in read only mode\n *\n * @default false\n */\n disabled?: boolean;\n /**\n * Function that determines if the add item button should be enabled given the current items of the collection.\n * The button is always enabled if this props remains undefined\n *\n * @param values The current items of the collection\n */\n allowAdd?: (values: T[]) => boolean;\n /**\n * The label of the add item button\n *\n * @default \"Add item\"\n */\n addLabel?: string;\n /**\n * The tooltip text displayed when hovering over the disabled add item button\n *\n * @default 'There is already an empty item'\n */\n addDisabledTooltip?: string;\n /**\n * The spacing between the colleciton items\n *\n * @default 'xs'\n */\n spacing?: MantineNumberSize;\n /**\n * Whether the collection is required. When required is true, the collection will hide the remove button if there is only one item\n *\n * @default false\n */\n required?: boolean;\n}\n\nconst defaultProps: Partial<CollectionProps<unknown>> = {\n draggable: false,\n addLabel: 'Add item',\n addDisabledTooltip: 'There is already an empty item',\n disabled: false,\n spacing: 'xs',\n required: false,\n};\n\nexport const Collection = <T,>(props: CollectionProps<T>) => {\n const {\n value,\n onChange,\n onRemoveItem,\n onReorderItem,\n onInsertItem,\n disabled,\n draggable,\n children,\n spacing,\n required,\n newItem,\n addLabel,\n addDisabledTooltip,\n allowAdd,\n label,\n labelProps,\n description,\n descriptionProps,\n error,\n errorProps,\n\n // Style props\n classNames,\n className,\n styles,\n unstyled,\n\n ...others\n } = useComponentDefaultProps('Collection', defaultProps as CollectionProps<T>, props);\n const {classes, cx} = useStyles(null, {classNames, name: 'Collection', styles, unstyled});\n const collectionID = useId('dnd-droppable');\n\n const hasOnlyOneItem = value.length === 1;\n\n /**\n * Enforcing onChange when the value is modified will make sure the errors are carried through.\n */\n useDidUpdate(() => {\n onChange?.(value);\n }, [JSON.stringify(value)]);\n\n const _label = label ? (\n <Input.Label required={required} {...labelProps}>\n {label}\n </Input.Label>\n ) : null;\n\n const _description = description ? (\n <Input.Description {...descriptionProps}>{description}</Input.Description>\n ) : null;\n const _error = error ? <Input.Error {...errorProps}>{error}</Input.Error> : null;\n const _header =\n _label || _description ? (\n <Box mb=\"sm\">\n {_label}\n {_description}\n </Box>\n ) : null;\n\n const items = value.map((item, index) => (\n <CollectionItem\n key={index}\n disabled={disabled}\n draggable={draggable}\n index={index}\n onRemove={() => onRemoveItem?.(index)}\n styles={styles}\n removable={!(required && hasOnlyOneItem)}\n >\n {children(item, index)}\n </CollectionItem>\n ));\n\n const addAllowed = allowAdd?.(value) ?? true;\n\n const _addButton = disabled ? null : (\n <Group>\n <Tooltip label={addDisabledTooltip} disabled={addAllowed}>\n <Box>\n <Button\n variant=\"subtle\"\n leftIcon={<AddSize16Px height={16} />}\n onClick={() => onInsertItem(newItem, value?.length ?? 0)}\n disabled={!addAllowed}\n >\n {addLabel}\n </Button>\n </Box>\n </Tooltip>\n </Group>\n );\n\n return (\n <DragDropContext\n onDragEnd={({destination, source}) => onReorderItem({from: source.index, to: destination?.index || 0})}\n >\n <Droppable direction=\"vertical\" droppableId={collectionID}>\n {(provided) => (\n <Box\n {...provided.droppableProps}\n ref={provided.innerRef}\n className={cx(classes.root, className)}\n {...others}\n >\n {_header}\n <Stack spacing={spacing}>\n {items}\n {provided.placeholder}\n {_addButton}\n {_error}\n </Stack>\n </Box>\n )}\n </Droppable>\n </DragDropContext>\n );\n};\n"],"names":["AddSize16Px","Box","Group","Input","Stack","Tooltip","useComponentDefaultProps","useDidUpdate","useId","DragDropContext","Droppable","Button","useStyles","CollectionItem","defaultProps","draggable","addLabel","addDisabledTooltip","disabled","spacing","required","Collection","props","value","onChange","onRemoveItem","onReorderItem","onInsertItem","children","newItem","allowAdd","label","labelProps","description","descriptionProps","error","errorProps","classNames","className","styles","unstyled","others","name","classes","cx","collectionID","hasOnlyOneItem","length","JSON","stringify","_label","Label","_description","Description","_error","Error","_header","mb","items","map","item","index","onRemove","removable","addAllowed","_addButton","variant","leftIcon","height","onClick","onDragEnd","destination","source","from","to","direction","droppableId","provided","droppableProps","ref","innerRef","root","placeholder"],"mappings":"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"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import _object_spread from "@swc/helpers/src/_object_spread.mjs";
|
|
2
2
|
import _object_spread_props from "@swc/helpers/src/_object_spread_props.mjs";
|
|
3
3
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
4
|
-
import {
|
|
4
|
+
import { Center, Group, Space } from "@mantine/core";
|
|
5
5
|
import { RangeCalendar } from "@mantine/dates";
|
|
6
6
|
import { useForm } from "@mantine/form";
|
|
7
|
+
import { Button } from "../button";
|
|
7
8
|
import { DateRangePickerPresetSelect } from "./DateRangePickerPresetSelect";
|
|
8
9
|
import { EditableDateRangePicker } from "./EditableDateRangePicker";
|
|
9
10
|
export var DateRangePickerInlineCalendar = function(param) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/date-range-picker/DateRangePickerInlineCalendar.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/date-range-picker/DateRangePickerInlineCalendar.tsx"],"sourcesContent":["import {Center, Group, Space} from '@mantine/core';\nimport {DateRangePickerValue, RangeCalendar, RangeCalendarProps} from '@mantine/dates';\nimport {useForm} from '@mantine/form';\n\nimport {Button} from '../button';\nimport {DateRangePickerPreset, DateRangePickerPresetSelect} from './DateRangePickerPresetSelect';\nimport {EditableDateRangePicker, EditableDateRangePickerProps} from './EditableDateRangePicker';\n\nexport interface DateRangePickerInlineCalendarProps\n extends Pick<EditableDateRangePickerProps, 'startProps' | 'endProps'> {\n /**\n * Initial selected range\n */\n initialRange: DateRangePickerValue;\n /**\n * Function called when the user applies the new date range\n *\n * @param range the newly selected dates\n */\n onApply: (range: DateRangePickerValue) => void;\n /**\n * Function called when the user click on the cancel button\n */\n onCancel: () => void;\n /**\n * The presets to display\n *\n * @default {}\n * @example\n * {\n * january: {label: 'January', range: [new Date(2022, 0, 1), new Date(2022, 0, 31)]},\n * february: {label: 'February', range: [new Date(2022, 1, 1), new Date(2022, 1, 28)]}\n * }\n */\n presets?: Record<string, DateRangePickerPreset>;\n /**\n * Props for RangeCalendar displayed in the popover\n */\n rangeCalendarProps?: Omit<RangeCalendarProps, 'value' | 'onChange'>;\n}\n\nexport const DateRangePickerInlineCalendar = ({\n initialRange,\n onApply,\n onCancel,\n presets,\n startProps,\n endProps,\n rangeCalendarProps,\n}: DateRangePickerInlineCalendarProps) => {\n const form = useForm({\n initialValues: {\n dates: initialRange,\n },\n });\n const calendarInputProps = form.getInputProps('dates');\n\n const onCalendarApply = () => {\n if (!form.values.dates[1]) {\n form.values.dates[1] = form.values.dates[0]; // when date range is the same day\n }\n onApply(form.values.dates);\n };\n\n return (\n <>\n <Group\n align=\"center\"\n spacing=\"xs\"\n grow\n px=\"md\"\n py=\"sm\"\n sx={(theme) => ({\n borderBottom: `1px solid ${theme.colors.gray[2]}`,\n })}\n >\n <EditableDateRangePicker {...calendarInputProps} startProps={startProps} endProps={endProps} />\n {presets ? (\n <>\n <Space w=\"sm\" />\n <DateRangePickerPresetSelect presets={presets} {...calendarInputProps} />\n </>\n ) : null}\n </Group>\n\n <Center py=\"sm\" px=\"md\">\n <RangeCalendar\n amountOfMonths={2}\n styles={{cell: {textAlign: 'center'}}}\n firstDayOfWeek=\"sunday\"\n allowSingleDateInRange\n {...rangeCalendarProps}\n {...calendarInputProps}\n />\n </Center>\n\n <Group\n position=\"right\"\n spacing=\"xs\"\n px=\"md\"\n py=\"sm\"\n sx={(theme) => ({\n borderTop: `1px solid ${theme.colors.gray[2]}`,\n })}\n >\n <Button size=\"xs\" onClick={onCalendarApply}>\n Apply\n </Button>\n <Button variant=\"outline\" size=\"xs\" onClick={onCancel}>\n Cancel\n </Button>\n </Group>\n </>\n );\n};\n"],"names":["Center","Group","Space","RangeCalendar","useForm","Button","DateRangePickerPresetSelect","EditableDateRangePicker","DateRangePickerInlineCalendar","initialRange","onApply","onCancel","presets","startProps","endProps","rangeCalendarProps","form","initialValues","dates","calendarInputProps","getInputProps","onCalendarApply","values","align","spacing","grow","px","py","sx","theme","borderBottom","colors","gray","w","amountOfMonths","styles","cell","textAlign","firstDayOfWeek","allowSingleDateInRange","position","borderTop","size","onClick","variant"],"mappings":"AAAA;;;AAAA,SAAQA,MAAM,EAAEC,KAAK,EAAEC,KAAK,QAAO,gBAAgB;AACnD,SAA8BC,aAAa,QAA2B,iBAAiB;AACvF,SAAQC,OAAO,QAAO,gBAAgB;AAEtC,SAAQC,MAAM,QAAO,YAAY;AACjC,SAA+BC,2BAA2B,QAAO,gCAAgC;AACjG,SAAQC,uBAAuB,QAAqC,4BAA4B;AAmChG,OAAO,IAAMC,gCAAgC,gBAQH;QAPtCC,qBAAAA,cACAC,gBAAAA,SACAC,iBAAAA,UACAC,gBAAAA,SACAC,mBAAAA,YACAC,iBAAAA,UACAC,2BAAAA;IAEA,IAAMC,OAAOZ,QAAQ;QACjBa,eAAe;YACXC,OAAOT;QACX;IACJ;IACA,IAAMU,qBAAqBH,KAAKI,aAAa,CAAC;IAE9C,IAAMC,kBAAkB,WAAM;QAC1B,IAAI,CAACL,KAAKM,MAAM,CAACJ,KAAK,CAAC,EAAE,EAAE;YACvBF,KAAKM,MAAM,CAACJ,KAAK,CAAC,EAAE,GAAGF,KAAKM,MAAM,CAACJ,KAAK,CAAC,EAAE,EAAE,kCAAkC;QACnF,CAAC;QACDR,QAAQM,KAAKM,MAAM,CAACJ,KAAK;IAC7B;IAEA,qBACI;;0BACI,MAACjB;gBACGsB,OAAM;gBACNC,SAAQ;gBACRC,IAAI;gBACJC,IAAG;gBACHC,IAAG;gBACHC,IAAI,SAACC;2BAAW;wBACZC,cAAc,AAAC,aAAiC,OAArBD,MAAME,MAAM,CAACC,IAAI,CAAC,EAAE;oBACnD;;;kCAEA,KAACzB,iEAA4BY;wBAAoBN,YAAYA;wBAAYC,UAAUA;;oBAClFF,wBACG;;0CACI,KAACV;gCAAM+B,GAAE;;0CACT,KAAC3B;gCAA4BM,SAASA;+BAAaO;;yBAEvD,IAAI;;;0BAGZ,KAACnB;gBAAO2B,IAAG;gBAAKD,IAAG;0BACf,cAAA,KAACvB;oBACG+B,gBAAgB;oBAChBC,QAAQ;wBAACC,MAAM;4BAACC,WAAW;wBAAQ;oBAAC;oBACpCC,gBAAe;oBACfC,sBAAsB;mBAClBxB,oBACAI;;0BAIZ,MAAClB;gBACGuC,UAAS;gBACThB,SAAQ;gBACRE,IAAG;gBACHC,IAAG;gBACHC,IAAI,SAACC;2BAAW;wBACZY,WAAW,AAAC,aAAiC,OAArBZ,MAAME,MAAM,CAACC,IAAI,CAAC,EAAE;oBAChD;;;kCAEA,KAAC3B;wBAAOqC,MAAK;wBAAKC,SAAStB;kCAAiB;;kCAG5C,KAAChB;wBAAOuC,SAAQ;wBAAUF,MAAK;wBAAKC,SAAShC;kCAAU;;;;;;AAMvE,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/index.ts"],"sourcesContent":["export * from './blank-slate';\nexport * from './code-editor';\nexport * from './collection';\nexport * from './date-range-picker';\nexport * from './sticky-footer';\nexport * from './header';\nexport * from './inline-confirm';\nexport * from './table';\nexport * from './prompt';\nexport * from './modal';\nexport * from './modal-wizard';\n"],"names":[],"mappings":"AAAA,cAAc,gBAAgB;AAC9B,cAAc,gBAAgB;AAC9B,cAAc,eAAe;AAC7B,cAAc,sBAAsB;AACpC,cAAc,kBAAkB;AAChC,cAAc,WAAW;AACzB,cAAc,mBAAmB;AACjC,cAAc,UAAU;AACxB,cAAc,WAAW;AACzB,cAAc,UAAU;AACxB,cAAc,iBAAiB"}
|
|
1
|
+
{"version":3,"sources":["../../../src/components/index.ts"],"sourcesContent":["export * from './blank-slate';\nexport * from './code-editor';\nexport * from './collection';\nexport * from './date-range-picker';\nexport * from './sticky-footer';\nexport * from './header';\nexport * from './inline-confirm';\nexport * from './table';\nexport * from './prompt';\nexport * from './modal';\nexport * from './modal-wizard';\nexport * from './button';\nexport * from './menu';\n"],"names":[],"mappings":"AAAA,cAAc,gBAAgB;AAC9B,cAAc,gBAAgB;AAC9B,cAAc,eAAe;AAC7B,cAAc,sBAAsB;AACpC,cAAc,kBAAkB;AAChC,cAAc,WAAW;AACzB,cAAc,mBAAmB;AACjC,cAAc,UAAU;AACxB,cAAc,WAAW;AACzB,cAAc,UAAU;AACxB,cAAc,iBAAiB;AAC/B,cAAc,WAAW;AACzB,cAAc,SAAS"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _object_spread from "@swc/helpers/src/_object_spread.mjs";
|
|
2
2
|
import _object_spread_props from "@swc/helpers/src/_object_spread_props.mjs";
|
|
3
3
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
-
import { Button } from "
|
|
4
|
+
import { Button } from "../button";
|
|
5
5
|
import { useInlineConfirm } from "./useInlineConfirm";
|
|
6
6
|
export var InlineConfirmButton = function(props) {
|
|
7
7
|
var setConfirmingId = useInlineConfirm().setConfirmingId;
|
|
@@ -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 {HTMLAttributes, MouseEventHandler} from 'react';\n\nimport {Button, ButtonProps} from '../button';\nimport {useInlineConfirm} from './useInlineConfirm';\n\ninterface InlineConfirmButtonProps extends ButtonProps, Omit<HTMLAttributes<HTMLButtonElement>, 'color'> {\n id: string;\n}\n\nexport const InlineConfirmButton = (props: InlineConfirmButtonProps) => {\n const {setConfirmingId} = useInlineConfirm();\n const onClick: MouseEventHandler<HTMLButtonElement> = (e) => {\n setConfirmingId(props.id);\n props.onClick?.(e);\n };\n\n return <Button {...props} onClick={onClick} />;\n};\n"],"names":["Button","useInlineConfirm","InlineConfirmButton","props","setConfirmingId","onClick","e","id"],"mappings":"AAAA;;;AAEA,SAAQA,MAAM,QAAoB,YAAY;AAC9C,SAAQC,gBAAgB,QAAO,qBAAqB;AAMpD,OAAO,IAAMC,sBAAsB,SAACC,OAAoC;IACpE,IAAM,AAACC,kBAAmBH,mBAAnBG;IACP,IAAMC,UAAgD,SAACC,GAAM;YAEzDH;QADAC,gBAAgBD,MAAMI,EAAE;QACxBJ,CAAAA,iBAAAA,MAAME,OAAO,cAAbF,4BAAAA,KAAAA,IAAAA,eAAAA,KAAAA,OAAgBG;IACpB;IAEA,qBAAO,KAACN,gDAAWG;QAAOE,SAASA;;AACvC,EAAE"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { Group } from "@mantine/core";
|
|
3
3
|
import { useEffect } from "react";
|
|
4
|
+
import { Button } from "../button";
|
|
4
5
|
import { useInlineConfirm } from "./useInlineConfirm";
|
|
5
6
|
export var InlineConfirmPrompt = function(param) {
|
|
6
7
|
var id = param.id, label = param.label, _param_confirmLabel = param.confirmLabel, confirmLabel = _param_confirmLabel === void 0 ? "Delete" : _param_confirmLabel, _param_cancelLabel = param.cancelLabel, cancelLabel = _param_cancelLabel === void 0 ? "Cancel" : _param_cancelLabel, onConfirm = param.onConfirm;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/inline-confirm/InlineConfirmPrompt.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/inline-confirm/InlineConfirmPrompt.tsx"],"sourcesContent":["import {Group} from '@mantine/core';\nimport {FunctionComponent, ReactNode, useEffect} from 'react';\n\nimport {Button} from '../button';\nimport {useInlineConfirm} from './useInlineConfirm';\n\ninterface InlineConfirmPromptProps {\n id: string;\n label: ReactNode;\n onConfirm: () => void;\n confirmLabel?: ReactNode;\n cancelLabel?: ReactNode;\n}\n\nexport const InlineConfirmPrompt: FunctionComponent<InlineConfirmPromptProps> = ({\n id,\n label,\n confirmLabel = 'Delete',\n cancelLabel = 'Cancel',\n onConfirm,\n}) => {\n const {confirmingId, clearConfirm} = useInlineConfirm();\n\n const onClickConfirm = () => {\n onConfirm();\n clearConfirm();\n };\n\n useEffect(() => {\n if (confirmingId !== id) {\n clearConfirm();\n }\n }, []);\n\n if (confirmingId === id) {\n return (\n <Group spacing=\"xs\">\n {label}\n <Button onClick={onClickConfirm} color=\"red\">\n {confirmLabel}\n </Button>\n <Button onClick={clearConfirm} variant=\"outline\">\n {cancelLabel}\n </Button>\n </Group>\n );\n }\n return null;\n};\n"],"names":["Group","useEffect","Button","useInlineConfirm","InlineConfirmPrompt","id","label","confirmLabel","cancelLabel","onConfirm","confirmingId","clearConfirm","onClickConfirm","spacing","onClick","color","variant"],"mappings":"AAAA;AAAA,SAAQA,KAAK,QAAO,gBAAgB;AACpC,SAAsCC,SAAS,QAAO,QAAQ;AAE9D,SAAQC,MAAM,QAAO,YAAY;AACjC,SAAQC,gBAAgB,QAAO,qBAAqB;AAUpD,OAAO,IAAMC,sBAAmE,gBAM1E;QALFC,WAAAA,IACAC,cAAAA,mCACAC,cAAAA,gDAAe,2DACfC,aAAAA,8CAAc,+BACdC,kBAAAA;IAEA,IAAqCN,oBAAAA,oBAA9BO,eAA8BP,kBAA9BO,cAAcC,eAAgBR,kBAAhBQ;IAErB,IAAMC,iBAAiB,WAAM;QACzBH;QACAE;IACJ;IAEAV,UAAU,WAAM;QACZ,IAAIS,iBAAiBL,IAAI;YACrBM;QACJ,CAAC;IACL,GAAG,EAAE;IAEL,IAAID,iBAAiBL,IAAI;QACrB,qBACI,MAACL;YAAMa,SAAQ;;gBACVP;8BACD,KAACJ;oBAAOY,SAASF;oBAAgBG,OAAM;8BAClCR;;8BAEL,KAACL;oBAAOY,SAASH;oBAAcK,SAAQ;8BAClCR;;;;IAIjB,CAAC;IACD,OAAO,IAAI;AACf,EAAE"}
|