@coveord/plasma-mantine 52.17.1 → 52.17.3

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.
@@ -1 +1 @@
1
- {"version":3,"file":"CodeEditor.d.ts","sourceRoot":"","sources":["../../../../src/components/code-editor/CodeEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIH,YAAY,EAGZ,qBAAqB,EAGrB,SAAS,EAIZ,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAC,iBAAiB,EAA8B,MAAM,OAAO,CAAC;AAOrE,QAAA,MAAM,SAAS;;;;;;;CAQZ,CAAC;AAEJ,UAAU,eACN,SAAQ,IAAI,CAAC,qBAAqB,EAAE,gBAAgB,GAAG,mBAAmB,CAAC,EACvE,YAAY,CAAC,SAAS,CAAC,OAAO,SAAS,CAAC,CAAC;IAC7C;;;;OAIG;IACH,QAAQ,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,UAAU,GAAG,QAAQ,GAAG,KAAK,CAAC;IAChE,2CAA2C;IAC3C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iCAAiC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0CAA0C;IAC1C,QAAQ,CAAC,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,kDAAkD;IAClD,QAAQ,CAAC,IAAI,IAAI,CAAC;IAClB,+CAA+C;IAC/C,MAAM,CAAC,IAAI,IAAI,CAAC;IAChB,qDAAqD;IACrD,OAAO,CAAC,IAAI,IAAI,CAAC;IACjB;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,KAAK,GAAG,OAAO,CAAC;CAClC;AASD,eAAO,MAAM,UAAU,EAAE,iBAAiB,CAAC,eAAe,CA8IzD,CAAC"}
1
+ {"version":3,"file":"CodeEditor.d.ts","sourceRoot":"","sources":["../../../../src/components/code-editor/CodeEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIH,YAAY,EAGZ,qBAAqB,EAGrB,SAAS,EAIZ,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAC,iBAAiB,EAA8B,MAAM,OAAO,CAAC;AAOrE,QAAA,MAAM,SAAS;;;;;;;CAQZ,CAAC;AAEJ,UAAU,eACN,SAAQ,IAAI,CAAC,qBAAqB,EAAE,gBAAgB,GAAG,mBAAmB,CAAC,EACvE,YAAY,CAAC,SAAS,CAAC,OAAO,SAAS,CAAC,CAAC;IAC7C;;;;OAIG;IACH,QAAQ,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,UAAU,GAAG,QAAQ,GAAG,KAAK,CAAC;IAChE,2CAA2C;IAC3C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iCAAiC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0CAA0C;IAC1C,QAAQ,CAAC,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,kDAAkD;IAClD,QAAQ,CAAC,IAAI,IAAI,CAAC;IAClB,+CAA+C;IAC/C,MAAM,CAAC,IAAI,IAAI,CAAC;IAChB,qDAAqD;IACrD,OAAO,CAAC,IAAI,IAAI,CAAC;IACjB;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,KAAK,GAAG,OAAO,CAAC;CAClC;AASD,eAAO,MAAM,UAAU,EAAE,iBAAiB,CAAC,eAAe,CA6IzD,CAAC"}
@@ -169,7 +169,6 @@ var CodeEditor = function(props) {
169
169
  enabled: false
170
170
  },
171
171
  wordWrap: "on",
172
- wrappingStrategy: "advanced",
173
172
  scrollBeyondLastLine: false,
174
173
  formatOnPaste: true,
175
174
  fontSize: (0, _core.px)(theme.fontSizes.xs),
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/code-editor/CodeEditor.tsx"],"sourcesContent":["import {\n Box,\n Center,\n createStyles,\n DefaultProps,\n Group,\n Input,\n InputWrapperBaseProps,\n Loader,\n px,\n Selectors,\n Space,\n Stack,\n useComponentDefaultProps,\n} from '@mantine/core';\nimport {useUncontrolled} from '@mantine/hooks';\nimport Editor, {loader, Monaco} from '@monaco-editor/react';\nimport {FunctionComponent, useEffect, useState, useRef} from 'react';\n\nimport {useParentHeight} from '../../hooks';\nimport {XML} from './languages/xml';\nimport {CopyToClipboard} from '../copyToClipboard';\nimport {Search} from './search';\n\nconst useStyles = createStyles((theme) => ({\n root: {},\n editor: {\n border: `1px solid ${theme.colors.gray[2]}`,\n borderRadius: theme.defaultRadius,\n backgroundColor: theme.colorScheme === 'light' ? theme.white : theme.black,\n height: '100%',\n },\n}));\n\ninterface CodeEditorProps\n extends Omit<InputWrapperBaseProps, 'inputContainer' | 'inputWrapperOrder'>,\n DefaultProps<Selectors<typeof useStyles>> {\n /**\n * The language syntax of the editor\n *\n * @default 'plaintext'\n */\n language?: 'plaintext' | 'json' | 'markdown' | 'python' | 'xml';\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 /**\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\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 ...others\n } = useComponentDefaultProps('CodeEditor', defaultProps, props);\n const [loaded, setLoaded] = useState(false);\n const {classes, theme} = useStyles();\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 handleSearch = () => {\n if (editorRef.current) {\n editorRef.current.focus();\n editorRef.current.trigger('editor', 'actions.find', '');\n onSearch?.();\n }\n };\n\n useEffect(() => {\n if (monacoLoader === 'local') {\n loadLocalMonaco();\n } else {\n setLoaded(true);\n }\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 ? (\n <Input.Error mt=\"xs\" {...errorProps}>\n {error}\n </Input.Error>\n ) : (\n <Space h=\"xs\" />\n );\n\n const _header =\n _label || _description ? (\n <Box>\n {_label}\n {_description}\n </Box>\n ) : null;\n\n const _buttons = (\n <Group position=\"right\" spacing={0}>\n <Search handleSearch={handleSearch} />\n <CopyToClipboard value={_value} onCopy={() => onCopy?.()} />\n </Group>\n );\n\n const _editor = loaded ? (\n <Box p=\"md\" pl=\"xs\" className={classes.editor}>\n <Editor\n defaultLanguage={language}\n theme={theme.colorScheme === 'light' ? 'light' : 'vs-dark'}\n options={{\n minimap: {enabled: false},\n wordWrap: 'on',\n wrappingStrategy: 'advanced',\n scrollBeyondLastLine: false,\n formatOnPaste: true,\n fontSize: px(theme.fontSizes.xs),\n readOnly: disabled,\n tabSize: 2,\n }}\n value={_value}\n onChange={handleChange}\n onMount={(editor, monaco) => {\n editorRef.current = editor;\n registerLanguages(monaco);\n editor.onDidFocusEditorText(() => onFocus?.());\n editor.onDidBlurEditorText(async () => {\n await editor.getAction('editor.action.formatDocument').run();\n });\n }}\n />\n </Box>\n ) : (\n <Center className={classes.editor}>\n <Loader />\n </Center>\n );\n\n return (\n <Stack\n justify=\"flex-start\"\n className={classes.root}\n spacing={0}\n sx={{height: Math.max(parentHeight, minHeight), maxHeight}}\n ref={ref}\n {...others}\n >\n {_header}\n {_buttons}\n {_editor}\n {_error}\n </Stack>\n );\n};\n"],"names":["CodeEditor","useStyles","createStyles","theme","root","editor","border","colors","gray","borderRadius","defaultRadius","backgroundColor","colorScheme","white","black","height","defaultProps","language","monacoLoader","defaultValue","minHeight","props","useComponentDefaultProps","onChange","onCopy","onSearch","onFocus","value","label","required","labelProps","error","errorProps","description","descriptionProps","maxHeight","disabled","others","useState","loaded","setLoaded","classes","useUncontrolled","finalValue","_value","handleChange","useParentHeight","parentHeight","ref","editorRef","useRef","loadLocalMonaco","monacoInstance","loader","config","monaco","registerLanguages","XML","register","handleSearch","current","focus","trigger","useEffect","_label","Input","Label","_description","Description","_error","Error","mt","Space","h","_header","Box","_buttons","Group","position","spacing","Search","CopyToClipboard","_editor","p","pl","className","Editor","defaultLanguage","options","minimap","enabled","wordWrap","wrappingStrategy","scrollBeyondLastLine","formatOnPaste","fontSize","px","fontSizes","xs","readOnly","tabSize","onMount","onDidFocusEditorText","onDidBlurEditorText","getAction","run","Center","Loader","Stack","justify","sx","Math","max"],"mappings":";;;;+BAwFaA;;;eAAAA;;;;;;;;;;;oBA1EN;qBACuB;+DACO;sBACwB;sBAE/B;mBACZ;+BACY;sBACT;AAErB,IAAMC,YAAYC,IAAAA,kBAAY,EAAC,SAACC;WAAW;QACvCC,MAAM,CAAC;QACPC,QAAQ;YACJC,QAAQ,AAAC,aAAiC,OAArBH,MAAMI,MAAM,CAACC,IAAI,CAAC,EAAE;YACzCC,cAAcN,MAAMO,aAAa;YACjCC,iBAAiBR,MAAMS,WAAW,KAAK,UAAUT,MAAMU,KAAK,GAAGV,MAAMW,KAAK;YAC1EC,QAAQ;QACZ;IACJ;;AAiDA,IAAMC,eAAyC;IAC3CC,UAAU;IACVC,cAAc;IACdC,cAAc;IACdC,WAAW;AACf;AAEO,IAAMpB,aAAiD,SAACqB;IAC3D,IAoBIC,4BAAAA,IAAAA,8BAAwB,EAAC,cAAcN,cAAcK,QAnBrDJ,WAmBAK,0BAnBAL,UACAE,eAkBAG,0BAlBAH,cACAI,WAiBAD,0BAjBAC,UACAC,SAgBAF,0BAhBAE,QACAC,WAeAH,0BAfAG,UACAC,UAcAJ,0BAdAI,SACAC,QAaAL,0BAbAK,OACAC,QAYAN,0BAZAM,OACAC,WAWAP,0BAXAO,UACAC,aAUAR,0BAVAQ,YACAC,QASAT,0BATAS,OACAC,aAQAV,0BARAU,YACAC,cAOAX,0BAPAW,aACAC,mBAMAZ,0BANAY,kBACAd,YAKAE,0BALAF,WACAe,YAIAb,0BAJAa,WACAC,WAGAd,0BAHAc,UACAlB,eAEAI,0BAFAJ,cACGmB,sCACHf;QAnBAL;QACAE;QACAI;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAd;QACAe;QACAC;QACAlB;;IAGJ,IAA4BoB,+BAAAA,IAAAA,gBAAQ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AA;QAAS;QACzDa,KAAKA;OACDX;;YAEHqC;YACAE;YACAM;YACAb;;;AAGb"}
1
+ {"version":3,"sources":["../../../../src/components/code-editor/CodeEditor.tsx"],"sourcesContent":["import {\n Box,\n Center,\n createStyles,\n DefaultProps,\n Group,\n Input,\n InputWrapperBaseProps,\n Loader,\n px,\n Selectors,\n Space,\n Stack,\n useComponentDefaultProps,\n} from '@mantine/core';\nimport {useUncontrolled} from '@mantine/hooks';\nimport Editor, {loader, Monaco} from '@monaco-editor/react';\nimport {FunctionComponent, useEffect, useState, useRef} from 'react';\n\nimport {useParentHeight} from '../../hooks';\nimport {XML} from './languages/xml';\nimport {CopyToClipboard} from '../copyToClipboard';\nimport {Search} from './search';\n\nconst useStyles = createStyles((theme) => ({\n root: {},\n editor: {\n border: `1px solid ${theme.colors.gray[2]}`,\n borderRadius: theme.defaultRadius,\n backgroundColor: theme.colorScheme === 'light' ? theme.white : theme.black,\n height: '100%',\n },\n}));\n\ninterface CodeEditorProps\n extends Omit<InputWrapperBaseProps, 'inputContainer' | 'inputWrapperOrder'>,\n DefaultProps<Selectors<typeof useStyles>> {\n /**\n * The language syntax of the editor\n *\n * @default 'plaintext'\n */\n language?: 'plaintext' | 'json' | 'markdown' | 'python' | 'xml';\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 /**\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\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 ...others\n } = useComponentDefaultProps('CodeEditor', defaultProps, props);\n const [loaded, setLoaded] = useState(false);\n const {classes, theme} = useStyles();\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 handleSearch = () => {\n if (editorRef.current) {\n editorRef.current.focus();\n editorRef.current.trigger('editor', 'actions.find', '');\n onSearch?.();\n }\n };\n\n useEffect(() => {\n if (monacoLoader === 'local') {\n loadLocalMonaco();\n } else {\n setLoaded(true);\n }\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 ? (\n <Input.Error mt=\"xs\" {...errorProps}>\n {error}\n </Input.Error>\n ) : (\n <Space h=\"xs\" />\n );\n\n const _header =\n _label || _description ? (\n <Box>\n {_label}\n {_description}\n </Box>\n ) : null;\n\n const _buttons = (\n <Group position=\"right\" spacing={0}>\n <Search handleSearch={handleSearch} />\n <CopyToClipboard value={_value} onCopy={() => onCopy?.()} />\n </Group>\n );\n\n const _editor = loaded ? (\n <Box p=\"md\" pl=\"xs\" className={classes.editor}>\n <Editor\n defaultLanguage={language}\n theme={theme.colorScheme === 'light' ? 'light' : 'vs-dark'}\n options={{\n minimap: {enabled: false},\n wordWrap: 'on',\n scrollBeyondLastLine: false,\n formatOnPaste: true,\n fontSize: px(theme.fontSizes.xs),\n readOnly: disabled,\n tabSize: 2,\n }}\n value={_value}\n onChange={handleChange}\n onMount={(editor, monaco) => {\n editorRef.current = editor;\n registerLanguages(monaco);\n editor.onDidFocusEditorText(() => onFocus?.());\n editor.onDidBlurEditorText(async () => {\n await editor.getAction('editor.action.formatDocument').run();\n });\n }}\n />\n </Box>\n ) : (\n <Center className={classes.editor}>\n <Loader />\n </Center>\n );\n\n return (\n <Stack\n justify=\"flex-start\"\n className={classes.root}\n spacing={0}\n sx={{height: Math.max(parentHeight, minHeight), maxHeight}}\n ref={ref}\n {...others}\n >\n {_header}\n {_buttons}\n {_editor}\n {_error}\n </Stack>\n );\n};\n"],"names":["CodeEditor","useStyles","createStyles","theme","root","editor","border","colors","gray","borderRadius","defaultRadius","backgroundColor","colorScheme","white","black","height","defaultProps","language","monacoLoader","defaultValue","minHeight","props","useComponentDefaultProps","onChange","onCopy","onSearch","onFocus","value","label","required","labelProps","error","errorProps","description","descriptionProps","maxHeight","disabled","others","useState","loaded","setLoaded","classes","useUncontrolled","finalValue","_value","handleChange","useParentHeight","parentHeight","ref","editorRef","useRef","loadLocalMonaco","monacoInstance","loader","config","monaco","registerLanguages","XML","register","handleSearch","current","focus","trigger","useEffect","_label","Input","Label","_description","Description","_error","Error","mt","Space","h","_header","Box","_buttons","Group","position","spacing","Search","CopyToClipboard","_editor","p","pl","className","Editor","defaultLanguage","options","minimap","enabled","wordWrap","scrollBeyondLastLine","formatOnPaste","fontSize","px","fontSizes","xs","readOnly","tabSize","onMount","onDidFocusEditorText","onDidBlurEditorText","getAction","run","Center","Loader","Stack","justify","sx","Math","max"],"mappings":";;;;+BAwFaA;;;eAAAA;;;;;;;;;;;oBA1EN;qBACuB;+DACO;sBACwB;sBAE/B;mBACZ;+BACY;sBACT;AAErB,IAAMC,YAAYC,IAAAA,kBAAY,EAAC,SAACC;WAAW;QACvCC,MAAM,CAAC;QACPC,QAAQ;YACJC,QAAQ,AAAC,aAAiC,OAArBH,MAAMI,MAAM,CAACC,IAAI,CAAC,EAAE;YACzCC,cAAcN,MAAMO,aAAa;YACjCC,iBAAiBR,MAAMS,WAAW,KAAK,UAAUT,MAAMU,KAAK,GAAGV,MAAMW,KAAK;YAC1EC,QAAQ;QACZ;IACJ;;AAiDA,IAAMC,eAAyC;IAC3CC,UAAU;IACVC,cAAc;IACdC,cAAc;IACdC,WAAW;AACf;AAEO,IAAMpB,aAAiD,SAACqB;IAC3D,IAoBIC,4BAAAA,IAAAA,8BAAwB,EAAC,cAAcN,cAAcK,QAnBrDJ,WAmBAK,0BAnBAL,UACAE,eAkBAG,0BAlBAH,cACAI,WAiBAD,0BAjBAC,UACAC,SAgBAF,0BAhBAE,QACAC,WAeAH,0BAfAG,UACAC,UAcAJ,0BAdAI,SACAC,QAaAL,0BAbAK,OACAC,QAYAN,0BAZAM,OACAC,WAWAP,0BAXAO,UACAC,aAUAR,0BAVAQ,YACAC,QASAT,0BATAS,OACAC,aAQAV,0BARAU,YACAC,cAOAX,0BAPAW,aACAC,mBAMAZ,0BANAY,kBACAd,YAKAE,0BALAF,WACAe,YAIAb,0BAJAa,WACAC,WAGAd,0BAHAc,UACAlB,eAEAI,0BAFAJ,cACGmB,sCACHf;QAnBAL;QACAE;QACAI;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAd;QACAe;QACAC;QACAlB;;IAGJ,IAA4BoB,+BAAAA,IAAAA,gBAAQ,EAAC,YAA9BC,SAAqBD,cAAbE,YAAaF;IAC5B,IAAyBr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
@@ -1 +1 @@
1
- {"version":3,"file":"StickyFooter.d.ts","sourceRoot":"","sources":["../../../../src/components/sticky-footer/StickyFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGH,YAAY,EAGZ,aAAa,EACb,iBAAiB,EACjB,SAAS,EAEZ,MAAM,eAAe,CAAC;AACvB,OAAO,EAAa,SAAS,EAAC,MAAM,OAAO,CAAC;AAE5C,MAAM,WAAW,iBAAkB,SAAQ,YAAY,CAAC,SAAS,CAAC,OAAO,SAAS,CAAC,CAAC;IAChF;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB;;;;OAIG;IACH,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACxB;AAED,QAAA,MAAM,SAAS;;;;;;;;CAUZ,CAAC;AAOJ,eAAO,MAAM,YAAY,8GAavB,CAAC"}
1
+ {"version":3,"file":"StickyFooter.d.ts","sourceRoot":"","sources":["../../../../src/components/sticky-footer/StickyFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGH,YAAY,EAGZ,aAAa,EACb,iBAAiB,EACjB,SAAS,EAEZ,MAAM,eAAe,CAAC;AACvB,OAAO,EAAa,SAAS,EAAC,MAAM,OAAO,CAAC;AAE5C,MAAM,WAAW,iBAAkB,SAAQ,YAAY,CAAC,SAAS,CAAC,OAAO,SAAS,CAAC,CAAC;IAChF;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB;;;;OAIG;IACH,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACxB;AAED,QAAA,MAAM,SAAS;;;;;;;;CAWZ,CAAC;AAOJ,eAAO,MAAM,YAAY,8GAavB,CAAC"}
@@ -16,12 +16,13 @@ var _core = require("@mantine/core");
16
16
  var _react = require("react");
17
17
  var useStyles = (0, _core.createStyles)(function(theme) {
18
18
  return {
19
- root: {},
20
- footer: {
19
+ root: {
21
20
  position: "sticky",
22
21
  bottom: 0,
23
22
  zIndex: 10,
24
- backgroundColor: "white",
23
+ backgroundColor: "white"
24
+ },
25
+ footer: {
25
26
  padding: theme.spacing.lg
26
27
  },
27
28
  divider: {}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/sticky-footer/StickyFooter.tsx"],"sourcesContent":["import {\n Box,\n createStyles,\n DefaultProps,\n Divider,\n Group,\n GroupPosition,\n MantineNumberSize,\n Selectors,\n useComponentDefaultProps,\n} from '@mantine/core';\nimport {forwardRef, ReactNode} from 'react';\n\nexport interface StickyFooterProps extends DefaultProps<Selectors<typeof useStyles>> {\n /**\n * Whether a border is render on top of the footer\n */\n borderTop?: boolean;\n /**\n * Position of the children within the footer\n *\n * @default 'right'\n */\n position?: GroupPosition;\n /**\n * Defines the spacing between footer children\n *\n * @default 'sm'\n */\n spacing?: MantineNumberSize;\n /**\n * Footer's children, usually buttons\n */\n children?: ReactNode;\n}\n\nconst useStyles = createStyles((theme) => ({\n root: {},\n footer: {\n position: 'sticky',\n bottom: 0,\n zIndex: 10,\n backgroundColor: 'white',\n padding: theme.spacing.lg,\n },\n divider: {},\n}));\n\nconst defaultProps: Partial<StickyFooterProps> = {\n spacing: 'sm',\n position: 'right',\n};\n\nexport const StickyFooter = forwardRef<HTMLDivElement, StickyFooterProps>((props, ref) => {\n const {borderTop, spacing, position, children, className, classNames, styles, unstyled, ...others} =\n useComponentDefaultProps('StickyFooter', defaultProps, props);\n const {classes, cx} = useStyles(null, {name: 'StickyFooter', classNames, styles, unstyled});\n\n return (\n <Box ref={ref} className={cx(classes.root, className)}>\n {borderTop ? <Divider size=\"xs\" className={classes.divider} /> : null}\n <Group position={position} spacing={spacing} className={classes.footer} {...others}>\n {children}\n </Group>\n </Box>\n );\n});\n"],"names":["StickyFooter","useStyles","createStyles","theme","root","footer","position","bottom","zIndex","backgroundColor","padding","spacing","lg","divider","defaultProps","forwardRef","props","ref","useComponentDefaultProps","borderTop","children","className","classNames","styles","unstyled","others","name","classes","cx","Box","Divider","size","Group"],"mappings":";;;;+BAqDaA;;;eAAAA;;;;;;;oBA3CN;qBAC6B;AAyBpC,IAAMC,YAAYC,IAAAA,kBAAY,EAAC,SAACC;WAAW;QACvCC,MAAM,CAAC;QACPC,QAAQ;YACJC,UAAU;YACVC,QAAQ;YACRC,QAAQ;YACRC,iBAAiB;YACjBC,SAASP,MAAMQ,OAAO,CAACC,EAAE;QAC7B;QACAC,SAAS,CAAC;IACd;;AAEA,IAAMC,eAA2C;IAC7CH,SAAS;IACTL,UAAU;AACd;AAEO,IAAMN,6BAAee,IAAAA,iBAAU,EAAoC,SAACC,OAAOC;IAC9E,IACIC,4BAAAA,IAAAA,8BAAwB,EAAC,gBAAgBJ,cAAcE,QADpDG,YACHD,0BADGC,WAAWR,UACdO,0BADcP,SAASL,WACvBY,0BADuBZ,UAAUc,WACjCF,0BADiCE,UAAUC,YAC3CH,0BAD2CG,WAAWC,aACtDJ,0BADsDI,YAAYC,SAClEL,0BADkEK,QAAQC,WAC1EN,0BAD0EM,UAAaC,sCACvFP;QADGC;QAAWR;QAASL;QAAUc;QAAUC;QAAWC;QAAYC;QAAQC;;IAE9E,IAAsBvB,aAAAA,UAAU,MAAM;QAACyB,MAAM;QAAgBJ,YAAAA;QAAYC,QAAAA;QAAQC,UAAAA;IAAQ,IAAlFG,UAAe1B,WAAf0B,SAASC,KAAM3B,WAAN2B;IAEhB,qBACI,sBAACC,SAAG;QAACZ,KAAKA;QAAKI,WAAWO,GAAGD,QAAQvB,IAAI,EAAEiB;;YACtCF,0BAAY,qBAACW,aAAO;gBAACC,MAAK;gBAAKV,WAAWM,QAAQd,OAAO;iBAAO;0BACjE,qBAACmB,WAAK;gBAAC1B,UAAUA;gBAAUK,SAASA;gBAASU,WAAWM,QAAQtB,MAAM;eAAMoB;0BACvEL;;;;AAIjB"}
1
+ {"version":3,"sources":["../../../../src/components/sticky-footer/StickyFooter.tsx"],"sourcesContent":["import {\n Box,\n createStyles,\n DefaultProps,\n Divider,\n Group,\n GroupPosition,\n MantineNumberSize,\n Selectors,\n useComponentDefaultProps,\n} from '@mantine/core';\nimport {forwardRef, ReactNode} from 'react';\n\nexport interface StickyFooterProps extends DefaultProps<Selectors<typeof useStyles>> {\n /**\n * Whether a border is render on top of the footer\n */\n borderTop?: boolean;\n /**\n * Position of the children within the footer\n *\n * @default 'right'\n */\n position?: GroupPosition;\n /**\n * Defines the spacing between footer children\n *\n * @default 'sm'\n */\n spacing?: MantineNumberSize;\n /**\n * Footer's children, usually buttons\n */\n children?: ReactNode;\n}\n\nconst useStyles = createStyles((theme) => ({\n root: {\n position: 'sticky',\n bottom: 0,\n zIndex: 10,\n backgroundColor: 'white',\n },\n footer: {\n padding: theme.spacing.lg,\n },\n divider: {},\n}));\n\nconst defaultProps: Partial<StickyFooterProps> = {\n spacing: 'sm',\n position: 'right',\n};\n\nexport const StickyFooter = forwardRef<HTMLDivElement, StickyFooterProps>((props, ref) => {\n const {borderTop, spacing, position, children, className, classNames, styles, unstyled, ...others} =\n useComponentDefaultProps('StickyFooter', defaultProps, props);\n const {classes, cx} = useStyles(null, {name: 'StickyFooter', classNames, styles, unstyled});\n\n return (\n <Box ref={ref} className={cx(classes.root, className)}>\n {borderTop ? <Divider size=\"xs\" className={classes.divider} /> : null}\n <Group position={position} spacing={spacing} className={classes.footer} {...others}>\n {children}\n </Group>\n </Box>\n );\n});\n"],"names":["StickyFooter","useStyles","createStyles","theme","root","position","bottom","zIndex","backgroundColor","footer","padding","spacing","lg","divider","defaultProps","forwardRef","props","ref","useComponentDefaultProps","borderTop","children","className","classNames","styles","unstyled","others","name","classes","cx","Box","Divider","size","Group"],"mappings":";;;;+BAsDaA;;;eAAAA;;;;;;;oBA5CN;qBAC6B;AAyBpC,IAAMC,YAAYC,IAAAA,kBAAY,EAAC,SAACC;WAAW;QACvCC,MAAM;YACFC,UAAU;YACVC,QAAQ;YACRC,QAAQ;YACRC,iBAAiB;QACrB;QACAC,QAAQ;YACJC,SAASP,MAAMQ,OAAO,CAACC,EAAE;QAC7B;QACAC,SAAS,CAAC;IACd;;AAEA,IAAMC,eAA2C;IAC7CH,SAAS;IACTN,UAAU;AACd;AAEO,IAAML,6BAAee,IAAAA,iBAAU,EAAoC,SAACC,OAAOC;IAC9E,IACIC,4BAAAA,IAAAA,8BAAwB,EAAC,gBAAgBJ,cAAcE,QADpDG,YACHD,0BADGC,WAAWR,UACdO,0BADcP,SAASN,WACvBa,0BADuBb,UAAUe,WACjCF,0BADiCE,UAAUC,YAC3CH,0BAD2CG,WAAWC,aACtDJ,0BADsDI,YAAYC,SAClEL,0BADkEK,QAAQC,WAC1EN,0BAD0EM,UAAaC,sCACvFP;QADGC;QAAWR;QAASN;QAAUe;QAAUC;QAAWC;QAAYC;QAAQC;;IAE9E,IAAsBvB,aAAAA,UAAU,MAAM;QAACyB,MAAM;QAAgBJ,YAAAA;QAAYC,QAAAA;QAAQC,UAAAA;IAAQ,IAAlFG,UAAe1B,WAAf0B,SAASC,KAAM3B,WAAN2B;IAEhB,qBACI,sBAACC,SAAG;QAACZ,KAAKA;QAAKI,WAAWO,GAAGD,QAAQvB,IAAI,EAAEiB;;YACtCF,0BAAY,qBAACW,aAAO;gBAACC,MAAK;gBAAKV,WAAWM,QAAQd,OAAO;iBAAO;0BACjE,qBAACmB,WAAK;gBAAC3B,UAAUA;gBAAUM,SAASA;gBAASU,WAAWM,QAAQlB,MAAM;eAAMgB;0BACvEL;;;;AAIjB"}
@@ -1 +1 @@
1
- {"version":3,"file":"CodeEditor.d.ts","sourceRoot":"","sources":["../../../../src/components/code-editor/CodeEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIH,YAAY,EAGZ,qBAAqB,EAGrB,SAAS,EAIZ,MAAM,eAAe,CAAC;AAGvB,OAAO,EA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AAC,qBAAqB,EAAE,gBAAgB,GAAG,mBAAmB,CAAC,EACvE,YAAY,CAAC,SAAS,CAAC,OAAO,SAAS,CAAC,CAAC;IAC7C;;;;OAIG;IACH,QAAQ,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,UAAU,GAAG,QAAQ,GAAG,KAAK,CAAC;IAChE,2CAA2C;IAC3C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iCAAiC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0CAA0C;IAC1C,QAAQ,CAAC,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,kDAAkD;IAClD,QAAQ,CAAC,IAAI,IAAI,CAAC;IAClB,+CAA+C;IAC/C,MAAM,CAAC,IAAI,IAAI,CAAC;IAChB,qDAAqD;IACrD,OAAO,CAAC,IAAI,IAAI,CAAC;IACjB;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,KAAK,GAAG,OAAO,CAAC;CAClC;AASD,eAAO,MAAM,UAAU,EAAE,iBAAiB,CAAC,eAAe,CA6IzD,CAAC"}
@@ -156,7 +156,6 @@ export var CodeEditor = function(props) {
156
156
  enabled: false
157
157
  },
158
158
  wordWrap: "on",
159
- wrappingStrategy: "advanced",
160
159
  scrollBeyondLastLine: false,
161
160
  formatOnPaste: true,
162
161
  fontSize: px(theme.fontSizes.xs),
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/code-editor/CodeEditor.tsx"],"sourcesContent":["import {\n Box,\n Center,\n createStyles,\n DefaultProps,\n Group,\n Input,\n InputWrapperBaseProps,\n Loader,\n px,\n Selectors,\n Space,\n Stack,\n useComponentDefaultProps,\n} from '@mantine/core';\nimport {useUncontrolled} from '@mantine/hooks';\nimport Editor, {loader, Monaco} from '@monaco-editor/react';\nimport {FunctionComponent, useEffect, useState, useRef} from 'react';\n\nimport {useParentHeight} from '../../hooks';\nimport {XML} from './languages/xml';\nimport {CopyToClipboard} from '../copyToClipboard';\nimport {Search} from './search';\n\nconst useStyles = createStyles((theme) => ({\n root: {},\n editor: {\n border: `1px solid ${theme.colors.gray[2]}`,\n borderRadius: theme.defaultRadius,\n backgroundColor: theme.colorScheme === 'light' ? theme.white : theme.black,\n height: '100%',\n },\n}));\n\ninterface CodeEditorProps\n extends Omit<InputWrapperBaseProps, 'inputContainer' | 'inputWrapperOrder'>,\n DefaultProps<Selectors<typeof useStyles>> {\n /**\n * The language syntax of the editor\n *\n * @default 'plaintext'\n */\n language?: 'plaintext' | 'json' | 'markdown' | 'python' | 'xml';\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 /**\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\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 ...others\n } = useComponentDefaultProps('CodeEditor', defaultProps, props);\n const [loaded, setLoaded] = useState(false);\n const {classes, theme} = useStyles();\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 handleSearch = () => {\n if (editorRef.current) {\n editorRef.current.focus();\n editorRef.current.trigger('editor', 'actions.find', '');\n onSearch?.();\n }\n };\n\n useEffect(() => {\n if (monacoLoader === 'local') {\n loadLocalMonaco();\n } else {\n setLoaded(true);\n }\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 ? (\n <Input.Error mt=\"xs\" {...errorProps}>\n {error}\n </Input.Error>\n ) : (\n <Space h=\"xs\" />\n );\n\n const _header =\n _label || _description ? (\n <Box>\n {_label}\n {_description}\n </Box>\n ) : null;\n\n const _buttons = (\n <Group position=\"right\" spacing={0}>\n <Search handleSearch={handleSearch} />\n <CopyToClipboard value={_value} onCopy={() => onCopy?.()} />\n </Group>\n );\n\n const _editor = loaded ? (\n <Box p=\"md\" pl=\"xs\" className={classes.editor}>\n <Editor\n defaultLanguage={language}\n theme={theme.colorScheme === 'light' ? 'light' : 'vs-dark'}\n options={{\n minimap: {enabled: false},\n wordWrap: 'on',\n wrappingStrategy: 'advanced',\n scrollBeyondLastLine: false,\n formatOnPaste: true,\n fontSize: px(theme.fontSizes.xs),\n readOnly: disabled,\n tabSize: 2,\n }}\n value={_value}\n onChange={handleChange}\n onMount={(editor, monaco) => {\n editorRef.current = editor;\n registerLanguages(monaco);\n editor.onDidFocusEditorText(() => onFocus?.());\n editor.onDidBlurEditorText(async () => {\n await editor.getAction('editor.action.formatDocument').run();\n });\n }}\n />\n </Box>\n ) : (\n <Center className={classes.editor}>\n <Loader />\n </Center>\n );\n\n return (\n <Stack\n justify=\"flex-start\"\n className={classes.root}\n spacing={0}\n sx={{height: Math.max(parentHeight, minHeight), maxHeight}}\n ref={ref}\n {...others}\n >\n {_header}\n {_buttons}\n {_editor}\n {_error}\n </Stack>\n );\n};\n"],"names":["Box","Center","createStyles","Group","Input","Loader","px","Space","Stack","useComponentDefaultProps","useUncontrolled","Editor","loader","useEffect","useState","useRef","useParentHeight","XML","CopyToClipboard","Search","useStyles","theme","root","editor","border","colors","gray","borderRadius","defaultRadius","backgroundColor","colorScheme","white","black","height","defaultProps","language","monacoLoader","defaultValue","minHeight","CodeEditor","props","onChange","onCopy","onSearch","onFocus","value","label","required","labelProps","error","errorProps","description","descriptionProps","maxHeight","disabled","others","loaded","setLoaded","classes","finalValue","_value","handleChange","parentHeight","ref","editorRef","loadLocalMonaco","monacoInstance","config","monaco","registerLanguages","register","handleSearch","current","focus","trigger","_label","Label","_description","Description","_error","Error","mt","h","_header","_buttons","position","spacing","_editor","p","pl","className","defaultLanguage","options","minimap","enabled","wordWrap","wrappingStrategy","scrollBeyondLastLine","formatOnPaste","fontSize","fontSizes","xs","readOnly","tabSize","onMount","onDidFocusEditorText","onDidBlurEditorText","getAction","run","justify","sx","Math","max"],"mappings":";;;;;;;AAAA,SACIA,GAAG,EACHC,MAAM,EACNC,YAAY,EAEZC,KAAK,EACLC,KAAK,EAELC,MAAM,EACNC,EAAE,EAEFC,KAAK,EACLC,KAAK,EACLC,wBAAwB,QACrB,gBAAgB;AACvB,SAAQC,eAAe,QAAO,iBAAiB;AAC/C,OAAOC,UAASC,MA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/components/code-editor/CodeEditor.tsx"],"sourcesContent":["import {\n Box,\n Center,\n createStyles,\n DefaultProps,\n Group,\n Input,\n InputWrapperBaseProps,\n Loader,\n px,\n Selectors,\n Space,\n Stack,\n useComponentDefaultProps,\n} from '@mantine/core';\nimport {useUncontrolled} from '@mantine/hooks';\nimport Editor, {loader, Monaco} from '@monaco-editor/react';\nimport {FunctionComponent, useEffect, useState, useRef} from 'react';\n\nimport {useParentHeight} from '../../hooks';\nimport {XML} from './languages/xml';\nimport {CopyToClipboard} from '../copyToClipboard';\nimport {Search} from './search';\n\nconst useStyles = createStyles((theme) => ({\n root: {},\n editor: {\n border: `1px solid ${theme.colors.gray[2]}`,\n borderRadius: theme.defaultRadius,\n backgroundColor: theme.colorScheme === 'light' ? theme.white : theme.black,\n height: '100%',\n },\n}));\n\ninterface CodeEditorProps\n extends Omit<InputWrapperBaseProps, 'inputContainer' | 'inputWrapperOrder'>,\n DefaultProps<Selectors<typeof useStyles>> {\n /**\n * The language syntax of the editor\n *\n * @default 'plaintext'\n */\n language?: 'plaintext' | 'json' | 'markdown' | 'python' | 'xml';\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 /**\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\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 ...others\n } = useComponentDefaultProps('CodeEditor', defaultProps, props);\n const [loaded, setLoaded] = useState(false);\n const {classes, theme} = useStyles();\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 handleSearch = () => {\n if (editorRef.current) {\n editorRef.current.focus();\n editorRef.current.trigger('editor', 'actions.find', '');\n onSearch?.();\n }\n };\n\n useEffect(() => {\n if (monacoLoader === 'local') {\n loadLocalMonaco();\n } else {\n setLoaded(true);\n }\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 ? (\n <Input.Error mt=\"xs\" {...errorProps}>\n {error}\n </Input.Error>\n ) : (\n <Space h=\"xs\" />\n );\n\n const _header =\n _label || _description ? (\n <Box>\n {_label}\n {_description}\n </Box>\n ) : null;\n\n const _buttons = (\n <Group position=\"right\" spacing={0}>\n <Search handleSearch={handleSearch} />\n <CopyToClipboard value={_value} onCopy={() => onCopy?.()} />\n </Group>\n );\n\n const _editor = loaded ? (\n <Box p=\"md\" pl=\"xs\" className={classes.editor}>\n <Editor\n defaultLanguage={language}\n theme={theme.colorScheme === 'light' ? 'light' : 'vs-dark'}\n options={{\n minimap: {enabled: false},\n wordWrap: 'on',\n scrollBeyondLastLine: false,\n formatOnPaste: true,\n fontSize: px(theme.fontSizes.xs),\n readOnly: disabled,\n tabSize: 2,\n }}\n value={_value}\n onChange={handleChange}\n onMount={(editor, monaco) => {\n editorRef.current = editor;\n registerLanguages(monaco);\n editor.onDidFocusEditorText(() => onFocus?.());\n editor.onDidBlurEditorText(async () => {\n await editor.getAction('editor.action.formatDocument').run();\n });\n }}\n />\n </Box>\n ) : (\n <Center className={classes.editor}>\n <Loader />\n </Center>\n );\n\n return (\n <Stack\n justify=\"flex-start\"\n className={classes.root}\n spacing={0}\n sx={{height: Math.max(parentHeight, minHeight), maxHeight}}\n ref={ref}\n {...others}\n >\n {_header}\n {_buttons}\n {_editor}\n {_error}\n </Stack>\n );\n};\n"],"names":["Box","Center","createStyles","Group","Input","Loader","px","Space","Stack","useComponentDefaultProps","useUncontrolled","Editor","loader","useEffect","useState","useRef","useParentHeight","XML","CopyToClipboard","Search","useStyles","theme","root","editor","border","colors","gray","borderRadius","defaultRadius","backgroundColor","colorScheme","white","black","height","defaultProps","language","monacoLoader","defaultValue","minHeight","CodeEditor","props","onChange","onCopy","onSearch","onFocus","value","label","required","labelProps","error","errorProps","description","descriptionProps","maxHeight","disabled","others","loaded","setLoaded","classes","finalValue","_value","handleChange","parentHeight","ref","editorRef","loadLocalMonaco","monacoInstance","config","monaco","registerLanguages","register","handleSearch","current","focus","trigger","_label","Label","_description","Description","_error","Error","mt","h","_header","_buttons","position","spacing","_editor","p","pl","className","defaultLanguage","options","minimap","enabled","wordWrap","scrollBeyondLastLine","formatOnPaste","fontSize","fontSizes","xs","readOnly","tabSize","onMount","onDidFocusEditorText","onDidBlurEditorText","getAction","run","justify","sx","Math","max"],"mappings":";;;;;;;AAAA,SACIA,GAAG,EACHC,MAA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I;YAAC5E,QAAQ6E,KAAKC,GAAG,CAACjD,cAAcxB;YAAYe,WAAAA;QAAS;QACzDU,KAAKA;OACDR;;YAEH4B;YACAC;YACAG;YACAR;;;AAGb,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"file":"StickyFooter.d.ts","sourceRoot":"","sources":["../../../../src/components/sticky-footer/StickyFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGH,YAAY,EAGZ,aAAa,EACb,iBAAiB,EACjB,SAAS,EAEZ,MAAM,eAAe,CAAC;AACvB,OAAO,EAAa,SAAS,EAAC,MAAM,OAAO,CAAC;AAE5C,MAAM,WAAW,iBAAkB,SAAQ,YAAY,CAAC,SAAS,CAAC,OAAO,SAAS,CAAC,CAAC;IAChF;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB;;;;OAIG;IACH,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACxB;AAED,QAAA,MAAM,SAAS;;;;;;;;CAUZ,CAAC;AAOJ,eAAO,MAAM,YAAY,8GAavB,CAAC"}
1
+ {"version":3,"file":"StickyFooter.d.ts","sourceRoot":"","sources":["../../../../src/components/sticky-footer/StickyFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGH,YAAY,EAGZ,aAAa,EACb,iBAAiB,EACjB,SAAS,EAEZ,MAAM,eAAe,CAAC;AACvB,OAAO,EAAa,SAAS,EAAC,MAAM,OAAO,CAAC;AAE5C,MAAM,WAAW,iBAAkB,SAAQ,YAAY,CAAC,SAAS,CAAC,OAAO,SAAS,CAAC,CAAC;IAChF;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB;;;;OAIG;IACH,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACxB;AAED,QAAA,MAAM,SAAS;;;;;;;;CAWZ,CAAC;AAOJ,eAAO,MAAM,YAAY,8GAavB,CAAC"}
@@ -6,12 +6,13 @@ import { Box, createStyles, Divider, Group, useComponentDefaultProps } from "@ma
6
6
  import { forwardRef } from "react";
7
7
  var useStyles = createStyles(function(theme) {
8
8
  return {
9
- root: {},
10
- footer: {
9
+ root: {
11
10
  position: "sticky",
12
11
  bottom: 0,
13
12
  zIndex: 10,
14
- backgroundColor: "white",
13
+ backgroundColor: "white"
14
+ },
15
+ footer: {
15
16
  padding: theme.spacing.lg
16
17
  },
17
18
  divider: {}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/sticky-footer/StickyFooter.tsx"],"sourcesContent":["import {\n Box,\n createStyles,\n DefaultProps,\n Divider,\n Group,\n GroupPosition,\n MantineNumberSize,\n Selectors,\n useComponentDefaultProps,\n} from '@mantine/core';\nimport {forwardRef, ReactNode} from 'react';\n\nexport interface StickyFooterProps extends DefaultProps<Selectors<typeof useStyles>> {\n /**\n * Whether a border is render on top of the footer\n */\n borderTop?: boolean;\n /**\n * Position of the children within the footer\n *\n * @default 'right'\n */\n position?: GroupPosition;\n /**\n * Defines the spacing between footer children\n *\n * @default 'sm'\n */\n spacing?: MantineNumberSize;\n /**\n * Footer's children, usually buttons\n */\n children?: ReactNode;\n}\n\nconst useStyles = createStyles((theme) => ({\n root: {},\n footer: {\n position: 'sticky',\n bottom: 0,\n zIndex: 10,\n backgroundColor: 'white',\n padding: theme.spacing.lg,\n },\n divider: {},\n}));\n\nconst defaultProps: Partial<StickyFooterProps> = {\n spacing: 'sm',\n position: 'right',\n};\n\nexport const StickyFooter = forwardRef<HTMLDivElement, StickyFooterProps>((props, ref) => {\n const {borderTop, spacing, position, children, className, classNames, styles, unstyled, ...others} =\n useComponentDefaultProps('StickyFooter', defaultProps, props);\n const {classes, cx} = useStyles(null, {name: 'StickyFooter', classNames, styles, unstyled});\n\n return (\n <Box ref={ref} className={cx(classes.root, className)}>\n {borderTop ? <Divider size=\"xs\" className={classes.divider} /> : null}\n <Group position={position} spacing={spacing} className={classes.footer} {...others}>\n {children}\n </Group>\n </Box>\n );\n});\n"],"names":["Box","createStyles","Divider","Group","useComponentDefaultProps","forwardRef","useStyles","theme","root","footer","position","bottom","zIndex","backgroundColor","padding","spacing","lg","divider","defaultProps","StickyFooter","props","ref","borderTop","children","className","classNames","styles","unstyled","others","name","classes","cx","size"],"mappings":";;;;AAAA,SACIA,GAAG,EACHC,YAAY,EAEZC,OAAO,EACPC,KAAK,EAILC,wBAAwB,QACrB,gBAAgB;AACvB,SAAQC,UAAU,QAAkB,QAAQ;AAyB5C,IAAMC,YAAYL,aAAa,SAACM;WAAW;QACvCC,MAAM,CAAC;QACPC,QAAQ;YACJC,UAAU;YACVC,QAAQ;YACRC,QAAQ;YACRC,iBAAiB;YACjBC,SAASP,MAAMQ,OAAO,CAACC,EAAE;QAC7B;QACAC,SAAS,CAAC;IACd;;AAEA,IAAMC,eAA2C;IAC7CH,SAAS;IACTL,UAAU;AACd;AAEA,OAAO,IAAMS,6BAAed,WAA8C,SAACe,OAAOC;IAC9E,IACIjB,4BAAAA,yBAAyB,gBAAgBc,cAAcE,QADpDE,YACHlB,0BADGkB,WAAWP,UACdX,0BADcW,SAASL,WACvBN,0BADuBM,UAAUa,WACjCnB,0BADiCmB,UAAUC,YAC3CpB,0BAD2CoB,WAAWC,aACtDrB,0BADsDqB,YAAYC,SAClEtB,0BADkEsB,QAAQC,WAC1EvB,0BAD0EuB,UAAaC,oCACvFxB;QADGkB;QAAWP;QAASL;QAAUa;QAAUC;QAAWC;QAAYC;QAAQC;;IAE9E,IAAsBrB,aAAAA,UAAU,MAAM;QAACuB,MAAM;QAAgBJ,YAAAA;QAAYC,QAAAA;QAAQC,UAAAA;IAAQ,IAAlFG,UAAexB,WAAfwB,SAASC,KAAMzB,WAANyB;IAEhB,qBACI,MAAC/B;QAAIqB,KAAKA;QAAKG,WAAWO,GAAGD,QAAQtB,IAAI,EAAEgB;;YACtCF,0BAAY,KAACpB;gBAAQ8B,MAAK;gBAAKR,WAAWM,QAAQb,OAAO;iBAAO;0BACjE,KAACd;gBAAMO,UAAUA;gBAAUK,SAASA;gBAASS,WAAWM,QAAQrB,MAAM;eAAMmB;0BACvEL;;;;AAIjB,GAAG"}
1
+ {"version":3,"sources":["../../../../src/components/sticky-footer/StickyFooter.tsx"],"sourcesContent":["import {\n Box,\n createStyles,\n DefaultProps,\n Divider,\n Group,\n GroupPosition,\n MantineNumberSize,\n Selectors,\n useComponentDefaultProps,\n} from '@mantine/core';\nimport {forwardRef, ReactNode} from 'react';\n\nexport interface StickyFooterProps extends DefaultProps<Selectors<typeof useStyles>> {\n /**\n * Whether a border is render on top of the footer\n */\n borderTop?: boolean;\n /**\n * Position of the children within the footer\n *\n * @default 'right'\n */\n position?: GroupPosition;\n /**\n * Defines the spacing between footer children\n *\n * @default 'sm'\n */\n spacing?: MantineNumberSize;\n /**\n * Footer's children, usually buttons\n */\n children?: ReactNode;\n}\n\nconst useStyles = createStyles((theme) => ({\n root: {\n position: 'sticky',\n bottom: 0,\n zIndex: 10,\n backgroundColor: 'white',\n },\n footer: {\n padding: theme.spacing.lg,\n },\n divider: {},\n}));\n\nconst defaultProps: Partial<StickyFooterProps> = {\n spacing: 'sm',\n position: 'right',\n};\n\nexport const StickyFooter = forwardRef<HTMLDivElement, StickyFooterProps>((props, ref) => {\n const {borderTop, spacing, position, children, className, classNames, styles, unstyled, ...others} =\n useComponentDefaultProps('StickyFooter', defaultProps, props);\n const {classes, cx} = useStyles(null, {name: 'StickyFooter', classNames, styles, unstyled});\n\n return (\n <Box ref={ref} className={cx(classes.root, className)}>\n {borderTop ? <Divider size=\"xs\" className={classes.divider} /> : null}\n <Group position={position} spacing={spacing} className={classes.footer} {...others}>\n {children}\n </Group>\n </Box>\n );\n});\n"],"names":["Box","createStyles","Divider","Group","useComponentDefaultProps","forwardRef","useStyles","theme","root","position","bottom","zIndex","backgroundColor","footer","padding","spacing","lg","divider","defaultProps","StickyFooter","props","ref","borderTop","children","className","classNames","styles","unstyled","others","name","classes","cx","size"],"mappings":";;;;AAAA,SACIA,GAAG,EACHC,YAAY,EAEZC,OAAO,EACPC,KAAK,EAILC,wBAAwB,QACrB,gBAAgB;AACvB,SAAQC,UAAU,QAAkB,QAAQ;AAyB5C,IAAMC,YAAYL,aAAa,SAACM;WAAW;QACvCC,MAAM;YACFC,UAAU;YACVC,QAAQ;YACRC,QAAQ;YACRC,iBAAiB;QACrB;QACAC,QAAQ;YACJC,SAASP,MAAMQ,OAAO,CAACC,EAAE;QAC7B;QACAC,SAAS,CAAC;IACd;;AAEA,IAAMC,eAA2C;IAC7CH,SAAS;IACTN,UAAU;AACd;AAEA,OAAO,IAAMU,6BAAed,WAA8C,SAACe,OAAOC;IAC9E,IACIjB,4BAAAA,yBAAyB,gBAAgBc,cAAcE,QADpDE,YACHlB,0BADGkB,WAAWP,UACdX,0BADcW,SAASN,WACvBL,0BADuBK,UAAUc,WACjCnB,0BADiCmB,UAAUC,YAC3CpB,0BAD2CoB,WAAWC,aACtDrB,0BADsDqB,YAAYC,SAClEtB,0BADkEsB,QAAQC,WAC1EvB,0BAD0EuB,UAAaC,oCACvFxB;QADGkB;QAAWP;QAASN;QAAUc;QAAUC;QAAWC;QAAYC;QAAQC;;IAE9E,IAAsBrB,aAAAA,UAAU,MAAM;QAACuB,MAAM;QAAgBJ,YAAAA;QAAYC,QAAAA;QAAQC,UAAAA;IAAQ,IAAlFG,UAAexB,WAAfwB,SAASC,KAAMzB,WAANyB;IAEhB,qBACI,MAAC/B;QAAIqB,KAAKA;QAAKG,WAAWO,GAAGD,QAAQtB,IAAI,EAAEgB;;YACtCF,0BAAY,KAACpB;gBAAQ8B,MAAK;gBAAKR,WAAWM,QAAQb,OAAO;iBAAO;0BACjE,KAACd;gBAAMM,UAAUA;gBAAUM,SAASA;gBAASS,WAAWM,QAAQjB,MAAM;eAAMe;0BACvEL;;;;AAIjB,GAAG"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coveord/plasma-mantine",
3
- "version": "52.17.1",
3
+ "version": "52.17.3",
4
4
  "description": "A Plasma flavoured Mantine theme",
5
5
  "keywords": [
6
6
  "plasma",
@@ -188,7 +188,6 @@ export const CodeEditor: FunctionComponent<CodeEditorProps> = (props) => {
188
188
  options={{
189
189
  minimap: {enabled: false},
190
190
  wordWrap: 'on',
191
- wrappingStrategy: 'advanced',
192
191
  scrollBeyondLastLine: false,
193
192
  formatOnPaste: true,
194
193
  fontSize: px(theme.fontSizes.xs),
@@ -35,12 +35,13 @@ export interface StickyFooterProps extends DefaultProps<Selectors<typeof useStyl
35
35
  }
36
36
 
37
37
  const useStyles = createStyles((theme) => ({
38
- root: {},
39
- footer: {
38
+ root: {
40
39
  position: 'sticky',
41
40
  bottom: 0,
42
41
  zIndex: 10,
43
42
  backgroundColor: 'white',
43
+ },
44
+ footer: {
44
45
  padding: theme.spacing.lg,
45
46
  },
46
47
  divider: {},