@digigov/ui 2.0.0-76ec20a0 → 2.0.0-7d765d3c
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/Footer/__stories__/Default.d.ts +1 -1
- package/app/Loader/Loader.stories.d.ts +45 -1
- package/app/Loader/__stories__/AccessibilityLoader.d.ts +3 -0
- 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/Loader/index.native.d.ts +2 -2
- package/app/Loader/index.native.js.map +2 -2
- package/app/Loader/index.web/index.js +17 -1
- package/app/Loader/index.web.d.ts +19 -1
- package/app/Loader/index.web.js.map +3 -3
- package/app/Masthead/Masthead.stories.d.ts +28 -1
- package/app/Modal/Modal.stories.d.ts +20 -1
- package/app/Modal/hooks/index.js +2 -6
- package/app/Modal/hooks.d.ts +2 -2
- package/app/Modal/hooks.js.map +2 -2
- package/app/Modal/index.web/index.js +5 -5
- package/app/Modal/index.web.js.map +2 -2
- package/app/NotFound/__stories__/Default.d.ts +1 -1
- package/app/OutdatedBrowserBanner/index.d.ts +1 -0
- package/app/OutdatedBrowserBanner/index.js.map +2 -2
- package/app/PhaseBannerHeader/index.d.ts +1 -1
- package/app/PhaseBannerHeader/index.js.map +2 -2
- package/app/Skeleton/__stories__/Button.d.ts +1 -1
- package/app/Skeleton/__stories__/Default.d.ts +1 -1
- package/app/Skeleton/__stories__/NoAnimation.d.ts +1 -1
- package/app/hooks/useNotificationArea/index.js +76 -0
- package/app/hooks/useNotificationArea/package.json +6 -0
- package/app/hooks/useNotificationArea.d.ts +1 -0
- package/app/hooks/useNotificationArea.js.map +7 -0
- package/cjs/app/Loader/index.native.js.map +2 -2
- package/cjs/app/Loader/index.web/index.js +33 -2
- package/cjs/app/Loader/index.web.js.map +3 -3
- package/cjs/app/Modal/hooks/index.js +2 -6
- package/cjs/app/Modal/hooks.js.map +2 -2
- package/cjs/app/Modal/index.web/index.js +5 -5
- package/cjs/app/Modal/index.web.js.map +2 -2
- package/cjs/app/OutdatedBrowserBanner/index.js.map +2 -2
- package/cjs/app/PhaseBannerHeader/index.js.map +2 -2
- package/cjs/app/hooks/useNotificationArea/index.js +99 -0
- package/cjs/app/hooks/useNotificationArea.js.map +7 -0
- package/cjs/content/Accordion/hooks.js.map +1 -1
- package/cjs/form/AutoComplete/Status/index.js.map +2 -2
- package/cjs/form/AutoComplete/index.js +32 -19
- package/cjs/form/AutoComplete/index.js.map +2 -2
- package/cjs/i18n/locales/el/index.js +51 -23
- package/cjs/i18n/locales/el.js.map +2 -2
- package/cjs/i18n/locales/en/index.js +36 -8
- package/cjs/i18n/locales/en.js.map +2 -2
- package/cjs/layouts/Hidden/index.js +19 -0
- package/cjs/layouts/Hidden/index.js.map +3 -3
- package/cjs/lazy.js +1 -1
- package/cjs/lazy.js.map +2 -2
- package/cjs/navigation/Drawer/hooks/index.js +2 -6
- package/cjs/navigation/Drawer/hooks.js.map +2 -2
- package/cjs/navigation/Pagination/hooks/index.js +2 -2
- package/cjs/navigation/Pagination/hooks.js.map +2 -2
- package/cjs/navigation/Tabs/hooks.js.map +1 -1
- package/cjs/registry.js +50 -48
- package/cjs/registry.js.map +2 -2
- package/cjs/typography/CodeBlock/index.js +1 -2
- package/cjs/typography/CodeBlock/index.js.map +2 -2
- package/cjs/utils/hooks/useDebounce/index.js +1 -1
- package/cjs/utils/hooks/useDebounce.js.map +2 -2
- package/content/Accordion/Accordion.stories.d.ts +27 -16
- package/content/Accordion/hooks.js.map +1 -1
- package/content/Chip/__stories__/Default.d.ts +1 -1
- package/content/SummaryList/SummaryList.stories.d.ts +4 -1
- package/feedback/NotificationBanner/NotificationBanner.stories.d.ts +14 -13
- package/feedback/NotificationBanner/__stories__/Expanded.d.ts +3 -0
- package/feedback/PhaseBanner/PhaseBanner.stories.d.ts +1 -1
- package/form/AutoComplete/AutoComplete.stories.d.ts +57 -16
- package/form/AutoComplete/Status/index.d.ts +1 -1
- package/form/AutoComplete/Status/index.js.map +2 -2
- package/form/AutoComplete/__stories__/WithCustomValue.d.ts +3 -0
- package/form/AutoComplete/__stories__/WithHint.d.ts +3 -0
- package/form/AutoComplete/index.d.ts +4 -3
- package/form/AutoComplete/index.js +32 -18
- package/form/AutoComplete/index.js.map +2 -2
- package/form/Button/__stories__/ThemeToggle.d.ts +1 -1
- package/form/FileUpload/FileUpload.stories.d.ts +1 -0
- package/form/FileUpload/__stories__/WithVariantLink.d.ts +3 -0
- package/i18n/locales/el/index.js +51 -23
- package/i18n/locales/el.d.ts +33 -5
- package/i18n/locales/el.js.map +2 -2
- package/i18n/locales/en/index.js +36 -8
- package/i18n/locales/en.d.ts +32 -4
- package/i18n/locales/en.js.map +2 -2
- 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/lazy/index.js +1 -1
- package/navigation/BackToTopLink/BackToTopLink.stories.d.ts +2 -0
- package/navigation/Drawer/hooks/index.js +2 -6
- package/navigation/Drawer/hooks.js.map +2 -2
- package/navigation/Dropdown/Dropdown.stories.d.ts +75 -1
- package/navigation/Pagination/hooks/index.js +2 -2
- package/navigation/Pagination/hooks.js.map +2 -2
- package/navigation/SkipLink/SkipLink.stories.d.ts +2 -0
- package/navigation/Tabs/hooks.d.ts +1 -1
- package/navigation/Tabs/hooks.js.map +1 -1
- package/package.json +7 -7
- package/registry/index.js +50 -48
- package/src/app/BannerContainer/__stories__/CookiesBanner.tsx +1 -21
- package/src/app/Footer/__stories__/Default.tsx +1 -1
- package/src/app/Header/doc.mdx +3 -3
- package/src/app/Loader/Loader.stories.jsx +54 -0
- package/src/app/Loader/__stories__/AccessibilityLoader.tsx +27 -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.native.tsx +2 -2
- package/src/app/Loader/index.test.tsx +12 -0
- package/src/app/Loader/index.web.tsx +39 -1
- 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/hooks.ts +8 -8
- package/src/app/Modal/index.web.tsx +5 -7
- package/src/app/NotFound/__stories__/Default.tsx +1 -1
- package/src/app/OutdatedBrowserBanner/index.tsx +1 -1
- package/src/app/PhaseBannerHeader/index.tsx +1 -1
- package/src/app/Skeleton/__stories__/Button.tsx +1 -1
- package/src/app/Skeleton/__stories__/Default.tsx +1 -1
- package/src/app/Skeleton/__stories__/NoAnimation.tsx +1 -1
- package/src/app/hooks/useNotificationArea.tsx +105 -0
- package/src/content/Accordion/Accordion.stories.jsx +9 -1
- package/src/content/Accordion/doc.mdx +1 -2
- package/src/content/Accordion/hooks.ts +1 -1
- package/src/content/Card/doc.mdx +11 -11
- package/src/content/Chip/__stories__/Default.tsx +1 -1
- package/src/content/Chip/doc.mdx +4 -4
- package/src/content/List/__snapshots__/index.spec.tsx.snap +13 -3
- package/src/content/List/doc.mdx +3 -3
- package/src/content/SummaryList/SummaryList.stories.js +5 -1
- 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/__snapshots__/index.spec.tsx.snap +13 -3
- package/src/feedback/ErrorSummary/doc.mdx +1 -1
- package/src/feedback/NotificationBanner/NotificationBanner.stories.js +10 -9
- package/src/feedback/NotificationBanner/__snapshots__/index.spec.tsx.snap +24 -14
- package/src/feedback/NotificationBanner/__stories__/Expanded.tsx +27 -0
- package/src/feedback/NotificationBanner/doc.mdx +15 -6
- package/src/feedback/NotificationBanner/index.test.tsx +4 -0
- package/src/feedback/PhaseBanner/PhaseBanner.stories.jsx +1 -1
- package/src/feedback/WarningText/__snapshots__/index.spec.tsx.snap +13 -3
- package/src/form/AutoComplete/AutoComplete.stories.jsx +19 -4
- package/src/form/AutoComplete/Status/index.tsx +1 -1
- package/src/form/AutoComplete/__stories__/WithAutoSelect.tsx +1 -17
- package/src/form/AutoComplete/__stories__/WithCustomValue.tsx +28 -0
- package/src/form/AutoComplete/__stories__/WithDefaultValue.tsx +1 -6
- package/src/form/AutoComplete/__stories__/WithHint.tsx +16 -0
- package/src/form/AutoComplete/doc.mdx +14 -13
- package/src/form/AutoComplete/index.test.tsx +8 -0
- package/src/form/AutoComplete/index.tsx +38 -25
- package/src/form/Button/__stories__/ThemeToggle.tsx +1 -1
- package/src/form/Button/doc.mdx +25 -14
- package/src/form/Checkbox/doc.mdx +1 -1
- package/src/form/FileUpload/FileUpload.stories.js +1 -0
- package/src/form/FileUpload/__stories__/WithVariantLink.tsx +24 -0
- package/src/form/FileUpload/index.test.tsx +4 -0
- package/src/form/RadioContainer/doc.mdx +4 -4
- package/src/i18n/locales/el.ts +73 -22
- package/src/i18n/locales/en.ts +43 -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/lazy.js +1 -1
- 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/Drawer/hooks.ts +6 -6
- package/src/navigation/Dropdown/Dropdown.stories.jsx +118 -0
- package/src/navigation/Dropdown/doc.mdx +24 -2
- package/src/navigation/NavList/__snapshots__/index.spec.tsx.snap +13 -3
- package/src/navigation/NavList/doc.mdx +1 -1
- package/src/navigation/Pagination/doc.mdx +5 -1
- package/src/navigation/Pagination/hooks.ts +2 -2
- package/src/navigation/SkipLink/SkipLink.stories.js +4 -0
- package/src/navigation/SkipLink/doc.mdx +19 -0
- package/src/navigation/Tabs/hooks.ts +2 -2
- package/src/registry.js +50 -48
- package/src/typography/CodeBlock/CodeBlock.stories.js +24 -0
- package/src/typography/CodeBlock/index.tsx +14 -12
- 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/NormalText/__stories__/Default.tsx +1 -1
- package/src/typography/Paragraph/Paragraph.stories.js +23 -0
- package/src/typography/Paragraph/__stories__/Default.tsx +1 -1
- package/src/typography/Paragraph/__stories__/LeadVariant.tsx +3 -1
- package/src/typography/Paragraph/__stories__/SmallVariant.tsx +3 -1
- package/src/utils/hooks/useDebounce.ts +1 -1
- package/stories-registry/index.js +170 -154
- package/typography/CodeBlock/CodeBlock.stories.d.ts +11 -0
- package/typography/CodeBlock/index.d.ts +1 -1
- package/typography/CodeBlock/index.js +1 -2
- package/typography/CodeBlock/index.js.map +2 -2
- 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/Hint/__stories__/Default.d.ts +1 -1
- package/typography/NormalText/NormalText.stories.d.ts +8 -0
- package/typography/NormalText/__stories__/Default.d.ts +1 -1
- package/typography/Paragraph/Paragraph.stories.d.ts +37 -0
- package/typography/Paragraph/__stories__/Default.d.ts +1 -1
- package/typography/Paragraph/__stories__/LeadVariant.d.ts +1 -1
- package/typography/Paragraph/__stories__/SmallVariant.d.ts +1 -1
- package/utils/hooks/useDebounce/index.js +1 -1
- package/utils/hooks/useDebounce.js.map +2 -2
- package/utils/hooks/useLatest.d.ts +1 -1
- package/src/app/Loader/Loader.stories.js +0 -8
- 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
|
@@ -30,21 +30,22 @@ through, select from large collections of options and help services get more con
|
|
|
30
30
|
|
|
31
31
|
### With min length
|
|
32
32
|
|
|
33
|
-
This is the minimum number of characters that should be entered before the AutoComplete will attempt to suggest options(in above example is 2)
|
|
33
|
+
This is the minimum number of characters that should be entered before the AutoComplete will attempt to suggest options(in above example is 2).
|
|
34
34
|
|
|
35
35
|
<code src="@digigov/ui/form/AutoComplete/__stories__/WithMinLength.tsx" />
|
|
36
36
|
|
|
37
37
|
## API
|
|
38
38
|
|
|
39
|
-
See below for a complete reference to all of the props
|
|
40
|
-
|
|
41
|
-
<ComponentProps
|
|
42
|
-
[
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
]}
|
|
39
|
+
See below for a complete reference to all of the props available to the components mentioned here.
|
|
40
|
+
|
|
41
|
+
<ComponentProps
|
|
42
|
+
componentName={[
|
|
43
|
+
'AutoCompleteWrapper',
|
|
44
|
+
'AutoCompleteStatus',
|
|
45
|
+
'AutoCompleteStatusWrapper',
|
|
46
|
+
'AutoCompleteInput',
|
|
47
|
+
'AutoCompleteResultList',
|
|
48
|
+
'AutoCompleteResultListItem',
|
|
49
|
+
'AutoCompleteAssistiveHint',
|
|
50
|
+
]}
|
|
51
|
+
/>
|
|
@@ -7,7 +7,9 @@ import { MultipleShowingTwoSelected } from '@digigov/ui/form/AutoComplete/__stor
|
|
|
7
7
|
import { MultipleWithDefaultValues } from '@digigov/ui/form/AutoComplete/__stories__/MultipleWithDefaultValues';
|
|
8
8
|
import { MultipleWithMinLength } from '@digigov/ui/form/AutoComplete/__stories__/MultipleWithMinLength';
|
|
9
9
|
import { WithAutoSelect } from '@digigov/ui/form/AutoComplete/__stories__/WithAutoSelect';
|
|
10
|
+
import { WithCustomValue } from '@digigov/ui/form/AutoComplete/__stories__/WithCustomValue';
|
|
10
11
|
import { WithDefaultValue } from '@digigov/ui/form/AutoComplete/__stories__/WithDefaultValue';
|
|
12
|
+
import { WithHint } from '@digigov/ui/form/AutoComplete/__stories__/WithHint';
|
|
11
13
|
import { WithMinLength } from '@digigov/ui/form/AutoComplete/__stories__/WithMinLength';
|
|
12
14
|
import { WithPlaceHolder } from '@digigov/ui/form/AutoComplete/__stories__/WithPlaceHolder';
|
|
13
15
|
import { WithShowAllValues } from '@digigov/ui/form/AutoComplete/__stories__/WithShowAllValues';
|
|
@@ -34,9 +36,15 @@ test('renders the All AutoComplete variants', async ({ mount, page }) => {
|
|
|
34
36
|
<TestVariant title="WithAutoSelect">
|
|
35
37
|
<WithAutoSelect />
|
|
36
38
|
</TestVariant>
|
|
39
|
+
<TestVariant title="WithCustomValue">
|
|
40
|
+
<WithCustomValue />
|
|
41
|
+
</TestVariant>
|
|
37
42
|
<TestVariant title="WithDefaultValue">
|
|
38
43
|
<WithDefaultValue />
|
|
39
44
|
</TestVariant>
|
|
45
|
+
<TestVariant title="WithHint">
|
|
46
|
+
<WithHint />
|
|
47
|
+
</TestVariant>
|
|
40
48
|
<TestVariant title="WithMinLength">
|
|
41
49
|
<WithMinLength />
|
|
42
50
|
</TestVariant>
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import React, { Component } from 'react';
|
|
1
|
+
import React, { Component, type JSX } from 'react';
|
|
2
2
|
import { AutoCompleteAssistiveHint } from '@digigov/react-core/AutoCompleteAssistiveHint';
|
|
3
3
|
import { AutoCompleteContainer } from '@digigov/react-core/AutoCompleteContainer';
|
|
4
4
|
import { AutoCompleteInputBase } from '@digigov/react-core/AutoCompleteInputBase';
|
|
5
|
-
import { AutoCompleteInputTypeahead } from '@digigov/react-core/AutoCompleteInputTypeahead';
|
|
6
5
|
import { AutoCompleteMultipleInput } from '@digigov/react-core/AutoCompleteMultipleInput';
|
|
7
6
|
import { AutoCompleteMultipleInputContainer } from '@digigov/react-core/AutoCompleteMultipleInputContainer';
|
|
8
7
|
import { AutoCompleteResultList } from '@digigov/react-core/AutoCompleteResultList';
|
|
@@ -36,6 +35,7 @@ export interface AutoCompleteProps {
|
|
|
36
35
|
};
|
|
37
36
|
width?: '25%' | '33.3%' | '50%' | '66.6%' | '75%' | '100%' | 'full';
|
|
38
37
|
autoselect?: boolean;
|
|
38
|
+
hint?: boolean;
|
|
39
39
|
defaultValue?: string | string[];
|
|
40
40
|
minLength?: number;
|
|
41
41
|
name?: string;
|
|
@@ -70,6 +70,7 @@ export default class AutoComplete extends Component<AutoCompleteProps, State> {
|
|
|
70
70
|
minLength: 0,
|
|
71
71
|
name: 'ds-input-autocomplete',
|
|
72
72
|
placeholder: '',
|
|
73
|
+
hint: false,
|
|
73
74
|
onConfirm: (): void => {
|
|
74
75
|
return;
|
|
75
76
|
},
|
|
@@ -191,12 +192,13 @@ export default class AutoComplete extends Component<AutoCompleteProps, State> {
|
|
|
191
192
|
|
|
192
193
|
handleComponentBlur(newState?: NewQueryProps): void {
|
|
193
194
|
const { options, query, selected } = this.state;
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
}
|
|
199
|
-
|
|
195
|
+
const { confirmOnBlur, autoselect, onConfirm } = this.props;
|
|
196
|
+
let newQuery = query;
|
|
197
|
+
if (confirmOnBlur || autoselect) {
|
|
198
|
+
newQuery = newState?.query ?? query;
|
|
199
|
+
}
|
|
200
|
+
if (confirmOnBlur) {
|
|
201
|
+
onConfirm?.(options[selected as number]);
|
|
200
202
|
}
|
|
201
203
|
this.setState({
|
|
202
204
|
focused: null,
|
|
@@ -214,6 +216,7 @@ export default class AutoComplete extends Component<AutoCompleteProps, State> {
|
|
|
214
216
|
}
|
|
215
217
|
|
|
216
218
|
handleAutoCompleteBlur(event, index?: number): void {
|
|
219
|
+
const { autoselect } = this.props;
|
|
217
220
|
const { focused, options, query, selected } = this.state;
|
|
218
221
|
let focusingOutsideComponent = false;
|
|
219
222
|
if (event.relatedTarget === null) {
|
|
@@ -235,7 +238,7 @@ export default class AutoComplete extends Component<AutoCompleteProps, State> {
|
|
|
235
238
|
focusingOutsideComponent &&
|
|
236
239
|
!(focusingAnotherOption || focusingInput || focusingButtonArrow);
|
|
237
240
|
|
|
238
|
-
if (blurComponent) {
|
|
241
|
+
if (blurComponent && !autoselect) {
|
|
239
242
|
// In handleInputBlur:
|
|
240
243
|
const newQuery = isIosDevice()
|
|
241
244
|
? query
|
|
@@ -245,11 +248,24 @@ export default class AutoComplete extends Component<AutoCompleteProps, State> {
|
|
|
245
248
|
query: newQuery,
|
|
246
249
|
});
|
|
247
250
|
}
|
|
251
|
+
if (blurComponent && autoselect) {
|
|
252
|
+
// In handleInputBlur:
|
|
253
|
+
const selectedOption = this.templateInputValue(
|
|
254
|
+
options[selected as number]
|
|
255
|
+
);
|
|
256
|
+
const newQuery = isIosDevice()
|
|
257
|
+
? query
|
|
258
|
+
: selectedOption?.toLowerCase().includes(query.toLowerCase())
|
|
259
|
+
? selectedOption
|
|
260
|
+
: query;
|
|
261
|
+
this.handleComponentBlur({
|
|
262
|
+
menuOpen: false,
|
|
263
|
+
query: newQuery,
|
|
264
|
+
});
|
|
265
|
+
}
|
|
248
266
|
}
|
|
249
|
-
|
|
250
267
|
handleInputChange(event: { target: any }): void {
|
|
251
268
|
const { source, minLength } = this.props;
|
|
252
|
-
const autoselect = this.hasAutoselect();
|
|
253
269
|
const query = event.target.value;
|
|
254
270
|
const queryEmpty = query.length === 0;
|
|
255
271
|
this.setState({
|
|
@@ -263,7 +279,7 @@ export default class AutoComplete extends Component<AutoCompleteProps, State> {
|
|
|
263
279
|
this.setState({
|
|
264
280
|
menuOpen: optionsAvailable,
|
|
265
281
|
options,
|
|
266
|
-
selected:
|
|
282
|
+
selected: -1,
|
|
267
283
|
validChoiceMade: false,
|
|
268
284
|
});
|
|
269
285
|
});
|
|
@@ -315,6 +331,7 @@ export default class AutoComplete extends Component<AutoCompleteProps, State> {
|
|
|
315
331
|
hovered: index,
|
|
316
332
|
});
|
|
317
333
|
}
|
|
334
|
+
this.handleOptionFocus(index);
|
|
318
335
|
}
|
|
319
336
|
|
|
320
337
|
handleOptionClickMultiple(index: number): void {
|
|
@@ -467,11 +484,13 @@ export default class AutoComplete extends Component<AutoCompleteProps, State> {
|
|
|
467
484
|
case 'enter':
|
|
468
485
|
this.handleEnter(event);
|
|
469
486
|
break;
|
|
470
|
-
case 'escape':
|
|
487
|
+
case 'escape': {
|
|
471
488
|
this.handleComponentBlur({
|
|
472
489
|
query: this.state.query,
|
|
490
|
+
menuOpen: false,
|
|
473
491
|
});
|
|
474
492
|
break;
|
|
493
|
+
}
|
|
475
494
|
case 'backspace':
|
|
476
495
|
if (this.props.multiple) {
|
|
477
496
|
if (
|
|
@@ -507,7 +526,6 @@ export default class AutoComplete extends Component<AutoCompleteProps, State> {
|
|
|
507
526
|
break;
|
|
508
527
|
}
|
|
509
528
|
}
|
|
510
|
-
|
|
511
529
|
render(): JSX.Element {
|
|
512
530
|
const {
|
|
513
531
|
id,
|
|
@@ -516,6 +534,7 @@ export default class AutoComplete extends Component<AutoCompleteProps, State> {
|
|
|
516
534
|
name,
|
|
517
535
|
placeholder,
|
|
518
536
|
required,
|
|
537
|
+
hint,
|
|
519
538
|
tNoResults,
|
|
520
539
|
tStatusQueryTooShort,
|
|
521
540
|
tStatusNoResults,
|
|
@@ -550,7 +569,7 @@ export default class AutoComplete extends Component<AutoCompleteProps, State> {
|
|
|
550
569
|
selectedOptionText &&
|
|
551
570
|
selectedOptionText.toLowerCase().indexOf(query.toLowerCase()) === 0;
|
|
552
571
|
const hintValue =
|
|
553
|
-
optionBeginsWithQuery && autoselect
|
|
572
|
+
optionBeginsWithQuery && (autoselect || hint)
|
|
554
573
|
? query + selectedOptionText.substr(query.length)
|
|
555
574
|
: '';
|
|
556
575
|
|
|
@@ -646,12 +665,7 @@ export default class AutoComplete extends Component<AutoCompleteProps, State> {
|
|
|
646
665
|
tSelectedOption={tStatusSelectedOption}
|
|
647
666
|
tResults={tStatusResults}
|
|
648
667
|
/>
|
|
649
|
-
|
|
650
|
-
{hintValue && (placeholder === '' || !placeholder) && (
|
|
651
|
-
<AutoCompleteInputTypeahead value={hintValue} />
|
|
652
|
-
)}
|
|
653
|
-
|
|
654
|
-
{multiple ? (
|
|
668
|
+
{multiple && !autoselect ? (
|
|
655
669
|
<AutoCompleteMultipleInputContainer
|
|
656
670
|
isFocused={componentIsFocused}
|
|
657
671
|
numberOfSelected={this.props.numberOfSelected}
|
|
@@ -711,7 +725,7 @@ export default class AutoComplete extends Component<AutoCompleteProps, State> {
|
|
|
711
725
|
onChange={this.handleInputChange}
|
|
712
726
|
onFocus={this.handleInputFocus}
|
|
713
727
|
name={name}
|
|
714
|
-
placeholder={placeholder}
|
|
728
|
+
placeholder={hintValue || placeholder}
|
|
715
729
|
ref={(inputElement) => {
|
|
716
730
|
this.elementReferences[-1] = inputElement;
|
|
717
731
|
}}
|
|
@@ -732,7 +746,7 @@ export default class AutoComplete extends Component<AutoCompleteProps, State> {
|
|
|
732
746
|
this.setState({
|
|
733
747
|
menuOpen: optionsAvailable,
|
|
734
748
|
options,
|
|
735
|
-
selected:
|
|
749
|
+
selected: -1,
|
|
736
750
|
validChoiceMade: false,
|
|
737
751
|
});
|
|
738
752
|
});
|
|
@@ -787,7 +801,7 @@ export default class AutoComplete extends Component<AutoCompleteProps, State> {
|
|
|
787
801
|
onChange={this.handleInputChange}
|
|
788
802
|
onFocus={this.handleInputFocus}
|
|
789
803
|
name={name}
|
|
790
|
-
placeholder={placeholder}
|
|
804
|
+
placeholder={hintValue || placeholder}
|
|
791
805
|
ref={(inputElement) => {
|
|
792
806
|
this.elementReferences[-1] = inputElement;
|
|
793
807
|
}}
|
|
@@ -823,7 +837,6 @@ export default class AutoComplete extends Component<AutoCompleteProps, State> {
|
|
|
823
837
|
export {
|
|
824
838
|
AutoComplete,
|
|
825
839
|
AutoCompleteInputBase,
|
|
826
|
-
AutoCompleteInputTypeahead,
|
|
827
840
|
AutoCompleteResultList,
|
|
828
841
|
AutoCompleteResultListItem,
|
|
829
842
|
AutoCompleteContainer,
|
package/src/form/Button/doc.mdx
CHANGED
|
@@ -10,36 +10,47 @@ application or saving their information.
|
|
|
10
10
|
|
|
11
11
|
## How to use
|
|
12
12
|
|
|
13
|
-
### Default buttons
|
|
14
13
|
|
|
15
14
|
Use a default button for the main call to action on a page.
|
|
16
15
|
|
|
17
16
|
<code src="@digigov/ui/form/Button/__stories__/Primary.tsx" />
|
|
18
17
|
|
|
19
|
-
|
|
18
|
+
Avoid using multiple default buttons on a single page. Having more than on main
|
|
19
|
+
call to action reduces their impact, and makes it harder for users to know what
|
|
20
|
+
to do next.
|
|
21
|
+
|
|
22
|
+
### Start button - Call To Action
|
|
20
23
|
|
|
21
24
|
Use a start button for the main call to action on your service’s start page. Start buttons do not submit form data, so they use a link tag rather than a button tag.
|
|
22
25
|
|
|
23
26
|
<code src="@digigov/ui/form/Button/__stories__/CallToActionButton.tsx" />
|
|
24
27
|
|
|
25
|
-
### Secondary
|
|
28
|
+
### Secondary color
|
|
26
29
|
|
|
27
30
|
Use secondary buttons for secondary calls to action on a page.
|
|
28
31
|
|
|
29
32
|
<code src="@digigov/ui/form/Button/__stories__/Secondary.tsx" />
|
|
30
33
|
|
|
31
|
-
### Warning
|
|
34
|
+
### Warning color
|
|
32
35
|
|
|
33
36
|
Warning buttons are designed to make users think carefully before they use them. They only work if used very sparingly. Most services should not need one.
|
|
34
37
|
|
|
35
38
|
<code src="@digigov/ui/form/Button/__stories__/Warning.tsx" />
|
|
36
39
|
|
|
37
|
-
###
|
|
40
|
+
### Link variant
|
|
41
|
+
|
|
42
|
+
<code src="@digigov/ui/form/Button/__stories__/WithVariantLink.tsx" />
|
|
43
|
+
|
|
44
|
+
### Disabled
|
|
38
45
|
|
|
39
46
|
Disabled buttons have poor contrast and can confuse some users, so avoid them if possible.
|
|
40
47
|
|
|
41
48
|
<code src="@digigov/ui/form/Button/__stories__/Disabled.tsx" />
|
|
42
49
|
|
|
50
|
+
### Dense
|
|
51
|
+
|
|
52
|
+
<code src="@digigov/ui/form/Button/__stories__/Dense.tsx" />
|
|
53
|
+
|
|
43
54
|
### Grouping buttons
|
|
44
55
|
|
|
45
56
|
Use a button group when two or more buttons are placed together.
|
|
@@ -71,15 +82,17 @@ For example, `Add another address` and `Accept and claim a tax refund`.
|
|
|
71
82
|
|
|
72
83
|
Align the primary action button to the left edge of your form.
|
|
73
84
|
|
|
74
|
-
##
|
|
85
|
+
## More buttons
|
|
75
86
|
|
|
76
|
-
|
|
87
|
+
### Back link button
|
|
77
88
|
|
|
78
|
-
<code src="@digigov/ui/form/Button/__stories__/
|
|
89
|
+
<code src="@digigov/ui/form/Button/__stories__/Back.tsx" />
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
### Theme toggle button
|
|
93
|
+
|
|
94
|
+
<code src="@digigov/ui/form/Button/__stories__/ThemeToggle.tsx" />
|
|
79
95
|
|
|
80
|
-
Avoid using multiple default buttons on a single page. Having more than on main
|
|
81
|
-
call to action reduces their impact, and makes it harder for users to know what
|
|
82
|
-
to do next.
|
|
83
96
|
|
|
84
97
|
## Accessibility
|
|
85
98
|
|
|
@@ -88,9 +101,7 @@ implementation in the ARIA Authoring Practices Guide (APG) at [button](https://w
|
|
|
88
101
|
|
|
89
102
|
## API
|
|
90
103
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
See below for a complete reference to all of the props available to the components mentioned here.
|
|
104
|
+
See below for a complete reference to all of the props available to the components mentioned here.
|
|
94
105
|
|
|
95
106
|
<ComponentProps componentName={["Button","ButtonLink","CallToAction","ButtonGroup"]} />
|
|
96
107
|
|
|
@@ -37,7 +37,7 @@ Error messages should be styled like this:
|
|
|
37
37
|
|
|
38
38
|
<code src="@digigov/ui/form/Checkbox/__stories__/WithErrorMessage.tsx" />
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
### Conditionally revealing a related question
|
|
41
41
|
|
|
42
42
|
You can ask the user a related question when they select a particular checkbox, so they only see the question when it’s relevant to them.
|
|
43
43
|
|
|
@@ -10,3 +10,4 @@ export default {
|
|
|
10
10
|
};
|
|
11
11
|
export { Default } from '@digigov/ui/form/FileUpload/__stories__/Default';
|
|
12
12
|
export { WithErrorMessage } from '@digigov/ui/form/FileUpload/__stories__/WithErrorMessage';
|
|
13
|
+
export { WithVariantLink } from '@digigov/ui/form/FileUpload/__stories__/WithVariantLink';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
FieldContainer,
|
|
5
|
+
Fieldset,
|
|
6
|
+
FieldsetLegend,
|
|
7
|
+
} from '@digigov/ui/form/FieldContainer';
|
|
8
|
+
|
|
9
|
+
import { FileUpload } from '@digigov/ui/form/FileUpload';
|
|
10
|
+
import { Hint } from '@digigov/ui/typography/Hint';
|
|
11
|
+
|
|
12
|
+
export const WithVariantLink = () => (
|
|
13
|
+
<FieldContainer>
|
|
14
|
+
<Fieldset>
|
|
15
|
+
<FieldsetLegend size="md">Λογότυπο επιχείρησης</FieldsetLegend>
|
|
16
|
+
<Hint id="file-hint">Το αρχείο μπορεί να είναι png ή jpeg.</Hint>
|
|
17
|
+
<FileUpload aria-describedby="file-hint" variant="link">
|
|
18
|
+
Επιλογή αρχείου
|
|
19
|
+
</FileUpload>
|
|
20
|
+
</Fieldset>
|
|
21
|
+
</FieldContainer>
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
export default WithVariantLink;
|
|
@@ -3,6 +3,7 @@ import { test, expect } from '@playwright/experimental-ct-react';
|
|
|
3
3
|
import TestVariant from '@digigov/ui/utils/TestVariant'
|
|
4
4
|
import { Default } from '@digigov/ui/form/FileUpload/__stories__/Default';
|
|
5
5
|
import { WithErrorMessage } from '@digigov/ui/form/FileUpload/__stories__/WithErrorMessage';
|
|
6
|
+
import { WithVariantLink } from '@digigov/ui/form/FileUpload/__stories__/WithVariantLink';
|
|
6
7
|
|
|
7
8
|
test('renders the All FileUpload variants', async ({ mount, page }) => {
|
|
8
9
|
await mount(
|
|
@@ -14,6 +15,9 @@ test('renders the All FileUpload variants', async ({ mount, page }) => {
|
|
|
14
15
|
<TestVariant title="WithErrorMessage">
|
|
15
16
|
<WithErrorMessage />
|
|
16
17
|
</TestVariant>
|
|
18
|
+
<TestVariant title="WithVariantLink">
|
|
19
|
+
<WithVariantLink />
|
|
20
|
+
</TestVariant>
|
|
17
21
|
</div>
|
|
18
22
|
)
|
|
19
23
|
await page.evaluate(() => document.fonts.ready);
|
|
@@ -19,20 +19,20 @@ If you’re asking more than one question on the page, you can display the quest
|
|
|
19
19
|
|
|
20
20
|
<code src="@digigov/ui/form/RadioContainer/__stories__/Inline.tsx" />
|
|
21
21
|
|
|
22
|
-
###
|
|
22
|
+
### Radio items with hints
|
|
23
23
|
|
|
24
|
-
You can add hints to
|
|
24
|
+
You can add hints to radio items to provide additional information about the options.
|
|
25
25
|
|
|
26
26
|
<code src="@digigov/ui/form/RadioContainer/__stories__/WithHints.tsx" />
|
|
27
27
|
|
|
28
|
-
###
|
|
28
|
+
### Radio items with a text divider
|
|
29
29
|
|
|
30
30
|
If one or more of your radio options is different from the others, it can help users if you separate them using a text divider.
|
|
31
31
|
The text is usually the word ‘or’.
|
|
32
32
|
|
|
33
33
|
<code src="@digigov/ui/form/RadioContainer/__stories__/NoneAnswer.tsx" />
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
### Conditionally revealing a related question
|
|
36
36
|
|
|
37
37
|
You can ask the user a related question when they select a particular checkbox, so they only see the question when it’s relevant to them.
|
|
38
38
|
|
package/src/i18n/locales/el.ts
CHANGED
|
@@ -14,10 +14,11 @@ export default {
|
|
|
14
14
|
string: 'Το πεδίο πρέπει να είναι string',
|
|
15
15
|
email: 'Συμπληρώστε μια έγκυρη ηλεκτρονική διεύθυνση (e-mail).',
|
|
16
16
|
afm: 'Ο Α.Φ.Μ που πληκτρολογήσατε είναι λανθασμένος.',
|
|
17
|
+
amka: 'Ο ΑΜΚΑ που συμπληρώσατε δεν είναι έγκυρος.',
|
|
17
18
|
file_size:
|
|
18
|
-
'Το μέγεθος του αρχείου είναι μεγαλύτερο
|
|
19
|
+
'Το μέγεθος του αρχείου είναι μεγαλύτερο από το επιτρεπόμενο ({{maxSize}}).',
|
|
19
20
|
image_size:
|
|
20
|
-
'Το μέγεθος της φωτογραφίας είναι μεγαλύτερο
|
|
21
|
+
'Το μέγεθος της φωτογραφίας είναι μεγαλύτερο από το επιτρεπόμενο ({{maxSize}}).',
|
|
21
22
|
mobile_phone: 'Συμπληρώστε έναν έγκυρο αριθμό κινητού τηλεφώνου.',
|
|
22
23
|
phone_number: 'Συμπληρώστε έναν έγκυρο αριθμό τηλεφώνου.',
|
|
23
24
|
landline: 'Συμπληρώστε έναν έγκυρο αριθμό σταθερού τηλεφώνου.',
|
|
@@ -34,36 +35,86 @@ export default {
|
|
|
34
35
|
date: {
|
|
35
36
|
invalid: 'Η ημερομηνία πρέπει να είναι έγκυρη.',
|
|
36
37
|
invalid_month_year:
|
|
37
|
-
'Η ημερομηνία πρέπει να
|
|
38
|
+
'Η ημερομηνία πρέπει να περιλαμβάνει τον μήνα και το έτος.',
|
|
38
39
|
invalid_day_year:
|
|
39
|
-
'Η ημερομηνία πρέπει να
|
|
40
|
+
'Η ημερομηνία πρέπει να περιλαμβάνει την ημέρα και το έτος.',
|
|
40
41
|
invalid_day_month:
|
|
41
|
-
'Η ημερομηνία πρέπει να
|
|
42
|
-
invalid_day: 'Η ημερομηνία πρέπει να
|
|
43
|
-
invalid_month: 'Η ημερομηνία πρέπει να
|
|
44
|
-
invalid_year: 'Η ημερομηνία πρέπει να
|
|
42
|
+
'Η ημερομηνία πρέπει να περιλαμβάνει την ημέρα και τον μήνα.',
|
|
43
|
+
invalid_day: 'Η ημερομηνία πρέπει να περιλαμβάνει την ημέρα.',
|
|
44
|
+
invalid_month: 'Η ημερομηνία πρέπει να περιλαμβάνει τον μήνα.',
|
|
45
|
+
invalid_year: 'Η ημερομηνία πρέπει να περιλαμβάνει το ετος.',
|
|
45
46
|
earlier_than: 'Συμπληρώστε μια ημερομηνία προγενέστερη της {{maxDate}}',
|
|
46
47
|
later_than: 'Συμπληρώστε μια ημερομηνία μεταγενέστερη της {{minDate}}',
|
|
48
|
+
invalid_day_range: 'Η ημέρα πρέπει να είναι μεταξύ 1 και {{maxDay}}.',
|
|
49
|
+
invalid_month_range: 'Ο μήνας πρέπει να είναι μεταξύ 1 και 12.',
|
|
47
50
|
},
|
|
48
51
|
datetime: {
|
|
49
52
|
invalid: 'Η ημερομηνία και ώρα πρέπει να είναι έγκυρη.',
|
|
53
|
+
invalid_month_year_hours_minutes:
|
|
54
|
+
'Η ημερομηνία πρέπει να περιλαμβάνει τον μήνα, το έτος, την ώρα και τα λεπτά.',
|
|
55
|
+
invalid_day_year_hours_minutes:
|
|
56
|
+
'Η ημερομηνία πρέπει να περιλαμβάνει την ημέρα, το έτος, την ώρα και τα λεπτά.',
|
|
57
|
+
invalid_day_month_hours_minutes:
|
|
58
|
+
'Η ημερομηνία πρέπει να περιλαμβάνει την ημέρα, τον μήνα, την ώρα και τα λεπτά.',
|
|
59
|
+
invalid_year_hours_minutes:
|
|
60
|
+
'Η ημερομηνία πρέπει να περιλαμβάνει το έτος, την ώρα και τα λεπτά.',
|
|
61
|
+
invalid_month_hours_minutes:
|
|
62
|
+
'Η ημερομηνία πρέπει να περιλαμβάνει τον μήνα, την ώρα και τα λεπτά.',
|
|
63
|
+
invalid_day_hours_minutes:
|
|
64
|
+
'Η ημερομηνία πρέπει να περιλαμβάνει την ημέρα, την ώρα και τα λεπτά.',
|
|
65
|
+
invalid__hours_minutes:
|
|
66
|
+
'Η ημερομηνία πρέπει να περιλαμβάνει την ώρα και τα λεπτά.',
|
|
67
|
+
invalid_minutes: 'Η ημερομηνία πρέπει να περιλαμβάνει τα λεπτά.',
|
|
68
|
+
invalid_hours: 'Η ημερομηνία πρέπει να περιλαμβάνει την ώρα.',
|
|
69
|
+
invalid_month_year_minutes:
|
|
70
|
+
'Η ημερομηνία πρέπει να περιλαμβάνει τον μήνα, το έτος και τα λεπτά.',
|
|
71
|
+
invalid_month_year_hours:
|
|
72
|
+
'Η ημερομηνία πρέπει να περιλαμβάνει τον μήνα, το έτος και την ώρα.',
|
|
50
73
|
invalid_month_year:
|
|
51
|
-
'Η ημερομηνία πρέπει να
|
|
74
|
+
'Η ημερομηνία πρέπει να περιλαμβάνει τον μήνα και το έτος.',
|
|
75
|
+
invalid_day_year_minutes:
|
|
76
|
+
'Η ημερομηνία πρέπει να περιλαμβάνει την ημέρα, το έτος και τα λεπτά.',
|
|
77
|
+
invalid_day_year_hours:
|
|
78
|
+
'Η ημερομηνία πρέπει να περιλαμβάνει την ημέρα, το έτος και την ώρα.',
|
|
79
|
+
invalid_day_month_year:
|
|
80
|
+
'Η ημερομηνία πρέπει να περιλαμβάνει την ημέρα, τον μήνα και το έτος.',
|
|
81
|
+
invalid_day_month_year_hours:
|
|
82
|
+
'Η ημερομηνία πρέπει να περιλαμβάνει την ημέρα, τον μήνα, το έτος και την ώρα.',
|
|
52
83
|
invalid_day_year:
|
|
53
|
-
'Η ημερομηνία πρέπει να
|
|
84
|
+
'Η ημερομηνία πρέπει να περιλαμβάνει την ημέρα και το έτος.',
|
|
85
|
+
invalid_day_month_minutes:
|
|
86
|
+
'Η ημερομηνία πρέπει να περιλαμβάνει την ημέρα, τον μήνα και τα λεπτά.',
|
|
87
|
+
invalid_day_month_hours:
|
|
88
|
+
'Η ημερομηνία πρέπει να περιλαμβάνει την ημέρα, τον μήνα και την ώρα.',
|
|
54
89
|
invalid_day_month:
|
|
55
|
-
'Η ημερομηνία πρέπει να
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
90
|
+
'Η ημερομηνία πρέπει να περιλαμβάνει την ημέρα και τον μήνα.',
|
|
91
|
+
invalid_year_minutes:
|
|
92
|
+
'Η ημερομηνία πρέπει να περιλαμβάνει το έτος και τα λεπτά.',
|
|
93
|
+
invalid_year_hours:
|
|
94
|
+
'Η ημερομηνία πρέπει να περιλαμβάνει το έτος και την ώρα.',
|
|
95
|
+
invalid_year: 'Η ημερομηνία πρέπει να περιλαμβάνει το έτος.',
|
|
96
|
+
invalid_month_minutes:
|
|
97
|
+
'Η ημερομηνία πρέπει να περιλαμβάνει τον μήνα και τα λεπτά.',
|
|
98
|
+
invalid_month_hours:
|
|
99
|
+
'Η ημερομηνία πρέπει να περιλαμβάνει τον μήνα και την ώρα.',
|
|
100
|
+
invalid_month: 'Η ημερομηνία πρέπει να περιλαμβάνει τον μήνα.',
|
|
101
|
+
invalid_day_minutes:
|
|
102
|
+
'Η ημερομηνία πρέπει να περιλαμβάνει την ημέρα και τα λεπτά.',
|
|
103
|
+
invalid_day_hours:
|
|
104
|
+
'Η ημερομηνία πρέπει να περιλαμβάνει την ημέρα και την ώρα.',
|
|
105
|
+
invalid_day: 'Η ημερομηνία πρέπει να περιλαμβάνει την ημέρα.',
|
|
61
106
|
invalid_hours_range: 'Η ώρα πρέπει να είναι μεταξύ 0 και 23.',
|
|
62
107
|
invalid_minutes_range: 'Τα λεπτά πρέπει να είναι μεταξύ 0 και 59.',
|
|
108
|
+
invalid_day_range: 'Η ημέρα πρέπει να είναι μεταξύ 1 και {{maxDay}}.',
|
|
109
|
+
invalid_month_range: 'Ο μήνας πρέπει να είναι μεταξύ 1 και 12.',
|
|
110
|
+
invalid_day_month_year_minutes:
|
|
111
|
+
'Η ημερομηννία πρέπει να περιλαμβάνει την ημέρα, τον μήνα και το έτος κ τα λεπτά.',
|
|
112
|
+
invalid_hours_minutes:
|
|
113
|
+
'Η ημερομηνία πρέπει να περιλαμβάνει την ώρα και τα λεπτά.',
|
|
63
114
|
earlier_than:
|
|
64
|
-
'Συμπληρώστε ημερομηνία και ώρα προγενέστερη της {{maxDateTime}}',
|
|
115
|
+
'Συμπληρώστε ημερομηνία και ώρα προγενέστερη της {{maxDateTime}}.',
|
|
65
116
|
later_than:
|
|
66
|
-
'Συμπληρώστε ημερομηνία και ώρα μεταγενέστερη της {{minDateTime}}',
|
|
117
|
+
'Συμπληρώστε ημερομηνία και ώρα μεταγενέστερη της {{minDateTime}}.',
|
|
67
118
|
},
|
|
68
119
|
otp: {
|
|
69
120
|
invalid: 'Ο κωδικός που έχετε εισάγει είναι λάθος.',
|
|
@@ -134,14 +185,14 @@ export default {
|
|
|
134
185
|
},
|
|
135
186
|
upload: {
|
|
136
187
|
file: 'Αρχείο',
|
|
188
|
+
image: 'Εικόνα',
|
|
137
189
|
choose_file: 'Επιλογή αρχείου',
|
|
138
190
|
change_file: 'Αντικατάσταση αρχείου',
|
|
139
191
|
no_file: 'Δεν έχετε επιλέξει αρχείο',
|
|
140
192
|
reset_file: 'Αφαίρεση',
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
choose_image: 'Επιλογή φωτογραφίας',
|
|
193
|
+
no_image: 'Δεν έχετε επιλέξει εικόνα',
|
|
194
|
+
change_image: 'Αντικατάσταση εικόνας',
|
|
195
|
+
choose_image: 'Επιλογή εικόνας',
|
|
145
196
|
},
|
|
146
197
|
'copy-to-clipboard': {
|
|
147
198
|
message: 'Το κείμενο αντιγράφηκε επιτυχώς!',
|
package/src/i18n/locales/en.ts
CHANGED
|
@@ -14,8 +14,9 @@ export default {
|
|
|
14
14
|
string: 'This field must be a string',
|
|
15
15
|
email: 'Please enter a valid email address (e-mail).',
|
|
16
16
|
afm: 'The VAT number you entered is incorrect.',
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
amka: 'The SSN you entered is incorrect.',
|
|
18
|
+
file_size: 'File size is larger than allowed ({{maxSize}}).',
|
|
19
|
+
image_size: 'Image size is larger than allowed ({{maxSize}}).',
|
|
19
20
|
mobile_phone: 'Fill in a valid mobile phone number.',
|
|
20
21
|
landline: 'Fill in a valid landline phone number.',
|
|
21
22
|
phone_number: 'Fill in a valid phone number.',
|
|
@@ -37,21 +38,56 @@ export default {
|
|
|
37
38
|
invalid_day: 'Date must include day.',
|
|
38
39
|
invalid_month: 'Date must include month.',
|
|
39
40
|
invalid_year: 'Date must include year.',
|
|
41
|
+
invalid_day_range: 'Day must be between 1 and {{maxDay}}.',
|
|
42
|
+
invalid_month_range: 'Month must be between 1 and 12.',
|
|
40
43
|
},
|
|
41
44
|
datetime: {
|
|
42
45
|
invalid: 'Date and time must be valid.',
|
|
46
|
+
invalid_month_year_hours_minutes:
|
|
47
|
+
'Date must include month, year, hours, and minutes.',
|
|
48
|
+
invalid_day_year_hours_minutes:
|
|
49
|
+
'Date must include day, year, hours, and minutes.',
|
|
50
|
+
invalid_day_month_hours_minutes:
|
|
51
|
+
'Date must include day, month, hours, and minutes.',
|
|
52
|
+
invalid_year_hours_minutes:
|
|
53
|
+
'Date must include year, hours, and minutes.',
|
|
54
|
+
invalid_month_hours_minutes:
|
|
55
|
+
'Date must include month, hours, and minutes.',
|
|
56
|
+
invalid_day_hours_minutes: 'Date must include day, hours, and minutes.',
|
|
57
|
+
invalid__hours_minutes: 'Time must include hours and minutes.',
|
|
58
|
+
invalid_minutes: 'Please enter valid minutes.',
|
|
59
|
+
invalid_hours: 'Please enter valid hours.',
|
|
60
|
+
invalid_month_year_minutes:
|
|
61
|
+
'Date must include month, year, and minutes.',
|
|
62
|
+
invalid_month_year_hours: 'Date must include month, year, and hours.',
|
|
43
63
|
invalid_month_year: 'Date must include month and year.',
|
|
64
|
+
invalid_day_year_minutes: 'Date must include day, year, and minutes.',
|
|
65
|
+
invalid_day_year_hours: 'Date must include day, year, and hours.',
|
|
66
|
+
invalid_day_month_year: 'Date must include day, month, and year.',
|
|
67
|
+
invalid_day_month_year_hours:
|
|
68
|
+
'Date must include day, month, year, and hours.',
|
|
44
69
|
invalid_day_year: 'Date must include day and year.',
|
|
70
|
+
invalid_day_month_minutes: 'Date must include day, month, and minutes.',
|
|
71
|
+
invalid_day_month_hours: 'Date must include day, month, and hours.',
|
|
45
72
|
invalid_day_month: 'Date must include day and month.',
|
|
46
|
-
|
|
47
|
-
|
|
73
|
+
invalid_year_minutes: 'Date must include year and minutes.',
|
|
74
|
+
invalid_year_hours: 'Date must include year and hours.',
|
|
48
75
|
invalid_year: 'Date must include year.',
|
|
49
|
-
|
|
50
|
-
|
|
76
|
+
invalid_month_minutes: 'Date must include month and minutes.',
|
|
77
|
+
invalid_month_hours: 'Date must include month and hours.',
|
|
78
|
+
invalid_month: 'Date must include month.',
|
|
79
|
+
invalid_day_minutes: 'Date must include day and minutes.',
|
|
80
|
+
invalid_day_hours: 'Date must include day and hours.',
|
|
81
|
+
invalid_day: 'Date must include day.',
|
|
82
|
+
invalid_day_month_year_minutes:
|
|
83
|
+
'Date must include day, month,year and minutes.',
|
|
84
|
+
invalid_hours_minutes: 'Date must include hours and minutes.',
|
|
51
85
|
invalid_hours_range: 'Hours must be between 0 and 23.',
|
|
52
86
|
invalid_minutes_range: 'Minutes must be between 0 and 59.',
|
|
87
|
+
invalid_day_range: 'Day must be between 1 and {{maxDay}}.',
|
|
88
|
+
invalid_month_range: 'Month must be between 1 and 12.',
|
|
53
89
|
earlier_than: 'The date and time must be earlier than {{maxDateTime}}.',
|
|
54
|
-
later_than: 'The date and time must be later than {{minDateTime}}',
|
|
90
|
+
later_than: 'The date and time must be later than {{minDateTime}}.',
|
|
55
91
|
},
|
|
56
92
|
text: {
|
|
57
93
|
more_than: 'You have surpass the {{max}} characters limit.',
|