@danske/sapphire-react-lab 0.87.2 → 0.87.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,6 +1,5 @@
1
1
  import { filterDOMProps } from '@react-aria/utils';
2
2
  import React, { forwardRef } from 'react';
3
- import { useDOMRef } from '@react-spectrum/utils';
4
3
  import clsx from 'clsx';
5
4
  import styles from '@danske/sapphire-css/components/text/text.module.css';
6
5
  import { useThemeCheck, useTextStyleProps } from '@danske/sapphire-react';
@@ -41,13 +40,12 @@ const Heading = forwardRef(function Heading2(props, ref) {
41
40
  const domProps = filterDOMProps(props);
42
41
  const _a = props, { children, level, elementType } = _a, otherProps = __objRest(_a, ["children", "level", "elementType"]);
43
42
  const { styleProps } = useTextStyleProps(otherProps);
44
- const domRef = useDOMRef(ref);
45
43
  const HeadingTag = elementType ? elementType : `h${level}`;
46
44
  return /* @__PURE__ */ React.createElement(HeadingTag, __spreadProps(__spreadValues(__spreadValues({}, domProps), styleProps), {
47
45
  className: clsx(styles["sapphire-text"], styles[`sapphire-text--heading-${level}`], styleProps.className, {
48
46
  [styles["sapphire-text--heading-alternative"]]: props.fontVariant === "alternative"
49
47
  }),
50
- ref: domRef
48
+ ref
51
49
  }), children);
52
50
  });
53
51
 
