@kartverket/backstage-plugin-risk-scorecard 6.1.9 → 6.1.10

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.
@@ -4,9 +4,9 @@ import FormControl from '@mui/material/FormControl';
4
4
  import FormHelperText from '@mui/material/FormHelperText';
5
5
  import FormLabel from '@mui/material/FormLabel';
6
6
  import MDEditor from '@uiw/react-md-editor';
7
- import { formLabel, formHelperText } from '../typography.esm.js';
8
7
  import classNames from 'classnames';
9
8
  import { getActiveTheme } from '../../../utils/utilityfunctions.esm.js';
9
+ import formStyles from '../formStyles.module.css.esm.js';
10
10
  import styles from './MarkdownInput.module.css.esm.js';
11
11
 
12
12
  const MarkdownInput = forwardRef(
@@ -72,8 +72,8 @@ const MarkdownInput = forwardRef(
72
72
  [styles["MarkDownInput--disabled"]]: disabled
73
73
  });
74
74
  return /* @__PURE__ */ jsxs(FormControl, { className: styles.MarkDownInputFormControl, error, children: [
75
- label && /* @__PURE__ */ jsx(FormLabel, { sx: formLabel, children: label }),
76
- sublabel && /* @__PURE__ */ jsx(FormHelperText, { sx: formHelperText, children: sublabel }),
75
+ label && /* @__PURE__ */ jsx(FormLabel, { className: formStyles.formLabel, children: label }),
76
+ sublabel && /* @__PURE__ */ jsx(FormHelperText, { className: formStyles.formHelperText, children: sublabel }),
77
77
  /* @__PURE__ */ jsx(
78
78
  "div",
79
79
  {
@@ -1 +1 @@
1
- {"version":3,"file":"MarkdownInput.esm.js","sources":["../../../../src/components/common/MarkdownInput/MarkdownInput.tsx"],"sourcesContent":["import { forwardRef, useState, useEffect, useRef } from 'react';\nimport FormControl from '@mui/material/FormControl';\nimport FormHelperText from '@mui/material/FormHelperText';\nimport FormLabel from '@mui/material/FormLabel';\nimport MDEditor from '@uiw/react-md-editor';\nimport { formHelperText, formLabel } from '../typography';\nimport { TextFieldProps } from '@material-ui/core';\nimport classNames from 'classnames';\nimport { getActiveTheme } from '../../../utils/utilityfunctions';\nimport styles from './MarkdownInput.module.css';\n\ntype Props = TextFieldProps & {\n sublabel?: string;\n value?: string;\n onMarkdownChange?: (markdown: string) => void;\n minRows?: number;\n};\n\nexport const MarkdownInput = forwardRef<HTMLDivElement, Props>(\n (\n {\n label,\n sublabel,\n error,\n helperText,\n minRows,\n value,\n onMarkdownChange,\n disabled = false,\n },\n ref,\n ) => {\n const [markdownContent, setMarkdownContent] = useState<string | undefined>(\n value,\n );\n\n const wrapperRef = useRef<HTMLDivElement | null>(null);\n\n useEffect(() => {\n setMarkdownContent(value);\n }, [value]);\n\n useEffect(() => {\n const root = wrapperRef.current;\n if (!root) return () => {};\n\n const handleKeyDown = (e: KeyboardEvent) => {\n if (e.key !== 'Tab') return;\n const active = document.activeElement as HTMLElement | null;\n if (!active || !root.contains(active)) return;\n e.preventDefault();\n e.stopPropagation();\n\n const focusable = Array.from(\n document.querySelectorAll<HTMLElement>(\n 'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])',\n ),\n ).filter(el => !el.hasAttribute('disabled'));\n\n const index = focusable.indexOf(active);\n const direction = e.shiftKey ? -1 : 1;\n const nextIndex = index + direction;\n const next =\n focusable[nextIndex] ??\n (direction === 1 ? focusable[0] : focusable[focusable.length - 1]);\n next?.focus();\n };\n\n root.addEventListener('keydown', handleKeyDown, true);\n\n return () => {\n root.removeEventListener('keydown', handleKeyDown, true);\n };\n }, [wrapperRef]);\n\n const handleMarkdownChange = (newValue: string | undefined) => {\n setMarkdownContent(newValue || '');\n onMarkdownChange?.(newValue || '');\n };\n\n const onFocusCapture = (event: React.FocusEvent<HTMLDivElement>) => {\n if (event.relatedTarget) {\n const root = event.currentTarget as HTMLDivElement;\n const target = root.querySelector(\n 'textarea, [contenteditable=\"true\"]',\n ) as HTMLElement | null;\n if (target) {\n setTimeout(() => target.focus());\n }\n }\n };\n const editorClassName = classNames(styles.MarkDownInput, {\n [styles['MarkDownInput--disabled']]: disabled,\n });\n\n return (\n <FormControl className={styles.MarkDownInputFormControl} error={error}>\n {label && <FormLabel sx={formLabel}>{label}</FormLabel>}\n {sublabel && (\n <FormHelperText sx={formHelperText}>{sublabel}</FormHelperText>\n )}\n <div\n ref={wrapperRef}\n onFocusCapture={onFocusCapture}\n data-color-mode={getActiveTheme()}\n className={styles.MarkDownInputWrapper}\n >\n <MDEditor\n ref={ref}\n value={markdownContent}\n onChange={handleMarkdownChange}\n preview=\"edit\"\n height={minRows ? minRows * 24 : 64}\n className={editorClassName}\n />\n </div>\n {helperText && <FormHelperText>{helperText}</FormHelperText>}\n </FormControl>\n );\n },\n);\n"],"names":[],"mappings":";;;;;;;;;;;AAkBO,MAAM,aAAA,GAAgB,UAAA;AAAA,EAC3B,CACE;AAAA,IACE,KAAA;AAAA,IACA,QAAA;AAAA,IACA,KAAA;AAAA,IACA,UAAA;AAAA,IACA,OAAA;AAAA,IACA,KAAA;AAAA,IACA,gBAAA;AAAA,IACA,QAAA,GAAW;AAAA,KAEb,GAAA,KACG;AACH,IAAA,MAAM,CAAC,eAAA,EAAiB,kBAAkB,CAAA,GAAI,QAAA;AAAA,MAC5C;AAAA,KACF;AAEA,IAAA,MAAM,UAAA,GAAa,OAA8B,IAAI,CAAA;AAErD,IAAA,SAAA,CAAU,MAAM;AACd,MAAA,kBAAA,CAAmB,KAAK,CAAA;AAAA,IAC1B,CAAA,EAAG,CAAC,KAAK,CAAC,CAAA;AAEV,IAAA,SAAA,CAAU,MAAM;AACd,MAAA,MAAM,OAAO,UAAA,CAAW,OAAA;AACxB,MAAA,IAAI,CAAC,IAAA,EAAM,OAAO,MAAM;AAAA,MAAC,CAAA;AAEzB,MAAA,MAAM,aAAA,GAAgB,CAAC,CAAA,KAAqB;AAC1C,QAAA,IAAI,CAAA,CAAE,QAAQ,KAAA,EAAO;AACrB,QAAA,MAAM,SAAS,QAAA,CAAS,aAAA;AACxB,QAAA,IAAI,CAAC,MAAA,IAAU,CAAC,IAAA,CAAK,QAAA,CAAS,MAAM,CAAA,EAAG;AACvC,QAAA,CAAA,CA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x"],"sourcesContent":["import { forwardRef, useState, useEffect, useRef } from 'react';\nimport FormControl from '@mui/material/FormControl';\nimport FormHelperText from '@mui/material/FormHelperText';\nimport FormLabel from '@mui/material/FormLabel';\nimport MDEditor from '@uiw/react-md-editor';\nimport { TextFieldProps } from '@material-ui/core';\nimport classNames from 'classnames';\nimport { getActiveTheme } from '../../../utils/utilityfunctions';\nimport formStyles from '../formStyles.module.css';\nimport styles from './MarkdownInput.module.css';\n\ntype Props = TextFieldProps & {\n sublabel?: string;\n value?: string;\n onMarkdownChange?: (markdown: string) => void;\n minRows?: number;\n};\n\nexport const MarkdownInput = forwardRef<HTMLDivElement, Props>(\n (\n {\n label,\n sublabel,\n error,\n helperText,\n minRows,\n value,\n onMarkdownChange,\n disabled = false,\n },\n ref,\n ) => {\n const [markdownContent, setMarkdownContent] = useState<string | undefined>(\n value,\n );\n\n const wrapperRef = useRef<HTMLDivElement | null>(null);\n\n useEffect(() => {\n setMarkdownContent(value);\n }, [value]);\n\n useEffect(() => {\n const root = wrapperRef.current;\n if (!root) return () => {};\n\n const handleKeyDown = (e: KeyboardEvent) => {\n if (e.key !== 'Tab') return;\n const active = document.activeElement as HTMLElement | null;\n if (!active || !root.contains(active)) return;\n e.preventDefault();\n e.stopPropagation();\n\n const focusable = Array.from(\n document.querySelectorAll<HTMLElement>(\n 'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])',\n ),\n ).filter(el => !el.hasAttribute('disabled'));\n\n const index = focusable.indexOf(active);\n const direction = e.shiftKey ? -1 : 1;\n const nextIndex = index + direction;\n const next =\n focusable[nextIndex] ??\n (direction === 1 ? focusable[0] : focusable[focusable.length - 1]);\n next?.focus();\n };\n\n root.addEventListener('keydown', handleKeyDown, true);\n\n return () => {\n root.removeEventListener('keydown', handleKeyDown, true);\n };\n }, [wrapperRef]);\n\n const handleMarkdownChange = (newValue: string | undefined) => {\n setMarkdownContent(newValue || '');\n onMarkdownChange?.(newValue || '');\n };\n\n const onFocusCapture = (event: React.FocusEvent<HTMLDivElement>) => {\n if (event.relatedTarget) {\n const root = event.currentTarget as HTMLDivElement;\n const target = root.querySelector(\n 'textarea, [contenteditable=\"true\"]',\n ) as HTMLElement | null;\n if (target) {\n setTimeout(() => target.focus());\n }\n }\n };\n const editorClassName = classNames(styles.MarkDownInput, {\n [styles['MarkDownInput--disabled']]: disabled,\n });\n\n return (\n <FormControl className={styles.MarkDownInputFormControl} error={error}>\n {label && (\n <FormLabel className={formStyles.formLabel}>{label}</FormLabel>\n )}\n {sublabel && (\n <FormHelperText className={formStyles.formHelperText}>\n {sublabel}\n </FormHelperText>\n )}\n <div\n ref={wrapperRef}\n onFocusCapture={onFocusCapture}\n data-color-mode={getActiveTheme()}\n className={styles.MarkDownInputWrapper}\n >\n <MDEditor\n ref={ref}\n value={markdownContent}\n onChange={handleMarkdownChange}\n preview=\"edit\"\n height={minRows ? minRows * 24 : 64}\n className={editorClassName}\n />\n </div>\n {helperText && <FormHelperText>{helperText}</FormHelperText>}\n </FormControl>\n );\n },\n);\n"],"names":[],"mappings":";;;;;;;;;;;AAkBO,MAAM,aAAA,GAAgB,UAAA;AAAA,EAC3B,CACE;AAAA,IACE,KAAA;AAAA,IACA,QAAA;AAAA,IACA,KAAA;AAAA,IACA,UAAA;AAAA,IACA,OAAA;AAAA,IACA,KAAA;AAAA,IACA,gBAAA;AAAA,IACA,QAAA,GAAW;AAAA,KAEb,GAAA,KACG;AACH,IAAA,MAAM,CAAC,eAAA,EAAiB,kBAAkB,CAAA,GAAI,QAAA;AAAA,MAC5C;AAAA,KACF;AAEA,IAAA,MAAM,UAAA,GAAa,OAA8B,IAAI,CAAA;AAErD,IAAA,SAAA,CAAU,MAAM;AACd,MAAA,kBAAA,CAAmB,KAAK,CAAA;AAAA,IAC1B,CAAA,EAAG,CAAC,KAAK,CAAC,CAAA;AAEV,IAAA,SAAA,CAAU,MAAM;AACd,MAAA,MAAM,OAAO,UAAA,CAAW,OAAA;AACxB,MAAA,IAAI,CAAC,I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,OAAA,GAAU,OAAA,GAAU,EAAA,GAAK,EAAA;AAAA,cACjC,SAAA,EAAW;AAAA;AAAA;AACb;AAAA,OACF;AAAA,MACC,UAAA,oBAAc,GAAA,CAAC,cAAA,EAAA,EAAgB,QAAA,EAAA,UAAA,EAAW;AAAA,KAAA,EAC7C,CAAA;AAAA,EAEJ;AACF;;;;"}
@@ -2,19 +2,17 @@ import { jsx } from 'react/jsx-runtime';
2
2
  import { forwardRef } from 'react';
3
3
  import MUIRadio from '@mui/material/Radio';
4
4
  import FormControlLabel from '@mui/material/FormControlLabel';
5
- import { formLabel } from '../../common/typography.esm.js';
5
+ import formStyles from '../../common/formStyles.module.css.esm.js';
6
+ import styles from './RiskRadioButton.module.css.esm.js';
6
7
 
7
8
  const RiskRadioButton = forwardRef(
8
9
  ({ label, ...props }, ref) => /* @__PURE__ */ jsx(
9
10
  FormControlLabel,
10
11
  {
11
- sx: {
12
- width: "100%",
13
- whiteSpace: "nowrap"
14
- },
15
- control: /* @__PURE__ */ jsx(MUIRadio, { inputRef: ref, sx: { marginRight: -0.5 }, ...props }),
12
+ className: styles.container,
13
+ control: /* @__PURE__ */ jsx(MUIRadio, { inputRef: ref, className: styles.radio, ...props }),
16
14
  label,
17
- componentsProps: { typography: { sx: formLabel } }
15
+ componentsProps: { typography: { className: formStyles.formLabel } }
18
16
  }
19
17
  )
20
18
  );
@@ -1 +1 @@
1
- {"version":3,"file":"RiskRadioButton.esm.js","sources":["../../../../src/components/scenarioWizard/components/RiskRadioButton.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport MUIRadio, { RadioProps } from '@mui/material/Radio';\nimport FormControlLabel from '@mui/material/FormControlLabel';\nimport { formLabel } from '../../common/typography';\n\ntype Props = RadioProps & {\n label?: string;\n};\n\nexport const RiskRadioButton = forwardRef<HTMLSelectElement, Props>(\n ({ label, ...props }, ref) => (\n <FormControlLabel\n sx={{\n width: '100%',\n whiteSpace: 'nowrap',\n }}\n control={\n <MUIRadio inputRef={ref} sx={{ marginRight: -0.5 }} {...props} />\n }\n label={label}\n componentsProps={{ typography: { sx: formLabel } }}\n />\n ),\n);\n"],"names":[],"mappings":";;;;;;AASO,MAAM,eAAA,GAAkB,UAAA;AAAA,EAC7B,CAAC,EAAE,KAAA,EAAO,GAAG,KAAA,IAAS,GAAA,qBACpB,GAAA;AAAA,IAAC,gBAAA;AAAA,IAAA;AAAA,MACC,EAAA,EAAI;AAAA,QACF,KAAA,EAAO,MAAA;AAAA,QACP,UAAA,EAAY;AAAA,OACd;AAAA,MACA,OAAA,kBACE,GAAA,CAAC,QAAA,EAAA,EAAS,QAAA,EAAU,GAAA,EAAK,EAAA,EAAI,EAAE,WAAA,EAAa,IAAA,EAAK,EAAI,GAAG,KAAA,EAAO,CAAA;AAAA,MAEjE,KAAA;AAAA,MACA,iBAAiB,EAAE,UAAA,EAAY,EAAE,EAAA,EAAI,WAAU;AAAE;AAAA;AAGvD;;;;"}
1
+ {"version":3,"file":"RiskRadioButton.esm.js","sources":["../../../../src/components/scenarioWizard/components/RiskRadioButton.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport MUIRadio, { RadioProps } from '@mui/material/Radio';\nimport FormControlLabel from '@mui/material/FormControlLabel';\nimport formStyles from '../../common/formStyles.module.css';\nimport styles from './RiskRadioButton.module.css';\n\ntype Props = RadioProps & {\n label?: string;\n};\n\nexport const RiskRadioButton = forwardRef<HTMLSelectElement, Props>(\n ({ label, ...props }, ref) => (\n <FormControlLabel\n className={styles.container}\n control={<MUIRadio inputRef={ref} className={styles.radio} {...props} />}\n label={label}\n componentsProps={{ typography: { className: formStyles.formLabel } }}\n />\n ),\n);\n"],"names":[],"mappings":";;;;;;;AAUO,MAAM,eAAA,GAAkB,UAAA;AAAA,EAC7B,CAAC,EAAE,KAAA,EAAO,GAAG,KAAA,IAAS,GAAA,qBACpB,GAAA;AAAA,IAAC,gBAAA;AAAA,IAAA;AAAA,MACC,WAAW,MAAA,CAAO,SAAA;AAAA,MAClB,OAAA,sBAAU,QAAA,EAAA,EAAS,QAAA,EAAU,KAAK,SAAA,EAAW,MAAA,CAAO,KAAA,EAAQ,GAAG,KAAA,EAAO,CAAA;AAAA,MACtE,KAAA;AAAA,MACA,iBAAiB,EAAE,UAAA,EAAY,EAAE,SAAA,EAAW,UAAA,CAAW,WAAU;AAAE;AAAA;AAGzE;;;;"}
@@ -0,0 +1,8 @@
1
+ import styleInject from '../../../node_modules_dist/style-inject/dist/style-inject.es.esm.js';
2
+
3
+ var css_248z = ".RiskRadioButton_container__d7efd9422b {\n width: 100%;\n white-space: nowrap;\n}\n\n.RiskRadioButton_radio__d7efd9422b {\n margin-right: -4px;\n}\n";
4
+ var styles = {"container":"RiskRadioButton_container__d7efd9422b","radio":"RiskRadioButton_radio__d7efd9422b"};
5
+ styleInject(css_248z);
6
+
7
+ export { styles as default };
8
+ //# sourceMappingURL=RiskRadioButton.module.css.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RiskRadioButton.module.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kartverket/backstage-plugin-risk-scorecard",
3
- "version": "6.1.9",
3
+ "version": "6.1.10",
4
4
  "main": "dist/index.esm.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "license": "MIT",
@@ -1,15 +0,0 @@
1
- const formLabel = {
2
- fontSize: "0.875rem",
3
- fontWeight: 700,
4
- textTransform: "none",
5
- color: "inherit"
6
- };
7
- const formHelperText = {
8
- fontSize: "0.875rem",
9
- fontWeight: 400,
10
- color: "inherit",
11
- margin: 0
12
- };
13
-
14
- export { formHelperText, formLabel };
15
- //# sourceMappingURL=typography.esm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"typography.esm.js","sources":["../../../src/components/common/typography.ts"],"sourcesContent":["import { SxProps, Theme } from '@mui/material/styles';\n\nexport const formLabel: SxProps<Theme> = {\n fontSize: '0.875rem',\n fontWeight: 700,\n textTransform: 'none',\n color: 'inherit',\n};\n\nexport const formHelperText: SxProps<Theme> = {\n fontSize: '0.875rem',\n fontWeight: 400,\n color: 'inherit',\n margin: 0,\n};\n"],"names":[],"mappings":"AAEO,MAAM,SAAA,GAA4B;AAAA,EACvC,QAAA,EAAU,UAAA;AAAA,EACV,UAAA,EAAY,GAAA;AAAA,EACZ,aAAA,EAAe,MAAA;AAAA,EACf,KAAA,EAAO;AACT;AAEO,MAAM,cAAA,GAAiC;AAAA,EAC5C,QAAA,EAAU,UAAA;AAAA,EACV,UAAA,EAAY,GAAA;AAAA,EACZ,KAAA,EAAO,SAAA;AAAA,EACP,MAAA,EAAQ;AACV;;;;"}