govuk-react 0.10.7 → 1.0.0-alpha.1
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/LICENSE +21 -0
- package/README.md +45 -52
- package/dist/components/accordion/index.d.ts +68 -0
- package/dist/components/accordion/index.js +104 -0
- package/dist/components/accordion/index.js.map +1 -0
- package/dist/components/back-link/index.d.ts +1 -0
- package/dist/components/back-link/index.js +2 -0
- package/dist/components/back-link/index.js.map +1 -0
- package/dist/components/body/index.d.ts +1 -0
- package/dist/components/body/index.js +2 -0
- package/dist/components/body/index.js.map +1 -0
- package/dist/components/breadcrumbs/index.d.ts +1 -0
- package/dist/components/breadcrumbs/index.js +2 -0
- package/dist/components/breadcrumbs/index.js.map +1 -0
- package/dist/components/button/index.d.ts +24 -0
- package/dist/components/button/index.js +17 -0
- package/dist/components/button/index.js.map +1 -0
- package/dist/components/caption/index.d.ts +1 -0
- package/dist/components/caption/index.js +2 -0
- package/dist/components/caption/index.js.map +1 -0
- package/dist/components/character-count/index.d.ts +36 -0
- package/dist/components/character-count/index.js +82 -0
- package/dist/components/character-count/index.js.map +1 -0
- package/dist/components/checkboxes/index.d.ts +49 -0
- package/dist/components/checkboxes/index.js +73 -0
- package/dist/components/checkboxes/index.js.map +1 -0
- package/dist/components/cookie-banner/index.d.ts +1 -0
- package/dist/components/cookie-banner/index.js +2 -0
- package/dist/components/cookie-banner/index.js.map +1 -0
- package/dist/components/date-input/index.d.ts +1 -0
- package/dist/components/date-input/index.js +2 -0
- package/dist/components/date-input/index.js.map +1 -0
- package/dist/components/details/index.d.ts +1 -0
- package/dist/components/details/index.js +2 -0
- package/dist/components/details/index.js.map +1 -0
- package/dist/components/document-footer-metadata/index.d.ts +35 -0
- package/dist/components/document-footer-metadata/index.js +36 -0
- package/dist/components/document-footer-metadata/index.js.map +1 -0
- package/dist/components/error-message/index.d.ts +1 -0
- package/dist/components/error-message/index.js +2 -0
- package/dist/components/error-message/index.js.map +1 -0
- package/dist/components/error-summary/index.d.ts +22 -0
- package/dist/components/error-summary/index.js +49 -0
- package/dist/components/error-summary/index.js.map +1 -0
- package/dist/components/exit-this-page/index.d.ts +33 -0
- package/dist/components/exit-this-page/index.js +66 -0
- package/dist/components/exit-this-page/index.js.map +1 -0
- package/dist/components/feedback/index.d.ts +1 -0
- package/dist/components/feedback/index.js +2 -0
- package/dist/components/feedback/index.js.map +1 -0
- package/dist/components/fieldset/index.d.ts +1 -0
- package/dist/components/fieldset/index.js +2 -0
- package/dist/components/fieldset/index.js.map +1 -0
- package/dist/components/file-upload/control.d.ts +6 -0
- package/dist/components/file-upload/control.js +9 -0
- package/dist/components/file-upload/control.js.map +1 -0
- package/dist/components/file-upload/enhanced.d.ts +45 -0
- package/dist/components/file-upload/enhanced.js +84 -0
- package/dist/components/file-upload/enhanced.js.map +1 -0
- package/dist/components/file-upload/index.d.ts +12 -0
- package/dist/components/file-upload/index.js +18 -0
- package/dist/components/file-upload/index.js.map +1 -0
- package/dist/components/footer/index.d.ts +1 -0
- package/dist/components/footer/index.js +2 -0
- package/dist/components/footer/index.js.map +1 -0
- package/dist/components/form-group/index.d.ts +1 -0
- package/dist/components/form-group/index.js +2 -0
- package/dist/components/form-group/index.js.map +1 -0
- package/dist/components/generic-header/index.d.ts +1 -0
- package/dist/components/generic-header/index.js +2 -0
- package/dist/components/generic-header/index.js.map +1 -0
- package/dist/components/grid-column/index.d.ts +1 -0
- package/dist/components/grid-column/index.js +2 -0
- package/dist/components/grid-column/index.js.map +1 -0
- package/dist/components/grid-row/index.d.ts +1 -0
- package/dist/components/grid-row/index.js +2 -0
- package/dist/components/grid-row/index.js.map +1 -0
- package/dist/components/header/index.d.ts +1 -0
- package/dist/components/header/index.js +2 -0
- package/dist/components/header/index.js.map +1 -0
- package/dist/components/heading/index.d.ts +1 -0
- package/dist/components/heading/index.js +2 -0
- package/dist/components/heading/index.js.map +1 -0
- package/dist/components/hint/index.d.ts +1 -0
- package/dist/components/hint/index.js +2 -0
- package/dist/components/hint/index.js.map +1 -0
- package/dist/components/input/index.d.ts +1 -0
- package/dist/components/input/index.js +2 -0
- package/dist/components/input/index.js.map +1 -0
- package/dist/components/inset-text/index.d.ts +1 -0
- package/dist/components/inset-text/index.js +2 -0
- package/dist/components/inset-text/index.js.map +1 -0
- package/dist/components/label/index.d.ts +1 -0
- package/dist/components/label/index.js +2 -0
- package/dist/components/label/index.js.map +1 -0
- package/dist/components/language-navigation/index.d.ts +1 -0
- package/dist/components/language-navigation/index.js +2 -0
- package/dist/components/language-navigation/index.js.map +1 -0
- package/dist/components/link/index.d.ts +1 -0
- package/dist/components/link/index.js +2 -0
- package/dist/components/link/index.js.map +1 -0
- package/dist/components/list/index.d.ts +1 -0
- package/dist/components/list/index.js +2 -0
- package/dist/components/list/index.js.map +1 -0
- package/dist/components/loading-box/index.d.ts +35 -0
- package/dist/components/loading-box/index.js +45 -0
- package/dist/components/loading-box/index.js.map +1 -0
- package/dist/components/main-wrapper/index.d.ts +1 -0
- package/dist/components/main-wrapper/index.js +2 -0
- package/dist/components/main-wrapper/index.js.map +1 -0
- package/dist/components/modal/index.d.ts +33 -0
- package/dist/components/modal/index.js +55 -0
- package/dist/components/modal/index.js.map +1 -0
- package/dist/components/notification-banner/index.d.ts +17 -0
- package/dist/components/notification-banner/index.js +44 -0
- package/dist/components/notification-banner/index.js.map +1 -0
- package/dist/components/page/index.d.ts +23 -0
- package/dist/components/page/index.js +22 -0
- package/dist/components/page/index.js.map +1 -0
- package/dist/components/pagination/index.d.ts +1 -0
- package/dist/components/pagination/index.js +2 -0
- package/dist/components/pagination/index.js.map +1 -0
- package/dist/components/panel/index.d.ts +1 -0
- package/dist/components/panel/index.js +2 -0
- package/dist/components/panel/index.js.map +1 -0
- package/dist/components/password-input/index.d.ts +26 -0
- package/dist/components/password-input/index.js +60 -0
- package/dist/components/password-input/index.js.map +1 -0
- package/dist/components/phase-banner/index.d.ts +1 -0
- package/dist/components/phase-banner/index.js +2 -0
- package/dist/components/phase-banner/index.js.map +1 -0
- package/dist/components/radios/index.d.ts +33 -0
- package/dist/components/radios/index.js +70 -0
- package/dist/components/radios/index.js.map +1 -0
- package/dist/components/related-items/index.d.ts +33 -0
- package/dist/components/related-items/index.js +45 -0
- package/dist/components/related-items/index.js.map +1 -0
- package/dist/components/search-box/index.d.ts +89 -0
- package/dist/components/search-box/index.js +136 -0
- package/dist/components/search-box/index.js.map +1 -0
- package/dist/components/section-break/index.d.ts +1 -0
- package/dist/components/section-break/index.js +2 -0
- package/dist/components/section-break/index.js.map +1 -0
- package/dist/components/select/index.d.ts +1 -0
- package/dist/components/select/index.js +2 -0
- package/dist/components/select/index.js.map +1 -0
- package/dist/components/service-navigation/index.d.ts +64 -0
- package/dist/components/service-navigation/index.js +131 -0
- package/dist/components/service-navigation/index.js.map +1 -0
- package/dist/components/skip-link/index.d.ts +12 -0
- package/dist/components/skip-link/index.js +16 -0
- package/dist/components/skip-link/index.js.map +1 -0
- package/dist/components/summary-list/index.d.ts +1 -0
- package/dist/components/summary-list/index.js +2 -0
- package/dist/components/summary-list/index.js.map +1 -0
- package/dist/components/table/index.d.ts +1 -0
- package/dist/components/table/index.js +2 -0
- package/dist/components/table/index.js.map +1 -0
- package/dist/components/tabs/index.d.ts +98 -0
- package/dist/components/tabs/index.js +105 -0
- package/dist/components/tabs/index.js.map +1 -0
- package/dist/components/tag/index.d.ts +1 -0
- package/dist/components/tag/index.js +2 -0
- package/dist/components/tag/index.js.map +1 -0
- package/dist/components/task-list/index.d.ts +1 -0
- package/dist/components/task-list/index.js +2 -0
- package/dist/components/task-list/index.js.map +1 -0
- package/dist/components/textarea/index.d.ts +1 -0
- package/dist/components/textarea/index.js +2 -0
- package/dist/components/textarea/index.js.map +1 -0
- package/dist/components/visually-hidden/index.d.ts +1 -0
- package/dist/components/visually-hidden/index.js +2 -0
- package/dist/components/visually-hidden/index.js.map +1 -0
- package/dist/components/warning-text/index.d.ts +1 -0
- package/dist/components/warning-text/index.js +2 -0
- package/dist/components/warning-text/index.js.map +1 -0
- package/dist/components/width-container/index.d.ts +1 -0
- package/dist/components/width-container/index.js +2 -0
- package/dist/components/width-container/index.js.map +1 -0
- package/dist/index.d.ts +58 -0
- package/dist/index.js +61 -0
- package/dist/index.js.map +1 -0
- package/dist/utils/join-ids.d.ts +2 -0
- package/dist/utils/join-ids.js +6 -0
- package/dist/utils/join-ids.js.map +1 -0
- package/package.json +38 -66
- package/dist/declarations/src/index.d.ts +0 -52
- package/dist/govuk-react.cjs.d.ts +0 -2
- package/dist/govuk-react.cjs.dev.js +0 -351
- package/dist/govuk-react.cjs.js +0 -7
- package/dist/govuk-react.cjs.prod.js +0 -351
- package/dist/govuk-react.esm.js +0 -51
- package/src/index.ts +0 -56
- package/src/test.tsx +0 -56
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
import * as Markup from 'govuk-frontend-react/tabs';
|
|
4
|
+
type BaseRootProps = Omit<Markup.RootProps, 'defaultValue' | 'onChange'> & {
|
|
5
|
+
/** Called when the user selects a tab. */
|
|
6
|
+
onValueChange?: (value: string) => void;
|
|
7
|
+
/**
|
|
8
|
+
* When controlled, what happens to a tab the user picked before hydration: "ignore" keeps
|
|
9
|
+
* `value`, "report" calls `onValueChange` with the pick so you can adopt it.
|
|
10
|
+
*/
|
|
11
|
+
preHydration?: 'ignore' | 'report';
|
|
12
|
+
/** The panels' radio group name. Defaults to a generated one. */
|
|
13
|
+
name?: string;
|
|
14
|
+
};
|
|
15
|
+
export type RootProps = BaseRootProps & {
|
|
16
|
+
/** The selected tab's value, to control the tabs. */
|
|
17
|
+
value?: string;
|
|
18
|
+
/** The tab selected at first, when uncontrolled. Defaults to the first tab. */
|
|
19
|
+
defaultValue?: string;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Tabs can be a helpful way of letting users quickly switch between related information.
|
|
23
|
+
*
|
|
24
|
+
* As in govuk-frontend, without JavaScript the tabs are a list of links to every panel. Use `Tab`
|
|
25
|
+
* and `Panel` inside it. Each tab's `value` is its panel's id.
|
|
26
|
+
*
|
|
27
|
+
* @see https://design-system.service.gov.uk/components/tabs/
|
|
28
|
+
*/
|
|
29
|
+
export declare function Root({ value, defaultValue, onValueChange, preHydration, name, ...props }: RootProps): React.JSX.Element;
|
|
30
|
+
export type RadiosRootProps = BaseRootProps & ({
|
|
31
|
+
value: string;
|
|
32
|
+
defaultValue?: string;
|
|
33
|
+
} | {
|
|
34
|
+
value?: string;
|
|
35
|
+
defaultValue: string;
|
|
36
|
+
});
|
|
37
|
+
/**
|
|
38
|
+
* Tabs that switch panels without JavaScript too, through a hidden radio in each panel. Use
|
|
39
|
+
* `RadioTab` and `RadioPanel` inside it. Each tab's `value` is its panel's id.
|
|
40
|
+
*
|
|
41
|
+
* @see https://design-system.service.gov.uk/components/tabs/
|
|
42
|
+
*/
|
|
43
|
+
export declare function RadiosRoot({ value, defaultValue, onValueChange, preHydration, name, ...props }: RadiosRootProps): React.JSX.Element;
|
|
44
|
+
export { Title, type TitleProps } from 'govuk-frontend-react/tabs';
|
|
45
|
+
export type ListProps = Markup.ListProps;
|
|
46
|
+
export declare function List(props: ListProps): React.JSX.Element;
|
|
47
|
+
export type ListItemProps = Markup.ListItemProps & {
|
|
48
|
+
/** The value of the tab inside it. */
|
|
49
|
+
value: string;
|
|
50
|
+
};
|
|
51
|
+
export declare function ListItem({ value, selected, ...props }: ListItemProps): React.JSX.Element;
|
|
52
|
+
export type TabProps = Omit<Markup.TabProps, 'href' | 'asChild'> & {
|
|
53
|
+
/** Its panel's value, which is the panel's id. */
|
|
54
|
+
value: string;
|
|
55
|
+
};
|
|
56
|
+
/** A tab in a `Root`: a link to its panel. */
|
|
57
|
+
export declare function Tab({ value, children, ...props }: TabProps): React.JSX.Element;
|
|
58
|
+
export type RadioTabProps = TabProps & {
|
|
59
|
+
/** The panels' radio group name. Set by RadiosRoot: pass it to a tab rendered without one, such as in an island. */
|
|
60
|
+
name?: string;
|
|
61
|
+
};
|
|
62
|
+
/** A tab in a `RadiosRoot`: a label for its panel's radio. */
|
|
63
|
+
export declare function RadioTab({ value, name, children, ...props }: RadioTabProps): React.JSX.Element;
|
|
64
|
+
export type PanelProps = Omit<Markup.PanelProps, 'id'> & {
|
|
65
|
+
/** Its tab's value, which is the panel's id. */
|
|
66
|
+
value: string;
|
|
67
|
+
/** The panels' radio group name. Set by Root: pass it to a panel rendered without one, such as in an island. */
|
|
68
|
+
name?: string;
|
|
69
|
+
};
|
|
70
|
+
/** A panel in a `Root`. */
|
|
71
|
+
export declare function Panel({ value, selected, name, ...props }: PanelProps): React.JSX.Element;
|
|
72
|
+
export type RadioPanelProps = PanelProps;
|
|
73
|
+
/** A panel in a `RadiosRoot`, shown without JavaScript only while its tab is chosen. */
|
|
74
|
+
export declare function RadioPanel({ value, selected, name, ...props }: RadioPanelProps): React.JSX.Element;
|
|
75
|
+
export type CompositeItem = {
|
|
76
|
+
/** The panel's id, and the tab's value. */
|
|
77
|
+
id: string;
|
|
78
|
+
label: ReactNode;
|
|
79
|
+
panel: ReactNode;
|
|
80
|
+
};
|
|
81
|
+
export type CompositeProps = Omit<RootProps, 'title'> & {
|
|
82
|
+
/** The heading shown above the list of links when the tabs aren't shown. Defaults to "Contents". */
|
|
83
|
+
title?: ReactNode;
|
|
84
|
+
items: CompositeItem[];
|
|
85
|
+
};
|
|
86
|
+
/** The tabs, with a tab and panel for each item. Without JavaScript, a list of links to every panel. */
|
|
87
|
+
export declare function Composite({ title, items, value, defaultValue, ...props }: CompositeProps): React.JSX.Element;
|
|
88
|
+
export type RadiosCompositeProps = Omit<BaseRootProps, 'title'> & {
|
|
89
|
+
/** The heading shown above the list of tabs when they aren't styled as tabs. Defaults to "Contents". */
|
|
90
|
+
title?: ReactNode;
|
|
91
|
+
items: CompositeItem[];
|
|
92
|
+
/** The selected tab's value, to control the tabs. */
|
|
93
|
+
value?: string;
|
|
94
|
+
/** The tab selected at first, when uncontrolled. Defaults to the first tab. */
|
|
95
|
+
defaultValue?: string;
|
|
96
|
+
};
|
|
97
|
+
/** The tabs, with a tab and panel for each item. They switch panels without JavaScript too. */
|
|
98
|
+
export declare function RadiosComposite({ title, items, value, defaultValue, ...props }: RadiosCompositeProps): React.JSX.Element;
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { createContext, useContext } from 'react';
|
|
3
|
+
import * as Primitives from '@govuk-react/primitives/tabs';
|
|
4
|
+
import * as Markup from 'govuk-frontend-react/tabs';
|
|
5
|
+
/*
|
|
6
|
+
* govuk-frontend-react's Tabs markup, with the tab behaviour from @govuk-react/primitives. The
|
|
7
|
+
* behaviour matches govuk-frontend's: tabs from tablet width up, and a list of links to every
|
|
8
|
+
* panel below it or without JavaScript. With `RadiosRoot`, tabs switch without JavaScript too.
|
|
9
|
+
*/
|
|
10
|
+
// Fills in defaults only: in an island without a Root, pass `selected` to the parts.
|
|
11
|
+
const TabsContext = createContext({});
|
|
12
|
+
/** govuk-frontend's tablet breakpoint, where its tabs start. */
|
|
13
|
+
const tablet = '(min-width: 40.0625em)';
|
|
14
|
+
// The classes govuk-frontend's styles key off.
|
|
15
|
+
const classes = {
|
|
16
|
+
media: tablet,
|
|
17
|
+
// govuk-frontend styles tabs under `govuk-frontend-supported`, which its JavaScript adds to the body.
|
|
18
|
+
upgradedClass: 'govuk-frontend-supported',
|
|
19
|
+
activeItemClass: 'govuk-tabs__list-item--selected',
|
|
20
|
+
hiddenContentClass: 'govuk-tabs__panel--hidden',
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Tabs can be a helpful way of letting users quickly switch between related information.
|
|
24
|
+
*
|
|
25
|
+
* As in govuk-frontend, without JavaScript the tabs are a list of links to every panel. Use `Tab`
|
|
26
|
+
* and `Panel` inside it. Each tab's `value` is its panel's id.
|
|
27
|
+
*
|
|
28
|
+
* @see https://design-system.service.gov.uk/components/tabs/
|
|
29
|
+
*/
|
|
30
|
+
export function Root({ value, defaultValue, onValueChange, preHydration, name, ...props }) {
|
|
31
|
+
return (React.createElement(TabsContext.Provider, { value: { selected: value !== null && value !== void 0 ? value : defaultValue } },
|
|
32
|
+
React.createElement(Primitives.Root, { value: value, defaultValue: defaultValue, onValueChange: onValueChange, preHydration: preHydration, name: name, ...classes },
|
|
33
|
+
React.createElement(Markup.Root, { ...props }))));
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Tabs that switch panels without JavaScript too, through a hidden radio in each panel. Use
|
|
37
|
+
* `RadioTab` and `RadioPanel` inside it. Each tab's `value` is its panel's id.
|
|
38
|
+
*
|
|
39
|
+
* @see https://design-system.service.gov.uk/components/tabs/
|
|
40
|
+
*/
|
|
41
|
+
export function RadiosRoot({ value, defaultValue, onValueChange, preHydration, name, ...props }) {
|
|
42
|
+
const selection = value !== undefined ? { value, defaultValue } : { defaultValue: defaultValue !== null && defaultValue !== void 0 ? defaultValue : '' };
|
|
43
|
+
return (React.createElement(TabsContext.Provider, { value: { selected: value !== null && value !== void 0 ? value : defaultValue } },
|
|
44
|
+
React.createElement(Primitives.RadiosRoot, { ...selection, onValueChange: onValueChange, preHydration: preHydration, name: name, ...classes },
|
|
45
|
+
React.createElement(Markup.Root, { ...props }))));
|
|
46
|
+
}
|
|
47
|
+
export { Title } from 'govuk-frontend-react/tabs';
|
|
48
|
+
export function List(props) {
|
|
49
|
+
return (React.createElement(Primitives.List, { asChild: true },
|
|
50
|
+
React.createElement(Markup.List, { ...props })));
|
|
51
|
+
}
|
|
52
|
+
function useSelected(value, selected) {
|
|
53
|
+
const context = useContext(TabsContext);
|
|
54
|
+
// With no value set, the first tab is selected, which the parts can't know: the element selects it.
|
|
55
|
+
return selected !== null && selected !== void 0 ? selected : value === context.selected;
|
|
56
|
+
}
|
|
57
|
+
export function ListItem({ value, selected, ...props }) {
|
|
58
|
+
return (React.createElement(Primitives.Item, { value: value, asChild: true },
|
|
59
|
+
React.createElement(Markup.ListItem, { selected: useSelected(value, selected), ...props })));
|
|
60
|
+
}
|
|
61
|
+
/** A tab in a `Root`: a link to its panel. */
|
|
62
|
+
export function Tab({ value, children, ...props }) {
|
|
63
|
+
return (React.createElement(Primitives.Trigger, { value: value, asChild: true },
|
|
64
|
+
React.createElement(Markup.Tab, { ...props }, children)));
|
|
65
|
+
}
|
|
66
|
+
/** A tab in a `RadiosRoot`: a label for its panel's radio. */
|
|
67
|
+
export function RadioTab({ value, name, children, ...props }) {
|
|
68
|
+
return (React.createElement(Primitives.RadioTrigger, { value: value, name: name, asChild: true },
|
|
69
|
+
React.createElement(Markup.Tab, { asChild: true, ...props },
|
|
70
|
+
React.createElement("label", null, children))));
|
|
71
|
+
}
|
|
72
|
+
/** A panel in a `Root`. */
|
|
73
|
+
export function Panel({ value, selected, name, ...props }) {
|
|
74
|
+
const isSelected = useSelected(value, selected);
|
|
75
|
+
return (React.createElement(Primitives.Content, { value: value, name: name, defaultSelected: isSelected, asChild: true },
|
|
76
|
+
React.createElement(Markup.Panel, { selected: isSelected, ...props })));
|
|
77
|
+
}
|
|
78
|
+
/** A panel in a `RadiosRoot`, shown without JavaScript only while its tab is chosen. */
|
|
79
|
+
export function RadioPanel({ value, selected, name, ...props }) {
|
|
80
|
+
const isSelected = useSelected(value, selected);
|
|
81
|
+
return (React.createElement(Primitives.RadioContent, { value: value, name: name, defaultSelected: isSelected, asChild: true },
|
|
82
|
+
React.createElement(Markup.Panel, { selected: isSelected, ...props })));
|
|
83
|
+
}
|
|
84
|
+
/** The tabs, with a tab and panel for each item. Without JavaScript, a list of links to every panel. */
|
|
85
|
+
export function Composite({ title, items, value, defaultValue, ...props }) {
|
|
86
|
+
var _a;
|
|
87
|
+
// As in govuk-frontend, the first tab is selected unless another is.
|
|
88
|
+
const initial = value === undefined ? (defaultValue !== null && defaultValue !== void 0 ? defaultValue : (_a = items[0]) === null || _a === void 0 ? void 0 : _a.id) : defaultValue;
|
|
89
|
+
return (React.createElement(Root, { ...props, value: value, defaultValue: initial },
|
|
90
|
+
React.createElement(Markup.Title, null, title),
|
|
91
|
+
React.createElement(List, null, items.map((item) => (React.createElement(ListItem, { key: item.id, value: item.id },
|
|
92
|
+
React.createElement(Tab, { value: item.id }, item.label))))),
|
|
93
|
+
items.map((item) => (React.createElement(Panel, { key: item.id, value: item.id }, item.panel)))));
|
|
94
|
+
}
|
|
95
|
+
/** The tabs, with a tab and panel for each item. They switch panels without JavaScript too. */
|
|
96
|
+
export function RadiosComposite({ title, items, value, defaultValue, ...props }) {
|
|
97
|
+
var _a, _b;
|
|
98
|
+
const initial = (_b = defaultValue !== null && defaultValue !== void 0 ? defaultValue : (_a = items[0]) === null || _a === void 0 ? void 0 : _a.id) !== null && _b !== void 0 ? _b : '';
|
|
99
|
+
return (React.createElement(RadiosRoot, { ...props, value: value, defaultValue: initial },
|
|
100
|
+
React.createElement(Markup.Title, null, title),
|
|
101
|
+
React.createElement(List, null, items.map((item) => (React.createElement(ListItem, { key: item.id, value: item.id },
|
|
102
|
+
React.createElement(RadioTab, { value: item.id }, item.label))))),
|
|
103
|
+
items.map((item) => (React.createElement(RadioPanel, { key: item.id, value: item.id }, item.panel)))));
|
|
104
|
+
}
|
|
105
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/tabs/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAElD,OAAO,KAAK,UAAU,MAAM,8BAA8B,CAAC;AAC3D,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AAEpD;;;;GAIG;AAEH,qFAAqF;AACrF,MAAM,WAAW,GAAG,aAAa,CAAwB,EAAE,CAAC,CAAC;AAE7D,gEAAgE;AAChE,MAAM,MAAM,GAAG,wBAAwB,CAAC;AAqBxC,+CAA+C;AAC/C,MAAM,OA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E,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE;YACpC,oBAAC,QAAQ,IAAC,KAAK,EAAE,IAAI,CAAC,EAAE,IAAG,IAAI,CAAC,KAAK,CAAY,CACxC,CACZ,CAAC,CACG;QACN,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CACnB,oBAAC,UAAU,IAAC,GAAG,EAAE,IAAI,CAAC,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,IACrC,IAAI,CAAC,KAAK,CACA,CACd,CAAC,CACS,CACd,CAAC;AACJ,CAAC","sourcesContent":["import * as React from 'react';\nimport { createContext, useContext } from 'react';\nimport type { ReactNode } from 'react';\nimport * as Primitives from '@govuk-react/primitives/tabs';\nimport * as Markup from 'govuk-frontend-react/tabs';\n\n/*\n * govuk-frontend-react's Tabs markup, with the tab behaviour from @govuk-react/primitives. The\n * behaviour matches govuk-frontend's: tabs from tablet width up, and a list of links to every\n * panel below it or without JavaScript. With `RadiosRoot`, tabs switch without JavaScript too.\n */\n\n// Fills in defaults only: in an island without a Root, pass `selected` to the parts.\nconst TabsContext = createContext<{ selected?: string }>({});\n\n/** govuk-frontend's tablet breakpoint, where its tabs start. */\nconst tablet = '(min-width: 40.0625em)';\n\ntype BaseRootProps = Omit<Markup.RootProps, 'defaultValue' | 'onChange'> & {\n /** Called when the user selects a tab. */\n onValueChange?: (value: string) => void;\n /**\n * When controlled, what happens to a tab the user picked before hydration: \"ignore\" keeps\n * `value`, \"report\" calls `onValueChange` with the pick so you can adopt it.\n */\n preHydration?: 'ignore' | 'report';\n /** The panels' radio group name. Defaults to a generated one. */\n name?: string;\n};\n\nexport type RootProps = BaseRootProps & {\n /** The selected tab's value, to control the tabs. */\n value?: string;\n /** The tab selected at first, when uncontrolled. Defaults to the first tab. */\n defaultValue?: string;\n};\n\n// The classes govuk-frontend's styles key off.\nconst classes = {\n media: tablet,\n // govuk-frontend styles tabs under `govuk-frontend-supported`, which its JavaScript adds to the body.\n upgradedClass: 'govuk-frontend-supported',\n activeItemClass: 'govuk-tabs__list-item--selected',\n hiddenContentClass: 'govuk-tabs__panel--hidden',\n};\n\n/**\n * Tabs can be a helpful way of letting users quickly switch between related information.\n *\n * As in govuk-frontend, without JavaScript the tabs are a list of links to every panel. Use `Tab`\n * and `Panel` inside it. Each tab's `value` is its panel's id.\n *\n * @see https://design-system.service.gov.uk/components/tabs/\n */\nexport function Root({ value, defaultValue, onValueChange, preHydration, name, ...props }: RootProps) {\n return (\n <TabsContext.Provider value={{ selected: value ?? defaultValue }}>\n <Primitives.Root\n value={value}\n defaultValue={defaultValue}\n onValueChange={onValueChange}\n preHydration={preHydration}\n name={name}\n {...classes}\n >\n <Markup.Root {...props} />\n </Primitives.Root>\n </TabsContext.Provider>\n );\n}\n\nexport type RadiosRootProps = BaseRootProps &\n // Without JavaScript only the checked radio's panel shows, so one must be selected from the start.\n ({ value: string; defaultValue?: string } | { value?: string; defaultValue: string });\n\n/**\n * Tabs that switch panels without JavaScript too, through a hidden radio in each panel. Use\n * `RadioTab` and `RadioPanel` inside it. Each tab's `value` is its panel's id.\n *\n * @see https://design-system.service.gov.uk/components/tabs/\n */\nexport function RadiosRoot({ value, defaultValue, onValueChange, preHydration, name, ...props }: RadiosRootProps) {\n const selection: Pick<Primitives.RadiosRootProps, 'value' | 'defaultValue'> &\n ({ value: string } | { defaultValue: string }) =\n value !== undefined ? { value, defaultValue } : { defaultValue: defaultValue ?? '' };\n return (\n <TabsContext.Provider value={{ selected: value ?? defaultValue }}>\n <Primitives.RadiosRoot\n {...selection}\n onValueChange={onValueChange}\n preHydration={preHydration}\n name={name}\n {...classes}\n >\n <Markup.Root {...props} />\n </Primitives.RadiosRoot>\n </TabsContext.Provider>\n );\n}\n\nexport { Title, type TitleProps } from 'govuk-frontend-react/tabs';\n\nexport type ListProps = Markup.ListProps;\n\nexport function List(props: ListProps) {\n return (\n <Primitives.List asChild>\n <Markup.List {...props} />\n </Primitives.List>\n );\n}\n\nfunction useSelected(value: string, selected: boolean | undefined) {\n const context = useContext(TabsContext);\n // With no value set, the first tab is selected, which the parts can't know: the element selects it.\n return selected ?? value === context.selected;\n}\n\nexport type ListItemProps = Markup.ListItemProps & {\n /** The value of the tab inside it. */\n value: string;\n};\n\nexport function ListItem({ value, selected, ...props }: ListItemProps) {\n return (\n <Primitives.Item value={value} asChild>\n <Markup.ListItem selected={useSelected(value, selected)} {...props} />\n </Primitives.Item>\n );\n}\n\nexport type TabProps = Omit<Markup.TabProps, 'href' | 'asChild'> & {\n /** Its panel's value, which is the panel's id. */\n value: string;\n};\n\n/** A tab in a `Root`: a link to its panel. */\nexport function Tab({ value, children, ...props }: TabProps) {\n return (\n <Primitives.Trigger value={value} asChild>\n <Markup.Tab {...props}>{children}</Markup.Tab>\n </Primitives.Trigger>\n );\n}\n\nexport type RadioTabProps = TabProps & {\n /** The panels' radio group name. Set by RadiosRoot: pass it to a tab rendered without one, such as in an island. */\n name?: string;\n};\n\n/** A tab in a `RadiosRoot`: a label for its panel's radio. */\nexport function RadioTab({ value, name, children, ...props }: RadioTabProps) {\n return (\n <Primitives.RadioTrigger value={value} name={name} asChild>\n <Markup.Tab asChild {...props}>\n <label>{children}</label>\n </Markup.Tab>\n </Primitives.RadioTrigger>\n );\n}\n\nexport type PanelProps = Omit<Markup.PanelProps, 'id'> & {\n /** Its tab's value, which is the panel's id. */\n value: string;\n /** The panels' radio group name. Set by Root: pass it to a panel rendered without one, such as in an island. */\n name?: string;\n};\n\n/** A panel in a `Root`. */\nexport function Panel({ value, selected, name, ...props }: PanelProps) {\n const isSelected = useSelected(value, selected);\n return (\n <Primitives.Content value={value} name={name} defaultSelected={isSelected} asChild>\n <Markup.Panel selected={isSelected} {...props} />\n </Primitives.Content>\n );\n}\n\nexport type RadioPanelProps = PanelProps;\n\n/** A panel in a `RadiosRoot`, shown without JavaScript only while its tab is chosen. */\nexport function RadioPanel({ value, selected, name, ...props }: RadioPanelProps) {\n const isSelected = useSelected(value, selected);\n return (\n <Primitives.RadioContent value={value} name={name} defaultSelected={isSelected} asChild>\n <Markup.Panel selected={isSelected} {...props} />\n </Primitives.RadioContent>\n );\n}\n\nexport type CompositeItem = {\n /** The panel's id, and the tab's value. */\n id: string;\n label: ReactNode;\n panel: ReactNode;\n};\n\nexport type CompositeProps = Omit<RootProps, 'title'> & {\n /** The heading shown above the list of links when the tabs aren't shown. Defaults to \"Contents\". */\n title?: ReactNode;\n items: CompositeItem[];\n};\n\n/** The tabs, with a tab and panel for each item. Without JavaScript, a list of links to every panel. */\nexport function Composite({ title, items, value, defaultValue, ...props }: CompositeProps) {\n // As in govuk-frontend, the first tab is selected unless another is.\n const initial = value === undefined ? (defaultValue ?? items[0]?.id) : defaultValue;\n return (\n <Root {...props} value={value} defaultValue={initial}>\n <Markup.Title>{title}</Markup.Title>\n <List>\n {items.map((item) => (\n <ListItem key={item.id} value={item.id}>\n <Tab value={item.id}>{item.label}</Tab>\n </ListItem>\n ))}\n </List>\n {items.map((item) => (\n <Panel key={item.id} value={item.id}>\n {item.panel}\n </Panel>\n ))}\n </Root>\n );\n}\n\nexport type RadiosCompositeProps = Omit<BaseRootProps, 'title'> & {\n /** The heading shown above the list of tabs when they aren't styled as tabs. Defaults to \"Contents\". */\n title?: ReactNode;\n items: CompositeItem[];\n /** The selected tab's value, to control the tabs. */\n value?: string;\n /** The tab selected at first, when uncontrolled. Defaults to the first tab. */\n defaultValue?: string;\n};\n\n/** The tabs, with a tab and panel for each item. They switch panels without JavaScript too. */\nexport function RadiosComposite({ title, items, value, defaultValue, ...props }: RadiosCompositeProps) {\n const initial = defaultValue ?? items[0]?.id ?? '';\n return (\n <RadiosRoot {...props} value={value} defaultValue={initial}>\n <Markup.Title>{title}</Markup.Title>\n <List>\n {items.map((item) => (\n <ListItem key={item.id} value={item.id}>\n <RadioTab value={item.id}>{item.label}</RadioTab>\n </ListItem>\n ))}\n </List>\n {items.map((item) => (\n <RadioPanel key={item.id} value={item.id}>\n {item.panel}\n </RadioPanel>\n ))}\n </RadiosRoot>\n );\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Tag, type TagProps } from 'govuk-frontend-react/tag';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/tag/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAiB,MAAM,0BAA0B,CAAC","sourcesContent":["export { Tag, type TagProps } from 'govuk-frontend-react/tag';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from 'govuk-frontend-react/task-list';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/task-list/index.tsx"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC","sourcesContent":["export * from 'govuk-frontend-react/task-list';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from 'govuk-frontend-react/textarea';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/textarea/index.tsx"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC","sourcesContent":["export * from 'govuk-frontend-react/textarea';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { VisuallyHidden, type VisuallyHiddenProps } from 'govuk-frontend-react/visually-hidden';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/visually-hidden/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAA4B,MAAM,sCAAsC,CAAC","sourcesContent":["export { VisuallyHidden, type VisuallyHiddenProps } from 'govuk-frontend-react/visually-hidden';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from 'govuk-frontend-react/warning-text';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/warning-text/index.tsx"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC","sourcesContent":["export * from 'govuk-frontend-react/warning-text';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { WidthContainer, type WidthContainerProps } from 'govuk-frontend-react/width-container';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/width-container/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAA4B,MAAM,sCAAsC,CAAC","sourcesContent":["export { WidthContainer, type WidthContainerProps } from 'govuk-frontend-react/width-container';\n"]}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
export * as Accordion from './components/accordion/index.js';
|
|
2
|
+
export { BackLink } from './components/back-link/index.js';
|
|
3
|
+
export { Body } from './components/body/index.js';
|
|
4
|
+
export * as Breadcrumbs from './components/breadcrumbs/index.js';
|
|
5
|
+
export * from './components/button/index.js';
|
|
6
|
+
export { Caption } from './components/caption/index.js';
|
|
7
|
+
export * as CharacterCount from './components/character-count/index.js';
|
|
8
|
+
export * as Checkboxes from './components/checkboxes/index.js';
|
|
9
|
+
export * as CookieBanner from './components/cookie-banner/index.js';
|
|
10
|
+
export * as DateInput from './components/date-input/index.js';
|
|
11
|
+
export * as Details from './components/details/index.js';
|
|
12
|
+
export * as DocumentFooterMetadata from './components/document-footer-metadata/index.js';
|
|
13
|
+
export { ErrorMessage, ErrorMessageComposite } from './components/error-message/index.js';
|
|
14
|
+
export * as ErrorSummary from './components/error-summary/index.js';
|
|
15
|
+
export * as ExitThisPage from './components/exit-this-page/index.js';
|
|
16
|
+
export * as Feedback from './components/feedback/index.js';
|
|
17
|
+
export * as Fieldset from './components/fieldset/index.js';
|
|
18
|
+
export * from './components/file-upload/index.js';
|
|
19
|
+
export * as Footer from './components/footer/index.js';
|
|
20
|
+
export { FormGroup } from './components/form-group/index.js';
|
|
21
|
+
export * as GenericHeader from './components/generic-header/index.js';
|
|
22
|
+
export { GridColumn } from './components/grid-column/index.js';
|
|
23
|
+
export { GridRow } from './components/grid-row/index.js';
|
|
24
|
+
export * as Header from './components/header/index.js';
|
|
25
|
+
export { Heading } from './components/heading/index.js';
|
|
26
|
+
export { Hint } from './components/hint/index.js';
|
|
27
|
+
export * from './components/input/index.js';
|
|
28
|
+
export { InsetText } from './components/inset-text/index.js';
|
|
29
|
+
export { Label, LabelComposite, LabelWrapper } from './components/label/index.js';
|
|
30
|
+
export * as LanguageNavigation from './components/language-navigation/index.js';
|
|
31
|
+
export { Link } from './components/link/index.js';
|
|
32
|
+
export { List } from './components/list/index.js';
|
|
33
|
+
export { LoadingBox } from './components/loading-box/index.js';
|
|
34
|
+
export { MainWrapper } from './components/main-wrapper/index.js';
|
|
35
|
+
export * as NotificationBanner from './components/notification-banner/index.js';
|
|
36
|
+
export { Page } from './components/page/index.js';
|
|
37
|
+
export * as Modal from './components/modal/index.js';
|
|
38
|
+
export * as PasswordInput from './components/password-input/index.js';
|
|
39
|
+
export * as Pagination from './components/pagination/index.js';
|
|
40
|
+
export * as Panel from './components/panel/index.js';
|
|
41
|
+
export * as PhaseBanner from './components/phase-banner/index.js';
|
|
42
|
+
export * as Radios from './components/radios/index.js';
|
|
43
|
+
export * as RelatedItems from './components/related-items/index.js';
|
|
44
|
+
export * as SearchBox from './components/search-box/index.js';
|
|
45
|
+
export { SectionBreak } from './components/section-break/index.js';
|
|
46
|
+
export * from './components/select/index.js';
|
|
47
|
+
export * as ServiceNavigation from './components/service-navigation/index.js';
|
|
48
|
+
export { SkipLink } from './components/skip-link/index.js';
|
|
49
|
+
export * as SummaryList from './components/summary-list/index.js';
|
|
50
|
+
export * as Table from './components/table/index.js';
|
|
51
|
+
export * as Tabs from './components/tabs/index.js';
|
|
52
|
+
export { Tag } from './components/tag/index.js';
|
|
53
|
+
export * as TaskList from './components/task-list/index.js';
|
|
54
|
+
export * from './components/textarea/index.js';
|
|
55
|
+
export { VisuallyHidden } from './components/visually-hidden/index.js';
|
|
56
|
+
export * from './components/warning-text/index.js';
|
|
57
|
+
export { WidthContainer } from './components/width-container/index.js';
|
|
58
|
+
export { overrideClasses, type OverrideProps, type FluidWidth, type Spacing } from 'govuk-frontend-react/overrides';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
// Components
|
|
2
|
+
export * as Accordion from './components/accordion/index.js';
|
|
3
|
+
export { BackLink } from './components/back-link/index.js';
|
|
4
|
+
export { Body } from './components/body/index.js';
|
|
5
|
+
export * as Breadcrumbs from './components/breadcrumbs/index.js';
|
|
6
|
+
export * from './components/button/index.js';
|
|
7
|
+
export { Caption } from './components/caption/index.js';
|
|
8
|
+
export * as CharacterCount from './components/character-count/index.js';
|
|
9
|
+
export * as Checkboxes from './components/checkboxes/index.js';
|
|
10
|
+
export * as CookieBanner from './components/cookie-banner/index.js';
|
|
11
|
+
export * as DateInput from './components/date-input/index.js';
|
|
12
|
+
export * as Details from './components/details/index.js';
|
|
13
|
+
export * as DocumentFooterMetadata from './components/document-footer-metadata/index.js';
|
|
14
|
+
export { ErrorMessage, ErrorMessageComposite } from './components/error-message/index.js';
|
|
15
|
+
export * as ErrorSummary from './components/error-summary/index.js';
|
|
16
|
+
export * as ExitThisPage from './components/exit-this-page/index.js';
|
|
17
|
+
export * as Feedback from './components/feedback/index.js';
|
|
18
|
+
export * as Fieldset from './components/fieldset/index.js';
|
|
19
|
+
export * from './components/file-upload/index.js';
|
|
20
|
+
export * as Footer from './components/footer/index.js';
|
|
21
|
+
export { FormGroup } from './components/form-group/index.js';
|
|
22
|
+
export * as GenericHeader from './components/generic-header/index.js';
|
|
23
|
+
export { GridColumn } from './components/grid-column/index.js';
|
|
24
|
+
export { GridRow } from './components/grid-row/index.js';
|
|
25
|
+
export * as Header from './components/header/index.js';
|
|
26
|
+
export { Heading } from './components/heading/index.js';
|
|
27
|
+
export { Hint } from './components/hint/index.js';
|
|
28
|
+
export * from './components/input/index.js';
|
|
29
|
+
export { InsetText } from './components/inset-text/index.js';
|
|
30
|
+
export { Label, LabelComposite, LabelWrapper } from './components/label/index.js';
|
|
31
|
+
export * as LanguageNavigation from './components/language-navigation/index.js';
|
|
32
|
+
export { Link } from './components/link/index.js';
|
|
33
|
+
export { List } from './components/list/index.js';
|
|
34
|
+
export { LoadingBox } from './components/loading-box/index.js';
|
|
35
|
+
export { MainWrapper } from './components/main-wrapper/index.js';
|
|
36
|
+
export * as NotificationBanner from './components/notification-banner/index.js';
|
|
37
|
+
export { Page } from './components/page/index.js';
|
|
38
|
+
export * as Modal from './components/modal/index.js';
|
|
39
|
+
export * as PasswordInput from './components/password-input/index.js';
|
|
40
|
+
export * as Pagination from './components/pagination/index.js';
|
|
41
|
+
export * as Panel from './components/panel/index.js';
|
|
42
|
+
export * as PhaseBanner from './components/phase-banner/index.js';
|
|
43
|
+
export * as Radios from './components/radios/index.js';
|
|
44
|
+
export * as RelatedItems from './components/related-items/index.js';
|
|
45
|
+
export * as SearchBox from './components/search-box/index.js';
|
|
46
|
+
export { SectionBreak } from './components/section-break/index.js';
|
|
47
|
+
export * from './components/select/index.js';
|
|
48
|
+
export * as ServiceNavigation from './components/service-navigation/index.js';
|
|
49
|
+
export { SkipLink } from './components/skip-link/index.js';
|
|
50
|
+
export * as SummaryList from './components/summary-list/index.js';
|
|
51
|
+
export * as Table from './components/table/index.js';
|
|
52
|
+
export * as Tabs from './components/tabs/index.js';
|
|
53
|
+
export { Tag } from './components/tag/index.js';
|
|
54
|
+
export * as TaskList from './components/task-list/index.js';
|
|
55
|
+
export * from './components/textarea/index.js';
|
|
56
|
+
export { VisuallyHidden } from './components/visually-hidden/index.js';
|
|
57
|
+
export * from './components/warning-text/index.js';
|
|
58
|
+
export { WidthContainer } from './components/width-container/index.js';
|
|
59
|
+
// govuk-frontend override classes (govuk-!-*)
|
|
60
|
+
export { overrideClasses } from 'govuk-frontend-react/overrides';
|
|
61
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
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OAAO,EAAE,GAAG,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,iCAAiC,CAAC;AAC5D,cAAc,gCAAgC,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AACvE,cAAc,oCAAoC,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAEvE,8CAA8C;AAC9C,OAAO,EAAE,eAAe,EAAqD,MAAM,gCAAgC,CAAC","sourcesContent":["// Components\nexport * as Accordion from './components/accordion/index.js';\nexport { BackLink } from './components/back-link/index.js';\nexport { Body } from './components/body/index.js';\nexport * as Breadcrumbs from './components/breadcrumbs/index.js';\nexport * from './components/button/index.js';\nexport { Caption } from './components/caption/index.js';\nexport * as CharacterCount from './components/character-count/index.js';\nexport * as Checkboxes from './components/checkboxes/index.js';\nexport * as CookieBanner from './components/cookie-banner/index.js';\nexport * as DateInput from './components/date-input/index.js';\nexport * as Details from './components/details/index.js';\nexport * as DocumentFooterMetadata from './components/document-footer-metadata/index.js';\nexport { ErrorMessage, ErrorMessageComposite } from './components/error-message/index.js';\nexport * as ErrorSummary from './components/error-summary/index.js';\nexport * as ExitThisPage from './components/exit-this-page/index.js';\nexport * as Feedback from './components/feedback/index.js';\nexport * as Fieldset from './components/fieldset/index.js';\nexport * from './components/file-upload/index.js';\nexport * as Footer from './components/footer/index.js';\nexport { FormGroup } from './components/form-group/index.js';\nexport * as GenericHeader from './components/generic-header/index.js';\nexport { GridColumn } from './components/grid-column/index.js';\nexport { GridRow } from './components/grid-row/index.js';\nexport * as Header from './components/header/index.js';\nexport { Heading } from './components/heading/index.js';\nexport { Hint } from './components/hint/index.js';\nexport * from './components/input/index.js';\nexport { InsetText } from './components/inset-text/index.js';\nexport { Label, LabelComposite, LabelWrapper } from './components/label/index.js';\nexport * as LanguageNavigation from './components/language-navigation/index.js';\nexport { Link } from './components/link/index.js';\nexport { List } from './components/list/index.js';\nexport { LoadingBox } from './components/loading-box/index.js';\nexport { MainWrapper } from './components/main-wrapper/index.js';\nexport * as NotificationBanner from './components/notification-banner/index.js';\nexport { Page } from './components/page/index.js';\nexport * as Modal from './components/modal/index.js';\nexport * as PasswordInput from './components/password-input/index.js';\nexport * as Pagination from './components/pagination/index.js';\nexport * as Panel from './components/panel/index.js';\nexport * as PhaseBanner from './components/phase-banner/index.js';\nexport * as Radios from './components/radios/index.js';\nexport * as RelatedItems from './components/related-items/index.js';\nexport * as SearchBox from './components/search-box/index.js';\nexport { SectionBreak } from './components/section-break/index.js';\nexport * from './components/select/index.js';\nexport * as ServiceNavigation from './components/service-navigation/index.js';\nexport { SkipLink } from './components/skip-link/index.js';\nexport * as SummaryList from './components/summary-list/index.js';\nexport * as Table from './components/table/index.js';\nexport * as Tabs from './components/tabs/index.js';\nexport { Tag } from './components/tag/index.js';\nexport * as TaskList from './components/task-list/index.js';\nexport * from './components/textarea/index.js';\nexport { VisuallyHidden } from './components/visually-hidden/index.js';\nexport * from './components/warning-text/index.js';\nexport { WidthContainer } from './components/width-container/index.js';\n\n// govuk-frontend override classes (govuk-!-*)\nexport { overrideClasses, type OverrideProps, type FluidWidth, type Spacing } from 'govuk-frontend-react/overrides';\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** Ids for `aria-describedby`, each once, so a description isn't read twice when the caller already passes one of them. */
|
|
2
|
+
export function joinIds(...ids) {
|
|
3
|
+
const unique = new Set(ids.flatMap((id) => (id ? id.split(/\s+/).filter(Boolean) : [])));
|
|
4
|
+
return [...unique].join(' ') || undefined;
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=join-ids.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"join-ids.js","sourceRoot":"","sources":["../../src/utils/join-ids.ts"],"names":[],"mappings":"AAAA,2HAA2H;AAC3H,MAAM,UAAU,OAAO,CAAC,GAAG,GAAsC;IAC/D,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IACzF,OAAO,CAAC,GAAG,MAAM,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,SAAS,CAAC;AAC5C,CAAC","sourcesContent":["/** Ids for `aria-describedby`, each once, so a description isn't read twice when the caller already passes one of them. */\nexport function joinIds(...ids: Array<string | false | undefined>): string | undefined {\n const unique = new Set(ids.flatMap((id) => (id ? id.split(/\\s+/).filter(Boolean) : [])));\n return [...unique].join(' ') || undefined;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,79 +1,51 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "govuk-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0-alpha.1",
|
|
4
|
+
"description": "govuk-react: React components for the GOV.UK Design System, built on govuk-frontend-react.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"types": "./dist/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"default": "./dist/index.js"
|
|
11
|
+
},
|
|
12
|
+
"./*": {
|
|
13
|
+
"types": "./dist/components/*/index.d.ts",
|
|
14
|
+
"default": "./dist/components/*/index.js"
|
|
15
|
+
},
|
|
16
|
+
"./package.json": "./package.json"
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"dist"
|
|
20
|
+
],
|
|
21
|
+
"sideEffects": false,
|
|
22
|
+
"scripts": {
|
|
23
|
+
"build": "rm -rf dist && tsc -p tsconfig.build.json && pnpm copy-readme",
|
|
24
|
+
"copy-readme": "cp ../../README.md ../../LICENSE ."
|
|
25
|
+
},
|
|
4
26
|
"dependencies": {
|
|
5
|
-
"@govuk-react/
|
|
6
|
-
"@govuk-react/
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"@govuk-react/checkbox": "^0.10.7",
|
|
10
|
-
"@govuk-react/constants": "^0.10.7",
|
|
11
|
-
"@govuk-react/date-field": "^0.10.7",
|
|
12
|
-
"@govuk-react/details": "^0.10.7",
|
|
13
|
-
"@govuk-react/document-footer-metadata": "^0.10.7",
|
|
14
|
-
"@govuk-react/error-summary": "^0.10.7",
|
|
15
|
-
"@govuk-react/error-text": "^0.10.7",
|
|
16
|
-
"@govuk-react/fieldset": "^0.10.7",
|
|
17
|
-
"@govuk-react/file-upload": "^0.10.7",
|
|
18
|
-
"@govuk-react/footer": "^0.10.7",
|
|
19
|
-
"@govuk-react/form-group": "^0.10.7",
|
|
20
|
-
"@govuk-react/global-style": "^0.10.7",
|
|
21
|
-
"@govuk-react/grid-col": "^0.10.7",
|
|
22
|
-
"@govuk-react/grid-row": "^0.10.7",
|
|
23
|
-
"@govuk-react/heading": "^0.10.7",
|
|
24
|
-
"@govuk-react/hint-text": "^0.10.7",
|
|
25
|
-
"@govuk-react/icons": "^0.10.7",
|
|
26
|
-
"@govuk-react/input": "^0.10.7",
|
|
27
|
-
"@govuk-react/input-field": "^0.10.7",
|
|
28
|
-
"@govuk-react/inset-text": "^0.10.7",
|
|
29
|
-
"@govuk-react/label": "^0.10.7",
|
|
30
|
-
"@govuk-react/label-text": "^0.10.7",
|
|
31
|
-
"@govuk-react/lead-paragraph": "^0.10.7",
|
|
32
|
-
"@govuk-react/link": "^0.10.7",
|
|
33
|
-
"@govuk-react/list-item": "^0.10.7",
|
|
34
|
-
"@govuk-react/loading-box": "^0.10.7",
|
|
35
|
-
"@govuk-react/main": "^0.10.7",
|
|
36
|
-
"@govuk-react/multi-choice": "^0.10.7",
|
|
37
|
-
"@govuk-react/ordered-list": "^0.10.7",
|
|
38
|
-
"@govuk-react/page": "^0.10.7",
|
|
39
|
-
"@govuk-react/pagination": "^0.10.7",
|
|
40
|
-
"@govuk-react/panel": "^0.10.7",
|
|
41
|
-
"@govuk-react/paragraph": "^0.10.7",
|
|
42
|
-
"@govuk-react/phase-banner": "^0.10.7",
|
|
43
|
-
"@govuk-react/radio": "^0.10.7",
|
|
44
|
-
"@govuk-react/related-items": "^0.10.7",
|
|
45
|
-
"@govuk-react/search-box": "^0.10.7",
|
|
46
|
-
"@govuk-react/section-break": "^0.10.7",
|
|
47
|
-
"@govuk-react/select": "^0.10.7",
|
|
48
|
-
"@govuk-react/skip-link": "^0.10.7",
|
|
49
|
-
"@govuk-react/table": "^0.10.7",
|
|
50
|
-
"@govuk-react/tabs": "^0.10.7",
|
|
51
|
-
"@govuk-react/tag": "^0.10.7",
|
|
52
|
-
"@govuk-react/text-area": "^0.10.7",
|
|
53
|
-
"@govuk-react/top-nav": "^0.10.7",
|
|
54
|
-
"@govuk-react/unordered-list": "^0.10.7",
|
|
55
|
-
"@govuk-react/visually-hidden": "^0.10.7",
|
|
56
|
-
"@govuk-react/warning-text": "^0.10.7",
|
|
57
|
-
"govuk-colours": "^1.1.0"
|
|
27
|
+
"@govuk-react/icon-crown": "0.1.0",
|
|
28
|
+
"@govuk-react/primitives": "0.2.1",
|
|
29
|
+
"clsx": "^2.1.1",
|
|
30
|
+
"govuk-frontend-react": "1.0.0-alpha.6"
|
|
58
31
|
},
|
|
59
32
|
"peerDependencies": {
|
|
60
|
-
"
|
|
61
|
-
"react
|
|
62
|
-
"
|
|
33
|
+
"govuk-frontend": "~6.6.0",
|
|
34
|
+
"react": ">=19",
|
|
35
|
+
"react-dom": ">=19"
|
|
63
36
|
},
|
|
64
|
-
"scripts": {
|
|
65
|
-
"build": "yarn copy-readme",
|
|
66
|
-
"copy-readme": "cp ../../README.md .",
|
|
67
|
-
"version": "yarn version"
|
|
68
|
-
},
|
|
69
|
-
"main": "dist/govuk-react.cjs.js",
|
|
70
|
-
"module": "dist/govuk-react.esm.js",
|
|
71
|
-
"source": "src/index.ts",
|
|
72
37
|
"author": "Alasdair McLeay",
|
|
73
38
|
"license": "MIT",
|
|
74
39
|
"homepage": "https://github.com/govuk-react/govuk-react#readme",
|
|
75
|
-
"
|
|
40
|
+
"repository": {
|
|
41
|
+
"type": "git",
|
|
42
|
+
"url": "git+https://github.com/govuk-react/govuk-react.git",
|
|
43
|
+
"directory": "packages/govuk-react"
|
|
44
|
+
},
|
|
76
45
|
"publishConfig": {
|
|
77
46
|
"access": "public"
|
|
47
|
+
},
|
|
48
|
+
"devDependencies": {
|
|
49
|
+
"govuk-frontend": "6.6.0"
|
|
78
50
|
}
|
|
79
51
|
}
|