@scottish-government/designsystem-react 0.10.2 → 0.12.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/@types/components/Accordion.d.ts +3 -2
- package/@types/components/ButtonGroup.d.ts +5 -0
- package/@types/components/PageHeader.d.ts +2 -1
- package/@types/components/RadioButton.d.ts +2 -2
- package/@types/components/SearchFacets.d.ts +18 -0
- package/@types/components/SearchFilters.d.ts +14 -0
- package/@types/components/SearchResult.d.ts +30 -0
- package/@types/components/SearchSort.d.ts +9 -0
- package/@types/components/SideNavigation.d.ts +1 -1
- package/CHANGELOG.md +39 -5
- package/dist/common/AbstractNotificationBanner.d.ts +9 -0
- package/dist/common/ActionLink.d.ts +5 -0
- package/dist/common/ConditionalWrapper.d.ts +8 -0
- package/dist/common/FileIcon.d.ts +6 -0
- package/dist/common/HintText.d.ts +5 -0
- package/dist/common/Icon.d.ts +6 -0
- package/dist/common/ScreenReaderText.d.ts +5 -0
- package/dist/common/WrapperTag.d.ts +8 -0
- package/dist/components/Accordion/Accordion.d.ts +10 -0
- package/dist/components/Accordion/Accordion.jsx +8 -3
- package/dist/components/AspectBox/AspectBox.d.ts +6 -0
- package/dist/components/BackToTop/BackToTop.d.ts +5 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +9 -0
- package/dist/components/Button/Button.d.ts +5 -0
- package/dist/components/ButtonGroup/ButtonGroup.d.ts +5 -0
- package/dist/components/ButtonGroup/ButtonGroup.jsx +13 -0
- package/dist/components/CategoryItem/CategoryItem.d.ts +5 -0
- package/dist/components/CategoryList/CategoryList.d.ts +6 -0
- package/dist/components/Checkbox/Checkbox.d.ts +5 -0
- package/dist/components/Checkbox/CheckboxGroup.d.ts +6 -0
- package/dist/components/ConfirmationMessage/ConfirmationMessage.d.ts +5 -0
- package/dist/components/ContentsNav/ContentsNav.d.ts +10 -0
- package/dist/components/CookieBanner/CookieBanner.d.ts +9 -0
- package/dist/components/DatePicker/DatePicker.d.ts +5 -0
- package/dist/components/Details/Details.d.ts +5 -0
- package/dist/components/ErrorMessage/ErrorMessage.d.ts +5 -0
- package/dist/components/ErrorSummary/ErrorSummary.d.ts +9 -0
- package/dist/components/FileDownload/FileDownload.d.ts +5 -0
- package/dist/components/HideThisPage/HideThisPage.d.ts +6 -0
- package/dist/components/InsetText/InsetText.d.ts +5 -0
- package/dist/components/NotificationBanner/NotificationBanner.d.ts +9 -0
- package/dist/components/NotificationPanel/NotificationPanel.d.ts +5 -0
- package/dist/components/PageHeader/PageHeader.d.ts +5 -0
- package/dist/components/PageHeader/PageHeader.jsx +2 -2
- package/dist/components/PageMetadata/PageMetadata.d.ts +9 -0
- package/dist/components/Pagination/Pagination.d.ts +7 -0
- package/dist/components/PhaseBanner/PhaseBanner.d.ts +5 -0
- package/dist/components/Question/Question.d.ts +5 -0
- package/dist/components/RadioButton/RadioButton.d.ts +5 -0
- package/dist/components/RadioButton/RadioGroup.d.ts +6 -0
- package/dist/components/RadioButton/RadioGroup.jsx +1 -1
- package/dist/components/SearchFacets/SearchFacets.d.ts +14 -0
- package/dist/components/SearchFacets/SearchFacets.jsx +101 -0
- package/dist/components/SearchFilters/SearchFilters.d.ts +16 -0
- package/dist/components/SearchFilters/SearchFilters.jsx +63 -0
- package/dist/components/SearchResult/SearchResult.d.ts +28 -0
- package/dist/components/SearchResult/SearchResult.jsx +93 -0
- package/dist/components/SearchSort/SearchSort.d.ts +10 -0
- package/dist/components/SearchSort/SearchSort.jsx +28 -0
- package/dist/components/Select/Select.d.ts +5 -0
- package/dist/components/SequentialNavigation/SequentialNavigation.d.ts +13 -0
- package/dist/components/SequentialNavigation/SequentialNavigation.jsx +0 -1
- package/dist/components/SideNavigation/SideNavigation.d.ts +13 -0
- package/dist/components/SideNavigation/SideNavigation.jsx +2 -2
- package/dist/components/SiteFooter/SiteFooter.d.ts +22 -0
- package/dist/components/SiteHeader/SiteHeader.d.ts +22 -0
- package/dist/components/SiteHeader/SiteHeader.jsx +0 -1
- package/dist/components/SiteNavigation/SiteNavigation.d.ts +9 -0
- package/dist/components/SiteSearch/SiteSearch.d.ts +5 -0
- package/dist/components/SkipLinks/SkipLinks.d.ts +10 -0
- package/dist/components/SkipLinks/SkipLinks.jsx +42 -0
- package/dist/components/SummaryCard/SummaryCard.d.ts +10 -0
- package/dist/components/SummaryList/SummaryList.d.ts +18 -0
- package/dist/components/Table/Table.d.ts +5 -0
- package/dist/components/Tabs/Tabs.d.ts +10 -0
- package/dist/components/Tag/Tag.d.ts +5 -0
- package/dist/components/TaskList/TaskList.d.ts +13 -0
- package/dist/components/TextInput/TextInput.d.ts +5 -0
- package/dist/components/Textarea/Textarea.d.ts +5 -0
- package/dist/components/WarningText/WarningText.d.ts +5 -0
- package/dist/hooks/useTracking.d.ts +1 -0
- package/dist/images/documents/audio.d.ts +4 -0
- package/dist/images/documents/csv.d.ts +4 -0
- package/dist/images/documents/excel.d.ts +4 -0
- package/dist/images/documents/file.d.ts +4 -0
- package/dist/images/documents/generic.d.ts +4 -0
- package/dist/images/documents/geodata.d.ts +4 -0
- package/dist/images/documents/ical.d.ts +4 -0
- package/dist/images/documents/ico.d.ts +4 -0
- package/dist/images/documents/image.d.ts +4 -0
- package/dist/images/documents/index.d.ts +22 -0
- package/dist/images/documents/odf.d.ts +4 -0
- package/dist/images/documents/odg.d.ts +4 -0
- package/dist/images/documents/odp.d.ts +4 -0
- package/dist/images/documents/ods.d.ts +4 -0
- package/dist/images/documents/odt.d.ts +4 -0
- package/dist/images/documents/pdf.d.ts +4 -0
- package/dist/images/documents/ppt.d.ts +4 -0
- package/dist/images/documents/rtf.d.ts +4 -0
- package/dist/images/documents/text.d.ts +4 -0
- package/dist/images/documents/video.d.ts +4 -0
- package/dist/images/documents/word.d.ts +4 -0
- package/dist/images/documents/xml.d.ts +4 -0
- package/dist/images/documents/zip.d.ts +4 -0
- package/dist/images/icons/arrow_upward.d.ts +4 -0
- package/dist/images/icons/calendar_today.d.ts +4 -0
- package/dist/images/icons/cancel.d.ts +4 -0
- package/dist/images/icons/check_circle.d.ts +4 -0
- package/dist/images/icons/chevron_left.d.ts +4 -0
- package/dist/images/icons/chevron_right.d.ts +4 -0
- package/dist/images/icons/close.d.ts +4 -0
- package/dist/images/icons/description.d.ts +4 -0
- package/dist/images/icons/double_chevron_left.d.ts +4 -0
- package/dist/images/icons/double_chevron_right.d.ts +4 -0
- package/dist/images/icons/error.d.ts +4 -0
- package/dist/images/icons/expand_less.d.ts +4 -0
- package/dist/images/icons/expand_more.d.ts +4 -0
- package/dist/images/icons/index.d.ts +17 -0
- package/dist/images/icons/list.d.ts +4 -0
- package/dist/images/icons/menu.d.ts +4 -0
- package/dist/images/icons/priority_high.d.ts +4 -0
- package/dist/images/icons/search.d.ts +4 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/utils/context.d.ts +4 -0
- package/package.json +6 -6
- package/src/components/Accordion/Accordion.Item.stories.tsx +10 -9
- package/src/components/Accordion/Accordion.stories.tsx +4 -4
- package/src/components/Accordion/Accordion.test.tsx +48 -14
- package/src/components/Accordion/Accordion.tsx +12 -1
- package/src/components/Breadcrumbs/Breadcrumbs.Item.stories.tsx +8 -1
- package/src/components/Button/Button.stories.tsx +1 -1
- package/src/components/ButtonGroup/ButtonGroup.stories.tsx +41 -0
- package/src/components/ButtonGroup/ButtonGroup.test.tsx +45 -0
- package/src/components/ButtonGroup/ButtonGroup.tsx +20 -0
- package/src/components/ContentsNav/ContentsNav.Item.stories.tsx +8 -0
- package/src/components/ErrorSummary/ErrorSummary.Item.stories.tsx +7 -0
- package/src/components/PageHeader/PageHeader.tsx +2 -1
- package/src/components/PageMetadata/PageMetadata.Item.stories.tsx +9 -0
- package/src/components/RadioButton/RadioGroup.tsx +2 -2
- package/src/components/SearchFacets/SearchFacets.Group.stories.tsx +56 -0
- package/src/components/SearchFacets/SearchFacets.Item.stories.tsx +53 -0
- package/src/components/SearchFacets/SearchFacets.stories.tsx +38 -0
- package/src/components/SearchFacets/SearchFacets.test.tsx +214 -0
- package/src/components/SearchFacets/SearchFacets.tsx +99 -0
- package/src/components/SearchFilters/SearchFilters.Panel.stories.tsx +201 -0
- package/src/components/SearchFilters/SearchFilters.stories.tsx +137 -0
- package/src/components/SearchFilters/SearchFilters.test.tsx +161 -0
- package/src/components/SearchFilters/SearchFilters.tsx +89 -0
- package/src/components/SearchResult/SearchResult.stories.tsx +111 -0
- package/src/components/SearchResult/SearchResult.test.tsx +215 -0
- package/src/components/SearchResult/SearchResult.tsx +137 -0
- package/src/components/SearchSort/SearchSort.stories.tsx +32 -0
- package/src/components/SearchSort/SearchSort.test.tsx +129 -0
- package/src/components/SearchSort/SearchSort.tsx +45 -0
- package/src/components/SequentialNavigation/SequentialNavigation.Next.stories.tsx +1 -1
- package/src/components/SequentialNavigation/SequentialNavigation.Previous.stories.tsx +1 -1
- package/src/components/SequentialNavigation/SequentialNavigation.tsx +0 -1
- package/src/components/SideNavigation/SideNavigation.Item.stories.tsx +9 -0
- package/src/components/SideNavigation/SideNavigation.List.stories.tsx +7 -0
- package/src/components/SideNavigation/SideNavigation.tsx +2 -1
- package/src/components/SiteFooter/SiteFooter.License.stories.tsx +7 -0
- package/src/components/SiteFooter/SiteFooter.Link.stories.tsx +9 -0
- package/src/components/SiteFooter/SiteFooter.Org.stories.tsx +7 -0
- package/src/components/SiteHeader/SiteHeader.tsx +0 -2
- package/src/components/SiteNavigation/SiteNavigation.Item.stories.tsx +10 -0
- package/src/components/SkipLinks/SkipLinks.Item.stories.tsx +11 -1
- package/src/components/SkipLinks/SkipLinks.tsx +10 -0
- package/src/components/SummaryCard/SummaryCard.Action.stories.tsx +7 -0
- package/src/components/SummaryCard/SummaryCard.stories.tsx +7 -0
- package/src/components/SummaryList/SummaryList.Item.stories.tsx +15 -0
- package/src/components/SummaryList/SummaryList.Value.stories.tsx +5 -2
- package/src/components/Tabs/Tabs.Item.stories.tsx +4 -1
- package/src/components/TaskList/TaskList.Group.stories.tsx +9 -0
- package/src/components/TaskList/TaskList.Item.stories.tsx +7 -0
- package/tsconfig.json +14 -14
|
@@ -2,13 +2,14 @@ declare namespace SGDS.Component {
|
|
|
2
2
|
namespace Accordion {
|
|
3
3
|
interface Item extends React.AllHTMLAttributes<HTMLElement> {
|
|
4
4
|
id?: string,
|
|
5
|
+
heading: string | React.ReactNode
|
|
5
6
|
isOpen?: boolean,
|
|
6
|
-
title: string
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
interface Accordion extends React.AllHTMLAttributes<HTMLElement> {
|
|
11
11
|
headingLevel?: SGDS.HeadingLevel,
|
|
12
|
-
hideOpenAll?: boolean
|
|
12
|
+
hideOpenAll?: boolean,
|
|
13
|
+
isSmall?: boolean
|
|
13
14
|
}
|
|
14
15
|
}
|
|
@@ -2,13 +2,13 @@ declare namespace SGDS.Component {
|
|
|
2
2
|
namespace RadioButton {
|
|
3
3
|
interface Group extends React.AllHTMLAttributes<HTMLElement> {
|
|
4
4
|
isInline?: boolean,
|
|
5
|
-
name
|
|
5
|
+
name?: string,
|
|
6
6
|
isSmall?: boolean
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
interface RadioButton extends CheckboxRadioBase<HTMLInputElement> {
|
|
11
11
|
id: string,
|
|
12
|
-
name
|
|
12
|
+
name?: string
|
|
13
13
|
}
|
|
14
14
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
declare namespace SGDS.Component {
|
|
2
|
+
namespace SearchFacets {
|
|
3
|
+
interface Group extends React.AllHTMLAttributes<HTMLElement> {
|
|
4
|
+
joinContent?: string,
|
|
5
|
+
title: string
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
interface Item extends React.AllHTMLAttributes<HTMLElement> {
|
|
9
|
+
accessibleName?: string
|
|
10
|
+
joinContent?: string
|
|
11
|
+
title: string
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
interface SearchFacets extends React.AllHTMLAttributes<HTMLElement> {
|
|
16
|
+
headingId?: string
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
declare namespace SGDS.Component {
|
|
2
|
+
namespace SearchFilters {
|
|
3
|
+
interface Panel extends React.AllHTMLAttributes<HTMLElement> {
|
|
4
|
+
activeFilterCount?: number,
|
|
5
|
+
heading: string | React.ReactNode
|
|
6
|
+
isScrollable?: boolean,
|
|
7
|
+
legend: string,
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
interface SearchFilters extends React.AllHTMLAttributes<HTMLElement> {
|
|
12
|
+
searchResultsContainerId?: string
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
declare namespace SGDS.Component {
|
|
2
|
+
namespace SearchResult {
|
|
3
|
+
interface Content extends React.AllHTMLAttributes<HTMLElement> {
|
|
4
|
+
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
interface Context extends React.AllHTMLAttributes<HTMLDListElement> {
|
|
8
|
+
title: string
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
interface ContextItem extends React.AllHTMLAttributes<HTMLElement> {
|
|
12
|
+
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
interface Media extends React.AllHTMLAttributes<HTMLElement> {
|
|
16
|
+
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
interface Meta extends React.AllHTMLAttributes<HTMLElement> {
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
interface SearchResult extends React.AllHTMLAttributes<HTMLElement> {
|
|
24
|
+
href: string,
|
|
25
|
+
isPromoted?: boolean,
|
|
26
|
+
linkComponent?: SGDS.LinkComponent,
|
|
27
|
+
promotedTitle?: string,
|
|
28
|
+
title: string
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
declare namespace SGDS.Component {
|
|
2
|
+
interface SearchSort extends React.AllHTMLAttributes<HTMLElement> {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
className?: string;
|
|
5
|
+
id?: string;
|
|
6
|
+
label?: string;
|
|
7
|
+
onApply?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
8
|
+
}
|
|
9
|
+
}
|
package/CHANGELOG.md
CHANGED
|
@@ -6,13 +6,45 @@ Changes are grouped under the labels: `Added`, `Changed`, `Deprecated`, `Fixed`,
|
|
|
6
6
|
`Removed` and `Security`.
|
|
7
7
|
|
|
8
8
|
---
|
|
9
|
+
## [0.12.0] - 2025-11-12
|
|
9
10
|
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
### Added
|
|
12
|
+
- type definitions included in /dist
|
|
13
|
+
- optional 'titleId' prop added to PageHeader
|
|
14
|
+
## Fixed
|
|
15
|
+
- include SGDS 'skip-links' script in SkipLinks
|
|
16
|
+
|
|
17
|
+
## [0.11.0] - 2025-10-22
|
|
18
|
+
|
|
19
|
+
### Added
|
|
20
|
+
- SearchResult, SearchFilters, SearchFacets, SearchSort components
|
|
21
|
+
- ButtonGroup component
|
|
22
|
+
### Changed
|
|
23
|
+
- Accordion.Item now uses a new `heading` prop for its heading content, which allows both string and ReactNode
|
|
24
|
+
- add "ariaLabel" property to SideNavigation to make the aria label editable
|
|
25
|
+
### Deprecated
|
|
26
|
+
- Accordion.Item `title` prop replaced with `heading`
|
|
27
|
+
### Fixed
|
|
28
|
+
- decorators added to many storybook components for correct rendering
|
|
29
|
+
|
|
30
|
+
## [0.10.2] - 2025-09-18
|
|
31
|
+
### Fixed
|
|
32
|
+
- correction to handling of subcomponents in Storybook
|
|
33
|
+
|
|
34
|
+
## [0.10.1] - 2025-09-18
|
|
35
|
+
### Fixed
|
|
36
|
+
- correction to white space on PageMetadata
|
|
37
|
+
|
|
38
|
+
## [0.10.0] - 2025-09-18
|
|
39
|
+
### Added
|
|
12
40
|
- Storybook now added for all components. `npm run storybook`
|
|
13
41
|
- CategoryList component
|
|
14
42
|
- CategoryItem component
|
|
15
|
-
|
|
43
|
+
- useTracking hook, to add DS tracking attributes
|
|
44
|
+
### Changed
|
|
45
|
+
- Accordion uses useContext instead of cloneElement to pass props (headingLevel) to its children
|
|
46
|
+
- CheckboxGroup uses useContext instead of cloneElement to pass props (isSmall) to its children
|
|
47
|
+
- RadioGroup use useContext instead of cloneElement to pass props (isSmall, name) to its children
|
|
16
48
|
- 'text' prop removed from ErrorMessage. Use children instead.
|
|
17
49
|
- Many boolean prop names updated for clarity/consistency
|
|
18
50
|
- AbstractNotificationBanner (used by NotificationBanner and CookieBanner): close -> isDismissable
|
|
@@ -36,13 +68,15 @@ Changes are grouped under the labels: `Added`, `Changed`, `Deprecated`, `Fixed`,
|
|
|
36
68
|
- Tabs: bordered -> isBorderless (logic inverted), manual -> isManual
|
|
37
69
|
- TextInput: currency -> isCurrency
|
|
38
70
|
|
|
71
|
+
## [0.9.0] - skipped due to user error with the CI script
|
|
72
|
+
|
|
39
73
|
## [0.8.0] - 2025-08-18
|
|
40
|
-
|
|
74
|
+
### Added
|
|
41
75
|
- ActionLink component, centralising behaviour used in actions in both SummaryCard and SummaryList
|
|
42
76
|
- SiteFooter component
|
|
43
77
|
- Add support for the SkipLinks 'static' variant
|
|
44
78
|
|
|
45
|
-
|
|
79
|
+
### Changed
|
|
46
80
|
|
|
47
81
|
Two headline changes:
|
|
48
82
|
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
declare const AbstractNotificationBanner: {
|
|
2
|
+
({ children, className, hasColourIcon, hasInverseIcon, icon, isDismissable, title, ...props }: SGDS.Common.AbstractNotificationBanner): import("react").JSX.Element;
|
|
3
|
+
displayName: string;
|
|
4
|
+
Buttons: {
|
|
5
|
+
({ children }: SGDS.Common.AbstractNotificationBanner.Buttons): import("react").JSX.Element;
|
|
6
|
+
displayName: string;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
export default AbstractNotificationBanner;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
declare const ActionLink: {
|
|
2
|
+
({ children, describedby, href, linkComponent, onclick }: SGDS.Common.ActionLink): string | number | bigint | boolean | Iterable<import("react").ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | import("react").ReactPortal | Iterable<import("react").ReactNode> | null | undefined> | import("react").JSX.Element | null | undefined;
|
|
3
|
+
displayName: string;
|
|
4
|
+
};
|
|
5
|
+
export default ActionLink;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const Accordion: {
|
|
3
|
+
({ children, className, headingLevel, hideOpenAll, isSmall, ...props }: SGDS.Component.Accordion): React.JSX.Element;
|
|
4
|
+
displayName: string;
|
|
5
|
+
Item: {
|
|
6
|
+
({ children, className, id: rawId, isOpen, heading, title, ...props }: SGDS.Component.Accordion.Item): React.JSX.Element;
|
|
7
|
+
displayName: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export default Accordion;
|
|
@@ -42,10 +42,14 @@ const WrapperTag_1 = __importDefault(require("../../common/WrapperTag"));
|
|
|
42
42
|
const accordion_1 = __importDefault(require("@scottish-government/design-system/src/components/accordion/accordion"));
|
|
43
43
|
let accordionItemCounter = 0;
|
|
44
44
|
const AccordionHeadingLevelContext = (0, react_1.createContext)('h3');
|
|
45
|
-
const AccordionItem = ({ children, className, id: rawId, isOpen = false, title, ...props }) => {
|
|
45
|
+
const AccordionItem = ({ children, className, id: rawId, isOpen = false, heading, title, ...props }) => {
|
|
46
46
|
accordionItemCounter = accordionItemCounter + 1;
|
|
47
47
|
const processedId = rawId || `accordion-item-${(0, react_1.useId)()}`;
|
|
48
48
|
let headingLevel = (0, react_1.useContext)(AccordionHeadingLevelContext);
|
|
49
|
+
if (title) {
|
|
50
|
+
console.warn('Warning: Using the `title` prop for heading text on an Accordion.Item is deprecated and will be removed in a future release. Please use the `heading` prop instead.');
|
|
51
|
+
heading = heading || title;
|
|
52
|
+
}
|
|
49
53
|
return (<div className={[
|
|
50
54
|
'ds_accordion-item',
|
|
51
55
|
className
|
|
@@ -56,7 +60,7 @@ const AccordionItem = ({ children, className, id: rawId, isOpen = false, title,
|
|
|
56
60
|
].join(' ')} defaultChecked={isOpen} id={`${processedId}-control`} type="checkbox"/>
|
|
57
61
|
<div className="ds_accordion-item__header">
|
|
58
62
|
<WrapperTag_1.default id={`panel-${processedId}-heading`} className="ds_accordion-item__title" tagName={headingLevel}>
|
|
59
|
-
{
|
|
63
|
+
{heading}
|
|
60
64
|
</WrapperTag_1.default>
|
|
61
65
|
<span className="ds_accordion-item__indicator"/>
|
|
62
66
|
<label className="ds_accordion-item__label" htmlFor={`${processedId}-control`}>
|
|
@@ -68,7 +72,7 @@ const AccordionItem = ({ children, className, id: rawId, isOpen = false, title,
|
|
|
68
72
|
</div>
|
|
69
73
|
</div>);
|
|
70
74
|
};
|
|
71
|
-
const Accordion = ({ children, className, headingLevel = 'h3', hideOpenAll, ...props }) => {
|
|
75
|
+
const Accordion = ({ children, className, headingLevel = 'h3', hideOpenAll, isSmall, ...props }) => {
|
|
72
76
|
const ref = (0, react_1.useRef)(null);
|
|
73
77
|
(0, react_1.useEffect)(() => {
|
|
74
78
|
if (ref.current) {
|
|
@@ -80,6 +84,7 @@ const Accordion = ({ children, className, headingLevel = 'h3', hideOpenAll, ...p
|
|
|
80
84
|
}
|
|
81
85
|
return (<div className={[
|
|
82
86
|
'ds_accordion',
|
|
87
|
+
isSmall ? 'ds_accordion--small' : '',
|
|
83
88
|
className
|
|
84
89
|
].join(' ')} ref={ref} {...props}>
|
|
85
90
|
{!hideOpenAll && (<button className={[
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
declare const Breadcrumbs: {
|
|
2
|
+
({ children, ...props }: SGDS.Component.Breadcrumbs): import("react").JSX.Element;
|
|
3
|
+
displayName: string;
|
|
4
|
+
Item: {
|
|
5
|
+
({ children, isHidden, href, linkComponent, ...props }: SGDS.Component.Breadcrumbs.Item): import("react").JSX.Element;
|
|
6
|
+
displayName: string;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
export default Breadcrumbs;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const ButtonGroup = ({ children, className, isInline, ...props }) => {
|
|
4
|
+
return (<div className={[
|
|
5
|
+
"ds_button-group",
|
|
6
|
+
isInline ? "ds_button-group--inline" : undefined,
|
|
7
|
+
className
|
|
8
|
+
].join(' ')} {...props}>
|
|
9
|
+
{children}
|
|
10
|
+
</div>);
|
|
11
|
+
};
|
|
12
|
+
ButtonGroup.displayName = 'ButtonGroup';
|
|
13
|
+
exports.default = ButtonGroup;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const ContentsNav: {
|
|
3
|
+
({ ariaLabel, children, className, title, ...props }: SGDS.Component.ContentsNav): React.JSX.Element;
|
|
4
|
+
displayName: string;
|
|
5
|
+
Item: {
|
|
6
|
+
({ children, isCurrent, href, linkComponent }: SGDS.Component.ContentsNav.ContentsNavItem): React.JSX.Element;
|
|
7
|
+
displayName: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export default ContentsNav;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
declare const CookieBanner: {
|
|
2
|
+
({ children, className, title, ...props }: SGDS.Common.AbstractNotificationBanner): import("react").JSX.Element;
|
|
3
|
+
displayName: string;
|
|
4
|
+
Buttons: {
|
|
5
|
+
({ children }: SGDS.Common.AbstractNotificationBanner.Buttons): import("react").JSX.Element;
|
|
6
|
+
displayName: string;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
export default CookieBanner;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
declare const DatePicker: {
|
|
2
|
+
({ className, dateSelectCallback, disabledDates, errorMessage, hasError, hintText, id, iconPath, label, maxDate, minDate, multiple, name, onBlur, onChange, value, width, ...props }: SGDS.Component.DatePicker): import("react").JSX.Element;
|
|
3
|
+
displayName: string;
|
|
4
|
+
};
|
|
5
|
+
export default DatePicker;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
declare const ErrorSummary: {
|
|
2
|
+
({ children, className, title, ...props }: SGDS.Component.ErrorSummary): import("react").JSX.Element;
|
|
3
|
+
displayName: string;
|
|
4
|
+
Item: {
|
|
5
|
+
({ children, fragmentId, linkComponent }: SGDS.Component.ErrorSummary.Item): import("react").JSX.Element;
|
|
6
|
+
displayName: string;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
export default ErrorSummary;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
declare const NotificationBanner: {
|
|
2
|
+
({ children, className, hasColourIcon, hasIcon, hasInverseIcon, isDismissable, title, ...props }: SGDS.Common.AbstractNotificationBanner): import("react").JSX.Element;
|
|
3
|
+
displayName: string;
|
|
4
|
+
Buttons: {
|
|
5
|
+
({ children }: SGDS.Common.AbstractNotificationBanner.Buttons): import("react").JSX.Element;
|
|
6
|
+
displayName: string;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
export default NotificationBanner;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const PageHeader = ({ children, className, label, title, ...props }) => {
|
|
3
|
+
const PageHeader = ({ children, className, label, title, titleId, ...props }) => {
|
|
4
4
|
return (<header className={[
|
|
5
5
|
'ds_page-header',
|
|
6
6
|
className
|
|
7
7
|
].join(' ')} {...props}>
|
|
8
8
|
{label && <span className="ds_page-header__label ds_content-label">{label}</span>}
|
|
9
|
-
<h1 className="ds_page-header__title">{title}</h1>
|
|
9
|
+
<h1 id={titleId} className="ds_page-header__title">{title}</h1>
|
|
10
10
|
|
|
11
11
|
{children}
|
|
12
12
|
</header>);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
declare const Metadata: {
|
|
2
|
+
({ children, className, isInline, ...props }: SGDS.Component.Metadata): import("react").JSX.Element;
|
|
3
|
+
displayName: string;
|
|
4
|
+
Item: {
|
|
5
|
+
({ children, className, name, ...props }: SGDS.Component.Metadata.Item): import("react").JSX.Element;
|
|
6
|
+
displayName: string;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
export default Metadata;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const Page: ({ ariaLabel, children, className, href, isCurrent, linkComponent, onClick }: SGDS.Component.Pagination.Page) => import("react").JSX.Element;
|
|
2
|
+
export declare const Ellipsis: () => import("react").JSX.Element;
|
|
3
|
+
declare const Pagination: {
|
|
4
|
+
({ ariaLabel, className, onClick, padding, page, pattern, totalPages, linkComponent, ...props }: SGDS.Component.Pagination): import("react").JSX.Element;
|
|
5
|
+
displayName: string;
|
|
6
|
+
};
|
|
7
|
+
export default Pagination;
|
|
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const react_1 = __importDefault(require("react"));
|
|
7
7
|
const context_1 = require("../../utils/context");
|
|
8
|
-
const RadioGroup = ({ children, className, isInline, isSmall, name, ...props }) => {
|
|
8
|
+
const RadioGroup = ({ children, className, isInline, isSmall, name = '', ...props }) => {
|
|
9
9
|
return (<div className={[
|
|
10
10
|
'ds_radios',
|
|
11
11
|
'ds_field-group',
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const Facets: {
|
|
3
|
+
({ children, className, ...props }: SGDS.Component.SearchFacets): React.JSX.Element;
|
|
4
|
+
displayName: string;
|
|
5
|
+
Item: {
|
|
6
|
+
({ accessibleName, joinContent, onClick, title, ...props }: SGDS.Component.SearchFacets.Item): React.JSX.Element;
|
|
7
|
+
displayName: string;
|
|
8
|
+
};
|
|
9
|
+
Group: {
|
|
10
|
+
({ children, joinContent, title, ...props }: SGDS.Component.SearchFacets.Group): React.JSX.Element;
|
|
11
|
+
displayName: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export default Facets;
|