@coveord/plasma-mantine 56.17.0 → 56.20.0
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 +120 -116
- package/dist/.tsbuildinfo +1 -1
- package/dist/cjs/components/ActionIcon/ActionIcon.d.ts +1 -1
- package/dist/cjs/components/ActionIcon/ActionIcon.d.ts.map +1 -1
- package/dist/cjs/components/ActionIcon/ActionIcon.js +10 -0
- package/dist/cjs/components/ActionIcon/ActionIcon.js.map +1 -1
- package/dist/cjs/components/Alert/Alert.d.ts.map +1 -1
- package/dist/cjs/components/Alert/Alert.js +5 -0
- package/dist/cjs/components/Alert/Alert.js.map +1 -1
- package/dist/cjs/components/Button/Button.d.ts.map +1 -1
- package/dist/cjs/components/Button/Button.js +10 -0
- package/dist/cjs/components/Button/Button.js.map +1 -1
- package/dist/cjs/components/CodeEditor/CodeEditor.d.ts.map +1 -1
- package/dist/cjs/components/CodeEditor/CodeEditor.js +1 -0
- package/dist/cjs/components/CodeEditor/CodeEditor.js.map +1 -1
- package/dist/cjs/components/Collection/Collection.d.ts +75 -12
- package/dist/cjs/components/Collection/Collection.d.ts.map +1 -1
- package/dist/cjs/components/Collection/Collection.js +94 -38
- package/dist/cjs/components/Collection/Collection.js.map +1 -1
- package/dist/cjs/components/Collection/Collection.module.css +13 -1
- package/dist/cjs/components/Collection/CollectionAddButton.d.ts +25 -0
- package/dist/cjs/components/Collection/CollectionAddButton.d.ts.map +1 -0
- package/dist/cjs/components/Collection/CollectionAddButton.js +33 -0
- package/dist/cjs/components/Collection/CollectionAddButton.js.map +1 -0
- package/dist/cjs/components/Collection/CollectionColumn.types.d.ts +72 -0
- package/dist/cjs/components/Collection/CollectionColumn.types.d.ts.map +1 -0
- package/dist/cjs/components/Collection/CollectionColumn.types.js +6 -0
- package/dist/cjs/components/Collection/CollectionColumn.types.js.map +1 -0
- package/dist/cjs/components/Collection/CollectionContext.d.ts +5 -0
- package/dist/cjs/components/Collection/CollectionContext.d.ts.map +1 -1
- package/dist/cjs/components/Collection/CollectionContext.js.map +1 -1
- package/dist/cjs/components/Collection/CollectionItem.d.ts +2 -2
- package/dist/cjs/components/Collection/CollectionItem.d.ts.map +1 -1
- package/dist/cjs/components/Collection/CollectionItem.js +18 -38
- package/dist/cjs/components/Collection/CollectionItem.js.map +1 -1
- package/dist/cjs/components/Collection/layouts/CollectionLayout.types.d.ts +46 -0
- package/dist/cjs/components/Collection/layouts/CollectionLayout.types.d.ts.map +1 -0
- package/dist/cjs/components/Collection/layouts/CollectionLayout.types.js +6 -0
- package/dist/cjs/components/Collection/layouts/CollectionLayout.types.js.map +1 -0
- package/dist/cjs/components/Collection/layouts/CollectionLayouts.d.ts +26 -0
- package/dist/cjs/components/Collection/layouts/CollectionLayouts.d.ts.map +1 -0
- package/dist/cjs/components/Collection/layouts/CollectionLayouts.js +29 -0
- package/dist/cjs/components/Collection/layouts/CollectionLayouts.js.map +1 -0
- package/dist/cjs/components/Collection/layouts/horizontal-layout/HorizontalLayout.d.ts +12 -0
- package/dist/cjs/components/Collection/layouts/horizontal-layout/HorizontalLayout.d.ts.map +1 -0
- package/dist/cjs/components/Collection/layouts/horizontal-layout/HorizontalLayout.js +24 -0
- package/dist/cjs/components/Collection/layouts/horizontal-layout/HorizontalLayout.js.map +1 -0
- package/dist/cjs/components/Collection/layouts/horizontal-layout/HorizontalLayout.module.css +37 -0
- package/dist/cjs/components/Collection/layouts/horizontal-layout/HorizontalLayoutBody.d.ts +6 -0
- package/dist/cjs/components/Collection/layouts/horizontal-layout/HorizontalLayoutBody.d.ts.map +1 -0
- package/dist/cjs/components/Collection/layouts/horizontal-layout/HorizontalLayoutBody.js +78 -0
- package/dist/cjs/components/Collection/layouts/horizontal-layout/HorizontalLayoutBody.js.map +1 -0
- package/dist/cjs/components/Collection/layouts/horizontal-layout/HorizontalLayoutHeader.d.ts +6 -0
- package/dist/cjs/components/Collection/layouts/horizontal-layout/HorizontalLayoutHeader.d.ts.map +1 -0
- package/dist/cjs/components/Collection/layouts/horizontal-layout/HorizontalLayoutHeader.js +56 -0
- package/dist/cjs/components/Collection/layouts/horizontal-layout/HorizontalLayoutHeader.js.map +1 -0
- package/dist/cjs/components/Collection/layouts/shared/DragHandle.d.ts +12 -0
- package/dist/cjs/components/Collection/layouts/shared/DragHandle.d.ts.map +1 -0
- package/dist/cjs/components/Collection/layouts/shared/DragHandle.js +28 -0
- package/dist/cjs/components/Collection/layouts/shared/DragHandle.js.map +1 -0
- package/dist/cjs/components/Collection/layouts/shared/RemoveButton.d.ts +11 -0
- package/dist/cjs/components/Collection/layouts/shared/RemoveButton.d.ts.map +1 -0
- package/dist/cjs/components/Collection/layouts/shared/RemoveButton.js +39 -0
- package/dist/cjs/components/Collection/layouts/shared/RemoveButton.js.map +1 -0
- package/dist/cjs/components/Collection/layouts/shared/columnUtils.d.ts +8 -0
- package/dist/cjs/components/Collection/layouts/shared/columnUtils.d.ts.map +1 -0
- package/dist/cjs/components/Collection/layouts/shared/columnUtils.js +24 -0
- package/dist/cjs/components/Collection/layouts/shared/columnUtils.js.map +1 -0
- package/dist/cjs/components/Collection/layouts/shared/headerUtils.d.ts +8 -0
- package/dist/cjs/components/Collection/layouts/shared/headerUtils.d.ts.map +1 -0
- package/dist/cjs/components/Collection/layouts/shared/headerUtils.js +21 -0
- package/dist/cjs/components/Collection/layouts/shared/headerUtils.js.map +1 -0
- package/dist/cjs/components/Collection/layouts/shared/itemRenderer.d.ts +78 -0
- package/dist/cjs/components/Collection/layouts/shared/itemRenderer.d.ts.map +1 -0
- package/dist/cjs/components/Collection/layouts/shared/itemRenderer.js +160 -0
- package/dist/cjs/components/Collection/layouts/shared/itemRenderer.js.map +1 -0
- package/dist/cjs/components/Collection/layouts/shared/layoutConstants.d.ts +38 -0
- package/dist/cjs/components/Collection/layouts/shared/layoutConstants.d.ts.map +1 -0
- package/dist/cjs/components/Collection/layouts/shared/layoutConstants.js +31 -0
- package/dist/cjs/components/Collection/layouts/shared/layoutConstants.js.map +1 -0
- package/dist/cjs/components/Collection/layouts/vertical-layout/VerticalLayout.d.ts +12 -0
- package/dist/cjs/components/Collection/layouts/vertical-layout/VerticalLayout.d.ts.map +1 -0
- package/dist/cjs/components/Collection/layouts/vertical-layout/VerticalLayout.js +24 -0
- package/dist/cjs/components/Collection/layouts/vertical-layout/VerticalLayout.js.map +1 -0
- package/dist/cjs/components/Collection/layouts/vertical-layout/VerticalLayout.module.css +35 -0
- package/dist/cjs/components/Collection/layouts/vertical-layout/VerticalLayoutBody.d.ts +6 -0
- package/dist/cjs/components/Collection/layouts/vertical-layout/VerticalLayoutBody.d.ts.map +1 -0
- package/dist/cjs/components/Collection/layouts/vertical-layout/VerticalLayoutBody.js +134 -0
- package/dist/cjs/components/Collection/layouts/vertical-layout/VerticalLayoutBody.js.map +1 -0
- package/dist/cjs/components/Collection/layouts/vertical-layout/VerticalLayoutHeader.d.ts +10 -0
- package/dist/cjs/components/Collection/layouts/vertical-layout/VerticalLayoutHeader.d.ts.map +1 -0
- package/dist/cjs/components/Collection/layouts/vertical-layout/VerticalLayoutHeader.js +15 -0
- package/dist/cjs/components/Collection/layouts/vertical-layout/VerticalLayoutHeader.js.map +1 -0
- package/dist/cjs/components/LastUpdated/LastUpdated.js +1 -0
- package/dist/cjs/components/LastUpdated/LastUpdated.js.map +1 -1
- package/dist/cjs/components/StickyFooter/StickyFooter.d.ts.map +1 -1
- package/dist/cjs/components/StickyFooter/StickyFooter.js +1 -0
- package/dist/cjs/components/StickyFooter/StickyFooter.js.map +1 -1
- package/dist/cjs/index.d.ts +2 -0
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/components/ActionIcon/ActionIcon.d.ts +1 -1
- package/dist/esm/components/ActionIcon/ActionIcon.d.ts.map +1 -1
- package/dist/esm/components/ActionIcon/ActionIcon.js +10 -0
- package/dist/esm/components/ActionIcon/ActionIcon.js.map +1 -1
- package/dist/esm/components/Alert/Alert.d.ts.map +1 -1
- package/dist/esm/components/Alert/Alert.js +5 -0
- package/dist/esm/components/Alert/Alert.js.map +1 -1
- package/dist/esm/components/Button/Button.d.ts.map +1 -1
- package/dist/esm/components/Button/Button.js +10 -0
- package/dist/esm/components/Button/Button.js.map +1 -1
- package/dist/esm/components/CodeEditor/CodeEditor.d.ts.map +1 -1
- package/dist/esm/components/CodeEditor/CodeEditor.js +1 -0
- package/dist/esm/components/CodeEditor/CodeEditor.js.map +1 -1
- package/dist/esm/components/Collection/Collection.d.ts +75 -12
- package/dist/esm/components/Collection/Collection.d.ts.map +1 -1
- package/dist/esm/components/Collection/Collection.js +87 -32
- package/dist/esm/components/Collection/Collection.js.map +1 -1
- package/dist/esm/components/Collection/Collection.module.css +13 -1
- package/dist/esm/components/Collection/CollectionAddButton.d.ts +25 -0
- package/dist/esm/components/Collection/CollectionAddButton.d.ts.map +1 -0
- package/dist/esm/components/Collection/CollectionAddButton.js +19 -0
- package/dist/esm/components/Collection/CollectionAddButton.js.map +1 -0
- package/dist/esm/components/Collection/CollectionColumn.types.d.ts +72 -0
- package/dist/esm/components/Collection/CollectionColumn.types.d.ts.map +1 -0
- package/dist/esm/components/Collection/CollectionColumn.types.js +5 -0
- package/dist/esm/components/Collection/CollectionColumn.types.js.map +1 -0
- package/dist/esm/components/Collection/CollectionContext.d.ts +5 -0
- package/dist/esm/components/Collection/CollectionContext.d.ts.map +1 -1
- package/dist/esm/components/Collection/CollectionContext.js.map +1 -1
- package/dist/esm/components/Collection/CollectionItem.d.ts +2 -2
- package/dist/esm/components/Collection/CollectionItem.d.ts.map +1 -1
- package/dist/esm/components/Collection/CollectionItem.js +15 -34
- package/dist/esm/components/Collection/CollectionItem.js.map +1 -1
- package/dist/esm/components/Collection/layouts/CollectionLayout.types.d.ts +46 -0
- package/dist/esm/components/Collection/layouts/CollectionLayout.types.d.ts.map +1 -0
- package/dist/esm/components/Collection/layouts/CollectionLayout.types.js +6 -0
- package/dist/esm/components/Collection/layouts/CollectionLayout.types.js.map +1 -0
- package/dist/esm/components/Collection/layouts/CollectionLayouts.d.ts +26 -0
- package/dist/esm/components/Collection/layouts/CollectionLayouts.d.ts.map +1 -0
- package/dist/esm/components/Collection/layouts/CollectionLayouts.js +10 -0
- package/dist/esm/components/Collection/layouts/CollectionLayouts.js.map +1 -0
- package/dist/esm/components/Collection/layouts/horizontal-layout/HorizontalLayout.d.ts +12 -0
- package/dist/esm/components/Collection/layouts/horizontal-layout/HorizontalLayout.d.ts.map +1 -0
- package/dist/esm/components/Collection/layouts/horizontal-layout/HorizontalLayout.js +11 -0
- package/dist/esm/components/Collection/layouts/horizontal-layout/HorizontalLayout.js.map +1 -0
- package/dist/esm/components/Collection/layouts/horizontal-layout/HorizontalLayout.module.css +37 -0
- package/dist/esm/components/Collection/layouts/horizontal-layout/HorizontalLayoutBody.d.ts +6 -0
- package/dist/esm/components/Collection/layouts/horizontal-layout/HorizontalLayoutBody.d.ts.map +1 -0
- package/dist/esm/components/Collection/layouts/horizontal-layout/HorizontalLayoutBody.js +49 -0
- package/dist/esm/components/Collection/layouts/horizontal-layout/HorizontalLayoutBody.js.map +1 -0
- package/dist/esm/components/Collection/layouts/horizontal-layout/HorizontalLayoutHeader.d.ts +6 -0
- package/dist/esm/components/Collection/layouts/horizontal-layout/HorizontalLayoutHeader.d.ts.map +1 -0
- package/dist/esm/components/Collection/layouts/horizontal-layout/HorizontalLayoutHeader.js +36 -0
- package/dist/esm/components/Collection/layouts/horizontal-layout/HorizontalLayoutHeader.js.map +1 -0
- package/dist/esm/components/Collection/layouts/shared/DragHandle.d.ts +12 -0
- package/dist/esm/components/Collection/layouts/shared/DragHandle.d.ts.map +1 -0
- package/dist/esm/components/Collection/layouts/shared/DragHandle.js +20 -0
- package/dist/esm/components/Collection/layouts/shared/DragHandle.js.map +1 -0
- package/dist/esm/components/Collection/layouts/shared/RemoveButton.d.ts +11 -0
- package/dist/esm/components/Collection/layouts/shared/RemoveButton.d.ts.map +1 -0
- package/dist/esm/components/Collection/layouts/shared/RemoveButton.js +30 -0
- package/dist/esm/components/Collection/layouts/shared/RemoveButton.js.map +1 -0
- package/dist/esm/components/Collection/layouts/shared/columnUtils.d.ts +8 -0
- package/dist/esm/components/Collection/layouts/shared/columnUtils.d.ts.map +1 -0
- package/dist/esm/components/Collection/layouts/shared/columnUtils.js +17 -0
- package/dist/esm/components/Collection/layouts/shared/columnUtils.js.map +1 -0
- package/dist/esm/components/Collection/layouts/shared/headerUtils.d.ts +8 -0
- package/dist/esm/components/Collection/layouts/shared/headerUtils.d.ts.map +1 -0
- package/dist/esm/components/Collection/layouts/shared/headerUtils.js +14 -0
- package/dist/esm/components/Collection/layouts/shared/headerUtils.js.map +1 -0
- package/dist/esm/components/Collection/layouts/shared/itemRenderer.d.ts +78 -0
- package/dist/esm/components/Collection/layouts/shared/itemRenderer.d.ts.map +1 -0
- package/dist/esm/components/Collection/layouts/shared/itemRenderer.js +150 -0
- package/dist/esm/components/Collection/layouts/shared/itemRenderer.js.map +1 -0
- package/dist/esm/components/Collection/layouts/shared/layoutConstants.d.ts +38 -0
- package/dist/esm/components/Collection/layouts/shared/layoutConstants.d.ts.map +1 -0
- package/dist/esm/components/Collection/layouts/shared/layoutConstants.js +18 -0
- package/dist/esm/components/Collection/layouts/shared/layoutConstants.js.map +1 -0
- package/dist/esm/components/Collection/layouts/vertical-layout/VerticalLayout.d.ts +12 -0
- package/dist/esm/components/Collection/layouts/vertical-layout/VerticalLayout.d.ts.map +1 -0
- package/dist/esm/components/Collection/layouts/vertical-layout/VerticalLayout.js +11 -0
- package/dist/esm/components/Collection/layouts/vertical-layout/VerticalLayout.js.map +1 -0
- package/dist/esm/components/Collection/layouts/vertical-layout/VerticalLayout.module.css +35 -0
- package/dist/esm/components/Collection/layouts/vertical-layout/VerticalLayoutBody.d.ts +6 -0
- package/dist/esm/components/Collection/layouts/vertical-layout/VerticalLayoutBody.d.ts.map +1 -0
- package/dist/esm/components/Collection/layouts/vertical-layout/VerticalLayoutBody.js +103 -0
- package/dist/esm/components/Collection/layouts/vertical-layout/VerticalLayoutBody.js.map +1 -0
- package/dist/esm/components/Collection/layouts/vertical-layout/VerticalLayoutHeader.d.ts +10 -0
- package/dist/esm/components/Collection/layouts/vertical-layout/VerticalLayoutHeader.d.ts.map +1 -0
- package/dist/esm/components/Collection/layouts/vertical-layout/VerticalLayoutHeader.js +6 -0
- package/dist/esm/components/Collection/layouts/vertical-layout/VerticalLayoutHeader.js.map +1 -0
- package/dist/esm/components/LastUpdated/LastUpdated.js +1 -0
- package/dist/esm/components/LastUpdated/LastUpdated.js.map +1 -1
- package/dist/esm/components/StickyFooter/StickyFooter.d.ts.map +1 -1
- package/dist/esm/components/StickyFooter/StickyFooter.js +1 -0
- package/dist/esm/components/StickyFooter/StickyFooter.js.map +1 -1
- package/dist/esm/index.d.ts +2 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js.map +1 -1
- package/package.json +3 -3
- package/src/components/ActionIcon/ActionIcon.tsx +15 -4
- package/src/components/Alert/Alert.tsx +7 -0
- package/src/components/Button/Button.tsx +12 -1
- package/src/components/CodeEditor/CodeEditor.tsx +4 -4
- package/src/components/Collection/Collection.module.css +13 -1
- package/src/components/Collection/Collection.tsx +149 -50
- package/src/components/Collection/CollectionAddButton.tsx +42 -0
- package/src/components/Collection/CollectionColumn.types.ts +79 -0
- package/src/components/Collection/CollectionContext.ts +5 -0
- package/src/components/Collection/CollectionItem.tsx +10 -21
- package/src/components/Collection/__tests__/CollectionWithColumns.spec.tsx +560 -0
- package/src/components/Collection/layouts/CollectionLayout.types.ts +56 -0
- package/src/components/Collection/layouts/CollectionLayouts.tsx +15 -0
- package/src/components/Collection/layouts/horizontal-layout/HorizontalLayout.module.css +37 -0
- package/src/components/Collection/layouts/horizontal-layout/HorizontalLayout.tsx +9 -0
- package/src/components/Collection/layouts/horizontal-layout/HorizontalLayoutBody.tsx +68 -0
- package/src/components/Collection/layouts/horizontal-layout/HorizontalLayoutHeader.tsx +33 -0
- package/src/components/Collection/layouts/shared/DragHandle.tsx +22 -0
- package/src/components/Collection/layouts/shared/RemoveButton.tsx +30 -0
- package/src/components/Collection/layouts/shared/columnUtils.ts +20 -0
- package/src/components/Collection/layouts/shared/headerUtils.ts +14 -0
- package/src/components/Collection/layouts/shared/itemRenderer.tsx +242 -0
- package/src/components/Collection/layouts/shared/layoutConstants.ts +51 -0
- package/src/components/Collection/layouts/vertical-layout/VerticalLayout.module.css +35 -0
- package/src/components/Collection/layouts/vertical-layout/VerticalLayout.tsx +9 -0
- package/src/components/Collection/layouts/vertical-layout/VerticalLayoutBody.tsx +120 -0
- package/src/components/Collection/layouts/vertical-layout/VerticalLayoutHeader.tsx +8 -0
- package/src/components/LastUpdated/LastUpdated.tsx +2 -0
- package/src/components/StickyFooter/StickyFooter.tsx +3 -2
- package/src/index.ts +11 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VerticalLayoutHeader.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Collection/layouts/vertical-layout/VerticalLayoutHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,OAAO,CAAC;AACnC,OAAO,EAAC,iBAAiB,EAAC,MAAM,8BAA8B,CAAC;AAE/D;;;GAGG;AACH,eAAO,MAAM,oBAAoB,GAAI,QAAQ,iBAAiB,GAAG;IAAC,GAAG,CAAC,EAAE,YAAY,CAAC,cAAc,CAAC,CAAA;CAAC,KAAG,IAAY,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "VerticalLayoutHeader", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return VerticalLayoutHeader;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
var VerticalLayoutHeader = function(_props) {
|
|
12
|
+
return null;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=VerticalLayoutHeader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/components/Collection/layouts/vertical-layout/VerticalLayoutHeader.tsx"],"sourcesContent":["import {ForwardedRef} from 'react';\nimport {LayoutHeaderProps} from '../shared/layoutConstants.js';\n\n/**\n * VerticalLayout doesn't have a global header - headers are shown per item\n * This component returns null but exists to maintain the layout interface\n */\nexport const VerticalLayoutHeader = (_props: LayoutHeaderProps & {ref?: ForwardedRef<HTMLDivElement>}): null => null;\n"],"names":["VerticalLayoutHeader","_props"],"mappings":";;;;+BAOaA;;;eAAAA;;;AAAN,IAAMA,uBAAuB,SAACC;WAA2E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/LastUpdated/LastUpdated.tsx"],"sourcesContent":["import {BoxProps, factory, Factory, Group, GroupProps, StylesApiProps, Text, useProps, useStyles} from '@mantine/core';\nimport dayjs from 'dayjs';\nimport React from 'react';\n\nexport type LastUpdatedStylesNames = 'root' | 'label';\n\nexport interface LastUpdatedProps extends BoxProps, Pick<GroupProps, 'justify'>, StylesApiProps<LastUpdatedFactory> {\n /**\n * Optional formatter function to format the time value.\n * Receives the time prop and should return a string.\n * @default (time) => dayjs(time).format('h:mm:ss A')\n */\n formatter?: (time: dayjs.ConfigType) => string;\n /**\n * The unformatted time to display that can be parsed by dayjs.\n * @default The current time via dayjs().valueOf()\n */\n time?: dayjs.ConfigType;\n /**\n * Label to contextualize the time.\n *\n * @default \"Last update:\"\n */\n label?: string;\n}\n\nexport type LastUpdatedFactory = Factory<{\n props: LastUpdatedProps;\n ref: HTMLDivElement;\n stylesNames: LastUpdatedStylesNames;\n}>;\n\nconst defaultProps: Partial<LastUpdatedProps> = {\n label: 'Last update:',\n formatter: (time) => dayjs(time).format('h:mm:ss A'),\n};\n\nexport const LastUpdated = factory<LastUpdatedFactory>(\n (props: LastUpdatedProps, ref: React.ForwardedRef<HTMLDivElement>) => {\n const {formatter, label, time, classNames, className, styles, style, vars, unstyled, ...others} = useProps(\n 'PlasmaLastUpdated',\n defaultProps as Partial<LastUpdatedProps>,\n props,\n );\n\n const resolvedTime = time ?? dayjs().valueOf();\n\n const getStyles = useStyles<LastUpdatedFactory>({\n name: 'LastUpdated',\n classes: {},\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n vars,\n });\n const stylesApiProps = {classNames, styles};\n\n return (\n <Group\n justify={props.justify}\n ref={ref}\n {...getStyles('root', {className, style, ...stylesApiProps})}\n {...others}\n >\n <Text size=\"xs\" {...getStyles('label', {className, style, ...stylesApiProps})}>\n {label}\n <span role=\"timer\">{formatter(resolvedTime)}</span>\n </Text>\n </Group>\n );\n },\n);\n"],"names":["LastUpdated","defaultProps","label","formatter","time","dayjs","format","factory","props","ref","useProps","classNames","className","styles","style","vars","unstyled","others","resolvedTime","valueOf","getStyles","useStyles","name","classes","stylesApiProps","Group","justify","Text","size","span","role"],"mappings":";;;;+BAqCaA;;;eAAAA;;;;;;;;oBArC0F;8DACrF;8DACA;AA8BlB,IAAMC,eAA0C;IAC5CC,OAAO;IACPC,WAAW,SAACC;eAASC,IAAAA,cAAK,EAACD,MAAME,MAAM,CAAC;;AAC5C;AAEO,IAAMN,cAAcO,IAAAA,aAAO,EAC9B,SAACC,OAAyBC;IACtB,IAAkGC,YAAAA,IAAAA,cAAQ,EACtG,qBACAT,cACAO,QAHGL,YAA2FO,UAA3FP,WAAWD,QAAgFQ,UAAhFR,OAAOE,OAAyEM,UAAzEN,MAAMO,aAAmED,UAAnEC,YAAYC,YAAuDF,UAAvDE,WAAWC,SAA4CH,UAA5CG,QAAQC,QAAoCJ,UAApCI,OAAOC,OAA6BL,UAA7BK,MAAMC,WAAuBN,UAAvBM,UAAaC,sCAAUP;QAA3FP;QAAWD;QAAOE;QAAMO;QAAYC;QAAWC;QAAQC;QAAOC;QAAMC;;IAM3E,IAAME,eAAed,iBAAAA,kBAAAA,OAAQC,IAAAA,cAAK,IAAGc,OAAO;IAE5C,IAAMC,YAAYC,IAAAA,eAAS,EAAqB;QAC5CC,MAAM;QACNC,SAAS,CAAC;QACVf,OAAAA;QACAI,WAAAA;QACAE,OAAAA;QACAH,YAAAA;QACAE,QAAAA;QACAG,UAAAA;QACAD,MAAAA;IACJ;IACA,IAAMS,iBAAiB;QAACb,YAAAA;QAAYE,QAAAA;IAAM;IAE1C,qBACI,qBAACY,WAAK;QACFC,SAASlB,MAAMkB,OAAO;QACtBjB,KAAKA;OACDW,UAAU,QAAQ;QAACR,WAAAA;QAAWE,OAAAA;OAAUU,kBACxCP;kBAEJ,cAAA,sBAACU,UAAI;YAACC,MAAK;WAASR,UAAU,SAAS;YAACR,WAAAA;YAAWE,OAAAA;WAAUU;;gBACxDtB;8BACD,qBAAC2B;oBAAKC,MAAK;8BAAS3B,UAAUe;;;;;AAI9C"}
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/LastUpdated/LastUpdated.tsx"],"sourcesContent":["import {BoxProps, factory, Factory, Group, GroupProps, StylesApiProps, Text, useProps, useStyles} from '@mantine/core';\nimport dayjs from 'dayjs';\nimport React from 'react';\n\nexport type LastUpdatedStylesNames = 'root' | 'label';\n\nexport interface LastUpdatedProps extends BoxProps, Pick<GroupProps, 'justify'>, StylesApiProps<LastUpdatedFactory> {\n /**\n * Optional formatter function to format the time value.\n * Receives the time prop and should return a string.\n * @default (time) => dayjs(time).format('h:mm:ss A')\n */\n formatter?: (time: dayjs.ConfigType) => string;\n /**\n * The unformatted time to display that can be parsed by dayjs.\n * @default The current time via dayjs().valueOf()\n */\n time?: dayjs.ConfigType;\n /**\n * Label to contextualize the time.\n *\n * @default \"Last update:\"\n */\n label?: string;\n}\n\nexport type LastUpdatedFactory = Factory<{\n props: LastUpdatedProps;\n ref: HTMLDivElement;\n stylesNames: LastUpdatedStylesNames;\n}>;\n\nconst defaultProps: Partial<LastUpdatedProps> = {\n label: 'Last update:',\n formatter: (time) => dayjs(time).format('h:mm:ss A'),\n};\n\nexport const LastUpdated = factory<LastUpdatedFactory>(\n (props: LastUpdatedProps, ref: React.ForwardedRef<HTMLDivElement>) => {\n const {formatter, label, time, classNames, className, styles, style, vars, unstyled, ...others} = useProps(\n 'PlasmaLastUpdated',\n defaultProps as Partial<LastUpdatedProps>,\n props,\n );\n\n const resolvedTime = time ?? dayjs().valueOf();\n\n const getStyles = useStyles<LastUpdatedFactory>({\n name: 'LastUpdated',\n classes: {},\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n vars,\n });\n const stylesApiProps = {classNames, styles};\n\n return (\n <Group\n justify={props.justify}\n ref={ref}\n {...getStyles('root', {className, style, ...stylesApiProps})}\n {...others}\n >\n <Text size=\"xs\" {...getStyles('label', {className, style, ...stylesApiProps})}>\n {label}\n <span role=\"timer\">{formatter(resolvedTime)}</span>\n </Text>\n </Group>\n );\n },\n);\n\nLastUpdated.displayName = 'LastUpdated';\n"],"names":["LastUpdated","defaultProps","label","formatter","time","dayjs","format","factory","props","ref","useProps","classNames","className","styles","style","vars","unstyled","others","resolvedTime","valueOf","getStyles","useStyles","name","classes","stylesApiProps","Group","justify","Text","size","span","role","displayName"],"mappings":";;;;+BAqCaA;;;eAAAA;;;;;;;;oBArC0F;8DACrF;8DACA;AA8BlB,IAAMC,eAA0C;IAC5CC,OAAO;IACPC,WAAW,SAACC;eAASC,IAAAA,cAAK,EAACD,MAAME,MAAM,CAAC;;AAC5C;AAEO,IAAMN,cAAcO,IAAAA,aAAO,EAC9B,SAACC,OAAyBC;IACtB,IAAkGC,YAAAA,IAAAA,cAAQ,EACtG,qBACAT,cACAO,QAHGL,YAA2FO,UAA3FP,WAAWD,QAAgFQ,UAAhFR,OAAOE,OAAyEM,UAAzEN,MAAMO,aAAmED,UAAnEC,YAAYC,YAAuDF,UAAvDE,WAAWC,SAA4CH,UAA5CG,QAAQC,QAAoCJ,UAApCI,OAAOC,OAA6BL,UAA7BK,MAAMC,WAAuBN,UAAvBM,UAAaC,sCAAUP;QAA3FP;QAAWD;QAAOE;QAAMO;QAAYC;QAAWC;QAAQC;QAAOC;QAAMC;;IAM3E,IAAME,eAAed,iBAAAA,kBAAAA,OAAQC,IAAAA,cAAK,IAAGc,OAAO;IAE5C,IAAMC,YAAYC,IAAAA,eAAS,EAAqB;QAC5CC,MAAM;QACNC,SAAS,CAAC;QACVf,OAAAA;QACAI,WAAAA;QACAE,OAAAA;QACAH,YAAAA;QACAE,QAAAA;QACAG,UAAAA;QACAD,MAAAA;IACJ;IACA,IAAMS,iBAAiB;QAACb,YAAAA;QAAYE,QAAAA;IAAM;IAE1C,qBACI,qBAACY,WAAK;QACFC,SAASlB,MAAMkB,OAAO;QACtBjB,KAAKA;OACDW,UAAU,QAAQ;QAACR,WAAAA;QAAWE,OAAAA;OAAUU,kBACxCP;kBAEJ,cAAA,sBAACU,UAAI;YAACC,MAAK;WAASR,UAAU,SAAS;YAACR,WAAAA;YAAWE,OAAAA;WAAUU;;gBACxDtB;8BACD,qBAAC2B;oBAAKC,MAAK;8BAAS3B,UAAUe;;;;;AAI9C;AAGJlB,YAAY+B,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StickyFooter.d.ts","sourceRoot":"","sources":["../../../../src/components/StickyFooter/StickyFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAS,UAAU,EAAE,cAAc,EAA+B,MAAM,eAAe,CAAC;AAEvG,OAAO,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AAGhC,MAAM,WAAW,iBACb,SAAQ,IAAI,CAAC,UAAU,EAAE,YAAY,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAC,
|
|
1
|
+
{"version":3,"file":"StickyFooter.d.ts","sourceRoot":"","sources":["../../../../src/components/StickyFooter/StickyFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAS,UAAU,EAAE,cAAc,EAA+B,MAAM,eAAe,CAAC;AAEvG,OAAO,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AAGhC,MAAM,WAAW,iBACb,SAAQ,IAAI,CAAC,UAAU,EAAE,YAAY,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAC,EAAE,cAAc,CAAC,mBAAmB,CAAC;IAC3G;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,cAAc,CAAC;CACxC;AAED,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC;AAE7C,MAAM,MAAM,mBAAmB,GAAG,OAAO,CAAC;IACtC,KAAK,EAAE,iBAAiB,CAAC;IACzB,GAAG,EAAE,cAAc,CAAC;IACpB,WAAW,EAAE,uBAAuB,CAAC;CACxC,CAAC,CAAC;AAOH,eAAO,MAAM,YAAY;WAVd,iBAAiB;SACnB,cAAc;iBACN,uBAAuB;EAoCtC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/StickyFooter/StickyFooter.tsx"],"sourcesContent":["import {Factory, Group, GroupProps, StylesApiProps, factory, useProps, useStyles} from '@mantine/core';\nimport clsx from 'clsx';\nimport {ReactNode} from 'react';\nimport classes from './StickyFooter.module.css';\n\nexport interface StickyFooterProps\n extends Omit<GroupProps, 'classNames' | 'styles' | 'vars' | 'variant'
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/StickyFooter/StickyFooter.tsx"],"sourcesContent":["import {Factory, Group, GroupProps, StylesApiProps, factory, useProps, useStyles} from '@mantine/core';\nimport clsx from 'clsx';\nimport {ReactNode} from 'react';\nimport classes from './StickyFooter.module.css';\n\nexport interface StickyFooterProps\n extends Omit<GroupProps, 'classNames' | 'styles' | 'vars' | 'variant'>, StylesApiProps<StickyFooterFactory> {\n /**\n * Whether a border is render on top of the footer\n */\n borderTop?: boolean;\n /**\n * Footer's children, usually buttons\n */\n children?: ReactNode;\n /**\n * Use variant 'modal-footer' when rendering the `StickyFooter` inside `Modal`.\n *\n * The 'modal-footer' removes the modal's default padding so that the footer properly hugs the bottom of the modal.\n * It also adds a border on top of the footer.\n *\n * @deprecated Use Modal.Footer from @coveord/plasma-mantine/Modal for modal footers. For other cases, the 'default' variant should suffice.\n */\n variant?: 'default' | 'modal-footer';\n}\n\nexport type StickyFooterStylesNames = 'root';\n\nexport type StickyFooterFactory = Factory<{\n props: StickyFooterProps;\n ref: HTMLDivElement;\n stylesNames: StickyFooterStylesNames;\n}>;\n\nconst defaultProps: Partial<StickyFooterProps> = {\n gap: 'sm',\n justify: 'flex-end',\n};\n\nexport const StickyFooter = factory<StickyFooterFactory>((props, ref) => {\n const {borderTop, justify, gap, children, className, classNames, style, styles, unstyled, vars, ...others} =\n useProps('StickyFooter', defaultProps, props);\n const getStyles = useStyles<StickyFooterFactory>({\n name: 'StickyFooter',\n classes,\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n });\n\n const css = getStyles('root');\n\n return (\n <Group\n justify={justify}\n gap={gap}\n className={clsx(css.className, {[classes.border]: !!borderTop})}\n style={css.style}\n ref={ref}\n {...others}\n >\n {children}\n </Group>\n );\n});\n\nStickyFooter.displayName = 'StickyFooter';\n"],"names":["StickyFooter","defaultProps","gap","justify","factory","props","ref","useProps","borderTop","children","className","classNames","style","styles","unstyled","vars","others","getStyles","useStyles","name","classes","css","Group","clsx","border","displayName"],"mappings":";;;;+BAuCaA;;;eAAAA;;;;;;;;;oBAvC0E;6DACtE;8EAEG;AA+BpB,IAAMC,eAA2C;IAC7CC,KAAK;IACLC,SAAS;AACb;AAEO,IAAMH,eAAeI,IAAAA,aAAO,EAAsB,SAACC,OAAOC;IAC7D,IACIC,YAAAA,IAAAA,cAAQ,EAAC,gBAAgBN,cAAcI,QADpCG,YACHD,UADGC,WAAWL,UACdI,UADcJ,SAASD,MACvBK,UADuBL,KAAKO,WAC5BF,UAD4BE,UAAUC,YACtCH,UADsCG,WAAWC,aACjDJ,UADiDI,YAAYC,QAC7DL,UAD6DK,OAAOC,SACpEN,UADoEM,QAAQC,WAC5EP,UAD4EO,UAAUC,OACtFR,UADsFQ,MAASC,sCAC/FT;QADGC;QAAWL;QAASD;QAAKO;QAAUC;QAAWC;QAAYC;QAAOC;QAAQC;QAAUC;;IAE1F,IAAME,YAAYC,IAAAA,eAAS,EAAsB;QAC7CC,MAAM;QACNC,SAAAA,8BAAO;QACPf,OAAAA;QACAK,WAAAA;QACAE,OAAAA;QACAD,YAAAA;QACAE,QAAAA;QACAC,UAAAA;IACJ;IAEA,IAAMO,MAAMJ,UAAU;IAEtB,qBACI,qBAACK,WAAK;QACFnB,SAASA;QACTD,KAAKA;QACLQ,WAAWa,IAAAA,aAAI,EAACF,IAAIX,SAAS,EAAG,uBAACU,8BAAO,CAACI,MAAM,EAAG,CAAC,CAAChB;QACpDI,OAAOS,IAAIT,KAAK;QAChBN,KAAKA;OACDU;kBAEHP;;AAGb;AAEAT,aAAayB,WAAW,GAAG"}
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -43,6 +43,8 @@ export * from './components/CodeEditor/CodeEditor.js';
|
|
|
43
43
|
export * from './components/Collapse/Collapse.js';
|
|
44
44
|
export * from './components/Collection/Collection.js';
|
|
45
45
|
export { enhanceWithCollectionProps } from './components/Collection/enhanceWithCollectionProps.js';
|
|
46
|
+
export type { CollectionColumnDef, CollectionCellContext, CollectionHeaderContext, } from './components/Collection/CollectionColumn.types.js';
|
|
47
|
+
export type { CollectionLayout, CollectionLayoutHeaderProps, CollectionLayoutBodyProps, } from './components/Collection/layouts/CollectionLayout.types.js';
|
|
46
48
|
export * from './components/ColorInput/ColorInput.js';
|
|
47
49
|
export * from './components/ColorPicker/ColorPicker.js';
|
|
48
50
|
export * from './components/ColorSwatch/ColorSwatch.js';
|
package/dist/cjs/index.d.ts.map
CHANGED
|
@@ -1 +1 @@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AGtD,cAAc,2BAA2B,CAAC;AAG1C,cAAc,uCAAuC,CAAC;AAGtD,cAAc,+CAA+C,CAAC;AAG9D,cAAc,+CAA+C,CAAC;AAE9D,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;IAEnC,UAAU,UAAU,CAAC,KAAK,SAAS,OAAO,EAAE,MAAM;QAC9C;;;;WAIG;QACH,aAAa,EAAE,OAAO,CAAC;KAC1B;CACJ"}
|
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// Affix\nexport * from './components/Affix/Affix.js';\n\n// Anchor\nexport * from './components/Anchor/Anchor.js';\n\n// Angle Slider\nexport * from './components/AngleSlider/AngleSlider.js';\n\n// App Shell\nexport * from './components/AppShell/AppShell.js';\n\n// Aspect Ratio\nexport * from './components/AspectRatio/AspectRatio.js';\n\n// Autocomplete\nexport * from './components/Autocomplete/Autocomplete.js';\n\n// Avatar\nexport * from './components/Avatar/Avatar.js';\n\n// Background Image\nexport * from './components/BackgroundImage/BackgroundImage.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// Blockquote\nexport * from './components/Blockquote/Blockquote.js';\n\n// Blank Slate\nexport * from './components/BlankSlate/BlankSlate.js';\n\n// Box\nexport * from './components/Box/Box.js';\n\n// Breadcrumbs\nexport * from './components/Breadcrumbs/Breadcrumbs.js';\n\n// Browser Preview\nexport * from './components/BrowserPreview/BrowserPreview.js';\n\n// Burger\nexport * from './components/Burger/Burger.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// Card\nexport * from './components/Card/Card.js';\n\n// Center\nexport * from './components/Center/Center.js';\n\n// Check Icon\nexport * from './components/CheckIcon/CheckIcon.js';\n\n// Checkbox\nexport * from './components/Checkbox/Checkbox.js';\n\n// Checkbox Icon\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// Close Button\nexport * from './components/CloseButton/CloseButton.js';\n\n// Code\nexport * from './components/Code/Code.js';\n\n// Code Editor\nexport * from './components/CodeEditor/CodeEditor.js';\n\n// Collapse\nexport * from './components/Collapse/Collapse.js';\n\n// Collection\nexport * from './components/Collection/Collection.js';\nexport {enhanceWithCollectionProps} from './components/Collection/enhanceWithCollectionProps.js';\n\n// Color Input\nexport * from './components/ColorInput/ColorInput.js';\n\n// Color Picker\nexport * from './components/ColorPicker/ColorPicker.js';\n\n// Color Swatch\nexport * from './components/ColorSwatch/ColorSwatch.js';\n\n// Combobox\nexport * from './components/Combobox/Combobox.js';\n\n// Container\nexport * from './components/Container/Container.js';\n\n// Copy Button\nexport * from './components/CopyButton/CopyButton.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 Picker Input\nexport * from './components/DatePickerInput/DatePickerInput.js';\n\n// Date Time Range Picker\nexport * from './components/DateTimeRangePicker/DateTimeRangePicker.js';\n\n// Month Picker Input\nexport * from './components/MonthPickerInput/MonthPickerInput.js';\n\n// Time Picker\nexport * from './components/TimePicker/TimePicker.js';\n\n// Year Picker Input\nexport * from './components/YearPickerInput/YearPickerInput.js';\n\n// Dialog\nexport * from './components/Dialog/Dialog.js';\n\n// Divider\nexport * from './components/Divider/Divider.js';\n\n// Drawer\nexport * from './components/Drawer/Drawer.js';\n\n// Ellipsis Text\nexport * from './components/EllipsisText/EllipsisText.js';\n\n// Facet\nexport * from './components/Facet/Facet.js';\n\n// Fieldset\nexport * from './components/Fieldset/Fieldset.js';\n\n// File Button\nexport * from './components/FileButton/FileButton.js';\n\n// File Input\nexport * from './components/FileInput/FileInput.js';\n\n// Flex\nexport * from './components/Flex/Flex.js';\n\n// Floating Indicator\nexport * from './components/FloatingIndicator/FloatingIndicator.js';\n\n// Focus Trap\nexport * from './components/FocusTrap/FocusTrap.js';\n\n// Grid\nexport * from './components/Grid/Grid.js';\n\n// Group\nexport * from './components/Group/Group.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// Highlight\nexport * from './components/Highlight/Highlight.js';\n\n// Hover Card\nexport * from './components/HoverCard/HoverCard.js';\n\n// Image\nexport * from './components/Image/Image.js';\n\n// Indicator\nexport * from './components/Indicator/Indicator.js';\n\n// Info Token\nexport * from './components/InfoToken/InfoToken.js';\n\n// Input\nexport * from './components/Input/Input.js';\n\n// Input Base\nexport * from './components/InputBase/InputBase.js';\n\n// Inline Confirm\nexport * from './components/InlineConfirm/InlineConfirm.js';\nexport * from './components/InlineConfirm/InlineConfirmContext.js';\n\n// Json Input\nexport * from './components/JsonInput/JsonInput.js';\n\n// Kbd\nexport * from './components/Kbd/Kbd.js';\n\n// Last Updated\nexport * from './components/LastUpdated/LastUpdated.js';\n\n// List\nexport * from './components/List/List.js';\n\n// Loader\nexport * from './components/Loader/Loader.js';\n\n// Loading Overlay\nexport * from './components/LoadingOverlay/LoadingOverlay.js';\n\n// Circle Loader\nexport * from './components/CircleLoader/CircleLoader.js';\n\n// Mark\nexport * from './components/Mark/Mark.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// Modal Base\nexport * from './components/ModalBase/ModalBase.js';\n\n// Multi Select\nexport * from './components/MultiSelect/MultiSelect.js';\n\n// Native Select\nexport * from './components/NativeSelect/NativeSelect.js';\n\n// Nav Link\nexport * from './components/NavLink/NavLink.js';\n\n// Notification\nexport * from './components/Notification/Notification.js';\n\n// Number Formatter\nexport * from './components/NumberFormatter/NumberFormatter.js';\n\n// Number Input\nexport * from './components/NumberInput/NumberInput.js';\n\n// Overlay\nexport * from './components/Overlay/Overlay.js';\n\n// Pagination\nexport * from './components/Pagination/Pagination.js';\n\n// Paper\nexport * from './components/Paper/Paper.js';\n\n// Pill\nexport * from './components/Pill/Pill.js';\n\n// Pills Input\nexport * from './components/PillsInput/PillsInput.js';\n\n// Pin Input\nexport * from './components/PinInput/PinInput.js';\n\n// Popover\nexport * from './components/Popover/Popover.js';\n\n// Portal\nexport * from './components/Portal/Portal.js';\n\n// Progress\nexport * from './components/Progress/Progress.js';\n\n// Prompt\nexport * from './components/Prompt/Prompt.js';\n\n// Radio\nexport * from './components/Radio/Radio.js';\n\n// RadioCard - override Mantine RadioCard\nexport {RadioCard, type RadioCardProps} from './components/RadioCard/RadioCard.js';\n\n// Rating\nexport * from './components/Rating/Rating.js';\n\n// Ring Progress\nexport * from './components/RingProgress/RingProgress.js';\n\n// Scroll Area\nexport * from './components/ScrollArea/ScrollArea.js';\n\n// Segmented Control\nexport * from './components/SegmentedControl/SegmentedControl.js';\n\n// Semi Circle Progress\nexport * from './components/SemiCircleProgress/SemiCircleProgress.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// Simple Grid\nexport * from './components/SimpleGrid/SimpleGrid.js';\n\n// Skeleton\nexport * from './components/Skeleton/Skeleton.js';\n\n// Slider\nexport * from './components/Slider/Slider.js';\n\n// Space\nexport * from './components/Space/Space.js';\n\n// Spoiler\nexport * from './components/Spoiler/Spoiler.js';\n\n// Stack\nexport * from './components/Stack/Stack.js';\n\n// Status Token\nexport * from './components/StatusToken/StatusToken.js';\n\n// Stepper\nexport * from './components/Stepper/Stepper.js';\n\n// Sticky Footer\n\nexport * from './components/StickyFooter/StickyFooter.js';\n\n// Switch\nexport * from './components/Switch/Switch.js';\n\n// Table - override Mantine Table\nexport {flexRender as renderTableCell} from '@tanstack/react-table';\nexport {TableActionsColumn} from './components/Table/table-column/TableActionsColumn.js';\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\n// Table of Contents\nexport * from './components/TableOfContents/TableOfContents.js';\n\n// Tabs\nexport * from './components/Tabs/Tabs.js';\n\n// Tags Input\nexport * from './components/TagsInput/TagsInput.js';\n\n// Text\nexport * from './components/Text/Text.js';\n\n// Text Input\nexport * from './components/TextInput/TextInput.js';\n\n// Textarea\nexport * from './components/Textarea/Textarea.js';\n\n// Theme Icon\nexport * from './components/ThemeIcon/ThemeIcon.js';\n\n// Timeline\nexport * from './components/Timeline/Timeline.js';\n\n// Title\nexport * from './components/Title/Title.js';\n\n// Tooltip\nexport * from './components/Tooltip/Tooltip.js';\n\n// Transition\nexport * from './components/Transition/Transition.js';\n\n// Tree\nexport * from './components/Tree/Tree.js';\n\n// Typography\nexport * from './components/Typography/Typography.js';\n\n// Unstyled Button\nexport * from './components/UnstyledButton/UnstyledButton.js';\n\n// Visually Hidden\nexport * from './components/VisuallyHidden/VisuallyHidden.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","TableActionsColumn","TableComponentsOrder","enhanceWithCollectionProps","noop","renderTableCell","flexRender","useTable","useTableContext","useUrlSyncedState"],"mappings":";;;;;;;;;;;QAgBQA;eAAAA,oBAAS;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AGA;uBAGA;uBAGA;uBAGA;uBAGA;yBAG+B;uBAG/B;uBAGA;uBAGA;uBAGA;uBAGA;6BAGc;sBACP;uBAGP;uBAGA;uBAGA;uBAGA;uBAGA;uBAGA;uBAGA;uBAGA;uBAIA;uBAGA;0BAG8B;kCACX;qBAEkC;4BAOrC;wBACiD;iCACO;uBAGxE;uBAGA;uBAGA;uBAGA;uBAGA;uBAGA;uBAGA;uBAGA;uBAGA;uBAGA;uBAGA;uBAGA;uBAGA;uBAGA;uBAGA;uBAKA;uBACA"}
|
|
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// Affix\nexport * from './components/Affix/Affix.js';\n\n// Anchor\nexport * from './components/Anchor/Anchor.js';\n\n// Angle Slider\nexport * from './components/AngleSlider/AngleSlider.js';\n\n// App Shell\nexport * from './components/AppShell/AppShell.js';\n\n// Aspect Ratio\nexport * from './components/AspectRatio/AspectRatio.js';\n\n// Autocomplete\nexport * from './components/Autocomplete/Autocomplete.js';\n\n// Avatar\nexport * from './components/Avatar/Avatar.js';\n\n// Background Image\nexport * from './components/BackgroundImage/BackgroundImage.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// Blockquote\nexport * from './components/Blockquote/Blockquote.js';\n\n// Blank Slate\nexport * from './components/BlankSlate/BlankSlate.js';\n\n// Box\nexport * from './components/Box/Box.js';\n\n// Breadcrumbs\nexport * from './components/Breadcrumbs/Breadcrumbs.js';\n\n// Browser Preview\nexport * from './components/BrowserPreview/BrowserPreview.js';\n\n// Burger\nexport * from './components/Burger/Burger.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// Card\nexport * from './components/Card/Card.js';\n\n// Center\nexport * from './components/Center/Center.js';\n\n// Check Icon\nexport * from './components/CheckIcon/CheckIcon.js';\n\n// Checkbox\nexport * from './components/Checkbox/Checkbox.js';\n\n// Checkbox Icon\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// Close Button\nexport * from './components/CloseButton/CloseButton.js';\n\n// Code\nexport * from './components/Code/Code.js';\n\n// Code Editor\nexport * from './components/CodeEditor/CodeEditor.js';\n\n// Collapse\nexport * from './components/Collapse/Collapse.js';\n\n// Collection\nexport * from './components/Collection/Collection.js';\nexport {enhanceWithCollectionProps} from './components/Collection/enhanceWithCollectionProps.js';\nexport type {\n CollectionColumnDef,\n CollectionCellContext,\n CollectionHeaderContext,\n} from './components/Collection/CollectionColumn.types.js';\nexport type {\n CollectionLayout,\n CollectionLayoutHeaderProps,\n CollectionLayoutBodyProps,\n} from './components/Collection/layouts/CollectionLayout.types.js';\n\n// Color Input\nexport * from './components/ColorInput/ColorInput.js';\n\n// Color Picker\nexport * from './components/ColorPicker/ColorPicker.js';\n\n// Color Swatch\nexport * from './components/ColorSwatch/ColorSwatch.js';\n\n// Combobox\nexport * from './components/Combobox/Combobox.js';\n\n// Container\nexport * from './components/Container/Container.js';\n\n// Copy Button\nexport * from './components/CopyButton/CopyButton.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 Picker Input\nexport * from './components/DatePickerInput/DatePickerInput.js';\n\n// Date Time Range Picker\nexport * from './components/DateTimeRangePicker/DateTimeRangePicker.js';\n\n// Month Picker Input\nexport * from './components/MonthPickerInput/MonthPickerInput.js';\n\n// Time Picker\nexport * from './components/TimePicker/TimePicker.js';\n\n// Year Picker Input\nexport * from './components/YearPickerInput/YearPickerInput.js';\n\n// Dialog\nexport * from './components/Dialog/Dialog.js';\n\n// Divider\nexport * from './components/Divider/Divider.js';\n\n// Drawer\nexport * from './components/Drawer/Drawer.js';\n\n// Ellipsis Text\nexport * from './components/EllipsisText/EllipsisText.js';\n\n// Facet\nexport * from './components/Facet/Facet.js';\n\n// Fieldset\nexport * from './components/Fieldset/Fieldset.js';\n\n// File Button\nexport * from './components/FileButton/FileButton.js';\n\n// File Input\nexport * from './components/FileInput/FileInput.js';\n\n// Flex\nexport * from './components/Flex/Flex.js';\n\n// Floating Indicator\nexport * from './components/FloatingIndicator/FloatingIndicator.js';\n\n// Focus Trap\nexport * from './components/FocusTrap/FocusTrap.js';\n\n// Grid\nexport * from './components/Grid/Grid.js';\n\n// Group\nexport * from './components/Group/Group.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// Highlight\nexport * from './components/Highlight/Highlight.js';\n\n// Hover Card\nexport * from './components/HoverCard/HoverCard.js';\n\n// Image\nexport * from './components/Image/Image.js';\n\n// Indicator\nexport * from './components/Indicator/Indicator.js';\n\n// Info Token\nexport * from './components/InfoToken/InfoToken.js';\n\n// Input\nexport * from './components/Input/Input.js';\n\n// Input Base\nexport * from './components/InputBase/InputBase.js';\n\n// Inline Confirm\nexport * from './components/InlineConfirm/InlineConfirm.js';\nexport * from './components/InlineConfirm/InlineConfirmContext.js';\n\n// Json Input\nexport * from './components/JsonInput/JsonInput.js';\n\n// Kbd\nexport * from './components/Kbd/Kbd.js';\n\n// Last Updated\nexport * from './components/LastUpdated/LastUpdated.js';\n\n// List\nexport * from './components/List/List.js';\n\n// Loader\nexport * from './components/Loader/Loader.js';\n\n// Loading Overlay\nexport * from './components/LoadingOverlay/LoadingOverlay.js';\n\n// Circle Loader\nexport * from './components/CircleLoader/CircleLoader.js';\n\n// Mark\nexport * from './components/Mark/Mark.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// Modal Base\nexport * from './components/ModalBase/ModalBase.js';\n\n// Multi Select\nexport * from './components/MultiSelect/MultiSelect.js';\n\n// Native Select\nexport * from './components/NativeSelect/NativeSelect.js';\n\n// Nav Link\nexport * from './components/NavLink/NavLink.js';\n\n// Notification\nexport * from './components/Notification/Notification.js';\n\n// Number Formatter\nexport * from './components/NumberFormatter/NumberFormatter.js';\n\n// Number Input\nexport * from './components/NumberInput/NumberInput.js';\n\n// Overlay\nexport * from './components/Overlay/Overlay.js';\n\n// Pagination\nexport * from './components/Pagination/Pagination.js';\n\n// Paper\nexport * from './components/Paper/Paper.js';\n\n// Pill\nexport * from './components/Pill/Pill.js';\n\n// Pills Input\nexport * from './components/PillsInput/PillsInput.js';\n\n// Pin Input\nexport * from './components/PinInput/PinInput.js';\n\n// Popover\nexport * from './components/Popover/Popover.js';\n\n// Portal\nexport * from './components/Portal/Portal.js';\n\n// Progress\nexport * from './components/Progress/Progress.js';\n\n// Prompt\nexport * from './components/Prompt/Prompt.js';\n\n// Radio\nexport * from './components/Radio/Radio.js';\n\n// RadioCard - override Mantine RadioCard\nexport {RadioCard, type RadioCardProps} from './components/RadioCard/RadioCard.js';\n\n// Rating\nexport * from './components/Rating/Rating.js';\n\n// Ring Progress\nexport * from './components/RingProgress/RingProgress.js';\n\n// Scroll Area\nexport * from './components/ScrollArea/ScrollArea.js';\n\n// Segmented Control\nexport * from './components/SegmentedControl/SegmentedControl.js';\n\n// Semi Circle Progress\nexport * from './components/SemiCircleProgress/SemiCircleProgress.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// Simple Grid\nexport * from './components/SimpleGrid/SimpleGrid.js';\n\n// Skeleton\nexport * from './components/Skeleton/Skeleton.js';\n\n// Slider\nexport * from './components/Slider/Slider.js';\n\n// Space\nexport * from './components/Space/Space.js';\n\n// Spoiler\nexport * from './components/Spoiler/Spoiler.js';\n\n// Stack\nexport * from './components/Stack/Stack.js';\n\n// Status Token\nexport * from './components/StatusToken/StatusToken.js';\n\n// Stepper\nexport * from './components/Stepper/Stepper.js';\n\n// Sticky Footer\n\nexport * from './components/StickyFooter/StickyFooter.js';\n\n// Switch\nexport * from './components/Switch/Switch.js';\n\n// Table - override Mantine Table\nexport {flexRender as renderTableCell} from '@tanstack/react-table';\nexport {TableActionsColumn} from './components/Table/table-column/TableActionsColumn.js';\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\n// Table of Contents\nexport * from './components/TableOfContents/TableOfContents.js';\n\n// Tabs\nexport * from './components/Tabs/Tabs.js';\n\n// Tags Input\nexport * from './components/TagsInput/TagsInput.js';\n\n// Text\nexport * from './components/Text/Text.js';\n\n// Text Input\nexport * from './components/TextInput/TextInput.js';\n\n// Textarea\nexport * from './components/Textarea/Textarea.js';\n\n// Theme Icon\nexport * from './components/ThemeIcon/ThemeIcon.js';\n\n// Timeline\nexport * from './components/Timeline/Timeline.js';\n\n// Title\nexport * from './components/Title/Title.js';\n\n// Tooltip\nexport * from './components/Tooltip/Tooltip.js';\n\n// Transition\nexport * from './components/Transition/Transition.js';\n\n// Tree\nexport * from './components/Tree/Tree.js';\n\n// Typography\nexport * from './components/Typography/Typography.js';\n\n// Unstyled Button\nexport * from './components/UnstyledButton/UnstyledButton.js';\n\n// Visually Hidden\nexport * from './components/VisuallyHidden/VisuallyHidden.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 // eslint-disable-next-line unused-imports/no-unused-vars\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","TableActionsColumn","TableComponentsOrder","enhanceWithCollectionProps","noop","renderTableCell","flexRender","useTable","useTableContext","useUrlSyncedState"],"mappings":";;;;;;;;;;;QAgBQA;eAAAA,oBAAS;;QAGTC;eAAAA,sBAAU;;QA2BVC;eAAAA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+B;uBAG/B;uBAGA;uBAGA;uBAGA;uBAGA;6BAGc;sBACP;uBAGP;uBAGA;uBAGA;uBAGA;uBAGA;uBAGA;uBAGA;uBAGA;uBAIA;uBAGA;0BAG8B;kCACX;qBAEkC;4BAOrC;wBACiD;iCACO;uBAGxE;uBAGA;uBAGA;uBAGA;uBAGA;uBAGA;uBAGA;uBAGA;uBAGA;uBAGA;uBAGA;uBAGA;uBAGA;uBAGA;uBAGA;uBAKA;uBACA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ActionIconCssVariables, type ActionIconGroup, type ActionIconProps as MantineActionIconProps
|
|
1
|
+
import { ActionIconCssVariables, ActionIconStylesNames, ActionIconVariant, type ActionIconGroup, type ActionIconProps as MantineActionIconProps } from '@mantine/core';
|
|
2
2
|
import { MouseEventHandler } from 'react';
|
|
3
3
|
import { ButtonWithDisabledTooltipProps } from '../Button/ButtonWithDisabledTooltip.js';
|
|
4
4
|
export interface ActionIconProps extends MantineActionIconProps, ButtonWithDisabledTooltipProps {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionIcon.d.ts","sourceRoot":"","sources":["../../../../src/components/ActionIcon/ActionIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"ActionIcon.d.ts","sourceRoot":"","sources":["../../../../src/components/ActionIcon/ActionIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,sBAAsB,EACtB,qBAAqB,EACrB,iBAAiB,EAIjB,KAAK,eAAe,EACpB,KAAK,eAAe,IAAI,sBAAsB,EACjD,MAAM,eAAe,CAAC;AACvB,OAAO,EAAgB,iBAAiB,EAAC,MAAM,OAAO,CAAC;AAEvD,OAAO,EAA4B,8BAA8B,EAAC,MAAM,wCAAwC,CAAC;AAEjH,MAAM,WAAW,eAAgB,SAAQ,sBAAsB,EAAE,8BAA8B;IAE3F,OAAO,CAAC,EAAE,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;CACl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;QACxC,kBAAkB,EAAE,OAAO,qBAAqB,CAAC;QACjD,oBAAoB,EAAE,OAAO,8BAA8B,CAAC;QAC5D,mBAAmB,EAAE,OAAO,6BAA6B,CAAC;QAC1D,qBAAqB,EAAE,OAAO,+BAA+B,CAAC;KACjE;;WATU,OAAO,eAAe;aACpB,OAAO,iBAAiB;eACtB,OAAO,mBAAmB;cAC3B,OAAO,kBAAkB;gBACvB,OAAO,oBAAoB;wBACnB,OAAO,qBAAqB;0BAC1B,OAAO,8BAA8B;yBACtC,OAAO,6BAA6B;2BAClC,OAAO,+BAA+B;CAyBpE,CAAC;AAEF,QAAA,MAAM,iBAAiB,oHAErB,CAAC;AACH,QAAA,MAAM,mBAAmB,oHAGvB,CAAC;AACH,QAAA,MAAM,kBAAkB,oHAGtB,CAAC;AACH,QAAA,MAAM,oBAAoB,oHAGxB,CAAC;AAEH,QAAA,MAAM,qBAAqB,oHAAiF,CAAC;AAC7G,QAAA,MAAM,8BAA8B,oHAAgF,CAAC;AACrH,QAAA,MAAM,6BAA6B,oHAGjC,CAAC;AACH,QAAA,MAAM,+BAA+B,oHAAiF,CAAC"}
|
|
@@ -65,5 +65,15 @@ ActionIcon.DestructivePrimary = ActionIconDestructive;
|
|
|
65
65
|
ActionIcon.DestructiveSecondary = ActionIconDestructiveSecondary;
|
|
66
66
|
ActionIcon.DestructiveTertiary = ActionIconDestructiveTertiary;
|
|
67
67
|
ActionIcon.DestructiveQuaternary = ActionIconDestructiveQuaternary;
|
|
68
|
+
ActionIcon.displayName = 'ActionIcon';
|
|
69
|
+
ActionIcon.Group.displayName = 'ActionIcon.Group';
|
|
70
|
+
ActionIconPrimary.displayName = 'ActionIcon.Primary';
|
|
71
|
+
ActionIconSecondary.displayName = 'ActionIcon.Secondary';
|
|
72
|
+
ActionIconTertiary.displayName = 'ActionIcon.Tertiary';
|
|
73
|
+
ActionIconQuaternary.displayName = 'ActionIcon.Quaternary';
|
|
74
|
+
ActionIconDestructive.displayName = 'ActionIcon.DestructivePrimary';
|
|
75
|
+
ActionIconDestructiveSecondary.displayName = 'ActionIcon.DestructiveSecondary';
|
|
76
|
+
ActionIconDestructiveTertiary.displayName = 'ActionIcon.DestructiveTertiary';
|
|
77
|
+
ActionIconDestructiveQuaternary.displayName = 'ActionIcon.DestructiveQuaternary';
|
|
68
78
|
|
|
69
79
|
//# sourceMappingURL=ActionIcon.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/ActionIcon/ActionIcon.tsx"],"sourcesContent":["import {\n ActionIcon as MantineActionIcon,\n
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/ActionIcon/ActionIcon.tsx"],"sourcesContent":["import {\n ActionIconCssVariables,\n ActionIconStylesNames,\n ActionIconVariant,\n Factory,\n ActionIcon as MantineActionIcon,\n polymorphicFactory,\n type ActionIconGroup,\n type ActionIconProps as MantineActionIconProps,\n} from '@mantine/core';\nimport {ComponentType, MouseEventHandler} from 'react';\nimport {useClickWithLoading} from '../../hooks/useClickWithLoading.js';\nimport {ButtonWithDisabledTooltip, ButtonWithDisabledTooltipProps} from '../Button/ButtonWithDisabledTooltip.js';\n\nexport interface ActionIconProps extends MantineActionIconProps, ButtonWithDisabledTooltipProps {\n /* Handler executed on click */\n onClick?: MouseEventHandler<HTMLButtonElement>;\n}\n\ntype ActionIconOverloadFactory = Factory<{\n props: ActionIconProps;\n defaultRef: HTMLButtonElement;\n defaultComponent: 'button';\n stylesNames: ActionIconStylesNames;\n vars: ActionIconCssVariables;\n variant: ActionIconVariant;\n staticComponents: {\n Group: typeof ActionIconGroup;\n Primary: typeof ActionIconPrimary;\n Secondary: typeof ActionIconSecondary;\n Tertiary: typeof ActionIconTertiary;\n Quaternary: typeof ActionIconQuaternary;\n DestructivePrimary: typeof ActionIconDestructive;\n DestructiveSecondary: typeof ActionIconDestructiveSecondary;\n DestructiveTertiary: typeof ActionIconDestructiveTertiary;\n DestructiveQuaternary: typeof ActionIconDestructiveQuaternary;\n };\n}>;\n\nexport const ActionIcon = polymorphicFactory<ActionIconOverloadFactory>(\n ({disabledTooltip, disabled, disabledTooltipProps, loading, onClick, ...others}, ref) => {\n const {isLoading, handleClick} = useClickWithLoading(onClick);\n return (\n <ButtonWithDisabledTooltip\n disabled={disabled}\n disabledTooltip={disabledTooltip}\n disabledTooltipProps={disabledTooltipProps}\n fullWidth={others.fullWidth}\n >\n <MantineActionIcon\n loaderProps={{type: 'oval'}}\n ref={ref}\n loading={isLoading || loading}\n onClick={handleClick}\n disabled={disabled}\n {...others}\n />\n </ButtonWithDisabledTooltip>\n );\n },\n);\n\nconst ActionIconPrimary = ActionIcon.withProps({\n variant: 'filled',\n});\nconst ActionIconSecondary = ActionIcon.withProps({\n variant: 'light',\n color: 'var(--coveo-color-text-primary)',\n});\nconst ActionIconTertiary = ActionIcon.withProps({\n variant: 'default',\n color: 'var(--coveo-color-text-primary)',\n});\nconst ActionIconQuaternary = ActionIcon.withProps({\n variant: 'subtle',\n color: 'var(--coveo-color-text-primary)',\n});\n\nconst ActionIconDestructive = ActionIcon.withProps({variant: 'filled', color: 'var(--mantine-color-error)'});\nconst ActionIconDestructiveSecondary = ActionIcon.withProps({variant: 'light', color: 'var(--mantine-color-error)'});\nconst ActionIconDestructiveTertiary = ActionIcon.withProps({\n variant: 'default',\n vars: () => ({root: {'--ai-color': 'var(--mantine-color-error)'}}),\n});\nconst ActionIconDestructiveQuaternary = ActionIcon.withProps({variant: 'subtle', color: 'var(--mantine-color-error)'});\n\nActionIcon.Group = MantineActionIcon.Group;\nActionIcon.Primary = ActionIconPrimary;\nActionIcon.Secondary = ActionIconSecondary;\nActionIcon.Tertiary = ActionIconTertiary;\nActionIcon.Quaternary = ActionIconQuaternary;\nActionIcon.DestructivePrimary = ActionIconDestructive;\nActionIcon.DestructiveSecondary = ActionIconDestructiveSecondary;\nActionIcon.DestructiveTertiary = ActionIconDestructiveTertiary;\nActionIcon.DestructiveQuaternary = ActionIconDestructiveQuaternary;\n\nActionIcon.displayName = 'ActionIcon';\nActionIcon.Group.displayName = 'ActionIcon.Group';\n(ActionIconPrimary as ComponentType).displayName = 'ActionIcon.Primary';\n(ActionIconSecondary as ComponentType).displayName = 'ActionIcon.Secondary';\n(ActionIconTertiary as ComponentType).displayName = 'ActionIcon.Tertiary';\n(ActionIconQuaternary as ComponentType).displayName = 'ActionIcon.Quaternary';\n(ActionIconDestructive as ComponentType).displayName = 'ActionIcon.DestructivePrimary';\n(ActionIconDestructiveSecondary as ComponentType).displayName = 'ActionIcon.DestructiveSecondary';\n(ActionIconDestructiveTertiary as ComponentType).displayName = 'ActionIcon.DestructiveTertiary';\n(ActionIconDestructiveQuaternary as ComponentType).displayName = 'ActionIcon.DestructiveQuaternary';\n"],"names":["ActionIcon","MantineActionIcon","polymorphicFactory","useClickWithLoading","ButtonWithDisabledTooltip","disabledTooltip","disabled","disabledTooltipProps","loading","onClick","others","ref","isLoading","handleClick","fullWidth","loaderProps","type","ActionIconPrimary","withProps","variant","ActionIconSecondary","color","ActionIconTertiary","ActionIconQuaternary","ActionIconDestructive","ActionIconDestructiveSecondary","ActionIconDestructiveTertiary","vars","root","ActionIconDestructiveQuaternary","Group","Primary","Secondary","Tertiary","Quaternary","DestructivePrimary","DestructiveSecondary","DestructiveTertiary","DestructiveQuaternary","displayName"],"mappings":";AAAA,SAKIA,cAAcC,iBAAiB,EAC/BC,kBAAkB,QAGf,gBAAgB;AAEvB,SAAQC,mBAAmB,QAAO,qCAAqC;AACvE,SAAQC,yBAAyB,QAAuC,yCAAyC;AA2BjH,OAAO,MAAMJ,aAAaE,mBACtB,CAAC,EAACG,eAAe,EAAEC,QAAQ,EAAEC,oBAAoB,EAAEC,OAAO,EAAEC,OAAO,EAAE,GAAGC,QAAO,EAAEC;IAC7E,MAAM,EAACC,SAAS,EAAEC,WAAW,EAAC,GAAGV,oBAAoBM;IACrD,qBACI,KAACL;QACGE,UAAUA;QACVD,iBAAiBA;QACjBE,sBAAsBA;QACtBO,WAAWJ,OAAOI,S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,GAAG;AACpDjB,mBAAqCiB,WAAW,GAAG;AACnDhB,qBAAuCgB,WAAW,GAAG;AACrDf,sBAAwCe,WAAW,GAAG;AACtDd,+BAAiDc,WAAW,GAAG;AAC/Db,8BAAgDa,WAAW,GAAG;AAC9DV,gCAAkDU,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Alert.d.ts","sourceRoot":"","sources":["../../../../src/components/Alert/Alert.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,iBAAiB,EACjB,UAAU,EACV,gBAAgB,EAChB,YAAY,EAIf,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"Alert.d.ts","sourceRoot":"","sources":["../../../../src/components/Alert/Alert.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,iBAAiB,EACjB,UAAU,EACV,gBAAgB,EAChB,YAAY,EAIf,MAAM,eAAe,CAAC;AAmBvB,eAAO,MAAM,KAAK;;;;;;;;;WAdP,UAAU;gBACL,cAAc;sBACR,KAAK;iBACV,gBAAgB;UACvB,iBAAiB;aACd,YAAY;sBACH;QACd,WAAW,EAAE,OAAO,gBAAgB,CAAC;QACrC,MAAM,EAAE,OAAO,WAAW,CAAC;QAC3B,OAAO,EAAE,OAAO,YAAY,CAAC;QAC7B,QAAQ,EAAE,OAAO,aAAa,CAAC;KAClC;;WAXM,UAAU;gBACL,cAAc;sBACR,KAAK;iBACV,gBAAgB;UACvB,iBAAiB;aACd,YAAY;sBACH;QACd,WAAW,EAAE,OAAO,gBAAgB,CAAC;QACrC,MAAM,EAAE,OAAO,WAAW,CAAC;QAC3B,OAAO,EAAE,OAAO,YAAY,CAAC;QAC7B,QAAQ,EAAE,OAAO,aAAa,CAAC;KAClC;;WAXM,UAAU;gBACL,cAAc;sBACR,KAAK;iBACV,gBAAgB;UACvB,iBAAiB;aACd,YAAY;sBACH;QACd,WAAW,EAAE,OAAO,gBAAgB,CAAC;QACrC,MAAM,EAAE,OAAO,WAAW,CAAC;QAC3B,OAAO,EAAE,OAAO,YAAY,CAAC;QAC7B,QAAQ,EAAE,OAAO,aAAa,CAAC;KAClC;;iBAJgB,OAAO,gBAAgB;YAC5B,OAAO,WAAW;aACjB,OAAO,YAAY;cAClB,OAAO,aAAa;CAI8E,CAAC;AAGrH,QAAA,MAAM,gBAAgB,4GASpB,CAAC;AAGH,QAAA,MAAM,WAAW,4GAQf,CAAC;AAGH,QAAA,MAAM,YAAY,4GAShB,CAAC;AAGH,QAAA,MAAM,aAAa,4GAQjB,CAAC"}
|
|
@@ -5,6 +5,7 @@ export const Alert = polymorphicFactory((props, ref)=>/*#__PURE__*/ _jsx(Mantine
|
|
|
5
5
|
...props,
|
|
6
6
|
ref: ref
|
|
7
7
|
}));
|
|
8
|
+
Alert.displayName = 'Alert';
|
|
8
9
|
const AlertInformation = Alert.withProps({
|
|
9
10
|
color: 'gray',
|
|
10
11
|
icon: /*#__PURE__*/ _jsx(InfoToken, {
|
|
@@ -17,6 +18,7 @@ const AlertInformation = Alert.withProps({
|
|
|
17
18
|
}
|
|
18
19
|
})
|
|
19
20
|
});
|
|
21
|
+
AlertInformation.displayName = 'Alert.Information';
|
|
20
22
|
const AlertAdvice = Alert.withProps({
|
|
21
23
|
icon: /*#__PURE__*/ _jsx(InfoToken, {
|
|
22
24
|
variant: "advice"
|
|
@@ -28,6 +30,7 @@ const AlertAdvice = Alert.withProps({
|
|
|
28
30
|
}
|
|
29
31
|
})
|
|
30
32
|
});
|
|
33
|
+
AlertAdvice.displayName = 'Alert.Advice';
|
|
31
34
|
const AlertWarning = Alert.withProps({
|
|
32
35
|
color: 'warning',
|
|
33
36
|
icon: /*#__PURE__*/ _jsx(InfoToken, {
|
|
@@ -40,6 +43,7 @@ const AlertWarning = Alert.withProps({
|
|
|
40
43
|
}
|
|
41
44
|
})
|
|
42
45
|
});
|
|
46
|
+
AlertWarning.displayName = 'Alert.Warning';
|
|
43
47
|
const AlertCritical = Alert.withProps({
|
|
44
48
|
icon: /*#__PURE__*/ _jsx(InfoToken, {
|
|
45
49
|
variant: "error"
|
|
@@ -51,6 +55,7 @@ const AlertCritical = Alert.withProps({
|
|
|
51
55
|
}
|
|
52
56
|
})
|
|
53
57
|
});
|
|
58
|
+
AlertCritical.displayName = 'Alert.Critical';
|
|
54
59
|
Alert.Information = AlertInformation;
|
|
55
60
|
Alert.Advice = AlertAdvice;
|
|
56
61
|
Alert.Warning = AlertWarning;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/Alert/Alert.tsx"],"sourcesContent":["import {\n AlertCssVariables,\n AlertProps,\n AlertStylesNames,\n AlertVariant,\n Factory,\n Alert as MantineAlert,\n polymorphicFactory,\n} from '@mantine/core';\nimport {InfoToken} from '../InfoToken/InfoToken.js';\n\ntype AlertOverloadFactory = Factory<{\n props: AlertProps;\n defaultRef: HTMLDivElement;\n defaultComponent: 'div';\n stylesNames: AlertStylesNames;\n vars: AlertCssVariables;\n variant: AlertVariant;\n staticComponents: {\n Information: typeof AlertInformation;\n Advice: typeof AlertAdvice;\n Warning: typeof AlertWarning;\n Critical: typeof AlertCritical;\n };\n}>;\n\nexport const Alert = polymorphicFactory<AlertOverloadFactory>((props, ref) => <MantineAlert {...props} ref={ref} />);\n\nconst AlertInformation = Alert.withProps({\n color: 'gray',\n icon: <InfoToken variant=\"information\" />,\n vars: () => ({\n root: {\n '--alert-color': 'var(--mantine-color-text)',\n '--alert-bg': 'var(--mantine-color-gray-light)',\n },\n }),\n});\n\nconst AlertAdvice = Alert.withProps({\n icon: <InfoToken variant=\"advice\" />,\n vars: () => ({\n root: {\n '--alert-color': 'var(--mantine-primary-color-filled)',\n '--alert-bg': 'var(--mantine-primary-color-light)',\n },\n }),\n});\n\nconst AlertWarning = Alert.withProps({\n color: 'warning',\n icon: <InfoToken variant=\"warning\" />,\n vars: () => ({\n root: {\n '--alert-color': 'var(--mantine-color-warning-filled)',\n '--alert-bg': 'var(--mantine-color-warning-light)',\n },\n }),\n});\nconst AlertCritical = Alert.withProps({\n icon: <InfoToken variant=\"error\" />,\n vars: () => ({\n root: {\n '--alert-color': 'var(--mantine-color-error)',\n '--alert-bg': 'var(--mantine-color-red-light)',\n },\n }),\n});\n\nAlert.Information = AlertInformation;\nAlert.Advice = AlertAdvice;\nAlert.Warning = AlertWarning;\nAlert.Critical = AlertCritical;\n"],"names":["Alert","MantineAlert","polymorphicFactory","InfoToken","props","ref","AlertInformation","withProps","color","icon","variant","vars","root","AlertAdvice","AlertWarning","AlertCritical","Information","Advice","Warning","Critical"],"mappings":";AAAA,SAMIA,SAASC,YAAY,EACrBC,kBAAkB,QACf,gBAAgB;
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/Alert/Alert.tsx"],"sourcesContent":["import {\n AlertCssVariables,\n AlertProps,\n AlertStylesNames,\n AlertVariant,\n Factory,\n Alert as MantineAlert,\n polymorphicFactory,\n} from '@mantine/core';\nimport {type ComponentType} from 'react';\nimport {InfoToken} from '../InfoToken/InfoToken.js';\n\ntype AlertOverloadFactory = Factory<{\n props: AlertProps;\n defaultRef: HTMLDivElement;\n defaultComponent: 'div';\n stylesNames: AlertStylesNames;\n vars: AlertCssVariables;\n variant: AlertVariant;\n staticComponents: {\n Information: typeof AlertInformation;\n Advice: typeof AlertAdvice;\n Warning: typeof AlertWarning;\n Critical: typeof AlertCritical;\n };\n}>;\n\nexport const Alert = polymorphicFactory<AlertOverloadFactory>((props, ref) => <MantineAlert {...props} ref={ref} />);\nAlert.displayName = 'Alert';\n\nconst AlertInformation = Alert.withProps({\n color: 'gray',\n icon: <InfoToken variant=\"information\" />,\n vars: () => ({\n root: {\n '--alert-color': 'var(--mantine-color-text)',\n '--alert-bg': 'var(--mantine-color-gray-light)',\n },\n }),\n});\n(AlertInformation as ComponentType).displayName = 'Alert.Information';\n\nconst AlertAdvice = Alert.withProps({\n icon: <InfoToken variant=\"advice\" />,\n vars: () => ({\n root: {\n '--alert-color': 'var(--mantine-primary-color-filled)',\n '--alert-bg': 'var(--mantine-primary-color-light)',\n },\n }),\n});\n(AlertAdvice as ComponentType).displayName = 'Alert.Advice';\n\nconst AlertWarning = Alert.withProps({\n color: 'warning',\n icon: <InfoToken variant=\"warning\" />,\n vars: () => ({\n root: {\n '--alert-color': 'var(--mantine-color-warning-filled)',\n '--alert-bg': 'var(--mantine-color-warning-light)',\n },\n }),\n});\n(AlertWarning as ComponentType).displayName = 'Alert.Warning';\n\nconst AlertCritical = Alert.withProps({\n icon: <InfoToken variant=\"error\" />,\n vars: () => ({\n root: {\n '--alert-color': 'var(--mantine-color-error)',\n '--alert-bg': 'var(--mantine-color-red-light)',\n },\n }),\n});\n(AlertCritical as ComponentType).displayName = 'Alert.Critical';\n\nAlert.Information = AlertInformation;\nAlert.Advice = AlertAdvice;\nAlert.Warning = AlertWarning;\nAlert.Critical = AlertCritical;\n"],"names":["Alert","MantineAlert","polymorphicFactory","InfoToken","props","ref","displayName","AlertInformation","withProps","color","icon","variant","vars","root","AlertAdvice","AlertWarning","AlertCritical","Information","Advice","Warning","Critical"],"mappings":";AAAA,SAMIA,SAASC,YAAY,EACrBC,kBAAkB,QACf,gBAAgB;AAEvB,SAAQC,SAAS,QAAO,4BAA4B;AAiBpD,OAAO,MAAMH,QAAQE,mBAAyC,CAACE,OAAOC,oBAAQ,KAACJ;QAAc,GAAGG,KAAK;QAAEC,KAAKA;QAAS;AACrHL,MAAMM,WAAW,GAAG;AAEpB,MAAMC,mBAAmBP,MAAMQ,SAAS,CAAC;IACrCC,OAAO;IACPC,oBAAM,KAACP;QAAUQ,SAAQ;;IACzBC,MAAM,IAAO,CAAA;YACTC,MAAM;gBACF,iBAAiB;gBACjB,cAAc;YAClB;QACJ,CAAA;AACJ;AACCN,iBAAmCD,WAAW,GAAG;AAElD,MAAMQ,cAAcd,MAAMQ,SAAS,CAAC;IAChCE,oBAAM,KAACP;QAAUQ,SAAQ;;IACzBC,MAAM,IAAO,CAAA;YACTC,MAAM;gBACF,iBAAiB;gBACjB,cAAc;YAClB;QACJ,CAAA;AACJ;AACCC,YAA8BR,WAAW,GAAG;AAE7C,MAAMS,eAAef,MAAMQ,SAAS,CAAC;IACjCC,OAAO;IACPC,oBAAM,KAACP;QAAUQ,SAAQ;;IACzBC,MAAM,IAAO,CAAA;YACTC,MAAM;gBACF,iBAAiB;gBACjB,cAAc;YAClB;QACJ,CAAA;AACJ;AACCE,aAA+BT,WAAW,GAAG;AAE9C,MAAMU,gBAAgBhB,MAAMQ,SAAS,CAAC;IAClCE,oBAAM,KAACP;QAAUQ,SAAQ;;IACzBC,MAAM,IAAO,CAAA;YACTC,MAAM;gBACF,iBAAiB;gBACjB,cAAc;YAClB;QACJ,CAAA;AACJ;AACCG,cAAgCV,WAAW,GAAG;AAE/CN,MAAMiB,WAAW,GAAGV;AACpBP,MAAMkB,MAAM,GAAGJ;AACfd,MAAMmB,OAAO,GAAGJ;AAChBf,MAAMoB,QAAQ,GAAGJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/components/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,kBAAkB,EAClB,KAAK,WAAW,EAChB,iBAAiB,EACjB,aAAa,EAGb,WAAW,IAAI,kBAAkB,EAEpC,MAAM,eAAe,CAAC;AACvB,OAAO,
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/components/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,kBAAkB,EAClB,KAAK,WAAW,EAChB,iBAAiB,EACjB,aAAa,EAGb,WAAW,IAAI,kBAAkB,EAEpC,MAAM,eAAe,CAAC;AACvB,OAAO,EAAgB,iBAAiB,EAAC,MAAM,OAAO,CAAC;AAEvD,OAAO,EAA4B,8BAA8B,EAAC,MAAM,gCAAgC,CAAC;AAEzG,MAAM,WAAW,WAAY,SAAQ,kBAAkB,EAAE,8BAA8B;IAEnF,OAAO,CAAC,EAAE,iBAAiB,CAAC,iBAAiB,CAA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AE,OAAO,iBAAiB,CAAC;QAC7C,oBAAoB,EAAE,OAAO,0BAA0B,CAAC;QACxD,mBAAmB,EAAE,OAAO,yBAAyB,CAAC;QACtD,qBAAqB,EAAE,OAAO,2BAA2B,CAAC;KAC7D;;WATU,OAAO,WAAW;aAChB,OAAO,aAAa;eAClB,OAAO,eAAe;cACvB,OAAO,cAAc;gBACnB,OAAO,gBAAgB;wBACf,OAAO,iBAAiB;0BACtB,OAAO,0BAA0B;yBAClC,OAAO,yBAAyB;2BAC9B,OAAO,2BAA2B;CA6BhE,CAAC;AACF,QAAA,MAAM,aAAa,gHAAwC,CAAC;AAC5D,QAAA,MAAM,eAAe,gHAGnB,CAAC;AACH,QAAA,MAAM,cAAc,gHAQlB,CAAC;AACH,QAAA,MAAM,gBAAgB,gHAGpB,CAAC;AAEH,QAAA,MAAM,iBAAiB,gHAA6E,CAAC;AACrG,QAAA,MAAM,0BAA0B,gHAG9B,CAAC;AACH,QAAA,MAAM,yBAAyB,gHAQ7B,CAAC;AACH,QAAA,MAAM,2BAA2B,gHAA6E,CAAC"}
|
|
@@ -64,6 +64,7 @@ const ButtonDestructiveQuaternary = Button.withProps({
|
|
|
64
64
|
color: 'var(--mantine-color-error)'
|
|
65
65
|
});
|
|
66
66
|
Button.Group = MantineButton.Group;
|
|
67
|
+
Button.Group.displayName = 'Button.Group';
|
|
67
68
|
Button.Primary = ButtonPrimary;
|
|
68
69
|
Button.Secondary = ButtonSecondary;
|
|
69
70
|
Button.Tertiary = ButtonTertiary;
|
|
@@ -72,5 +73,14 @@ Button.DestructivePrimary = ButtonDestructive;
|
|
|
72
73
|
Button.DestructiveSecondary = ButtonDestructiveSecondary;
|
|
73
74
|
Button.DestructiveTertiary = ButtonDestructiveTertiary;
|
|
74
75
|
Button.DestructiveQuaternary = ButtonDestructiveQuaternary;
|
|
76
|
+
ButtonPrimary.displayName = 'Button.Primary';
|
|
77
|
+
ButtonSecondary.displayName = 'Button.Secondary';
|
|
78
|
+
ButtonTertiary.displayName = 'Button.Tertiary';
|
|
79
|
+
ButtonQuaternary.displayName = 'Button.Quaternary';
|
|
80
|
+
ButtonDestructive.displayName = 'Button.DestructivePrimary';
|
|
81
|
+
ButtonDestructiveSecondary.displayName = 'Button.DestructiveSecondary';
|
|
82
|
+
ButtonDestructiveTertiary.displayName = 'Button.DestructiveTertiary';
|
|
83
|
+
ButtonDestructiveQuaternary.displayName = 'Button.DestructiveQuaternary';
|
|
84
|
+
Button.displayName = 'Button';
|
|
75
85
|
|
|
76
86
|
//# sourceMappingURL=Button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/Button/Button.tsx"],"sourcesContent":["import {\n ButtonCssVariables,\n type ButtonGroup,\n ButtonStylesNames,\n ButtonVariant,\n Factory,\n Button as MantineButton,\n ButtonProps as MantineButtonProps,\n polymorphicFactory,\n} from '@mantine/core';\nimport {MouseEventHandler} from 'react';\nimport {useClickWithLoading} from '../../hooks/useClickWithLoading.js';\nimport {ButtonWithDisabledTooltip, ButtonWithDisabledTooltipProps} from './ButtonWithDisabledTooltip.js';\n\nexport interface ButtonProps extends MantineButtonProps, ButtonWithDisabledTooltipProps {\n /* Handler executed on click */\n onClick?: MouseEventHandler<HTMLButtonElement>;\n}\n\ntype ButtonOverloadFactory = Factory<{\n props: ButtonProps;\n defaultRef: HTMLButtonElement;\n defaultComponent: 'button';\n stylesNames: ButtonStylesNames;\n vars: ButtonCssVariables;\n variant: ButtonVariant;\n staticComponents: {\n Group: typeof ButtonGroup;\n Primary: typeof ButtonPrimary;\n Secondary: typeof ButtonSecondary;\n Tertiary: typeof ButtonTertiary;\n Quaternary: typeof ButtonQuaternary;\n DestructivePrimary: typeof ButtonDestructive;\n DestructiveSecondary: typeof ButtonDestructiveSecondary;\n DestructiveTertiary: typeof ButtonDestructiveTertiary;\n DestructiveQuaternary: typeof ButtonDestructiveQuaternary;\n };\n}>;\n\nexport const Button = polymorphicFactory<ButtonOverloadFactory>(\n (\n {disabledTooltip, disabled, disabledTooltipProps, loading, onClick, 'data-disabled': dataDisabled, ...others},\n ref,\n ) => {\n const {isLoading, handleClick} = useClickWithLoading(onClick);\n return (\n <ButtonWithDisabledTooltip\n disabled={disabled || dataDisabled}\n disabledTooltip={disabledTooltip}\n disabledTooltipProps={disabledTooltipProps}\n fullWidth={others.fullWidth}\n >\n <MantineButton\n loaderProps={{variant: 'oval'}}\n ref={ref}\n loading={isLoading || loading}\n onClick={dataDisabled ? (e) => e.preventDefault() : handleClick}\n disabled={disabled || dataDisabled}\n data-loading={isLoading || loading || undefined}\n {...others}\n />\n </ButtonWithDisabledTooltip>\n );\n },\n);\nconst ButtonPrimary = Button.withProps({variant: 'filled'});\nconst ButtonSecondary = Button.withProps({\n variant: 'light',\n color: 'var(--coveo-color-text-primary)',\n});\nconst ButtonTertiary = Button.withProps({\n variant: 'default',\n vars: (theme) => ({\n root: {\n '--button-color': 'var(--coveo-color-text-primary)',\n '--button-padding-x': theme.spacing.sm,\n },\n }),\n});\nconst ButtonQuaternary = Button.withProps({\n variant: 'subtle',\n color: 'var(--coveo-color-text-primary)',\n});\n\nconst ButtonDestructive = Button.withProps({variant: 'filled', color: 'var(--mantine-color-error)'});\nconst ButtonDestructiveSecondary = Button.withProps({\n variant: 'light',\n color: 'var(--mantine-color-error)',\n});\nconst ButtonDestructiveTertiary = Button.withProps({\n variant: 'default',\n vars: (theme) => ({\n root: {\n '--button-color': 'var(--mantine-color-error)',\n '--button-padding-x': theme.spacing.sm,\n },\n }),\n});\nconst ButtonDestructiveQuaternary = Button.withProps({variant: 'subtle', color: 'var(--mantine-color-error)'});\n\nButton.Group = MantineButton.Group;\nButton.Primary = ButtonPrimary;\nButton.Secondary = ButtonSecondary;\nButton.Tertiary = ButtonTertiary;\nButton.Quaternary = ButtonQuaternary;\nButton.DestructivePrimary = ButtonDestructive;\nButton.DestructiveSecondary = ButtonDestructiveSecondary;\nButton.DestructiveTertiary = ButtonDestructiveTertiary;\nButton.DestructiveQuaternary = ButtonDestructiveQuaternary;\n"],"names":["Button","MantineButton","polymorphicFactory","useClickWithLoading","ButtonWithDisabledTooltip","disabledTooltip","disabled","disabledTooltipProps","loading","onClick","dataDisabled","others","ref","isLoading","handleClick","fullWidth","loaderProps","variant","e","preventDefault","data-loading","undefined","ButtonPrimary","withProps","ButtonSecondary","color","ButtonTertiary","vars","theme","root","spacing","sm","ButtonQuaternary","ButtonDestructive","ButtonDestructiveSecondary","ButtonDestructiveTertiary","ButtonDestructiveQuaternary","Group","Primary","Secondary","Tertiary","Quaternary","DestructivePrimary","DestructiveSecondary","DestructiveTertiary","DestructiveQuaternary"],"mappings":";AAAA,SAMIA,UAAUC,aAAa,EAEvBC,kBAAkB,QACf,gBAAgB;AAEvB,SAAQC,mBAAmB,QAAO,qCAAqC;AACvE,SAAQC,yBAAyB,QAAuC,iCAAiC;AA2BzG,OAAO,MAAMJ,SAASE,mBAClB,CACI,EAACG,eAAe,EAAEC,QAAQ,EAAEC,oBAAoB,EAAEC,OAAO,EAAEC,OAAO,EAAE,iBAAiBC,YAAY,EAAE,GAAGC,QAAO,EAC7GC;IAEA,MAAM,EAACC,SAAS,EAAEC,WAAW,EAAC,GAAGX,oBAAoBM;IACrD,qBACI,KAACL;QACGE,UAAUA,YAAYI;QACtBL,iBAAiBA;QACjBE,sBAAsBA;QACtBQ,WAAWJ,OAAOI,SAAS;kBAE3B,cAAA,KAACd;YACGe,aAAa;gBAACC,SAAS;YAAM;YAC7BL,KAAKA;YACLJ,SAASK,aAAaL;YACtBC,SAASC,eAAe,CAACQ,IAAMA,EAAEC,cAAc,KAAKL;YACpDR,UAAUA,YAAYI;YACtBU,gBAAcP,aAAaL,WAAWa;YACrC,GAAGV,MAAM;;;AAI1B,GACF;AACF,MAAMW,gBAAgBtB,OAAOuB,SAAS,CAAC;IAACN,SAAS;AAAQ;AACzD,MAAMO,kBAAkBxB,OAAOuB,SAAS,CAAC;IACrCN,SAAS;IACTQ,OAAO;AACX;AACA,MAAMC,iBAAiB1B,OAAOuB,SAAS,CAAC;IACpCN,SAAS;IACTU,MAAM,CAACC,QAAW,CAAA;YACdC,MAAM;gBACF,kBAAkB;gBAClB,sBAAsBD,MAAME,OAAO,CAACC,EAAE;YAC1C;QACJ,CAAA;AACJ;AACA,MAAMC,mBAAmBhC,OAAOuB,SAAS,CAAC;IACtCN,SAAS;IACTQ,OAAO;AACX;AAEA,MAAMQ,oBAAoBjC,OAAOuB,SAAS,CAAC;IAACN,SAAS;IAAUQ,OAAO;AAA4B;AAClG,MAAMS,6BAA6BlC,OAAOuB,SAAS,CAAC;IAChDN,SAAS;IACTQ,OAAO;AACX;AACA,MAAMU,4BAA4BnC,OAAOuB,SAAS,CAAC;IAC/CN,SAAS;IACTU,MAAM,CAACC,QAAW,CAAA;YACdC,MAAM;gBACF,kBAAkB;gBAClB,sBAAsBD,MAAME,OAAO,CAACC,EAAE;YAC1C;QACJ,CAAA;AACJ;AACA,MAAMK,8BAA8BpC,OAAOuB,SAAS,CAAC;IAACN,SAAS;IAAUQ,OAAO;AAA4B;AAE5GzB,OAAOqC,KAAK,GAAGpC,cAAcoC,KAAK;AAClCrC,
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/Button/Button.tsx"],"sourcesContent":["import {\n ButtonCssVariables,\n type ButtonGroup,\n ButtonStylesNames,\n ButtonVariant,\n Factory,\n Button as MantineButton,\n ButtonProps as MantineButtonProps,\n polymorphicFactory,\n} from '@mantine/core';\nimport {ComponentType, MouseEventHandler} from 'react';\nimport {useClickWithLoading} from '../../hooks/useClickWithLoading.js';\nimport {ButtonWithDisabledTooltip, ButtonWithDisabledTooltipProps} from './ButtonWithDisabledTooltip.js';\n\nexport interface ButtonProps extends MantineButtonProps, ButtonWithDisabledTooltipProps {\n /* Handler executed on click */\n onClick?: MouseEventHandler<HTMLButtonElement>;\n}\n\ntype ButtonOverloadFactory = Factory<{\n props: ButtonProps;\n defaultRef: HTMLButtonElement;\n defaultComponent: 'button';\n stylesNames: ButtonStylesNames;\n vars: ButtonCssVariables;\n variant: ButtonVariant;\n staticComponents: {\n Group: typeof ButtonGroup;\n Primary: typeof ButtonPrimary;\n Secondary: typeof ButtonSecondary;\n Tertiary: typeof ButtonTertiary;\n Quaternary: typeof ButtonQuaternary;\n DestructivePrimary: typeof ButtonDestructive;\n DestructiveSecondary: typeof ButtonDestructiveSecondary;\n DestructiveTertiary: typeof ButtonDestructiveTertiary;\n DestructiveQuaternary: typeof ButtonDestructiveQuaternary;\n };\n}>;\n\nexport const Button = polymorphicFactory<ButtonOverloadFactory>(\n (\n {disabledTooltip, disabled, disabledTooltipProps, loading, onClick, 'data-disabled': dataDisabled, ...others},\n ref,\n ) => {\n const {isLoading, handleClick} = useClickWithLoading(onClick);\n return (\n <ButtonWithDisabledTooltip\n disabled={disabled || dataDisabled}\n disabledTooltip={disabledTooltip}\n disabledTooltipProps={disabledTooltipProps}\n fullWidth={others.fullWidth}\n >\n <MantineButton\n loaderProps={{variant: 'oval'}}\n ref={ref}\n loading={isLoading || loading}\n onClick={dataDisabled ? (e) => e.preventDefault() : handleClick}\n disabled={disabled || dataDisabled}\n data-loading={isLoading || loading || undefined}\n {...others}\n />\n </ButtonWithDisabledTooltip>\n );\n },\n);\nconst ButtonPrimary = Button.withProps({variant: 'filled'});\nconst ButtonSecondary = Button.withProps({\n variant: 'light',\n color: 'var(--coveo-color-text-primary)',\n});\nconst ButtonTertiary = Button.withProps({\n variant: 'default',\n vars: (theme) => ({\n root: {\n '--button-color': 'var(--coveo-color-text-primary)',\n '--button-padding-x': theme.spacing.sm,\n },\n }),\n});\nconst ButtonQuaternary = Button.withProps({\n variant: 'subtle',\n color: 'var(--coveo-color-text-primary)',\n});\n\nconst ButtonDestructive = Button.withProps({variant: 'filled', color: 'var(--mantine-color-error)'});\nconst ButtonDestructiveSecondary = Button.withProps({\n variant: 'light',\n color: 'var(--mantine-color-error)',\n});\nconst ButtonDestructiveTertiary = Button.withProps({\n variant: 'default',\n vars: (theme) => ({\n root: {\n '--button-color': 'var(--mantine-color-error)',\n '--button-padding-x': theme.spacing.sm,\n },\n }),\n});\nconst ButtonDestructiveQuaternary = Button.withProps({variant: 'subtle', color: 'var(--mantine-color-error)'});\n\nButton.Group = MantineButton.Group;\nButton.Group.displayName = 'Button.Group';\nButton.Primary = ButtonPrimary;\nButton.Secondary = ButtonSecondary;\nButton.Tertiary = ButtonTertiary;\nButton.Quaternary = ButtonQuaternary;\nButton.DestructivePrimary = ButtonDestructive;\nButton.DestructiveSecondary = ButtonDestructiveSecondary;\nButton.DestructiveTertiary = ButtonDestructiveTertiary;\nButton.DestructiveQuaternary = ButtonDestructiveQuaternary;\n(ButtonPrimary as ComponentType).displayName = 'Button.Primary';\n(ButtonSecondary as ComponentType).displayName = 'Button.Secondary';\n(ButtonTertiary as ComponentType).displayName = 'Button.Tertiary';\n(ButtonQuaternary as ComponentType).displayName = 'Button.Quaternary';\n(ButtonDestructive as ComponentType).displayName = 'Button.DestructivePrimary';\n(ButtonDestructiveSecondary as ComponentType).displayName = 'Button.DestructiveSecondary';\n(ButtonDestructiveTertiary as ComponentType).displayName = 'Button.DestructiveTertiary';\n(ButtonDestructiveQuaternary as ComponentType).displayName = 'Button.DestructiveQuaternary';\n\nButton.displayName = 'Button';\n"],"names":["Button","MantineButton","polymorphicFactory","useClickWithLoading","ButtonWithDisabledTooltip","disabledTooltip","disabled","disabledTooltipProps","loading","onClick","dataDisabled","others","ref","isLoading","handleClick","fullWidth","loaderProps","variant","e","preventDefault","data-loading","undefined","ButtonPrimary","withProps","ButtonSecondary","color","ButtonTertiary","vars","theme","root","spacing","sm","ButtonQuaternary","ButtonDestructive","ButtonDestructiveSecondary","ButtonDestructiveTertiary","ButtonDestructiveQuaternary","Group","displayName","Primary","Secondary","Tertiary","Quaternary","DestructivePrimary","DestructiveSecondary","DestructiveTertiary","DestructiveQuaternary"],"mappings":";AAAA,SAMIA,UAAUC,aAAa,EAEvBC,kBAAkB,QACf,gBAAgB;AAEvB,SAAQC,mBAAmB,QA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;YACdC,MAAM;gBACF,kBAAkB;gBAClB,sBAAsBD,MAAME,OAAO,CAACC,EAAE;YAC1C;QACJ,CAAA;AACJ;AACA,MAAMK,8BAA8BpC,OAAOuB,SAAS,CAAC;IAACN,SAAS;IAAUQ,OAAO;AAA4B;AAE5GzB,OAAOqC,KAAK,GAAGpC,cAAcoC,KAAK;AAClCrC,OAAOqC,KAAK,CAACC,WAAW,GAAG;AAC3BtC,OAAOuC,OAAO,GAAGjB;AACjBtB,OAAOwC,SAAS,GAAGhB;AACnBxB,OAAOyC,QAAQ,GAAGf;AAClB1B,OAAO0C,UAAU,GAAGV;AACpBhC,OAAO2C,kBAAkB,GAAGV;AAC5BjC,OAAO4C,oBAAoB,GAAGV;AAC9BlC,OAAO6C,mBAAmB,GAAGV;AAC7BnC,OAAO8C,qBAAqB,GAAGV;AAC9Bd,cAAgCgB,WAAW,GAAG;AAC9Cd,gBAAkCc,WAAW,GAAG;AAChDZ,eAAiCY,WAAW,GAAG;AAC/CN,iBAAmCM,WAAW,GAAG;AACjDL,kBAAoCK,WAAW,GAAG;AAClDJ,2BAA6CI,WAAW,GAAG;AAC3DH,0BAA4CG,WAAW,GAAG;AAC1DF,4BAA8CE,WAAW,GAAG;AAE7DtC,OAAOsC,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CodeEditor.d.ts","sourceRoot":"","sources":["../../../../src/components/CodeEditor/CodeEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKH,iBAAiB,EAIjB,UAAU,EAKb,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAiB,MAAM,IAAI,YAAY,EAAC,MAAM,eAAe,CAAC;AACrE,OAAO,EAAC,iBAAiB,EAA8B,MAAM,OAAO,CAAC;AAQrE,UAAU,eACN,
|
|
1
|
+
{"version":3,"file":"CodeEditor.d.ts","sourceRoot":"","sources":["../../../../src/components/CodeEditor/CodeEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKH,iBAA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,eAAO,MAAM,UAAU,EAAE,iBAAiB,CAAC,eAAe,CA4LzD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/CodeEditor/CodeEditor.tsx"],"sourcesContent":["import {\n Box,\n Center,\n Group,\n Input,\n InputWrapperProps,\n Loader,\n Space,\n Stack,\n StackProps,\n px,\n useMantineColorScheme,\n useMantineTheme,\n useProps,\n} from '@mantine/core';\nimport {useUncontrolled} from '@mantine/hooks';\nimport Editor, {Monaco, loader} from '@monaco-editor/react';\nimport {MarkerSeverity, editor as monacoEditor} from 'monaco-editor';\nimport {FunctionComponent, useEffect, useRef, useState} from 'react';\n\nimport cx from 'clsx';\nimport {useParentHeight} from '../../hooks/useParentHeight.js';\nimport {CopyToClipboard} from '../CopyToClipboard/CopyToClipboard.js';\nimport CodeEditorClasses from './CodeEditor.module.css';\nimport {XML} from './languages/xml.js';\nimport {Search} from './search/Search.js';\ninterface CodeEditorProps\n extends Omit<\n InputWrapperProps,\n 'inputContainer' | 'inputWrapperOrder' | 'classNames' | 'styles' | 'vars' | 'onChange'\n >,\n Omit<StackProps, 'onChange' | 'attributes'> {\n /**\n * The language syntax of the editor\n *\n * @default 'plaintext'\n */\n language?: 'plaintext' | 'json' | 'markdown' | 'python' | 'xml' | (string & unknown);\n /** Default value for uncontrolled input */\n defaultValue?: string;\n /** Value for controlled input */\n value?: string;\n /** onChange value for controlled input */\n onChange?(value: string): void;\n /** Called whenever the search icon is clicked */\n onSearch?(): void;\n /** Called whenever the copy icon is clicked */\n onCopy?(): void;\n /** Called whenever the code editor gets the focus */\n onFocus?(): void;\n /** Ref object that provides access to the editor's functionality */\n editorHandle?: React.MutableRefObject<monacoEditor.IStandaloneCodeEditor | null>;\n /**\n * The minimal height of the CodeEditor (label and description included)\n *\n * By default the CodeEditor is adjusted to fill its parent height.\n * In the case where the parent height is too short, it will use this value as minimum.\n *\n * @default 300\n */\n minHeight?: number;\n /**\n * The maximal height of the CodeEditor (label and description included)\n *\n * By default the CodeEditor is adjusted to fill its parent height.\n * In the case where the parent height would be too high for your liking, you can use this prop to set a maximum.\n */\n maxHeight?: number;\n disabled?: boolean;\n /**\n * Defines how the monaco editor files will be loaded.\n * Note that using `'local'` requires [some additional configuration](https://github.com/suren-atoyan/monaco-react#use-monaco-editor-as-an-npm-package).\n *\n * @default 'local'\n */\n monacoLoader?: 'cdn' | 'local';\n /**\n * Options to pass to the monaco editor.\n * Currently only supporting [`tabSize`](https://microsoft.github.io/monaco-editor/typedoc/interfaces/editor.IStandaloneEditorConstructionOptions.html#tabSize).\n *\n */\n options?: Pick<monacoEditor.IStandaloneEditorConstructionOptions, 'tabSize'>;\n}\n\nconst defaultProps: Partial<CodeEditorProps> = {\n language: 'plaintext',\n monacoLoader: 'local',\n defaultValue: '',\n minHeight: 300,\n};\n\nexport const CodeEditor: FunctionComponent<CodeEditorProps> = (props) => {\n const {\n language,\n defaultValue,\n onChange,\n onCopy,\n onSearch,\n onFocus,\n value,\n label,\n required,\n labelProps,\n error,\n errorProps,\n description,\n descriptionProps,\n minHeight,\n maxHeight,\n disabled,\n monacoLoader,\n options: {tabSize} = {tabSize: 2},\n editorHandle,\n ...others\n } = useProps('CodeEditor', defaultProps, props);\n const [loaded, setLoaded] = useState(false);\n const [_value, handleChange] = useUncontrolled<string>({\n value,\n defaultValue,\n onChange,\n finalValue: '',\n });\n const [parentHeight, ref] = useParentHeight();\n const editorRef = useRef(null);\n\n const loadLocalMonaco = async () => {\n const monacoInstance = await import('monaco-editor');\n loader.config({monaco: monacoInstance});\n setLoaded(true);\n };\n\n const registerLanguages = (monaco: Monaco) => {\n if (monaco && language === 'xml') {\n XML.register(monaco);\n }\n };\n\n const registerThemes = (monaco: Monaco) => {\n monaco.editor.defineTheme('light', {\n base: 'vs',\n inherit: true,\n rules: [],\n colors: {\n 'editor.background': theme.colors.gray[0],\n },\n });\n };\n\n const handleSearch = () => {\n if (editorRef.current) {\n editorRef.current.focus();\n editorRef.current.trigger('editor', 'actions.find', '');\n onSearch?.();\n }\n };\n\n const [hasMonacoError, setHasMonacoError] = useState(false);\n const hasMonacoErrorRef = useRef(false);\n\n hasMonacoErrorRef.current = hasMonacoError;\n\n const hasError = !!error || hasMonacoError;\n const theme = useMantineTheme();\n const {colorScheme} = useMantineColorScheme();\n\n useEffect(() => {\n if (monacoLoader === 'local') {\n loadLocalMonaco();\n } else {\n setLoaded(true);\n }\n }, []);\n\n const handleValidate = (markers: monacoEditor.IMarker[]) => {\n setHasMonacoError(markers.some((marker) => marker.severity === MarkerSeverity.Error));\n };\n\n const _label = label ? (\n <Input.Label required={required} {...labelProps}>\n {label}\n </Input.Label>\n ) : null;\n\n const _description = description ? (\n <Input.Description {...descriptionProps}>{description}</Input.Description>\n ) : null;\n\n const _error = error ? <Input.Error {...errorProps}>{error}</Input.Error> : <Space h=\"sm\" />;\n\n const _header =\n _label || _description ? (\n <Stack gap=\"xxs\">\n {_label}\n {_description}\n </Stack>\n ) : null;\n\n const _buttons = (\n <Group justify=\"right\" gap=\"xs\">\n <Search handleSearch={handleSearch} />\n <CopyToClipboard value={_value} onCopy={() => onCopy?.()} />\n </Group>\n );\n let editorTheme = colorScheme === 'light' ? 'light' : 'vs-dark';\n if (disabled) {\n editorTheme += '-disabled';\n }\n\n const _editor = loaded ? (\n <Box\n p=\"md\"\n pl=\"xs\"\n className={cx(\n CodeEditorClasses.root,\n {[CodeEditorClasses.error]: hasError},\n {[CodeEditorClasses.disabled]: disabled},\n )}\n data-testid=\"editor-wrapper\"\n >\n <Editor\n onValidate={handleValidate}\n defaultLanguage={language}\n theme={editorTheme}\n options={{\n minimap: {enabled: false},\n wordWrap: 'on',\n scrollBeyondLastLine: false,\n formatOnPaste: true,\n fontSize: px(theme.fontSizes.xs) as number,\n readOnly: disabled,\n stickyScroll: {enabled: false},\n tabSize,\n }}\n value={_value}\n onChange={handleChange}\n beforeMount={(monaco) => {\n registerLanguages(monaco);\n registerThemes(monaco);\n }}\n onMount={(editor) => {\n editorRef.current = editor;\n if (editorHandle) {\n editorHandle.current = editor;\n }\n editor.onDidFocusEditorText(() => onFocus?.());\n editor.onDidBlurEditorText(async () => {\n // monaco editor has a timeout of 500ms populating errors, we want to ensure that checking errors happen after that\n setTimeout(async () => {\n if (!hasMonacoErrorRef.current) {\n await editor?.getAction('editor.action.formatDocument')?.run();\n }\n }, 550);\n });\n }}\n />\n </Box>\n ) : (\n <Center className={CodeEditorClasses.editor}>\n <Loader />\n </Center>\n );\n\n return (\n <Stack\n justify=\"flex-start\"\n gap=\"sm\"\n h={Math.max(parentHeight, minHeight)}\n mah={maxHeight}\n ref={ref}\n {...others}\n >\n <Group justify=\"space-between\">\n {_header}\n {_buttons}\n </Group>\n {_editor}\n {_error}\n </Stack>\n );\n};\n"],"names":["Box","Center","Group","Input","Loader","Space","Stack","px","useMantineColorScheme","useMantineTheme","useProps","useUncontrolled","Editor","loader","MarkerSeverity","useEffect","useRef","useState","cx","useParentHeight","CopyToClipboard","CodeEditorClasses","XML","Search","defaultProps","language","monacoLoader","defaultValue","minHeight","CodeEditor","props","onChange","onCopy","onSearch","onFocus","value","label","required","labelProps","error","errorProps","description","descriptionProps","maxHeight","disabled","options","tabSize","editorHandle","others","loaded","setLoaded","_value","handleChange","finalValue","parentHeight","ref","editorRef","loadLocalMonaco","monacoInstance","config","monaco","registerLanguages","register","registerThemes","editor","defineTheme","base","inherit","rules","colors","theme","gray","handleSearch","current","focus","trigger","hasMonacoError","setHasMonacoError","hasMonacoErrorRef","hasError","colorScheme","handleValidate","markers","some","marker","severity","Error","_label","Label","_description","Description","_error","h","_header","gap","_buttons","justify","editorTheme","_editor","p","pl","className","root","data-testid","onValidate","defaultLanguage","minimap","enabled","wordWrap","scrollBeyondLastLine","formatOnPaste","fontSize","fontSizes","xs","readOnly","stickyScroll","beforeMount","onMount","onDidFocusEditorText","onDidBlurEditorText","setTimeout","getAction","run","Math","max","mah"],"mappings":";AAAA,SACIA,GAAG,EACHC,MAAM,EACNC,KAAK,E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AAiCC;wBAC7D;oBACJ,GAAG;gBACP;YACJ;;uBAIR,KAACzH;QAAOoG,WAAWhF,kBAAkB2C,MAAM;kBACvC,cAAA,KAAC5D;;IAIT,qBACI,MAACE;QACG0F,SAAQ;QACRF,KAAI;QACJF,GAAG+B,KAAKC,GAAG,CAACtE,cAAc1B;QAC1BiG,KAAKlF;QACLY,KAAKA;QACJ,GAAGP,MAAM;;0BAEV,MAAC9C;gBAAM8F,SAAQ;;oBACVH;oBACAE;;;YAEJG;YACAP;;;AAGb,EAAE"}
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/CodeEditor/CodeEditor.tsx"],"sourcesContent":["import {\n Box,\n Center,\n Group,\n Input,\n InputWrapperProps,\n Loader,\n Space,\n Stack,\n StackProps,\n px,\n useMantineColorScheme,\n useMantineTheme,\n useProps,\n} from '@mantine/core';\nimport {useUncontrolled} from '@mantine/hooks';\nimport Editor, {Monaco, loader} from '@monaco-editor/react';\nimport {MarkerSeverity, editor as monacoEditor} from 'monaco-editor';\nimport {FunctionComponent, useEffect, useRef, useState} from 'react';\n\nimport cx from 'clsx';\nimport {useParentHeight} from '../../hooks/useParentHeight.js';\nimport {CopyToClipboard} from '../CopyToClipboard/CopyToClipboard.js';\nimport CodeEditorClasses from './CodeEditor.module.css';\nimport {XML} from './languages/xml.js';\nimport {Search} from './search/Search.js';\ninterface CodeEditorProps\n extends\n Omit<InputWrapperProps, 'inputContainer' | 'inputWrapperOrder' | 'classNames' | 'styles' | 'vars' | 'onChange'>,\n Omit<StackProps, 'onChange' | 'attributes'> {\n /**\n * The language syntax of the editor\n *\n * @default 'plaintext'\n */\n language?: 'plaintext' | 'json' | 'markdown' | 'python' | 'xml' | (string & unknown);\n /** Default value for uncontrolled input */\n defaultValue?: string;\n /** Value for controlled input */\n value?: string;\n /** onChange value for controlled input */\n onChange?(value: string): void;\n /** Called whenever the search icon is clicked */\n onSearch?(): void;\n /** Called whenever the copy icon is clicked */\n onCopy?(): void;\n /** Called whenever the code editor gets the focus */\n onFocus?(): void;\n /** Ref object that provides access to the editor's functionality */\n editorHandle?: React.MutableRefObject<monacoEditor.IStandaloneCodeEditor | null>;\n /**\n * The minimal height of the CodeEditor (label and description included)\n *\n * By default the CodeEditor is adjusted to fill its parent height.\n * In the case where the parent height is too short, it will use this value as minimum.\n *\n * @default 300\n */\n minHeight?: number;\n /**\n * The maximal height of the CodeEditor (label and description included)\n *\n * By default the CodeEditor is adjusted to fill its parent height.\n * In the case where the parent height would be too high for your liking, you can use this prop to set a maximum.\n */\n maxHeight?: number;\n disabled?: boolean;\n /**\n * Defines how the monaco editor files will be loaded.\n * Note that using `'local'` requires [some additional configuration](https://github.com/suren-atoyan/monaco-react#use-monaco-editor-as-an-npm-package).\n *\n * @default 'local'\n */\n monacoLoader?: 'cdn' | 'local';\n /**\n * Options to pass to the monaco editor.\n * Currently only supporting [`tabSize`](https://microsoft.github.io/monaco-editor/typedoc/interfaces/editor.IStandaloneEditorConstructionOptions.html#tabSize).\n *\n */\n options?: Pick<monacoEditor.IStandaloneEditorConstructionOptions, 'tabSize'>;\n}\n\nconst defaultProps: Partial<CodeEditorProps> = {\n language: 'plaintext',\n monacoLoader: 'local',\n defaultValue: '',\n minHeight: 300,\n};\n\nexport const CodeEditor: FunctionComponent<CodeEditorProps> = (props) => {\n const {\n language,\n defaultValue,\n onChange,\n onCopy,\n onSearch,\n onFocus,\n value,\n label,\n required,\n labelProps,\n error,\n errorProps,\n description,\n descriptionProps,\n minHeight,\n maxHeight,\n disabled,\n monacoLoader,\n options: {tabSize} = {tabSize: 2},\n editorHandle,\n ...others\n } = useProps('CodeEditor', defaultProps, props);\n const [loaded, setLoaded] = useState(false);\n const [_value, handleChange] = useUncontrolled<string>({\n value,\n defaultValue,\n onChange,\n finalValue: '',\n });\n const [parentHeight, ref] = useParentHeight();\n const editorRef = useRef(null);\n\n const loadLocalMonaco = async () => {\n const monacoInstance = await import('monaco-editor');\n loader.config({monaco: monacoInstance});\n setLoaded(true);\n };\n\n const registerLanguages = (monaco: Monaco) => {\n if (monaco && language === 'xml') {\n XML.register(monaco);\n }\n };\n\n const registerThemes = (monaco: Monaco) => {\n monaco.editor.defineTheme('light', {\n base: 'vs',\n inherit: true,\n rules: [],\n colors: {\n 'editor.background': theme.colors.gray[0],\n },\n });\n };\n\n const handleSearch = () => {\n if (editorRef.current) {\n editorRef.current.focus();\n editorRef.current.trigger('editor', 'actions.find', '');\n onSearch?.();\n }\n };\n\n const [hasMonacoError, setHasMonacoError] = useState(false);\n const hasMonacoErrorRef = useRef(false);\n\n hasMonacoErrorRef.current = hasMonacoError;\n\n const hasError = !!error || hasMonacoError;\n const theme = useMantineTheme();\n const {colorScheme} = useMantineColorScheme();\n\n useEffect(() => {\n if (monacoLoader === 'local') {\n loadLocalMonaco();\n } else {\n setLoaded(true);\n }\n }, []);\n\n const handleValidate = (markers: monacoEditor.IMarker[]) => {\n setHasMonacoError(markers.some((marker) => marker.severity === MarkerSeverity.Error));\n };\n\n const _label = label ? (\n <Input.Label required={required} {...labelProps}>\n {label}\n </Input.Label>\n ) : null;\n\n const _description = description ? (\n <Input.Description {...descriptionProps}>{description}</Input.Description>\n ) : null;\n\n const _error = error ? <Input.Error {...errorProps}>{error}</Input.Error> : <Space h=\"sm\" />;\n\n const _header =\n _label || _description ? (\n <Stack gap=\"xxs\">\n {_label}\n {_description}\n </Stack>\n ) : null;\n\n const _buttons = (\n <Group justify=\"right\" gap=\"xs\">\n <Search handleSearch={handleSearch} />\n <CopyToClipboard value={_value} onCopy={() => onCopy?.()} />\n </Group>\n );\n let editorTheme = colorScheme === 'light' ? 'light' : 'vs-dark';\n if (disabled) {\n editorTheme += '-disabled';\n }\n\n const _editor = loaded ? (\n <Box\n p=\"md\"\n pl=\"xs\"\n className={cx(\n CodeEditorClasses.root,\n {[CodeEditorClasses.error]: hasError},\n {[CodeEditorClasses.disabled]: disabled},\n )}\n data-testid=\"editor-wrapper\"\n >\n <Editor\n onValidate={handleValidate}\n defaultLanguage={language}\n theme={editorTheme}\n options={{\n minimap: {enabled: false},\n wordWrap: 'on',\n scrollBeyondLastLine: false,\n formatOnPaste: true,\n fontSize: px(theme.fontSizes.xs) as number,\n readOnly: disabled,\n stickyScroll: {enabled: false},\n tabSize,\n }}\n value={_value}\n onChange={handleChange}\n beforeMount={(monaco) => {\n registerLanguages(monaco);\n registerThemes(monaco);\n }}\n onMount={(editor) => {\n editorRef.current = editor;\n if (editorHandle) {\n editorHandle.current = editor;\n }\n editor.onDidFocusEditorText(() => onFocus?.());\n editor.onDidBlurEditorText(async () => {\n // monaco editor has a timeout of 500ms populating errors, we want to ensure that checking errors happen after that\n setTimeout(async () => {\n if (!hasMonacoErrorRef.current) {\n await editor?.getAction('editor.action.formatDocument')?.run();\n }\n }, 550);\n });\n }}\n />\n </Box>\n ) : (\n <Center className={CodeEditorClasses.editor}>\n <Loader />\n </Center>\n );\n\n return (\n <Stack\n justify=\"flex-start\"\n gap=\"sm\"\n h={Math.max(parentHeight, minHeight)}\n mah={maxHeight}\n ref={ref}\n {...others}\n >\n <Group justify=\"space-between\">\n {_header}\n {_buttons}\n </Group>\n {_editor}\n {_error}\n </Stack>\n );\n};\n\nCodeEditor.displayName = 'CodeEditor';\n"],"names":["Box","Center","Group","Input","Loader","Space","Stack","px","useMantineColorScheme","useMantineTheme","useProps","useUncontrolled","Editor","loader","MarkerSeverity","useEffect","useRef","useState","cx","useParentHeight","CopyToClipboard","CodeEditorClasses","XML","Search","defaultProps","language","monacoLoader","defaultValue","minHeight","CodeEditor","props","onChange","onCopy","onSearch","onFocus","value","label","required","labelProps","error","errorProps","description","descriptionProps","maxHeight","disabled","options","tabSize","editorHandle","others","loaded","setLoaded","_value","handleChange","finalValue","parentHeight","ref","editorRef","loadLocalMonaco","monacoInstance","config","monaco","registerLanguages","register","registerThemes","editor","defineTheme","base","inherit","rules","colors","theme","gray","handleSearch","current","focus","trigger","hasMonacoError","setHasMonacoError","hasMonacoErrorRef","hasError","colorScheme","handleValidate","markers","some","marker","severity","Error","_label","Label","_description","Description","_error","h","_header","gap","_buttons","justify","editorTheme","_editor","p","pl","className","root","data-testid","onValidate","defaultLanguage","minimap","enabled","wordWrap","scrollBeyondLastLine","formatOnPaste","fontSize","fontSizes","xs","readOnly","stickyScroll","beforeMount","onMount","onDidFocusEditorText","onDidBlurEditorText","setTimeout","getAction","run","Math","max","mah","displayName"],"mappings":";AAAA,SACIA,GAAG,EACHC,MAAM,EACNC,KAAK,EACLC,KAAK,EAELC,MAAM,EACNC,KAAK,EACLC,KAAK,EAELC,EAAE,EACFC,qBAAqB,EACrBC,eAAe,EACfC,QAAQ,QACL,gBAAgB;AACvB,SAAQC,eAAe,QAAO,iBAAiB;AAC/C,OAAOC,UAAiBC,MAAM,QAAO,uBAAuB;AAC5D,SAAQC,cAAc,QAA+B,gBAAgB;AACrE,SAA2BC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAO,QAAQ;AAErE,OAAOC,QAAQ,OAAO;AACtB,SAAQC,eAAe,QAAO,iCAAiC;AAC/D,SAAQC,eAAe,QAAO,wCAAwC;AACtE,OAAOC,uBAAuB,0BAA0B;AACxD,SAAQC,GAAG,QAAO,qBAAqB;AACvC,SAAQC,MAAM,QAAO,qBAAqB;AAyD1C,MAAMC,eAAyC;IAC3CC,UAAU;IACVC,cAAc;IACdC,cAAc;IACdC,WAAW;AACf;AAEA,OAAO,MAAMC,aAAiD,CAACC;IAC3D,MAAM,EACFL,QAAQ,EACRE,YAAY,EACZI,QAAQ,EACRC,MAAM,EACNC,QAAQ,EACRC,OAAO,EACPC,KAAK,EACLC,KAAK,EACLC,QAAQ,EACRC,UAAU,EACVC,KAAK,EACLC,UAAU,EACVC,WAAW,EACXC,gBAAgB,EAChBd,SAAS,EACTe,SAAS,EACTC,QAAQ,EACRlB,YAAY,EACZmB,SAAS,EAACC,OAAO,EAAC,GAAG;QAACA,SAAS;IAAC,CAAC,EACjCC,YAAY,EACZ,GAAGC,QACN,GAAGtC,SAAS,cAAcc,cAAcM;I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