@scottish-government/designsystem-react 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.svgrrc +15 -0
- package/@types/common/Icon.d.ts +3 -5
- package/@types/components/Button.d.ts +1 -1
- package/@types/components/Pagination.d.ts +20 -0
- package/@types/components/TextInput.d.ts +1 -1
- package/@types/sgds.d.ts +1 -0
- package/README.md +3 -0
- package/dist/common/icon.jsx +48 -5
- package/dist/components/back-to-top/back-to-top.jsx +1 -1
- package/dist/components/confirmation-message/confirmation-message.jsx +1 -1
- package/dist/components/date-picker/date-picker.jsx +2 -0
- package/dist/components/notification-banner/notification-banner.jsx +4 -5
- package/dist/components/pagination/pagination.jsx +93 -0
- package/dist/components/select/select.jsx +1 -1
- package/dist/components/site-search/site-search.jsx +1 -1
- package/dist/components/text-input/text-input.jsx +1 -1
- package/dist/components/textarea/textarea.jsx +1 -1
- package/dist/icons/ArrowUpward.jsx +41 -0
- package/dist/icons/CalendarToday.jsx +41 -0
- package/dist/icons/Cancel.jsx +40 -0
- package/dist/icons/CheckCircle.jsx +41 -0
- package/dist/icons/ChevronLeft.jsx +41 -0
- package/dist/icons/ChevronRight.jsx +41 -0
- package/dist/icons/Close.jsx +41 -0
- package/dist/icons/Description.jsx +41 -0
- package/dist/icons/DoubleChevronLeft.jsx +41 -0
- package/dist/icons/DoubleChevronRight.jsx +41 -0
- package/dist/icons/Error.jsx +41 -0
- package/dist/icons/ExpandLess.jsx +41 -0
- package/dist/icons/ExpandMore.jsx +41 -0
- package/dist/icons/List.jsx +44 -0
- package/dist/icons/Menu.jsx +41 -0
- package/dist/icons/PriorityHigh.jsx +42 -0
- package/dist/icons/Search.jsx +41 -0
- package/dist/icons/index.js +40 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -1
- package/src/common/icon.test.tsx +5 -26
- package/src/common/icon.tsx +25 -14
- package/src/components/back-to-top/back-to-top.tsx +1 -1
- package/src/components/button/button.test.tsx +3 -3
- package/src/components/confirmation-message/confirmation-message.tsx +1 -1
- package/src/components/date-picker/date-picker.test.tsx +21 -0
- package/src/components/date-picker/date-picker.tsx +2 -0
- package/src/components/notification-banner/notification-banner.tsx +5 -5
- package/src/components/pagination/pagination.test.tsx +353 -0
- package/src/components/pagination/pagination.tsx +152 -0
- package/src/components/phase-banner/phase-banner.test.tsx +1 -1
- package/src/components/select/select.test.tsx +1 -0
- package/src/components/select/select.tsx +1 -0
- package/src/components/site-search/site-search.tsx +1 -1
- package/src/components/text-input/text-input.test.tsx +5 -4
- package/src/components/text-input/text-input.tsx +1 -0
- package/src/components/textarea/textarea.test.tsx +1 -0
- package/src/components/textarea/textarea.tsx +1 -0
- package/src/icons/ArrowUpward.tsx +15 -0
- package/src/icons/CalendarToday.tsx +15 -0
- package/src/icons/Cancel.tsx +13 -0
- package/src/icons/CheckCircle.tsx +15 -0
- package/src/icons/ChevronLeft.tsx +15 -0
- package/src/icons/ChevronRight.tsx +15 -0
- package/src/icons/Close.tsx +15 -0
- package/src/icons/Description.tsx +15 -0
- package/src/icons/DoubleChevronLeft.tsx +19 -0
- package/src/icons/DoubleChevronRight.tsx +19 -0
- package/src/icons/Error.tsx +15 -0
- package/src/icons/ExpandLess.tsx +15 -0
- package/src/icons/ExpandMore.tsx +15 -0
- package/src/icons/List.tsx +18 -0
- package/src/icons/Menu.tsx +15 -0
- package/src/icons/PriorityHigh.tsx +16 -0
- package/src/icons/Search.tsx +15 -0
- package/src/icons/index.ts +17 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { SVGProps } from "react";
|
|
3
|
+
const SvgChevronLeft = (props: SVGProps<SVGSVGElement>) => (
|
|
4
|
+
<svg
|
|
5
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
6
|
+
viewBox="0 0 24 24"
|
|
7
|
+
fill="#000000"
|
|
8
|
+
role="img"
|
|
9
|
+
{...props}
|
|
10
|
+
>
|
|
11
|
+
<path d="M0 0h24v24H0z" fill="none" />
|
|
12
|
+
<path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z" />
|
|
13
|
+
</svg>
|
|
14
|
+
);
|
|
15
|
+
export default SvgChevronLeft;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { SVGProps } from "react";
|
|
3
|
+
const SvgChevronRight = (props: SVGProps<SVGSVGElement>) => (
|
|
4
|
+
<svg
|
|
5
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
6
|
+
viewBox="0 0 24 24"
|
|
7
|
+
fill="#000000"
|
|
8
|
+
role="img"
|
|
9
|
+
{...props}
|
|
10
|
+
>
|
|
11
|
+
<path d="M0 0h24v24H0z" fill="none" />
|
|
12
|
+
<path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" />
|
|
13
|
+
</svg>
|
|
14
|
+
);
|
|
15
|
+
export default SvgChevronRight;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { SVGProps } from "react";
|
|
3
|
+
const SvgClose = (props: SVGProps<SVGSVGElement>) => (
|
|
4
|
+
<svg
|
|
5
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
6
|
+
viewBox="0 0 24 24"
|
|
7
|
+
fill="#000000"
|
|
8
|
+
role="img"
|
|
9
|
+
{...props}
|
|
10
|
+
>
|
|
11
|
+
<path d="M0 0h24v24H0z" fill="none" />
|
|
12
|
+
<path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" />
|
|
13
|
+
</svg>
|
|
14
|
+
);
|
|
15
|
+
export default SvgClose;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { SVGProps } from "react";
|
|
3
|
+
const SvgDescription = (props: SVGProps<SVGSVGElement>) => (
|
|
4
|
+
<svg
|
|
5
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
6
|
+
viewBox="0 0 24 24"
|
|
7
|
+
fill="#000000"
|
|
8
|
+
role="img"
|
|
9
|
+
{...props}
|
|
10
|
+
>
|
|
11
|
+
<path d="M0 0h24v24H0z" fill="none" />
|
|
12
|
+
<path d="M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm2 16H8v-2h8v2zm0-4H8v-2h8v2zm-3-5V3.5L18.5 9H13z" />
|
|
13
|
+
</svg>
|
|
14
|
+
);
|
|
15
|
+
export default SvgDescription;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { SVGProps } from "react";
|
|
3
|
+
const SvgDoubleChevronLeft = (props: SVGProps<SVGSVGElement>) => (
|
|
4
|
+
<svg
|
|
5
|
+
id="Layer_1"
|
|
6
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
7
|
+
xmlnsXlink="http://www.w3.org/1999/xlink"
|
|
8
|
+
x="0px"
|
|
9
|
+
y="0px"
|
|
10
|
+
viewBox="0 0 24 24"
|
|
11
|
+
xmlSpace="preserve"
|
|
12
|
+
role="img"
|
|
13
|
+
{...props}
|
|
14
|
+
>
|
|
15
|
+
<path d="M18.4,16.6L13.8,12l4.6-4.6L17,6l-6,6l6,6L18.4,16.6z" />
|
|
16
|
+
<path d="M12.4,16.6L7.8,12l4.6-4.6L11,6l-6,6l6,6L12.4,16.6z" />
|
|
17
|
+
</svg>
|
|
18
|
+
);
|
|
19
|
+
export default SvgDoubleChevronLeft;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { SVGProps } from "react";
|
|
3
|
+
const SvgDoubleChevronRight = (props: SVGProps<SVGSVGElement>) => (
|
|
4
|
+
<svg
|
|
5
|
+
id="Layer_1"
|
|
6
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
7
|
+
xmlnsXlink="http://www.w3.org/1999/xlink"
|
|
8
|
+
x="0px"
|
|
9
|
+
y="0px"
|
|
10
|
+
viewBox="0 0 24 24"
|
|
11
|
+
xmlSpace="preserve"
|
|
12
|
+
role="img"
|
|
13
|
+
{...props}
|
|
14
|
+
>
|
|
15
|
+
<path d="M5.6,7.4l4.6,4.6l-4.6,4.6L7,18l6-6L7,6L5.6,7.4z" />
|
|
16
|
+
<path d="M11.6,7.4l4.6,4.6l-4.6,4.6L13,18l6-6l-6-6L11.6,7.4z" />
|
|
17
|
+
</svg>
|
|
18
|
+
);
|
|
19
|
+
export default SvgDoubleChevronRight;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { SVGProps } from "react";
|
|
3
|
+
const SvgError = (props: SVGProps<SVGSVGElement>) => (
|
|
4
|
+
<svg
|
|
5
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
6
|
+
viewBox="0 0 24 24"
|
|
7
|
+
fill="#000000"
|
|
8
|
+
role="img"
|
|
9
|
+
{...props}
|
|
10
|
+
>
|
|
11
|
+
<path d="M0 0h24v24H0z" fill="none" />
|
|
12
|
+
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z" />
|
|
13
|
+
</svg>
|
|
14
|
+
);
|
|
15
|
+
export default SvgError;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { SVGProps } from "react";
|
|
3
|
+
const SvgExpandLess = (props: SVGProps<SVGSVGElement>) => (
|
|
4
|
+
<svg
|
|
5
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
6
|
+
viewBox="0 0 24 24"
|
|
7
|
+
fill="#000000"
|
|
8
|
+
role="img"
|
|
9
|
+
{...props}
|
|
10
|
+
>
|
|
11
|
+
<path d="M0 0h24v24H0z" fill="none" />
|
|
12
|
+
<path d="M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z" />
|
|
13
|
+
</svg>
|
|
14
|
+
);
|
|
15
|
+
export default SvgExpandLess;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { SVGProps } from "react";
|
|
3
|
+
const SvgExpandMore = (props: SVGProps<SVGSVGElement>) => (
|
|
4
|
+
<svg
|
|
5
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
6
|
+
viewBox="0 0 24 24"
|
|
7
|
+
fill="#000000"
|
|
8
|
+
role="img"
|
|
9
|
+
{...props}
|
|
10
|
+
>
|
|
11
|
+
<path d="M0 0h24v24H0z" fill="none" />
|
|
12
|
+
<path d="M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z" />
|
|
13
|
+
</svg>
|
|
14
|
+
);
|
|
15
|
+
export default SvgExpandMore;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { SVGProps } from "react";
|
|
3
|
+
const SvgList = (props: SVGProps<SVGSVGElement>) => (
|
|
4
|
+
<svg
|
|
5
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
6
|
+
viewBox="0 0 24 24"
|
|
7
|
+
fill="#000000"
|
|
8
|
+
role="img"
|
|
9
|
+
{...props}
|
|
10
|
+
>
|
|
11
|
+
<g fill="none">
|
|
12
|
+
<path d="M0 0h24v24H0V0z" />
|
|
13
|
+
<path d="M0 0h24v24H0V0z" opacity={0.87} />
|
|
14
|
+
</g>
|
|
15
|
+
<path d="M3 13h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm4 4h14v-2H7v2zm0 4h14v-2H7v2zM7 7v2h14V7H7zm-4 6h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm4 4h14v-2H7v2zm0 4h14v-2H7v2zM7 7v2h14V7H7z" />
|
|
16
|
+
</svg>
|
|
17
|
+
);
|
|
18
|
+
export default SvgList;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { SVGProps } from "react";
|
|
3
|
+
const SvgMenu = (props: SVGProps<SVGSVGElement>) => (
|
|
4
|
+
<svg
|
|
5
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
6
|
+
viewBox="0 0 24 24"
|
|
7
|
+
fill="#000000"
|
|
8
|
+
role="img"
|
|
9
|
+
{...props}
|
|
10
|
+
>
|
|
11
|
+
<path d="M0 0h24v24H0z" fill="none" />
|
|
12
|
+
<path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z" />
|
|
13
|
+
</svg>
|
|
14
|
+
);
|
|
15
|
+
export default SvgMenu;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { SVGProps } from "react";
|
|
3
|
+
const SvgPriorityHigh = (props: SVGProps<SVGSVGElement>) => (
|
|
4
|
+
<svg
|
|
5
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
6
|
+
viewBox="0 0 24 24"
|
|
7
|
+
fill="#000000"
|
|
8
|
+
role="img"
|
|
9
|
+
{...props}
|
|
10
|
+
>
|
|
11
|
+
<path d="M0 0h24v24H0z" fill="none" />
|
|
12
|
+
<circle cx={12} cy={19} r={2} />
|
|
13
|
+
<path d="M10 3h4v12h-4z" />
|
|
14
|
+
</svg>
|
|
15
|
+
);
|
|
16
|
+
export default SvgPriorityHigh;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { SVGProps } from "react";
|
|
3
|
+
const SvgSearch = (props: SVGProps<SVGSVGElement>) => (
|
|
4
|
+
<svg
|
|
5
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
6
|
+
viewBox="0 0 24 24"
|
|
7
|
+
fill="#000000"
|
|
8
|
+
role="img"
|
|
9
|
+
{...props}
|
|
10
|
+
>
|
|
11
|
+
<path d="M0 0h24v24H0z" fill="none" />
|
|
12
|
+
<path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z" />
|
|
13
|
+
</svg>
|
|
14
|
+
);
|
|
15
|
+
export default SvgSearch;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export { default as ArrowUpward } from "./ArrowUpward";
|
|
2
|
+
export { default as CalendarToday } from "./CalendarToday";
|
|
3
|
+
export { default as Cancel } from "./Cancel";
|
|
4
|
+
export { default as CheckCircle } from "./CheckCircle";
|
|
5
|
+
export { default as ChevronLeft } from "./ChevronLeft";
|
|
6
|
+
export { default as ChevronRight } from "./ChevronRight";
|
|
7
|
+
export { default as Close } from "./Close";
|
|
8
|
+
export { default as Description } from "./Description";
|
|
9
|
+
export { default as DoubleChevronLeft } from "./DoubleChevronLeft";
|
|
10
|
+
export { default as DoubleChevronRight } from "./DoubleChevronRight";
|
|
11
|
+
export { default as Error } from "./Error";
|
|
12
|
+
export { default as ExpandLess } from "./ExpandLess";
|
|
13
|
+
export { default as ExpandMore } from "./ExpandMore";
|
|
14
|
+
export { default as List } from "./List";
|
|
15
|
+
export { default as Menu } from "./Menu";
|
|
16
|
+
export { default as PriorityHigh } from "./PriorityHigh";
|
|
17
|
+
export { default as Search } from "./Search";
|