@scottish-government/designsystem-react 0.6.0 → 0.7.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.
Files changed (169) hide show
  1. package/@types/components/Accordion.d.ts +2 -2
  2. package/@types/components/ConfirmationMessage.d.ts +1 -1
  3. package/@types/components/NotificationPanel.d.ts +1 -1
  4. package/@types/components/SummaryCard.d.ts +1 -1
  5. package/@types/components/Tabs.d.ts +1 -1
  6. package/@types/sgds.d.ts +1 -1
  7. package/CHANGELOG.md +81 -0
  8. package/README.md +4 -0
  9. package/dist/common/{abstract-notification-banner.jsx → AbstractNotificationBanner.jsx} +5 -5
  10. package/dist/components/{accordion/accordion.jsx → Accordion/Accordion.jsx} +6 -6
  11. package/dist/components/{back-to-top/back-to-top.jsx → BackToTop/BackToTop.jsx} +2 -2
  12. package/dist/components/{button/button.jsx → Button/Button.jsx} +7 -7
  13. package/dist/components/{checkbox/checkbox.jsx → Checkbox/Checkbox.jsx} +2 -2
  14. package/dist/components/{confirmation-message/confirmation-message.jsx → ConfirmationMessage/ConfirmationMessage.jsx} +6 -6
  15. package/dist/components/{contents-nav/contents-nav.jsx → ContentsNav/ContentsNav.jsx} +3 -3
  16. package/dist/components/{cookie-banner/cookie-banner.jsx → CookieBanner/CookieBanner.jsx} +4 -4
  17. package/dist/components/{date-picker/date-picker.jsx → DatePicker/DatePicker.jsx} +7 -7
  18. package/dist/components/{error-summary/error-summary.jsx → ErrorSummary/ErrorSummary.jsx} +2 -2
  19. package/dist/components/{file-download/file-download.jsx → FileDownload/FileDownload.jsx} +2 -2
  20. package/dist/components/{hide-this-page/hide-this-page.jsx → HideThisPage/HideThisPage.jsx} +3 -3
  21. package/dist/components/{notification-banner/notification-banner.jsx → NotificationBanner/NotificationBanner.jsx} +4 -4
  22. package/dist/components/{notification-panel/notification-panel.jsx → NotificationPanel/NotificationPanel.jsx} +4 -4
  23. package/dist/components/{pagination/pagination.jsx → Pagination/Pagination.jsx} +3 -3
  24. package/dist/components/{phase-banner/phase-banner.jsx → PhaseBanner/PhaseBanner.jsx} +2 -2
  25. package/dist/components/{question/question.jsx → Question/Question.jsx} +7 -7
  26. package/dist/components/{radio-button/radio-button.jsx → RadioButton/RadioButton.jsx} +2 -2
  27. package/dist/components/{select/select.jsx → Select/Select.jsx} +4 -4
  28. package/dist/components/{site-header/site-header.jsx → SiteHeader/SiteHeader.jsx} +13 -13
  29. package/dist/components/{site-search/site-search.jsx → SiteSearch/SiteSearch.jsx} +2 -2
  30. package/dist/components/{summary-card/summary-card.jsx → SummaryCard/SummaryCard.jsx} +6 -6
  31. package/dist/components/{summary-list/summary-list.jsx → SummaryList/SummaryList.jsx} +8 -8
  32. package/dist/components/{tabs/tabs.jsx → Tabs/Tabs.jsx} +4 -4
  33. package/dist/components/{task-list/task-list.jsx → TaskList/TaskList.jsx} +9 -9
  34. package/dist/components/{text-input/text-input.jsx → TextInput/TextInput.jsx} +11 -11
  35. package/dist/components/{textarea/textarea.jsx → Textarea/Textarea.jsx} +7 -7
  36. package/dist/tsconfig.tsbuildinfo +1 -1
  37. package/package.json +1 -1
  38. package/src/common/{abstract-notification-banner.test.tsx → AbstractNotificationBanner.test.tsx} +11 -11
  39. package/src/common/{abstract-notification-banner.tsx → AbstractNotificationBanner.tsx} +2 -2
  40. package/src/common/{conditional-wrapper.test.tsx → ConditionalWrapper.test.tsx} +1 -1
  41. package/src/common/{file-icon.test.tsx → FileIcon.test.tsx} +10 -10
  42. package/src/common/{hint-text.test.tsx → HintText.test.tsx} +12 -12
  43. package/src/common/{icon.test.tsx → Icon.test.tsx} +16 -16
  44. package/src/common/{screen-reader-text.test.tsx → ScreenReaderText.test.tsx} +5 -5
  45. package/src/common/{wrapper-tag.test.tsx → WrapperTag.test.tsx} +5 -5
  46. package/src/components/{accordion/accordion.test.tsx → Accordion/Accordion.test.tsx} +35 -35
  47. package/src/components/{accordion/accordion.tsx → Accordion/Accordion.tsx} +5 -5
  48. package/src/components/{aspect-box/aspect-box.test.tsx → AspectBox/AspectBox.test.tsx} +2 -2
  49. package/src/components/{back-to-top/back-to-top.test.tsx → BackToTop/BackToTop.test.tsx} +1 -1
  50. package/src/components/{back-to-top/back-to-top.tsx → BackToTop/BackToTop.tsx} +1 -1
  51. package/src/components/{breadcrumbs/breadcrumbs.test.tsx → Breadcrumbs/Breadcrumbs.test.tsx} +7 -7
  52. package/src/components/{button/button.test.tsx → Button/Button.test.tsx} +1 -1
  53. package/src/components/{button/button.tsx → Button/Button.tsx} +3 -3
  54. package/src/components/{checkbox/checkbox.test.tsx → Checkbox/Checkbox.test.tsx} +16 -16
  55. package/src/components/{checkbox/checkbox.tsx → Checkbox/Checkbox.tsx} +1 -1
  56. package/src/components/{confirmation-message/confirmation-message.test.tsx → ConfirmationMessage/ConfirmationMessage.test.tsx} +12 -14
  57. package/src/components/{confirmation-message/confirmation-message.tsx → ConfirmationMessage/ConfirmationMessage.tsx} +4 -4
  58. package/src/components/{contents-nav/contents-nav.test.tsx → ContentsNav/ContentsNav.test.tsx} +21 -28
  59. package/src/components/{contents-nav/contents-nav.tsx → ContentsNav/ContentsNav.tsx} +1 -1
  60. package/src/components/{cookie-banner/cookie-banner.test.tsx → CookieBanner/CookieBanner.test.tsx} +3 -3
  61. package/src/components/{cookie-banner/cookie-banner.tsx → CookieBanner/CookieBanner.tsx} +1 -1
  62. package/src/components/{date-picker/date-picker.test.tsx → DatePicker/DatePicker.test.tsx} +76 -66
  63. package/src/components/{date-picker/date-picker.tsx → DatePicker/DatePicker.tsx} +2 -2
  64. package/src/components/{details/details.test.tsx → Details/Details.test.tsx} +10 -10
  65. package/src/components/{error-message/error-message.test.tsx → ErrorMessage/ErrorMessage.test.tsx} +10 -10
  66. package/src/components/{error-summary/error-summary.test.tsx → ErrorSummary/ErrorSummary.test.tsx} +13 -14
  67. package/src/components/{error-summary/error-summary.tsx → ErrorSummary/ErrorSummary.tsx} +1 -1
  68. package/src/components/{file-download/file-download.test.tsx → FileDownload/FileDownload.test.tsx} +21 -21
  69. package/src/components/{file-download/file-download.tsx → FileDownload/FileDownload.tsx} +1 -1
  70. package/src/components/{hide-this-page/hide-this-page.test.tsx → HideThisPage/HideThisPage.test.tsx} +4 -4
  71. package/src/components/{hide-this-page/hide-this-page.tsx → HideThisPage/HideThisPage.tsx} +3 -3
  72. package/src/components/{inset-text/inset-text.test.tsx → InsetText/InsetText.test.tsx} +1 -1
  73. package/src/components/{notification-banner/notification-banner.test.tsx → NotificationBanner/NotificationBanner.test.tsx} +4 -4
  74. package/src/components/{notification-banner/notification-banner.tsx → NotificationBanner/NotificationBanner.tsx} +1 -1
  75. package/src/components/{notification-panel/notification-panel.test.tsx → NotificationPanel/NotificationPanel.test.tsx} +24 -23
  76. package/src/components/{notification-panel/notification-panel.tsx → NotificationPanel/NotificationPanel.tsx} +3 -3
  77. package/src/components/{page-header/page-header.test.tsx → PageHeader/PageHeader.test.tsx} +9 -9
  78. package/src/components/{page-metadata/page-metadata.test.tsx → PageMetadata/PageMetadata.test.tsx} +9 -9
  79. package/src/components/{pagination/pagination.test.tsx → Pagination/Pagination.test.tsx} +56 -56
  80. package/src/components/{pagination/pagination.tsx → Pagination/Pagination.tsx} +1 -1
  81. package/src/components/{phase-banner/phase-banner.test.tsx → PhaseBanner/PhaseBanner.test.tsx} +9 -9
  82. package/src/components/{phase-banner/phase-banner.tsx → PhaseBanner/PhaseBanner.tsx} +1 -1
  83. package/src/components/{question/question.test.tsx → Question/Question.test.tsx} +10 -10
  84. package/src/components/{question/question.tsx → Question/Question.tsx} +3 -3
  85. package/src/components/{radio-button/radio-button.test.tsx → RadioButton/RadioButton.test.tsx} +23 -23
  86. package/src/components/{radio-button/radio-button.tsx → RadioButton/RadioButton.tsx} +1 -1
  87. package/src/components/{select/select.test.tsx → Select/Select.test.tsx} +67 -64
  88. package/src/components/{select/select.tsx → Select/Select.tsx} +2 -2
  89. package/src/components/{sequential-navigation/sequential-navigation.test.tsx → SequentialNavigation/SequentialNavigation.test.tsx} +18 -18
  90. package/src/components/{side-navigation/side-navigation.test.tsx → SideNavigation/SideNavigation.test.tsx} +8 -8
  91. package/src/components/{site-header/site-header.test.tsx → SiteHeader/SiteHeader.test.tsx} +25 -25
  92. package/src/components/{site-header/site-header.tsx → SiteHeader/SiteHeader.tsx} +4 -4
  93. package/src/components/{site-navigation/site-navigation.test.tsx → SiteNavigation/SiteNavigation.test.tsx} +8 -8
  94. package/src/components/{site-search/site-search.test.tsx → SiteSearch/SiteSearch.test.tsx} +16 -16
  95. package/src/components/{site-search/site-search.tsx → SiteSearch/SiteSearch.tsx} +1 -1
  96. package/src/components/{skip-links/skip-links.test.tsx → SkipLinks/SkipLinks.test.tsx} +15 -15
  97. package/src/components/{summary-card/summary-card.test.tsx → SummaryCard/SummaryCard.test.tsx} +28 -28
  98. package/src/components/{summary-card/summary-card.tsx → SummaryCard/SummaryCard.tsx} +4 -4
  99. package/src/components/{summary-list/summary-list.test.tsx → SummaryList/SummaryList.test.tsx} +55 -56
  100. package/src/components/{summary-list/summary-list.tsx → SummaryList/SummaryList.tsx} +2 -2
  101. package/src/components/{table/table.test.tsx → Table/Table.test.tsx} +4 -4
  102. package/src/components/{tabs/tabs.test.tsx → Tabs/Tabs.test.tsx} +22 -42
  103. package/src/components/{tabs/tabs.tsx → Tabs/Tabs.tsx} +3 -3
  104. package/src/components/{tag/tag.test.tsx → Tag/Tag.test.tsx} +10 -10
  105. package/src/components/{task-list/task-list.test.tsx → TaskList/TaskList.test.tsx} +109 -108
  106. package/src/components/{task-list/task-list.tsx → TaskList/TaskList.tsx} +4 -4
  107. package/src/components/{text-input/text-input.test.tsx → TextInput/TextInput.test.tsx} +92 -87
  108. package/src/components/{text-input/text-input.tsx → TextInput/TextInput.tsx} +4 -4
  109. package/src/components/{textarea/textarea.test.tsx → Textarea/Textarea.test.tsx} +71 -67
  110. package/src/components/{textarea/textarea.tsx → Textarea/Textarea.tsx} +3 -3
  111. package/src/components/{warning-text/warning-text.test.tsx → WarningText/WarningText.test.tsx} +1 -1
  112. package/dist/icons/ArrowUpward.jsx +0 -41
  113. package/dist/icons/CalendarToday.jsx +0 -41
  114. package/dist/icons/Cancel.jsx +0 -40
  115. package/dist/icons/CheckCircle.jsx +0 -41
  116. package/dist/icons/ChevronLeft.jsx +0 -41
  117. package/dist/icons/ChevronRight.jsx +0 -41
  118. package/dist/icons/Close.jsx +0 -41
  119. package/dist/icons/Description.jsx +0 -41
  120. package/dist/icons/DoubleChevronLeft.jsx +0 -40
  121. package/dist/icons/DoubleChevronRight.jsx +0 -40
  122. package/dist/icons/Error.jsx +0 -41
  123. package/dist/icons/ExpandLess.jsx +0 -41
  124. package/dist/icons/ExpandMore.jsx +0 -41
  125. package/dist/icons/List.jsx +0 -44
  126. package/dist/icons/Menu.jsx +0 -41
  127. package/dist/icons/PriorityHigh.jsx +0 -42
  128. package/dist/icons/Search.jsx +0 -41
  129. package/dist/icons/index.js +0 -40
  130. /package/dist/common/{conditional-wrapper.jsx → ConditionalWrapper.jsx} +0 -0
  131. /package/dist/common/{file-icon.jsx → FileIcon.jsx} +0 -0
  132. /package/dist/common/{hint-text.jsx → HintText.jsx} +0 -0
  133. /package/dist/common/{icon.jsx → Icon.jsx} +0 -0
  134. /package/dist/common/{screen-reader-text.jsx → ScreenReaderText.jsx} +0 -0
  135. /package/dist/common/{wrapper-tag.jsx → WrapperTag.jsx} +0 -0
  136. /package/dist/components/{aspect-box/aspect-box.jsx → AspectBox/AspectBox.jsx} +0 -0
  137. /package/dist/components/{breadcrumbs/breadcrumbs.jsx → Breadcrumbs/Breadcrumbs.jsx} +0 -0
  138. /package/dist/components/{details/details.jsx → Details/Details.jsx} +0 -0
  139. /package/dist/components/{error-message/error-message.jsx → ErrorMessage/ErrorMessage.jsx} +0 -0
  140. /package/dist/components/{inset-text/inset-text.jsx → InsetText/InsetText.jsx} +0 -0
  141. /package/dist/components/{page-header/page-header.jsx → PageHeader/PageHeader.jsx} +0 -0
  142. /package/dist/components/{page-metadata/page-metadata.jsx → PageMetadata/PageMetadata.jsx} +0 -0
  143. /package/dist/components/{sequential-navigation/sequential-navigation.jsx → SequentialNavigation/SequentialNavigation.jsx} +0 -0
  144. /package/dist/components/{side-navigation/side-navigation.jsx → SideNavigation/SideNavigation.jsx} +0 -0
  145. /package/dist/components/{site-navigation/site-navigation.jsx → SiteNavigation/SiteNavigation.jsx} +0 -0
  146. /package/dist/components/{skip-links/skip-links.jsx → SkipLinks/SkipLinks.jsx} +0 -0
  147. /package/dist/components/{table/table.jsx → Table/Table.jsx} +0 -0
  148. /package/dist/components/{tag/tag.jsx → Tag/Tag.jsx} +0 -0
  149. /package/dist/components/{warning-text/warning-text.jsx → WarningText/WarningText.jsx} +0 -0
  150. /package/src/common/{conditional-wrapper.tsx → ConditionalWrapper.tsx} +0 -0
  151. /package/src/common/{file-icon.tsx → FileIcon.tsx} +0 -0
  152. /package/src/common/{hint-text.tsx → HintText.tsx} +0 -0
  153. /package/src/common/{icon.tsx → Icon.tsx} +0 -0
  154. /package/src/common/{screen-reader-text.tsx → ScreenReaderText.tsx} +0 -0
  155. /package/src/common/{wrapper-tag.tsx → WrapperTag.tsx} +0 -0
  156. /package/src/components/{aspect-box/aspect-box.tsx → AspectBox/AspectBox.tsx} +0 -0
  157. /package/src/components/{breadcrumbs/breadcrumbs.tsx → Breadcrumbs/Breadcrumbs.tsx} +0 -0
  158. /package/src/components/{details/details.tsx → Details/Details.tsx} +0 -0
  159. /package/src/components/{error-message/error-message.tsx → ErrorMessage/ErrorMessage.tsx} +0 -0
  160. /package/src/components/{inset-text/inset-text.tsx → InsetText/InsetText.tsx} +0 -0
  161. /package/src/components/{page-header/page-header.tsx → PageHeader/PageHeader.tsx} +0 -0
  162. /package/src/components/{page-metadata/page-metadata.tsx → PageMetadata/PageMetadata.tsx} +0 -0
  163. /package/src/components/{sequential-navigation/sequential-navigation.tsx → SequentialNavigation/SequentialNavigation.tsx} +0 -0
  164. /package/src/components/{side-navigation/side-navigation.tsx → SideNavigation/SideNavigation.tsx} +0 -0
  165. /package/src/components/{site-navigation/site-navigation.tsx → SiteNavigation/SiteNavigation.tsx} +0 -0
  166. /package/src/components/{skip-links/skip-links.tsx → SkipLinks/SkipLinks.tsx} +0 -0
  167. /package/src/components/{table/table.tsx → Table/Table.tsx} +0 -0
  168. /package/src/components/{tag/tag.tsx → Tag/Tag.tsx} +0 -0
  169. /package/src/components/{warning-text/warning-text.tsx → WarningText/WarningText.tsx} +0 -0
