@moduk/frontend 1.3.1 → 1.4.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.
Files changed (165) hide show
  1. package/dist/nunjucks/moduk/components/footer/__examples__/with-customisation.njk +28 -0
  2. package/dist/nunjucks/moduk/components/phase-banner/__examples__/default.njk +0 -4
  3. package/dist/nunjucks/moduk/components/summary-list/__examples__/cards-with-single-action.njk +36 -0
  4. package/dist/nunjucks/moduk/components/summary-list/__examples__/with-multiple-actions.njk +28 -0
  5. package/nunjucks/moduk/components/footer/__examples__/with-customisation.njk +28 -0
  6. package/nunjucks/moduk/components/phase-banner/__examples__/default.njk +0 -4
  7. package/nunjucks/moduk/components/summary-list/__examples__/cards-with-single-action.njk +36 -0
  8. package/nunjucks/moduk/components/summary-list/__examples__/with-multiple-actions.njk +28 -0
  9. package/package.json +2 -1
  10. package/react/VisuallyHiddenText/VisuallyHiddenText.d.ts +10 -0
  11. package/react/VisuallyHiddenText/VisuallyHiddenText.d.ts.map +1 -0
  12. package/react/VisuallyHiddenText/index.d.ts +2 -0
  13. package/react/VisuallyHiddenText/index.d.ts.map +1 -0
  14. package/react/accordion/Accordion.d.ts +3 -4
  15. package/react/accordion/Accordion.d.ts.map +1 -1
  16. package/react/back-link/BackLink.d.ts +2 -3
  17. package/react/back-link/BackLink.d.ts.map +1 -1
  18. package/react/error-message/ErrorMessage.d.ts +13 -0
  19. package/react/error-message/ErrorMessage.d.ts.map +1 -0
  20. package/react/error-message/index.d.ts +2 -0
  21. package/react/error-message/index.d.ts.map +1 -0
  22. package/react/esm/VisuallyHiddenText/VisuallyHiddenText.js +10 -0
  23. package/react/esm/VisuallyHiddenText/index.js +1 -0
  24. package/react/esm/accordion/Accordion.js +8 -5
  25. package/react/esm/error-message/ErrorMessage.js +33 -0
  26. package/react/esm/error-message/index.js +1 -0
  27. package/react/esm/footer/Footer.js +84 -0
  28. package/react/esm/footer/FooterMeta.js +21 -0
  29. package/react/esm/footer/FooterMetaLink.js +32 -0
  30. package/react/esm/footer/FooterNavigation.js +14 -0
  31. package/react/esm/footer/FooterNavigationLink.js +28 -0
  32. package/react/esm/footer/FooterNavigationSection.js +20 -0
  33. package/react/esm/footer/index.js +6 -0
  34. package/react/esm/hint/Hint.js +28 -0
  35. package/react/esm/hint/index.js +1 -0
  36. package/react/esm/index.js +10 -1
  37. package/react/esm/input/Input.js +60 -0
  38. package/react/esm/input/InputPrefix.js +14 -0
  39. package/react/esm/input/InputSuffix.js +14 -0
  40. package/react/esm/input/index.js +3 -0
  41. package/react/esm/internal/FormGroup/FormGroup.js +21 -0
  42. package/react/esm/internal/FormGroup/FormGroupContext.js +4 -0
  43. package/react/esm/internal/FormGroup/index.js +2 -0
  44. package/react/esm/internal/PermissiveChild.js +1 -0
  45. package/react/esm/label/Label.js +38 -0
  46. package/react/esm/label/index.js +1 -0
  47. package/react/esm/phase-banner/PhaseBanner.js +32 -0
  48. package/react/esm/phase-banner/PhaseTag.js +24 -0
  49. package/react/esm/phase-banner/index.js +2 -0
  50. package/react/esm/summary-list/SummaryCardActions.js +24 -0
  51. package/react/esm/summary-list/SummaryCardTitle.js +12 -0
  52. package/react/esm/summary-list/SummaryList.js +76 -0
  53. package/react/esm/summary-list/SummaryListActionLink.js +25 -0
  54. package/react/esm/summary-list/SummaryListActions.js +22 -0
  55. package/react/esm/summary-list/SummaryListKey.js +10 -0
  56. package/react/esm/summary-list/SummaryListValue.js +10 -0
  57. package/react/esm/summary-list/index.js +7 -0
  58. package/react/esm/tag/Tag.js +27 -0
  59. package/react/esm/tag/index.js +1 -0
  60. package/react/footer/Footer.d.ts +44 -0
  61. package/react/footer/Footer.d.ts.map +1 -0
  62. package/react/footer/FooterMeta.d.ts +24 -0
  63. package/react/footer/FooterMeta.d.ts.map +1 -0
  64. package/react/footer/FooterMetaLink.d.ts +14 -0
  65. package/react/footer/FooterMetaLink.d.ts.map +1 -0
  66. package/react/footer/FooterNavigation.d.ts +15 -0
  67. package/react/footer/FooterNavigation.d.ts.map +1 -0
  68. package/react/footer/FooterNavigationLink.d.ts +14 -0
  69. package/react/footer/FooterNavigationLink.d.ts.map +1 -0
  70. package/react/footer/FooterNavigationSection.d.ts +30 -0
  71. package/react/footer/FooterNavigationSection.d.ts.map +1 -0
  72. package/react/footer/index.d.ts +7 -0
  73. package/react/footer/index.d.ts.map +1 -0
  74. package/react/hint/Hint.d.ts +11 -0
  75. package/react/hint/Hint.d.ts.map +1 -0
  76. package/react/hint/index.d.ts +2 -0
  77. package/react/hint/index.d.ts.map +1 -0
  78. package/react/index.d.ts +9 -0
  79. package/react/index.d.ts.map +1 -1
  80. package/react/index.js +1 -1
  81. package/react/index.js.map +1 -1
  82. package/react/input/Input.d.ts +50 -0
  83. package/react/input/Input.d.ts.map +1 -0
  84. package/react/input/InputPrefix.d.ts +9 -0
  85. package/react/input/InputPrefix.d.ts.map +1 -0
  86. package/react/input/InputSuffix.d.ts +9 -0
  87. package/react/input/InputSuffix.d.ts.map +1 -0
  88. package/react/input/index.d.ts +4 -0
  89. package/react/input/index.d.ts.map +1 -0
  90. package/react/internal/FormGroup/FormGroup.d.ts +9 -0
  91. package/react/internal/FormGroup/FormGroup.d.ts.map +1 -0
  92. package/react/internal/FormGroup/FormGroupContext.d.ts +5 -0
  93. package/react/internal/FormGroup/FormGroupContext.d.ts.map +1 -0
  94. package/react/internal/FormGroup/index.d.ts +3 -0
  95. package/react/internal/FormGroup/index.d.ts.map +1 -0
  96. package/react/internal/PermissiveChild.d.ts +3 -0
  97. package/react/internal/PermissiveChild.d.ts.map +1 -0
  98. package/react/label/Label.d.ts +15 -0
  99. package/react/label/Label.d.ts.map +1 -0
  100. package/react/label/index.d.ts +2 -0
  101. package/react/label/index.d.ts.map +1 -0
  102. package/react/phase-banner/PhaseBanner.d.ts +27 -0
  103. package/react/phase-banner/PhaseBanner.d.ts.map +1 -0
  104. package/react/phase-banner/PhaseTag.d.ts +10 -0
  105. package/react/phase-banner/PhaseTag.d.ts.map +1 -0
  106. package/react/phase-banner/index.d.ts +3 -0
  107. package/react/phase-banner/index.d.ts.map +1 -0
  108. package/react/summary-list/SummaryCardActions.d.ts +16 -0
  109. package/react/summary-list/SummaryCardActions.d.ts.map +1 -0
  110. package/react/summary-list/SummaryCardTitle.d.ts +22 -0
  111. package/react/summary-list/SummaryCardTitle.d.ts.map +1 -0
  112. package/react/summary-list/SummaryList.d.ts +89 -0
  113. package/react/summary-list/SummaryList.d.ts.map +1 -0
  114. package/react/summary-list/SummaryListActionLink.d.ts +11 -0
  115. package/react/summary-list/SummaryListActionLink.d.ts.map +1 -0
  116. package/react/summary-list/SummaryListActions.d.ts +16 -0
  117. package/react/summary-list/SummaryListActions.d.ts.map +1 -0
  118. package/react/summary-list/SummaryListKey.d.ts +12 -0
  119. package/react/summary-list/SummaryListKey.d.ts.map +1 -0
  120. package/react/summary-list/SummaryListValue.d.ts +12 -0
  121. package/react/summary-list/SummaryListValue.d.ts.map +1 -0
  122. package/react/summary-list/index.d.ts +8 -0
  123. package/react/summary-list/index.d.ts.map +1 -0
  124. package/react/tag/Tag.d.ts +17 -0
  125. package/react/tag/Tag.d.ts.map +1 -0
  126. package/react/tag/index.d.ts +2 -0
  127. package/react/tag/index.d.ts.map +1 -0
  128. package/src/react/error-message/__examples__/default.tsx +3 -0
  129. package/src/react/footer/__examples__/default.tsx +3 -0
  130. package/src/react/footer/__examples__/with-customisation.tsx +15 -0
  131. package/src/react/footer/__examples__/with-links.tsx +13 -0
  132. package/src/react/footer/__examples__/with-secondary-navigation-and-links.tsx +44 -0
  133. package/src/react/footer/__examples__/with-secondary-navigation.tsx +24 -0
  134. package/src/react/input/__examples__/default.tsx +12 -0
  135. package/src/react/input/__examples__/not-as-page-heading.tsx +8 -0
  136. package/src/react/input/__examples__/with-error.tsx +14 -0
  137. package/src/react/input/__examples__/with-fixed-width.tsx +36 -0
  138. package/src/react/input/__examples__/with-fluid-width.tsx +36 -0
  139. package/src/react/input/__examples__/with-hint.tsx +13 -0
  140. package/src/react/input/__examples__/with-numeric.tsx +16 -0
  141. package/src/react/input/__examples__/with-prefix-and-suffix-error.tsx +17 -0
  142. package/src/react/input/__examples__/with-prefix-and-suffix.tsx +16 -0
  143. package/src/react/input/__examples__/with-prefix.tsx +15 -0
  144. package/src/react/input/__examples__/with-suffix.tsx +15 -0
  145. package/src/react/phase-banner/__examples__/beta.tsx +7 -0
  146. package/src/react/phase-banner/__examples__/default.tsx +7 -0
  147. package/src/react/phase-banner/__examples__/with-tag-override.tsx +7 -0
  148. package/src/react/phase-banner/__examples__/with-text.tsx +7 -0
  149. package/src/react/summary-list/__examples__/cards-with-action.tsx +88 -0
  150. package/src/react/summary-list/__examples__/cards-with-single-action.tsx +46 -0
  151. package/src/react/summary-list/__examples__/cards.tsx +156 -0
  152. package/src/react/summary-list/__examples__/default.tsx +72 -0
  153. package/src/react/summary-list/__examples__/with-multiple-actions.tsx +29 -0
  154. package/src/react/summary-list/__examples__/with-no-actions.tsx +37 -0
  155. package/src/react/summary-list/__examples__/with-no-border.tsx +38 -0
  156. package/src/react/tag/__examples__/blue.tsx +3 -0
  157. package/src/react/tag/__examples__/default.tsx +3 -0
  158. package/src/react/tag/__examples__/green.tsx +3 -0
  159. package/src/react/tag/__examples__/grey.tsx +3 -0
  160. package/src/react/tag/__examples__/orange.tsx +3 -0
  161. package/src/react/tag/__examples__/pink.tsx +3 -0
  162. package/src/react/tag/__examples__/purple.tsx +3 -0
  163. package/src/react/tag/__examples__/red.tsx +3 -0
  164. package/src/react/tag/__examples__/turquoise.tsx +3 -0
  165. package/src/react/tag/__examples__/yellow.tsx +3 -0
