@coveord/plasma-mantine 56.8.0 → 56.8.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 +4 -4
- package/.turbo/turbo-test.log +108 -104
- package/dist/.tsbuildinfo +1 -1
- package/dist/cjs/components/CodeEditor/languages/xml.d.ts.map +1 -1
- package/dist/cjs/components/CodeEditor/languages/xml.js.map +1 -1
- package/dist/cjs/components/Collection/enhanceWithCollectionProps.d.ts.map +1 -1
- package/dist/cjs/components/Collection/enhanceWithCollectionProps.js.map +1 -1
- package/dist/cjs/components/DateRangePicker/DateRange.module.css +4 -0
- package/dist/cjs/components/DateRangePicker/DateRangePicker.d.ts.map +1 -1
- package/dist/cjs/components/DateRangePicker/DateRangePicker.js +2 -1
- package/dist/cjs/components/DateRangePicker/DateRangePicker.js.map +1 -1
- package/dist/cjs/components/RadioCard/RadioCard.d.ts +26 -0
- package/dist/cjs/components/RadioCard/RadioCard.d.ts.map +1 -0
- package/dist/cjs/components/RadioCard/RadioCard.js +82 -0
- package/dist/cjs/components/RadioCard/RadioCard.js.map +1 -0
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +4 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/styles/RadioCard.module.css +44 -0
- package/dist/esm/components/CodeEditor/languages/xml.d.ts.map +1 -1
- package/dist/esm/components/CodeEditor/languages/xml.js.map +1 -1
- package/dist/esm/components/Collection/enhanceWithCollectionProps.d.ts.map +1 -1
- package/dist/esm/components/Collection/enhanceWithCollectionProps.js.map +1 -1
- package/dist/esm/components/DateRangePicker/DateRange.module.css +4 -0
- package/dist/esm/components/DateRangePicker/DateRangePicker.d.ts.map +1 -1
- package/dist/esm/components/DateRangePicker/DateRangePicker.js +2 -1
- package/dist/esm/components/DateRangePicker/DateRangePicker.js.map +1 -1
- package/dist/esm/components/RadioCard/RadioCard.d.ts +26 -0
- package/dist/esm/components/RadioCard/RadioCard.d.ts.map +1 -0
- package/dist/esm/components/RadioCard/RadioCard.js +63 -0
- package/dist/esm/components/RadioCard/RadioCard.js.map +1 -0
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/styles/RadioCard.module.css +44 -0
- package/package.json +19 -19
- package/src/components/CodeEditor/languages/xml.ts +2 -1
- package/src/components/Collection/enhanceWithCollectionProps.ts +2 -2
- package/src/components/DateRangePicker/DateRange.module.css +4 -0
- package/src/components/DateRangePicker/DateRangePicker.tsx +2 -1
- package/src/components/RadioCard/RadioCard.tsx +73 -0
- package/src/components/RadioCard/__tests__/RadioCard.component.spec.tsx +25 -0
- package/src/index.ts +3 -0
- package/src/styles/RadioCard.module.css +44 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Group, Radio, Title, factory, useProps, useStyles } from '@mantine/core';
|
|
3
|
+
import classes from '../../styles/RadioCard.module.css';
|
|
4
|
+
const defaultProps = {};
|
|
5
|
+
export const RadioCard = factory((_props, ref)=>{
|
|
6
|
+
const { classNames, styles, style, className, vars, disabled, label, description, ...others } = useProps('RadioCard', defaultProps, _props);
|
|
7
|
+
const getStyles = useStyles({
|
|
8
|
+
name: 'RadioCard',
|
|
9
|
+
classes,
|
|
10
|
+
vars,
|
|
11
|
+
classNames,
|
|
12
|
+
className,
|
|
13
|
+
style,
|
|
14
|
+
props: _props,
|
|
15
|
+
styles
|
|
16
|
+
});
|
|
17
|
+
return /*#__PURE__*/ _jsxs(Radio.Card, {
|
|
18
|
+
ref: ref,
|
|
19
|
+
disabled: disabled,
|
|
20
|
+
...getStyles('card', {
|
|
21
|
+
className,
|
|
22
|
+
style,
|
|
23
|
+
classNames,
|
|
24
|
+
styles
|
|
25
|
+
}),
|
|
26
|
+
...others,
|
|
27
|
+
children: [
|
|
28
|
+
/*#__PURE__*/ _jsxs(Group, {
|
|
29
|
+
...getStyles('container', {
|
|
30
|
+
classNames,
|
|
31
|
+
styles
|
|
32
|
+
}),
|
|
33
|
+
children: [
|
|
34
|
+
/*#__PURE__*/ _jsx(Radio.Indicator, {
|
|
35
|
+
size: "xs",
|
|
36
|
+
disabled: disabled,
|
|
37
|
+
...getStyles('indicator', {
|
|
38
|
+
classNames,
|
|
39
|
+
styles
|
|
40
|
+
})
|
|
41
|
+
}),
|
|
42
|
+
/*#__PURE__*/ _jsx(Title, {
|
|
43
|
+
order: 4,
|
|
44
|
+
...getStyles('title', {
|
|
45
|
+
classNames,
|
|
46
|
+
styles
|
|
47
|
+
}),
|
|
48
|
+
children: label
|
|
49
|
+
})
|
|
50
|
+
]
|
|
51
|
+
}),
|
|
52
|
+
description && /*#__PURE__*/ _jsx(Box, {
|
|
53
|
+
...getStyles('description', {
|
|
54
|
+
classNames,
|
|
55
|
+
styles
|
|
56
|
+
}),
|
|
57
|
+
children: description
|
|
58
|
+
})
|
|
59
|
+
]
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
//# sourceMappingURL=RadioCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/RadioCard/RadioCard.tsx"],"sourcesContent":["import {\n Box,\n Factory,\n Group,\n RadioCardProps as MantineRadioCardProps,\n RadioCardStylesNames as MantineRadioCardStylesNames,\n Radio,\n RadioCardCssVariables,\n StylesApiProps,\n Title,\n factory,\n useProps,\n useStyles,\n} from '@mantine/core';\nimport {ReactNode} from 'react';\nimport classes from '../../styles/RadioCard.module.css';\n\nexport type RadioCardStylesNames = MantineRadioCardStylesNames | 'container' | 'indicator' | 'title' | 'description';\nexport type RadioCardFactory = Factory<{\n props: RadioCardProps;\n ref: HTMLButtonElement;\n stylesNames: RadioCardStylesNames;\n vars: RadioCardCssVariables;\n}>;\n\nexport type RadioCardProps = MantineRadioCardProps &\n StylesApiProps<RadioCardFactory> & {\n /**\n * The label of the card. Appears next to the radio indicator.\n */\n label: ReactNode;\n /**\n * The description of the card. Appears under the title.\n */\n description?: ReactNode;\n };\n\nconst defaultProps: Partial<RadioCardProps> = {};\n\nexport const RadioCard = factory<RadioCardFactory>((_props, ref) => {\n const {classNames, styles, style, className, vars, disabled, label, description, ...others} = useProps(\n 'RadioCard',\n defaultProps,\n _props,\n );\n const getStyles = useStyles<RadioCardFactory>({\n name: 'RadioCard',\n classes,\n vars,\n classNames,\n className,\n style,\n props: _props,\n styles,\n });\n\n return (\n <Radio.Card\n ref={ref}\n disabled={disabled}\n {...getStyles('card', {className, style, classNames, styles})}\n {...others}\n >\n <Group {...getStyles('container', {classNames, styles})}>\n <Radio.Indicator size=\"xs\" disabled={disabled} {...getStyles('indicator', {classNames, styles})} />\n <Title order={4} {...getStyles('title', {classNames, styles})}>\n {label}\n </Title>\n </Group>\n {description && <Box {...getStyles('description', {classNames, styles})}>{description}</Box>}\n </Radio.Card>\n );\n});\n"],"names":["Box","Group","Radio","Title","factory","useProps","useStyles","classes","defaultProps","RadioCard","_props","ref","classNames","styles","style","className","vars","disabled","label","description","others","getStyles","name","props","Card","Indicator","size","order"],"mappings":";AAAA,SACIA,GAAG,EAEHC,KAAK,EAGLC,KAAK,EAGLC,KAAK,EACLC,OAAO,EACPC,QAAQ,EACRC,SAAS,QACN,gBAAgB;AAEvB,OAAOC,aAAa,oCAAoC;AAsBxD,MAAMC,eAAwC,CAAC;AAE/C,OAAO,MAAMC,YAAYL,QAA0B,CAACM,QAAQC;IACxD,MAAM,EAACC,UAAU,EAAEC,MAAM,EAAEC,KAAK,EAAEC,SAAS,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,KAAK,EAAEC,WAAW,EAAE,GAAGC,QAAO,GAAGf,SAC1F,aACAG,cACAE;IAEJ,MAAMW,YAAYf,UAA4B;QAC1CgB,MAAM;QACNf;QACAS;QACAJ;QACAG;QACAD;QACAS,OAAOb;QACPG;IACJ;IAEA,qBACI,MAACX,MAAMsB,IAAI;QACPb,KAAKA;QACLM,UAAUA;QACT,GAAGI,UAAU,QAAQ;YAACN;YAAWD;YAAOF;YAAYC;QAAM,EAAE;QAC5D,GAAGO,MAAM;;0BAEV,MAACnB;gBAAO,GAAGoB,UAAU,aAAa;oBAACT;oBAAYC;gBAAM,EAAE;;kCACnD,KAACX,MAAMuB,SAAS;wBAACC,MAAK;wBAAKT,UAAUA;wBAAW,GAAGI,UAAU,aAAa;4BAACT;4BAAYC;wBAAM,EAAE;;kCAC/F,KAACV;wBAAMwB,OAAO;wBAAI,GAAGN,UAAU,SAAS;4BAACT;4BAAYC;wBAAM,EAAE;kCACxDK;;;;YAGRC,6BAAe,KAACnB;gBAAK,GAAGqB,UAAU,eAAe;oBAACT;oBAAYC;gBAAM,EAAE;0BAAGM;;;;AAGtF,GAAG"}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -41,6 +41,7 @@ export { Menu, type MenuItemProps } from './components/Menu/Menu.js';
|
|
|
41
41
|
export { Modal, type ModalFactory, type ModalProps } from './components/Modal/Modal.js';
|
|
42
42
|
export * from './components/Modal/ModalFooter.js';
|
|
43
43
|
export * from './components/Prompt/Prompt.js';
|
|
44
|
+
export { RadioCard, type RadioCardProps } from './components/RadioCard/RadioCard.js';
|
|
44
45
|
export { PasswordInput } from './components/PasswordInput/PasswordInput.js';
|
|
45
46
|
export { Select } from './components/Select/Select.js';
|
|
46
47
|
export * from './components/StickyFooter/StickyFooter.js';
|
package/dist/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,kBAAkB,EAAE,IAAI,EAAC,MAAM,eAAe,CAAC;AACvD,OAAO,EAAC,KAAK,OAAO,EAAC,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAC,KAAK,YAAY,EAAC,MAAM,yBAA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prompt
|
|
63
63
|
export * from './components/Prompt/Prompt.js';
|
|
64
|
+
// RadioCard - override Mantine RadioCard
|
|
65
|
+
export { RadioCard } from './components/RadioCard/RadioCard.js';
|
|
64
66
|
// Read Only - override Mantine PasswordInput and Select
|
|
65
67
|
export { PasswordInput } from './components/PasswordInput/PasswordInput.js';
|
|
66
68
|
export { Select } from './components/Select/Select.js';
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["import {MantineColorsTuple, noop} from '@mantine/core';\nimport {type RowData} from '@tanstack/table-core';\nimport {type PlasmaColors} from './theme/PlasmaColors.js';\n\nexport * from '@mantine/carousel';\nexport * from '@mantine/core';\nexport {Pagination} from '@mantine/core';\nexport {type DatesRangeValue} from '@mantine/dates';\nexport * from '@mantine/form';\nexport * from '@mantine/hooks';\nexport * from '@mantine/notifications';\nexport {type NotificationsProps} from '@mantine/notifications';\nexport * from '@tanstack/table-core';\n\n// Export all components\n// Accordion\nexport {Accordion} from './components/Accordion/Accordion.js';\n\n// Action Icon - override Mantine ActionIcon\nexport {ActionIcon, type ActionIconProps} from './components/ActionIcon/ActionIcon.js';\n\n// Alert - override Mantine Alert\nexport {Alert} from './components/Alert/Alert.js';\n\n// Badge - override Mantine Badge\nexport {\n Badge,\n type BadgeOverloadFactory,\n type SemanticBadge,\n type SemanticBadgeProps,\n} from './components/Badge/Badge.js';\n\n// Blank Slate\nexport * from './components/BlankSlate/BlankSlate.js';\n\n// Browser Preview\nexport * from './components/BrowserPreview/BrowserPreview.js';\n\n// Button - override Mantine Button\nexport {Button, type ButtonProps} from './components/Button/Button.js';\nexport {type ButtonWithDisabledTooltipProps} from './components/Button/ButtonWithDisabledTooltip.js';\n\n// Checkbox\nexport * from './components/CheckboxIcon/CheckboxIcon.js';\n\n// Child Form\nexport * from './components/ChildForm/ChildForm.js';\n\n// Chip - override Mantine Chip\nexport {Chip} from './components/Chip/Chip.js';\n\n// Code Editor\nexport * from './components/CodeEditor/CodeEditor.js';\n\n// Collection\nexport * from './components/Collection/Collection.js';\nexport {enhanceWithCollectionProps} from './components/Collection/enhanceWithCollectionProps.js';\n\n// Copy to Clipboard\nexport * from './components/CopyToClipboard/CopyToClipboard.js';\n\n// Date Range Picker\nexport * from './components/DateRangePicker/DateRangePicker.js';\nexport * from './components/DateRangePicker/DateRangePickerInlineCalendar.js';\nexport * from './components/DateRangePicker/DateRangePickerPopoverCalendar.js';\nexport * from './components/DateRangePicker/DateRangePickerPresetSelect.js';\n\n// Date Time Range Picker\nexport * from './components/DateTimeRangePicker/DateTimeRangePicker.js';\n\n// Ellipsis Text\nexport * from './components/EllipsisText/EllipsisText.js';\n\n// Header - override @tanstack/table-core Header\nexport {\n Header,\n type HeaderBreadcrumbsProps,\n type HeaderDocAnchorProps,\n type HeaderFactory,\n type HeaderProps,\n type HeaderRightProps,\n type HeaderStyleNames,\n type HeaderVariant,\n} from './components/Header/Header.js';\n\n// Info Token\nexport * from './components/InfoToken/InfoToken.js';\n\n// Inline Confirm\nexport * from './components/InlineConfirm/InlineConfirm.js';\nexport * from './components/InlineConfirm/InlineConfirmContext.js';\n\n// Last Updated\nexport * from './components/LastUpdated/LastUpdated.js';\n\n// Loader\nexport * from './components/CircleLoader/CircleLoader.js';\n\n// Menu - override Mantine Menu\nexport {Menu, type MenuItemProps} from './components/Menu/Menu.js';\n\n// Modal - override Mantine Modal\nexport {Modal, type ModalFactory, type ModalProps} from './components/Modal/Modal.js';\nexport * from './components/Modal/ModalFooter.js';\n\n// Prompt\nexport * from './components/Prompt/Prompt.js';\n\n// Read Only - override Mantine PasswordInput and Select\nexport {PasswordInput} from './components/PasswordInput/PasswordInput.js';\nexport {Select} from './components/Select/Select.js';\n\n// Sticky Footer\nexport * from './components/StickyFooter/StickyFooter.js';\n\n// Table - override Mantine Table\nexport {flexRender as renderTableCell} from '@tanstack/react-table';\nexport {type TablePredicateProps} from './components/Table/table-predicate/TablePredicate.js';\nexport {Table, TableComponentsOrder, type PlasmaTableFactory} from './components/Table/Table.js';\nexport {\n type TableAction,\n type TableLayout,\n type TableLayoutProps,\n type TableProps,\n} from './components/Table/Table.types.js';\nexport {useTableContext} from './components/Table/TableContext.js';\nexport {useTable, type TableState, type TableStore, type UseTableOptions} from './components/Table/use-table.js';\nexport {useUrlSyncedState, type SearchParamEntry, type UseUrlSyncedStateOptions} from './hooks/use-url-synced-state.js';\n\nexport {noop};\n\n// Theme\nexport * from './theme/plasmaCSSVariablesResolver.js';\nexport * from './theme/Plasmantine.js';\n\ndeclare module '@mantine/core' {\n export interface MantineThemeColorsOverride {\n colors: Record<keyof typeof PlasmaColors | (string & {}), MantineColorsTuple>;\n }\n}\n\ndeclare module '@tanstack/react-table' {\n interface ColumnMeta<TData extends RowData, TValue> {\n /**\n * Whether the column is a control column.\n * Control columns are columns that are not part of the data but are used to control the table.\n * For example, a column that contains checkboxes to select rows.\n */\n controlColumn: boolean;\n }\n}\n"],"names":["noop","Pagination","Accordion","ActionIcon","Alert","Badge","Button","Chip","enhanceWithCollectionProps","Header","Menu","Modal","PasswordInput","Select","flexRender","renderTableCell","Table","TableComponentsOrder","useTableContext","useTable","useUrlSyncedState"],"mappings":"AAAA,SAA4BA,IAAI,QAAO,gBAAgB;AAIvD,cAAc,oBAAoB;AAClC,cAAc,gBAAgB;AAC9B,SAAQC,UAAU,QAAO,gBAAgB;AAEzC,cAAc,gBAAgB;AAC9B,cAAc,iBAAiB;AAC/B,cAAc,yBAAyB;AAEvC,cAAc,uBAAuB;AAErC,wBAAwB;AACxB,YAAY;AACZ,SAAQC,SAAS,QAAO,sCAAsC;AAE9D,4CAA4C;AAC5C,SAAQC,UAAU,QAA6B,wCAAwC;AAEvF,iCAAiC;AACjC,SAAQC,KAAK,QAAO,8BAA8B;AAElD,iCAAiC;AACjC,SACIC,KAAK,QAIF,8BAA8B;AAErC,cAAc;AACd,cAAc,wCAAwC;AAEtD,kBAAkB;AAClB,cAAc,gDAAgD;AAE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noop} from '@mantine/core';\nimport {type RowData} from '@tanstack/table-core';\nimport {type PlasmaColors} from './theme/PlasmaColors.js';\n\nexport * from '@mantine/carousel';\nexport * from '@mantine/core';\nexport {Pagination} from '@mantine/core';\nexport {type DatesRangeValue} from '@mantine/dates';\nexport * from '@mantine/form';\nexport * from '@mantine/hooks';\nexport * from '@mantine/notifications';\nexport {type NotificationsProps} from '@mantine/notifications';\nexport * from '@tanstack/table-core';\n\n// Export all components\n// Accordion\nexport {Accordion} from './components/Accordion/Accordion.js';\n\n// Action Icon - override Mantine ActionIcon\nexport {ActionIcon, type ActionIconProps} from './components/ActionIcon/ActionIcon.js';\n\n// Alert - override Mantine Alert\nexport {Alert} from './components/Alert/Alert.js';\n\n// Badge - override Mantine Badge\nexport {\n Badge,\n type BadgeOverloadFactory,\n type SemanticBadge,\n type SemanticBadgeProps,\n} from './components/Badge/Badge.js';\n\n// Blank Slate\nexport * from './components/BlankSlate/BlankSlate.js';\n\n// Browser Preview\nexport * from './components/BrowserPreview/BrowserPreview.js';\n\n// Button - override Mantine Button\nexport {Button, type ButtonProps} from './components/Button/Button.js';\nexport {type ButtonWithDisabledTooltipProps} from './components/Button/ButtonWithDisabledTooltip.js';\n\n// Checkbox\nexport * from './components/CheckboxIcon/CheckboxIcon.js';\n\n// Child Form\nexport * from './components/ChildForm/ChildForm.js';\n\n// Chip - override Mantine Chip\nexport {Chip} from './components/Chip/Chip.js';\n\n// Code Editor\nexport * from './components/CodeEditor/CodeEditor.js';\n\n// Collection\nexport * from './components/Collection/Collection.js';\nexport {enhanceWithCollectionProps} from './components/Collection/enhanceWithCollectionProps.js';\n\n// Copy to Clipboard\nexport * from './components/CopyToClipboard/CopyToClipboard.js';\n\n// Date Range Picker\nexport * from './components/DateRangePicker/DateRangePicker.js';\nexport * from './components/DateRangePicker/DateRangePickerInlineCalendar.js';\nexport * from './components/DateRangePicker/DateRangePickerPopoverCalendar.js';\nexport * from './components/DateRangePicker/DateRangePickerPresetSelect.js';\n\n// Date Time Range Picker\nexport * from './components/DateTimeRangePicker/DateTimeRangePicker.js';\n\n// Ellipsis Text\nexport * from './components/EllipsisText/EllipsisText.js';\n\n// Header - override @tanstack/table-core Header\nexport {\n Header,\n type HeaderBreadcrumbsProps,\n type HeaderDocAnchorProps,\n type HeaderFactory,\n type HeaderProps,\n type HeaderRightProps,\n type HeaderStyleNames,\n type HeaderVariant,\n} from './components/Header/Header.js';\n\n// Info Token\nexport * from './components/InfoToken/InfoToken.js';\n\n// Inline Confirm\nexport * from './components/InlineConfirm/InlineConfirm.js';\nexport * from './components/InlineConfirm/InlineConfirmContext.js';\n\n// Last Updated\nexport * from './components/LastUpdated/LastUpdated.js';\n\n// Loader\nexport * from './components/CircleLoader/CircleLoader.js';\n\n// Menu - override Mantine Menu\nexport {Menu, type MenuItemProps} from './components/Menu/Menu.js';\n\n// Modal - override Mantine Modal\nexport {Modal, type ModalFactory, type ModalProps} from './components/Modal/Modal.js';\nexport * from './components/Modal/ModalFooter.js';\n\n// Prompt\nexport * from './components/Prompt/Prompt.js';\n\n// RadioCard - override Mantine RadioCard\nexport {RadioCard, type RadioCardProps} from './components/RadioCard/RadioCard.js';\n\n// Read Only - override Mantine PasswordInput and Select\nexport {PasswordInput} from './components/PasswordInput/PasswordInput.js';\nexport {Select} from './components/Select/Select.js';\n\n// Sticky Footer\nexport * from './components/StickyFooter/StickyFooter.js';\n\n// Table - override Mantine Table\nexport {flexRender as renderTableCell} from '@tanstack/react-table';\nexport {type TablePredicateProps} from './components/Table/table-predicate/TablePredicate.js';\nexport {Table, TableComponentsOrder, type PlasmaTableFactory} from './components/Table/Table.js';\nexport {\n type TableAction,\n type TableLayout,\n type TableLayoutProps,\n type TableProps,\n} from './components/Table/Table.types.js';\nexport {useTableContext} from './components/Table/TableContext.js';\nexport {useTable, type TableState, type TableStore, type UseTableOptions} from './components/Table/use-table.js';\nexport {useUrlSyncedState, type SearchParamEntry, type UseUrlSyncedStateOptions} from './hooks/use-url-synced-state.js';\n\nexport {noop};\n\n// Theme\nexport * from './theme/plasmaCSSVariablesResolver.js';\nexport * from './theme/Plasmantine.js';\n\ndeclare module '@mantine/core' {\n export interface MantineThemeColorsOverride {\n colors: Record<keyof typeof PlasmaColors | (string & {}), MantineColorsTuple>;\n }\n}\n\ndeclare module '@tanstack/react-table' {\n interface ColumnMeta<TData extends RowData, TValue> {\n /**\n * Whether the column is a control column.\n * Control columns are columns that are not part of the data but are used to control the table.\n * For example, a column that contains checkboxes to select rows.\n */\n controlColumn: boolean;\n }\n}\n"],"names":["noop","Pagination","Accordion","ActionIcon","Alert","Badge","Button","Chip","enhanceWithCollectionProps","Header","Menu","Modal","RadioCard","PasswordInput","Select","flexRender","renderTableCell","Table","TableComponentsOrder","useTableContext","useTable","useUrlSyncedState"],"mappings":"AAAA,SAA4BA,IAAI,QAAO,gBAAgB;AAIvD,cAAc,oBAAoB;AAClC,cAAc,gBAAgB;AAC9B,SAAQC,UAAU,QAAO,gBAAgB;AAEzC,cAAc,gBAAgB;AAC9B,cAAc,iBAAiB;AAC/B,cAAc,yBAAyB;AAEvC,cAAc,uBAAuB;AAErC,wBAAwB;AACxB,YAAY;AACZ,SAAQC,SAAS,QAAO,sCAAsC;AAE9D,4CAA4C;AAC5C,SAAQC,UAAU,QAA6B,wCAAwC;AAEvF,iCAAiC;AACjC,SAAQC,KAAK,QAAO,8BAA8B;AAElD,iCAAiC;AACjC,SACIC,KAAK,QAIF,8BAA8B;AAErC,cAAc;AACd,cAAc,wCAAwC;AAEtD,kBAAkB;AAClB,cAAc,gDAAgD;AAE9D,mCAAmC;AACnC,SAAQC,MAAM,QAAyB,gCAAgC;AAGvE,WAAW;AACX,cAAc,4CAA4C;AAE1D,aAAa;AACb,cAAc,sCAAsC;AAEpD,+BAA+B;AAC/B,SAAQC,IAAI,QAAO,4BAA4B;AAE/C,cAAc;AACd,cAAc,wCAAwC;AAEtD,aAAa;AACb,cAAc,wCAAwC;AACtD,SAAQC,0BAA0B,QAAO,wDAAwD;AAEjG,oBAAoB;AACpB,cAAc,kDAAkD;AAEhE,oBAAoB;AACpB,cAAc,kDAAkD;AAChE,cAAc,gEAAgE;AAC9E,cAAc,iEAAiE;AAC/E,cAAc,8DAA8D;AAE5E,yBAAyB;AACzB,cAAc,0DAA0D;AAExE,gBAAgB;AAChB,cAAc,4CAA4C;AAE1D,gDAAgD;AAChD,SACIC,MAAM,QAQH,gCAAgC;AAEvC,aAAa;AACb,cAAc,sCAAsC;AAEpD,iBAAiB;AACjB,cAAc,8CAA8C;AAC5D,cAAc,qDAAqD;AAEnE,eAAe;AACf,cAAc,0CAA0C;AAExD,SAAS;AACT,cAAc,4CAA4C;AAE1D,+BAA+B;AAC/B,SAAQC,IAAI,QAA2B,4BAA4B;AAEnE,iCAAiC;AACjC,SAAQC,KAAK,QAA2C,8BAA8B;AACtF,cAAc,oCAAoC;AAElD,SAAS;AACT,cAAc,gCAAgC;AAE9C,yCAAyC;AACzC,SAAQC,SAAS,QAA4B,sCAAsC;AAEnF,wDAAwD;AACxD,SAAQC,aAAa,QAAO,8CAA8C;AAC1E,SAAQC,MAAM,QAAO,gCAAgC;AAErD,gBAAgB;AAChB,cAAc,4CAA4C;AAE1D,iCAAiC;AACjC,SAAQC,cAAcC,eAAe,QAAO,wBAAwB;AAEpE,SAAQC,KAAK,EAAEC,oBAAoB,QAAgC,8BAA8B;AAOjG,SAAQC,eAAe,QAAO,qCAAqC;AACnE,SAAQC,QAAQ,QAA+D,kCAAkC;AACjH,SAAQC,iBAAiB,QAA6D,kCAAkC;AAExH,SAAQrB,IAAI,GAAE;AAEd,QAAQ;AACR,cAAc,wCAAwC;AACtD,cAAc,yBAAyB"}
|
|
@@ -5,7 +5,51 @@
|
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
.card {
|
|
8
|
+
display: inline-flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
align-items: flex-start;
|
|
11
|
+
padding: var(--mantine-spacing-sm);
|
|
12
|
+
border-radius: var(--mantine-radius-lg);
|
|
13
|
+
|
|
14
|
+
&[data-checked] {
|
|
15
|
+
border-color: var(--mantine-primary-color-filled);
|
|
16
|
+
}
|
|
17
|
+
|
|
8
18
|
&[disabled] {
|
|
9
19
|
pointer-events: none;
|
|
20
|
+
|
|
21
|
+
.title {
|
|
22
|
+
color: var(--mantine-color-disabled-color);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.description {
|
|
26
|
+
color: var(--mantine-color-disabled-color);
|
|
27
|
+
}
|
|
10
28
|
}
|
|
11
29
|
}
|
|
30
|
+
|
|
31
|
+
.container {
|
|
32
|
+
flex-wrap: nowrap;
|
|
33
|
+
gap: var(--mantine-spacing-sm);
|
|
34
|
+
align-items: baseline;
|
|
35
|
+
justify-content: flex-start;
|
|
36
|
+
width: 100%;
|
|
37
|
+
margin-bottom: var(--mantine-spacing-xs);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.title {
|
|
41
|
+
flex: 1;
|
|
42
|
+
color: var(--coveo-color-title);
|
|
43
|
+
word-break: break-word;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.description {
|
|
47
|
+
padding-left: var(--mantine-spacing-lg);
|
|
48
|
+
color: var(--mantine-color-dimmed);
|
|
49
|
+
font-weight: 400;
|
|
50
|
+
font-size: var(--mantine-font-size-xs);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.indicator {
|
|
54
|
+
cursor: pointer;
|
|
55
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coveord/plasma-mantine",
|
|
3
|
-
"version": "56.8.
|
|
3
|
+
"version": "56.8.1",
|
|
4
4
|
"description": "A Plasma flavoured Mantine theme",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"plasma",
|
|
@@ -80,45 +80,45 @@
|
|
|
80
80
|
"dayjs": "1.11.19",
|
|
81
81
|
"fast-deep-equal": "3.1.3",
|
|
82
82
|
"lodash.defaultsdeep": "4.6.1",
|
|
83
|
-
"monaco-editor": "0.
|
|
84
|
-
"@coveord/plasma-
|
|
85
|
-
"@coveord/plasma-
|
|
83
|
+
"monaco-editor": "0.55.1",
|
|
84
|
+
"@coveord/plasma-tokens": "56.8.1",
|
|
85
|
+
"@coveord/plasma-react-icons": "56.8.1"
|
|
86
86
|
},
|
|
87
87
|
"devDependencies": {
|
|
88
|
-
"@mantine/carousel": "8.3.
|
|
89
|
-
"@mantine/code-highlight": "8.3.
|
|
90
|
-
"@mantine/core": "8.3.
|
|
91
|
-
"@mantine/dates": "8.3.
|
|
92
|
-
"@mantine/form": "8.3.
|
|
93
|
-
"@mantine/hooks": "8.3.
|
|
94
|
-
"@mantine/modals": "8.3.
|
|
95
|
-
"@mantine/notifications": "8.3.
|
|
88
|
+
"@mantine/carousel": "8.3.10",
|
|
89
|
+
"@mantine/code-highlight": "8.3.10",
|
|
90
|
+
"@mantine/core": "8.3.10",
|
|
91
|
+
"@mantine/dates": "8.3.10",
|
|
92
|
+
"@mantine/form": "8.3.10",
|
|
93
|
+
"@mantine/hooks": "8.3.10",
|
|
94
|
+
"@mantine/modals": "8.3.10",
|
|
95
|
+
"@mantine/notifications": "8.3.10",
|
|
96
96
|
"@swc/cli": "0.7.9",
|
|
97
|
-
"@swc/core": "1.15.
|
|
97
|
+
"@swc/core": "1.15.3",
|
|
98
98
|
"@testing-library/dom": "10.4.1",
|
|
99
99
|
"@testing-library/jest-dom": "6.9.1",
|
|
100
100
|
"@testing-library/react": "16.3.0",
|
|
101
101
|
"@testing-library/user-event": "14.6.1",
|
|
102
102
|
"@types/lodash.defaultsdeep": "4.6.9",
|
|
103
|
-
"@types/react": "18.3.
|
|
103
|
+
"@types/react": "18.3.27",
|
|
104
104
|
"@types/react-dom": "18.3.7",
|
|
105
|
-
"@vitest/eslint-plugin": "1.
|
|
105
|
+
"@vitest/eslint-plugin": "1.5.2",
|
|
106
106
|
"cross-env": "10.1.0",
|
|
107
107
|
"embla-carousel": "8.6.0",
|
|
108
108
|
"embla-carousel-react": "8.6.0",
|
|
109
|
-
"eslint-plugin-testing-library": "
|
|
109
|
+
"eslint-plugin-testing-library": "7.13.5",
|
|
110
110
|
"eslint-plugin-vitest-globals": "1.5.0",
|
|
111
|
-
"jsdom": "27.
|
|
111
|
+
"jsdom": "27.3.0",
|
|
112
112
|
"postcss": "8.5.6",
|
|
113
113
|
"postcss-preset-mantine": "^1.11.0",
|
|
114
114
|
"postcss-simple-vars": "^7.0.1",
|
|
115
115
|
"publint": "0.3.15",
|
|
116
116
|
"react": "18.3.1",
|
|
117
117
|
"react-dom": "18.3.1",
|
|
118
|
-
"rimraf": "6.1.
|
|
118
|
+
"rimraf": "6.1.2",
|
|
119
119
|
"tslib": "2.8.1",
|
|
120
120
|
"typescript": "5.9.3",
|
|
121
|
-
"vitest": "4.0.
|
|
121
|
+
"vitest": "4.0.15"
|
|
122
122
|
},
|
|
123
123
|
"peerDependencies": {
|
|
124
124
|
"@mantine/carousel": "^8.0.2",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {Monaco} from '@monaco-editor/react';
|
|
2
|
+
import type {editor} from 'monaco-editor';
|
|
2
3
|
|
|
3
4
|
const format = (xml: string): string => {
|
|
4
5
|
// https://stackoverflow.com/questions/57039218/doesnt-monaco-editor-support-xml-language-by-default
|
|
@@ -31,7 +32,7 @@ const format = (xml: string): string => {
|
|
|
31
32
|
|
|
32
33
|
const register = (monaco: Monaco): void => {
|
|
33
34
|
monaco.languages.registerDocumentFormattingEditProvider('xml', {
|
|
34
|
-
provideDocumentFormattingEdits: async (model) => [
|
|
35
|
+
provideDocumentFormattingEdits: async (model: editor.ITextModel) => [
|
|
35
36
|
{
|
|
36
37
|
range: model.getFullModelRange(),
|
|
37
38
|
text: format(model.getValue()),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {UseFormInput} from '@mantine/form';
|
|
1
|
+
import {UseFormInput, type FormArrayElement} from '@mantine/form';
|
|
2
2
|
import {CollectionProps} from './Collection.js';
|
|
3
3
|
|
|
4
4
|
export const enhanceWithCollectionProps = <
|
|
@@ -20,7 +20,7 @@ export const enhanceWithCollectionProps = <
|
|
|
20
20
|
payload.form.removeListItem(field, index);
|
|
21
21
|
validateInputOnChange && payload.form.validate();
|
|
22
22
|
},
|
|
23
|
-
onInsertItem: (valueToInsert:
|
|
23
|
+
onInsertItem: (valueToInsert: FormArrayElement<FormValues, (typeof payload)['field']>, index: number) => {
|
|
24
24
|
payload.form.insertListItem(field, valueToInsert, index);
|
|
25
25
|
validateInputOnChange && payload.form.validate();
|
|
26
26
|
},
|
|
@@ -14,6 +14,7 @@ import {DatesRangeValue, DateStringValue} from '@mantine/dates';
|
|
|
14
14
|
import {useUncontrolled} from '@mantine/hooks';
|
|
15
15
|
import dayjs from 'dayjs';
|
|
16
16
|
import {useUrlSyncedState, UseUrlSyncedStateOptions} from '../../hooks/use-url-synced-state';
|
|
17
|
+
import classes from './DateRange.module.css';
|
|
17
18
|
import {DateRangePickerInlineCalendar, DateRangePickerInlineCalendarProps} from './DateRangePickerInlineCalendar';
|
|
18
19
|
|
|
19
20
|
const serialization = (input: Pick<UseUrlSyncedStateOptions<DatesRangeValue<string>>, 'serializer' | 'deserializer'>) =>
|
|
@@ -123,7 +124,7 @@ export const DateRangePicker = factory<DateRangePickerFactory>((props: DateRange
|
|
|
123
124
|
|
|
124
125
|
const getStyles = useStyles<DateRangePickerFactory>({
|
|
125
126
|
name: 'DateRangePicker',
|
|
126
|
-
classes
|
|
127
|
+
classes,
|
|
127
128
|
props,
|
|
128
129
|
className,
|
|
129
130
|
classNames,
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Box,
|
|
3
|
+
Factory,
|
|
4
|
+
Group,
|
|
5
|
+
RadioCardProps as MantineRadioCardProps,
|
|
6
|
+
RadioCardStylesNames as MantineRadioCardStylesNames,
|
|
7
|
+
Radio,
|
|
8
|
+
RadioCardCssVariables,
|
|
9
|
+
StylesApiProps,
|
|
10
|
+
Title,
|
|
11
|
+
factory,
|
|
12
|
+
useProps,
|
|
13
|
+
useStyles,
|
|
14
|
+
} from '@mantine/core';
|
|
15
|
+
import {ReactNode} from 'react';
|
|
16
|
+
import classes from '../../styles/RadioCard.module.css';
|
|
17
|
+
|
|
18
|
+
export type RadioCardStylesNames = MantineRadioCardStylesNames | 'container' | 'indicator' | 'title' | 'description';
|
|
19
|
+
export type RadioCardFactory = Factory<{
|
|
20
|
+
props: RadioCardProps;
|
|
21
|
+
ref: HTMLButtonElement;
|
|
22
|
+
stylesNames: RadioCardStylesNames;
|
|
23
|
+
vars: RadioCardCssVariables;
|
|
24
|
+
}>;
|
|
25
|
+
|
|
26
|
+
export type RadioCardProps = MantineRadioCardProps &
|
|
27
|
+
StylesApiProps<RadioCardFactory> & {
|
|
28
|
+
/**
|
|
29
|
+
* The label of the card. Appears next to the radio indicator.
|
|
30
|
+
*/
|
|
31
|
+
label: ReactNode;
|
|
32
|
+
/**
|
|
33
|
+
* The description of the card. Appears under the title.
|
|
34
|
+
*/
|
|
35
|
+
description?: ReactNode;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
const defaultProps: Partial<RadioCardProps> = {};
|
|
39
|
+
|
|
40
|
+
export const RadioCard = factory<RadioCardFactory>((_props, ref) => {
|
|
41
|
+
const {classNames, styles, style, className, vars, disabled, label, description, ...others} = useProps(
|
|
42
|
+
'RadioCard',
|
|
43
|
+
defaultProps,
|
|
44
|
+
_props,
|
|
45
|
+
);
|
|
46
|
+
const getStyles = useStyles<RadioCardFactory>({
|
|
47
|
+
name: 'RadioCard',
|
|
48
|
+
classes,
|
|
49
|
+
vars,
|
|
50
|
+
classNames,
|
|
51
|
+
className,
|
|
52
|
+
style,
|
|
53
|
+
props: _props,
|
|
54
|
+
styles,
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
return (
|
|
58
|
+
<Radio.Card
|
|
59
|
+
ref={ref}
|
|
60
|
+
disabled={disabled}
|
|
61
|
+
{...getStyles('card', {className, style, classNames, styles})}
|
|
62
|
+
{...others}
|
|
63
|
+
>
|
|
64
|
+
<Group {...getStyles('container', {classNames, styles})}>
|
|
65
|
+
<Radio.Indicator size="xs" disabled={disabled} {...getStyles('indicator', {classNames, styles})} />
|
|
66
|
+
<Title order={4} {...getStyles('title', {classNames, styles})}>
|
|
67
|
+
{label}
|
|
68
|
+
</Title>
|
|
69
|
+
</Group>
|
|
70
|
+
{description && <Box {...getStyles('description', {classNames, styles})}>{description}</Box>}
|
|
71
|
+
</Radio.Card>
|
|
72
|
+
);
|
|
73
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import {render, screen} from '@test-utils';
|
|
2
|
+
import {RadioCard} from '../RadioCard.js';
|
|
3
|
+
|
|
4
|
+
describe('RadioCard', () => {
|
|
5
|
+
it('renders the title and description correctly', () => {
|
|
6
|
+
const title = 'Test Title';
|
|
7
|
+
const description = 'Test Description';
|
|
8
|
+
|
|
9
|
+
render(<RadioCard label={title} description={description} />);
|
|
10
|
+
|
|
11
|
+
expect(screen.getByText(title)).toBeInTheDocument();
|
|
12
|
+
expect(screen.getByText(description)).toBeInTheDocument();
|
|
13
|
+
});
|
|
14
|
+
it('renders the radio indicator correctly', () => {
|
|
15
|
+
render(<RadioCard label="Test Title" />);
|
|
16
|
+
|
|
17
|
+
expect(screen.getByRole('radio')).not.toBeDisabled();
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it('renders disabled state correctly', () => {
|
|
21
|
+
render(<RadioCard label="Test Title" disabled />);
|
|
22
|
+
|
|
23
|
+
expect(screen.getByRole('radio')).toBeDisabled();
|
|
24
|
+
});
|
|
25
|
+
});
|
package/src/index.ts
CHANGED
|
@@ -106,6 +106,9 @@ export * from './components/Modal/ModalFooter.js';
|
|
|
106
106
|
// Prompt
|
|
107
107
|
export * from './components/Prompt/Prompt.js';
|
|
108
108
|
|
|
109
|
+
// RadioCard - override Mantine RadioCard
|
|
110
|
+
export {RadioCard, type RadioCardProps} from './components/RadioCard/RadioCard.js';
|
|
111
|
+
|
|
109
112
|
// Read Only - override Mantine PasswordInput and Select
|
|
110
113
|
export {PasswordInput} from './components/PasswordInput/PasswordInput.js';
|
|
111
114
|
export {Select} from './components/Select/Select.js';
|
|
@@ -5,7 +5,51 @@
|
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
.card {
|
|
8
|
+
display: inline-flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
align-items: flex-start;
|
|
11
|
+
padding: var(--mantine-spacing-sm);
|
|
12
|
+
border-radius: var(--mantine-radius-lg);
|
|
13
|
+
|
|
14
|
+
&[data-checked] {
|
|
15
|
+
border-color: var(--mantine-primary-color-filled);
|
|
16
|
+
}
|
|
17
|
+
|
|
8
18
|
&[disabled] {
|
|
9
19
|
pointer-events: none;
|
|
20
|
+
|
|
21
|
+
.title {
|
|
22
|
+
color: var(--mantine-color-disabled-color);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.description {
|
|
26
|
+
color: var(--mantine-color-disabled-color);
|
|
27
|
+
}
|
|
10
28
|
}
|
|
11
29
|
}
|
|
30
|
+
|
|
31
|
+
.container {
|
|
32
|
+
flex-wrap: nowrap;
|
|
33
|
+
gap: var(--mantine-spacing-sm);
|
|
34
|
+
align-items: baseline;
|
|
35
|
+
justify-content: flex-start;
|
|
36
|
+
width: 100%;
|
|
37
|
+
margin-bottom: var(--mantine-spacing-xs);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.title {
|
|
41
|
+
flex: 1;
|
|
42
|
+
color: var(--coveo-color-title);
|
|
43
|
+
word-break: break-word;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.description {
|
|
47
|
+
padding-left: var(--mantine-spacing-lg);
|
|
48
|
+
color: var(--mantine-color-dimmed);
|
|
49
|
+
font-weight: 400;
|
|
50
|
+
font-size: var(--mantine-font-size-xs);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.indicator {
|
|
54
|
+
cursor: pointer;
|
|
55
|
+
}
|