@digigov/ui 2.0.0-555d1027 → 2.0.0-5701c39b
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/app/Loader/Loader.stories.d.ts +44 -1
- package/app/Loader/__stories__/FullPageLoader.d.ts +1 -0
- package/app/Loader/__stories__/Secondary.d.ts +3 -0
- package/app/Loader/__stories__/Sizes.d.ts +3 -0
- package/app/Masthead/Masthead.stories.d.ts +28 -1
- package/app/Modal/Modal.stories.d.ts +20 -1
- package/app/Modal/index.web/index.js +2 -2
- package/app/Modal/index.web.js.map +2 -2
- package/cjs/app/Modal/index.web/index.js +2 -2
- package/cjs/app/Modal/index.web.js.map +2 -2
- package/cjs/i18n/locales/el/index.js +7 -7
- package/cjs/i18n/locales/el.js.map +1 -1
- package/cjs/layouts/Hidden/index.js +19 -0
- package/cjs/layouts/Hidden/index.js.map +3 -3
- package/cjs/registry.js +2 -2
- package/cjs/registry.js.map +2 -2
- package/content/Accordion/Accordion.stories.d.ts +29 -16
- package/content/Accordion/__stories__/SummaryColorSecondary.d.ts +3 -0
- package/content/Accordion/__stories__/UsingArrowIcons.d.ts +3 -0
- package/content/Chip/Chip.stories.d.ts +2 -5
- package/content/SummaryList/SummaryList.stories.d.ts +6 -1
- package/content/SummaryList/__stories__/SummaryListExample.d.ts +2 -1
- package/content/SummaryList/__stories__/WithError.d.ts +3 -0
- package/content/Table/Table.stories.d.ts +18 -6
- package/content/Table/__stories__/UsingHighlights.d.ts +3 -0
- package/feedback/NotificationBanner/NotificationBanner.stories.d.ts +13 -13
- package/feedback/PhaseBanner/PhaseBanner.stories.d.ts +1 -1
- package/i18n/locales/el/index.js +7 -7
- package/i18n/locales/el.js.map +1 -1
- package/index.js +1 -1
- package/layouts/Grid/Grid.stories.d.ts +82 -0
- package/layouts/Hidden/Hidden.stories.d.ts +115 -0
- package/layouts/Hidden/index.d.ts +2 -0
- package/layouts/Hidden/index.js +5 -0
- package/layouts/Hidden/index.js.map +2 -2
- package/layouts/Stack/Stack.stories.d.ts +76 -0
- package/navigation/BackToTopLink/BackToTopLink.stories.d.ts +2 -0
- package/navigation/Dropdown/Dropdown.stories.d.ts +75 -1
- package/navigation/SkipLink/SkipLink.stories.d.ts +2 -0
- package/package.json +5 -5
- package/registry/index.js +2 -2
- package/src/app/BannerContainer/__stories__/CookiesBanner.tsx +1 -21
- package/src/app/Header/doc.mdx +3 -3
- package/src/app/Loader/Loader.stories.jsx +54 -0
- package/src/app/Loader/__stories__/FullPageLoader.tsx +9 -5
- package/src/app/Loader/__stories__/Secondary.tsx +11 -0
- package/src/app/Loader/__stories__/Sizes.tsx +18 -0
- package/src/app/Loader/doc.mdx +39 -0
- package/src/app/Loader/index.test.tsx +8 -0
- package/src/app/Masthead/Masthead.stories.jsx +66 -0
- package/src/app/Masthead/doc.mdx +3 -3
- package/src/app/Modal/Modal.stories.jsx +64 -0
- package/src/app/Modal/__stories__/AlertDialog.tsx +1 -1
- package/src/app/Modal/__stories__/Auto.tsx +1 -1
- package/src/app/Modal/__stories__/Default.tsx +1 -1
- package/src/app/Modal/__stories__/Dense.tsx +1 -1
- package/src/app/Modal/__stories__/WithHooks.tsx +1 -1
- package/src/app/Modal/__stories__/WithoutModalGaps.tsx +1 -1
- package/src/app/Modal/index.web.tsx +2 -2
- package/src/content/Accordion/Accordion.stories.jsx +13 -2
- package/src/content/Accordion/__stories__/Auto.tsx +0 -24
- package/src/content/Accordion/__stories__/Default.tsx +0 -21
- package/src/content/Accordion/__stories__/SummaryColorSecondary.tsx +89 -0
- package/src/content/Accordion/__stories__/UsingArrowIcons.tsx +98 -0
- package/src/content/Accordion/__stories__/WithHints.tsx +0 -24
- package/src/content/Accordion/__stories__/WithHook.tsx +0 -24
- package/src/content/Accordion/doc.mdx +1 -2
- package/src/content/Accordion/index.test.tsx +8 -0
- package/src/content/Card/doc.mdx +11 -11
- package/src/content/Chip/{Chip.stories.js → Chip.stories.jsx} +12 -3
- package/src/content/Chip/doc.mdx +4 -4
- package/src/content/List/doc.mdx +3 -3
- package/src/content/SummaryList/SummaryList.stories.js +7 -1
- package/src/content/SummaryList/__stories__/SummaryListExample.tsx +9 -2
- package/src/content/SummaryList/__stories__/WithError.tsx +48 -0
- package/src/content/SummaryList/index.test.tsx +4 -0
- package/src/content/Table/Table.stories.jsx +19 -2
- package/src/content/Table/__stories__/UsingHighlights.tsx +82 -0
- package/src/content/Table/index.test.tsx +4 -0
- package/src/content/TaskList/doc.mdx +1 -1
- package/src/content/Timeline/doc.mdx +1 -1
- package/src/feedback/CopyToClipboard/doc.mdx +1 -1
- package/src/feedback/ErrorSummary/doc.mdx +1 -1
- package/src/feedback/NotificationBanner/NotificationBanner.stories.js +9 -9
- package/src/feedback/NotificationBanner/doc.mdx +1 -4
- package/src/feedback/PhaseBanner/PhaseBanner.stories.jsx +1 -1
- package/src/form/AutoComplete/doc.mdx +2 -2
- package/src/form/Button/doc.mdx +25 -14
- package/src/form/Checkbox/doc.mdx +1 -1
- package/src/form/RadioContainer/doc.mdx +4 -4
- package/src/i18n/locales/el.ts +7 -7
- package/src/layouts/Basic/doc.mdx +0 -2
- package/src/layouts/Grid/Grid.stories.jsx +143 -0
- package/src/layouts/Hidden/Hidden.stories.jsx +62 -0
- package/src/layouts/Hidden/index.tsx +3 -0
- package/src/layouts/Stack/Stack.stories.jsx +104 -0
- package/src/navigation/BackToTopLink/BackToTopLink.stories.js +4 -0
- package/src/navigation/BackToTopLink/doc.mdx +22 -0
- package/src/navigation/Breadcrumbs/doc.mdx +4 -0
- package/src/navigation/Dropdown/Dropdown.stories.jsx +118 -0
- package/src/navigation/Dropdown/doc.mdx +24 -2
- package/src/navigation/NavList/doc.mdx +1 -1
- package/src/navigation/Pagination/doc.mdx +5 -1
- package/src/navigation/SkipLink/SkipLink.stories.js +4 -0
- package/src/navigation/SkipLink/doc.mdx +19 -0
- package/src/registry.js +2 -2
- package/src/typography/CodeBlock/CodeBlock.stories.js +24 -0
- package/src/typography/Heading/Heading.stories.js +12 -0
- package/src/typography/HeadingCaption/HeadingCaption.stories.js +9 -0
- package/src/typography/Hint/Hint.stories.js +11 -0
- package/src/typography/Hint/__stories__/Default.tsx +1 -1
- package/src/typography/Hint/__stories__/FontSizes.tsx +4 -4
- package/src/typography/NormalText/NormalText.stories.js +10 -0
- package/src/typography/Paragraph/Paragraph.stories.js +23 -0
- package/stories-registry/index.js +18 -4
- package/typography/CodeBlock/CodeBlock.stories.d.ts +11 -0
- package/typography/Heading/Heading.stories.d.ts +10 -0
- package/typography/HeadingCaption/HeadingCaption.stories.d.ts +8 -0
- package/typography/Hint/Hint.stories.d.ts +9 -0
- package/typography/NormalText/NormalText.stories.d.ts +8 -0
- package/typography/Paragraph/Paragraph.stories.d.ts +37 -0
- package/src/app/Loader/Loader.stories.js +0 -9
- package/src/app/Masthead/Masthead.stories.js +0 -17
- package/src/app/Modal/Modal.stories.js +0 -18
- package/src/layouts/Grid/Grid.stories.js +0 -12
- package/src/layouts/Stack/Stack.stories.js +0 -15
- package/src/navigation/Dropdown/Dropdown.stories.js +0 -23
|
@@ -1,31 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
2
|
import BannerContainer from '@digigov/ui/app/BannerContainer';
|
|
4
|
-
import Button, { ButtonGroup } from '@digigov/ui/form/Button';
|
|
5
|
-
import { Container } from '@digigov/ui/layouts/Basic/Container';
|
|
6
|
-
import { Main } from '@digigov/ui/layouts/Basic/Main';
|
|
7
|
-
import { Heading } from '@digigov/ui/typography/Heading';
|
|
8
3
|
import { Paragraph } from '@digigov/ui/typography/Paragraph';
|
|
9
4
|
|
|
10
5
|
export const CookiesBanner = (_: any) => {
|
|
11
6
|
return (
|
|
12
7
|
<BannerContainer>
|
|
13
|
-
<
|
|
14
|
-
<Main>
|
|
15
|
-
<Heading size="md">Cookies στο GOV.GR</Heading>
|
|
16
|
-
<Paragraph>
|
|
17
|
-
Επιλέξτε «Αποδοχή» για να συμφωνήσετε με τη χρήση των cookies και
|
|
18
|
-
την επεξεργασία των προσωπικών σας δεδομένων.
|
|
19
|
-
</Paragraph>
|
|
20
|
-
<Paragraph>
|
|
21
|
-
<Button variant="link">Όροι και Προϋποθέσεις</Button>
|
|
22
|
-
</Paragraph>
|
|
23
|
-
<ButtonGroup>
|
|
24
|
-
<Button>Αποδοχή</Button>
|
|
25
|
-
<Button>Απόρριψη</Button>
|
|
26
|
-
</ButtonGroup>
|
|
27
|
-
</Main>
|
|
28
|
-
</Container>
|
|
8
|
+
<Paragraph p={4}>A text inside the BannerContainer.</Paragraph>
|
|
29
9
|
</BannerContainer>
|
|
30
10
|
);
|
|
31
11
|
};
|
package/src/app/Header/doc.mdx
CHANGED
|
@@ -9,15 +9,15 @@ title: Header
|
|
|
9
9
|
|
|
10
10
|
<code src="@digigov/ui/app/Header/__stories__/Default.tsx" />
|
|
11
11
|
|
|
12
|
-
###
|
|
12
|
+
### With service name
|
|
13
13
|
|
|
14
14
|
<code src="@digigov/ui/app/Header/__stories__/WithServiceName.tsx" />
|
|
15
15
|
|
|
16
|
-
###
|
|
16
|
+
### With service logo and service name
|
|
17
17
|
|
|
18
18
|
<code src="@digigov/ui/app/Header/__stories__/WithServiceNameAndLogo.tsx" />
|
|
19
19
|
|
|
20
|
-
###
|
|
20
|
+
### With responsive navigation
|
|
21
21
|
|
|
22
22
|
<code src="@digigov/ui/app/Header/__stories__/WithNavigation.tsx" />
|
|
23
23
|
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { LoaderContainer, CircularProgress } from '@digigov/ui/app/Loader';
|
|
3
|
+
import doc from './doc.mdx?raw';
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Digigov UI/app/CircularProgress',
|
|
7
|
+
component: CircularProgress,
|
|
8
|
+
displayName: 'CircularProgress',
|
|
9
|
+
tags: ['autodocs'],
|
|
10
|
+
markdown: doc,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const WithControls = {
|
|
14
|
+
render: (args) => {
|
|
15
|
+
return (
|
|
16
|
+
<LoaderContainer>
|
|
17
|
+
<CircularProgress
|
|
18
|
+
loadingText={args.loadingText}
|
|
19
|
+
loadingFinishedText={args.loadingFinishedText}
|
|
20
|
+
color={args.color}
|
|
21
|
+
size={args.size}
|
|
22
|
+
/>
|
|
23
|
+
</LoaderContainer>
|
|
24
|
+
);
|
|
25
|
+
},
|
|
26
|
+
args: {
|
|
27
|
+
loadingText: 'Γίνεται φόρτωση',
|
|
28
|
+
loadingFinishedText: 'Η φόρτωση ολοκληρώθηκε',
|
|
29
|
+
color: 'primary',
|
|
30
|
+
size: 'md',
|
|
31
|
+
},
|
|
32
|
+
argsTypes: {
|
|
33
|
+
loadingText: {
|
|
34
|
+
control: 'text',
|
|
35
|
+
},
|
|
36
|
+
loadingFinishedText: {
|
|
37
|
+
control: 'text',
|
|
38
|
+
},
|
|
39
|
+
color: {
|
|
40
|
+
control: { type: 'select' },
|
|
41
|
+
options: ['primary', 'secondary'],
|
|
42
|
+
},
|
|
43
|
+
size: {
|
|
44
|
+
control: { type: 'select' },
|
|
45
|
+
options: ['sm', 'md', 'lg'],
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export { Default } from '@digigov/ui/app/Loader/__stories__/Default';
|
|
51
|
+
export { Secondary } from '@digigov/ui/app/Loader/__stories__/Secondary';
|
|
52
|
+
export { Sizes } from '@digigov/ui/app/Loader/__stories__/Sizes';
|
|
53
|
+
export { FullPageLoader } from '@digigov/ui/app/Loader/__stories__/FullPageLoader';
|
|
54
|
+
export { AccessibilityLoader } from '@digigov/ui/app/Loader/__stories__/AccessibilityLoader';
|
|
@@ -7,10 +7,14 @@ import {
|
|
|
7
7
|
|
|
8
8
|
export const FullPageLoader = (_: any) => {
|
|
9
9
|
return (
|
|
10
|
-
<
|
|
11
|
-
<
|
|
12
|
-
<
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
<div style={{ minHeight: '100px' }}>
|
|
11
|
+
<FullPageBackground>
|
|
12
|
+
<LoaderContainer>
|
|
13
|
+
<CircularProgress />
|
|
14
|
+
</LoaderContainer>
|
|
15
|
+
</FullPageBackground>
|
|
16
|
+
</div>
|
|
15
17
|
);
|
|
16
18
|
};
|
|
19
|
+
|
|
20
|
+
export default FullPageLoader;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { LoaderContainer, CircularProgress } from '@digigov/ui/app/Loader';
|
|
3
|
+
|
|
4
|
+
export const Secondary = (_: any) => {
|
|
5
|
+
return (
|
|
6
|
+
<LoaderContainer>
|
|
7
|
+
<CircularProgress color="secondary" />
|
|
8
|
+
</LoaderContainer>
|
|
9
|
+
);
|
|
10
|
+
};
|
|
11
|
+
export default Secondary;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Stack } from '@digigov/react-core';
|
|
3
|
+
import { LoaderContainer, CircularProgress } from '@digigov/ui/app/Loader';
|
|
4
|
+
|
|
5
|
+
export const Sizes = (_: any) => {
|
|
6
|
+
return (
|
|
7
|
+
<>
|
|
8
|
+
<LoaderContainer>
|
|
9
|
+
<Stack direction="row" alignItems="center" spacing={4}>
|
|
10
|
+
<CircularProgress size="sm" />
|
|
11
|
+
<CircularProgress size="md" />
|
|
12
|
+
<CircularProgress size="lg" />
|
|
13
|
+
</Stack>
|
|
14
|
+
</LoaderContainer>
|
|
15
|
+
</>
|
|
16
|
+
);
|
|
17
|
+
};
|
|
18
|
+
export default Sizes;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: loader
|
|
3
|
+
title: Loader
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Loader
|
|
7
|
+
|
|
8
|
+
Loading spinner is used for notifying users that their action is being processed or data retrieved from server.
|
|
9
|
+
|
|
10
|
+
## How to use
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
<code src="@digigov/ui/app/Loader/__stories__/Default.tsx" />
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Secondary color
|
|
17
|
+
|
|
18
|
+
<code src="@digigov/ui/app/Loader/__stories__/Secondary.tsx" />
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Different sizes
|
|
22
|
+
|
|
23
|
+
<code src="@digigov/ui/app/Loader/__stories__/Sizes.tsx" />
|
|
24
|
+
|
|
25
|
+
### Full page loader
|
|
26
|
+
|
|
27
|
+
<code src="@digigov/ui/app/Loader/__stories__/FullPageLoader.tsx" />
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
## API
|
|
31
|
+
|
|
32
|
+
See below for a complete reference to all of the props available to the components mentioned here.
|
|
33
|
+
|
|
34
|
+
<ComponentProps componentName={[
|
|
35
|
+
"CircularProgress",
|
|
36
|
+
"Loader",
|
|
37
|
+
]}
|
|
38
|
+
/>
|
|
39
|
+
|
|
@@ -4,6 +4,8 @@ import TestVariant from '@digigov/ui/utils/TestVariant'
|
|
|
4
4
|
import { AccessibilityLoader } from '@digigov/ui/app/Loader/__stories__/AccessibilityLoader';
|
|
5
5
|
import { Default } from '@digigov/ui/app/Loader/__stories__/Default';
|
|
6
6
|
import { FullPageLoader } from '@digigov/ui/app/Loader/__stories__/FullPageLoader';
|
|
7
|
+
import { Secondary } from '@digigov/ui/app/Loader/__stories__/Secondary';
|
|
8
|
+
import { Sizes } from '@digigov/ui/app/Loader/__stories__/Sizes';
|
|
7
9
|
|
|
8
10
|
test('renders the All Loader variants', async ({ mount, page }) => {
|
|
9
11
|
await mount(
|
|
@@ -18,6 +20,12 @@ test('renders the All Loader variants', async ({ mount, page }) => {
|
|
|
18
20
|
<TestVariant title="FullPageLoader">
|
|
19
21
|
<FullPageLoader />
|
|
20
22
|
</TestVariant>
|
|
23
|
+
<TestVariant title="Secondary">
|
|
24
|
+
<Secondary />
|
|
25
|
+
</TestVariant>
|
|
26
|
+
<TestVariant title="Sizes">
|
|
27
|
+
<Sizes />
|
|
28
|
+
</TestVariant>
|
|
21
29
|
</div>
|
|
22
30
|
)
|
|
23
31
|
await page.evaluate(() => document.fonts.ready);
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import doc from './doc.mdx?raw';
|
|
3
|
+
|
|
4
|
+
import { Masthead, MastheadBody } from '@digigov/ui/app/Masthead';
|
|
5
|
+
import { CallToAction } from '@digigov/ui/form/Button/CallToAction';
|
|
6
|
+
import { Container } from '@digigov/ui/layouts/Basic/Container';
|
|
7
|
+
import { Main } from '@digigov/ui/layouts/Basic/Main';
|
|
8
|
+
import { Heading } from '@digigov/ui/typography/Heading';
|
|
9
|
+
import { Hint } from '@digigov/ui/typography/Hint';
|
|
10
|
+
|
|
11
|
+
export default {
|
|
12
|
+
title: 'Digigov UI/app/Masthead',
|
|
13
|
+
description:
|
|
14
|
+
'You can use the masthead at the top of the first page of a GOV.GR service, not at internal pages.',
|
|
15
|
+
link: 'https://guide.services.gov.gr/docs/components/masthead',
|
|
16
|
+
defaultWidth: 'lg',
|
|
17
|
+
component: Masthead,
|
|
18
|
+
tags: ['autodocs'],
|
|
19
|
+
markdown: doc,
|
|
20
|
+
displayName: 'Masthead',
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export const WithControls = {
|
|
24
|
+
render: (args) => {
|
|
25
|
+
return (
|
|
26
|
+
<Masthead color={args.color}>
|
|
27
|
+
<Container>
|
|
28
|
+
<Main as="div">
|
|
29
|
+
<Heading>Σχεδιάστε την υπηρεσία σας, με το στυλ του GOV.GR</Heading>
|
|
30
|
+
<MastheadBody>
|
|
31
|
+
Χρησιμοποιείστε αυτόν τον οδηγό ώστε να φτιάξετε μια υπηρεσία
|
|
32
|
+
συνεπή στα πρότυπα του GOV.GR. Αποκτήστε γνώση από την έρευνα και
|
|
33
|
+
την εμπειρία άλλων ομάδων και αποφύγετε την επανάληψη εργασιών που
|
|
34
|
+
έχουν ήδη γίνει.
|
|
35
|
+
</MastheadBody>
|
|
36
|
+
{args.showHint && <Hint>Τελευταία ενημέρωση: 08/12/2021</Hint>}
|
|
37
|
+
<CallToAction href="#">Ξεκινήστε εδώ</CallToAction>
|
|
38
|
+
</Main>
|
|
39
|
+
</Container>
|
|
40
|
+
</Masthead>
|
|
41
|
+
);
|
|
42
|
+
},
|
|
43
|
+
args: {
|
|
44
|
+
color: 'primary',
|
|
45
|
+
showHint: false,
|
|
46
|
+
},
|
|
47
|
+
argTypes: {
|
|
48
|
+
color: {
|
|
49
|
+
control: {
|
|
50
|
+
type: 'inline-radio',
|
|
51
|
+
},
|
|
52
|
+
options: ['primary', 'secondary'],
|
|
53
|
+
},
|
|
54
|
+
showHint: {
|
|
55
|
+
control: 'boolean',
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
parameters: {
|
|
59
|
+
controls: { exclude: ['ref'] },
|
|
60
|
+
},
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
export { Default } from '@digigov/ui/app/Masthead/__stories__/Default';
|
|
64
|
+
export { Secondary } from '@digigov/ui/app/Masthead/__stories__/Secondary';
|
|
65
|
+
export { WithLogo } from '@digigov/ui/app/Masthead/__stories__/WithLogo';
|
|
66
|
+
export { WithElements } from '@digigov/ui/app/Masthead/__stories__/WithElements';
|
package/src/app/Masthead/doc.mdx
CHANGED
|
@@ -11,15 +11,15 @@ The Masthead component is a set of features or layout that marks the page and de
|
|
|
11
11
|
|
|
12
12
|
<code src="@digigov/ui/app/Masthead/__stories__/Default.tsx" />
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
### With secondary color
|
|
15
15
|
|
|
16
16
|
<code src="@digigov/ui/app/Masthead/__stories__/Secondary.tsx" />
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
### With logo
|
|
19
19
|
|
|
20
20
|
<code src="@digigov/ui/app/Masthead/__stories__/WithLogo.tsx" />
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
### With elements
|
|
23
23
|
|
|
24
24
|
<code src="@digigov/ui/app/Masthead/__stories__/WithElements.tsx" />
|
|
25
25
|
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import doc from './doc.mdx?raw';
|
|
3
|
+
import { Paragraph } from '@digigov/ui/typography/Paragraph';
|
|
4
|
+
import {
|
|
5
|
+
Modal,
|
|
6
|
+
ModalHeading,
|
|
7
|
+
ModalContent,
|
|
8
|
+
ModalAction,
|
|
9
|
+
} from '@digigov/ui/app/Modal';
|
|
10
|
+
import Button from '@digigov/ui/form/Button';
|
|
11
|
+
|
|
12
|
+
export default {
|
|
13
|
+
title: 'Digigov UI/app/Modal',
|
|
14
|
+
description:
|
|
15
|
+
'Use the modal component with caution when you need to provide critical information or ask for a decision.',
|
|
16
|
+
link: 'https://guide.services.gov.gr/docs/patterns/admin-pages/components/modal',
|
|
17
|
+
component: Modal,
|
|
18
|
+
tags: ['autodocs'],
|
|
19
|
+
markdown: doc,
|
|
20
|
+
displayName: 'Modal',
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export const WithControls = {
|
|
24
|
+
render: (args) => {
|
|
25
|
+
return (
|
|
26
|
+
<Modal
|
|
27
|
+
open={true}
|
|
28
|
+
aria-labelledby="modal-label"
|
|
29
|
+
dense={args.dense}
|
|
30
|
+
gaps={args.gaps}
|
|
31
|
+
>
|
|
32
|
+
<ModalHeading id="modal-label">Διαγραφή τηλεφώνου</ModalHeading>
|
|
33
|
+
<ModalContent>
|
|
34
|
+
<Paragraph mb={args.gaps ? 0 : 4}>
|
|
35
|
+
Είστε σίγουροι ότι θέλετε να διαγράψετε τον αριθμό τηλεφώνου; Αυτή η
|
|
36
|
+
ενέργεια είναι οριστική.
|
|
37
|
+
</Paragraph>
|
|
38
|
+
</ModalContent>
|
|
39
|
+
<ModalAction>
|
|
40
|
+
<Button>Διαγραφή</Button>
|
|
41
|
+
<Button variant="link">Ακύρωση</Button>
|
|
42
|
+
</ModalAction>
|
|
43
|
+
</Modal>
|
|
44
|
+
);
|
|
45
|
+
},
|
|
46
|
+
args: {
|
|
47
|
+
dense: false,
|
|
48
|
+
gaps: true,
|
|
49
|
+
},
|
|
50
|
+
argsTypes: {
|
|
51
|
+
dense: {
|
|
52
|
+
control: 'boolean',
|
|
53
|
+
},
|
|
54
|
+
gaps: {
|
|
55
|
+
control: 'boolean',
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
};
|
|
59
|
+
export { Default } from '@digigov/ui/app/Modal/__stories__/Default';
|
|
60
|
+
export { AlertDialog } from '@digigov/ui/app/Modal/__stories__/AlertDialog';
|
|
61
|
+
export { Dense } from '@digigov/ui/app/Modal/__stories__/Dense';
|
|
62
|
+
export { WithHooks } from '@digigov/ui/app/Modal/__stories__/WithHooks';
|
|
63
|
+
export { Auto } from '@digigov/ui/app/Modal/__stories__/Auto';
|
|
64
|
+
export { WithoutModalGaps } from '@digigov/ui/app/Modal/__stories__/WithoutModalGaps';
|
|
@@ -13,7 +13,7 @@ import { Paragraph } from '@digigov/ui/typography/Paragraph';
|
|
|
13
13
|
export const AlertDialog = (_: any) => {
|
|
14
14
|
const [open, setOpen] = useState(false);
|
|
15
15
|
return (
|
|
16
|
-
<div>
|
|
16
|
+
<div style={{ minHeight: '300px' }}>
|
|
17
17
|
<Button
|
|
18
18
|
color="warning"
|
|
19
19
|
onClick={() => {
|
|
@@ -13,7 +13,7 @@ import { LabelContainer } from '@digigov/ui/form/LabelContainer';
|
|
|
13
13
|
import { TextInput } from '@digigov/ui/form/TextInput';
|
|
14
14
|
export const Auto = (_: any) => {
|
|
15
15
|
return (
|
|
16
|
-
<div>
|
|
16
|
+
<div style={{ minHeight: '300px' }}>
|
|
17
17
|
<ModalProvider>
|
|
18
18
|
<ModalButtonAuto open modal="modal-1">
|
|
19
19
|
Προσθήκη τηλεφώνου
|
|
@@ -14,7 +14,7 @@ import { TextInput } from '@digigov/ui/form/TextInput';
|
|
|
14
14
|
export const WithHooks = (_: any) => {
|
|
15
15
|
const { registerModal, registerAction } = useModal();
|
|
16
16
|
return (
|
|
17
|
-
<div>
|
|
17
|
+
<div style={{ minHeight: '300px' }}>
|
|
18
18
|
<Button {...registerAction('modal-1', 'open')}>Προσθήκη τηλεφώνου</Button>
|
|
19
19
|
<Modal
|
|
20
20
|
{...registerModal('modal-1', {
|
|
@@ -43,9 +43,9 @@ export const ModalBase = React.forwardRef<HTMLDivElement, ModalProps>(
|
|
|
43
43
|
aria-modal="true"
|
|
44
44
|
{...props}
|
|
45
45
|
>
|
|
46
|
-
<span tabIndex={-1} ref={firstModalElement}
|
|
46
|
+
<span tabIndex={-1} ref={firstModalElement} />
|
|
47
47
|
{open && children}
|
|
48
|
-
<span tabIndex={0} ref={lastModalElement}
|
|
48
|
+
<span tabIndex={0} ref={lastModalElement} />
|
|
49
49
|
</ModalContainer>
|
|
50
50
|
);
|
|
51
51
|
}
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
AccordionSectionSummaryHeading,
|
|
10
10
|
} from '@digigov/ui/content/Accordion';
|
|
11
11
|
import { Hint } from '@digigov/ui/typography/Hint';
|
|
12
|
+
import { Paragraph } from '@digigov/ui/typography/Paragraph';
|
|
12
13
|
|
|
13
14
|
export default {
|
|
14
15
|
title: 'Digigov UI/content/Accordion',
|
|
@@ -31,13 +32,16 @@ export const WithControls = {
|
|
|
31
32
|
>
|
|
32
33
|
<AccordionSection open>
|
|
33
34
|
<AccordionSectionSummary>
|
|
34
|
-
<AccordionSectionSummaryHeading
|
|
35
|
+
<AccordionSectionSummaryHeading
|
|
36
|
+
aria-controls="content1"
|
|
37
|
+
variant={args.variant}
|
|
38
|
+
>
|
|
35
39
|
{args.title}
|
|
36
40
|
</AccordionSectionSummaryHeading>
|
|
37
41
|
{args.hint > 0 && <Hint>{args.hintMessage}</Hint>}
|
|
38
42
|
</AccordionSectionSummary>
|
|
39
43
|
<AccordionSectionContent id="content1">
|
|
40
|
-
{args.content}
|
|
44
|
+
<Paragraph>{args.content}</Paragraph>
|
|
41
45
|
</AccordionSectionContent>
|
|
42
46
|
</AccordionSection>
|
|
43
47
|
</Accordion>
|
|
@@ -45,6 +49,7 @@ export const WithControls = {
|
|
|
45
49
|
},
|
|
46
50
|
args: {
|
|
47
51
|
title: 'Διαφορές με το δημόσιο',
|
|
52
|
+
variant: 'default',
|
|
48
53
|
hint: true,
|
|
49
54
|
hintMessage:
|
|
50
55
|
'Δικαστικές και εξωδικαστικές διαφορές με το Δημόσιο, εκκαθάριση δικαστικών δαπανών κ.ά.',
|
|
@@ -58,6 +63,10 @@ export const WithControls = {
|
|
|
58
63
|
title: {
|
|
59
64
|
control: { type: 'text' },
|
|
60
65
|
},
|
|
66
|
+
variant: {
|
|
67
|
+
options: ['default', 'arrows'],
|
|
68
|
+
control: { type: 'select' },
|
|
69
|
+
},
|
|
61
70
|
hint: {
|
|
62
71
|
control: { type: 'boolean' },
|
|
63
72
|
},
|
|
@@ -83,6 +92,8 @@ export const WithControls = {
|
|
|
83
92
|
};
|
|
84
93
|
|
|
85
94
|
export { Default } from '@digigov/ui/content/Accordion/__stories__/Default';
|
|
95
|
+
export { SummaryColorSecondary } from '@digigov/ui/content/Accordion/__stories__/SummaryColorSecondary';
|
|
96
|
+
export { UsingArrowIcons } from '@digigov/ui/content/Accordion/__stories__/UsingArrowIcons';
|
|
86
97
|
export { WithHints } from '@digigov/ui/content/Accordion/__stories__/WithHints';
|
|
87
98
|
export { WithHook } from '@digigov/ui/content/Accordion/__stories__/WithHook';
|
|
88
99
|
export { Auto } from '@digigov/ui/content/Accordion/__stories__/Auto';
|
|
@@ -100,30 +100,6 @@ export const Auto = (_: any) => {
|
|
|
100
100
|
</List>
|
|
101
101
|
</AccordionSectionContent>
|
|
102
102
|
</AccordionSectionAuto>
|
|
103
|
-
<AccordionSectionAuto id="4">
|
|
104
|
-
<AccordionSectionSummary>
|
|
105
|
-
<AccordionSectionSummaryHeading aria-controls="content4">
|
|
106
|
-
Καταστήματα κράτησης
|
|
107
|
-
</AccordionSectionSummaryHeading>
|
|
108
|
-
<Hint>
|
|
109
|
-
Επανένταξη αποφυλακισμένων, πιστοποιητικά, επισκεπτήρια κ.ά.
|
|
110
|
-
</Hint>
|
|
111
|
-
</AccordionSectionSummary>
|
|
112
|
-
<AccordionSectionContent id="content4">
|
|
113
|
-
<Paragraph>
|
|
114
|
-
Στη λίστα παρακάτω μπορείτε να δείτε τις υπηρεσίες που αφορούν το
|
|
115
|
-
επιλεγμένο γεγονός ζωής.
|
|
116
|
-
</Paragraph>
|
|
117
|
-
<List>
|
|
118
|
-
<ListItem>
|
|
119
|
-
<Link>Βεβαίωση ηθικού / πειθαρχικού ελέγχου αποφυλακισμένων</Link>
|
|
120
|
-
</ListItem>
|
|
121
|
-
<ListItem>
|
|
122
|
-
<Link>Εκπαίδευση αποφυλακισμένων</Link>
|
|
123
|
-
</ListItem>
|
|
124
|
-
</List>
|
|
125
|
-
</AccordionSectionContent>
|
|
126
|
-
</AccordionSectionAuto>
|
|
127
103
|
</AccordionAuto>
|
|
128
104
|
);
|
|
129
105
|
};
|
|
@@ -83,27 +83,6 @@ export const Default = (_: any) => (
|
|
|
83
83
|
</List>
|
|
84
84
|
</AccordionSectionContent>
|
|
85
85
|
</AccordionSection>
|
|
86
|
-
<AccordionSection>
|
|
87
|
-
<AccordionSectionSummary>
|
|
88
|
-
<AccordionSectionSummaryHeading aria-controls="content4">
|
|
89
|
-
Καταστήματα κράτησης
|
|
90
|
-
</AccordionSectionSummaryHeading>
|
|
91
|
-
</AccordionSectionSummary>
|
|
92
|
-
<AccordionSectionContent id="content4">
|
|
93
|
-
<Paragraph>
|
|
94
|
-
Στη λίστα παρακάτω μπορείτε να δείτε τις υπηρεσίες που αφορούν το
|
|
95
|
-
επιλεγμένο γεγονός ζωής.
|
|
96
|
-
</Paragraph>
|
|
97
|
-
<List>
|
|
98
|
-
<ListItem>
|
|
99
|
-
<Link>Βεβαίωση ηθικού / πειθαρχικού ελέγχου αποφυλακισμένων</Link>
|
|
100
|
-
</ListItem>
|
|
101
|
-
<ListItem>
|
|
102
|
-
<Link>Εκπαίδευση αποφυλακισμένων</Link>
|
|
103
|
-
</ListItem>
|
|
104
|
-
</List>
|
|
105
|
-
</AccordionSectionContent>
|
|
106
|
-
</AccordionSection>
|
|
107
86
|
</Accordion>
|
|
108
87
|
);
|
|
109
88
|
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
Accordion,
|
|
5
|
+
AccordionSection,
|
|
6
|
+
AccordionSectionContent,
|
|
7
|
+
AccordionSectionSummary,
|
|
8
|
+
AccordionSectionSummaryHeading,
|
|
9
|
+
} from '@digigov/ui/content/Accordion';
|
|
10
|
+
|
|
11
|
+
import { List } from '@digigov/ui/content/List/List';
|
|
12
|
+
import { ListItem } from '@digigov/ui/content/List/ListItem';
|
|
13
|
+
import { Link } from '@digigov/ui/navigation/Link';
|
|
14
|
+
import { Paragraph } from '@digigov/ui/typography/Paragraph';
|
|
15
|
+
|
|
16
|
+
export const SummaryColorSecondary = (_: any) => (
|
|
17
|
+
<Accordion summaryColor="secondary">
|
|
18
|
+
<AccordionSection open>
|
|
19
|
+
<AccordionSectionSummary>
|
|
20
|
+
<AccordionSectionSummaryHeading aria-controls="content1">
|
|
21
|
+
Διαφορές με το δημόσιο
|
|
22
|
+
</AccordionSectionSummaryHeading>
|
|
23
|
+
</AccordionSectionSummary>
|
|
24
|
+
<AccordionSectionContent id="content1">
|
|
25
|
+
<Paragraph>
|
|
26
|
+
Παρακάτω μπορείτε να δείτε την διαθέσιμη και ενεργή υπηρεσία που αφορά
|
|
27
|
+
το επιλεγμένο γεγονός ζωής.
|
|
28
|
+
</Paragraph>
|
|
29
|
+
<List>
|
|
30
|
+
<ListItem>
|
|
31
|
+
<Link>
|
|
32
|
+
Αίτηση εξώδικης αναγνώρισης απαιτήσεων / συμβιβαστικής επίλυσης
|
|
33
|
+
διαφορών με το Δημόσιο
|
|
34
|
+
</Link>
|
|
35
|
+
</ListItem>
|
|
36
|
+
</List>
|
|
37
|
+
</AccordionSectionContent>
|
|
38
|
+
</AccordionSection>
|
|
39
|
+
<AccordionSection>
|
|
40
|
+
<AccordionSectionSummary>
|
|
41
|
+
<AccordionSectionSummaryHeading aria-controls="content2">
|
|
42
|
+
Δικαστήρια
|
|
43
|
+
</AccordionSectionSummaryHeading>
|
|
44
|
+
</AccordionSectionSummary>
|
|
45
|
+
<AccordionSectionContent id="content2">
|
|
46
|
+
<Paragraph>
|
|
47
|
+
Στη λίστα παρακάτω μπορείτε να δείτε τις υπηρεσίες που αφορούν το
|
|
48
|
+
επιλεγμένο γεγονός ζωής, κατηγοριοποιημένες σε ομάδες υπηρεσιών.
|
|
49
|
+
</Paragraph>
|
|
50
|
+
<List>
|
|
51
|
+
<ListItem>
|
|
52
|
+
<Link>Ενιαίο πιστοποιητικό δικαστικής φερεγγυότητας</Link>
|
|
53
|
+
</ListItem>
|
|
54
|
+
<ListItem>
|
|
55
|
+
<Link>Ηλεκτρονικές δικαστικές αποφάσεις</Link>
|
|
56
|
+
</ListItem>
|
|
57
|
+
<ListItem>
|
|
58
|
+
<Link>Πιστοποιητικά δικαστηρίων</Link>
|
|
59
|
+
</ListItem>
|
|
60
|
+
</List>
|
|
61
|
+
</AccordionSectionContent>
|
|
62
|
+
</AccordionSection>
|
|
63
|
+
<AccordionSection>
|
|
64
|
+
<AccordionSectionSummary>
|
|
65
|
+
<AccordionSectionSummaryHeading aria-controls="content3">
|
|
66
|
+
Δικόγραφα
|
|
67
|
+
</AccordionSectionSummaryHeading>
|
|
68
|
+
</AccordionSectionSummary>
|
|
69
|
+
<AccordionSectionContent id="content3">
|
|
70
|
+
<Paragraph>
|
|
71
|
+
Στη λίστα παρακάτω μπορείτε να δείτε τις υπηρεσίες που αφορούν το
|
|
72
|
+
επιλεγμένο γεγονός ζωής.
|
|
73
|
+
</Paragraph>
|
|
74
|
+
<List>
|
|
75
|
+
<ListItem>
|
|
76
|
+
<Link>Αντίγραφο πρακτικών υπόθεσης</Link>
|
|
77
|
+
</ListItem>
|
|
78
|
+
<ListItem>
|
|
79
|
+
<Link>
|
|
80
|
+
Ηλεκτρονική κατάθεση δικογράφων (Πολιτικά / Ποινικά Δικαστήρια)
|
|
81
|
+
</Link>
|
|
82
|
+
</ListItem>
|
|
83
|
+
</List>
|
|
84
|
+
</AccordionSectionContent>
|
|
85
|
+
</AccordionSection>
|
|
86
|
+
</Accordion>
|
|
87
|
+
);
|
|
88
|
+
|
|
89
|
+
export default SummaryColorSecondary;
|