@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
|
@@ -30,8 +30,6 @@ export const EllipsisText = polymorphicFactory((props, ref)=>{
|
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
32
|
onMouseLeave: ()=>setShowTooltip(false),
|
|
33
|
-
display: "flex",
|
|
34
|
-
w: "100%",
|
|
35
33
|
className: clsx(rootClass, {
|
|
36
34
|
[classes.noWrap]: !lineClamp
|
|
37
35
|
}),
|
|
@@ -43,6 +41,8 @@ export const EllipsisText = polymorphicFactory((props, ref)=>{
|
|
|
43
41
|
...tooltipProps,
|
|
44
42
|
...getStyles('tooltip'),
|
|
45
43
|
children: /*#__PURE__*/ _jsx(Text, {
|
|
44
|
+
span: true,
|
|
45
|
+
inherit: true,
|
|
46
46
|
variant: variant,
|
|
47
47
|
ref: textRef,
|
|
48
48
|
className: clsx(textClass, {
|
|
@@ -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":["Box","polymorphicFactory","Text","Tooltip","useProps","useStyles","useRef","useState","clsx","classes","defaultProps","tooltipProps","EllipsisText","props","ref","className","children","style","classNames","styles","unstyled","variant","lineClamp","others","getStyles","name","showTooltip","setShowTooltip","textRef","rootClass","rootStyles","textClass","textStyles","onMouseEnter","current","isOverflowing","onMouseLeave","noWrap","label","opened","span","inherit","ellipsis","h","scrollWidth","clientWidth","scrollHeight","clientHeight"],"mappings":";AAAA,SACIA,GAAG,EAGHC,kBAAkB,EAElBC,IAAI,EAEJC,OAAO,EAEPC,QAAQ,EACRC,SAAS,QACN,gBAAgB;AACvB,SAAmBC,MAAM,EAAEC,QAAQ,QAAO,QAAQ;AAClD,OAAOC,UAAU,OAAO;AACxB,OAAOC,aAAa,4BAA4B;AAmBhD,MAAMC,eAA2C;IAC7CC,cAAc,CAAC;AACnB;AAEA,OAAO,MAAMC,eAAeX,mBAAwC,CAACY,OAAOC;IACxE,MAAM,EAACC,SAAS,EAAEC,QAAQ,EAAEC,KAAK,EAAEC,UAAU,EAAEC,MAAM,EAAEC,QAAQ,EAAEC,OAAO,EAAEC,SAAS,EAAEX,YAAY,EAAE,GAAGY,QAAO,GACzGnB,SAAS,gBAAgBM,cAAcG;IAE3C,MAAMW,YAAYnB,UAA+B;QAC7CoB,MAAM;QACNhB;QACAI;QACAE;QACAE;QACAC;QACAC;QACAC;IACJ;IAEA,MAAM,CAACM,aAAaC,eAAe,GAAGpB,SAAS;IAC/C,MAAMqB,UAAUtB;IAEhB,MAAM,EAACS,WAAWc,SAAS,EAAE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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"}
|
|
@@ -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":"AAAA,cAAc,gBAAgB;AAC9B,cAAc,gBAAgB;AAC9B,cAAc,oBAAoB;AAClC,cAAc,WAAW;AACzB,cAAc,gBAAgB;AAC9B,cAAc,eAAe;AAC7B,cAAc,oBAAoB;AAClC,cAAc,sBAAsB;AACpC,cAAc,kBAAkB;AAChC,cAAc,WAAW;AACzB,cAAc,mBAAmB;AACjC,cAAc,SAAS;AACvB,cAAc,WAAW;AACzB,cAAc,cAAc;AAC5B,cAAc,kBAAkB;AAChC,cAAc,UAAU"}
|
|
1
|
+
{"version":3,"sources":["../../../src/components/index.ts"],"sourcesContent":["export * from './action-icon';\nexport * from './blank-slate';\nexport * from './browser-preview';\nexport * from './button';\nexport * from './code-editor';\nexport * from './collection';\nexport * from './copyToClipboard';\nexport * from './date-range-picker';\nexport * from './ellipsis-text';\nexport * from './header';\nexport * from './inline-confirm';\nexport * from './menu';\nexport * from './prompt';\nexport * from './read-only';\nexport * from './sticky-footer';\nexport * from './table';\nexport * from './child-form';\n"],"names":[],"mappings":"AAAA,cAAc,gBAAgB;AAC9B,cAAc,gBAAgB;AAC9B,cAAc,oBAAoB;AAClC,cAAc,WAAW;AACzB,cAAc,gBAAgB;AAC9B,cAAc,eAAe;AAC7B,cAAc,oBAAoB;AAClC,cAAc,sBAAsB;AACpC,cAAc,kBAAkB;AAChC,cAAc,WAAW;AACzB,cAAc,mBAAmB;AACjC,cAAc,SAAS;AACvB,cAAc,WAAW;AACzB,cAAc,cAAc;AAC5B,cAAc,kBAAkB;AAChC,cAAc,UAAU;AACxB,cAAc,eAAe"}
|
|
@@ -1,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"}
|
|
@@ -5,7 +5,7 @@ import { useTableContext } from '../TableContext';
|
|
|
5
5
|
const defaultProps = {};
|
|
6
6
|
export const TablePredicate = factory((props, ref)=>{
|
|
7
7
|
const { store, getStyles } = useTableContext();
|
|
8
|
-
const { id, data, label, classNames, className, styles, style, renderOption, vars, ...others } = useProps('PlasmaTablePredicate', defaultProps, props);
|
|
8
|
+
const { id, data, label, classNames, className, styles, style, renderOption, comboboxProps, vars, ...others } = useProps('PlasmaTablePredicate', defaultProps, props);
|
|
9
9
|
const handleChange = (newValue)=>{
|
|
10
10
|
store.setPredicates((prev)=>({
|
|
11
11
|
...prev,
|
|
@@ -32,6 +32,7 @@ export const TablePredicate = factory((props, ref)=>{
|
|
|
32
32
|
...others,
|
|
33
33
|
children: /*#__PURE__*/ _jsxs(Group, {
|
|
34
34
|
gap: "xs",
|
|
35
|
+
wrap: "nowrap",
|
|
35
36
|
...getStyles('predicateWrapper', stylesApiProps),
|
|
36
37
|
children: [
|
|
37
38
|
label ? /*#__PURE__*/ _jsxs(Text, {
|
|
@@ -43,7 +44,8 @@ export const TablePredicate = factory((props, ref)=>{
|
|
|
43
44
|
}) : null,
|
|
44
45
|
/*#__PURE__*/ _jsx(Select, {
|
|
45
46
|
comboboxProps: {
|
|
46
|
-
withinPortal: true
|
|
47
|
+
withinPortal: true,
|
|
48
|
+
...comboboxProps
|
|
47
49
|
},
|
|
48
50
|
value: store.state.predicates[id],
|
|
49
51
|
onChange: handleChange,
|
|
@@ -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":["factory","Grid","Group","Select","Text","useProps","TableComponentsOrder","useTableContext","defaultProps","TablePredicate","props","ref","store","getStyles","id","data","label","classNames","className","styles","style","renderOption","comboboxProps","vars","others","handleChange","newValue","setPredicates","prev","setPagination","pageIndex","stylesApiProps","Col","span","order","Predicate","gap","wrap","withinPortal","value","state","predicates","onChange","aria-label","searchable","length"],"mappings":";AAAA,SAIIA,OAAO,EAEPC,IAAI,EACJC,KAAK,EACLC,MAAM,EAENC,IAAI,EACJC,QAAQ,QACL,gBAAgB;AAGvB,SAAQC,oBAAoB,QAAO,WAAW;AAC9C,SAAQC,eAAe,QAAO,kBAAkB;AA8BhD,MAAMC,eAA6C,CAAC;AAEpD,OAAO,MAAMC,iBAAyDT,QAA+B,CAACU,OAAOC;IACzG,MAAM,EAACC,KAAK,EAAEC,SAAS,EAAC,GAAGN;IAC3B,MAAM,EAACO,EAAE,EAAEC,IAAI,EAAEC,KAAK,EAAEC,UAAU,EAAEC,SAAS,EAAEC,MAAM,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|
+
{"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/esm/theme/Theme.js
CHANGED
|
@@ -197,9 +197,8 @@ export const plasmaTheme = createTheme({
|
|
|
197
197
|
}
|
|
198
198
|
}),
|
|
199
199
|
Input: Input.extend({
|
|
200
|
-
classNames: (
|
|
200
|
+
classNames: (_theme, props)=>{
|
|
201
201
|
const anyProps = props;
|
|
202
|
-
// eslint-disable-next-line no-underscore-dangle
|
|
203
202
|
if (anyProps.readOnly && !props.disabled && ![
|
|
204
203
|
'Select'
|
|
205
204
|
].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":["ArrowHeadLeftSize16Px","ArrowHeadRightSize16Px","CheckSize16Px","CrossSize16Px","FilterSize16Px","InfoSize16Px","InfoSize24Px","color","ActionIcon","Alert","Anchor","AppShellNavbar","Badge","Button","Checkbox","CloseButton","ColorSwatch","Combobox","ComboboxSearch","createTheme","deepMerge","Divider","Input","InputWrapper","List","Loader","MenuItem","Modal","MultiSelect","NavLink","Notification","Pagination","Popover","Radio","ScrollArea","SegmentedControl","Select","Skeleton","Stepper","Switch","Tabs","Text","TextInput","Tooltip","DatePicker","ActionIconClasses","AlertClasses","AnchorClasses","AppShellNavBarClasses","BadgeClasses","ButtonClasses","CheckboxClasses","ComboboxClasses","DatePickerClasses","InputClasses","InputWrapperClasses","ListClasses","ModalClasses","NavLinkClasses","NotificationClasses","PaginationClasses","RadioClasses","ReadOnlyInputClasses","ReadOnlyStateClasses","ScrollAreaClasses","SegmentedControlClasses","SelectClasses","SkeletonClasses","StepperClasses","TabsClasses","TextClasses","TooltipClasses","NotificationVars","TextVars","PlasmaColors","plasmaTheme","fontFamily","black","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","components","extend","classNames","root","defaultProps","icon","height","navbar","variant","radius","theme","props","readOnly","disabled","vars","aria-label","size","withShadow","option","search","placeholder","rightSection","monthCell","anyProps","includes","__staticSelector","label","red","error","description","type","role","fw","ModalOverlay","Overlay","navy","backgroundOpacity","ModalRoot","Root","padding","hidePickedOptions","closeButton","nextIcon","previousIcon","shadow","withArrow","viewport","withCheckIcon","allowDeselect","input","completedIcon","step","stepIcon","stepCompletedIcon","stepDescription","separator","verticalSeparator","track","thumb","TabsTab","Tab","px","maw","multiline","zIndex"],"mappings":";AAAA,SACIA,qBAAqB,EACrBC,sBAAsB,EACtBC,aAAa,EACbC,aAAa,EACbC,cAAc,EACdC,YAAY,EACZC,YAAY,QACT,8BAA8B;AACrC,SAAQC,KAAK,QAAO,yBAAyB;AAC7C,SACIC,UAAU,EACVC,KAAK,EACLC,MAAM,EACNC,cAAc,EACdC,KAAK,EACLC,MAAM,EACNC,QAAQ,EACRC,WAAW,EACXC,WAAW,EACXC,QAAQ,EACRC,cAAc,EACdC,WAAW,EACXC,SAAS,EACTC,OAAO,EACPC,KAAK,EACLC,YAAY,EACZC,IAAI,EACJC,MAAM,EAENC,QAAQ,EACRC,KAAK,EACLC,WAAW,EACXC,OAAO,EACPC,YAAY,EACZC,UAAU,EACVC,OAAO,EACPC,KAAK,EACLC,UAAU,EACVC,gBAAgB,EAChBC,MAAM,EACNC,QAAQ,EACRC,OAAO,EACPC,MAAM,EACNC,IAAI,EACJC,IAAI,EACJC,SAAS,EACTC,OAAO,QACJ,gBAAgB;AACvB,SAAQC,UAAU,QAAO,iBAAiB;AAC1C,OAAOC,uBAAuB,kCAAkC;AAChE,OAAOC,kBAAkB,6BAA6B;AACtD,OAAOC,mBAAmB,8BAA8B;AACxD,OAAOC,2BAA2B,sCAAsC;AACxE,OAAOC,kBAAkB,6BAA6B;AACtD,OAAOC,mBAAmB,8BAA8B;AACxD,OAAOC,qBAAqB,gCAAgC;AAC5D,OAAOC,qBAAqB,gCAAgC;AAC5D,OAAOC,uBAAuB,kCAAkC;AAChE,OAAOC,kBAAkB,6BAA6B;AACtD,OAAOC,yBAAyB,oCAAoC;AACpE,OAAOC,iBAAiB,4BAA4B;AACpD,OAAOC,kBAAkB,6BAA6B;AACtD,OAAOC,oBAAo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iBAAiBzF,eAAeyF,eAAe;gBAC/CC,WAAW1F,eAAe0F,SAAS;gBACnCC,mBAAmB3F,eAAe2F,iBAAiB;YACvD;QACJ;QACAxH,QAAQA,OAAOiE,MAAM,CAAC;YAClBC,YAAY,CAACQ,OAAOC;gBAChB,IAAIA,MAAMC,QAAQ,IAAI,CAACD,MAAME,QAAQ,EAAE;oBACnC,OAAOrD;gBACX;gBACA,OAAO,CAAC;YACZ;YACAsD,MAAM,CAACJ,OAAOC;gBACV,IAAIA,MAAMC,QAAQ,IAAI,CAACD,MAAME,QAAQ,EAAE;oBACnC,OAAO;wBACHV,MAAM,CAAC;wBACPsD,OAAO;4BACH,eAAe/C,MAAMX,MAAM,CAACvB,IAAI,CAAC,EAAE;4BACnC,eAAe;wBACnB;wBACAkF,OAAO;4BACH,qBAAqB;wBACzB;oBACJ;gBACJ;gBACA,OAAO;oBAACvD,MAAM,CAAC;oBAAGsD,OAAO,CAAC;oBAAGC,OAAO,CAAC;gBAAC;YAC1C;QACJ;QACAzH,MAAMA,KAAKgE,MAAM,CAAC;YACdC,YAAYpC;QAChB;QACA6F,SAAS1H,KAAK2H,GAAG,CAAC3D,MAAM,CAAC;YACrBG,cAAc;gBACVyD,IAAI;YACR;QACJ;QACA3H,MAAMA,KAAK+D,MAAM,CAAC;YACdC,YAAYnC;YACZ+C,MAAM5C;QACV;QACA/B,WAAWA,UAAU8D,MAAM,CAAC;YACxBG,cAAc;gBACVK,QAAQ;YACZ;QACJ;QACArE,SAASA,QAAQ6D,MAAM,CAAC;YACpBG,cAAc;gBACVpG,OAAO;gBACP8J,KAAK;gBACLC,WAAW;gBACXlB,WAAW;gBACXmB,QAAQ;YACZ;YACA9D,YAAYlC;QAChB;IACJ;AACJ,GAAG"}
|
|
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":["ArrowHeadLeftSize16Px","ArrowHeadRightSize16Px","CheckSize16Px","CrossSize16Px","FilterSize16Px","InfoSize16Px","InfoSize24Px","color","ActionIcon","Alert","Anchor","AppShellNavbar","Badge","Button","Checkbox","CloseButton","ColorSwatch","Combobox","ComboboxSearch","createTheme","deepMerge","Divider","Input","InputWrapper","List","Loader","MenuItem","Modal","MultiSelect","NavLink","Notification","Pagination","Popover","Radio","ScrollArea","SegmentedControl","Select","Skeleton","Stepper","Switch","Tabs","Text","TextInput","Tooltip","DatePicker","ActionIconClasses","AlertClasses","AnchorClasses","AppShellNavBarClasses","BadgeClasses","ButtonClasses","CheckboxClasses","ComboboxClasses","DatePickerClasses","InputClasses","InputWrapperClasses","ListClasses","ModalClasses","NavLinkClasses","NotificationClasses","PaginationClasses","RadioClasses","ReadOnlyInputClasses","ReadOnlyStateClasses","ScrollAreaClasses","SegmentedControlClasses","SelectClasses","SkeletonClasses","StepperClasses","TabsClasses","TextClasses","TooltipClasses","NotificationVars","TextVars","PlasmaColors","plasmaTheme","fontFamily","black","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","components","extend","classNames","root","defaultProps","icon","height","navbar","variant","radius","theme","props","readOnly","disabled","vars","aria-label","size","withShadow","option","search","placeholder","rightSection","monthCell","_theme","anyProps","includes","__staticSelector","label","red","error","description","type","role","fw","ModalOverlay","Overlay","navy","backgroundOpacity","ModalRoot","Root","padding","hidePickedOptions","closeButton","nextIcon","previousIcon","shadow","withArrow","viewport","withCheckIcon","allowDeselect","input","completedIcon","step","stepIcon","stepCompletedIcon","stepDescription","separator","verticalSeparator","track","thumb","TabsTab","Tab","px","maw","multiline","zIndex"],"mappings":";AAAA,SACIA,qBAAqB,EACrBC,sBAAsB,EACtBC,aAAa,EACbC,aAAa,EACbC,cAAc,EACdC,YAAY,EACZC,YAAY,QACT,8BAA8B;AACrC,SAAQC,KAAK,QAAO,yBAAyB;AAC7C,SACIC,UAAU,EACVC,KAAK,EACLC,MAAM,EACNC,cAAc,EACdC,KAAK,EACLC,MAAM,EACNC,QAAQ,EACRC,WAAW,EACXC,WAAW,EACXC,QAAQ,EACRC,cAAc,EACdC,WAAW,EACXC,SAAS,EACTC,OAAO,EACPC,KAAK,EACLC,YAAY,EACZC,IAAI,EACJC,MAAM,EAENC,QAAQ,EACRC,KAAK,EACLC,WAAW,EACXC,OAAO,EACPC,YAAY,EACZC,UAAU,EACVC,OAAO,EACPC,KAAK,EACLC,UAAU,EACVC,gBAAgB,EAChBC,MAAM,EACNC,QAAQ,EAC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AAC5D,MAAM,CAAC;YACrBG,cAAc;gBACV0D,IAAI;YACR;QACJ;QACA5H,MAAMA,KAAK+D,MAAM,CAAC;YACdC,YAAYnC;YACZ+C,MAAM5C;QACV;QACA/B,WAAWA,UAAU8D,MAAM,CAAC;YACxBG,cAAc;gBACVK,QAAQ;YACZ;QACJ;QACArE,SAASA,QAAQ6D,MAAM,CAAC;YACpBG,cAAc;gBACVpG,OAAO;gBACP+J,KAAK;gBACLC,WAAW;gBACXlB,WAAW;gBACXmB,QAAQ;YACZ;YACA/D,YAAYlC;QAChB;IACJ;AACJ,GAAG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coveord/plasma-mantine",
|
|
3
|
-
"version": "55.1
|
|
3
|
+
"version": "55.2.1",
|
|
4
4
|
"description": "A Plasma flavoured Mantine theme",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"plasma",
|
|
@@ -42,27 +42,27 @@
|
|
|
42
42
|
"lodash.debounce": "4.0.8",
|
|
43
43
|
"lodash.defaultsdeep": "4.6.1",
|
|
44
44
|
"monaco-editor": "0.52.0",
|
|
45
|
-
"@coveord/plasma-react-icons": "55.
|
|
46
|
-
"@coveord/plasma-tokens": "55.
|
|
45
|
+
"@coveord/plasma-react-icons": "55.2.1",
|
|
46
|
+
"@coveord/plasma-tokens": "55.2.1"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@mantine/carousel": "7.13.
|
|
50
|
-
"@mantine/code-highlight": "7.13.
|
|
51
|
-
"@mantine/core": "7.13.
|
|
52
|
-
"@mantine/dates": "7.13.
|
|
53
|
-
"@mantine/form": "7.13.
|
|
54
|
-
"@mantine/hooks": "7.13.
|
|
55
|
-
"@mantine/modals": "7.13.
|
|
56
|
-
"@mantine/notifications": "7.13.
|
|
57
|
-
"@swc/cli": "0.
|
|
58
|
-
"@swc/core": "1.
|
|
49
|
+
"@mantine/carousel": "7.13.4",
|
|
50
|
+
"@mantine/code-highlight": "7.13.4",
|
|
51
|
+
"@mantine/core": "7.13.4",
|
|
52
|
+
"@mantine/dates": "7.13.4",
|
|
53
|
+
"@mantine/form": "7.13.4",
|
|
54
|
+
"@mantine/hooks": "7.13.4",
|
|
55
|
+
"@mantine/modals": "7.13.4",
|
|
56
|
+
"@mantine/notifications": "7.13.4",
|
|
57
|
+
"@swc/cli": "0.5.0",
|
|
58
|
+
"@swc/core": "1.8.0",
|
|
59
59
|
"@testing-library/dom": "10.4.0",
|
|
60
|
-
"@testing-library/jest-dom": "6.6.
|
|
60
|
+
"@testing-library/jest-dom": "6.6.3",
|
|
61
61
|
"@testing-library/react": "16.0.1",
|
|
62
62
|
"@testing-library/user-event": "14.5.2",
|
|
63
63
|
"@types/lodash.debounce": "4.0.9",
|
|
64
64
|
"@types/lodash.defaultsdeep": "4.6.9",
|
|
65
|
-
"@types/react": "18.3.
|
|
65
|
+
"@types/react": "18.3.12",
|
|
66
66
|
"@types/react-dom": "18.3.1",
|
|
67
67
|
"embla-carousel-react": "7.1.0",
|
|
68
68
|
"identity-obj-proxy": "3.0.0",
|
|
@@ -70,14 +70,14 @@
|
|
|
70
70
|
"postcss": "8.4.47",
|
|
71
71
|
"postcss-preset-mantine": "^1.11.0",
|
|
72
72
|
"postcss-simple-vars": "^7.0.1",
|
|
73
|
-
"publint": "0.2.
|
|
73
|
+
"publint": "0.2.12",
|
|
74
74
|
"react": "18.3.1",
|
|
75
75
|
"react-dom": "18.3.1",
|
|
76
76
|
"rimraf": "6.0.1",
|
|
77
|
-
"sass": "1.80.
|
|
78
|
-
"tslib": "2.8.
|
|
77
|
+
"sass": "1.80.6",
|
|
78
|
+
"tslib": "2.8.1",
|
|
79
79
|
"typescript": "5.6.3",
|
|
80
|
-
"vitest": "2.1.
|
|
80
|
+
"vitest": "2.1.4"
|
|
81
81
|
},
|
|
82
82
|
"peerDependencies": {
|
|
83
83
|
"@mantine/carousel": "^7.6.1",
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Collapse,
|
|
3
|
+
CollapseProps,
|
|
4
|
+
Factory,
|
|
5
|
+
Paper,
|
|
6
|
+
polymorphicFactory,
|
|
7
|
+
Stack,
|
|
8
|
+
StylesApiProps,
|
|
9
|
+
Text,
|
|
10
|
+
Title,
|
|
11
|
+
useProps,
|
|
12
|
+
useStyles,
|
|
13
|
+
} from '@mantine/core';
|
|
14
|
+
import classes from './ChildForm.module.css';
|
|
15
|
+
|
|
16
|
+
export type ChildFormStylesNames = 'root' | 'paper';
|
|
17
|
+
|
|
18
|
+
export interface ChildFormProps extends CollapseProps, StylesApiProps<ChildFormFactory> {
|
|
19
|
+
/**
|
|
20
|
+
* Title of the child form.
|
|
21
|
+
*/
|
|
22
|
+
title?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Description of the child form.
|
|
25
|
+
*/
|
|
26
|
+
description?: string;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
type ChildFormFactory = Factory<{
|
|
30
|
+
props: ChildFormProps;
|
|
31
|
+
defaultRef: HTMLDivElement;
|
|
32
|
+
defaultComponent: 'div';
|
|
33
|
+
stylesNames: ChildFormStylesNames;
|
|
34
|
+
}>;
|
|
35
|
+
|
|
36
|
+
const defaultProps: Partial<ChildFormProps> = {};
|
|
37
|
+
|
|
38
|
+
export const ChildForm = polymorphicFactory<ChildFormFactory>((props, ref) => {
|
|
39
|
+
const {className, children, style, classNames, styles, unstyled, vars, title, description, ...others} = useProps(
|
|
40
|
+
'ChildForm',
|
|
41
|
+
defaultProps,
|
|
42
|
+
props,
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
const getStyles = useStyles<ChildFormFactory>({
|
|
46
|
+
name: 'ChildForm',
|
|
47
|
+
classes,
|
|
48
|
+
props,
|
|
49
|
+
className,
|
|
50
|
+
style,
|
|
51
|
+
classNames,
|
|
52
|
+
styles,
|
|
53
|
+
unstyled,
|
|
54
|
+
vars,
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
return (
|
|
58
|
+
<Collapse ref={ref} {...others} {...getStyles('root')}>
|
|
59
|
+
<Paper bg="gray.0" p="md" {...getStyles('paper')}>
|
|
60
|
+
{(title || description) && (
|
|
61
|
+
<Stack gap={0} mb="md">
|
|
62
|
+
{title && <Title order={5}>{title}</Title>}
|
|
63
|
+
{description && <Text c="gray.7">{description}</Text>}
|
|
64
|
+
</Stack>
|
|
65
|
+
)}
|
|
66
|
+
<Stack gap="md">{children}</Stack>
|
|
67
|
+
</Paper>
|
|
68
|
+
</Collapse>
|
|
69
|
+
);
|
|
70
|
+
});
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import {TextInput} from '@mantine/core';
|
|
2
|
+
import {render, screen} from '../../../__tests__/Utils';
|
|
3
|
+
import {ChildForm} from '../ChildForm';
|
|
4
|
+
|
|
5
|
+
describe('ChildForm', () => {
|
|
6
|
+
it('renders the provided title and description', async () => {
|
|
7
|
+
render(<ChildForm in={true} title="This is a title" description="This is a description" />);
|
|
8
|
+
|
|
9
|
+
expect(screen.getByText(/this is a title/i)).toBeInTheDocument();
|
|
10
|
+
expect(screen.getByText(/this is a description/i)).toBeInTheDocument();
|
|
11
|
+
});
|
|
12
|
+
it('renders the content', () => {
|
|
13
|
+
render(
|
|
14
|
+
<ChildForm in={true}>
|
|
15
|
+
<TextInput label="Text input" />
|
|
16
|
+
</ChildForm>,
|
|
17
|
+
);
|
|
18
|
+
|
|
19
|
+
expect(screen.getByRole('textbox', {name: /text input/i})).toBeInTheDocument();
|
|
20
|
+
});
|
|
21
|
+
it('hides the container', () => {
|
|
22
|
+
render(
|
|
23
|
+
<ChildForm in={false}>
|
|
24
|
+
<TextInput label="Text input" />
|
|
25
|
+
</ChildForm>,
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
expect(screen.queryByRole('textbox', {name: /text input/i})).not.toBeInTheDocument();
|
|
29
|
+
});
|
|
30
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ChildForm';
|
|
@@ -66,14 +66,14 @@ export const EllipsisText = polymorphicFactory<EllipsisTextFactory>((props, ref)
|
|
|
66
66
|
}
|
|
67
67
|
}}
|
|
68
68
|
onMouseLeave={() => setShowTooltip(false)}
|
|
69
|
-
display="flex"
|
|
70
|
-
w="100%"
|
|
71
69
|
className={clsx(rootClass, {[classes.noWrap]: !lineClamp})}
|
|
72
70
|
{...rootStyles}
|
|
73
71
|
{...others}
|
|
74
72
|
>
|
|
75
73
|
<Tooltip label={children} opened={showTooltip} {...tooltipProps} {...getStyles('tooltip')}>
|
|
76
74
|
<Text
|
|
75
|
+
span
|
|
76
|
+
inherit
|
|
77
77
|
variant={variant}
|
|
78
78
|
ref={textRef}
|
|
79
79
|
className={clsx(textClass, {[classes.ellipsis]: !lineClamp})}
|
package/src/components/index.ts
CHANGED
|
@@ -20,7 +20,7 @@ export type TablePredicateStylesNames = 'predicate' | 'predicateWrapper' | 'pred
|
|
|
20
20
|
|
|
21
21
|
export interface TablePredicateProps
|
|
22
22
|
extends BoxProps,
|
|
23
|
-
Pick<SelectProps, 'renderOption'>,
|
|
23
|
+
Pick<SelectProps, 'renderOption' | 'comboboxProps'>,
|
|
24
24
|
CompoundStylesApiProps<TablePredicateFactory> {
|
|
25
25
|
/**
|
|
26
26
|
* Unique identifier for this predicate. Will be used to access the selected value in the table state
|
|
@@ -48,11 +48,8 @@ const defaultProps: Partial<TablePredicateProps> = {};
|
|
|
48
48
|
|
|
49
49
|
export const TablePredicate: FunctionComponent<TablePredicateProps> = factory<TablePredicateFactory>((props, ref) => {
|
|
50
50
|
const {store, getStyles} = useTableContext();
|
|
51
|
-
const {id, data, label, classNames, className, styles, style, renderOption, vars, ...others} =
|
|
52
|
-
'PlasmaTablePredicate',
|
|
53
|
-
defaultProps,
|
|
54
|
-
props,
|
|
55
|
-
);
|
|
51
|
+
const {id, data, label, classNames, className, styles, style, renderOption, comboboxProps, vars, ...others} =
|
|
52
|
+
useProps('PlasmaTablePredicate', defaultProps, props);
|
|
56
53
|
|
|
57
54
|
const handleChange = (newValue: string) => {
|
|
58
55
|
store.setPredicates((prev) => ({...prev, [id]: newValue}));
|
|
@@ -69,10 +66,10 @@ export const TablePredicate: FunctionComponent<TablePredicateProps> = factory<Ta
|
|
|
69
66
|
{...getStyles('predicate', {className, style, ...stylesApiProps})}
|
|
70
67
|
{...others}
|
|
71
68
|
>
|
|
72
|
-
<Group gap="xs" {...getStyles('predicateWrapper', stylesApiProps)}>
|
|
69
|
+
<Group gap="xs" wrap="nowrap" {...getStyles('predicateWrapper', stylesApiProps)}>
|
|
73
70
|
{label ? <Text {...getStyles('predicateLabel', stylesApiProps)}>{label}:</Text> : null}
|
|
74
71
|
<Select
|
|
75
|
-
comboboxProps={{withinPortal: true}}
|
|
72
|
+
comboboxProps={{withinPortal: true, ...comboboxProps}}
|
|
76
73
|
value={store.state.predicates[id]}
|
|
77
74
|
onChange={handleChange}
|
|
78
75
|
data={data}
|
package/src/theme/Theme.tsx
CHANGED
|
@@ -194,9 +194,8 @@ export const plasmaTheme: MantineThemeOverride = createTheme({
|
|
|
194
194
|
},
|
|
195
195
|
}),
|
|
196
196
|
Input: Input.extend({
|
|
197
|
-
classNames: (
|
|
197
|
+
classNames: (_theme, props) => {
|
|
198
198
|
const anyProps = props as any;
|
|
199
|
-
// eslint-disable-next-line no-underscore-dangle
|
|
200
199
|
if (anyProps.readOnly && !props.disabled && !['Select'].includes(anyProps.__staticSelector)) {
|
|
201
200
|
return deepMerge(InputClasses, ReadOnlyInputClasses);
|
|
202
201
|
}
|