@digigov/react-core 2.0.0-8e254888 → 2.0.0-a32ad9b2

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 (263) hide show
  1. package/Accordion/index.native.d.ts +1 -5
  2. package/AccordionSection/index.native.d.ts +1 -3
  3. package/BackLinkBase/index.d.ts +9 -0
  4. package/BackLinkBase/index.js +29 -0
  5. package/BackLinkBase/index.js.map +7 -0
  6. package/{BackLink → BackLinkBase}/package.json +1 -1
  7. package/Base/compat/Input/CheckboxInput.native.js.map +2 -2
  8. package/Base/compat/Input/RadioInput.native.js.map +2 -2
  9. package/Base/index.native.js.map +2 -2
  10. package/Base/index.web.d.ts +1 -1
  11. package/Base/index.web.js.map +1 -1
  12. package/Base/mapping.native.d.ts +1 -1
  13. package/Base/mapping.native.js.map +2 -2
  14. package/{BreadcrumbsListItemLink → BreadcrumbsListItemLinkBase}/index.d.ts +5 -5
  15. package/BreadcrumbsListItemLinkBase/index.js +23 -0
  16. package/BreadcrumbsListItemLinkBase/index.js.map +7 -0
  17. package/BreadcrumbsListItemLinkBase/package.json +6 -0
  18. package/{ButtonLink → ButtonLinkBase}/index.d.ts +4 -4
  19. package/ButtonLinkBase/index.js +27 -0
  20. package/ButtonLinkBase/index.js.map +7 -0
  21. package/{ButtonLink → ButtonLinkBase}/package.json +1 -1
  22. package/CallToActionBase/index.d.ts +9 -0
  23. package/{CallToAction → CallToActionBase}/index.js +6 -6
  24. package/CallToActionBase/index.js.map +7 -0
  25. package/CallToActionBase/package.json +6 -0
  26. package/CopyToClipboardMessage/index.native.d.ts +1 -3
  27. package/DateInputItem/index.native.d.ts +1 -3
  28. package/Details/index.native.d.ts +1 -3
  29. package/FooterLinkBase/index.d.ts +9 -0
  30. package/FooterLinkBase/index.js +23 -0
  31. package/FooterLinkBase/index.js.map +7 -0
  32. package/{CallToAction → FooterLinkBase}/package.json +1 -1
  33. package/GovGRLogoBase/govgr-logo-base64/package.json +6 -0
  34. package/{GovGRLogo → GovGRLogoBase}/govgr-logo-base64.js.map +1 -1
  35. package/GovGRLogoBase/govgr-logo-blue-base64/package.json +6 -0
  36. package/{GovGRLogo → GovGRLogoBase}/govgr-logo-blue-base64.js.map +1 -1
  37. package/GovGRLogoBase/index.d.ts +9 -0
  38. package/GovGRLogoBase/index.js +43 -0
  39. package/GovGRLogoBase/index.js.map +7 -0
  40. package/{FooterLink → GovGRLogoBase}/package.json +1 -1
  41. package/HeaderLogoBase/index.d.ts +19 -0
  42. package/HeaderLogoBase/index.js +33 -0
  43. package/HeaderLogoBase/index.js.map +7 -0
  44. package/HeaderLogoBase/package.json +6 -0
  45. package/HeaderSecondaryLogoBase/index.d.ts +19 -0
  46. package/{HeaderSecondaryLogo → HeaderSecondaryLogoBase}/index.js +7 -7
  47. package/HeaderSecondaryLogoBase/index.js.map +7 -0
  48. package/{BreadcrumbsListItemLink → HeaderSecondaryLogoBase}/package.json +1 -1
  49. package/HeaderTitleBase/index.d.ts +9 -0
  50. package/HeaderTitleBase/index.js +24 -0
  51. package/HeaderTitleBase/index.js.map +7 -0
  52. package/HeaderTitleBase/package.json +6 -0
  53. package/{NavListItemAction → NavListItemActionBase}/index.d.ts +6 -6
  54. package/{NavListItemAction → NavListItemActionBase}/index.js +6 -6
  55. package/NavListItemActionBase/index.js.map +7 -0
  56. package/NavListItemActionBase/package.json +6 -0
  57. package/NavListItemActionContainer/index.native.d.ts +0 -2
  58. package/{NavListItemLink → NavListItemLinkBase}/index.d.ts +4 -4
  59. package/{NavListItemLink → NavListItemLinkBase}/index.js +6 -6
  60. package/NavListItemLinkBase/index.js.map +7 -0
  61. package/NavListItemLinkBase/package.json +6 -0
  62. package/NotificationBannerLink/index.native.d.ts +1 -3
  63. package/TextArea/index.native.d.ts +1 -3
  64. package/TextInput/index.native.d.ts +1 -3
  65. package/Typography/index.d.ts +1 -1
  66. package/Typography/index.js +15 -17
  67. package/Typography/index.js.map +2 -2
  68. package/cjs/BackLinkBase/index.js +62 -0
  69. package/cjs/BackLinkBase/index.js.map +7 -0
  70. package/cjs/Base/compat/Input/CheckboxInput.native.js.map +2 -2
  71. package/cjs/Base/compat/Input/RadioInput.native.js.map +2 -2
  72. package/cjs/Base/index.native.js.map +2 -2
  73. package/cjs/Base/index.web.js.map +1 -1
  74. package/cjs/Base/mapping.native.js.map +2 -2
  75. package/cjs/{BreadcrumbsListItemLink → BreadcrumbsListItemLinkBase}/index.js +10 -11
  76. package/cjs/BreadcrumbsListItemLinkBase/index.js.map +7 -0
  77. package/cjs/ButtonLinkBase/index.js +60 -0
  78. package/cjs/ButtonLinkBase/index.js.map +7 -0
  79. package/cjs/{CallToAction → CallToActionBase}/index.js +10 -10
  80. package/cjs/CallToActionBase/index.js.map +7 -0
  81. package/cjs/FooterLinkBase/index.js +56 -0
  82. package/cjs/FooterLinkBase/index.js.map +7 -0
  83. package/cjs/{GovGRLogo → GovGRLogoBase}/govgr-logo-base64.js.map +1 -1
  84. package/cjs/{GovGRLogo → GovGRLogoBase}/govgr-logo-blue-base64.js.map +1 -1
  85. package/cjs/{GovGRLogo → GovGRLogoBase}/index.js +41 -43
  86. package/cjs/GovGRLogoBase/index.js.map +7 -0
  87. package/cjs/{HeaderSecondaryLogo → HeaderLogoBase}/index.js +12 -12
  88. package/cjs/HeaderLogoBase/index.js.map +7 -0
  89. package/cjs/HeaderSecondaryLogoBase/index.js +66 -0
  90. package/cjs/HeaderSecondaryLogoBase/index.js.map +7 -0
  91. package/cjs/{HeaderTitle → HeaderTitleBase}/index.js +11 -11
  92. package/cjs/HeaderTitleBase/index.js.map +7 -0
  93. package/cjs/{NavListItemAction → NavListItemActionBase}/index.js +10 -10
  94. package/cjs/NavListItemActionBase/index.js.map +7 -0
  95. package/cjs/{NavListItemLink → NavListItemLinkBase}/index.js +10 -10
  96. package/cjs/NavListItemLinkBase/index.js.map +7 -0
  97. package/cjs/Typography/index.js +15 -17
  98. package/cjs/Typography/index.js.map +2 -2
  99. package/cjs/index.js +20 -20
  100. package/cjs/index.js.map +2 -2
  101. package/cjs/lazy/index.js +11 -11
  102. package/cjs/lazy.js.map +2 -2
  103. package/cjs/registry/index.js +34 -34
  104. package/cjs/registry.js.map +2 -2
  105. package/cjs/utils/index.native/index.js +32 -34
  106. package/cjs/utils/index.native.js.map +2 -2
  107. package/index.d.ts +10 -10
  108. package/index.js +11 -11
  109. package/index.js.map +1 -1
  110. package/lazy/index.js +11 -11
  111. package/package.json +5 -5
  112. package/registry/index.js +34 -34
  113. package/src/AdminAside/__snapshots__/index.test.tsx.snap +1 -1
  114. package/src/AdminContainer/__snapshots__/index.test.tsx.snap +2 -2
  115. package/src/AdminMain/__snapshots__/index.test.tsx.snap +1 -1
  116. package/src/AdminTopSection/__snapshots__/index.test.tsx.snap +1 -1
  117. package/src/Aside/__snapshots__/index.test.tsx.snap +1 -1
  118. package/src/{BackLink → BackLinkBase}/__snapshots__/index.test.tsx.snap +2 -2
  119. package/src/BackLinkBase/index.test.tsx +15 -0
  120. package/src/BackLinkBase/index.tsx +36 -0
  121. package/src/Base/compat/Input/CheckboxInput.native.tsx +2 -6
  122. package/src/Base/compat/Input/RadioInput.native.tsx +2 -6
  123. package/src/Base/index.native.tsx +2 -2
  124. package/src/Base/index.web.tsx +2 -2
  125. package/src/Base/mapping.native.tsx +1 -1
  126. package/src/BottomInfo/__snapshots__/index.test.tsx.snap +1 -1
  127. package/src/BottomInfoContainer/__snapshots__/index.test.tsx.snap +1 -1
  128. package/src/BottomInfoContent/__snapshots__/index.test.tsx.snap +1 -1
  129. package/src/{BreadcrumbsListItemLink → BreadcrumbsListItemLinkBase}/__snapshots__/index.test.tsx.snap +4 -4
  130. package/src/BreadcrumbsListItemLinkBase/index.test.tsx +18 -0
  131. package/src/{BreadcrumbsListItemLink → BreadcrumbsListItemLinkBase}/index.tsx +10 -11
  132. package/src/{ButtonLink → ButtonLinkBase}/__snapshots__/index.test.tsx.snap +22 -22
  133. package/src/ButtonLinkBase/index.test.tsx +75 -0
  134. package/src/ButtonLinkBase/index.tsx +55 -0
  135. package/src/{CallToAction → CallToActionBase}/__snapshots__/index.test.tsx.snap +1 -1
  136. package/src/CallToActionBase/index.test.tsx +10 -0
  137. package/src/{CallToAction → CallToActionBase}/index.tsx +10 -8
  138. package/src/Checkbox/__snapshots__/index.test.tsx.snap +0 -5
  139. package/src/CheckboxConditional/__snapshots__/index.test.tsx.snap +1 -1
  140. package/src/CheckboxItem/__snapshots__/index.test.tsx.snap +0 -4
  141. package/src/Container/__snapshots__/index.test.tsx.snap +3 -3
  142. package/src/FieldContainer/__snapshots__/index.test.tsx.snap +3 -3
  143. package/src/FooterContainer/__snapshots__/index.test.tsx.snap +1 -1
  144. package/src/{FooterLink → FooterLinkBase}/__snapshots__/index.test.tsx.snap +2 -2
  145. package/src/FooterLinkBase/index.test.tsx +16 -0
  146. package/src/FooterLinkBase/index.tsx +27 -0
  147. package/src/{GovGRLogo → GovGRLogoBase}/__snapshots__/index.test.tsx.snap +1 -1
  148. package/src/GovGRLogoBase/index.test.tsx +8 -0
  149. package/src/GovGRLogoBase/index.tsx +43 -0
  150. package/src/Grid/__snapshots__/index.test.tsx.snap +8 -8
  151. package/src/{HeaderLogo → HeaderLogoBase}/__snapshots__/index.test.tsx.snap +1 -1
  152. package/src/HeaderLogoBase/index.test.tsx +8 -0
  153. package/src/HeaderLogoBase/index.tsx +44 -0
  154. package/src/{HeaderSecondaryLogo → HeaderSecondaryLogoBase}/__snapshots__/index.test.tsx.snap +2 -2
  155. package/src/{HeaderSecondaryLogo → HeaderSecondaryLogoBase}/index.test.tsx +7 -7
  156. package/src/{HeaderSecondaryLogo → HeaderSecondaryLogoBase}/index.tsx +9 -9
  157. package/src/{HeaderTitle → HeaderTitleBase}/__snapshots__/index.test.tsx.snap +2 -2
  158. package/src/HeaderTitleBase/index.test.tsx +17 -0
  159. package/src/HeaderTitleBase/index.tsx +28 -0
  160. package/src/Main/__snapshots__/index.test.tsx.snap +1 -1
  161. package/src/NavListItemActionBase/__snapshots__/index.test.tsx.snap +101 -0
  162. package/src/NavListItemActionBase/index.test.tsx +42 -0
  163. package/src/{NavListItemAction → NavListItemActionBase}/index.tsx +13 -12
  164. package/src/{NavListItemLink → NavListItemLinkBase}/__snapshots__/index.test.tsx.snap +5 -5
  165. package/src/NavListItemLinkBase/index.test.tsx +41 -0
  166. package/src/{NavListItemLink → NavListItemLinkBase}/index.tsx +8 -9
  167. package/src/NavMenuContainer/__snapshots__/index.test.tsx.snap +4 -4
  168. package/src/NavMenuContent/__snapshots__/index.test.tsx.snap +1 -1
  169. package/src/NavMenuTitle/__snapshots__/index.test.tsx.snap +1 -1
  170. package/src/RadioConditional/__snapshots__/index.test.tsx.snap +1 -1
  171. package/src/RadioItem/__snapshots__/index.test.tsx.snap +0 -4
  172. package/src/Typography/index.tsx +21 -20
  173. package/src/index.ts +10 -10
  174. package/src/lazy.js +11 -11
  175. package/src/registry.js +34 -34
  176. package/src/utils/index.native.tsx +56 -54
  177. package/utils/index.native/index.js +32 -34
  178. package/utils/index.native.d.ts +3 -6
  179. package/utils/index.native.js.map +2 -2
  180. package/BackLink/index.d.ts +0 -9
  181. package/BackLink/index.js +0 -31
  182. package/BackLink/index.js.map +0 -7
  183. package/BreadcrumbsListItemLink/index.js +0 -24
  184. package/BreadcrumbsListItemLink/index.js.map +0 -7
  185. package/ButtonLink/index.js +0 -29
  186. package/ButtonLink/index.js.map +0 -7
  187. package/CallToAction/index.d.ts +0 -9
  188. package/CallToAction/index.js.map +0 -7
  189. package/FooterLink/index.d.ts +0 -9
  190. package/FooterLink/index.js +0 -25
  191. package/FooterLink/index.js.map +0 -7
  192. package/GovGRLogo/govgr-logo-base64/package.json +0 -6
  193. package/GovGRLogo/govgr-logo-blue-base64/package.json +0 -6
  194. package/GovGRLogo/index.d.ts +0 -9
  195. package/GovGRLogo/index.js +0 -45
  196. package/GovGRLogo/index.js.map +0 -7
  197. package/GovGRLogo/package.json +0 -6
  198. package/HeaderLogo/index.d.ts +0 -19
  199. package/HeaderLogo/index.js +0 -35
  200. package/HeaderLogo/index.js.map +0 -7
  201. package/HeaderLogo/package.json +0 -6
  202. package/HeaderSecondaryLogo/index.d.ts +0 -19
  203. package/HeaderSecondaryLogo/index.js.map +0 -7
  204. package/HeaderSecondaryLogo/package.json +0 -6
  205. package/HeaderTitle/index.d.ts +0 -9
  206. package/HeaderTitle/index.js +0 -24
  207. package/HeaderTitle/index.js.map +0 -7
  208. package/HeaderTitle/package.json +0 -6
  209. package/NavListItemAction/index.js.map +0 -7
  210. package/NavListItemAction/package.json +0 -6
  211. package/NavListItemLink/index.js.map +0 -7
  212. package/NavListItemLink/package.json +0 -6
  213. package/cjs/BackLink/index.js +0 -64
  214. package/cjs/BackLink/index.js.map +0 -7
  215. package/cjs/BreadcrumbsListItemLink/index.js.map +0 -7
  216. package/cjs/ButtonLink/index.js +0 -62
  217. package/cjs/ButtonLink/index.js.map +0 -7
  218. package/cjs/CallToAction/index.js.map +0 -7
  219. package/cjs/FooterLink/index.js +0 -58
  220. package/cjs/FooterLink/index.js.map +0 -7
  221. package/cjs/GovGRLogo/index.js.map +0 -7
  222. package/cjs/HeaderLogo/index.js +0 -68
  223. package/cjs/HeaderLogo/index.js.map +0 -7
  224. package/cjs/HeaderSecondaryLogo/index.js.map +0 -7
  225. package/cjs/HeaderTitle/index.js.map +0 -7
  226. package/cjs/NavListItemAction/index.js.map +0 -7
  227. package/cjs/NavListItemLink/index.js.map +0 -7
  228. package/src/BackLink/index.test.tsx +0 -13
  229. package/src/BackLink/index.tsx +0 -35
  230. package/src/BreadcrumbsListItemLink/index.test.tsx +0 -16
  231. package/src/ButtonLink/index.test.tsx +0 -69
  232. package/src/ButtonLink/index.tsx +0 -54
  233. package/src/CallToAction/index.test.tsx +0 -10
  234. package/src/FooterLink/index.test.tsx +0 -14
  235. package/src/FooterLink/index.tsx +0 -26
  236. package/src/GovGRLogo/index.test.tsx +0 -8
  237. package/src/GovGRLogo/index.tsx +0 -42
  238. package/src/HeaderLogo/index.test.tsx +0 -8
  239. package/src/HeaderLogo/index.tsx +0 -43
  240. package/src/HeaderTitle/index.test.tsx +0 -16
  241. package/src/HeaderTitle/index.tsx +0 -28
  242. package/src/NavListItemAction/__snapshots__/index.test.tsx.snap +0 -13
  243. package/src/NavListItemAction/index.test.tsx +0 -11
  244. package/src/NavListItemLink/index.test.tsx +0 -39
  245. /package/{BackLink → BackLinkBase}/index.test.d.ts +0 -0
  246. /package/{BreadcrumbsListItemLink → BreadcrumbsListItemLinkBase}/index.test.d.ts +0 -0
  247. /package/{ButtonLink → ButtonLinkBase}/index.test.d.ts +0 -0
  248. /package/{CallToAction → CallToActionBase}/index.test.d.ts +0 -0
  249. /package/{FooterLink → FooterLinkBase}/index.test.d.ts +0 -0
  250. /package/{GovGRLogo → GovGRLogoBase}/govgr-logo-base64/index.js +0 -0
  251. /package/{GovGRLogo → GovGRLogoBase}/govgr-logo-base64.d.ts +0 -0
  252. /package/{GovGRLogo → GovGRLogoBase}/govgr-logo-blue-base64/index.js +0 -0
  253. /package/{GovGRLogo → GovGRLogoBase}/govgr-logo-blue-base64.d.ts +0 -0
  254. /package/{GovGRLogo → GovGRLogoBase}/index.test.d.ts +0 -0
  255. /package/{HeaderLogo → HeaderLogoBase}/index.test.d.ts +0 -0
  256. /package/{HeaderSecondaryLogo → HeaderSecondaryLogoBase}/index.test.d.ts +0 -0
  257. /package/{HeaderTitle → HeaderTitleBase}/index.test.d.ts +0 -0
  258. /package/{NavListItemAction → NavListItemActionBase}/index.test.d.ts +0 -0
  259. /package/{NavListItemLink → NavListItemLinkBase}/index.test.d.ts +0 -0
  260. /package/cjs/{GovGRLogo → GovGRLogoBase}/govgr-logo-base64/index.js +0 -0
  261. /package/cjs/{GovGRLogo → GovGRLogoBase}/govgr-logo-blue-base64/index.js +0 -0
  262. /package/src/{GovGRLogo → GovGRLogoBase}/govgr-logo-base64.js +0 -0
  263. /package/src/{GovGRLogo → GovGRLogoBase}/govgr-logo-blue-base64.ts +0 -0
