@coveord/plasma-mantine 55.1.0 → 55.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +3 -3
- package/.turbo/turbo-test.log +43 -35
- package/dist/.tsbuildinfo +1 -1
- package/dist/cjs/components/child-form/ChildForm.d.ts +44 -0
- package/dist/cjs/components/child-form/ChildForm.d.ts.map +1 -0
- package/dist/cjs/components/child-form/ChildForm.js +73 -0
- package/dist/cjs/components/child-form/ChildForm.js.map +1 -0
- package/dist/cjs/components/child-form/ChildForm.module.css +7 -0
- package/dist/cjs/components/child-form/index.d.ts +2 -0
- package/dist/cjs/components/child-form/index.d.ts.map +1 -0
- package/dist/cjs/components/child-form/index.js +8 -0
- package/dist/cjs/components/child-form/index.js.map +1 -0
- package/dist/cjs/components/ellipsis-text/EllipsisText.js +2 -2
- package/dist/cjs/components/ellipsis-text/EllipsisText.js.map +1 -1
- package/dist/cjs/components/ellipsis-text/EllipsisText.module.css +5 -0
- package/dist/cjs/components/index.d.ts +1 -0
- package/dist/cjs/components/index.d.ts.map +1 -1
- package/dist/cjs/components/index.js +1 -0
- package/dist/cjs/components/index.js.map +1 -1
- package/dist/cjs/components/table/table-predicate/TablePredicate.d.ts +1 -1
- package/dist/cjs/components/table/table-predicate/TablePredicate.d.ts.map +1 -1
- package/dist/cjs/components/table/table-predicate/TablePredicate.js +6 -4
- package/dist/cjs/components/table/table-predicate/TablePredicate.js.map +1 -1
- package/dist/cjs/theme/Theme.d.ts.map +1 -1
- package/dist/cjs/theme/Theme.js +1 -2
- package/dist/cjs/theme/Theme.js.map +1 -1
- package/dist/esm/components/child-form/ChildForm.d.ts +44 -0
- package/dist/esm/components/child-form/ChildForm.d.ts.map +1 -0
- package/dist/esm/components/child-form/ChildForm.js +50 -0
- package/dist/esm/components/child-form/ChildForm.js.map +1 -0
- package/dist/esm/components/child-form/ChildForm.module.css +7 -0
- package/dist/esm/components/child-form/index.d.ts +2 -0
- package/dist/esm/components/child-form/index.d.ts.map +1 -0
- package/dist/esm/components/child-form/index.js +3 -0
- package/dist/esm/components/child-form/index.js.map +1 -0
- package/dist/esm/components/ellipsis-text/EllipsisText.js +2 -2
- package/dist/esm/components/ellipsis-text/EllipsisText.js.map +1 -1
- package/dist/esm/components/ellipsis-text/EllipsisText.module.css +5 -0
- package/dist/esm/components/index.d.ts +1 -0
- package/dist/esm/components/index.d.ts.map +1 -1
- package/dist/esm/components/index.js +1 -0
- package/dist/esm/components/index.js.map +1 -1
- package/dist/esm/components/table/table-predicate/TablePredicate.d.ts +1 -1
- package/dist/esm/components/table/table-predicate/TablePredicate.d.ts.map +1 -1
- package/dist/esm/components/table/table-predicate/TablePredicate.js +4 -2
- package/dist/esm/components/table/table-predicate/TablePredicate.js.map +1 -1
- package/dist/esm/theme/Theme.d.ts.map +1 -1
- package/dist/esm/theme/Theme.js +1 -2
- package/dist/esm/theme/Theme.js.map +1 -1
- package/package.json +19 -19
- package/src/components/child-form/ChildForm.module.css +7 -0
- package/src/components/child-form/ChildForm.tsx +70 -0
- package/src/components/child-form/__tests__/ChildForm.spec.tsx +30 -0
- package/src/components/child-form/index.ts +1 -0
- package/src/components/ellipsis-text/EllipsisText.module.css +5 -0
- package/src/components/ellipsis-text/EllipsisText.tsx +2 -2
- package/src/components/index.ts +1 -0
- package/src/components/table/table-predicate/TablePredicate.tsx +5 -8
- package/src/theme/Theme.tsx +1 -2
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { CollapseProps, Factory, StylesApiProps } from '@mantine/core';
|
|
2
|
+
export type ChildFormStylesNames = 'root' | 'paper';
|
|
3
|
+
export interface ChildFormProps extends CollapseProps, StylesApiProps<ChildFormFactory> {
|
|
4
|
+
/**
|
|
5
|
+
* Title of the child form.
|
|
6
|
+
*/
|
|
7
|
+
title?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Description of the child form.
|
|
10
|
+
*/
|
|
11
|
+
description?: string;
|
|
12
|
+
}
|
|
13
|
+
type ChildFormFactory = Factory<{
|
|
14
|
+
props: ChildFormProps;
|
|
15
|
+
defaultRef: HTMLDivElement;
|
|
16
|
+
defaultComponent: 'div';
|
|
17
|
+
stylesNames: ChildFormStylesNames;
|
|
18
|
+
}>;
|
|
19
|
+
export declare const ChildForm: (<C = "div">(props: import("@mantine/core").PolymorphicComponentProps<C, ChildFormProps>) => React.ReactElement) & Omit<import("react").FunctionComponent<(ChildFormProps & {
|
|
20
|
+
component?: any;
|
|
21
|
+
} & Omit<Omit<any, "ref">, "component" | keyof ChildFormProps> & {
|
|
22
|
+
ref?: any;
|
|
23
|
+
renderRoot?: ((props: any) => any) | undefined;
|
|
24
|
+
}) | (ChildFormProps & {
|
|
25
|
+
component: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements>;
|
|
26
|
+
renderRoot?: ((props: Record<string, any>) => any) | undefined;
|
|
27
|
+
})>, never> & import("@mantine/core/lib/core/factory/factory").ThemeExtend<{
|
|
28
|
+
props: ChildFormProps;
|
|
29
|
+
defaultRef: HTMLDivElement;
|
|
30
|
+
defaultComponent: "div";
|
|
31
|
+
stylesNames: ChildFormStylesNames;
|
|
32
|
+
}> & import("@mantine/core/lib/core/factory/factory").ComponentClasses<{
|
|
33
|
+
props: ChildFormProps;
|
|
34
|
+
defaultRef: HTMLDivElement;
|
|
35
|
+
defaultComponent: "div";
|
|
36
|
+
stylesNames: ChildFormStylesNames;
|
|
37
|
+
}> & import("@mantine/core/lib/core/factory/polymorphic-factory").PolymorphicComponentWithProps<{
|
|
38
|
+
props: ChildFormProps;
|
|
39
|
+
defaultRef: HTMLDivElement;
|
|
40
|
+
defaultComponent: "div";
|
|
41
|
+
stylesNames: ChildFormStylesNames;
|
|
42
|
+
}>;
|
|
43
|
+
export {};
|
|
44
|
+
//# sourceMappingURL=ChildForm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChildForm.d.ts","sourceRoot":"","sources":["../../../../src/components/child-form/ChildForm.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEH,aAAa,EACb,OAAO,EAIP,cAAc,EAKjB,MAAM,eAAe,CAAC;AAGvB,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG,OAAO,CAAC;AAEpD,MAAM,WAAW,cAAe,SAAQ,aAAa,EAAE,cAAc,CAAC,gBAAgB,CAAC;IACnF;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,KAAK,gBAAgB,GAAG,OAAO,CAAC;IAC5B,KAAK,EAAE,cAAc,CAAC;IACtB,UAAU,EAAE,cAAc,CAAC;IAC3B,gBAAgB,EAAE,KAAK,CAAC;IACxB,WAAW,EAAE,oBAAoB,CAAC;CACrC,CAAC,CAAC;AAIH,eAAO,MAAM,SAAS,+FAClB,MAAE,YAAY;;;;;;sBAST,OACR,gCAEO,OAAF;;;WArBK,cAAc;gBACT,cAAc;sBACR,KAAK;iBACV,oBAAoB;;WAH1B,cAAc;gBACT,cAAc;sBACR,KAAK;iBACV,oBAAoB;;WAH1B,cAAc;gBACT,cAAc;sBACR,KAAK;iBACV,oBAAoB;EAqCnC,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "ChildForm", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return ChildForm;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
var _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
12
|
+
var _object_spread = require("@swc/helpers/_/_object_spread");
|
|
13
|
+
var _object_spread_props = require("@swc/helpers/_/_object_spread_props");
|
|
14
|
+
var _object_without_properties = require("@swc/helpers/_/_object_without_properties");
|
|
15
|
+
var _jsxruntime = require("react/jsx-runtime");
|
|
16
|
+
var _core = require("@mantine/core");
|
|
17
|
+
var _ChildFormmodulecss = /*#__PURE__*/ _interop_require_default._(require("./ChildForm.module.css"));
|
|
18
|
+
var defaultProps = {};
|
|
19
|
+
var ChildForm = (0, _core.polymorphicFactory)(function(props, ref) {
|
|
20
|
+
var _useProps = (0, _core.useProps)('ChildForm', defaultProps, props), className = _useProps.className, children = _useProps.children, style = _useProps.style, classNames = _useProps.classNames, styles = _useProps.styles, unstyled = _useProps.unstyled, vars = _useProps.vars, title = _useProps.title, description = _useProps.description, others = _object_without_properties._(_useProps, [
|
|
21
|
+
"className",
|
|
22
|
+
"children",
|
|
23
|
+
"style",
|
|
24
|
+
"classNames",
|
|
25
|
+
"styles",
|
|
26
|
+
"unstyled",
|
|
27
|
+
"vars",
|
|
28
|
+
"title",
|
|
29
|
+
"description"
|
|
30
|
+
]);
|
|
31
|
+
var getStyles = (0, _core.useStyles)({
|
|
32
|
+
name: 'ChildForm',
|
|
33
|
+
classes: _ChildFormmodulecss.default,
|
|
34
|
+
props: props,
|
|
35
|
+
className: className,
|
|
36
|
+
style: style,
|
|
37
|
+
classNames: classNames,
|
|
38
|
+
styles: styles,
|
|
39
|
+
unstyled: unstyled,
|
|
40
|
+
vars: vars
|
|
41
|
+
});
|
|
42
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_core.Collapse, _object_spread_props._(_object_spread._({
|
|
43
|
+
ref: ref
|
|
44
|
+
}, others, getStyles('root')), {
|
|
45
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_core.Paper, _object_spread_props._(_object_spread._({
|
|
46
|
+
bg: "gray.0",
|
|
47
|
+
p: "md"
|
|
48
|
+
}, getStyles('paper')), {
|
|
49
|
+
children: [
|
|
50
|
+
(title || description) && /*#__PURE__*/ (0, _jsxruntime.jsxs)(_core.Stack, {
|
|
51
|
+
gap: 0,
|
|
52
|
+
mb: "md",
|
|
53
|
+
children: [
|
|
54
|
+
title && /*#__PURE__*/ (0, _jsxruntime.jsx)(_core.Title, {
|
|
55
|
+
order: 5,
|
|
56
|
+
children: title
|
|
57
|
+
}),
|
|
58
|
+
description && /*#__PURE__*/ (0, _jsxruntime.jsx)(_core.Text, {
|
|
59
|
+
c: "gray.7",
|
|
60
|
+
children: description
|
|
61
|
+
})
|
|
62
|
+
]
|
|
63
|
+
}),
|
|
64
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_core.Stack, {
|
|
65
|
+
gap: "md",
|
|
66
|
+
children: children
|
|
67
|
+
})
|
|
68
|
+
]
|
|
69
|
+
}))
|
|
70
|
+
}));
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
//# sourceMappingURL=ChildForm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/child-form/ChildForm.tsx"],"sourcesContent":["import {\n Collapse,\n CollapseProps,\n Factory,\n Paper,\n polymorphicFactory,\n Stack,\n StylesApiProps,\n Text,\n Title,\n useProps,\n useStyles,\n} from '@mantine/core';\nimport classes from './ChildForm.module.css';\n\nexport type ChildFormStylesNames = 'root' | 'paper';\n\nexport interface ChildFormProps extends CollapseProps, StylesApiProps<ChildFormFactory> {\n /**\n * Title of the child form.\n */\n title?: string;\n /**\n * Description of the child form.\n */\n description?: string;\n}\n\ntype ChildFormFactory = Factory<{\n props: ChildFormProps;\n defaultRef: HTMLDivElement;\n defaultComponent: 'div';\n stylesNames: ChildFormStylesNames;\n}>;\n\nconst defaultProps: Partial<ChildFormProps> = {};\n\nexport const ChildForm = polymorphicFactory<ChildFormFactory>((props, ref) => {\n const {className, children, style, classNames, styles, unstyled, vars, title, description, ...others} = useProps(\n 'ChildForm',\n defaultProps,\n props,\n );\n\n const getStyles = useStyles<ChildFormFactory>({\n name: 'ChildForm',\n classes,\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n vars,\n });\n\n return (\n <Collapse ref={ref} {...others} {...getStyles('root')}>\n <Paper bg=\"gray.0\" p=\"md\" {...getStyles('paper')}>\n {(title || description) && (\n <Stack gap={0} mb=\"md\">\n {title && <Title order={5}>{title}</Title>}\n {description && <Text c=\"gray.7\">{description}</Text>}\n </Stack>\n )}\n <Stack gap=\"md\">{children}</Stack>\n </Paper>\n </Collapse>\n );\n});\n"],"names":["ChildForm","defaultProps","polymorphicFactory","props","ref","useProps","className","children","style","classNames","styles","unstyled","vars","title","description","others","getStyles","useStyles","name","classes","Collapse","Paper","bg","p","Stack","gap","mb","Title","order","Text","c"],"mappings":";;;;+BAqCaA;;;eAAAA;;;;;;;;oBAzBN;2EACa;AAsBpB,IAAMC,eAAwC,CAAC;AAExC,IAAMD,YAAYE,IAAAA,wBAAkB,EAAmB,SAACC,OAAOC;IAClE,IAAwGC,YAAAA,IAAAA,cAAQ,EAC5G,aACAJ,cACAE,QAHGG,YAAiGD,UAAjGC,WAAWC,WAAsFF,UAAtFE,UAAUC,QAA4EH,UAA5EG,OAAOC,aAAqEJ,UAArEI,YAAYC,SAAyDL,UAAzDK,QAAQC,WAAiDN,UAAjDM,UAAUC,OAAuCP,UAAvCO,MAAMC,QAAiCR,UAAjCQ,OAAOC,cAA0BT,UAA1BS,aAAgBC,sCAAUV;QAAjGC;QAAWC;QAAUC;QAAOC;QAAYC;QAAQC;QAAUC;QAAMC;QAAOC;;IAM9E,IAAME,YAAYC,IAAAA,eAAS,EAAmB;QAC1CC,MAAM;QACNC,SAAAA,2BAAO;QACPhB,OAAAA;QACAG,WAAAA;QACAE,OAAAA;QACAC,YAAAA;QACAC,QAAAA;QACAC,UAAAA;QACAC,MAAAA;IACJ;IAEA,qBACI,qBAACQ,cAAQ;QAAChB,KAAKA;OAASW,QAAYC,UAAU;kBAC1C,cAAA,sBAACK,WAAK;YAACC,IAAG;YAASC,GAAE;WAASP,UAAU;;gBAClCH,CAAAA,SAASC,WAAU,mBACjB,sBAACU,WAAK;oBAACC,KAAK;oBAAGC,IAAG;;wBACbb,uBAAS,qBAACc,WAAK;4BAACC,OAAO;sCAAIf;;wBAC3BC,6BAAe,qBAACe,UAAI;4BAACC,GAAE;sCAAUhB;;;;8BAG1C,qBAACU,WAAK;oBAACC,KAAI;8BAAMlB;;;;;AAIjC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/child-form/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/child-form/index.ts"],"sourcesContent":["export * from './ChildForm';\n"],"names":[],"mappings":";;;;;uBAAc"}
|
|
@@ -62,8 +62,6 @@ var EllipsisText = (0, _core.polymorphicFactory)(function(props, ref) {
|
|
|
62
62
|
onMouseLeave: function() {
|
|
63
63
|
return setShowTooltip(false);
|
|
64
64
|
},
|
|
65
|
-
display: "flex",
|
|
66
|
-
w: "100%",
|
|
67
65
|
className: (0, _clsx.default)(rootClass, _define_property._({}, _EllipsisTextmodulecss.default.noWrap, !lineClamp))
|
|
68
66
|
}, rootStyles, others), {
|
|
69
67
|
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_core.Tooltip, _object_spread_props._(_object_spread._({
|
|
@@ -71,6 +69,8 @@ var EllipsisText = (0, _core.polymorphicFactory)(function(props, ref) {
|
|
|
71
69
|
opened: showTooltip
|
|
72
70
|
}, tooltipProps, getStyles('tooltip')), {
|
|
73
71
|
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_core.Text, _object_spread_props._(_object_spread._({
|
|
72
|
+
span: true,
|
|
73
|
+
inherit: true,
|
|
74
74
|
variant: variant,
|
|
75
75
|
ref: textRef,
|
|
76
76
|
className: (0, _clsx.default)(textClass, _define_property._({}, _EllipsisTextmodulecss.default.ellipsis, !lineClamp))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/ellipsis-text/EllipsisText.tsx"],"sourcesContent":["import {\n Box,\n type BoxProps,\n type Factory,\n polymorphicFactory,\n type StylesApiProps,\n Text,\n type TextProps,\n Tooltip,\n type TooltipProps,\n useProps,\n useStyles,\n} from '@mantine/core';\nimport {ReactNode, useRef, useState} from 'react';\nimport clsx from 'clsx';\nimport classes from './EllipsisText.module.css';\n\nexport type EllipsisTextStylesNames = 'root' | 'tooltip' | 'text';\n\nexport interface EllipsisTextProps\n extends BoxProps,\n Pick<TextProps, 'variant' | 'lineClamp'>,\n Omit<StylesApiProps<EllipsisTextFactory>, 'variant'> {\n children: ReactNode;\n tooltipProps?: Partial<Omit<TooltipProps, 'label' | 'opened' | 'children'>>;\n}\n\ntype EllipsisTextFactory = Factory<{\n props: EllipsisTextProps;\n defaultRef: HTMLDivElement;\n defaultComponent: 'div';\n stylesNames: EllipsisTextStylesNames;\n}>;\n\nconst defaultProps: Partial<EllipsisTextProps> = {\n tooltipProps: {},\n};\n\nexport const EllipsisText = polymorphicFactory<EllipsisTextFactory>((props, ref) => {\n const {className, children, style, classNames, styles, unstyled, variant, lineClamp, tooltipProps, ...others} =\n useProps('EllipsisText', defaultProps, props);\n\n const getStyles = useStyles<EllipsisTextFactory>({\n name: 'EllipsisText',\n classes,\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n });\n\n const [showTooltip, setShowTooltip] = useState(false);\n const textRef = useRef<HTMLDivElement>();\n\n const {className: rootClass, ...rootStyles} = getStyles('root');\n const {className: textClass, ...textStyles} = getStyles('text');\n\n return (\n <Box\n ref={ref}\n onMouseEnter={() => {\n if (textRef.current && isOverflowing(textRef.current)) {\n setShowTooltip(true);\n }\n }}\n onMouseLeave={() => setShowTooltip(false)}\n
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/ellipsis-text/EllipsisText.tsx"],"sourcesContent":["import {\n Box,\n type BoxProps,\n type Factory,\n polymorphicFactory,\n type StylesApiProps,\n Text,\n type TextProps,\n Tooltip,\n type TooltipProps,\n useProps,\n useStyles,\n} from '@mantine/core';\nimport {ReactNode, useRef, useState} from 'react';\nimport clsx from 'clsx';\nimport classes from './EllipsisText.module.css';\n\nexport type EllipsisTextStylesNames = 'root' | 'tooltip' | 'text';\n\nexport interface EllipsisTextProps\n extends BoxProps,\n Pick<TextProps, 'variant' | 'lineClamp'>,\n Omit<StylesApiProps<EllipsisTextFactory>, 'variant'> {\n children: ReactNode;\n tooltipProps?: Partial<Omit<TooltipProps, 'label' | 'opened' | 'children'>>;\n}\n\ntype EllipsisTextFactory = Factory<{\n props: EllipsisTextProps;\n defaultRef: HTMLDivElement;\n defaultComponent: 'div';\n stylesNames: EllipsisTextStylesNames;\n}>;\n\nconst defaultProps: Partial<EllipsisTextProps> = {\n tooltipProps: {},\n};\n\nexport const EllipsisText = polymorphicFactory<EllipsisTextFactory>((props, ref) => {\n const {className, children, style, classNames, styles, unstyled, variant, lineClamp, tooltipProps, ...others} =\n useProps('EllipsisText', defaultProps, props);\n\n const getStyles = useStyles<EllipsisTextFactory>({\n name: 'EllipsisText',\n classes,\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n });\n\n const [showTooltip, setShowTooltip] = useState(false);\n const textRef = useRef<HTMLDivElement>();\n\n const {className: rootClass, ...rootStyles} = getStyles('root');\n const {className: textClass, ...textStyles} = getStyles('text');\n\n return (\n <Box\n ref={ref}\n onMouseEnter={() => {\n if (textRef.current && isOverflowing(textRef.current)) {\n setShowTooltip(true);\n }\n }}\n onMouseLeave={() => setShowTooltip(false)}\n className={clsx(rootClass, {[classes.noWrap]: !lineClamp})}\n {...rootStyles}\n {...others}\n >\n <Tooltip label={children} opened={showTooltip} {...tooltipProps} {...getStyles('tooltip')}>\n <Text\n span\n inherit\n variant={variant}\n ref={textRef}\n className={clsx(textClass, {[classes.ellipsis]: !lineClamp})}\n {...(!!lineClamp && {lineClamp: lineClamp})}\n {...textStyles}\n >\n {children}\n </Text>\n </Tooltip>\n </Box>\n );\n});\n\nconst isOverflowing = (h: HTMLDivElement) => h.scrollWidth > h.clientWidth || h.scrollHeight > h.clientHeight;\n"],"names":["EllipsisText","defaultProps","tooltipProps","polymorphicFactory","props","ref","useProps","className","children","style","classNames","styles","unstyled","variant","lineClamp","others","getStyles","useStyles","name","classes","useState","showTooltip","setShowTooltip","textRef","useRef","rootClass","rootStyles","textClass","textStyles","Box","onMouseEnter","current","isOverflowing","onMouseLeave","clsx","noWrap","Tooltip","label","opened","Text","span","inherit","ellipsis","h","scrollWidth","clientWidth","scrollHeight","clientHeight"],"mappings":";;;;+BAsCaA;;;eAAAA;;;;;;;;;;oBA1BN;qBACmC;6DACzB;8EACG;AAmBpB,IAAMC,eAA2C;IAC7CC,cAAc,CAAC;AACnB;AAEO,IAAMF,eAAeG,IAAAA,wBAAkB,EAAsB,SAACC,OAAOC;IACxE,IACIC,YAAAA,IAAAA,cAAQ,EAAC,gBAAgBL,cAAcG,QADpCG,YACHD,UADGC,WAAWC,WACdF,UADcE,UAAUC,QACxBH,UADwBG,OAAOC,aAC/BJ,UAD+BI,YAAYC,SAC3CL,UAD2CK,QAAQC,WACnDN,UADmDM,UAAUC,UAC7DP,UAD6DO,SAASC,YACtER,UADsEQ,WAAWZ,eACjFI,UADiFJ,cAAiBa,sCAClGT;QADGC;QAAWC;QAAUC;QAAOC;QAAYC;QAAQC;QAAUC;QAASC;QAAWZ;;IAGrF,IAAMc,YAAYC,IAAAA,eAAS,EAAsB;QAC7CC,MAAM;QACNC,SAAAA,8BAAO;QACPf,OAAAA;QACAG,WAAAA;QACAE,OAAAA;QACAC,YAAAA;QACAC,QAAAA;QACAC,UAAAA;IACJ;IAEA,IAAsCQ,+BAAAA,IAAAA,eAAQ,EAAC,YAAxCC,cAA+BD,cAAlBE,iBAAkBF;IACtC,IAAMG,UAAUC,IAAAA,aAAM;IAEtB,IAA8CR,aAAAA,UAAU,SAAjDT,AAAWkB,YAA4BT,WAAvCT,WAAyBmB,0CAAcV;QAAvCT;;IACP,IAA8CS,cAAAA,UAAU,SAAjDT,AAAWoB,YAA4BX,YAAvCT,WAAyBqB,0CAAcZ;QAAvCT;;IAEP,qBACI,qBAACsB,SAAG;QACAxB,KAAKA;QACLyB,cAAc;YACV,IAAIP,QAAQQ,OAAO,IAAIC,cAAcT,QAAQQ,OAAO,GAAG;gBACnDT,eAAe;YACnB;QACJ;QACAW,cAAc;mBAAMX,eAAe;;QACnCf,WAAW2B,IAAAA,aAAI,EAACT,WAAY,uBAACN,8BAAO,CAACgB,MAAM,EAAG,CAACrB;OAC3CY,YACAX;kBAEJ,cAAA,qBAACqB,aAAO;YAACC,OAAO7B;YAAU8B,QAAQjB;WAAiBnB,cAAkBc,UAAU;sBAC3E,cAAA,qBAACuB,UAAI;gBACDC,IAAI;gBACJC,OAAO;gBACP5B,SAASA;gBACTR,KAAKkB;gBACLhB,WAAW2B,IAAAA,aAAI,EAACP,WAAY,uBAACR,8BAAO,CAACuB,QAAQ,EAAG,CAAC5B;eAC5C,CAAC,CAACA,aAAa;gBAACA,WAAWA;YAAS,GACrCc;0BAEHpB;;;;AAKrB;AAEA,IAAMwB,gBAAgB,SAACW;WAAsBA,EAAEC,WAAW,GAAGD,EAAEE,WAAW,IAAIF,EAAEG,YAAY,GAAGH,EAAEI,YAAY"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC"}
|
|
@@ -19,5 +19,6 @@ _export_star._(require("./prompt"), exports);
|
|
|
19
19
|
_export_star._(require("./read-only"), exports);
|
|
20
20
|
_export_star._(require("./sticky-footer"), exports);
|
|
21
21
|
_export_star._(require("./table"), exports);
|
|
22
|
+
_export_star._(require("./child-form"), exports);
|
|
22
23
|
|
|
23
24
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/index.ts"],"sourcesContent":["export * from './action-icon';\nexport * from './blank-slate';\nexport * from './browser-preview';\nexport * from './button';\nexport * from './code-editor';\nexport * from './collection';\nexport * from './copyToClipboard';\nexport * from './date-range-picker';\nexport * from './ellipsis-text';\nexport * from './header';\nexport * from './inline-confirm';\nexport * from './menu';\nexport * from './prompt';\nexport * from './read-only';\nexport * from './sticky-footer';\nexport * from './table';\n"],"names":[],"mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA"}
|
|
1
|
+
{"version":3,"sources":["../../../src/components/index.ts"],"sourcesContent":["export * from './action-icon';\nexport * from './blank-slate';\nexport * from './browser-preview';\nexport * from './button';\nexport * from './code-editor';\nexport * from './collection';\nexport * from './copyToClipboard';\nexport * from './date-range-picker';\nexport * from './ellipsis-text';\nexport * from './header';\nexport * from './inline-confirm';\nexport * from './menu';\nexport * from './prompt';\nexport * from './read-only';\nexport * from './sticky-footer';\nexport * from './table';\nexport * from './child-form';\n"],"names":[],"mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BoxProps, ComboboxData, CompoundStylesApiProps, Factory, SelectProps } from '@mantine/core';
|
|
2
2
|
import { FunctionComponent } from 'react';
|
|
3
3
|
export type TablePredicateStylesNames = 'predicate' | 'predicateWrapper' | 'predicateLabel' | 'predicateSelect';
|
|
4
|
-
export interface TablePredicateProps extends BoxProps, Pick<SelectProps, 'renderOption'>, CompoundStylesApiProps<TablePredicateFactory> {
|
|
4
|
+
export interface TablePredicateProps extends BoxProps, Pick<SelectProps, 'renderOption' | 'comboboxProps'>, CompoundStylesApiProps<TablePredicateFactory> {
|
|
5
5
|
/**
|
|
6
6
|
* Unique identifier for this predicate. Will be used to access the selected value in the table state
|
|
7
7
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TablePredicate.d.ts","sourceRoot":"","sources":["../../../../../src/components/table/table-predicate/TablePredicate.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,QAAQ,EACR,YAAY,EACZ,sBAAsB,EAEtB,OAAO,EAIP,WAAW,EAGd,MAAM,eAAe,CAAC;AACvB,OAAO,EAAC,iBAAiB,EAAC,MAAM,OAAO,CAAC;AAKxC,MAAM,MAAM,yBAAyB,GAAG,WAAW,GAAG,kBAAkB,GAAG,gBAAgB,GAAG,iBAAiB,CAAC;AAEhH,MAAM,WAAW,mBACb,SAAQ,QAAQ,EACZ,IAAI,CAAC,WAAW,EAAE,cAAc,CAAC,
|
|
1
|
+
{"version":3,"file":"TablePredicate.d.ts","sourceRoot":"","sources":["../../../../../src/components/table/table-predicate/TablePredicate.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,QAAQ,EACR,YAAY,EACZ,sBAAsB,EAEtB,OAAO,EAIP,WAAW,EAGd,MAAM,eAAe,CAAC;AACvB,OAAO,EAAC,iBAAiB,EAAC,MAAM,OAAO,CAAC;AAKxC,MAAM,MAAM,yBAAyB,GAAG,WAAW,GAAG,kBAAkB,GAAG,gBAAgB,GAAG,iBAAiB,CAAC;AAEhH,MAAM,WAAW,mBACb,SAAQ,QAAQ,EACZ,IAAI,CAAC,WAAW,EAAE,cAAc,GAAG,eAAe,CAAC,EACnD,sBAAsB,CAAC,qBAAqB,CAAC;IACjD;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,IAAI,EAAE,YAAY,CAAC;IACnB;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,qBAAqB,GAAG,OAAO,CAAC;IACxC,KAAK,EAAE,mBAAmB,CAAC;IAC3B,GAAG,EAAE,cAAc,CAAC;IACpB,WAAW,EAAE,yBAAyB,CAAC;IACvC,QAAQ,EAAE,IAAI,CAAC;CAClB,CAAC,CAAC;AAIH,eAAO,MAAM,cAAc,EAAE,iBAAiB,CAAC,mBAAmB,CAmChE,CAAC"}
|
|
@@ -19,7 +19,7 @@ var _TableContext = require("../TableContext");
|
|
|
19
19
|
var defaultProps = {};
|
|
20
20
|
var TablePredicate = (0, _core.factory)(function(props, ref) {
|
|
21
21
|
var _useTableContext = (0, _TableContext.useTableContext)(), store = _useTableContext.store, getStyles = _useTableContext.getStyles;
|
|
22
|
-
var _useProps = (0, _core.useProps)('PlasmaTablePredicate', defaultProps, props), id = _useProps.id, data = _useProps.data, label = _useProps.label, classNames = _useProps.classNames, className = _useProps.className, styles = _useProps.styles, style = _useProps.style, renderOption = _useProps.renderOption, vars = _useProps.vars, others = _object_without_properties._(_useProps, [
|
|
22
|
+
var _useProps = (0, _core.useProps)('PlasmaTablePredicate', defaultProps, props), id = _useProps.id, data = _useProps.data, label = _useProps.label, classNames = _useProps.classNames, className = _useProps.className, styles = _useProps.styles, style = _useProps.style, renderOption = _useProps.renderOption, comboboxProps = _useProps.comboboxProps, vars = _useProps.vars, others = _object_without_properties._(_useProps, [
|
|
23
23
|
"id",
|
|
24
24
|
"data",
|
|
25
25
|
"label",
|
|
@@ -28,6 +28,7 @@ var TablePredicate = (0, _core.factory)(function(props, ref) {
|
|
|
28
28
|
"styles",
|
|
29
29
|
"style",
|
|
30
30
|
"renderOption",
|
|
31
|
+
"comboboxProps",
|
|
31
32
|
"vars"
|
|
32
33
|
]);
|
|
33
34
|
var handleChange = function(newValue) {
|
|
@@ -53,7 +54,8 @@ var TablePredicate = (0, _core.factory)(function(props, ref) {
|
|
|
53
54
|
style: style
|
|
54
55
|
}, stylesApiProps)), others), {
|
|
55
56
|
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_core.Group, _object_spread_props._(_object_spread._({
|
|
56
|
-
gap: "xs"
|
|
57
|
+
gap: "xs",
|
|
58
|
+
wrap: "nowrap"
|
|
57
59
|
}, getStyles('predicateWrapper', stylesApiProps)), {
|
|
58
60
|
children: [
|
|
59
61
|
label ? /*#__PURE__*/ (0, _jsxruntime.jsxs)(_core.Text, _object_spread_props._(_object_spread._({}, getStyles('predicateLabel', stylesApiProps)), {
|
|
@@ -63,9 +65,9 @@ var TablePredicate = (0, _core.factory)(function(props, ref) {
|
|
|
63
65
|
]
|
|
64
66
|
})) : null,
|
|
65
67
|
/*#__PURE__*/ (0, _jsxruntime.jsx)(_core.Select, _object_spread._({
|
|
66
|
-
comboboxProps: {
|
|
68
|
+
comboboxProps: _object_spread._({
|
|
67
69
|
withinPortal: true
|
|
68
|
-
},
|
|
70
|
+
}, comboboxProps),
|
|
69
71
|
value: store.state.predicates[id],
|
|
70
72
|
onChange: handleChange,
|
|
71
73
|
data: data,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/components/table/table-predicate/TablePredicate.tsx"],"sourcesContent":["import {\n BoxProps,\n ComboboxData,\n CompoundStylesApiProps,\n factory,\n Factory,\n Grid,\n Group,\n Select,\n SelectProps,\n Text,\n useProps,\n} from '@mantine/core';\nimport {FunctionComponent} from 'react';\n\nimport {TableComponentsOrder} from '../Table';\nimport {useTableContext} from '../TableContext';\n\nexport type TablePredicateStylesNames = 'predicate' | 'predicateWrapper' | 'predicateLabel' | 'predicateSelect';\n\nexport interface TablePredicateProps\n extends BoxProps,\n Pick<SelectProps, 'renderOption'>,\n CompoundStylesApiProps<TablePredicateFactory> {\n /**\n * Unique identifier for this predicate. Will be used to access the selected value in the table state\n */\n id: string;\n /**\n * The values to display in the predicate\n */\n data: ComboboxData;\n /**\n * The label to display next to the Select\n *\n */\n label: string;\n}\n\nexport type TablePredicateFactory = Factory<{\n props: TablePredicateProps;\n ref: HTMLDivElement;\n stylesNames: TablePredicateStylesNames;\n compound: true;\n}>;\n\nconst defaultProps: Partial<TablePredicateProps> = {};\n\nexport const TablePredicate: FunctionComponent<TablePredicateProps> = factory<TablePredicateFactory>((props, ref) => {\n const {store, getStyles} = useTableContext();\n const {id, data, label, classNames, className, styles, style, renderOption, vars, ...others}
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/table/table-predicate/TablePredicate.tsx"],"sourcesContent":["import {\n BoxProps,\n ComboboxData,\n CompoundStylesApiProps,\n factory,\n Factory,\n Grid,\n Group,\n Select,\n SelectProps,\n Text,\n useProps,\n} from '@mantine/core';\nimport {FunctionComponent} from 'react';\n\nimport {TableComponentsOrder} from '../Table';\nimport {useTableContext} from '../TableContext';\n\nexport type TablePredicateStylesNames = 'predicate' | 'predicateWrapper' | 'predicateLabel' | 'predicateSelect';\n\nexport interface TablePredicateProps\n extends BoxProps,\n Pick<SelectProps, 'renderOption' | 'comboboxProps'>,\n CompoundStylesApiProps<TablePredicateFactory> {\n /**\n * Unique identifier for this predicate. Will be used to access the selected value in the table state\n */\n id: string;\n /**\n * The values to display in the predicate\n */\n data: ComboboxData;\n /**\n * The label to display next to the Select\n *\n */\n label: string;\n}\n\nexport type TablePredicateFactory = Factory<{\n props: TablePredicateProps;\n ref: HTMLDivElement;\n stylesNames: TablePredicateStylesNames;\n compound: true;\n}>;\n\nconst defaultProps: Partial<TablePredicateProps> = {};\n\nexport const TablePredicate: FunctionComponent<TablePredicateProps> = factory<TablePredicateFactory>((props, ref) => {\n const {store, getStyles} = useTableContext();\n const {id, data, label, classNames, className, styles, style, renderOption, comboboxProps, vars, ...others} =\n useProps('PlasmaTablePredicate', defaultProps, props);\n\n const handleChange = (newValue: string) => {\n store.setPredicates((prev) => ({...prev, [id]: newValue}));\n store.setPagination((prev) => ({...prev, pageIndex: 0}));\n };\n\n const stylesApiProps = {classNames, styles};\n\n return (\n <Grid.Col\n span=\"content\"\n order={TableComponentsOrder.Predicate}\n ref={ref}\n {...getStyles('predicate', {className, style, ...stylesApiProps})}\n {...others}\n >\n <Group gap=\"xs\" wrap=\"nowrap\" {...getStyles('predicateWrapper', stylesApiProps)}>\n {label ? <Text {...getStyles('predicateLabel', stylesApiProps)}>{label}:</Text> : null}\n <Select\n comboboxProps={{withinPortal: true, ...comboboxProps}}\n value={store.state.predicates[id]}\n onChange={handleChange}\n data={data}\n aria-label={label ?? id}\n searchable={data.length > 7}\n renderOption={renderOption}\n {...getStyles('predicateSelect', stylesApiProps)}\n />\n </Group>\n </Grid.Col>\n );\n});\n"],"names":["TablePredicate","defaultProps","factory","props","ref","useTableContext","store","getStyles","useProps","id","data","label","classNames","className","styles","style","renderOption","comboboxProps","vars","others","handleChange","newValue","setPredicates","prev","setPagination","pageIndex","stylesApiProps","Grid","Col","span","order","TableComponentsOrder","Predicate","Group","gap","wrap","Text","Select","withinPortal","value","state","predicates","onChange","aria-label","searchable","length"],"mappings":";;;;+BAgDaA;;;eAAAA;;;;;;;;oBApCN;qBAG4B;4BACL;AA8B9B,IAAMC,eAA6C,CAAC;AAE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A,QAASF;oBACrBmC,YAAYlC,KAAKmC,MAAM,GAAG;oBAC1B7B,cAAcA;mBACVT,UAAU,mBAAmBmB;;;;AAKrD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Theme.d.ts","sourceRoot":"","sources":["../../../src/theme/Theme.tsx"],"names":[],"mappings":"AAUA,OAAO,EAmBH,oBAAoB,EAmBvB,MAAM,eAAe,CAAC;AAiCvB,eAAO,MAAM,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"Theme.d.ts","sourceRoot":"","sources":["../../../src/theme/Theme.tsx"],"names":[],"mappings":"AAUA,OAAO,EAmBH,oBAAoB,EAmBvB,MAAM,eAAe,CAAC;AAiCvB,eAAO,MAAM,WAAW,EAAE,oBAuSxB,CAAC"}
|
package/dist/cjs/theme/Theme.js
CHANGED
|
@@ -208,9 +208,8 @@ var plasmaTheme = (0, _core.createTheme)({
|
|
|
208
208
|
}
|
|
209
209
|
}),
|
|
210
210
|
Input: _core.Input.extend({
|
|
211
|
-
classNames: function(
|
|
211
|
+
classNames: function(_theme, props) {
|
|
212
212
|
var anyProps = props;
|
|
213
|
-
// eslint-disable-next-line no-underscore-dangle
|
|
214
213
|
if (anyProps.readOnly && !props.disabled && ![
|
|
215
214
|
'Select'
|
|
216
215
|
].includes(anyProps.__staticSelector)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/theme/Theme.tsx"],"sourcesContent":["import {\n ArrowHeadLeftSize16Px,\n ArrowHeadRightSize16Px,\n CheckSize16Px,\n CrossSize16Px,\n FilterSize16Px,\n InfoSize16Px,\n InfoSize24Px,\n} from '@coveord/plasma-react-icons';\nimport {color} from '@coveord/plasma-tokens';\nimport {\n ActionIcon,\n Alert,\n Anchor,\n AppShellNavbar,\n Badge,\n Button,\n Checkbox,\n CloseButton,\n ColorSwatch,\n Combobox,\n ComboboxSearch,\n createTheme,\n deepMerge,\n Divider,\n Input,\n InputWrapper,\n List,\n Loader,\n MantineThemeOverride,\n MenuItem,\n Modal,\n MultiSelect,\n NavLink,\n Notification,\n Pagination,\n Popover,\n Radio,\n ScrollArea,\n SegmentedControl,\n Select,\n Skeleton,\n Stepper,\n Switch,\n Tabs,\n Text,\n TextInput,\n Tooltip,\n} from '@mantine/core';\nimport {DatePicker} from '@mantine/dates';\nimport ActionIconClasses from '../styles/ActionIcon.module.css';\nimport AlertClasses from '../styles/Alert.module.css';\nimport AnchorClasses from '../styles/Anchor.module.css';\nimport AppShellNavBarClasses from '../styles/AppShellNavBar.module.css';\nimport BadgeClasses from '../styles/Badge.module.css';\nimport ButtonClasses from '../styles/Button.module.css';\nimport CheckboxClasses from '../styles/Checkbox.module.css';\nimport ComboboxClasses from '../styles/Combobox.module.css';\nimport DatePickerClasses from '../styles/DatePicker.module.css';\nimport InputClasses from '../styles/Input.module.css';\nimport InputWrapperClasses from '../styles/InputWrapper.module.css';\nimport ListClasses from '../styles/List.module.css';\nimport ModalClasses from '../styles/Modal.module.css';\nimport NavLinkClasses from '../styles/NavLink.module.css';\nimport NotificationClasses from '../styles/Notification.module.css';\nimport PaginationClasses from '../styles/Pagination.module.css';\nimport RadioClasses from '../styles/Radio.module.css';\nimport ReadOnlyInputClasses from '../styles/ReadOnlyInput.module.css';\nimport ReadOnlyStateClasses from '../styles/ReadOnlyState.module.css';\nimport ScrollAreaClasses from '../styles/ScrollArea.module.css';\nimport SegmentedControlClasses from '../styles/SegmentedControl.module.css';\nimport SelectClasses from '../styles/Select.module.css';\nimport SkeletonClasses from '../styles/Skeleton.module.css';\nimport StepperClasses from '../styles/Stepper.module.css';\nimport TabsClasses from '../styles/Tabs.module.css';\nimport TextClasses from '../styles/Text.module.css';\nimport TooltipClasses from '../styles/Tooltip.module.css';\nimport {NotificationVars} from '../vars/Notification.vars';\nimport {TextVars} from '../vars/Text.vars';\nimport {PlasmaColors} from './PlasmaColors';\n\nexport const plasmaTheme: MantineThemeOverride = createTheme({\n // These are overrides over https://github.com/mantinedev/mantine/blob/master/packages/%40mantine/core/src/core/MantineProvider/default-theme.ts\n fontFamily: 'canada-type-gibson, sans-serif',\n black: color.primary.gray[9],\n defaultRadius: 8,\n lineHeights: {md: '1.5'},\n spacing: {\n xxs: '4px',\n xs: '8px',\n sm: '16px',\n md: '24px',\n lg: '32px',\n xl: '40px',\n },\n primaryColor: 'action',\n headings: {\n fontFamily: 'canada-type-gibson, sans-serif',\n fontWeight: '500',\n sizes: {\n h1: {fontSize: '48px', lineHeight: '1.5', fontWeight: '300'},\n h2: {fontSize: '32px', lineHeight: '1.5', fontWeight: '500'},\n h3: {fontSize: '24px', lineHeight: '1.5', fontWeight: '500'},\n h4: {fontSize: '18px', lineHeight: '1.5', fontWeight: '300'},\n h5: {fontSize: '14px', lineHeight: '1.5', fontWeight: '500'},\n h6: {fontSize: '12px', lineHeight: '1.5', fontWeight: '500'},\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 ActionIcon: ActionIcon.extend({\n classNames: {root: ActionIconClasses.root},\n }),\n Alert: Alert.extend({\n defaultProps: {\n icon: <InfoSize16Px height={16} />,\n color: 'navy',\n },\n classNames: AlertClasses,\n }),\n Anchor: Anchor.extend({\n defaultProps: {\n color: 'action.6',\n },\n classNames: {root: AnchorClasses.root},\n }),\n AppShellNavbar: AppShellNavbar.extend({\n classNames: {navbar: AppShellNavBarClasses.navbar},\n }),\n Badge: Badge.extend({\n classNames: {root: BadgeClasses.root},\n defaultProps: {\n variant: 'light',\n },\n }),\n Button: Button.extend({\n classNames: ButtonClasses,\n }),\n Checkbox: Checkbox.extend({\n defaultProps: {\n radius: 'sm',\n },\n classNames: (theme, props) => {\n if (props.readOnly && !props.disabled) {\n return deepMerge(CheckboxClasses, ReadOnlyStateClasses);\n }\n return CheckboxClasses;\n },\n vars: (theme, props) => {\n if (props.readOnly && !props.disabled) {\n return {\n root: {\n '--checkbox-icon-color': theme.colors.gray[7],\n '--checkbox-color': theme.colors.gray[2],\n },\n };\n }\n return {root: {}};\n },\n }),\n CloseButton: CloseButton.extend({\n defaultProps: {\n icon: <CrossSize16Px height={16} aria-label=\"close\" />,\n },\n }),\n ColorSwatch: ColorSwatch.extend({\n defaultProps: {\n size: 8,\n withShadow: false,\n },\n }),\n Combobox: Combobox.extend({\n classNames: {option: SelectClasses.option, search: ComboboxClasses.search},\n }),\n ComboboxSearch: ComboboxSearch.extend({\n defaultProps: {\n placeholder: 'Search',\n rightSection: <FilterSize16Px height={16} color=\"gray.5\" />,\n },\n }),\n DatePicker: DatePicker.extend({\n classNames: {monthCell: DatePickerClasses.monthCell},\n }),\n Divider: Divider.extend({\n defaultProps: {\n color: 'gray.3',\n },\n }),\n Input: Input.extend({\n classNames: (theme, props) => {\n const anyProps = props as any;\n // eslint-disable-next-line no-underscore-dangle\n if (anyProps.readOnly && !props.disabled && !['Select'].includes(anyProps.__staticSelector)) {\n return deepMerge(InputClasses, ReadOnlyInputClasses);\n }\n return InputClasses;\n },\n }),\n InputWrapper: InputWrapper.extend({\n classNames: InputWrapperClasses,\n vars: (theme, props) => {\n const anyProps = props as any;\n if (anyProps.disabled || (anyProps.readOnly && !['Select'].includes(anyProps.__staticSelector))) {\n return {\n label: {'--input-asterisk-color': theme.colors.red[2]},\n error: {},\n description: {},\n };\n }\n return {\n label: {},\n error: {},\n description: {},\n };\n },\n }),\n Loader: Loader.extend({\n defaultProps: {\n type: 'dots',\n color: 'action',\n role: 'presentation',\n },\n }),\n List: List.extend({\n classNames: {root: ListClasses.root},\n }),\n MenuItem: MenuItem.extend({\n defaultProps: {\n fw: 300,\n },\n }),\n Modal: Modal.extend({\n classNames: ModalClasses,\n }),\n ModalOverlay: Modal.Overlay.extend({\n defaultProps: {\n color: color.primary.navy[9],\n backgroundOpacity: 0.9,\n },\n }),\n ModalRoot: Modal.Root.extend({\n defaultProps: {\n padding: 'lg',\n },\n }),\n MultiSelect: MultiSelect.extend({defaultProps: {hidePickedOptions: true}}),\n NavLink: NavLink.extend({classNames: NavLinkClasses}),\n Notification: Notification.extend({\n defaultProps: {\n icon: <InfoSize24Px height={24} />,\n color: 'info',\n },\n classNames: {\n root: NotificationClasses.root,\n icon: NotificationClasses.icon,\n closeButton: NotificationClasses.closeButton,\n },\n vars: NotificationVars,\n }),\n Pagination: Pagination.extend({\n classNames: PaginationClasses,\n vars: () => ({root: {'--pagination-control-fz': 'var(--mantine-font-size-sm)'}}),\n defaultProps: {\n nextIcon: ArrowHeadRightSize16Px,\n previousIcon: ArrowHeadLeftSize16Px,\n },\n }),\n Popover: Popover.extend({\n defaultProps: {\n shadow: 'md',\n withArrow: true,\n },\n }),\n Radio: Radio.extend({\n classNames: (theme, props) => {\n if (props.readOnly && !props.disabled) {\n return deepMerge(RadioClasses, ReadOnlyStateClasses);\n }\n return RadioClasses;\n },\n vars: (theme, props) => {\n if (props.readOnly && !props.disabled) {\n return {\n root: {\n '--radio-icon-color': theme.colors.gray[7],\n '--radio-color': theme.colors.gray[2],\n },\n };\n }\n return {root: {}};\n },\n }),\n ScrollArea: ScrollArea.extend({\n classNames: {viewport: ScrollAreaClasses.viewport},\n }),\n SegmentedControl: SegmentedControl.extend({\n classNames: SegmentedControlClasses,\n }),\n Select: Select.extend({\n defaultProps: {withCheckIcon: false, allowDeselect: false},\n classNames: {input: SelectClasses.input, option: SelectClasses.option},\n }),\n Skeleton: Skeleton.extend({\n classNames: {root: SkeletonClasses.root},\n }),\n Stepper: Stepper.extend({\n defaultProps: {\n size: 'xs',\n completedIcon: <CheckSize16Px />,\n },\n classNames: {\n step: StepperClasses.step,\n stepIcon: StepperClasses.stepIcon,\n stepCompletedIcon: StepperClasses.stepCompletedIcon,\n stepDescription: StepperClasses.stepDescription,\n separator: StepperClasses.separator,\n verticalSeparator: StepperClasses.verticalSeparator,\n },\n }),\n Switch: Switch.extend({\n classNames: (theme, props) => {\n if (props.readOnly && !props.disabled) {\n return ReadOnlyStateClasses;\n }\n return {};\n },\n vars: (theme, props) => {\n if (props.readOnly && !props.disabled) {\n return {\n root: {},\n track: {\n '--switch-bg': theme.colors.gray[2],\n '--switch-bd': 'transparent',\n },\n thumb: {\n '--switch-thumb-bd': 'transparent',\n },\n };\n }\n return {root: {}, track: {}, thumb: {}};\n },\n }),\n Tabs: Tabs.extend({\n classNames: TabsClasses,\n }),\n TabsTab: Tabs.Tab.extend({\n defaultProps: {\n px: 'sm',\n },\n }),\n Text: Text.extend({\n classNames: TextClasses,\n vars: TextVars,\n }),\n TextInput: TextInput.extend({\n defaultProps: {\n radius: 8,\n },\n }),\n Tooltip: Tooltip.extend({\n defaultProps: {\n color: 'navy',\n maw: 300,\n multiline: true,\n withArrow: true,\n zIndex: 10000,\n },\n classNames: TooltipClasses,\n }),\n },\n});\n"],"names":["plasmaTheme","createTheme","fontFamily","black","color","primary","gray","defaultRadius","lineHeights","md","spacing","xxs","xs","sm","lg","xl","primaryColor","headings","fontWeight","sizes","h1","fontSize","lineHeight","h2","h3","h4","h5","h6","shadows","colors","PlasmaColors","components","ActionIcon","extend","classNames","root","ActionIconClasses","Alert","defaultProps","icon","InfoSize16Px","height","AlertClasses","Anchor","AnchorClasses","AppShellNavbar","navbar","AppShellNavBarClasses","Badge","BadgeClasses","variant","Button","ButtonClasses","Checkbox","radius","theme","props","readOnly","disabled","deepMerge","CheckboxClasses","ReadOnlyStateClasses","vars","CloseButton","CrossSize16Px","aria-label","ColorSwatch","size","withShadow","Combobox","option","SelectClasses","search","ComboboxClasses","ComboboxSearch","placeholder","rightSection","FilterSize16Px","DatePicker","monthCell","DatePickerClasses","Divider","Input","anyProps","includes","__staticSelector","InputClasses","ReadOnlyInputClasses","InputWrapper","InputWrapperClasses","label","red","error","description","Loader","type","role","List","ListClasses","MenuItem","fw","Modal","ModalClasses","ModalOverlay","Overlay","navy","backgroundOpacity","ModalRoot","Root","padding","MultiSelect","hidePickedOptions","NavLink","NavLinkClasses","Notification","InfoSize24Px","NotificationClasses","closeButton","NotificationVars","Pagination","PaginationClasses","nextIcon","ArrowHeadRightSize16Px","previousIcon","ArrowHeadLeftSize16Px","Popover","shadow","withArrow","Radio","RadioClasses","ScrollArea","viewport","ScrollAreaClasses","SegmentedControl","SegmentedControlClasses","Select","withCheckIcon","allowDeselect","input","Skeleton","SkeletonClasses","Stepper","completedIcon","CheckSize16Px","step","StepperClasses","stepIcon","stepCompletedIcon","stepDescription","separator","verticalSeparator","Switch","track","thumb","Tabs","TabsClasses","TabsTab","Tab","px","Text","TextClasses","TextVars","TextInput","Tooltip","maw","multiline","zIndex","TooltipClasses"],"mappings":";;;;+BAiFaA;;;eAAAA;;;;;gCAzEN;4BACa;oBAuCb;qBACkB;4EACK;uEACL;wEACC;gFACQ;uEACT;wEACC;0EACE;0EACA;4EACE;uEACL;8EACO;sEACR;uEACC;yEACE;8EACK;4EACF;uEACL;+EACQ;+EACA;4EACH;kFACM;wEACV;0EACE;yEACD;sEACH;sEACA;yEACG;gCACI;wBACR;4BACI;AAEpB,IAAMA,cAAoCC,IAAAA,iBAAW,EAAC;IACzD,gJAAgJ;IAChJC,YAAY;IACZC,OAAOC,mBAAK,CAACC,OAAO,CAACC,IAAI,CAAC,EAAE;IAC5BC,eAAe;IACfC,aAAa;QAACC,IAAI;IAAK;IACvBC,SAAS;QACLC,KAAK;QACLC,IAAI;QACJC,IAAI;QACJJ,IAAI;QACJK,IAAI;QACJC,IAAI;IACR;IACAC,cAAc;IACdC,UAAU;QACNf,YAAY;QACZgB,YAAY;QACZC,OAAO;YACHC,IAAI;gBAACC,UAAU;gBAAQC,YAAY;gBAAOJ,YAAY;YAAK;YAC3DK,IAAI;gBAACF,UAAU;gBAAQC,YAAY;gBAAOJ,YAAY;YAAK;YAC3DM,IAAI;gBAACH,UAAU;gBAAQC,YAAY;gBAAO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BACH,qBAAqB;wBACzB;oBACJ;gBACJ;gBACA,OAAO;oBAACtH,MAAM,CAAC;oBAAGqH,OAAO,CAAC;oBAAGC,OAAO,CAAC;gBAAC;YAC1C;QACJ;QACAC,MAAMA,UAAI,CAACzH,MAAM,CAAC;YACdC,YAAYyH,sBAAW;QAC3B;QACAC,SAASF,UAAI,CAACG,GAAG,CAAC5H,MAAM,CAAC;YACrBK,cAAc;gBACVwH,IAAI;YACR;QACJ;QACAC,MAAMA,UAAI,CAAC9H,MAAM,CAAC;YACdC,YAAY8H,sBAAW;YACvBlG,MAAMmG,kBAAQ;QAClB;QACAC,WAAWA,eAAS,CAACjI,MAAM,CAAC;YACxBK,cAAc;gBACVgB,QAAQ;YACZ;QACJ;QACA6G,SAASA,aAAO,CAAClI,MAAM,CAAC;YACpBK,cAAc;gBACVlC,OAAO;gBACPgK,KAAK;gBACLC,WAAW;gBACXtC,WAAW;gBACXuC,QAAQ;YACZ;YACApI,YAAYqI,yBAAc;QAC9B;IACJ;AACJ"}
|
|
1
|
+
{"version":3,"sources":["../../../src/theme/Theme.tsx"],"sourcesContent":["import {\n ArrowHeadLeftSize16Px,\n ArrowHeadRightSize16Px,\n CheckSize16Px,\n CrossSize16Px,\n FilterSize16Px,\n InfoSize16Px,\n InfoSize24Px,\n} from '@coveord/plasma-react-icons';\nimport {color} from '@coveord/plasma-tokens';\nimport {\n ActionIcon,\n Alert,\n Anchor,\n AppShellNavbar,\n Badge,\n Button,\n Checkbox,\n CloseButton,\n ColorSwatch,\n Combobox,\n ComboboxSearch,\n createTheme,\n deepMerge,\n Divider,\n Input,\n InputWrapper,\n List,\n Loader,\n MantineThemeOverride,\n MenuItem,\n Modal,\n MultiSelect,\n NavLink,\n Notification,\n Pagination,\n Popover,\n Radio,\n ScrollArea,\n SegmentedControl,\n Select,\n Skeleton,\n Stepper,\n Switch,\n Tabs,\n Text,\n TextInput,\n Tooltip,\n} from '@mantine/core';\nimport {DatePicker} from '@mantine/dates';\nimport ActionIconClasses from '../styles/ActionIcon.module.css';\nimport AlertClasses from '../styles/Alert.module.css';\nimport AnchorClasses from '../styles/Anchor.module.css';\nimport AppShellNavBarClasses from '../styles/AppShellNavBar.module.css';\nimport BadgeClasses from '../styles/Badge.module.css';\nimport ButtonClasses from '../styles/Button.module.css';\nimport CheckboxClasses from '../styles/Checkbox.module.css';\nimport ComboboxClasses from '../styles/Combobox.module.css';\nimport DatePickerClasses from '../styles/DatePicker.module.css';\nimport InputClasses from '../styles/Input.module.css';\nimport InputWrapperClasses from '../styles/InputWrapper.module.css';\nimport ListClasses from '../styles/List.module.css';\nimport ModalClasses from '../styles/Modal.module.css';\nimport NavLinkClasses from '../styles/NavLink.module.css';\nimport NotificationClasses from '../styles/Notification.module.css';\nimport PaginationClasses from '../styles/Pagination.module.css';\nimport RadioClasses from '../styles/Radio.module.css';\nimport ReadOnlyInputClasses from '../styles/ReadOnlyInput.module.css';\nimport ReadOnlyStateClasses from '../styles/ReadOnlyState.module.css';\nimport ScrollAreaClasses from '../styles/ScrollArea.module.css';\nimport SegmentedControlClasses from '../styles/SegmentedControl.module.css';\nimport SelectClasses from '../styles/Select.module.css';\nimport SkeletonClasses from '../styles/Skeleton.module.css';\nimport StepperClasses from '../styles/Stepper.module.css';\nimport TabsClasses from '../styles/Tabs.module.css';\nimport TextClasses from '../styles/Text.module.css';\nimport TooltipClasses from '../styles/Tooltip.module.css';\nimport {NotificationVars} from '../vars/Notification.vars';\nimport {TextVars} from '../vars/Text.vars';\nimport {PlasmaColors} from './PlasmaColors';\n\nexport const plasmaTheme: MantineThemeOverride = createTheme({\n // These are overrides over https://github.com/mantinedev/mantine/blob/master/packages/%40mantine/core/src/core/MantineProvider/default-theme.ts\n fontFamily: 'canada-type-gibson, sans-serif',\n black: color.primary.gray[9],\n defaultRadius: 8,\n lineHeights: {md: '1.5'},\n spacing: {\n xxs: '4px',\n xs: '8px',\n sm: '16px',\n md: '24px',\n lg: '32px',\n xl: '40px',\n },\n primaryColor: 'action',\n headings: {\n fontFamily: 'canada-type-gibson, sans-serif',\n fontWeight: '500',\n sizes: {\n h1: {fontSize: '48px', lineHeight: '1.5', fontWeight: '300'},\n h2: {fontSize: '32px', lineHeight: '1.5', fontWeight: '500'},\n h3: {fontSize: '24px', lineHeight: '1.5', fontWeight: '500'},\n h4: {fontSize: '18px', lineHeight: '1.5', fontWeight: '300'},\n h5: {fontSize: '14px', lineHeight: '1.5', fontWeight: '500'},\n h6: {fontSize: '12px', lineHeight: '1.5', fontWeight: '500'},\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 ActionIcon: ActionIcon.extend({\n classNames: {root: ActionIconClasses.root},\n }),\n Alert: Alert.extend({\n defaultProps: {\n icon: <InfoSize16Px height={16} />,\n color: 'navy',\n },\n classNames: AlertClasses,\n }),\n Anchor: Anchor.extend({\n defaultProps: {\n color: 'action.6',\n },\n classNames: {root: AnchorClasses.root},\n }),\n AppShellNavbar: AppShellNavbar.extend({\n classNames: {navbar: AppShellNavBarClasses.navbar},\n }),\n Badge: Badge.extend({\n classNames: {root: BadgeClasses.root},\n defaultProps: {\n variant: 'light',\n },\n }),\n Button: Button.extend({\n classNames: ButtonClasses,\n }),\n Checkbox: Checkbox.extend({\n defaultProps: {\n radius: 'sm',\n },\n classNames: (theme, props) => {\n if (props.readOnly && !props.disabled) {\n return deepMerge(CheckboxClasses, ReadOnlyStateClasses);\n }\n return CheckboxClasses;\n },\n vars: (theme, props) => {\n if (props.readOnly && !props.disabled) {\n return {\n root: {\n '--checkbox-icon-color': theme.colors.gray[7],\n '--checkbox-color': theme.colors.gray[2],\n },\n };\n }\n return {root: {}};\n },\n }),\n CloseButton: CloseButton.extend({\n defaultProps: {\n icon: <CrossSize16Px height={16} aria-label=\"close\" />,\n },\n }),\n ColorSwatch: ColorSwatch.extend({\n defaultProps: {\n size: 8,\n withShadow: false,\n },\n }),\n Combobox: Combobox.extend({\n classNames: {option: SelectClasses.option, search: ComboboxClasses.search},\n }),\n ComboboxSearch: ComboboxSearch.extend({\n defaultProps: {\n placeholder: 'Search',\n rightSection: <FilterSize16Px height={16} color=\"gray.5\" />,\n },\n }),\n DatePicker: DatePicker.extend({\n classNames: {monthCell: DatePickerClasses.monthCell},\n }),\n Divider: Divider.extend({\n defaultProps: {\n color: 'gray.3',\n },\n }),\n Input: Input.extend({\n classNames: (_theme, props) => {\n const anyProps = props as any;\n if (anyProps.readOnly && !props.disabled && !['Select'].includes(anyProps.__staticSelector)) {\n return deepMerge(InputClasses, ReadOnlyInputClasses);\n }\n return InputClasses;\n },\n }),\n InputWrapper: InputWrapper.extend({\n classNames: InputWrapperClasses,\n vars: (theme, props) => {\n const anyProps = props as any;\n if (anyProps.disabled || (anyProps.readOnly && !['Select'].includes(anyProps.__staticSelector))) {\n return {\n label: {'--input-asterisk-color': theme.colors.red[2]},\n error: {},\n description: {},\n };\n }\n return {\n label: {},\n error: {},\n description: {},\n };\n },\n }),\n Loader: Loader.extend({\n defaultProps: {\n type: 'dots',\n color: 'action',\n role: 'presentation',\n },\n }),\n List: List.extend({\n classNames: {root: ListClasses.root},\n }),\n MenuItem: MenuItem.extend({\n defaultProps: {\n fw: 300,\n },\n }),\n Modal: Modal.extend({\n classNames: ModalClasses,\n }),\n ModalOverlay: Modal.Overlay.extend({\n defaultProps: {\n color: color.primary.navy[9],\n backgroundOpacity: 0.9,\n },\n }),\n ModalRoot: Modal.Root.extend({\n defaultProps: {\n padding: 'lg',\n },\n }),\n MultiSelect: MultiSelect.extend({defaultProps: {hidePickedOptions: true}}),\n NavLink: NavLink.extend({classNames: NavLinkClasses}),\n Notification: Notification.extend({\n defaultProps: {\n icon: <InfoSize24Px height={24} />,\n color: 'info',\n },\n classNames: {\n root: NotificationClasses.root,\n icon: NotificationClasses.icon,\n closeButton: NotificationClasses.closeButton,\n },\n vars: NotificationVars,\n }),\n Pagination: Pagination.extend({\n classNames: PaginationClasses,\n vars: () => ({root: {'--pagination-control-fz': 'var(--mantine-font-size-sm)'}}),\n defaultProps: {\n nextIcon: ArrowHeadRightSize16Px,\n previousIcon: ArrowHeadLeftSize16Px,\n },\n }),\n Popover: Popover.extend({\n defaultProps: {\n shadow: 'md',\n withArrow: true,\n },\n }),\n Radio: Radio.extend({\n classNames: (theme, props) => {\n if (props.readOnly && !props.disabled) {\n return deepMerge(RadioClasses, ReadOnlyStateClasses);\n }\n return RadioClasses;\n },\n vars: (theme, props) => {\n if (props.readOnly && !props.disabled) {\n return {\n root: {\n '--radio-icon-color': theme.colors.gray[7],\n '--radio-color': theme.colors.gray[2],\n },\n };\n }\n return {root: {}};\n },\n }),\n ScrollArea: ScrollArea.extend({\n classNames: {viewport: ScrollAreaClasses.viewport},\n }),\n SegmentedControl: SegmentedControl.extend({\n classNames: SegmentedControlClasses,\n }),\n Select: Select.extend({\n defaultProps: {withCheckIcon: false, allowDeselect: false},\n classNames: {input: SelectClasses.input, option: SelectClasses.option},\n }),\n Skeleton: Skeleton.extend({\n classNames: {root: SkeletonClasses.root},\n }),\n Stepper: Stepper.extend({\n defaultProps: {\n size: 'xs',\n completedIcon: <CheckSize16Px />,\n },\n classNames: {\n step: StepperClasses.step,\n stepIcon: StepperClasses.stepIcon,\n stepCompletedIcon: StepperClasses.stepCompletedIcon,\n stepDescription: StepperClasses.stepDescription,\n separator: StepperClasses.separator,\n verticalSeparator: StepperClasses.verticalSeparator,\n },\n }),\n Switch: Switch.extend({\n classNames: (theme, props) => {\n if (props.readOnly && !props.disabled) {\n return ReadOnlyStateClasses;\n }\n return {};\n },\n vars: (theme, props) => {\n if (props.readOnly && !props.disabled) {\n return {\n root: {},\n track: {\n '--switch-bg': theme.colors.gray[2],\n '--switch-bd': 'transparent',\n },\n thumb: {\n '--switch-thumb-bd': 'transparent',\n },\n };\n }\n return {root: {}, track: {}, thumb: {}};\n },\n }),\n Tabs: Tabs.extend({\n classNames: TabsClasses,\n }),\n TabsTab: Tabs.Tab.extend({\n defaultProps: {\n px: 'sm',\n },\n }),\n Text: Text.extend({\n classNames: TextClasses,\n vars: TextVars,\n }),\n TextInput: TextInput.extend({\n defaultProps: {\n radius: 8,\n },\n }),\n Tooltip: Tooltip.extend({\n defaultProps: {\n color: 'navy',\n maw: 300,\n multiline: true,\n withArrow: true,\n zIndex: 10000,\n },\n classNames: TooltipClasses,\n }),\n },\n});\n"],"names":["plasmaTheme","createTheme","fontFamily","black","color","primary","gray","defaultRadius","lineHeights","md","spacing","xxs","xs","sm","lg","xl","primaryColor","headings","fontWeight","sizes","h1","fontSize","lineHeight","h2","h3","h4","h5","h6","shadows","colors","PlasmaColors","components","ActionIcon","extend","classNames","root","ActionIconClasses","Alert","defaultProps","icon","InfoSize16Px","height","AlertClasses","Anchor","AnchorClasses","AppShellNavbar","navbar","AppShellNavBarClasses","Badge","BadgeClasses","variant","Button","ButtonClasses","Checkbox","radius","theme","props","readOnly","disabled","deepMerge","CheckboxClasses","ReadOnlyStateClasses","vars","CloseButton","CrossSize16Px","aria-label","ColorSwatch","size","withShadow","Combobox","option","SelectClasses","search","ComboboxClasses","ComboboxSearch","placeholder","rightSection","FilterSize16Px","DatePicker","monthCell","DatePickerClasses","Divider","Input","_theme","anyProps","includes","__staticSelector","InputClasses","ReadOnlyInputClasses","InputWrapper","InputWrapperClasses","label","red","error","description","Loader","type","role","List","ListClasses","MenuItem","fw","Modal","ModalClasses","ModalOverlay","Overlay","navy","backgroundOpacity","ModalRoot","Root","padding","MultiSelect","hidePickedOptions","NavLink","NavLinkClasses","Notification","InfoSize24Px","NotificationClasses","closeButton","NotificationVars","Pagination","PaginationClasses","nextIcon","ArrowHeadRightSize16Px","previousIcon","ArrowHeadLeftSize16Px","Popover","shadow","withArrow","Radio","RadioClasses","ScrollArea","viewport","ScrollAreaClasses","SegmentedControl","SegmentedControlClasses","Select","withCheckIcon","allowDeselect","input","Skeleton","SkeletonClasses","Stepper","completedIcon","CheckSize16Px","step","StepperClasses","stepIcon","stepCompletedIcon","stepDescription","separator","verticalSeparator","Switch","track","thumb","Tabs","TabsClasses","TabsTab","Tab","px","Text","TextClasses","TextVars","TextInput","Tooltip","maw","multiline","zIndex","TooltipClasses"],"mappings":";;;;+BAiFaA;;;eAAAA;;;;;gCAzEN;4BACa;oBAuCb;qBACkB;4EACK;uEACL;wEACC;gFACQ;uEACT;wEACC;0EACE;0EACA;4EACE;uEACL;8EACO;sEACR;uEACC;yEACE;8EACK;4EACF;uEACL;+EACQ;+EACA;4EACH;kFACM;wEACV;0EACE;yEACD;sEACH;sEACA;yEACG;gCACI;wBACR;4BACI;AAEpB,IAAMA,cAAoCC,IAAAA,iBAAW,EAAC;IACzD,gJAAgJ;IAChJC,YAAY;IACZC,OAAOC,mBAAK,CAACC,OAAO,CAACC,IAAI,CAAC,EAAE;IAC5BC,eAAe;IACfC,aAAa;QAACC,IAAI;IAAK;IACvBC,SAAS;QACLC,KAAK;QACLC,IAAI;QACJC,IAAI;QACJJ,IAAI;QACJK,IAAI;QACJC,IAAI;IACR;IACAC,cAAc;IACdC,UAAU;QACNf,YAAY;QACZgB,YAAY;QACZC,OAAO;YACHC,IAAI;gBAACC,UAAU;gBAAQC,YAAY;gBAAOJ,YAAY;YAAK;YAC3DK,IAAI;gBAACF,UAAU;gBAAQC,YAAY;gBAAOJ,YAAY;YAAK;YAC3DM,IAAI;gBAACH,UAAU;gBAAQC,YAAY;gBAAOJ,YAAY;YAAK;YAC3DO,IAAI;gBAACJ,UAAU;gBAAQC,YAAY;gBAAOJ,YAAY;YAAK;YAC3DQ,IAAI;gBAACL,UAAU;gBAAQC,YAAY;gBAAOJ,YAAY;YAAK;YAC3DS,IAAI;gBAACN,UAAU;gBAAQC,YAAY;gBAAOJ,YAAY;YAAK;QAC/D;IACJ;IACAU,SAAS;Q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BK,cAAc;gBACVyH,IAAI;YACR;QACJ;QACAC,MAAMA,UAAI,CAAC/H,MAAM,CAAC;YACdC,YAAY+H,sBAAW;YACvBnG,MAAMoG,kBAAQ;QAClB;QACAC,WAAWA,eAAS,CAAClI,MAAM,CAAC;YACxBK,cAAc;gBACVgB,QAAQ;YACZ;QACJ;QACA8G,SAASA,aAAO,CAACnI,MAAM,CAAC;YACpBK,cAAc;gBACVlC,OAAO;gBACPiK,KAAK;gBACLC,WAAW;gBACXtC,WAAW;gBACXuC,QAAQ;YACZ;YACArI,YAAYsI,yBAAc;QAC9B;IACJ;AACJ"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { CollapseProps, Factory, StylesApiProps } from '@mantine/core';
|
|
2
|
+
export type ChildFormStylesNames = 'root' | 'paper';
|
|
3
|
+
export interface ChildFormProps extends CollapseProps, StylesApiProps<ChildFormFactory> {
|
|
4
|
+
/**
|
|
5
|
+
* Title of the child form.
|
|
6
|
+
*/
|
|
7
|
+
title?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Description of the child form.
|
|
10
|
+
*/
|
|
11
|
+
description?: string;
|
|
12
|
+
}
|
|
13
|
+
type ChildFormFactory = Factory<{
|
|
14
|
+
props: ChildFormProps;
|
|
15
|
+
defaultRef: HTMLDivElement;
|
|
16
|
+
defaultComponent: 'div';
|
|
17
|
+
stylesNames: ChildFormStylesNames;
|
|
18
|
+
}>;
|
|
19
|
+
export declare const ChildForm: (<C = "div">(props: import("@mantine/core").PolymorphicComponentProps<C, ChildFormProps>) => React.ReactElement) & Omit<import("react").FunctionComponent<(ChildFormProps & {
|
|
20
|
+
component?: any;
|
|
21
|
+
} & Omit<Omit<any, "ref">, "component" | keyof ChildFormProps> & {
|
|
22
|
+
ref?: any;
|
|
23
|
+
renderRoot?: ((props: any) => any) | undefined;
|
|
24
|
+
}) | (ChildFormProps & {
|
|
25
|
+
component: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements>;
|
|
26
|
+
renderRoot?: ((props: Record<string, any>) => any) | undefined;
|
|
27
|
+
})>, never> & import("@mantine/core/lib/core/factory/factory").ThemeExtend<{
|
|
28
|
+
props: ChildFormProps;
|
|
29
|
+
defaultRef: HTMLDivElement;
|
|
30
|
+
defaultComponent: "div";
|
|
31
|
+
stylesNames: ChildFormStylesNames;
|
|
32
|
+
}> & import("@mantine/core/lib/core/factory/factory").ComponentClasses<{
|
|
33
|
+
props: ChildFormProps;
|
|
34
|
+
defaultRef: HTMLDivElement;
|
|
35
|
+
defaultComponent: "div";
|
|
36
|
+
stylesNames: ChildFormStylesNames;
|
|
37
|
+
}> & import("@mantine/core/lib/core/factory/polymorphic-factory").PolymorphicComponentWithProps<{
|
|
38
|
+
props: ChildFormProps;
|
|
39
|
+
defaultRef: HTMLDivElement;
|
|
40
|
+
defaultComponent: "div";
|
|
41
|
+
stylesNames: ChildFormStylesNames;
|
|
42
|
+
}>;
|
|
43
|
+
export {};
|
|
44
|
+
//# sourceMappingURL=ChildForm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChildForm.d.ts","sourceRoot":"","sources":["../../../../src/components/child-form/ChildForm.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEH,aAAa,EACb,OAAO,EAIP,cAAc,EAKjB,MAAM,eAAe,CAAC;AAGvB,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG,OAAO,CAAC;AAEpD,MAAM,WAAW,cAAe,SAAQ,aAAa,EAAE,cAAc,CAAC,gBAAgB,CAAC;IACnF;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,KAAK,gBAAgB,GAAG,OAAO,CAAC;IAC5B,KAAK,EAAE,cAAc,CAAC;IACtB,UAAU,EAAE,cAAc,CAAC;IAC3B,gBAAgB,EAAE,KAAK,CAAC;IACxB,WAAW,EAAE,oBAAoB,CAAC;CACrC,CAAC,CAAC;AAIH,eAAO,MAAM,SAAS,+FAClB,MAAE,YAAY;;;;;;sBAST,OACR,gCAEO,OAAF;;;WArBK,cAAc;gBACT,cAAc;sBACR,KAAK;iBACV,oBAAoB;;WAH1B,cAAc;gBACT,cAAc;sBACR,KAAK;iBACV,oBAAoB;;WAH1B,cAAc;gBACT,cAAc;sBACR,KAAK;iBACV,oBAAoB;EAqCnC,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Collapse, Paper, polymorphicFactory, Stack, Text, Title, useProps, useStyles } from '@mantine/core';
|
|
3
|
+
import classes from './ChildForm.module.css';
|
|
4
|
+
const defaultProps = {};
|
|
5
|
+
export const ChildForm = polymorphicFactory((props, ref)=>{
|
|
6
|
+
const { className, children, style, classNames, styles, unstyled, vars, title, description, ...others } = useProps('ChildForm', defaultProps, props);
|
|
7
|
+
const getStyles = useStyles({
|
|
8
|
+
name: 'ChildForm',
|
|
9
|
+
classes,
|
|
10
|
+
props,
|
|
11
|
+
className,
|
|
12
|
+
style,
|
|
13
|
+
classNames,
|
|
14
|
+
styles,
|
|
15
|
+
unstyled,
|
|
16
|
+
vars
|
|
17
|
+
});
|
|
18
|
+
return /*#__PURE__*/ _jsx(Collapse, {
|
|
19
|
+
ref: ref,
|
|
20
|
+
...others,
|
|
21
|
+
...getStyles('root'),
|
|
22
|
+
children: /*#__PURE__*/ _jsxs(Paper, {
|
|
23
|
+
bg: "gray.0",
|
|
24
|
+
p: "md",
|
|
25
|
+
...getStyles('paper'),
|
|
26
|
+
children: [
|
|
27
|
+
(title || description) && /*#__PURE__*/ _jsxs(Stack, {
|
|
28
|
+
gap: 0,
|
|
29
|
+
mb: "md",
|
|
30
|
+
children: [
|
|
31
|
+
title && /*#__PURE__*/ _jsx(Title, {
|
|
32
|
+
order: 5,
|
|
33
|
+
children: title
|
|
34
|
+
}),
|
|
35
|
+
description && /*#__PURE__*/ _jsx(Text, {
|
|
36
|
+
c: "gray.7",
|
|
37
|
+
children: description
|
|
38
|
+
})
|
|
39
|
+
]
|
|
40
|
+
}),
|
|
41
|
+
/*#__PURE__*/ _jsx(Stack, {
|
|
42
|
+
gap: "md",
|
|
43
|
+
children: children
|
|
44
|
+
})
|
|
45
|
+
]
|
|
46
|
+
})
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
//# sourceMappingURL=ChildForm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/child-form/ChildForm.tsx"],"sourcesContent":["import {\n Collapse,\n CollapseProps,\n Factory,\n Paper,\n polymorphicFactory,\n Stack,\n StylesApiProps,\n Text,\n Title,\n useProps,\n useStyles,\n} from '@mantine/core';\nimport classes from './ChildForm.module.css';\n\nexport type ChildFormStylesNames = 'root' | 'paper';\n\nexport interface ChildFormProps extends CollapseProps, StylesApiProps<ChildFormFactory> {\n /**\n * Title of the child form.\n */\n title?: string;\n /**\n * Description of the child form.\n */\n description?: string;\n}\n\ntype ChildFormFactory = Factory<{\n props: ChildFormProps;\n defaultRef: HTMLDivElement;\n defaultComponent: 'div';\n stylesNames: ChildFormStylesNames;\n}>;\n\nconst defaultProps: Partial<ChildFormProps> = {};\n\nexport const ChildForm = polymorphicFactory<ChildFormFactory>((props, ref) => {\n const {className, children, style, classNames, styles, unstyled, vars, title, description, ...others} = useProps(\n 'ChildForm',\n defaultProps,\n props,\n );\n\n const getStyles = useStyles<ChildFormFactory>({\n name: 'ChildForm',\n classes,\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n vars,\n });\n\n return (\n <Collapse ref={ref} {...others} {...getStyles('root')}>\n <Paper bg=\"gray.0\" p=\"md\" {...getStyles('paper')}>\n {(title || description) && (\n <Stack gap={0} mb=\"md\">\n {title && <Title order={5}>{title}</Title>}\n {description && <Text c=\"gray.7\">{description}</Text>}\n </Stack>\n )}\n <Stack gap=\"md\">{children}</Stack>\n </Paper>\n </Collapse>\n );\n});\n"],"names":["Collapse","Paper","polymorphicFactory","Stack","Text","Title","useProps","useStyles","classes","defaultProps","ChildForm","props","ref","className","children","style","classNames","styles","unstyled","vars","title","description","others","getStyles","name","bg","p","gap","mb","order","c"],"mappings":";AAAA,SACIA,QAAQ,EAGRC,KAAK,EACLC,kBAAkB,EAClBC,KAAK,EAELC,IAAI,EACJC,KAAK,EACLC,QAAQ,EACRC,SAAS,QACN,gBAAgB;AACvB,OAAOC,aAAa,yBAAyB;AAsB7C,MAAMC,eAAwC,CAAC;AAE/C,OAAO,MAAMC,YAAYR,mBAAqC,CAACS,OAAOC;IAClE,MAAM,EAACC,SAAS,EAAEC,QAAQ,EAAEC,KAAK,EAAEC,UAAU,EAAEC,MAAM,EAAEC,QAAQ,EAAEC,IAAI,EAAEC,KAAK,EAAEC,WAAW,EAAE,GAAGC,QAAO,GAAGhB,SACpG,aACAG,cACAE;IAGJ,MAAMY,YAAYhB,UAA4B;QAC1CiB,MAAM;QACNhB;QACAG;QACAE;QACAE;QACAC;QACAC;QACAC;QACAC;IACJ;IAEA,qBACI,KAACnB;QAASY,KAAKA;QAAM,GAAGU,MAAM;QAAG,GAAGC,UAAU,OAAO;kBACjD,cAAA,MAACtB;YAAMwB,IAAG;YAASC,GAAE;YAAM,GAAGH,UAAU,QAAQ;;gBAC1CH,CAAAA,SAASC,WAAU,mBACjB,MAAClB;oBAAMwB,KAAK;oBAAGC,IAAG;;wBACbR,uBAAS,KAACf;4BAAMwB,OAAO;sCAAIT;;wBAC3BC,6BAAe,KAACjB;4BAAK0B,GAAE;sCAAUT;;;;8BAG1C,KAAClB;oBAAMwB,KAAI;8BAAMb;;;;;AAIjC,GAAG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/child-form/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/child-form/index.ts"],"sourcesContent":["export * from './ChildForm';\n"],"names":[],"mappings":"AAAA,cAAc,cAAc"}
|