@moduk/frontend 1.7.2 → 1.7.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,4 +1,4 @@
1
- import { type ComponentPropsWithoutRef, type ComponentPropsWithRef, type ComponentType, type ElementType, type JSX } from 'react';
1
+ import { type ComponentPropsWithoutRef, type ComponentPropsWithRef, type ComponentType, type ElementType, type ExoticComponent } from 'react';
2
2
  type LinkProps<T extends ElementType> = {
3
3
  /**
4
4
  * The component to use for links (for example, a Link component
@@ -12,7 +12,7 @@ type LinksComponentType = Extract<ElementType, 'a' | ComponentType>;
12
12
  export interface LinkComponent<Props = object> {
13
13
  <T extends LinksComponentType = 'a'>(props: LinkProps<T> & {
14
14
  ref?: ComponentPropsWithRef<T>['ref'];
15
- } & Props): JSX.Element | null;
15
+ } & Props): ReturnType<ExoticComponent>;
16
16
  displayName?: string | undefined;
17
17
  }
18
18
  export declare const LinkBase: LinkComponent;
@@ -1 +1 @@
1
- {"version":3,"file":"Link.d.ts","sourceRoot":"","sources":["../../../../src/react/internal/Link/Link.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,qBAAqB,EAC1B,KAAK,aAAa,EAClB,KAAK,WAAW,EAEhB,KAAK,GAAG,EACT,MAAM,OAAO,CAAA;AAEd,KAAK,SAAS,CAAC,CAAC,SAAS,WAAW,IAAI;IACtC;;;;;OAKG;IACH,SAAS,CAAC,EAAE,CAAC,CAAA;CACd,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAAA;AAE/B,KAAK,kBAAkB,GAAG,OAAO,CAAC,WAAW,EAAE,GAAG,GAAG,aAAa,CAAC,CAAA;AAEnE,MAAM,WAAW,aAAa,CAAC,KAAK,GAAG,MAAM;IAC3C,CAAC,CAAC,SAAS,kBAAkB,GAAG,GAAG,EACjC,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG;QAAE,GAAG,CAAC,EAAE,qBAAqB,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAA;KAAE,GAAG,KAAK,GACtE,GAAG,CAAC,OAAO,GAAG,IAAI,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CACjC;AAED,eAAO,MAAM,QAAQ,EAAE,aAOrB,CAAA"}
1
+ {"version":3,"file":"Link.d.ts","sourceRoot":"","sources":["../../../../src/react/internal/Link/Link.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,qBAAqB,EAC1B,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,eAAe,EAErB,MAAM,OAAO,CAAA;AAEd,KAAK,SAAS,CAAC,CAAC,SAAS,WAAW,IAAI;IACtC;;;;;OAKG;IACH,SAAS,CAAC,EAAE,CAAC,CAAA;CACd,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAAA;AAE/B,KAAK,kBAAkB,GAAG,OAAO,CAAC,WAAW,EAAE,GAAG,GAAG,aAAa,CAAC,CAAA;AAEnE,MAAM,WAAW,aAAa,CAAC,KAAK,GAAG,MAAM;IAC3C,CAAC,CAAC,SAAS,kBAAkB,GAAG,GAAG,EACjC,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG;QAAE,GAAG,CAAC,EAAE,qBAAqB,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAA;KAAE,GAAG,KAAK,GACtE,UAAU,CAAC,eAAe,CAAC,CAAA;IAC9B,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CACjC;AAED,eAAO,MAAM,QAAQ,EAAE,aAOrB,CAAA"}
@@ -1,6 +1,7 @@
1
1
  @use 'sass:color';
2
2
  @use 'sass:list';
3
3
  @use 'sass:map';
4
+ @use 'sass:string';
4
5
 
5
6
  @use 'govuk-frontend/govuk/helpers/colour';
6
7
 
@@ -29,20 +30,20 @@ $moduk-colours: (
29
30
  );
30
31
 
31
32
  $legacy-moduk-colours: (
32
- 'maroon': map-get($moduk-colours, 'dark-purple'),
33
+ 'maroon': map.get($moduk-colours, 'dark-purple'),
33
34
  'dark-maroon': #4b263e,
34
35
  'light-maroon': #643f58,
35
36
  );
36
37
 
37
- // Get a colour from the MOD.UK colour palette.
38
- //
39
- // @param $colour-name {String} the name of the colour (e.g. dark-purple, muted-blue)
40
- // @param $tint {Number} Optional colour tint (80, 60, 40 or 20)
41
- //
42
- // @return {String}
38
+ /// Get a colour from the MOD.UK colour palette.
39
+ ///
40
+ /// @param $colour-name {String} the name of the colour (e.g. dark-purple, muted-blue)
41
+ /// @param $tint {Number} Optional colour tint (80, 60, 40 or 20)
42
+ ///
43
+ /// @return {String}
43
44
  @function moduk-colour($colour-name, $tint: null) {
44
45
  $valid_tints: [20, 40, 60, 80];
45
- $quoted-colour-name: quote($colour-name);
46
+ $quoted-colour-name: string.quote($colour-name);
46
47
  $all_colours: map.merge($legacy-moduk-colours, $moduk-colours);
47
48
 
48
49
  @if $tint and not list.index($valid_tints, $tint) {