@@ -1,7 +1,7 @@
1
1
  declare namespace SGDS.Component {
2
2
  namespace Accordion {
3
3
  interface Item extends React.AllHTMLAttributes<HTMLElement> {
4
- headerLevel?: SGDS.HeaderLevel,
4
+ headingLevel?: SGDS.HeadingLevel,
5
5
  id: string,
6
6
  open?: boolean,
7
7
  title: string
@@ -9,7 +9,7 @@ declare namespace SGDS.Component {
9
9
  }
10
10
 
11
11
  interface Accordion extends React.AllHTMLAttributes<HTMLElement> {
12
- headerLevel?: SGDS.HeaderLevel,
12
+ headingLevel?: SGDS.HeadingLevel,
13
13
  hideOpenAll?: boolean
14
14
  }
15
15
  }
@@ -1,7 +1,7 @@
1
1
  declare namespace SGDS.Component {
2
2
  interface ConfirmationMessage extends React.AllHTMLAttributes<HTMLElement> {
3
3
  ariaLive: AriaLive,
4
- headerLevel: HeaderLevel,
4
+ headingLevel: HeadingLevel,
5
5
  title: string
6
6
  }
7
7
  }
@@ -1,7 +1,7 @@
1
1
  declare namespace SGDS.Component {
2
2
  interface NotificationPanel extends React.AllHTMLAttributes<HTMLDivElement> {
3
3
  ariaLive?: AriaLive,
4
- headerLevel?: HeaderLevel,
4
+ headingLevel?: HeadingLevel,
5
5
  title: string
6
6
  }
7
7
  }
@@ -1,7 +1,7 @@
1
1
  declare namespace SGDS.Component {
2
2
  interface SummaryCard extends React.AllHTMLAttributes<HTMLElement> {
3
3
  actions?: SummaryList.Action[],
4
- headerLevel?: SGDS.HeaderLevel,
4
+ headingLevel?: SGDS.HeadingLevel,
5
5
  items: SummaryList.Item[],
6
6
  title: string
7
7
  }
@@ -15,7 +15,7 @@ declare namespace SGDS.Component {
15
15
  interface Tabs extends React.AllHTMLAttributes<HTMLElement> {
16
16
  baseId: string,
17
17
  bordered?: boolean,
18
- headerLevel?: SGDS.HeaderLevel,
18
+ headingLevel?: SGDS.HeadingLevel,
19
19
  manual?: boolean,
20
20
  title: string
21
21
  }
package/@types/sgds.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  declare namespace SGDS {
2
2
  type AriaLive = 'polite' | 'assertive';
3
- type HeaderLevel = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
3
+ type HeadingLevel = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
4
4
  type IconName = 'ArrowUpward' | 'CalendarToday' | 'Cancel' | 'CheckCircle' | 'ChevronLeft' | 'ChevronRight' | 'Close' | 'Description' | 'DoubleChevronLeft' | 'DoubleChevronRight' | 'Error' | 'ExpandLess' | 'ExpandMore' | 'List' | 'Menu' | 'PriorityHigh' | 'Search';
5
5
  type DocumentIconName = 'Audio' | 'Csv' | 'Excel' | 'File' | 'Generic' | 'Geodata' | 'Ical' | 'Ico' | 'Image' | 'Odf' | 'Odg' | 'Odp' | 'Ods' | 'Odt' | 'Pdf' | 'Ppt' | 'Rtf' | 'Text' | 'Video' | 'Word' | 'Xml' | 'Zip';
6
6
  type InputWidth = 'fixed-20' | 'fixed-10' | 'fixed-5' | 'fixed-4' | 'fixed-3' | 'fixed-2' | 'fluid-three-quarters' | 'fluid-two-thirds' | 'fluid-half' | 'fluid-one-third' | 'fluid-one-quarter';
package/CHANGELOG.md ADDED
@@ -0,0 +1,81 @@
1
+ # Change log
2
+
3
+ All notable changes to the Scottish Government "Design System React" repository/package will be documented in this file.
4
+
5
+ Changes are grouped under the labels: `Added`, `Changed`, `Deprecated`, `Fixed`,
6
+ `Removed` and `Security`.
7
+
8
+ ---
9
+
10
+ ## [0.7.0]
11
+ ### Changed
12
+ - Change all component file names to Pascal case
13
+ - Use uppercase text for const variable names
14
+ - Nomenclature: prefer 'heading' over 'header' in variable names when referring to HTML headings (H1-H6)
15
+
16
+ ## [0.6.0] - 2025-07-29
17
+ ### Added
18
+ - Add 'File download' component
19
+ - Add 'File icon' component
20
+ ### Changed
21
+ - Reorganise SVG icon components into subfolders
22
+
23
+ ## [0.5.1] - 2025-07-28
24
+ ### Changed
25
+ - 'DisplayName' property of some compound components updated (Metadata.Item, TaskList.Item, TaskList.Group)
26
+
27
+ ## [0.5.0] - 2025-07-28
28
+ ### Added
29
+ - Add 'Tabs' component
30
+
31
+ ## [0.4.0] - 2025-07-23
32
+ ### Added
33
+ - Add 'Abstract notification banner' component
34
+ - Add 'Cookie banner' component
35
+ - Add 'Table' component
36
+ - Add code of conduct
37
+ ### Changed
38
+ - 'Notification banner' refactored to use AbstractNotificationBanner
39
+ ### Fixed
40
+ - Fixed miscellaneous type warnings in unit tests
41
+
42
+ ## [0.3.0] - 2025-07-15
43
+ ### Added
44
+ - Add 'Site header' component/pattern
45
+ ### Changed
46
+ - SiteNavigation: add useRef, to support mobile navigation
47
+ - DatePicker: add 'dateSelectCallback' prop
48
+
49
+ ## [0.2.0] - 2025-07-07
50
+ ### Added
51
+ - Add 'Error summary' component
52
+
53
+ ## [0.1.7] - 2025-06-27
54
+ ### Added
55
+ - Add 'Summary card' component
56
+ - Add 'Summary list' component
57
+
58
+ ## [0.1.6] - 2025-06-27
59
+ ### Added
60
+ - Add 'Hide this page' component
61
+
62
+ ## [0.1.5] - 2025-06-23
63
+ ### Added
64
+ - Add 'Pagination' component
65
+ ### Changed
66
+ - Icon: refactor to use icon components generated from DS source using SVGR
67
+ - Add 'aria-invalid' to form fields that are in an error state
68
+
69
+ ## [0.1.2] - 2025-06-17
70
+ ### Added
71
+ - Add readme file
72
+
73
+ ## [0.1.1] - 2025-06-13
74
+ ### Changed
75
+ - Allow all components to have additional CSS classes passed to them
76
+
77
+ ## [0.1.0] - 2025-06-13
78
+ ### Added
79
+ - Add npmignore file
80
+ ### Fixed
81
+ - Fix broken content navigation spec
package/README.md CHANGED
@@ -4,6 +4,10 @@ This repository contains a React implementation of the [Scottish Government Desi
4
4
 
5
5
  There is a documentation site showing what is in this implementation and how to use it here: https://designsystem-react.vercel.app/
6
6
 
7
+ ## 🚧 Under construction 🚧
8
+
9
+ Warning: This project is in an alpha state and could potentially receive large breaking changes with little warning while it is being developed.
10
+
7
11
  ## Feedback, help or support
8
12
 
9
13
  If you need any help or want to give any feedback you can e-mail the Design System team at: [designsystem@gov.scot](mailto:designsystem@gov.scot).
@@ -4,8 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const react_1 = require("react");
7
- const icon_1 = __importDefault(require("./icon"));
8
- const screen_reader_text_1 = __importDefault(require("./screen-reader-text"));
7
+ const Icon_1 = __importDefault(require("./Icon"));
8
+ const ScreenReaderText_1 = __importDefault(require("./ScreenReaderText"));
9
9
  const Buttons = ({ children }) => {
10
10
  return (<>{children}</>);
11
11
  };
@@ -37,7 +37,7 @@ const AbstractNotificationBanner = ({ children, className, close, icon, iconColo
37
37
  iconInverse && 'ds_notification__icon--inverse',
38
38
  iconColour && 'ds_notification__icon--colour'
39
39
  ].join(' ')} aria-hidden="true">
40
- <icon_1.default icon={icon}/>
40
+ <Icon_1.default icon={icon}/>
41
41
  </span>}
42
42
 
43
43
  <div className="ds_notification__text">
@@ -46,8 +46,8 @@ const AbstractNotificationBanner = ({ children, className, close, icon, iconColo
46
46
 
47
47
  {close &&
48
48
  <button type="button" className="ds_notification__close js-close-notification">
49
- <screen_reader_text_1.default>Close this notification</screen_reader_text_1.default>
50
- <icon_1.default fill icon="Close" aria-hidden="true"/>
49
+ <ScreenReaderText_1.default>Close this notification</ScreenReaderText_1.default>
50
+ <Icon_1.default fill icon="Close" aria-hidden="true"/>
51
51
  </button>}
52
52
 
53
53
  {buttons &&
@@ -37,11 +37,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
39
  const react_1 = __importStar(require("react"));
40
- const wrapper_tag_1 = __importDefault(require("../../common/wrapper-tag"));
40
+ const WrapperTag_1 = __importDefault(require("../../common/WrapperTag"));
41
41
  // @ts-ignore
42
42
  const accordion_1 = __importDefault(require("@scottish-government/design-system/src/components/accordion/accordion"));
43
43
  let accordionItemCounter = 0;
44
- const AccordionItem = ({ children, className, headerLevel = 'h3', id: rawId, open = false, title, ...props }) => {
44
+ const AccordionItem = ({ children, className, headingLevel = 'h3', id: rawId, open = false, title, ...props }) => {
45
45
  accordionItemCounter = accordionItemCounter + 1;
46
46
  const processedId = rawId || `accordion-item-${accordionItemCounter}`;
47
47
  return (<div className={[
@@ -53,9 +53,9 @@ const AccordionItem = ({ children, className, headerLevel = 'h3', id: rawId, ope
53
53
  'visually-hidden'
54
54
  ].join(' ')} defaultChecked={open} id={`${processedId}-control`} type="checkbox"/>
55
55
  <div className="ds_accordion-item__header">
56
- <wrapper_tag_1.default id={`panel-${processedId}-heading`} className="ds_accordion-item__title" tagName={headerLevel}>
56
+ <WrapperTag_1.default id={`panel-${processedId}-heading`} className="ds_accordion-item__title" tagName={headingLevel}>
57
57
  {title}
58
- </wrapper_tag_1.default>
58
+ </WrapperTag_1.default>
59
59
  <span className='ds_accordion-item__indicator'/>
60
60
  <label className="ds_accordion-item__label" htmlFor={`${processedId}-control`}>
61
61
  <span className="visually-hidden">Show this section</span>
@@ -66,7 +66,7 @@ const AccordionItem = ({ children, className, headerLevel = 'h3', id: rawId, ope
66
66
  </div>
67
67
  </div>);
68
68
  };
69
- const Accordion = ({ children, className, headerLevel = 'h3', hideOpenAll, ...props }) => {
69
+ const Accordion = ({ children, className, headingLevel = 'h3', hideOpenAll, ...props }) => {
70
70
  const ref = (0, react_1.useRef)(null);
71
71
  (0, react_1.useEffect)(() => {
72
72
  if (ref.current) {
@@ -77,7 +77,7 @@ const Accordion = ({ children, className, headerLevel = 'h3', hideOpenAll, ...pr
77
77
  hideOpenAll = true;
78
78
  }
79
79
  function processChild(child) {
80
- return react_1.default.cloneElement(child, { headerLevel: headerLevel });
80
+ return react_1.default.cloneElement(child, { headingLevel: headingLevel });
81
81
  }
82
82
  return (<div className={[
83
83
  'ds_accordion',
@@ -4,9 +4,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const react_1 = require("react");
7
+ const Icon_1 = __importDefault(require("../../common/Icon"));
7
8
  // @ts-ignore
8
9
  const back_to_top_1 = __importDefault(require("@scottish-government/design-system/src/components/back-to-top/back-to-top"));
9
- const icon_1 = __importDefault(require("../../common/icon"));
10
10
  const BackToTop = ({ className, href = '#page-top', ...props }) => {
11
11
  const ref = (0, react_1.useRef)(null);
12
12
  (0, react_1.useEffect)(() => {
@@ -19,7 +19,7 @@ const BackToTop = ({ className, href = '#page-top', ...props }) => {
19
19
  className
20
20
  ].join(' ')} ref={ref} {...props}>
21
21
  <a href={href} className="ds_back-to-top__button">Back to top
22
- <icon_1.default className="ds_back-to-top__icon" icon="ArrowUpward"/>
22
+ <Icon_1.default className="ds_back-to-top__icon" icon="ArrowUpward"/>
23
23
  </a>
24
24
  </div>);
25
25
  };
@@ -3,16 +3,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const icon_1 = __importDefault(require("../../common/icon"));
7
- const screen_reader_text_1 = __importDefault(require("../../common/screen-reader-text"));
8
- const wrapper_tag_1 = __importDefault(require("../../common/wrapper-tag"));
6
+ const Icon_1 = __importDefault(require("../../common/Icon"));
7
+ const ScreenReaderText_1 = __importDefault(require("../../common/ScreenReaderText"));
8
+ const WrapperTag_1 = __importDefault(require("../../common/WrapperTag"));
9
9
  const Button = ({ buttonStyle, children, className, icon, iconLeft, iconOnly = false, href, small, styleAsLink, type = 'button', width, ...props }) => {
10
10
  // determine which HTML tag to use
11
11
  let tagName = 'button';
12
12
  if (href) {
13
13
  tagName = 'a';
14
14
  }
15
- return (<wrapper_tag_1.default tagName={tagName} className={[
15
+ return (<WrapperTag_1.default tagName={tagName} className={[
16
16
  !styleAsLink ? 'ds_button' : 'ds_link',
17
17
  width && `ds_button--${width}`,
18
18
  buttonStyle && `ds_button--${buttonStyle}`,
@@ -21,10 +21,10 @@ const Button = ({ buttonStyle, children, className, icon, iconLeft, iconOnly = f
21
21
  iconLeft && 'ds_button--has-icon--left',
22
22
  className
23
23
  ].join(' ')} href={href} {...(tagName === 'button' ? { type: type } : {})} {...props}>
24
- {iconOnly ? <screen_reader_text_1.default>{children}</screen_reader_text_1.default> : children}
24
+ {iconOnly ? <ScreenReaderText_1.default>{children}</ScreenReaderText_1.default> : children}
25
25
 
26
- {icon && <icon_1.default icon={icon}/>}
27
- </wrapper_tag_1.default>);
26
+ {icon && <Icon_1.default icon={icon}/>}
27
+ </WrapperTag_1.default>);
28
28
  };
29
29
  Button.displayName = 'Button';
30
30
  exports.default = Button;
@@ -7,7 +7,7 @@ exports.CheckboxGroup = exports.Checkbox = void 0;
7
7
  const react_1 = require("react");
8
8
  // @ts-ignore
9
9
  const checkboxes_1 = __importDefault(require("@scottish-government/design-system/src/forms/checkbox/checkboxes"));
10
- const hint_text_1 = __importDefault(require("../../common/hint-text"));
10
+ const HintText_1 = __importDefault(require("../../common/HintText"));
11
11
  const Checkbox = ({ checked, hintText, id, exclusive, label, name, onBlur, onChange, small }) => {
12
12
  const hintTextId = `hint-text-${id}`;
13
13
  const behaviour = exclusive && 'exclusive';
@@ -30,7 +30,7 @@ const Checkbox = ({ checked, hintText, id, exclusive, label, name, onBlur, onCha
30
30
 
31
31
  <input aria-describedby={hintText ? hintTextId : undefined} className="ds_checkbox__input" data-behaviour={behaviour} defaultChecked={!!checked} id={id} name={name || id} onBlur={handleBlur} onChange={handleChange} type="checkbox"/>
32
32
  <label className="ds_checkbox__label" htmlFor={id}>{label}</label>
33
- {hintText && <hint_text_1.default id={hintTextId} text={hintText}/>}
33
+ {hintText && <HintText_1.default id={hintTextId} text={hintText}/>}
34
34
  </div>
35
35
  </>);
36
36
  };
@@ -3,18 +3,18 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const icon_1 = __importDefault(require("../../common/icon"));
7
- const wrapper_tag_1 = __importDefault(require("../../common/wrapper-tag"));
8
- const ConfirmationMessage = ({ ariaLive = 'polite', children, className, headerLevel = 'h3', title, ...props }) => {
6
+ const Icon_1 = __importDefault(require("../../common/Icon"));
7
+ const WrapperTag_1 = __importDefault(require("../../common/WrapperTag"));
8
+ const ConfirmationMessage = ({ ariaLive = 'polite', children, className, headingLevel = 'h3', title, ...props }) => {
9
9
  return (<div aria-live={ariaLive} className={[
10
10
  'ds_confirmation-message',
11
11
  className
12
12
  ].join(' ')} {...props}>
13
- <icon_1.default className="ds_confirmation-message__icon" icon="CheckCircle" iconSize="24"/>
13
+ <Icon_1.default className="ds_confirmation-message__icon" icon="CheckCircle" iconSize="24"/>
14
14
 
15
- <wrapper_tag_1.default className="ds_confirmation-message__title" tagName={headerLevel}>
15
+ <WrapperTag_1.default className="ds_confirmation-message__title" tagName={headingLevel}>
16
16
  {title}
17
- </wrapper_tag_1.default>
17
+ </WrapperTag_1.default>
18
18
  {children && <div className="ds_confirmation-message__body">
19
19
  {children}
20
20
  </div>}
@@ -4,17 +4,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.Link = void 0;
7
- const wrapper_tag_1 = __importDefault(require("../../common/wrapper-tag"));
7
+ const WrapperTag_1 = __importDefault(require("../../common/WrapperTag"));
8
8
  const Link = ({ current, href, title }) => {
9
9
  // determine which HTML tag to use
10
10
  const tagName = href && !current ? 'a' : 'span';
11
11
  return (<li aria-current={current && 'page' || undefined} className="ds_contents-nav__item">
12
- <wrapper_tag_1.default tagName={tagName} className={[
12
+ <WrapperTag_1.default tagName={tagName} className={[
13
13
  'ds_contents-nav__link',
14
14
  current && 'ds_current'
15
15
  ].join(' ')} href={!current ? href : undefined}>
16
16
  {title}
17
- </wrapper_tag_1.default>
17
+ </WrapperTag_1.default>
18
18
  </li>);
19
19
  };
20
20
  exports.Link = Link;
@@ -3,19 +3,19 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const abstract_notification_banner_1 = __importDefault(require("../../common/abstract-notification-banner"));
6
+ const AbstractNotificationBanner_1 = __importDefault(require("../../common/AbstractNotificationBanner"));
7
7
  const CookieBanner = ({ children, className, title, ...props }) => {
8
8
  return (<>
9
- <abstract_notification_banner_1.default className={[
9
+ <AbstractNotificationBanner_1.default className={[
10
10
  'ds_notification--large',
11
11
  'ds_notification--cookie',
12
12
  'js-initial-cookie-content',
13
13
  className
14
14
  ].join(' ')} data-module="ds-cookie-notification" title={title} {...props}>
15
15
  {children}
16
- </abstract_notification_banner_1.default>
16
+ </AbstractNotificationBanner_1.default>
17
17
  </>);
18
18
  };
19
19
  CookieBanner.displayName = 'CookieBanner';
20
- CookieBanner.Buttons = abstract_notification_banner_1.default.Buttons;
20
+ CookieBanner.Buttons = AbstractNotificationBanner_1.default.Buttons;
21
21
  exports.default = CookieBanner;
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const react_1 = require("react");
7
7
  // @ts-ignore
8
8
  const date_picker_1 = __importDefault(require("@scottish-government/design-system/src/components/date-picker/date-picker"));
9
- const error_message_1 = __importDefault(require("../error-message/error-message"));
10
- const text_input_1 = __importDefault(require("../text-input/text-input"));
9
+ const ErrorMessage_1 = __importDefault(require("../ErrorMessage/ErrorMessage"));
10
+ const TextInput_1 = __importDefault(require("../TextInput/TextInput"));
11
11
  const DatePicker = ({ className, dateSelectCallback, disabledDates, error, errorMessage, hintText, id, iconPath = './', label, maxDate, minDate, multiple, name, onBlur, onChange, value, width = 'fixed-10', ...props }) => {
12
12
  const ref = (0, react_1.useRef)(null);
13
13
  (0, react_1.useEffect)(() => {
@@ -35,19 +35,19 @@ const DatePicker = ({ className, dateSelectCallback, disabledDates, error, error
35
35
  ].join(' ')} data-disableddates={disabledDates} data-maxdate={maxDate} data-mindate={minDate} data-module="ds-datepicker" ref={ref} {...props}>
36
36
  {(multiple ? (<fieldset className="ds_datepicker__input-wrapper">
37
37
  <legend>{label}</legend>
38
- {errorMessage && <error_message_1.default text={errorMessage}/>}
38
+ {errorMessage && <ErrorMessage_1.default text={errorMessage}/>}
39
39
  <div>
40
- <text_input_1.default className="js-datepicker-date" error={!!error} id={id + "-day"} hintText={hintText} label="Day" name={name + "-day"} onBlur={handleBlur} onChange={handleChange} value={value?.split('/')[0]} width="fixed-2"/>
40
+ <TextInput_1.default className="js-datepicker-date" error={!!error} id={id + "-day"} hintText={hintText} label="Day" name={name + "-day"} onBlur={handleBlur} onChange={handleChange} value={value?.split('/')[0]} width="fixed-2"/>
41
41
  </div>
42
42
 
43
43
  <div>
44
- <text_input_1.default className="js-datepicker-month" error={!!error} id={id + "-month"} hintText={hintText} label="Month" name={name + "-month"} onBlur={handleBlur} onChange={handleChange} value={value?.split('/')[1]} width="fixed-2"/>
44
+ <TextInput_1.default className="js-datepicker-month" error={!!error} id={id + "-month"} hintText={hintText} label="Month" name={name + "-month"} onBlur={handleBlur} onChange={handleChange} value={value?.split('/')[1]} width="fixed-2"/>
45
45
  </div>
46
46
 
47
47
  <div>
48
- <text_input_1.default className="js-datepicker-year" error={!!error} id={id + "-year"} hintText={hintText} label="Year" name={name + "-year"} onBlur={handleBlur} onChange={handleChange} value={value?.split('/')[2]} width="fixed-4"/>
48
+ <TextInput_1.default className="js-datepicker-year" error={!!error} id={id + "-year"} hintText={hintText} label="Year" name={name + "-year"} onBlur={handleBlur} onChange={handleChange} value={value?.split('/')[2]} width="fixed-4"/>
49
49
  </div>
50
- </fieldset>) : (<text_input_1.default error={!!error} errorMessage={errorMessage} id={id} hasButton hintText={hintText} label={label} name={name} onBlur={handleBlur} onChange={handleChange} placeholder="dd/mm/yyyy" value={value} width={width}/>))}
50
+ </fieldset>) : (<TextInput_1.default error={!!error} errorMessage={errorMessage} id={id} hasButton hintText={hintText} label={label} name={name} onBlur={handleBlur} onChange={handleChange} placeholder="dd/mm/yyyy" value={value} width={width}/>))}
51
51
  </div>);
52
52
  };
53
53
  DatePicker.displayName = 'DatePicker';
@@ -3,10 +3,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const conditional_wrapper_1 = __importDefault(require("../../common/conditional-wrapper"));
6
+ const ConditionalWrapper_1 = __importDefault(require("../../common/ConditionalWrapper"));
7
7
  const Error = ({ fragmentId, title }) => {
8
8
  return (<li>
9
- <conditional_wrapper_1.default condition={!!fragmentId} wrapper={() => <a href={`#${fragmentId}`}>{title}</a>}>{title}</conditional_wrapper_1.default>
9
+ <ConditionalWrapper_1.default condition={!!fragmentId} wrapper={() => <a href={`#${fragmentId}`}>{title}</a>}>{title}</ConditionalWrapper_1.default>
10
10
  </li>);
11
11
  };
12
12
  const ErrorSummary = ({ className, errors, title = 'There is a problem', ...props }) => {
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const react_1 = require("react");
7
- const file_icon_1 = __importDefault(require("../../common/file-icon"));
7
+ const FileIcon_1 = __importDefault(require("../../common/FileIcon"));
8
8
  const FileDownload = ({ className, cover, highlighted, icon = 'Generic', fileSize, fileType, fileUrl, title, ...props }) => {
9
9
  const hasMetadata = !!fileType || !!fileSize;
10
10
  const metaContainerId = `file-download-${(0, react_1.useId)()}`;
@@ -18,7 +18,7 @@ const FileDownload = ({ className, cover, highlighted, icon = 'Generic', fileSiz
18
18
  {cover ?
19
19
  <img alt="" className="ds_file-download__thumbnail-image" src={cover}/>
20
20
  :
21
- <file_icon_1.default ariaLabel="" className="ds_file-download__thumbnail-image" icon={icon}/>}
21
+ <FileIcon_1.default ariaLabel="" className="ds_file-download__thumbnail-image" icon={icon}/>}
22
22
  </a>
23
23
  </div>
24
24
 
@@ -44,10 +44,10 @@ const HideThisPage = ({ className, escapeUrl = 'https://www.bbc.co.uk/weather',
44
44
  (0, react_1.useEffect)(() => {
45
45
  if (ref.current) {
46
46
  new hide_this_page_1.default().init();
47
- const htpDivId = 'hide-this-page-instruction';
48
- if (!document.getElementById(htpDivId)) {
47
+ const HIDE_THIS_PAGE_DIV_ID = 'hide-this-page-instruction';
48
+ if (!document.getElementById(HIDE_THIS_PAGE_DIV_ID)) {
49
49
  const htpDiv = document.createElement('div');
50
- htpDiv.id = htpDivId;
50
+ htpDiv.id = HIDE_THIS_PAGE_DIV_ID;
51
51
  htpDiv.classList.add('visually-hidden');
52
52
  htpDiv.classList.add('ds_hide-page');
53
53
  htpDiv.innerHTML = '<p>To leave the page quickly, press the escape key.</p>';
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const react_1 = require("react");
7
- const abstract_notification_banner_1 = __importDefault(require("../../common/abstract-notification-banner"));
7
+ const AbstractNotificationBanner_1 = __importDefault(require("../../common/AbstractNotificationBanner"));
8
8
  // @ts-ignore
9
9
  const notification_banner_1 = __importDefault(require("@scottish-government/design-system/src/components/notification-banner/notification-banner"));
10
10
  const NotificationBanner = ({ children, className, close, icon, iconColour, iconInverse, title, ...props }) => {
@@ -14,13 +14,13 @@ const NotificationBanner = ({ children, className, close, icon, iconColour, icon
14
14
  new notification_banner_1.default(ref.current).init();
15
15
  }
16
16
  }, [ref]);
17
- return (<abstract_notification_banner_1.default className={[
17
+ return (<AbstractNotificationBanner_1.default className={[
18
18
  'ds_reversed',
19
19
  className
20
20
  ].join(' ')} close={close} icon={icon ? "PriorityHigh" : undefined} iconColour={iconColour} iconInverse={iconInverse} ref={ref} title="Information" {...props}>
21
21
  {children}
22
- </abstract_notification_banner_1.default>);
22
+ </AbstractNotificationBanner_1.default>);
23
23
  };
24
24
  NotificationBanner.displayName = 'NotificationBanner';
25
- NotificationBanner.Buttons = abstract_notification_banner_1.default.Buttons;
25
+ NotificationBanner.Buttons = AbstractNotificationBanner_1.default.Buttons;
26
26
  exports.default = NotificationBanner;
@@ -3,15 +3,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const wrapper_tag_1 = __importDefault(require("../../common/wrapper-tag"));
7
- const NotificationPanel = function ({ ariaLive, children, className, headerLevel = 'h1', title, ...props }) {
6
+ const WrapperTag_1 = __importDefault(require("../../common/WrapperTag"));
7
+ const NotificationPanel = function ({ ariaLive, children, className, headingLevel = 'h1', title, ...props }) {
8
8
  return (<div aria-live={ariaLive} className={[
9
9
  'ds_notification-panel',
10
10
  className
11
11
  ].join(' ')} {...props}>
12
- <wrapper_tag_1.default className="ds_notification-panel__title" tagName={headerLevel}>
12
+ <WrapperTag_1.default className="ds_notification-panel__title" tagName={headingLevel}>
13
13
  {title}
14
- </wrapper_tag_1.default>
14
+ </WrapperTag_1.default>
15
15
  <div className="ds_notification-panel__content">
16
16
  {children}
17
17
  </div>
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.Ellipsis = exports.Page = void 0;
7
- const icon_1 = __importDefault(require("../../common/icon"));
7
+ const Icon_1 = __importDefault(require("../../common/Icon"));
8
8
  const Page = ({ ariaLabel, current = false, href, onClick, text }) => {
9
9
  function handleClick(event) {
10
10
  if (typeof onClick === 'function') {
@@ -66,7 +66,7 @@ const Pagination = ({ ariaLabel = 'Pages', className, onClick, padding = 1, page
66
66
  <ul className="ds_pagination__list">
67
67
  {page > 1 && (<li className="ds_pagination__item">
68
68
  <a aria-label="Previous page" className="ds_pagination__link ds_pagination__link--text ds_pagination__link--icon" href={pattern.replace('$1', String(page - 1))} data-search="pagination-previous" onClick={onClick}>
69
- <icon_1.default icon="ChevronLeft"/>
69
+ <Icon_1.default icon="ChevronLeft"/>
70
70
  <span className="ds_pagination__link-label">Previous</span>
71
71
  </a>
72
72
  </li>)}
@@ -86,7 +86,7 @@ const Pagination = ({ ariaLabel = 'Pages', className, onClick, padding = 1, page
86
86
  {page < totalPages && (<li className="ds_pagination__item">
87
87
  <a aria-label="Next page" className="ds_pagination__link ds_pagination__link--text ds_pagination__link--icon" href={pattern.replace('$1', String(page + 1))} data-search="pagination-next" onClick={onClick}>
88
88
  <span className="ds_pagination__link-label">Next</span>
89
- <icon_1.default icon="ChevronRight"/>
89
+ <Icon_1.default icon="ChevronRight"/>
90
90
  </a>
91
91
  </li>)}
92
92
 
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const tag_1 = __importDefault(require("../tag/tag"));
6
+ const Tag_1 = __importDefault(require("../Tag/Tag"));
7
7
  const PhaseBanner = ({ children, className, content, phaseName, ...props }) => {
8
8
  return (<div className={[
9
9
  'ds_phase-banner',
@@ -11,7 +11,7 @@ const PhaseBanner = ({ children, className, content, phaseName, ...props }) => {
11
11
  ].join(' ')} {...props}>
12
12
  <div className="ds_wrapper">
13
13
  <p className="ds_phase-banner__content">
14
- {phaseName && <tag_1.default title={phaseName} className="ds_phase-banner__tag"/>}
14
+ {phaseName && <Tag_1.default title={phaseName} className="ds_phase-banner__tag"/>}
15
15
  <span className="ds_phase-banner__text">
16
16
  {content ? content : children || "This is a new service"}
17
17
  </span>
@@ -3,20 +3,20 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const error_message_1 = __importDefault(require("../error-message/error-message"));
7
- const hint_text_1 = __importDefault(require("../../common/hint-text"));
8
- const wrapper_tag_1 = __importDefault(require("../../common/wrapper-tag"));
6
+ const ErrorMessage_1 = __importDefault(require("../ErrorMessage/ErrorMessage"));
7
+ const HintText_1 = __importDefault(require("../../common/HintText"));
8
+ const WrapperTag_1 = __importDefault(require("../../common/WrapperTag"));
9
9
  const Question = function ({ children, className, error, errorMessage, hintText, legend, tagName = 'div', ...props }) {
10
- return (<wrapper_tag_1.default tagName={tagName} className={[
10
+ return (<WrapperTag_1.default tagName={tagName} className={[
11
11
  'ds_question',
12
12
  error && 'ds_question--error',
13
13
  className
14
14
  ].join(' ')} {...props}>
15
15
  {legend && <legend>{legend}</legend>}
16
- {hintText && <hint_text_1.default text={hintText}/>}
17
- {error && errorMessage && <error_message_1.default text={errorMessage}/>}
16
+ {hintText && <HintText_1.default text={hintText}/>}
17
+ {error && errorMessage && <ErrorMessage_1.default text={errorMessage}/>}
18
18
  {children}
19
- </wrapper_tag_1.default>);
19
+ </WrapperTag_1.default>);
20
20
  };
21
21
  Question.displayName = 'Question';
22
22
  exports.default = Question;
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.Radio = void 0;
7
- const hint_text_1 = __importDefault(require("../../common/hint-text"));
7
+ const HintText_1 = __importDefault(require("../../common/HintText"));
8
8
  const Radio = ({ checked, hintText, id, label, name, onBlur, onChange, small }) => {
9
9
  const hintTextId = `hint-text-${id}`;
10
10
  function handleBlur(event) {
@@ -23,7 +23,7 @@ const Radio = ({ checked, hintText, id, label, name, onBlur, onChange, small })
23
23
  ].join(' ')}>
24
24
  <input aria-describedby={hintText ? hintTextId : undefined} className="ds_radio__input" defaultChecked={!!checked} id={id} name={name} onBlur={handleBlur} onChange={handleChange} type="radio"/>
25
25
  <label className="ds_radio__label" htmlFor={id}>{label}</label>
26
- {hintText && <hint_text_1.default id={hintTextId} text={hintText}/>}
26
+ {hintText && <HintText_1.default id={hintTextId} text={hintText}/>}
27
27
  </div>);
28
28
  };
29
29
  exports.Radio = Radio;