@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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../../../src/components/Badge/Badge.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEH,iBAAiB,EACjB,UAAU,EACV,gB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H;QACd,OAAO,EAAE,aAAa,CAAC;QACvB,SAAS,EAAE,aAAa,CAAC;QACzB,OAAO,EAAE,aAAa,CAAC;QACvB,QAAQ,EAAE,aAAa,CAAC;QACxB,OAAO,EAAE,aAAa,CAAC;QACvB,QAAQ,EAAE,aAAa,CAAC;KAC3B;;WAbM,UAAU;gBACL,cAAc;sBACR,KAAK;iBACV,gBAAgB;UACvB,iBAAiB;aACd,YAAY;sBACH;QACd,OAAO,EAAE,aAAa,CAAC;QACvB,SAAS,EAAE,aAAa,CAAC;QACzB,OAAO,EAAE,aAAa,CAAC;QACvB,QAAQ,EAAE,aAAa,CAAC;QACxB,OAAO,EAAE,aAAa,CAAC;QACvB,QAAQ,EAAE,aAAa,CAAC;KAC3B;;aANY,aAAa;eACX,aAAa;aACf,aAAa;cACZ,aAAa;aACd,aAAa;cACZ,aAAa;CAIqF,CAAC"}
|
|
@@ -13,8 +13,8 @@ var _object_spread_props = require("@swc/helpers/_/_object_spread_props");
|
|
|
13
13
|
var _jsxruntime = require("react/jsx-runtime");
|
|
14
14
|
var _core = require("@mantine/core");
|
|
15
15
|
var _react = require("react");
|
|
16
|
-
var enhanceBadge = function(ComponentLight, ComponentDark) {
|
|
17
|
-
|
|
16
|
+
var enhanceBadge = function(ComponentLight, ComponentDark, displayName) {
|
|
17
|
+
var EnhancedBadge = /*#__PURE__*/ (0, _react.forwardRef)(function(props, ref) {
|
|
18
18
|
var computedColorScheme = (0, _core.useComputedColorScheme)('light', {
|
|
19
19
|
getInitialValueInEffect: true
|
|
20
20
|
});
|
|
@@ -28,6 +28,8 @@ var enhanceBadge = function(ComponentLight, ComponentDark) {
|
|
|
28
28
|
h: props.size === 'large' ? 22 : 20
|
|
29
29
|
}));
|
|
30
30
|
});
|
|
31
|
+
EnhancedBadge.displayName = displayName;
|
|
32
|
+
return EnhancedBadge;
|
|
31
33
|
};
|
|
32
34
|
var BadgePrimary = enhanceBadge(_core.Badge.withProps({
|
|
33
35
|
variant: 'light',
|
|
@@ -38,7 +40,7 @@ var BadgePrimary = enhanceBadge(_core.Badge.withProps({
|
|
|
38
40
|
bd: "1px solid ".concat((0, _core.alpha)('var(--mantine-primary-color-3)', 0.32)),
|
|
39
41
|
c: 'var(--mantine-primary-color-2)',
|
|
40
42
|
bg: (0, _core.alpha)('var(--mantine-primary-color-3)', 0.32)
|
|
41
|
-
}));
|
|
43
|
+
}), 'Badge.Primary');
|
|
42
44
|
var BadgeSecondary = enhanceBadge(_core.Badge.withProps({
|
|
43
45
|
variant: 'light',
|
|
44
46
|
color: 'gray',
|
|
@@ -50,7 +52,7 @@ var BadgeSecondary = enhanceBadge(_core.Badge.withProps({
|
|
|
50
52
|
c: 'var(--mantine-color-white)',
|
|
51
53
|
bd: "1px solid ".concat((0, _core.alpha)('var(--mantine-color-gray-3)', 0.16)),
|
|
52
54
|
bg: (0, _core.alpha)('var(--mantine-color-gray-3)', 0.16)
|
|
53
|
-
}));
|
|
55
|
+
}), 'Badge.Secondary');
|
|
54
56
|
var BadgeSuccess = enhanceBadge(_core.Badge.withProps({
|
|
55
57
|
variant: 'light',
|
|
56
58
|
color: 'green',
|
|
@@ -62,7 +64,7 @@ var BadgeSuccess = enhanceBadge(_core.Badge.withProps({
|
|
|
62
64
|
c: 'green.2',
|
|
63
65
|
bd: "1px solid ".concat((0, _core.alpha)('var(--mantine-color-green-3)', 0.16)),
|
|
64
66
|
bg: (0, _core.alpha)('var(--mantine-color-green-3)', 0.16)
|
|
65
|
-
}));
|
|
67
|
+
}), 'Badge.Success');
|
|
66
68
|
var BadgeCritical = enhanceBadge(_core.Badge.withProps({
|
|
67
69
|
variant: 'light',
|
|
68
70
|
color: 'critical',
|
|
@@ -74,7 +76,7 @@ var BadgeCritical = enhanceBadge(_core.Badge.withProps({
|
|
|
74
76
|
c: 'red.2',
|
|
75
77
|
bd: "1px solid ".concat((0, _core.alpha)('var(--mantine-color-red-3)', 0.16)),
|
|
76
78
|
bg: (0, _core.alpha)('var(--mantine-color-red-3)', 0.16)
|
|
77
|
-
}));
|
|
79
|
+
}), 'Badge.Critical');
|
|
78
80
|
var BadgeWarning = enhanceBadge(_core.Badge.withProps({
|
|
79
81
|
variant: 'light',
|
|
80
82
|
color: 'warning',
|
|
@@ -86,7 +88,7 @@ var BadgeWarning = enhanceBadge(_core.Badge.withProps({
|
|
|
86
88
|
c: 'yellow.2',
|
|
87
89
|
bd: "1px solid ".concat((0, _core.alpha)('var(--mantine-color-yellow-3)', 0.16)),
|
|
88
90
|
bg: (0, _core.alpha)('var(--mantine-color-yellow-3)', 0.16)
|
|
89
|
-
}));
|
|
91
|
+
}), 'Badge.Warning');
|
|
90
92
|
var BadgeDisabled = enhanceBadge(_core.Badge.withProps({
|
|
91
93
|
variant: 'light',
|
|
92
94
|
color: 'gray',
|
|
@@ -97,7 +99,7 @@ var BadgeDisabled = enhanceBadge(_core.Badge.withProps({
|
|
|
97
99
|
color: 'gray',
|
|
98
100
|
c: 'dark.3',
|
|
99
101
|
bg: (0, _core.alpha)('var(--mantine-color-gray-3)', 0.16)
|
|
100
|
-
}));
|
|
102
|
+
}), 'Badge.Disabled');
|
|
101
103
|
var Badge = (0, _core.polymorphicFactory)(function(props, ref) {
|
|
102
104
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_core.Badge, _object_spread._({
|
|
103
105
|
ref: ref
|
|
@@ -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":["Badge","enhanceBadge","ComponentLight","ComponentDark","displayName","EnhancedBadge","forwardRef","props","ref","computedColorScheme","useComputedColorScheme","getInitialValueInEffect","Component","on","py","px","size","h","BadgePrimary","MantineBadge","withProps","variant","bd","c","alpha","bg","BadgeSecondary","color","BadgeSuccess","BadgeCritical","BadgeWarning","BadgeDisabled","polymorphicFactory","Primary","Secondary","Success","Critical","Warning","Disabled"],"mappings":";;;;+BAiMaA;;;eAAAA;;;;;;oBAtLN;qBACqF;AA+C5F,IAAMC,eAAe,SACjBC,gBACAC,eACAC;IAEA,IAAMC,8BAAgBC,IAAAA,iBAAU,EAAqC,SAACC,OAAOC;QACzE,IAAMC,sBAAsBC,IAAAA,4BAAsB,EAAC,SAAS;YAACC,yBAAyB;QAAI;QAC1F,IAAMC,YAAY,AAACL,CAAAA,MAAMM,EAAE,IAAIJ,mBAAkB,MAAO,SAASN,gBAAgBD;QACjF,qBACI,qBAACU;YACGJ,KAAKA;WACDD;YACJO,IAAI;YACJC,IAAI;YACJC,MAAMT,MAAMS,IAAI,KAAK,UAAU,OAAO;YACtCC,GAAGV,MAAMS,IAAI,KAAK,UAAU,KAAK;;IAG7C;IACAX,cAAcD,WAAW,GAAGA;IAC5B,OAAOC;AACX;AAEA,IAAMa,eAAejB,aACjBkB,WAAY,CAACC,SAAS,CAAC;IACnBC,SAAS;IACTC,IAAI;IACJC,GAAG;AACP,IACAJ,WAAY,CAACC,SAAS,CAAC;IACnBC,SAAS;IACTC,IAAI,AAAC,aAA0D,OAA9CE,IAAAA,WAAK,EAAC,kCAAkC;IACzDD,GAAG;IACHE,IAAID,IAAAA,WAAK,EAAC,kCAAkC;AAChD,IACA;AAEJ,IAAME,iBAAiBzB,aACnBkB,WAAY,CAACC,SAAS,CAAC;IACnBC,SAAS;IACTM,OAAO;IACPL,IAAI;IACJC,GAAG;AACP,IACAJ,WAAY,CAACC,SAAS,CAAC;IACnBC,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AK,EAAC,+BAA+B;AAC7C,IACA;AAoBG,IAAMxB,QAAQgC,IAAAA,wBAAkB,EAAuB,SAACzB,OAAOC;yBAAQ,qBAACW,WAAY;QAACX,KAAKA;OAASD;;AAE1GP,MAAMiC,OAAO,GAAGf;AAChBlB,MAAMkC,SAAS,GAAGR;AAClB1B,MAAMmC,OAAO,GAAGP;AAChB5B,MAAMoC,QAAQ,GAAGP;AACjB7B,MAAMqC,OAAO,GAAGP;AAChB9B,MAAMsC,QAAQ,GAAGP"}
|
|
@@ -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":["XML","format","xml","PADDING","repeat","reg","pad","replace","split","map","node","indent","match","join","register","monaco","languages","registerDocumentFormattingEditProvider","provideDocumentFormattingEdits","model","range","getFullModelRange","text","getValue"],"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":["XML","format","xml","PADDING","repeat","reg","pad","replace","split","map","node","indent","match","join","register","monaco","languages","registerDocumentFormattingEditProvider","provideDocumentFormattingEdits","model","range","getFullModelRange","text","getValue"],"mappings":";;;;+BA2CaA;;;eAAAA;;;;;AAxCb,IAAMC,SAAS,SAACC;IACZ,oGAAoG;IACpG,IAAMC,UAAU,IAAIC,MAAM,CAAC;IAC3B,IAAMC,MAAM;IACZ,IAAIC,MAAM;IAEVJ,MAAMA,IAAIK,OAAO,CAACF,KAAK;IAEvB,OAAOH,IACFM,KAAK,CAAC,QACNC,GAAG,CAAC,SAACC;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,IAAMC,WAAW,SAACC;IACdA,OAAOC,SAAS,CAACC,sCAAsC,CAAC,OAAO;QAC3DC,gCAAgC,SAAOC;;;;;;4BACnC;gCACIC,OAAOD,MAAME,iBAAiB;gCAC9BC,MAAMrB,OAAOkB,MAAMI,QAAQ;4BAC/B;;;;;;IAER;AACJ;AAEO,IAAMvB,MAAM;IAACc,UAAAA;AAAQ"}
|
|
@@ -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":";;;;+BAGaA;;;eAAAA;;;AAAN,IAAMA,6BAA6B,SAItCC,SACAC,OACAC;IAEA,IAAIF,QAAQC,KAAK,KAAKA,OAAO;QACzB,IAAwCC,OAAAA,WAAW,CAAC,gCAAZA,KAAjCC,uBAAAA,gEAAwB;QAC/B,OAAO;YACHC,eAAe,SAACC;gBACZL,QAAQM,IAAI,CAACC,eAAe,CAACN,OAAOI;gBACpCF,yBAAyBH,QAAQM,IAAI,CAACE,QAAQ;YAClD;YACAC,cAAc,SAACC;gBACXV,QAAQM,IAAI,CAACK,cAAc,CAACV,OAAOS;gBACnCP,yBAAyBH,QAAQM,IAAI,CAACE,QAAQ;YAClD;YACAI,cAAc,SAACC,eAAwEH;gBACnFV,QAAQM,IAAI,CAACQ,cAAc,CAACb,OAAOY,eAAeH;gBAClDP,yBAAyBH,QAAQM,IAAI,CAACE,QAAQ;YAClD;QACJ;IACJ;IAEA,OAAO,CAAC;AACZ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateRangePicker.d.ts","sourceRoot":"","sources":["../../../../src/components/DateRangePicker/DateRangePicker.tsx"],"names":[],"mappings":"AACA,OAAO,EACH,QAAQ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,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"}
|
|
@@ -19,6 +19,7 @@ var _core = require("@mantine/core");
|
|
|
19
19
|
var _hooks = require("@mantine/hooks");
|
|
20
20
|
var _dayjs = /*#__PURE__*/ _interop_require_default._(require("dayjs"));
|
|
21
21
|
var _useurlsyncedstate = require("../../hooks/use-url-synced-state");
|
|
22
|
+
var _DateRangemodulecss = /*#__PURE__*/ _interop_require_default._(require("./DateRange.module.css"));
|
|
22
23
|
var _DateRangePickerInlineCalendar = require("./DateRangePickerInlineCalendar");
|
|
23
24
|
var serialization = function(input) {
|
|
24
25
|
return Object.freeze(input);
|
|
@@ -79,7 +80,7 @@ var DateRangePicker = (0, _core.factory)(function(props) {
|
|
|
79
80
|
]);
|
|
80
81
|
var getStyles = (0, _core.useStyles)({
|
|
81
82
|
name: 'DateRangePicker',
|
|
82
|
-
classes:
|
|
83
|
+
classes: _DateRangemodulecss.default,
|
|
83
84
|
props: props,
|
|
84
85
|
className: className,
|
|
85
86
|
classNames: 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":["DateRangePicker","serialization","input","Object","freeze","DATE_RANGE_SERIALIZATION","serializer","from","to","Date","toISOString","deserializer","params","initial","get","defaultProps","placeholder","formatter","time","dayjs","format","factory","props","useProps","defaultValue","value","opened","defaultOpened","onOpenedChange","onClick","onCancel","onChange","presets","startProps","endProps","rangeCalendarProps","syncWithUrl","error","className","classNames","style","styles","vars","unstyled","others","getStyles","useStyles","name","classes","stylesApiProps","useUncontrolled","finalValue","_opened","setOpened","useUrlSyncedState","initialState","undefined","sync","dateRange","setDateRange","handleApply","dates","handleClick","handleCancel","_value","formattedRange","dateRangeInitialized","every","date","Popover","Target","InputBase","component","leftSection","IconCalendar","height","Dropdown","p","DateRangePickerInlineCalendar","initialRange","onApply"],"mappings":";;;;+BAiGaA;;;eAAAA;;;;;;;;;gCAjGc;oBAWpB;qBAEuB;8DACZ;iCACwC;2EACtC;6CAC4D;AAEhF,IAAMC,gBAAgB,SAACC;WACnBC,OAAOC,MAAM,CAACF;;AAElB,IAAMG,2BAA2BJ,cAAc;IAC3CK,YAAY;mDAAEC,kBAAMC;eAAQ;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,SAACC,QAAQC;eAAY;YAC/BD,OAAOE,GAAG,CAAC,UAAUF,OAAOE,GAAG,CAAC,UAAUD,OAAO,CAAC,EAAE;YACpDD,OAAOE,GAAG,CAAC,QAAQF,OAAOE,GAAG,CAAC,QAAQD,OAAO,CAAC,EAAE;SACnD;;AACL;AA6DA,IAAME,eAA8C;IAChDC,aAAa;IACbC,WAAW,SAACC;eAASC,IAAAA,cAAK,EAACD,MAAME,MAAM,CAAC;;AAC5C;AAEO,IAAMpB,kBAAkBqB,IAAAA,aAAO,EAAyB,SAACC;IAC5D,IAwBIC,YAAAA,IAAAA,cAAQ,EAAC,yBAAyBR,cAA+CO,QAvBjFE,eAuBAD,UAvBAC,cACAC,QAsBAF,UAtBAE,OACAC,SAqBAH,UArBAG,QACAC,gBAoBAJ,UApBAI,eACAC,iBAmBAL,UAnBAK,gBACAC,UAkBAN,UAlBAM,SACAC,WAiBAP,UAjBAO,UACAC,WAgBAR,UAhBAQ,UACAC,UAeAT,UAfAS,SACAC,aAcAV,UAdAU,YACAC,WAaAX,UAbAW,UACAC,qBAYAZ,UAZAY,oBACAlB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A4BhD,OAA1BA,UAAU+C,MAAM,CAAC,EAAE,GAAE,OAA0B,OAArB/C,UAAU+C,MAAM,CAAC,EAAE;IACvE,IAAME,uBAAuBF,OAAOG,KAAK,CAAC,SAACC;eAA0B,OAAOA,SAAS,YAAYA,SAAS;;IAE1G,qBACI,sBAACC,aAAO;QAAC3C,QAAQ0B;QAASrB,UAAUsB;;0BAChC,qBAACgB,aAAO,CAACC,MAAM;0BACX,cAAA,qBAACC,eAAS;oBACNC,WAAU;oBACVC,2BAAa,qBAACC,8BAAY;wBAACC,QAAQ;;oBACnC9C,SAASiC;oBACTzB,OAAOA;mBACHQ,UAAU,SAAS;oBAACP,WAAAA;oBAAWE,OAAAA;mBAAUS,kBACzCL;8BAEHsB,uBAAuBD,iBAAiBjD;;;0BAGjD,qBAACqD,aAAO,CAACO,QAAQ;gBAACC,GAAG;0BACjB,cAAA,qBAACC,4DAA6B;oBAC1BC,cAAcf;oBACdgB,SAASpB;oBACT9B,UAAUiC;oBACV/B,SAASA;oBACTG,oBAAoBA;oBACpBF,YAAYA;oBACZC,UAAUA;;;;;AAK9B"}
|
|
@@ -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,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "RadioCard", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return RadioCard;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
var _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
12
|
+
var _object_spread = require("@swc/helpers/_/_object_spread");
|
|
13
|
+
var _object_spread_props = require("@swc/helpers/_/_object_spread_props");
|
|
14
|
+
var _object_without_properties = require("@swc/helpers/_/_object_without_properties");
|
|
15
|
+
var _jsxruntime = require("react/jsx-runtime");
|
|
16
|
+
var _core = require("@mantine/core");
|
|
17
|
+
var _RadioCardmodulecss = /*#__PURE__*/ _interop_require_default._(require("../../styles/RadioCard.module.css"));
|
|
18
|
+
var defaultProps = {};
|
|
19
|
+
var RadioCard = (0, _core.factory)(function(_props, ref) {
|
|
20
|
+
var _useProps = (0, _core.useProps)('RadioCard', defaultProps, _props), classNames = _useProps.classNames, styles = _useProps.styles, style = _useProps.style, className = _useProps.className, vars = _useProps.vars, disabled = _useProps.disabled, label = _useProps.label, description = _useProps.description, others = _object_without_properties._(_useProps, [
|
|
21
|
+
"classNames",
|
|
22
|
+
"styles",
|
|
23
|
+
"style",
|
|
24
|
+
"className",
|
|
25
|
+
"vars",
|
|
26
|
+
"disabled",
|
|
27
|
+
"label",
|
|
28
|
+
"description"
|
|
29
|
+
]);
|
|
30
|
+
var getStyles = (0, _core.useStyles)({
|
|
31
|
+
name: 'RadioCard',
|
|
32
|
+
classes: _RadioCardmodulecss.default,
|
|
33
|
+
vars: vars,
|
|
34
|
+
classNames: classNames,
|
|
35
|
+
className: className,
|
|
36
|
+
style: style,
|
|
37
|
+
props: _props,
|
|
38
|
+
styles: styles
|
|
39
|
+
});
|
|
40
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_core.Radio.Card, _object_spread_props._(_object_spread._({
|
|
41
|
+
ref: ref,
|
|
42
|
+
disabled: disabled
|
|
43
|
+
}, getStyles('card', {
|
|
44
|
+
className: className,
|
|
45
|
+
style: style,
|
|
46
|
+
classNames: classNames,
|
|
47
|
+
styles: styles
|
|
48
|
+
}), others), {
|
|
49
|
+
children: [
|
|
50
|
+
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_core.Group, _object_spread_props._(_object_spread._({}, getStyles('container', {
|
|
51
|
+
classNames: classNames,
|
|
52
|
+
styles: styles
|
|
53
|
+
})), {
|
|
54
|
+
children: [
|
|
55
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_core.Radio.Indicator, _object_spread._({
|
|
56
|
+
size: "xs",
|
|
57
|
+
disabled: disabled
|
|
58
|
+
}, getStyles('indicator', {
|
|
59
|
+
classNames: classNames,
|
|
60
|
+
styles: styles
|
|
61
|
+
}))),
|
|
62
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_core.Title, _object_spread_props._(_object_spread._({
|
|
63
|
+
order: 4
|
|
64
|
+
}, getStyles('title', {
|
|
65
|
+
classNames: classNames,
|
|
66
|
+
styles: styles
|
|
67
|
+
})), {
|
|
68
|
+
children: label
|
|
69
|
+
}))
|
|
70
|
+
]
|
|
71
|
+
})),
|
|
72
|
+
description && /*#__PURE__*/ (0, _jsxruntime.jsx)(_core.Box, _object_spread_props._(_object_spread._({}, getStyles('description', {
|
|
73
|
+
classNames: classNames,
|
|
74
|
+
styles: styles
|
|
75
|
+
})), {
|
|
76
|
+
children: description
|
|
77
|
+
}))
|
|
78
|
+
]
|
|
79
|
+
}));
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
//# 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":["RadioCard","defaultProps","factory","_props","ref","useProps","classNames","styles","style","className","vars","disabled","label","description","others","getStyles","useStyles","name","classes","props","Radio","Card","Group","Indicator","size","Title","order","Box"],"mappings":";;;;+BAuCaA;;;eAAAA;;;;;;;;oBA1BN;2EAEa;AAsBpB,IAAMC,eAAwC,CAAC;AAExC,IAAMD,YAAYE,IAAAA,aAAO,EAAmB,SAACC,QAAQC;IACxD,IAA8FC,YAAAA,IAAAA,cAAQ,EAClG,aACAJ,cACAE,SAHGG,aAAuFD,UAAvFC,YAAYC,SAA2EF,UAA3EE,QAAQC,QAAmEH,UAAnEG,OAAOC,YAA4DJ,UAA5DI,WAAWC,OAAiDL,UAAjDK,MAAMC,WAA2CN,UAA3CM,UAAUC,QAAiCP,UAAjCO,OAAOC,cAA0BR,UAA1BQ,aAAgBC,sCAAUT;QAAvFC;QAAYC;QAAQC;QAAOC;QAAWC;QAAMC;QAAUC;QAAOC;;IAKpE,IAAME,YAAYC,IAAAA,eAAS,EAAmB;QAC1CC,MAAM;QACNC,SAAAA,2BAAO;QACPR,MAAAA;QACAJ,YAAAA;QACAG,WAAAA;QACAD,OAAAA;QACAW,OAAOhB;QACPI,QAAAA;IACJ;IAEA,qBACI,sBAACa,WAAK,CAACC,IAAI;QACPjB,KAAKA;QACLO,UAAUA;OACNI,UAAU,QAAQ;QAACN,WAAAA;QAAWD,OAAAA;QAAOF,YAAAA;QAAYC,QAAAA;IAAM,IACvDO;;0BAEJ,sBAACQ,WAAK,8CAAKP,UAAU,aAAa;gBAACT,YAAAA;gBAAYC,QAAAA;YAAM;;kCACjD,qBAACa,WAAK,CAACG,SAAS;wBAACC,MAAK;wBAAKb,UAAUA;uBAAcI,UAAU,aAAa;wBAACT,YAAAA;wBAAYC,QAAAA;oBAAM;kCAC7F,qBAACkB,WAAK;wBAACC,OAAO;uBAAOX,UAAU,SAAS;wBAACT,YAAAA;wBAAYC,QAAAA;oBAAM;kCACtDK;;;;YAGRC,6BAAe,qBAACc,SAAG,8CAAKZ,UAAU,eAAe;gBAACT,YAAAA;gBAAYC,QAAAA;YAAM;0BAAKM;;;;AAGtF"}
|
package/dist/cjs/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/cjs/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,KAAK,oBAAoB,EACzB,KAAK,aAAa,EAClB,KAAK,kBAAkB,GAC1B,MAAM,6BAA6B,CAAC;AAGrC,cAAc,uCAAuC,CAAC;AAGtD,cAAc,+CAA+C,CAAC;AAG9D,OAAO,EAAC,MAAM,EAAE,KAAK,WAAW,EAAC,MAAM,+BAA+B,CAAC;AACvE,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C,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/cjs/index.js
CHANGED
|
@@ -42,6 +42,9 @@ _export(exports, {
|
|
|
42
42
|
get PasswordInput () {
|
|
43
43
|
return _PasswordInput.PasswordInput;
|
|
44
44
|
},
|
|
45
|
+
get RadioCard () {
|
|
46
|
+
return _RadioCard.RadioCard;
|
|
47
|
+
},
|
|
45
48
|
get Select () {
|
|
46
49
|
return _Select.Select;
|
|
47
50
|
},
|
|
@@ -107,6 +110,7 @@ var _Menu = require("./components/Menu/Menu.js");
|
|
|
107
110
|
var _Modal = require("./components/Modal/Modal.js");
|
|
108
111
|
_export_star._(require("./components/Modal/ModalFooter.js"), exports);
|
|
109
112
|
_export_star._(require("./components/Prompt/Prompt.js"), exports);
|
|
113
|
+
var _RadioCard = require("./components/RadioCard/RadioCard.js");
|
|
110
114
|
var _PasswordInput = require("./components/PasswordInput/PasswordInput.js");
|
|
111
115
|
var _Select = require("./components/Select/Select.js");
|
|
112
116
|
_export_star._(require("./components/StickyFooter/StickyFooter.js"), exports);
|
package/dist/cjs/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":["Accordion","ActionIcon","Alert","Badge","Button","Chip","Header","Menu","Modal","Pagination","PasswordInput","Select","Table","TableComponentsOrder","enhanceWithCollectionProps","noop","renderTableCell","flexRender","useTable","useTableContext","useUrlSyncedState"],"mappings":";;;;;;;;;;;QAgBQA;eAAAA,oBAAS;;QAGTC;eAAAA,sBAAU;;QAGVC;eAAAA,YAAK;;QAITC;eAAAA,YAAK;;QAaDC;eAAAA,cAAM;;QAUNC;eAAAA,UAAI;;QA0BRC;eAAAA,cAAM;;QAwBFC;eAAAA,UAAI;;QAGJC;eAAAA,YAAK;;QAhGLC;eAAAA,gBAAU;;
|
|
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":["Accordion","ActionIcon","Alert","Badge","Button","Chip","Header","Menu","Modal","Pagination","PasswordInput","RadioCard","Select","Table","TableComponentsOrder","enhanceWithCollectionProps","noop","renderTableCell","flexRender","useTable","useTableContext","useUrlSyncedState"],"mappings":";;;;;;;;;;;QAgBQA;eAAAA,oBAAS;;QAGTC;eAAAA,sBAAU;;QAGVC;eAAAA,YAAK;;QAITC;eAAAA,YAAK;;QAaDC;eAAAA,cAAM;;QAUNC;eAAAA,UAAI;;QA0BRC;eAAAA,cAAM;;QAwBFC;eAAAA,UAAI;;QAGJC;eAAAA,YAAK;;QAhGLC;eAAAA,gBAAU;;QA0GVC;eAAAA,4BAAa;;QAHbC;eAAAA,oBAAS;;QAITC;eAAAA,cAAM;;QAQNC;eAAAA,YAAK;;QAAEC;eAAAA,2BAAoB;;QAjE3BC;eAAAA,sDAA0B;;QA4E1BC;eAAAA,UAAI;;QAbUC;eAAdC,sBAAU;;QAUVC;eAAAA,kBAAQ;;QADRC;eAAAA,6BAAe;;QAEfC;eAAAA,oCAAiB;;;;mCAlIc;uBAIzB;uBAIA;uBACA;uBACA;uBAEA;yBAIU;0BAGuB;qBAG3B;qBAQb;uBAGO;uBAGA;sBAGyB;uBAIzB;uBAGA;oBAGK;uBAGL;uBAGA;0CAC2B;uBAG3B;uBAGA;uBACA;uBACA;uBACA;uBAGA;uBAGA;sBAYP;uBAGO;uBAGA;uBACA;uBAGA;uBAGA;oBAGyB;qBAGiB;uBAC1C;uBAGA;yBAG+B;6BAGjB;sBACP;uBAGP;0BAG8B;qBAEuB;4BAOrC;wBACiD;iCACO;uBAKxE;uBACA"}
|
|
@@ -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"}
|
|
@@ -12,11 +12,11 @@ var _object_spread = require("@swc/helpers/_/_object_spread");
|
|
|
12
12
|
var _object_spread_props = require("@swc/helpers/_/_object_spread_props");
|
|
13
13
|
var _object_without_properties = require("@swc/helpers/_/_object_without_properties");
|
|
14
14
|
var _jsxruntime = require("react/jsx-runtime");
|
|
15
|
+
require("../styles/global.css");
|
|
15
16
|
var _core = require("@mantine/core");
|
|
17
|
+
var _mergeCSSVariablesResolvers = require("./mergeCSSVariablesResolvers.js");
|
|
16
18
|
var _plasmaCSSVariablesResolver = require("./plasmaCSSVariablesResolver.js");
|
|
17
19
|
var _Theme = require("./Theme.js");
|
|
18
|
-
var _mergeCSSVariablesResolvers = require("./mergeCSSVariablesResolvers.js");
|
|
19
|
-
require("../styles/global.css");
|
|
20
20
|
var Plasmantine = function(_param) {
|
|
21
21
|
var children = _param.children, externalTheme = _param.theme, externalCSSVariablesResolver = _param.cssVariablesResolver, others = _object_without_properties._(_param, [
|
|
22
22
|
"children",
|
|
@@ -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":["Plasmantine","children","theme","externalTheme","cssVariablesResolver","externalCSSVariablesResolver","others","mergeThemeOverrides","plasmaTheme","mergeCSSVariablesResolvers","plasmaCSSVariablesResolver","MantineProvider"],"mappings":";;;;+BAQaA;;;eAAAA;;;;;;;QARN;oBAEkE;0CAEhC;0CACA;qBACf;AAEnB,IAAMA,cAAuD;QAChEC,kBAAAA,UACAC,AAAOC,uBAAPD,OACAE,AAAsBC,sCAAtBD,sBACGE;QAHHL;QACAC;QACAE;;IAGA,IAAMF,QAAQK,IAAAA,yBAAmB,EAACC,kBAAW,EAAEL;IAC/C,IAAMC,uBAAuBK,IAAAA,sDAA0B,EAACC,sDAA0B,EAAEL;IAEpF,qBACI,qBAACM,qBAAe;QAACT,OAAOA;QAAOE,sBAAsBA;OAA0BE;kBAC1EL;;AAGb"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../../../src/components/Badge/Badge.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEH,iBAAiB,EACjB,UAAU,EACV,gBAAgB,EAChB,YAAY,EAGZ,kBAAkB,EAClB,yBAAyB,EAE5B,MAAM,eAAe,CAAC;AACvB,OAAO,EAAa,yBAAyB,EAAgB,SAAS,EAAE,aAAa,EAAC,MAAM,OAAO,CAAC;AAEpG,MAAM,WAAW,kBACb,SAAQ,IAAI,CACR,UAAU,EACR,GAAG,GACH,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,MAAM,GACN,OAAO,GACP,QAAQ,GACR,OAAO,GACP,SAAS,GACT,MAAM,GACN,aAAa,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