@coveord/plasma-mantine 56.5.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 +107 -105
- package/dist/.tsbuildinfo +1 -1
- package/dist/cjs/components/Badge/Badge.d.ts.map +1 -1
- package/dist/cjs/components/Badge/Badge.js +10 -8
- package/dist/cjs/components/Badge/Badge.js.map +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/cjs/theme/Plasmantine.d.ts +1 -1
- package/dist/cjs/theme/Plasmantine.d.ts.map +1 -1
- package/dist/cjs/theme/Plasmantine.js +2 -2
- package/dist/cjs/theme/Plasmantine.js.map +1 -1
- package/dist/esm/components/Badge/Badge.d.ts.map +1 -1
- package/dist/esm/components/Badge/Badge.js +11 -7
- package/dist/esm/components/Badge/Badge.js.map +1 -1
- 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/dist/esm/theme/Plasmantine.d.ts +1 -1
- package/dist/esm/theme/Plasmantine.d.ts.map +1 -1
- package/dist/esm/theme/Plasmantine.js +2 -2
- package/dist/esm/theme/Plasmantine.js.map +1 -1
- package/package.json +19 -19
- package/src/components/Badge/Badge.tsx +12 -2
- 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
- package/src/theme/Plasmantine.tsx +3 -3
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { alpha, Badge as MantineBadge, polymorphicFactory, useComputedColorScheme } from '@mantine/core';
|
|
3
3
|
import { forwardRef } from 'react';
|
|
4
|
-
const enhanceBadge = (ComponentLight, ComponentDark
|
|
4
|
+
const enhanceBadge = (ComponentLight, ComponentDark, displayName)=>{
|
|
5
|
+
const EnhancedBadge = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
5
6
|
const computedColorScheme = useComputedColorScheme('light', {
|
|
6
7
|
getInitialValueInEffect: true
|
|
7
8
|
});
|
|
@@ -15,6 +16,9 @@ const enhanceBadge = (ComponentLight, ComponentDark)=>/*#__PURE__*/ forwardRef((
|
|
|
15
16
|
h: props.size === 'large' ? 22 : 20
|
|
16
17
|
});
|
|
17
18
|
});
|
|
19
|
+
EnhancedBadge.displayName = displayName;
|
|
20
|
+
return EnhancedBadge;
|
|
21
|
+
};
|
|
18
22
|
const BadgePrimary = enhanceBadge(MantineBadge.withProps({
|
|
19
23
|
variant: 'light',
|
|
20
24
|
bd: '1px solid var(--badge-bg)',
|
|
@@ -24,7 +28,7 @@ const BadgePrimary = enhanceBadge(MantineBadge.withProps({
|
|
|
24
28
|
bd: `1px solid ${alpha('var(--mantine-primary-color-3)', 0.32)}`,
|
|
25
29
|
c: 'var(--mantine-primary-color-2)',
|
|
26
30
|
bg: alpha('var(--mantine-primary-color-3)', 0.32)
|
|
27
|
-
}));
|
|
31
|
+
}), 'Badge.Primary');
|
|
28
32
|
const BadgeSecondary = enhanceBadge(MantineBadge.withProps({
|
|
29
33
|
variant: 'light',
|
|
30
34
|
color: 'gray',
|
|
@@ -36,7 +40,7 @@ const BadgeSecondary = enhanceBadge(MantineBadge.withProps({
|
|
|
36
40
|
c: 'var(--mantine-color-white)',
|
|
37
41
|
bd: `1px solid ${alpha('var(--mantine-color-gray-3)', 0.16)}`,
|
|
38
42
|
bg: alpha('var(--mantine-color-gray-3)', 0.16)
|
|
39
|
-
}));
|
|
43
|
+
}), 'Badge.Secondary');
|
|
40
44
|
const BadgeSuccess = enhanceBadge(MantineBadge.withProps({
|
|
41
45
|
variant: 'light',
|
|
42
46
|
color: 'green',
|
|
@@ -48,7 +52,7 @@ const BadgeSuccess = enhanceBadge(MantineBadge.withProps({
|
|
|
48
52
|
c: 'green.2',
|
|
49
53
|
bd: `1px solid ${alpha('var(--mantine-color-green-3)', 0.16)}`,
|
|
50
54
|
bg: alpha('var(--mantine-color-green-3)', 0.16)
|
|
51
|
-
}));
|
|
55
|
+
}), 'Badge.Success');
|
|
52
56
|
const BadgeCritical = enhanceBadge(MantineBadge.withProps({
|
|
53
57
|
variant: 'light',
|
|
54
58
|
color: 'critical',
|
|
@@ -60,7 +64,7 @@ const BadgeCritical = enhanceBadge(MantineBadge.withProps({
|
|
|
60
64
|
c: 'red.2',
|
|
61
65
|
bd: `1px solid ${alpha('var(--mantine-color-red-3)', 0.16)}`,
|
|
62
66
|
bg: alpha('var(--mantine-color-red-3)', 0.16)
|
|
63
|
-
}));
|
|
67
|
+
}), 'Badge.Critical');
|
|
64
68
|
const BadgeWarning = enhanceBadge(MantineBadge.withProps({
|
|
65
69
|
variant: 'light',
|
|
66
70
|
color: 'warning',
|
|
@@ -72,7 +76,7 @@ const BadgeWarning = enhanceBadge(MantineBadge.withProps({
|
|
|
72
76
|
c: 'yellow.2',
|
|
73
77
|
bd: `1px solid ${alpha('var(--mantine-color-yellow-3)', 0.16)}`,
|
|
74
78
|
bg: alpha('var(--mantine-color-yellow-3)', 0.16)
|
|
75
|
-
}));
|
|
79
|
+
}), 'Badge.Warning');
|
|
76
80
|
const BadgeDisabled = enhanceBadge(MantineBadge.withProps({
|
|
77
81
|
variant: 'light',
|
|
78
82
|
color: 'gray',
|
|
@@ -83,7 +87,7 @@ const BadgeDisabled = enhanceBadge(MantineBadge.withProps({
|
|
|
83
87
|
color: 'gray',
|
|
84
88
|
c: 'dark.3',
|
|
85
89
|
bg: alpha('var(--mantine-color-gray-3)', 0.16)
|
|
86
|
-
}));
|
|
90
|
+
}), 'Badge.Disabled');
|
|
87
91
|
export const Badge = polymorphicFactory((props, ref)=>/*#__PURE__*/ _jsx(MantineBadge, {
|
|
88
92
|
ref: ref,
|
|
89
93
|
...props
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/Badge/Badge.tsx"],"sourcesContent":["import {\n alpha,\n BadgeCssVariables,\n BadgeProps,\n BadgeStylesNames,\n BadgeVariant,\n Badge as MantineBadge,\n polymorphicFactory,\n PolymorphicFactory,\n PolymorphicComponentProps,\n useComputedColorScheme,\n} from '@mantine/core';\nimport {forwardRef, ForwardRefExoticComponent, ReactElement, ReactNode, RefAttributes} from 'react';\n\nexport interface SemanticBadgeProps\n extends Pick<\n BadgeProps,\n | 'm'\n | 'mt'\n | 'mb'\n | 'ml'\n | 'mr'\n | 'ms'\n | 'me'\n | 'mx'\n | 'my'\n | 'miw'\n | 'maw'\n | 'pos'\n | 'top'\n | 'left'\n | 'right'\n | 'bottom'\n | 'inset'\n | 'display'\n | 'flex'\n | 'leftSection'\n | 'rightSection'\n | 'fullWidth'\n | 'circle'\n > {\n /**\n * The size of the badge.\n * @default 'small'\n */\n size?: 'small' | 'large';\n /**\n * Whether the badge is displayed over a light or dark background.\n * @default Falls back to theme.\n */\n on?: 'light' | 'dark';\n /**\n * The content of the badge.\n */\n children?: ReactNode;\n}\n\nexport type SemanticBadge = ForwardRefExoticComponent<SemanticBadgeProps & RefAttributes<HTMLDivElement>>;\n\nconst enhanceBadge = (\n ComponentLight: <L = 'div'>(props: PolymorphicComponentProps<L, BadgeProps>) => ReactElement,\n ComponentDark: <L = 'div'>(props: PolymorphicComponentProps<L, BadgeProps>) => ReactElement,\n): SemanticBadge
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/Badge/Badge.tsx"],"sourcesContent":["import {\n alpha,\n BadgeCssVariables,\n BadgeProps,\n BadgeStylesNames,\n BadgeVariant,\n Badge as MantineBadge,\n polymorphicFactory,\n PolymorphicFactory,\n PolymorphicComponentProps,\n useComputedColorScheme,\n} from '@mantine/core';\nimport {forwardRef, ForwardRefExoticComponent, ReactElement, ReactNode, RefAttributes} from 'react';\n\nexport interface SemanticBadgeProps\n extends Pick<\n BadgeProps,\n | 'm'\n | 'mt'\n | 'mb'\n | 'ml'\n | 'mr'\n | 'ms'\n | 'me'\n | 'mx'\n | 'my'\n | 'miw'\n | 'maw'\n | 'pos'\n | 'top'\n | 'left'\n | 'right'\n | 'bottom'\n | 'inset'\n | 'display'\n | 'flex'\n | 'leftSection'\n | 'rightSection'\n | 'fullWidth'\n | 'circle'\n > {\n /**\n * The size of the badge.\n * @default 'small'\n */\n size?: 'small' | 'large';\n /**\n * Whether the badge is displayed over a light or dark background.\n * @default Falls back to theme.\n */\n on?: 'light' | 'dark';\n /**\n * The content of the badge.\n */\n children?: ReactNode;\n}\n\nexport type SemanticBadge = ForwardRefExoticComponent<SemanticBadgeProps & RefAttributes<HTMLDivElement>>;\n\nconst enhanceBadge = (\n ComponentLight: <L = 'div'>(props: PolymorphicComponentProps<L, BadgeProps>) => ReactElement,\n ComponentDark: <L = 'div'>(props: PolymorphicComponentProps<L, BadgeProps>) => ReactElement,\n displayName: string,\n): SemanticBadge => {\n const EnhancedBadge = forwardRef<HTMLDivElement, SemanticBadgeProps>((props, ref) => {\n const computedColorScheme = useComputedColorScheme('light', {getInitialValueInEffect: true});\n const Component = (props.on || computedColorScheme) === 'dark' ? ComponentDark : ComponentLight;\n return (\n <Component\n ref={ref}\n {...props}\n py={2}\n px={12}\n size={props.size === 'large' ? 'lg' : 'md'}\n h={props.size === 'large' ? 22 : 20}\n />\n );\n });\n EnhancedBadge.displayName = displayName;\n return EnhancedBadge;\n};\n\nconst BadgePrimary = enhanceBadge(\n MantineBadge.withProps({\n variant: 'light',\n bd: '1px solid var(--badge-bg)',\n c: 'var(--mantine-primary-color-6)',\n }),\n MantineBadge.withProps({\n variant: 'light',\n bd: `1px solid ${alpha('var(--mantine-primary-color-3)', 0.32)}`,\n c: 'var(--mantine-primary-color-2)',\n bg: alpha('var(--mantine-primary-color-3)', 0.32),\n }),\n 'Badge.Primary',\n);\nconst BadgeSecondary = enhanceBadge(\n MantineBadge.withProps({\n variant: 'light',\n color: 'gray',\n bd: '1px solid var(--badge-bg)',\n c: 'gray.7',\n }),\n MantineBadge.withProps({\n variant: 'light',\n color: 'gray',\n c: 'var(--mantine-color-white)',\n bd: `1px solid ${alpha('var(--mantine-color-gray-3)', 0.16)}`,\n bg: alpha('var(--mantine-color-gray-3)', 0.16),\n }),\n 'Badge.Secondary',\n);\nconst BadgeSuccess = enhanceBadge(\n MantineBadge.withProps({\n variant: 'light',\n color: 'green',\n bd: '1px solid var(--badge-bg)',\n c: 'green.6',\n }),\n MantineBadge.withProps({\n variant: 'light',\n color: 'green',\n c: 'green.2',\n bd: `1px solid ${alpha('var(--mantine-color-green-3)', 0.16)}`,\n bg: alpha('var(--mantine-color-green-3)', 0.16),\n }),\n 'Badge.Success',\n);\nconst BadgeCritical = enhanceBadge(\n MantineBadge.withProps({\n variant: 'light',\n color: 'critical',\n bd: '1px solid var(--badge-bg)',\n c: 'red.6',\n }),\n MantineBadge.withProps({\n variant: 'light',\n color: 'critical',\n c: 'red.2',\n bd: `1px solid ${alpha('var(--mantine-color-red-3)', 0.16)}`,\n bg: alpha('var(--mantine-color-red-3)', 0.16),\n }),\n 'Badge.Critical',\n);\nconst BadgeWarning = enhanceBadge(\n MantineBadge.withProps({\n variant: 'light',\n color: 'warning',\n bd: '1px solid var(--badge-bg)',\n c: 'yellow.6',\n }),\n MantineBadge.withProps({\n variant: 'light',\n color: 'warning',\n c: 'yellow.2',\n bd: `1px solid ${alpha('var(--mantine-color-yellow-3)', 0.16)}`,\n bg: alpha('var(--mantine-color-yellow-3)', 0.16),\n }),\n 'Badge.Warning',\n);\nconst BadgeDisabled = enhanceBadge(\n MantineBadge.withProps({\n variant: 'light',\n color: 'gray',\n c: 'var(--coveo-color-text-disabled)',\n bg: 'var(--coveo-color-bg-disabled)',\n }),\n MantineBadge.withProps({\n variant: 'light',\n color: 'gray',\n c: 'dark.3',\n bg: alpha('var(--mantine-color-gray-3)', 0.16),\n }),\n 'Badge.Disabled',\n);\n\nexport type BadgeOverloadFactory = PolymorphicFactory<{\n props: BadgeProps;\n defaultRef: HTMLDivElement;\n defaultComponent: 'div';\n stylesNames: BadgeStylesNames;\n vars: BadgeCssVariables;\n variant: BadgeVariant;\n staticComponents: {\n Primary: SemanticBadge;\n Secondary: SemanticBadge;\n Success: SemanticBadge;\n Critical: SemanticBadge;\n Warning: SemanticBadge;\n Disabled: SemanticBadge;\n };\n}>;\n\nexport const Badge = polymorphicFactory<BadgeOverloadFactory>((props, ref) => <MantineBadge ref={ref} {...props} />);\n\nBadge.Primary = BadgePrimary;\nBadge.Secondary = BadgeSecondary;\nBadge.Success = BadgeSuccess;\nBadge.Critical = BadgeCritical;\nBadge.Warning = BadgeWarning;\nBadge.Disabled = BadgeDisabled;\n"],"names":["alpha","Badge","MantineBadge","polymorphicFactory","useComputedColorScheme","forwardRef","enhanceBadge","ComponentLight","ComponentDark","displayName","EnhancedBadge","props","ref","computedColorScheme","getInitialValueInEffect","Component","on","py","px","size","h","BadgePrimary","withProps","variant","bd","c","bg","BadgeSecondary","color","BadgeSuccess","BadgeCritical","BadgeWarning","BadgeDisabled","Primary","Secondary","Success","Critical","Warning","Disabled"],"mappings":";AAAA,SACIA,KAAK,EAKLC,SAASC,YAAY,EACrBC,kBAAkB,EAGlBC,sBAAsB,QACnB,gBAAgB;AACvB,SAAQC,UAAU,QAA0E,QAAQ;AA+CpG,MAAMC,eAAe,CACjBC,gBACAC,eACAC;IAEA,MAAMC,8BAAgBL,WAA+C,CAACM,OAAOC;QACzE,MAAMC,sBAAsBT,uBAAuB,SAAS;YAACU,yBAAyB;QAAI;QAC1F,MAAMC,YAAY,AAACJ,CAAAA,MAAMK,EAAE,IAAIH,mBAAkB,MAAO,SAASL,gBAAgBD;QACjF,qBACI,KAACQ;YACGH,KAAKA;YACJ,GAAGD,KAAK;YACTM,IAAI;YACJC,IAAI;YACJC,MAAMR,MAAMQ,IAAI,KAAK,UAAU,OAAO;YACtCC,GAAG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C,GAAG;AACP,IACAvB,aAAaoB,SAAS,CAAC;IACnBC,SAAS;IACTK,OAAO;IACPH,GAAG;IACHD,IAAI,CAAC,UAAU,EAAExB,MAAM,iCAAiC,OAAO;IAC/D0B,IAAI1B,MAAM,iCAAiC;AAC/C,IACA;AAEJ,MAAMgC,gBAAgB1B,aAClBJ,aAAaoB,SAAS,CAAC;IACnBC,SAAS;IACTK,OAAO;IACPH,GAAG;IACHC,IAAI;AACR,IACAxB,aAAaoB,SAAS,CAAC;IACnBC,SAAS;IACTK,OAAO;IACPH,GAAG;IACHC,IAAI1B,MAAM,+BAA+B;AAC7C,IACA;AAoBJ,OAAO,MAAMC,QAAQE,mBAAyC,CAACQ,OAAOC,oBAAQ,KAACV;QAAaU,KAAKA;QAAM,GAAGD,KAAK;QAAM;AAErHV,MAAMgC,OAAO,GAAGZ;AAChBpB,MAAMiC,SAAS,GAAGP;AAClB1B,MAAMkC,OAAO,GAAGN;AAChB5B,MAAMmC,QAAQ,GAAGN;AACjB7B,MAAMoC,OAAO,GAAGN;AAChB9B,MAAMqC,QAAQ,GAAGN"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"xml.d.ts","sourceRoot":"","sources":["../../../../../src/components/CodeEditor/languages/xml.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"xml.d.ts","sourceRoot":"","sources":["../../../../../src/components/CodeEditor/languages/xml.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,sBAAsB,CAAC;AA2C5C,eAAO,MAAM,GAAG;uBAXU,MAAM,KAAG,IAAI;CAWV,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/components/CodeEditor/languages/xml.ts"],"sourcesContent":["import {Monaco} from '@monaco-editor/react';\n\nconst format = (xml: string): string => {\n // https://stackoverflow.com/questions/57039218/doesnt-monaco-editor-support-xml-language-by-default\n const PADDING = ' '.repeat(2);\n const reg = /(>)(<)(\\/*)/g;\n let pad = 0;\n\n xml = xml.replace(reg, '$1\\r\\n$2$3');\n\n return xml\n .split('\\r\\n')\n .map((node) => {\n let indent = 0;\n if (node.match(/.+<\\/\\w[^>]*>$/)) {\n indent = 0;\n } else if (node.match(/^<\\/\\w/) && pad > 0) {\n pad -= 1;\n } else if (node.match(/^<\\w[^>]*[^/]>.*$/)) {\n indent = 1;\n } else {\n indent = 0;\n }\n\n pad += indent;\n\n return PADDING.repeat(pad - indent) + node;\n })\n .join('\\r\\n');\n};\n\nconst register = (monaco: Monaco): void => {\n monaco.languages.registerDocumentFormattingEditProvider('xml', {\n provideDocumentFormattingEdits: async (model) => [\n {\n range: model.getFullModelRange(),\n text: format(model.getValue()),\n },\n ],\n });\n};\n\nexport const XML = {register};\n"],"names":["format","xml","PADDING","repeat","reg","pad","replace","split","map","node","indent","match","join","register","monaco","languages","registerDocumentFormattingEditProvider","provideDocumentFormattingEdits","model","range","getFullModelRange","text","getValue","XML"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/CodeEditor/languages/xml.ts"],"sourcesContent":["import {Monaco} from '@monaco-editor/react';\nimport type {editor} from 'monaco-editor';\n\nconst format = (xml: string): string => {\n // https://stackoverflow.com/questions/57039218/doesnt-monaco-editor-support-xml-language-by-default\n const PADDING = ' '.repeat(2);\n const reg = /(>)(<)(\\/*)/g;\n let pad = 0;\n\n xml = xml.replace(reg, '$1\\r\\n$2$3');\n\n return xml\n .split('\\r\\n')\n .map((node) => {\n let indent = 0;\n if (node.match(/.+<\\/\\w[^>]*>$/)) {\n indent = 0;\n } else if (node.match(/^<\\/\\w/) && pad > 0) {\n pad -= 1;\n } else if (node.match(/^<\\w[^>]*[^/]>.*$/)) {\n indent = 1;\n } else {\n indent = 0;\n }\n\n pad += indent;\n\n return PADDING.repeat(pad - indent) + node;\n })\n .join('\\r\\n');\n};\n\nconst register = (monaco: Monaco): void => {\n monaco.languages.registerDocumentFormattingEditProvider('xml', {\n provideDocumentFormattingEdits: async (model: editor.ITextModel) => [\n {\n range: model.getFullModelRange(),\n text: format(model.getValue()),\n },\n ],\n });\n};\n\nexport const XML = {register};\n"],"names":["format","xml","PADDING","repeat","reg","pad","replace","split","map","node","indent","match","join","register","monaco","languages","registerDocumentFormattingEditProvider","provideDocumentFormattingEdits","model","range","getFullModelRange","text","getValue","XML"],"mappings":"AAGA,MAAMA,SAAS,CAACC;IACZ,oGAAoG;IACpG,MAAMC,UAAU,IAAIC,MAAM,CAAC;IAC3B,MAAMC,MAAM;IACZ,IAAIC,MAAM;IAEVJ,MAAMA,IAAIK,OAAO,CAACF,KAAK;IAEvB,OAAOH,IACFM,KAAK,CAAC,QACNC,GAAG,CAAC,CAACC;QACF,IAAIC,SAAS;QACb,IAAID,KAAKE,KAAK,CAAC,mBAAmB;YAC9BD,SAAS;QACb,OAAO,IAAID,KAAKE,KAAK,CAAC,aAAaN,MAAM,GAAG;YACxCA,OAAO;QACX,OAAO,IAAII,KAAKE,KAAK,CAAC,sBAAsB;YACxCD,SAAS;QACb,OAAO;YACHA,SAAS;QACb;QAEAL,OAAOK;QAEP,OAAOR,QAAQC,MAAM,CAACE,MAAMK,UAAUD;IAC1C,GACCG,IAAI,CAAC;AACd;AAEA,MAAMC,WAAW,CAACC;IACdA,OAAOC,SAAS,CAACC,sCAAsC,CAAC,OAAO;QAC3DC,gCAAgC,OAAOC,QAA6B;gBAChE;oBACIC,OAAOD,MAAME,iBAAiB;oBAC9BC,MAAMrB,OAAOkB,MAAMI,QAAQ;gBAC/B;aACH;IACL;AACJ;AAEA,OAAO,MAAMC,MAAM;IAACV;AAAQ,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enhanceWithCollectionProps.d.ts","sourceRoot":"","sources":["../../../../src/components/Collection/enhanceWithCollectionProps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,
|
|
1
|
+
{"version":3,"file":"enhanceWithCollectionProps.d.ts","sourceRoot":"","sources":["../../../../src/components/Collection/enhanceWithCollectionProps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAwB,MAAM,eAAe,CAAC;AAClE,OAAO,EAAC,eAAe,EAAC,MAAM,iBAAiB,CAAC;AAEhD,eAAO,MAAM,0BAA0B,GACnC,UAAU,EACV,eAAe,SAAS,CAAC,MAAM,EAAE,UAAU,KAAK,OAAO,GAAG,CAAC,MAAM,EAAE,UAAU,KAAK,UAAU,EAE5F,SAAS,UAAU,CAAC,YAAY,CAAC,UAAU,EAAE,eAAe,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,EACzF,OAAO,CAAC,OAAO,OAAO,EAAE,OAAO,CAAC,EAChC,UAAU;IAAC,qBAAqB,CAAC,EAAE,OAAO,CAAA;CAAC,KAC5C,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,EAAE,eAAe,GAAG,cAAc,GAAG,cAAc,CAoBlF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/Collection/enhanceWithCollectionProps.ts"],"sourcesContent":["import {UseFormInput} from '@mantine/form';\nimport {CollectionProps} from './Collection.js';\n\nexport const enhanceWithCollectionProps = <\n FormValues,\n TransformValues extends (values: FormValues) => unknown = (values: FormValues) => FormValues,\n>(\n payload: Parameters<UseFormInput<FormValues, TransformValues>['enhanceGetInputProps']>[0],\n field: (typeof payload)['field'],\n options?: {validateInputOnChange?: boolean},\n): Pick<CollectionProps<unknown>, 'onReorderItem' | 'onInsertItem' | 'onRemoveItem'> => {\n if (payload.field === field) {\n const {validateInputOnChange = false} = options || {};\n return {\n onReorderItem: (reorderPayload: Record<'from' | 'to', number>) => {\n payload.form.reorderListItem(field, reorderPayload);\n validateInputOnChange && payload.form.validate();\n },\n onRemoveItem: (index: number) => {\n payload.form.removeListItem(field, index);\n validateInputOnChange && payload.form.validate();\n },\n onInsertItem: (valueToInsert:
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/Collection/enhanceWithCollectionProps.ts"],"sourcesContent":["import {UseFormInput, type FormArrayElement} from '@mantine/form';\nimport {CollectionProps} from './Collection.js';\n\nexport const enhanceWithCollectionProps = <\n FormValues,\n TransformValues extends (values: FormValues) => unknown = (values: FormValues) => FormValues,\n>(\n payload: Parameters<UseFormInput<FormValues, TransformValues>['enhanceGetInputProps']>[0],\n field: (typeof payload)['field'],\n options?: {validateInputOnChange?: boolean},\n): Pick<CollectionProps<unknown>, 'onReorderItem' | 'onInsertItem' | 'onRemoveItem'> => {\n if (payload.field === field) {\n const {validateInputOnChange = false} = options || {};\n return {\n onReorderItem: (reorderPayload: Record<'from' | 'to', number>) => {\n payload.form.reorderListItem(field, reorderPayload);\n validateInputOnChange && payload.form.validate();\n },\n onRemoveItem: (index: number) => {\n payload.form.removeListItem(field, index);\n validateInputOnChange && payload.form.validate();\n },\n onInsertItem: (valueToInsert: FormArrayElement<FormValues, (typeof payload)['field']>, index: number) => {\n payload.form.insertListItem(field, valueToInsert, index);\n validateInputOnChange && payload.form.validate();\n },\n };\n }\n\n return {};\n};\n"],"names":["enhanceWithCollectionProps","payload","field","options","validateInputOnChange","onReorderItem","reorderPayload","form","reorderListItem","validate","onRemoveItem","index","removeListItem","onInsertItem","valueToInsert","insertListItem"],"mappings":"AAGA,OAAO,MAAMA,6BAA6B,CAItCC,SACAC,OACAC;IAEA,IAAIF,QAAQC,KAAK,KAAKA,OAAO;QACzB,MAAM,EAACE,wBAAwB,KAAK,EAAC,GAAGD,WAAW,CAAC;QACpD,OAAO;YACHE,eAAe,CAACC;gBACZL,QAAQM,IAAI,CAACC,eAAe,CAACN,OAAOI;gBACpCF,yBAAyBH,QAAQM,IAAI,CAACE,QAAQ;YAClD;YACAC,cAAc,CAACC;gBACXV,QAAQM,IAAI,CAACK,cAAc,CAACV,OAAOS;gBACnCP,yBAAyBH,QAAQM,IAAI,CAACE,QAAQ;YAClD;YACAI,cAAc,CAACC,eAAwEH;gBACnFV,QAAQM,IAAI,CAACQ,cAAc,CAACb,OAAOY,eAAeH;gBAClDP,yBAAyBH,QAAQM,IAAI,CAACE,QAAQ;YAClD;QACJ;IACJ;IAEA,OAAO,CAAC;AACZ,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateRangePicker.d.ts","sourceRoot":"","sources":["../../../../src/components/DateRangePicker/DateRangePicker.tsx"],"names":[],"mappings":"AACA,OAAO,EACH,QAAQ,EAER,OAAO,EAGP,YAAY,EACZ,cAAc,EAGjB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAC,eAAe,EAAkB,MAAM,gBAAgB,CAAC;AAEhE,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"DateRangePicker.d.ts","sourceRoot":"","sources":["../../../../src/components/DateRangePicker/DateRangePicker.tsx"],"names":[],"mappings":"AACA,OAAO,EACH,QAAQ,EAER,OAAO,EAGP,YAAY,EACZ,cAAc,EAGjB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAC,eAAe,EAAkB,MAAM,gBAAgB,CAAC;AAEhE,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAgC,kCAAkC,EAAC,MAAM,iCAAiC,CAAC;AAgBlH,MAAM,MAAM,0BAA0B,GAAG,OAAO,CAAC;AAEjD,MAAM,WAAW,oBACb,SAAQ,QAAQ,EACZ,IAAI,CAAC,kCAAkC,EAAE,SAAS,GAAG,oBAAoB,GAAG,YAAY,GAAG,UAAU,CAAC,EACtG,IAAI,CAAC,YAAY,EAAE,QAAQ,GAAG,eAAe,CAAC,EAC9C,cAAc,CAAC,sBAAsB,CAAC;IAC1C;;OAEG;IACH,OAAO,CAAC,IAAI,IAAI,CAAC;IACjB;;OAEG;IACH,QAAQ,CAAC,IAAI,IAAI,CAAC;IAClB;;OAEG;IACH,QAAQ,CAAC,CAAC,KAAK,EAAE,eAAe,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;IAChD;;OAEG;IACH,cAAc,CAAC,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAAC;IACvC;;;;OAIG;IACH,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,KAAK,CAAC,UAAU,KAAK,MAAM,CAAC;IAC/C;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,YAAY,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;IACvC;;OAEG;IACH,KAAK,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;IAChC;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,MAAM,sBAAsB,GAAG,OAAO,CAAC;IACzC,KAAK,EAAE,oBAAoB,CAAC;IAC5B,GAAG,EAAE,cAAc,CAAC;IACpB,WAAW,EAAE,0BAA0B,CAAC;CAC3C,CAAC,CAAC;AAOH,eAAO,MAAM,eAAe;WAVjB,oBAAoB;SACtB,cAAc;iBACN,0BAA0B;EA8GzC,CAAC"}
|
|
@@ -4,6 +4,7 @@ import { factory, InputBase, Popover, useProps, useStyles } from '@mantine/core'
|
|
|
4
4
|
import { useUncontrolled } from '@mantine/hooks';
|
|
5
5
|
import dayjs from 'dayjs';
|
|
6
6
|
import { useUrlSyncedState } from '../../hooks/use-url-synced-state';
|
|
7
|
+
import classes from './DateRange.module.css';
|
|
7
8
|
import { DateRangePickerInlineCalendar } from './DateRangePickerInlineCalendar';
|
|
8
9
|
const serialization = (input)=>Object.freeze(input);
|
|
9
10
|
const DATE_RANGE_SERIALIZATION = serialization({
|
|
@@ -32,7 +33,7 @@ export const DateRangePicker = factory((props)=>{
|
|
|
32
33
|
const { defaultValue, value, opened, defaultOpened, onOpenedChange, onClick, onCancel, onChange, presets, startProps, endProps, rangeCalendarProps, formatter, placeholder, syncWithUrl, error, className, classNames, style, styles, vars, unstyled, ...others } = useProps('PlasmaDateRangePicker', defaultProps, props);
|
|
33
34
|
const getStyles = useStyles({
|
|
34
35
|
name: 'DateRangePicker',
|
|
35
|
-
classes
|
|
36
|
+
classes,
|
|
36
37
|
props,
|
|
37
38
|
className,
|
|
38
39
|
classNames,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/DateRangePicker/DateRangePicker.tsx"],"sourcesContent":["import {IconCalendar} from '@coveord/plasma-react-icons';\nimport {\n BoxProps,\n factory,\n Factory,\n InputBase,\n Popover,\n PopoverProps,\n StylesApiProps,\n useProps,\n useStyles,\n} from '@mantine/core';\nimport {DatesRangeValue, DateStringValue} from '@mantine/dates';\nimport {useUncontrolled} from '@mantine/hooks';\nimport dayjs from 'dayjs';\nimport {useUrlSyncedState, UseUrlSyncedStateOptions} from '../../hooks/use-url-synced-state';\nimport {DateRangePickerInlineCalendar, DateRangePickerInlineCalendarProps} from './DateRangePickerInlineCalendar';\n\nconst serialization = (input: Pick<UseUrlSyncedStateOptions<DatesRangeValue<string>>, 'serializer' | 'deserializer'>) =>\n Object.freeze(input);\n\nconst DATE_RANGE_SERIALIZATION = serialization({\n serializer: ([from, to]) => [\n ['from', from ? new Date(from).toISOString() : '', true],\n ['to', to ? new Date(to).toISOString() : '', true],\n ],\n deserializer: (params, initial) => [\n params.get('from') ? params.get('from') : initial[0],\n params.get('to') ? params.get('to') : initial[1],\n ],\n});\n\nexport type DateRangePickerStylesNames = 'input';\n\nexport interface DateRangePickerProps\n extends BoxProps,\n Pick<DateRangePickerInlineCalendarProps, 'presets' | 'rangeCalendarProps' | 'startProps' | 'endProps'>,\n Pick<PopoverProps, 'opened' | 'defaultOpened'>,\n StylesApiProps<DateRangePickerFactory> {\n /**\n * Called when the target input is clicked\n */\n onClick?(): void;\n /**\n * Function called when the cancel button is clicked.\n */\n onCancel?(): void;\n /**\n * Function called when the date range value changes.\n */\n onChange?(dates: DatesRangeValue<string>): void;\n /**\n * Called when the popover opened state changes.\n */\n onOpenedChange?(opened: boolean): void;\n /**\n * Optional formatter function to format the date value.\n * Receives the date prop and should return a string.\n * @default (time) => dayjs(time).format('MMM D, YYYY')\n */\n formatter?: (time: dayjs.ConfigType) => string;\n /**\n * The placeholder label to display when no date range is selected.\n *\n * @default \"Select date range\"\n */\n placeholder?: string;\n /**\n * Default value for uncontrolled input\n */\n defaultValue?: DatesRangeValue<string>;\n /**\n * Value for controlled input\n */\n value?: DatesRangeValue<string>;\n /**\n * Sync the selected dates to URL query parameters\n */\n syncWithUrl?: boolean;\n /**\n * Error message to display.\n */\n error?: string;\n}\n\nexport type DateRangePickerFactory = Factory<{\n props: DateRangePickerProps;\n ref: HTMLDivElement;\n stylesNames: DateRangePickerStylesNames;\n}>;\n\nconst defaultProps: Partial<DateRangePickerProps> = {\n placeholder: 'Select date range',\n formatter: (time) => dayjs(time).format('MMM D, YYYY'),\n};\n\nexport const DateRangePicker = factory<DateRangePickerFactory>((props: DateRangePickerProps) => {\n const {\n defaultValue,\n value,\n opened,\n defaultOpened,\n onOpenedChange,\n onClick,\n onCancel,\n onChange,\n presets,\n startProps,\n endProps,\n rangeCalendarProps,\n formatter,\n placeholder,\n syncWithUrl,\n error,\n className,\n classNames,\n style,\n styles,\n vars,\n unstyled,\n ...others\n } = useProps('PlasmaDateRangePicker', defaultProps as Partial<DateRangePickerProps>, props);\n\n const getStyles = useStyles<DateRangePickerFactory>({\n name: 'DateRangePicker',\n classes
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/DateRangePicker/DateRangePicker.tsx"],"sourcesContent":["import {IconCalendar} from '@coveord/plasma-react-icons';\nimport {\n BoxProps,\n factory,\n Factory,\n InputBase,\n Popover,\n PopoverProps,\n StylesApiProps,\n useProps,\n useStyles,\n} from '@mantine/core';\nimport {DatesRangeValue, DateStringValue} from '@mantine/dates';\nimport {useUncontrolled} from '@mantine/hooks';\nimport dayjs from 'dayjs';\nimport {useUrlSyncedState, UseUrlSyncedStateOptions} from '../../hooks/use-url-synced-state';\nimport classes from './DateRange.module.css';\nimport {DateRangePickerInlineCalendar, DateRangePickerInlineCalendarProps} from './DateRangePickerInlineCalendar';\n\nconst serialization = (input: Pick<UseUrlSyncedStateOptions<DatesRangeValue<string>>, 'serializer' | 'deserializer'>) =>\n Object.freeze(input);\n\nconst DATE_RANGE_SERIALIZATION = serialization({\n serializer: ([from, to]) => [\n ['from', from ? new Date(from).toISOString() : '', true],\n ['to', to ? new Date(to).toISOString() : '', true],\n ],\n deserializer: (params, initial) => [\n params.get('from') ? params.get('from') : initial[0],\n params.get('to') ? params.get('to') : initial[1],\n ],\n});\n\nexport type DateRangePickerStylesNames = 'input';\n\nexport interface DateRangePickerProps\n extends BoxProps,\n Pick<DateRangePickerInlineCalendarProps, 'presets' | 'rangeCalendarProps' | 'startProps' | 'endProps'>,\n Pick<PopoverProps, 'opened' | 'defaultOpened'>,\n StylesApiProps<DateRangePickerFactory> {\n /**\n * Called when the target input is clicked\n */\n onClick?(): void;\n /**\n * Function called when the cancel button is clicked.\n */\n onCancel?(): void;\n /**\n * Function called when the date range value changes.\n */\n onChange?(dates: DatesRangeValue<string>): void;\n /**\n * Called when the popover opened state changes.\n */\n onOpenedChange?(opened: boolean): void;\n /**\n * Optional formatter function to format the date value.\n * Receives the date prop and should return a string.\n * @default (time) => dayjs(time).format('MMM D, YYYY')\n */\n formatter?: (time: dayjs.ConfigType) => string;\n /**\n * The placeholder label to display when no date range is selected.\n *\n * @default \"Select date range\"\n */\n placeholder?: string;\n /**\n * Default value for uncontrolled input\n */\n defaultValue?: DatesRangeValue<string>;\n /**\n * Value for controlled input\n */\n value?: DatesRangeValue<string>;\n /**\n * Sync the selected dates to URL query parameters\n */\n syncWithUrl?: boolean;\n /**\n * Error message to display.\n */\n error?: string;\n}\n\nexport type DateRangePickerFactory = Factory<{\n props: DateRangePickerProps;\n ref: HTMLDivElement;\n stylesNames: DateRangePickerStylesNames;\n}>;\n\nconst defaultProps: Partial<DateRangePickerProps> = {\n placeholder: 'Select date range',\n formatter: (time) => dayjs(time).format('MMM D, YYYY'),\n};\n\nexport const DateRangePicker = factory<DateRangePickerFactory>((props: DateRangePickerProps) => {\n const {\n defaultValue,\n value,\n opened,\n defaultOpened,\n onOpenedChange,\n onClick,\n onCancel,\n onChange,\n presets,\n startProps,\n endProps,\n rangeCalendarProps,\n formatter,\n placeholder,\n syncWithUrl,\n error,\n className,\n classNames,\n style,\n styles,\n vars,\n unstyled,\n ...others\n } = useProps('PlasmaDateRangePicker', defaultProps as Partial<DateRangePickerProps>, props);\n\n const getStyles = useStyles<DateRangePickerFactory>({\n name: 'DateRangePicker',\n classes,\n props,\n className,\n classNames,\n style,\n styles,\n unstyled,\n vars,\n });\n const stylesApiProps = {classNames, styles};\n\n const [_opened, setOpened] = useUncontrolled({\n value: opened,\n defaultValue: defaultOpened,\n finalValue: false,\n onChange: onOpenedChange,\n });\n\n const [dateRange, setDateRange] = useUrlSyncedState<DatesRangeValue<string>>({\n ...DATE_RANGE_SERIALIZATION,\n initialState: defaultValue !== undefined ? defaultValue : [null, null],\n sync: !!syncWithUrl,\n });\n\n const handleApply = (dates: DatesRangeValue<string>) => {\n if (value === undefined) {\n setDateRange(dates);\n }\n onChange?.(dates);\n setOpened(false);\n };\n\n const handleClick = () => {\n setOpened(true);\n onClick?.();\n };\n\n const handleCancel = () => {\n setOpened(false);\n onCancel?.();\n };\n\n const _value = value ?? dateRange;\n const formattedRange = `${formatter(_value[0])} - ${formatter(_value[1])}`;\n const dateRangeInitialized = _value.every((date: DateStringValue) => typeof date === 'string' && date !== '');\n\n return (\n <Popover opened={_opened} onChange={setOpened}>\n <Popover.Target>\n <InputBase\n component=\"button\"\n leftSection={<IconCalendar height={16} />}\n onClick={handleClick}\n error={error}\n {...getStyles('input', {className, style, ...stylesApiProps})}\n {...others}\n >\n {dateRangeInitialized ? formattedRange : placeholder}\n </InputBase>\n </Popover.Target>\n <Popover.Dropdown p={0}>\n <DateRangePickerInlineCalendar\n initialRange={_value}\n onApply={handleApply}\n onCancel={handleCancel}\n presets={presets}\n rangeCalendarProps={rangeCalendarProps}\n startProps={startProps}\n endProps={endProps}\n />\n </Popover.Dropdown>\n </Popover>\n );\n});\n"],"names":["IconCalendar","factory","InputBase","Popover","useProps","useStyles","useUncontrolled","dayjs","useUrlSyncedState","classes","DateRangePickerInlineCalendar","serialization","input","Object","freeze","DATE_RANGE_SERIALIZATION","serializer","from","to","Date","toISOString","deserializer","params","initial","get","defaultProps","placeholder","formatter","time","format","DateRangePicker","props","defaultValue","value","opened","defaultOpened","onOpenedChange","onClick","onCancel","onChange","presets","startProps","endProps","rangeCalendarProps","syncWithUrl","error","className","classNames","style","styles","vars","unstyled","others","getStyles","name","stylesApiProps","_opened","setOpened","finalValue","dateRange","setDateRange","initialState","undefined","sync","handleApply","dates","handleClick","handleCancel","_value","formattedRange","dateRangeInitialized","every","date","Target","component","leftSection","height","Dropdown","p","initialRange","onApply"],"mappings":";AAAA,SAAQA,YAAY,QAAO,8BAA8B;AACzD,SAEIC,OAAO,EAEPC,SAAS,EACTC,OAAO,EAGPC,QAAQ,EACRC,SAAS,QACN,gBAAgB;AAEvB,SAAQC,eAAe,QAAO,iBAAiB;AAC/C,OAAOC,WAAW,QAAQ;AAC1B,SAAQC,iBAAiB,QAAiC,mCAAmC;AAC7F,OAAOC,aAAa,yBAAyB;AAC7C,SAAQC,6BAA6B,QAA2C,kCAAkC;AAElH,MAAMC,gBAAgB,CAACC,QACnBC,OAAOC,MAAM,CAACF;AAElB,MAAMG,2BAA2BJ,cAAc;IAC3CK,YAAY,CAAC,CAACC,MAAMC,GAAG,GAAK;YACxB;gBAAC;gBAAQD,OAAO,IAAIE,KAAKF,MAAMG,WAAW,KAAK;gBAAI;aAAK;YACxD;gBAAC;gBAAMF,KAAK,IAAIC,KAAKD,IAAIE,WAAW,KAAK;gBAAI;aAAK;SACrD;IACDC,cAAc,CAACC,QAAQC,UAAY;YAC/BD,OAAOE,GAAG,CAAC,UAAUF,OAAOE,GAAG,CAAC,U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AS0B;IACxB,MAAMU,iBAAiB,GAAG1C,UAAUyC,MAAM,CAAC,EAAE,EAAE,GAAG,EAAEzC,UAAUyC,MAAM,CAAC,EAAE,GAAG;IAC1E,MAAME,uBAAuBF,OAAOG,KAAK,CAAC,CAACC,OAA0B,OAAOA,SAAS,YAAYA,SAAS;IAE1G,qBACI,MAACrE;QAAQ+B,QAAQsB;QAASjB,UAAUkB;;0BAChC,KAACtD,QAAQsE,MAAM;0BACX,cAAA,KAACvE;oBACGwE,WAAU;oBACVC,2BAAa,KAAC3E;wBAAa4E,QAAQ;;oBACnCvC,SAAS6B;oBACTrB,OAAOA;oBACN,GAAGQ,UAAU,SAAS;wBAACP;wBAAWE;wBAAO,GAAGO,cAAc;oBAAA,EAAE;oBAC5D,GAAGH,MAAM;8BAETkB,uBAAuBD,iBAAiB3C;;;0BAGjD,KAACvB,QAAQ0E,QAAQ;gBAACC,GAAG;0BACjB,cAAA,KAACpE;oBACGqE,cAAcX;oBACdY,SAAShB;oBACT1B,UAAU6B;oBACV3B,SAASA;oBACTG,oBAAoBA;oBACpBF,YAAYA;oBACZC,UAAUA;;;;;AAK9B,GAAG"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Factory, RadioCardProps as MantineRadioCardProps, RadioCardStylesNames as MantineRadioCardStylesNames, RadioCardCssVariables, StylesApiProps } from '@mantine/core';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
export type RadioCardStylesNames = MantineRadioCardStylesNames | 'container' | 'indicator' | 'title' | 'description';
|
|
4
|
+
export type RadioCardFactory = Factory<{
|
|
5
|
+
props: RadioCardProps;
|
|
6
|
+
ref: HTMLButtonElement;
|
|
7
|
+
stylesNames: RadioCardStylesNames;
|
|
8
|
+
vars: RadioCardCssVariables;
|
|
9
|
+
}>;
|
|
10
|
+
export type RadioCardProps = MantineRadioCardProps & StylesApiProps<RadioCardFactory> & {
|
|
11
|
+
/**
|
|
12
|
+
* The label of the card. Appears next to the radio indicator.
|
|
13
|
+
*/
|
|
14
|
+
label: ReactNode;
|
|
15
|
+
/**
|
|
16
|
+
* The description of the card. Appears under the title.
|
|
17
|
+
*/
|
|
18
|
+
description?: ReactNode;
|
|
19
|
+
};
|
|
20
|
+
export declare const RadioCard: import("@mantine/core").MantineComponent<{
|
|
21
|
+
props: RadioCardProps;
|
|
22
|
+
ref: HTMLButtonElement;
|
|
23
|
+
stylesNames: RadioCardStylesNames;
|
|
24
|
+
vars: RadioCardCssVariables;
|
|
25
|
+
}>;
|
|
26
|
+
//# sourceMappingURL=RadioCard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RadioCard.d.ts","sourceRoot":"","sources":["../../../../src/components/RadioCard/RadioCard.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEH,OAAO,EAEP,cAAc,IAAI,qBAAqB,EACvC,oBAAoB,IAAI,2BAA2B,EAEnD,qBAAqB,EACrB,cAAc,EAKjB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AAGhC,MAAM,MAAM,oBAAoB,GAAG,2BAA2B,GAAG,WAAW,GAAG,WAAW,GAAG,OAAO,GAAG,aAAa,CAAC;AACrH,MAAM,MAAM,gBAAgB,GAAG,OAAO,CAAC;IACnC,KAAK,EAAE,cAAc,CAAC;IACtB,GAAG,EAAE,iBAAiB,CAAC;IACvB,WAAW,EAAE,oBAAoB,CAAC;IAClC,IAAI,EAAE,qBAAqB,CAAC;CAC/B,CAAC,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,qBAAqB,GAC9C,cAAc,CAAC,gBAAgB,CAAC,GAAG;IAC/B;;OAEG;IACH,KAAK,EAAE,SAAS,CAAC;IACjB;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;CAC3B,CAAC;AAIN,eAAO,MAAM,SAAS;WApBX,cAAc;SAChB,iBAAiB;iBACT,oBAAoB;UAC3B,qBAAqB;EAkD7B,CAAC"}
|
|
@@ -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,yBAAyB,CAAC;AAE1D,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAC,UAAU,EAAC,MAAM,eAAe,CAAC;AACzC,OAAO,EAAC,KAAK,eAAe,EAAC,MAAM,gBAAgB,CAAC;AACpD,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAC,KAAK,kBAAkB,EAAC,MAAM,wBAAwB,CAAC;AAC/D,cAAc,sBAAsB,CAAC;AAIrC,OAAO,EAAC,SAAS,EAAC,MAAM,qCAAqC,CAAC;AAG9D,OAAO,EAAC,UAAU,EAAE,KAAK,eAAe,EAAC,MAAM,uCAAuC,CAAC;AAGvF,OAAO,EAAC,KAAK,EAAC,MAAM,6BAA6B,CAAC;AAGlD,OAAO,EACH,KAAK,EACL,KAA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AE,KAAK,UAAU,EAAE,KAAK,eAAe,EAAC,MAAM,iCAAiC,CAAC;AACjH,OAAO,EAAC,iBAAiB,EAAE,KAAK,gBAAgB,EAAE,KAAK,wBAAwB,EAAC,MAAM,iCAAiC,CAAC;AAExH,OAAO,EAAC,IAAI,EAAC,CAAC;AAGd,cAAc,uCAAuC,CAAC;AACtD,cAAc,wBAAwB,CAAC;AAEvC,OAAO,QAAQ,eAAe,CAAC;IAC3B,UAAiB,0BAA0B;QACvC,MAAM,EAAE,MAAM,CAAC,MAAM,OAAO,YAAY,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,EAAE,kBAAkB,CAAC,CAAC;KACjF;CACJ;AAED,OAAO,QAAQ,uBAAuB,CAAC;IACnC,UAAU,UAAU,CAAC,KAAK,SAAS,OAAO,EAAE,MAAM;QAC9C;;;;WAIG;QACH,aAAa,EAAE,OAAO,CAAC;KAC1B;CACJ"}
|
package/dist/esm/index.js
CHANGED
|
@@ -61,6 +61,8 @@ export { Modal } from './components/Modal/Modal.js';
|
|
|
61
61
|
export * from './components/Modal/ModalFooter.js';
|
|
62
62
|
// 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;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,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,
|
|
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// 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,oBA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;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
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import '../styles/global.css';
|
|
1
2
|
import { MantineProviderProps } from '@mantine/core';
|
|
2
3
|
import { FunctionComponent } from 'react';
|
|
3
|
-
import '../styles/global.css';
|
|
4
4
|
export declare const Plasmantine: FunctionComponent<MantineProviderProps>;
|
|
5
5
|
//# sourceMappingURL=Plasmantine.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Plasmantine.d.ts","sourceRoot":"","sources":["../../../src/theme/Plasmantine.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAkB,oBAAoB,EAAsB,MAAM,eAAe,CAAC;AACzF,OAAO,EAAC,iBAAiB,EAAC,MAAM,OAAO,CAAC;AAKxC,
|
|
1
|
+
{"version":3,"file":"Plasmantine.d.ts","sourceRoot":"","sources":["../../../src/theme/Plasmantine.tsx"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAE9B,OAAO,EAAkB,oBAAoB,EAAsB,MAAM,eAAe,CAAC;AACzF,OAAO,EAAC,iBAAiB,EAAC,MAAM,OAAO,CAAC;AAKxC,eAAO,MAAM,WAAW,EAAE,iBAAiB,CAAC,oBAAoB,CAc/D,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import '../styles/global.css';
|
|
2
3
|
import { MantineProvider, mergeThemeOverrides } from '@mantine/core';
|
|
4
|
+
import { mergeCSSVariablesResolvers } from './mergeCSSVariablesResolvers.js';
|
|
3
5
|
import { plasmaCSSVariablesResolver } from './plasmaCSSVariablesResolver.js';
|
|
4
6
|
import { plasmaTheme } from './Theme.js';
|
|
5
|
-
import { mergeCSSVariablesResolvers } from './mergeCSSVariablesResolvers.js';
|
|
6
|
-
import '../styles/global.css';
|
|
7
7
|
export const Plasmantine = ({ children, theme: externalTheme, cssVariablesResolver: externalCSSVariablesResolver, ...others })=>{
|
|
8
8
|
const theme = mergeThemeOverrides(plasmaTheme, externalTheme);
|
|
9
9
|
const cssVariablesResolver = mergeCSSVariablesResolvers(plasmaCSSVariablesResolver, externalCSSVariablesResolver);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/theme/Plasmantine.tsx"],"sourcesContent":["import {MantineProvider, MantineProviderProps, mergeThemeOverrides} from '@mantine/core';\nimport {FunctionComponent} from 'react';\
|
|
1
|
+
{"version":3,"sources":["../../../src/theme/Plasmantine.tsx"],"sourcesContent":["import '../styles/global.css';\n\nimport {MantineProvider, MantineProviderProps, mergeThemeOverrides} from '@mantine/core';\nimport {FunctionComponent} from 'react';\nimport {mergeCSSVariablesResolvers} from './mergeCSSVariablesResolvers.js';\nimport {plasmaCSSVariablesResolver} from './plasmaCSSVariablesResolver.js';\nimport {plasmaTheme} from './Theme.js';\n\nexport const Plasmantine: FunctionComponent<MantineProviderProps> = ({\n children,\n theme: externalTheme,\n cssVariablesResolver: externalCSSVariablesResolver,\n ...others\n}) => {\n const theme = mergeThemeOverrides(plasmaTheme, externalTheme);\n const cssVariablesResolver = mergeCSSVariablesResolvers(plasmaCSSVariablesResolver, externalCSSVariablesResolver);\n\n return (\n <MantineProvider theme={theme} cssVariablesResolver={cssVariablesResolver} {...others}>\n {children}\n </MantineProvider>\n );\n};\n"],"names":["MantineProvider","mergeThemeOverrides","mergeCSSVariablesResolvers","plasmaCSSVariablesResolver","plasmaTheme","Plasmantine","children","theme","externalTheme","cssVariablesResolver","externalCSSVariablesResolver","others"],"mappings":";AAAA,OAAO,uBAAuB;AAE9B,SAAQA,eAAe,EAAwBC,mBAAmB,QAAO,gBAAgB;AAEzF,SAAQC,0BAA0B,QAAO,kCAAkC;AAC3E,SAAQC,0BAA0B,QAAO,kCAAkC;AAC3E,SAAQC,WAAW,QAAO,aAAa;AAEvC,OAAO,MAAMC,cAAuD,CAAC,EACjEC,QAAQ,EACRC,OAAOC,aAAa,EACpBC,sBAAsBC,4BAA4B,EAClD,GAAGC,QACN;IACG,MAAMJ,QAAQN,oBAAoBG,aAAaI;IAC/C,MAAMC,uBAAuBP,2BAA2BC,4BAA4BO;IAEpF,qBACI,KAACV;QAAgBO,OAAOA;QAAOE,sBAAsBA;QAAuB,GAAGE,MAAM;kBAChFL;;AAGb,EAAE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coveord/plasma-mantine",
|
|
3
|
-
"version": "56.
|
|
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",
|