@@ -1,69 +0,0 @@
1
- import React from 'react';
2
- import { render } from '@testing-library/react';
3
-
4
- import ButtonLink from '@digigov/react-core/ButtonLink';
5
-
6
- it('renders the ButtonLink with no props', () => {
7
- expect(render(<ButtonLink>hello</ButtonLink>).baseElement).toMatchSnapshot();
8
- });
9
- it('renders the ButtonLink with color=primary', () => {
10
- expect(
11
- render(<ButtonLink color={'primary'}>hello</ButtonLink>).baseElement
12
- ).toMatchSnapshot();
13
- });
14
- it('renders the ButtonLink with color=secondary', () => {
15
- expect(
16
- render(<ButtonLink color={'secondary'}>hello</ButtonLink>).baseElement
17
- ).toMatchSnapshot();
18
- });
19
- it('renders the ButtonLink with color=warning', () => {
20
- expect(
21
- render(<ButtonLink color={'warning'}>hello</ButtonLink>).baseElement
22
- ).toMatchSnapshot();
23
- });
24
- it('renders the ButtonLink with href=#', () => {
25
- expect(
26
- render(<ButtonLink href={'#'}>hello</ButtonLink>).baseElement
27
- ).toMatchSnapshot();
28
- });
29
- it('renders the ButtonLink with disabled=false', () => {
30
- expect(render(<ButtonLink>hello</ButtonLink>).baseElement).toMatchSnapshot();
31
- });
32
- it('renders the ButtonLink with color=primary with href=#', () => {
33
- expect(
34
- render(
35
- <ButtonLink href={'#'} color={'primary'}>
36
- hello
37
- </ButtonLink>
38
- ).baseElement
39
- ).toMatchSnapshot();
40
- });
41
- it('renders the ButtonLink with color=secondary with href=#', () => {
42
- expect(
43
- render(
44
- <ButtonLink href={'#'} color={'secondary'}>
45
- hello
46
- </ButtonLink>
47
- ).baseElement
48
- ).toMatchSnapshot();
49
- });
50
- it('renders the ButtonLink with color=warning with href=#', () => {
51
- expect(
52
- render(
53
- <ButtonLink href={'#'} color={'warning'}>
54
- hello
55
- </ButtonLink>
56
- ).baseElement
57
- ).toMatchSnapshot();
58
- });
59
- it('renders the ButtonLink with ariaLabel prop', () => {
60
- expect(
61
- render(<ButtonLink aria-label="button for opening menu">Menu</ButtonLink>)
62
- .baseElement
63
- ).toMatchSnapshot();
64
- });
65
- it('renders the Button with tabIndex prop', () => {
66
- expect(
67
- render(<ButtonLink tabIndex={0}>Menu</ButtonLink>).baseElement
68
- ).toMatchSnapshot();
69
- });
@@ -1,54 +0,0 @@
1
- import React from 'react';
2
- import clsx from 'clsx';
3
- import Base, { BaseProps } from '@digigov/react-core/Base';
4
-
5
- export interface ButtonLinkProps extends BaseProps<'a'> {
6
- /**
7
- * color is optional.
8
- * 'primary' color is used for the main call to action on a page.
9
- * 'secondary' color is used for secondary calls to action on a page.
10
- * 'warning' color is used to make users think carefully before they use them.
11
- * The default value is 'primary'.
12
- * @value 'primary'
13
- * @value 'secondary'
14
- * @value 'warning'
15
- * @default 'primary'
16
- */
17
- color?: 'primary' | 'secondary' | 'warning';
18
-
19
- /**
20
- * dense is optional.
21
- * @value true Button will be dense.
22
- * @value false
23
- * @default false
24
- */
25
- dense?: boolean;
26
- }
27
- /**
28
- * Use the Button component to help users carry out an action.
29
- */
30
- export const ButtonLink = React.forwardRef<HTMLAnchorElement, ButtonLinkProps>(
31
- function ButtonLink(
32
- { color = 'primary', dense, className, children, ...props },
33
- ref
34
- ) {
35
- return (
36
- <Base
37
- as="a"
38
- ref={ref}
39
- className={clsx(className, {
40
- 'ds-btn': true,
41
- 'ds-btn--dense': dense,
42
- 'ds-btn-primary': color === 'primary',
43
- 'ds-btn-secondary': color === 'secondary',
44
- 'ds-btn-warning': color === 'warning',
45
- })}
46
- {...props}
47
- >
48
- {children}
49
- </Base>
50
- );
51
- }
52
- );
53
-
54
- export default ButtonLink;
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import { render } from '@testing-library/react';
3
-
4
- import CallToAction from '@digigov/react-core/CallToAction';
5
-
6
- it('renders the CallToAction with no props', () => {
7
- expect(
8
- render(<CallToAction>hello</CallToAction>).baseElement
9
- ).toMatchSnapshot();
10
- });
@@ -1,14 +0,0 @@
1
- import React from 'react';
2
- import { render } from '@testing-library/react';
3
-
4
- import FooterLink from '@digigov/react-core/FooterLink';
5
-
6
- it('renders the FooterLink with no props', () => {
7
- expect(render(<FooterLink>hello</FooterLink>).baseElement).toMatchSnapshot();
8
- });
9
-
10
- it('renders the FooterLink with href prop', () => {
11
- expect(
12
- render(<FooterLink href={'#'}>hello</FooterLink>).baseElement
13
- ).toMatchSnapshot();
14
- });
@@ -1,26 +0,0 @@
1
- import React from 'react';
2
- import clsx from 'clsx';
3
- import Base, { BaseProps } from '@digigov/react-core/Base';
4
-
5
- export interface FooterLinkProps extends BaseProps<'a'> {}
6
- /**
7
- * FooterLink in used inside the Footer component.
8
- */
9
- export const FooterLink = React.forwardRef<HTMLAnchorElement, FooterLinkProps>(
10
- function FooterLink({ className, children, ...props }, ref) {
11
- return (
12
- <Base
13
- as="a"
14
- ref={ref}
15
- className={clsx(className, {
16
- 'ds-footer__link': true,
17
- })}
18
- {...props}
19
- >
20
- {children}
21
- </Base>
22
- );
23
- }
24
- );
25
-
26
- export default FooterLink;
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import { render } from '@testing-library/react';
3
-
4
- import GovGRLogo from '@digigov/react-core/GovGRLogo';
5
-
6
- it('renders the GovGRLogo with no props', () => {
7
- expect(render(<GovGRLogo />).baseElement).toMatchSnapshot();
8
- });
@@ -1,42 +0,0 @@
1
- import React from 'react';
2
- import clsx from 'clsx';
3
- import Base, { BaseProps } from '@digigov/react-core/Base';
4
- import logo from '@digigov/react-core/GovGRLogo/govgr-logo-base64';
5
- import logoInverted from '@digigov/react-core/GovGRLogo/govgr-logo-blue-base64';
6
- export interface GovGRLogoProps extends BaseProps<'a'> {}
7
- /**
8
- * Use this component anywhere you what to provide the gov.gr logo.
9
- * */
10
- export const GovGRLogo = React.forwardRef<HTMLAnchorElement, GovGRLogoProps>(
11
- function GovGRLogo(
12
- { href = 'https://www.gov.gr/', className, ...props },
13
- ref
14
- ) {
15
- return (
16
- <Base
17
- as="a"
18
- href={href}
19
- ref={ref}
20
- className={clsx(className, { 'ds-header__link': true })}
21
- {...props}
22
- >
23
- <img
24
- src={logo}
25
- className={clsx(className, {
26
- 'ds-header__logo': true,
27
- })}
28
- alt="gov.gr logo"
29
- />
30
- <img
31
- src={logoInverted}
32
- className={clsx(className, {
33
- 'ds-header__logo-inverted': true,
34
- })}
35
- alt="gov.gr logo"
36
- />
37
- </Base>
38
- );
39
- }
40
- );
41
-
42
- export default GovGRLogo;
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import { render } from '@testing-library/react';
3
-
4
- import HeaderLogo from '@digigov/react-core/HeaderLogo';
5
-
6
- it('renders the HeaderLogo with no props', () => {
7
- expect(render(<HeaderLogo />).baseElement).toMatchSnapshot();
8
- });
@@ -1,43 +0,0 @@
1
- import React from 'react';
2
- import clsx from 'clsx';
3
- import Base, { BaseProps } from '@digigov/react-core/Base';
4
-
5
- export interface HeaderLogoProps extends BaseProps<'a'> {
6
- /**
7
- * src is optional.
8
-
9
- */
10
- src?: string;
11
- /**
12
- * href is optional.
13
-
14
- */
15
- altText?: string;
16
- }
17
- /**
18
- * Use this component inside the Header to provide a logo.
19
- */
20
- export const HeaderLogo = React.forwardRef<HTMLAnchorElement, HeaderLogoProps>(
21
- function HeaderLogo({ href, src, altText, className, ...props }, ref) {
22
- return (
23
- <Base
24
- as="a"
25
- href={href}
26
- ref={ref}
27
- className={clsx(className, {
28
- 'ds-header__link': true,
29
- })}
30
- {...props}
31
- >
32
- <img
33
- src={src}
34
- className={clsx(className, {
35
- 'ds-header__logo': true,
36
- })}
37
- alt={altText}
38
- />
39
- </Base>
40
- );
41
- }
42
- );
43
- export default HeaderLogo;
@@ -1,16 +0,0 @@
1
- import React from 'react';
2
- import { render } from '@testing-library/react';
3
-
4
- import HeaderTitle from '@digigov/react-core/HeaderTitle';
5
-
6
- it('renders the HeaderTitle with no props', () => {
7
- expect(
8
- render(<HeaderTitle>hello</HeaderTitle>).baseElement
9
- ).toMatchSnapshot();
10
- });
11
- it('renders the HeaderTitle with href', () => {
12
- expect(
13
- render(<HeaderTitle href="https://government.gov.gr">hello</HeaderTitle>)
14
- .baseElement
15
- ).toMatchSnapshot();
16
- });
@@ -1,28 +0,0 @@
1
- import React from 'react';
2
- import clsx from 'clsx';
3
- import Base, { BaseProps } from '@digigov/react-core/Base';
4
-
5
- export interface HeaderTitleProps extends BaseProps<'a'> {}
6
- /**
7
- * Use this component inside HeaderContent to provide a title to the header.
8
- */
9
- export const HeaderTitle = React.forwardRef<
10
- HTMLAnchorElement,
11
- HeaderTitleProps
12
- >(function HeaderTitle({ href = '/', className, children, ...props }, ref) {
13
- return (
14
- <Base
15
- as="a"
16
- ref={ref}
17
- href={href}
18
- className={clsx(className, {
19
- 'ds-header__title': true,
20
- })}
21
- {...props}
22
- >
23
- {children}
24
- </Base>
25
- );
26
- });
27
-
28
- export default HeaderTitle;
@@ -1,13 +0,0 @@
1
- // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
-
3
- exports[`renders the NavListItemActionContainer with no props 1`] = `
4
- <body>
5
- <div>
6
- <li
7
- class="ds-nav__list-item"
8
- >
9
- hello
10
- </li>
11
- </div>
12
- </body>
13
- `;
@@ -1,11 +0,0 @@
1
- import React from 'react';
2
- import { render } from '@testing-library/react';
3
-
4
- import NavListItemActionContainer from '@digigov/react-core/NavListItemActionContainer';
5
-
6
- it('renders the NavListItemActionContainer with no props', () => {
7
- expect(
8
- render(<NavListItemActionContainer>hello</NavListItemActionContainer>)
9
- .baseElement
10
- ).toMatchSnapshot();
11
- });
@@ -1,39 +0,0 @@
1
- import React from 'react';
2
- import { render } from '@testing-library/react';
3
- import NavListItemLink from '@digigov/react-core/NavListItemLink';
4
-
5
- it('renders the NavListItemLink with no props', () => {
6
- expect(
7
- render(<NavListItemLink>hello</NavListItemLink>).baseElement
8
- ).toMatchSnapshot();
9
- });
10
-
11
- it('renders the NavListItemLink with active=true', () => {
12
- expect(
13
- render(<NavListItemLink active={true}>hello</NavListItemLink>).baseElement
14
- ).toMatchSnapshot();
15
- });
16
-
17
- it('renders the NavListItemLink with active=false', () => {
18
- expect(
19
- render(<NavListItemLink active={false}>hello</NavListItemLink>).baseElement
20
- ).toMatchSnapshot();
21
- });
22
- it('renders the NavListItemLink with href and active=false', () => {
23
- expect(
24
- render(
25
- <NavListItemLink href="/" active={false}>
26
- hello
27
- </NavListItemLink>
28
- ).baseElement
29
- ).toMatchSnapshot();
30
- });
31
- it('renders the NavListItemLink with href and active=true', () => {
32
- expect(
33
- render(
34
- <NavListItemLink href="/" active={false}>
35
- hello
36
- </NavListItemLink>
37
- ).baseElement
38
- ).toMatchSnapshot();
39
- });
File without changes
File without changes
File without changes
File without changes
File without changes