@@ -1 +1 @@
1
- {"version":3,"file":"Heading.js","sources":["../../../../src/Typography/src/Heading.tsx"],"sourcesContent":["import { DOMRef, DOMProps } from '@react-types/shared';\nimport { filterDOMProps } from '@react-aria/utils';\nimport React, { ElementType, forwardRef } from 'react';\nimport { useDOMRef } from '@react-spectrum/utils';\nimport clsx from 'clsx';\nimport styles from '@danske/sapphire-css/components/text/text.module.css';\n\nimport {\n useThemeCheck,\n useTextStyleProps,\n TextStyleProps,\n SapphireStyleProps,\n} from '@danske/sapphire-react';\n\ntype HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;\n\nexport interface TypographyHeadingProps\n extends DOMProps,\n TextStyleProps,\n SapphireStyleProps {\n children: React.ReactNode;\n /**\n * The level of the heading.\n */\n level: HeadingLevel;\n elementType?: `h${HeadingLevel}`;\n fontVariant?: 'default' | 'alternative';\n}\n\nexport const Heading = forwardRef(function Heading(\n props: TypographyHeadingProps,\n ref: DOMRef<HTMLHeadingElement>\n) {\n useThemeCheck();\n\n const domProps = filterDOMProps(props);\n const { children, level, elementType, ...otherProps } = props;\n const { styleProps } = useTextStyleProps(otherProps);\n const domRef = useDOMRef(ref);\n const HeadingTag = elementType ? elementType : (`h${level}` as ElementType);\n\n return (\n <HeadingTag\n {...domProps}\n {...styleProps}\n className={clsx(\n styles['sapphire-text'],\n styles[`sapphire-text--heading-${level}` as const],\n styleProps.className,\n {\n [styles['sapphire-text--heading-alternative']]:\n props.fontVariant === 'alternative',\n }\n )}\n ref={domRef}\n >\n {children}\n </HeadingTag>\n );\n});\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BO,MAAM,OAAU,GAAA,UAAA,CAAW,SAChC,QAAA,CAAA,KAAA,EACA,GACA,EAAA;AACA,EAAA,aAAA,EAAA,CAAA;AAEA,EAAA,MAAM,WAAW,cAAe,CAAA,KAAA,CAAA,CAAA;AAChC,EAAwD,MAAA,EAAA,GAAA,KAAA,EAAhD,YAAU,KAAO,EAAA,WAAA,EAAA,GAA+B,IAAf,UAAe,GAAA,SAAA,CAAA,EAAA,EAAf,CAAjC,UAAA,EAAU,OAAO,EAAA,aAAA,CAAA,CAAA,CAAA;AACzB,EAAM,MAAA,EAAE,eAAe,iBAAkB,CAAA,UAAA,CAAA,CAAA;AACzC,EAAA,MAAM,SAAS,SAAU,CAAA,GAAA,CAAA,CAAA;AACzB,EAAM,MAAA,UAAA,GAAa,WAAc,GAAA,WAAA,GAAe,CAAI,CAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAEpD,EAAA,uBACG,KAAA,CAAA,aAAA,CAAA,UAAA,EAAD,aACM,CAAA,cAAA,CAAA,cAAA,CAAA,EAAA,EAAA,QAAA,CAAA,EACA,UAFN,CAAA,EAAA;AAAA,IAGE,SAAA,EAAW,KACT,MAAO,CAAA,eAAA,CAAA,EACP,OAAO,CAA0B,uBAAA,EAAA,KAAA,CAAA,CAAA,CAAA,EACjC,WAAW,SACX,EAAA;AAAA,MACG,CAAA,MAAA,CAAO,oCACN,CAAA,GAAA,KAAA,CAAM,WAAgB,KAAA,aAAA;AAAA,KAAA,CAAA;AAAA,IAG5B,GAAK,EAAA,MAAA;AAAA,GAEJ,CAAA,EAAA,QAAA,CAAA,CAAA;AAAA,CAAA;;;;"}
1
+ {"version":3,"file":"Heading.js","sources":["../../../../src/Typography/src/Heading.tsx"],"sourcesContent":["import { DOMProps } from '@react-types/shared';\nimport { filterDOMProps } from '@react-aria/utils';\nimport React, { ElementType, ForwardedRef, forwardRef } from 'react';\nimport clsx from 'clsx';\nimport styles from '@danske/sapphire-css/components/text/text.module.css';\n\nimport {\n useThemeCheck,\n useTextStyleProps,\n TextStyleProps,\n SapphireStyleProps,\n} from '@danske/sapphire-react';\n\ntype HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;\n\nexport interface TypographyHeadingProps\n extends DOMProps,\n TextStyleProps,\n SapphireStyleProps {\n children: React.ReactNode;\n /**\n * The level of the heading.\n */\n level: HeadingLevel;\n elementType?: `h${HeadingLevel}`;\n fontVariant?: 'default' | 'alternative';\n}\n\nexport const Heading = forwardRef(function Heading(\n props: TypographyHeadingProps,\n ref: ForwardedRef<HTMLHeadingElement>\n) {\n useThemeCheck();\n\n const domProps = filterDOMProps(props);\n const { children, level, elementType, ...otherProps } = props;\n const { styleProps } = useTextStyleProps(otherProps);\n const HeadingTag = elementType ? elementType : (`h${level}` as ElementType);\n\n return (\n <HeadingTag\n {...domProps}\n {...styleProps}\n className={clsx(\n styles['sapphire-text'],\n styles[`sapphire-text--heading-${level}` as const],\n styleProps.className,\n {\n [styles['sapphire-text--heading-alternative']]:\n props.fontVariant === 'alternative',\n }\n )}\n ref={ref}\n >\n {children}\n </HeadingTag>\n );\n});\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BO,MAAM,OAAU,GAAA,UAAA,CAAW,SAChC,QAAA,CAAA,KAAA,EACA,GACA,EAAA;AACA,EAAA,aAAA,EAAA,CAAA;AAEA,EAAA,MAAM,WAAW,cAAe,CAAA,KAAA,CAAA,CAAA;AAChC,EAAwD,MAAA,EAAA,GAAA,KAAA,EAAhD,YAAU,KAAO,EAAA,WAAA,EAAA,GAA+B,IAAf,UAAe,GAAA,SAAA,CAAA,EAAA,EAAf,CAAjC,UAAA,EAAU,OAAO,EAAA,aAAA,CAAA,CAAA,CAAA;AACzB,EAAM,MAAA,EAAE,eAAe,iBAAkB,CAAA,UAAA,CAAA,CAAA;AACzC,EAAM,MAAA,UAAA,GAAa,WAAc,GAAA,WAAA,GAAe,CAAI,CAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAEpD,EAAA,uBACG,KAAA,CAAA,aAAA,CAAA,UAAA,EAAD,aACM,CAAA,cAAA,CAAA,cAAA,CAAA,EAAA,EAAA,QAAA,CAAA,EACA,UAFN,CAAA,EAAA;AAAA,IAGE,SAAA,EAAW,KACT,MAAO,CAAA,eAAA,CAAA,EACP,OAAO,CAA0B,uBAAA,EAAA,KAAA,CAAA,CAAA,CAAA,EACjC,WAAW,SACX,EAAA;AAAA,MACG,CAAA,MAAA,CAAO,oCACN,CAAA,GAAA,KAAA,CAAM,WAAgB,KAAA,aAAA;AAAA,KAAA,CAAA;AAAA,IAG5B,GAAA;AAAA,GAEC,CAAA,EAAA,QAAA,CAAA,CAAA;AAAA,CAAA;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danske/sapphire-react-lab",
3
- "version": "0.87.2",
3
+ "version": "0.87.3",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "description": "Experimental React components of the Sapphire Design System from Danske Bank A/S",
6
6
  "exports": {
@@ -19,7 +19,7 @@
19
19
  ],
20
20
  "scripts": {
21
21
  "build": "cross-env ../../node_modules/.bin/rollup --config ../../rollup.config.js",
22
- "postpublish": "echo bypassing npx -y send-release-notes@latest --to=6d5d8a75.groupsmail.danskebank.com@emea.teams.ms",
22
+ "postpublish": "echo bypassing npx -y send-release-notes@latest --to=6d5d8a75.groupsmail.danskebank.com@emea.teams.ms --baseUrl=https://sapphire.danskenet.net/react",
23
23
  "prepare": "yarn run build",
24
24
  "prepublishOnly": "yarn run build"
25
25
  },
@@ -74,5 +74,5 @@
74
74
  "clsx": "^1.1.1",
75
75
  "react-transition-group": "^4.4.5"
76
76
  },
77
- "gitHead": "04534ccb922fafc0ae86ba576ebb44c466ddc35a"
77
+ "gitHead": "b6d8ab3c3119f61b7a7d8f522abecca275c9ff65"
78
78
  }