@moduk/frontend 1.5.0 → 1.6.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/package.json +8 -8
- package/react/esm/MODUKBody/MODUKBody.js +4 -4
- package/react/esm/accordion/Accordion.js +3 -3
- package/react/esm/back-link/BackLink.js +3 -3
- package/react/esm/error-message/ErrorMessage.js +3 -3
- package/react/esm/footer/Footer.js +3 -3
- package/react/esm/footer/FooterMetaLink.js +3 -3
- package/react/esm/footer/FooterNavigationLink.js +3 -3
- package/react/esm/header/Header.js +3 -3
- package/react/esm/header/HeaderNavigationItem.js +3 -3
- package/react/esm/header/HeaderNavigationLink.js +3 -3
- package/react/esm/hint/Hint.js +3 -3
- package/react/esm/index.js +1 -0
- package/react/esm/input/Input.js +3 -3
- package/react/esm/internal/Link/Link.js +3 -3
- package/react/esm/internal/hooks/useMODUKComponent/useMODUKComponent.js +2 -2
- package/react/esm/label/Label.js +3 -3
- package/react/esm/phase-banner/PhaseBanner.js +3 -3
- package/react/esm/phase-banner/PhaseTag.js +3 -3
- package/react/esm/skip-link/SkipLink.js +30 -0
- package/react/esm/skip-link/index.js +1 -0
- package/react/esm/summary-list/SummaryList.js +3 -3
- package/react/esm/summary-list/SummaryListActionLink.js +3 -3
- package/react/esm/table/TableBody.js +3 -3
- package/react/esm/table/TableCaption.js +3 -3
- package/react/esm/table/TableCell.js +3 -3
- package/react/esm/table/TableColumnHeader.js +3 -3
- package/react/esm/table/TableHead.js +3 -3
- package/react/esm/table/TableRow.js +3 -3
- package/react/esm/table/TableRowHeader.js +3 -3
- package/react/esm/tag/Tag.js +3 -3
- package/react/esm/textarea/Textarea.js +3 -3
- package/react/index.d.ts +1 -0
- package/react/index.d.ts.map +1 -1
- package/react/index.js +1 -1
- package/react/index.js.map +1 -1
- package/react/internal/hooks/useMODUKComponent/useMODUKComponent.d.ts +1 -0
- package/react/internal/hooks/useMODUKComponent/useMODUKComponent.d.ts.map +1 -1
- package/react/skip-link/SkipLink.d.ts +18 -0
- package/react/skip-link/SkipLink.d.ts.map +1 -0
- package/react/skip-link/index.d.ts +2 -0
- package/react/skip-link/index.d.ts.map +1 -0
- package/src/react/skip-link/__examples__/default.tsx +10 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
interface ComponentElement {
|
|
2
2
|
Accordion: HTMLDivElement;
|
|
3
3
|
Header: HTMLElement;
|
|
4
|
+
SkipLink: HTMLAnchorElement;
|
|
4
5
|
}
|
|
5
6
|
type ComponentNameLiteral = keyof ComponentElement;
|
|
6
7
|
export declare function useMODUKComponent<ComponentName extends ComponentNameLiteral>(componentName: ComponentName): {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMODUKComponent.d.ts","sourceRoot":"","sources":["../../../../../src/react/internal/hooks/useMODUKComponent/useMODUKComponent.ts"],"names":[],"mappings":"AAEA,UAAU,gBAAgB;IACxB,SAAS,EAAE,cAAc,CAAA;IACzB,MAAM,EAAE,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"useMODUKComponent.d.ts","sourceRoot":"","sources":["../../../../../src/react/internal/hooks/useMODUKComponent/useMODUKComponent.ts"],"names":[],"mappings":"AAEA,UAAU,gBAAgB;IACxB,SAAS,EAAE,cAAc,CAAA;IACzB,MAAM,EAAE,WAAW,CAAA;IACnB,QAAQ,EAAE,iBAAiB,CAAA;CAC5B;AAED,KAAK,oBAAoB,GAAG,MAAM,gBAAgB,CAAA;AAUlD,wBAAgB,iBAAiB,CAC/B,aAAa,SAAS,oBAAoB,EAE1C,aAAa,EAAE,aAAa;;EAe7B"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
export interface SkipLinkProps extends ComponentPropsWithoutRef<'a'> {
|
|
3
|
+
/**
|
|
4
|
+
* The value of the skip link’s href attribute.
|
|
5
|
+
* Defaults to #content.
|
|
6
|
+
*/
|
|
7
|
+
href?: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Skip link.
|
|
11
|
+
*
|
|
12
|
+
* @experimental React components are in alpha and subject to change.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* <SkipLink href='#content'>Skip to main content</SkipLink>
|
|
16
|
+
*/
|
|
17
|
+
export declare const SkipLink: import("react").ForwardRefExoticComponent<SkipLinkProps & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
18
|
+
//# sourceMappingURL=SkipLink.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SkipLink.d.ts","sourceRoot":"","sources":["../../../src/react/skip-link/SkipLink.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,wBAAwB,EAAc,MAAM,OAAO,CAAA;AAIjE,MAAM,WAAW,aAAc,SAAQ,wBAAwB,CAAC,GAAG,CAAC;IAClE;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,QAAQ,6GAepB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/skip-link/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SkipLink } from '@moduk/frontend/react'
|
|
2
|
+
|
|
3
|
+
export const Example = () => (
|
|
4
|
+
<div>
|
|
5
|
+
<p className='govuk-body' id='content'>
|
|
6
|
+
To view the skip link component tab to this example, or click inside this example and press tab.
|
|
7
|
+
</p>
|
|
8
|
+
<SkipLink href='#content'>Skip to main content</SkipLink>
|
|
9
|
+
</div>
|
|
10
|
+
)
|