@@ -0,0 +1,14 @@
1
+ import { type LinkComponent } from '../internal/Link/Link';
2
+ import type { PermissiveChild } from '../internal/PermissiveChild';
3
+ interface FooterMetaLinkProps {
4
+ children: PermissiveChild;
5
+ className?: string;
6
+ }
7
+ /**
8
+ * A list of links within a FooterMeta.
9
+ *
10
+ * @experimental React components are in alpha and subject to change.
11
+ */
12
+ export declare const FooterMetaLink: LinkComponent<FooterMetaLinkProps>;
13
+ export {};
14
+ //# sourceMappingURL=FooterMetaLink.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FooterMetaLink.d.ts","sourceRoot":"","sources":["../../../src/react/footer/FooterMetaLink.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAY,KAAK,aAAa,EAAE,MAAM,uBAAuB,CAAA;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAA;AAElE,UAAU,mBAAmB;IAC3B,QAAQ,EAAE,eAAe,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;;GAIG;AACH,eAAO,MAAM,cAAc,EAAE,aAAa,CAAC,mBAAmB,CAU5D,CAAA"}
@@ -0,0 +1,15 @@
1
+ import type { PermissiveChild } from '../internal/PermissiveChild';
2
+ import type { FooterNavigationSectionProps } from './FooterNavigationSection';
3
+ export interface FooterNavigationProps {
4
+ /**
5
+ * One or more instances of FooterNavigationSection.
6
+ */
7
+ children: PermissiveChild<FooterNavigationSectionProps>;
8
+ }
9
+ /**
10
+ * Secondary navigation for a footer.
11
+ *
12
+ * @experimental React components are in alpha and subject to change.
13
+ */
14
+ export declare function FooterNavigation({ children }: FooterNavigationProps): import("react/jsx-runtime").JSX.Element;
15
+ //# sourceMappingURL=FooterNavigation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FooterNavigation.d.ts","sourceRoot":"","sources":["../../../src/react/footer/FooterNavigation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAA;AAClE,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,2BAA2B,CAAA;AAE7E,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,QAAQ,EAAE,eAAe,CAAC,4BAA4B,CAAC,CAAA;CACxD;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,QAAQ,EAAE,EAAE,qBAAqB,2CASnE"}
@@ -0,0 +1,14 @@
1
+ import { type LinkComponent } from '../internal/Link/Link';
2
+ import type { PermissiveChild } from '../internal/PermissiveChild';
3
+ interface FooterLinkProps {
4
+ children: PermissiveChild;
5
+ className?: string;
6
+ }
7
+ /**
8
+ * Link within a FooterNavigationSection.
9
+ *
10
+ * @experimental React components are in alpha and subject to change.
11
+ */
12
+ export declare const FooterNavigationLink: LinkComponent<FooterLinkProps>;
13
+ export {};
14
+ //# sourceMappingURL=FooterNavigationLink.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FooterNavigationLink.d.ts","sourceRoot":"","sources":["../../../src/react/footer/FooterNavigationLink.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAY,KAAK,aAAa,EAAE,MAAM,uBAAuB,CAAA;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAA;AAElE,UAAU,eAAe;IACvB,QAAQ,EAAE,eAAe,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,EAAE,aAAa,CAAC,eAAe,CAO9D,CAAA"}
@@ -0,0 +1,30 @@
1
+ import type { ComponentProps } from 'react';
2
+ import type { PermissiveChild } from '../internal/PermissiveChild';
3
+ import type { FooterNavigationLink } from './FooterNavigationLink';
4
+ export interface FooterNavigationSectionProps {
5
+ /**
6
+ * Links to display. Instances of FooterNavigationLink.
7
+ */
8
+ children: PermissiveChild<ComponentProps<typeof FooterNavigationLink>>;
9
+ /**
10
+ * Amount of columns to display items in.
11
+ */
12
+ columns?: number;
13
+ /**
14
+ * Title for the section.
15
+ */
16
+ title: string;
17
+ /**
18
+ * Width of this navigation section. Defaults to full width.
19
+ * You can pass any design system grid width here, for example,
20
+ * 'one-third'; 'two-thirds'; 'one-half'.
21
+ */
22
+ width?: string;
23
+ }
24
+ /**
25
+ * A list of secondary navigation links within a FooterNavigation.
26
+ *
27
+ * @experimental React components are in alpha and subject to change.
28
+ */
29
+ export declare function FooterNavigationSection({ title, width, columns, children }: FooterNavigationSectionProps): import("react/jsx-runtime").JSX.Element;
30
+ //# sourceMappingURL=FooterNavigationSection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FooterNavigationSection.d.ts","sourceRoot":"","sources":["../../../src/react/footer/FooterNavigationSection.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAC3C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAA;AAClE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAElE,MAAM,WAAW,4BAA4B;IAC3C;;OAEG;IACH,QAAQ,EAAE,eAAe,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,CAAC,CAAA;IACtE;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IACb;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,EAAE,KAAK,EAAE,KAAc,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,4BAA4B,2CAcjH"}
@@ -0,0 +1,7 @@
1
+ export { Footer } from './Footer';
2
+ export { FooterMeta } from './FooterMeta';
3
+ export { FooterMetaLink } from './FooterMetaLink';
4
+ export { FooterNavigation } from './FooterNavigation';
5
+ export { FooterNavigationLink } from './FooterNavigationLink';
6
+ export { FooterNavigationSection } from './FooterNavigationSection';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/footer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAC7D,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAA"}
@@ -0,0 +1,11 @@
1
+ import { type ComponentPropsWithoutRef, type ReactNode } from 'react';
2
+ export interface HintProps extends ComponentPropsWithoutRef<'div'> {
3
+ children: ReactNode;
4
+ }
5
+ /**
6
+ * Hint for a form element.
7
+ *
8
+ * @experimental React components are in alpha and subject to change.
9
+ */
10
+ export declare const Hint: import("react").ForwardRefExoticComponent<HintProps & import("react").RefAttributes<HTMLDivElement>>;
11
+ //# sourceMappingURL=Hint.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Hint.d.ts","sourceRoot":"","sources":["../../../src/react/hint/Hint.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,wBAAwB,EAAc,KAAK,SAAS,EAAc,MAAM,OAAO,CAAA;AAG7F,MAAM,WAAW,SAAU,SAAQ,wBAAwB,CAAC,KAAK,CAAC;IAChE,QAAQ,EAAE,SAAS,CAAA;CACpB;AAED;;;;GAIG;AACH,eAAO,MAAM,IAAI,sGAQf,CAAA"}
@@ -0,0 +1,2 @@
1
+ export * from './Hint';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/hint/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAA"}
package/react/index.d.ts CHANGED
@@ -1,6 +1,15 @@
1
1
  export * from './accordion';
2
2
  export * from './back-link/BackLink';
3
+ export * from './error-message';
4
+ export * from './footer';
3
5
  export * from './header';
6
+ export * from './hint';
7
+ export * from './input';
8
+ export * from './label';
4
9
  export * from './MODUKBody/MODUKBody';
10
+ export * from './phase-banner';
11
+ export * from './summary-list';
5
12
  export * from './table';
13
+ export * from './tag';
14
+ export * from './VisuallyHiddenText';
6
15
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":"AAEA,cAAc,aAAa,CAAA;AAC3B,cAAc,sBAAsB,CAAA;AACpC,cAAc,UAAU,CAAA;AACxB,cAAc,uBAAuB,CAAA;AACrC,cAAc,SAAS,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":"AAEA,cAAc,aAAa,CAAA;AAC3B,cAAc,sBAAsB,CAAA;AACpC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,UAAU,CAAA;AACxB,cAAc,UAAU,CAAA;AACxB,cAAc,QAAQ,CAAA;AACtB,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA;AACvB,cAAc,uBAAuB,CAAA;AACrC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,SAAS,CAAA;AACvB,cAAc,OAAO,CAAA;AACrB,cAAc,sBAAsB,CAAA"}