@dhis2-ui/file-input 10.16.2 → 10.16.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/package.json +10 -9
- package/src/file-input/__tests__/file-input.test.js +28 -0
- package/src/file-input/features/accepts_multiple_files/index.js +32 -0
- package/src/file-input/features/accepts_multiple_files.feature +8 -0
- package/src/file-input/features/can_be_blurred/index.js +23 -0
- package/src/file-input/features/can_be_blurred.feature +6 -0
- package/src/file-input/features/can_be_changed/index.js +26 -0
- package/src/file-input/features/can_be_changed.feature +8 -0
- package/src/file-input/features/can_be_focused/index.js +22 -0
- package/src/file-input/features/can_be_focused.feature +6 -0
- package/src/file-input/features/common/index.js +21 -0
- package/src/file-input/file-input.e2e.stories.js +46 -0
- package/src/file-input/file-input.js +159 -0
- package/src/file-input/file-input.prod.stories.js +82 -0
- package/src/file-input/index.js +1 -0
- package/src/file-input-field/__tests__/file-input-field.test.js +29 -0
- package/src/file-input-field/features/can_be_required/index.js +9 -0
- package/src/file-input-field/features/can_be_required.feature +5 -0
- package/src/file-input-field/features/has_default_button_label/index.js +9 -0
- package/src/file-input-field/features/has_default_button_label.feature +5 -0
- package/src/file-input-field/features/has_default_placeholder/index.js +9 -0
- package/src/file-input-field/features/has_default_placeholder.feature +5 -0
- package/src/file-input-field/file-input-field.e2e.stories.js +15 -0
- package/src/file-input-field/file-input-field.js +139 -0
- package/src/file-input-field/file-input-field.prod.stories.js +167 -0
- package/src/file-input-field/index.js +1 -0
- package/src/file-input-field-with-list/__tests__/file-input-field-with-list.test.js +30 -0
- package/src/file-input-field-with-list/features/common/index.js +18 -0
- package/src/file-input-field-with-list/features/deduplicates_the_file_list/index.js +43 -0
- package/src/file-input-field-with-list/features/deduplicates_the_file_list.feature +8 -0
- package/src/file-input-field-with-list/features/disables_button_when_full/index.js +13 -0
- package/src/file-input-field-with-list/features/disables_button_when_full.feature +6 -0
- package/src/file-input-field-with-list/features/displays_files_in_a_list/index.js +7 -0
- package/src/file-input-field-with-list/features/displays_files_in_a_list.feature +5 -0
- package/src/file-input-field-with-list/features/files_can_be_removed/index.js +24 -0
- package/src/file-input-field-with-list/features/files_can_be_removed.feature +7 -0
- package/src/file-input-field-with-list/features/has_default_button_label/index.js +9 -0
- package/src/file-input-field-with-list/features/has_default_button_label.feature +5 -0
- package/src/file-input-field-with-list/features/has_default_placeholder/index.js +9 -0
- package/src/file-input-field-with-list/features/has_default_placeholder.feature +5 -0
- package/src/file-input-field-with-list/features/has_default_remove_text/index.js +9 -0
- package/src/file-input-field-with-list/features/has_default_remove_text.feature +5 -0
- package/src/file-input-field-with-list/file-input-field-with-list.e2e.stories.js +73 -0
- package/src/file-input-field-with-list/file-input-field-with-list.js +188 -0
- package/src/file-input-field-with-list/file-input-field-with-list.prod.stories.js +67 -0
- package/src/file-input-field-with-list/file-list-item-with-remove.js +34 -0
- package/src/file-input-field-with-list/index.js +1 -0
- package/src/file-list/features/accepts_cancel_text/index.js +14 -0
- package/src/file-list/features/accepts_cancel_text.feature +5 -0
- package/src/file-list/features/accepts_label/index.js +11 -0
- package/src/file-list/features/accepts_label.feature +5 -0
- package/src/file-list/features/accepts_remove_text/index.js +11 -0
- package/src/file-list/features/accepts_remove_text.feature +5 -0
- package/src/file-list/features/can_be_removed/index.js +15 -0
- package/src/file-list/features/can_be_removed.feature +6 -0
- package/src/file-list/features/file-list-item-accepts_children/index.js +10 -0
- package/src/file-list/features/file-list-item-accepts_children.feature +5 -0
- package/src/file-list/features/file-list-placeholder-accepts_children/index.js +12 -0
- package/src/file-list/features/file-list-placeholder-accepts_children.feature +5 -0
- package/src/file-list/features/loading_can_be_cancelled/index.js +15 -0
- package/src/file-list/features/loading_can_be_cancelled.feature +6 -0
- package/src/file-list/file-list-item.e2e.stories.js +39 -0
- package/src/file-list/file-list-item.js +131 -0
- package/src/file-list/file-list-placeholder.e2e.stories.js +7 -0
- package/src/file-list/file-list-placeholder.js +27 -0
- package/src/file-list/file-list.e2e.stories.js +5 -0
- package/src/file-list/file-list.js +28 -0
- package/src/file-list/index.js +3 -0
- package/src/index.js +9 -0
- package/src/locales/ar/translations.json +5 -0
- package/src/locales/ar_IQ/translations.json +5 -0
- package/src/locales/ckb/translations.json +5 -0
- package/src/locales/cs/translations.json +5 -0
- package/src/locales/da/translations.json +5 -0
- package/src/locales/en/translations.json +5 -0
- package/src/locales/es/translations.json +5 -0
- package/src/locales/es_419/translations.json +5 -0
- package/src/locales/fr/translations.json +5 -0
- package/src/locales/hi_IN/translations.json +5 -0
- package/src/locales/id/translations.json +5 -0
- package/src/locales/index.js +82 -0
- package/src/locales/km/translations.json +5 -0
- package/src/locales/ko_KR/translations.json +5 -0
- package/src/locales/lo/translations.json +5 -0
- package/src/locales/my/translations.json +5 -0
- package/src/locales/nb/translations.json +5 -0
- package/src/locales/nl/translations.json +5 -0
- package/src/locales/prs/translations.json +5 -0
- package/src/locales/ps/translations.json +5 -0
- package/src/locales/pt/translations.json +5 -0
- package/src/locales/pt_BR/translations.json +5 -0
- package/src/locales/ru/translations.json +5 -0
- package/src/locales/si/translations.json +5 -0
- package/src/locales/sv/translations.json +5 -0
- package/src/locales/tet/translations.json +5 -0
- package/src/locales/tg/translations.json +5 -0
- package/src/locales/uk/translations.json +5 -0
- package/src/locales/ur/translations.json +5 -0
- package/src/locales/uz_Latn/translations.json +5 -0
- package/src/locales/uz_UZ_Cyrl/translations.json +5 -0
- package/src/locales/uz_UZ_Latn/translations.json +5 -0
- package/src/locales/vi/translations.json +5 -0
- package/src/locales/zh/translations.json +5 -0
- package/src/locales/zh_CN/translations.json +5 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import PropTypes from 'prop-types'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
|
|
4
|
+
const FileList = ({
|
|
5
|
+
children,
|
|
6
|
+
className,
|
|
7
|
+
dataTest = 'dhis2-uicore-filelist',
|
|
8
|
+
}) => (
|
|
9
|
+
<div className={className} data-test={dataTest}>
|
|
10
|
+
{children}
|
|
11
|
+
<style jsx>{`
|
|
12
|
+
div {
|
|
13
|
+
padding-top: 4px;
|
|
14
|
+
}
|
|
15
|
+
:global(.file-input) + div {
|
|
16
|
+
padding-top: 0;
|
|
17
|
+
}
|
|
18
|
+
`}</style>
|
|
19
|
+
</div>
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
FileList.propTypes = {
|
|
23
|
+
children: PropTypes.node,
|
|
24
|
+
className: PropTypes.string,
|
|
25
|
+
dataTest: PropTypes.string,
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export { FileList }
|
package/src/index.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { FileInput } from './file-input/index.js'
|
|
2
|
+
export {
|
|
3
|
+
FileList,
|
|
4
|
+
FileListItem,
|
|
5
|
+
FileListPlaceholder,
|
|
6
|
+
} from './file-list/index.js'
|
|
7
|
+
|
|
8
|
+
export { FileInputField } from './file-input-field/index.js'
|
|
9
|
+
export { FileInputFieldWithList } from './file-input-field-with-list/index.js'
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
//------------------------------------------------------------------------------
|
|
2
|
+
// <auto-generated>
|
|
3
|
+
// This code was generated by d2-i18n-generate.
|
|
4
|
+
//
|
|
5
|
+
// Changes to this file may cause incorrect behavior and will be lost if
|
|
6
|
+
// the code is regenerated.
|
|
7
|
+
// </auto-generated>
|
|
8
|
+
//------------------------------------------------------------------------------
|
|
9
|
+
import i18n from '@dhis2/d2-i18n'
|
|
10
|
+
|
|
11
|
+
import arTranslations from './ar/translations.json'
|
|
12
|
+
import ar_IQTranslations from './ar_IQ/translations.json'
|
|
13
|
+
import ckbTranslations from './ckb/translations.json'
|
|
14
|
+
import csTranslations from './cs/translations.json'
|
|
15
|
+
import daTranslations from './da/translations.json'
|
|
16
|
+
import enTranslations from './en/translations.json'
|
|
17
|
+
import esTranslations from './es/translations.json'
|
|
18
|
+
import es_419Translations from './es_419/translations.json'
|
|
19
|
+
import frTranslations from './fr/translations.json'
|
|
20
|
+
import hi_INTranslations from './hi_IN/translations.json'
|
|
21
|
+
import idTranslations from './id/translations.json'
|
|
22
|
+
import kmTranslations from './km/translations.json'
|
|
23
|
+
import ko_KRTranslations from './ko_KR/translations.json'
|
|
24
|
+
import loTranslations from './lo/translations.json'
|
|
25
|
+
import myTranslations from './my/translations.json'
|
|
26
|
+
import nbTranslations from './nb/translations.json'
|
|
27
|
+
import nlTranslations from './nl/translations.json'
|
|
28
|
+
import prsTranslations from './prs/translations.json'
|
|
29
|
+
import psTranslations from './ps/translations.json'
|
|
30
|
+
import ptTranslations from './pt/translations.json'
|
|
31
|
+
import pt_BRTranslations from './pt_BR/translations.json'
|
|
32
|
+
import ruTranslations from './ru/translations.json'
|
|
33
|
+
import siTranslations from './si/translations.json'
|
|
34
|
+
import svTranslations from './sv/translations.json'
|
|
35
|
+
import tetTranslations from './tet/translations.json'
|
|
36
|
+
import tgTranslations from './tg/translations.json'
|
|
37
|
+
import ukTranslations from './uk/translations.json'
|
|
38
|
+
import urTranslations from './ur/translations.json'
|
|
39
|
+
import uz_LatnTranslations from './uz_Latn/translations.json'
|
|
40
|
+
import uz_UZ_CyrlTranslations from './uz_UZ_Cyrl/translations.json'
|
|
41
|
+
import uz_UZ_LatnTranslations from './uz_UZ_Latn/translations.json'
|
|
42
|
+
import viTranslations from './vi/translations.json'
|
|
43
|
+
import zhTranslations from './zh/translations.json'
|
|
44
|
+
import zh_CNTranslations from './zh_CN/translations.json'
|
|
45
|
+
|
|
46
|
+
const namespace = 'default'
|
|
47
|
+
i18n.addResources('ar', namespace, arTranslations)
|
|
48
|
+
i18n.addResources('ar_IQ', namespace, ar_IQTranslations)
|
|
49
|
+
i18n.addResources('ckb', namespace, ckbTranslations)
|
|
50
|
+
i18n.addResources('cs', namespace, csTranslations)
|
|
51
|
+
i18n.addResources('da', namespace, daTranslations)
|
|
52
|
+
i18n.addResources('en', namespace, enTranslations)
|
|
53
|
+
i18n.addResources('es', namespace, esTranslations)
|
|
54
|
+
i18n.addResources('es_419', namespace, es_419Translations)
|
|
55
|
+
i18n.addResources('fr', namespace, frTranslations)
|
|
56
|
+
i18n.addResources('hi_IN', namespace, hi_INTranslations)
|
|
57
|
+
i18n.addResources('id', namespace, idTranslations)
|
|
58
|
+
i18n.addResources('km', namespace, kmTranslations)
|
|
59
|
+
i18n.addResources('ko_KR', namespace, ko_KRTranslations)
|
|
60
|
+
i18n.addResources('lo', namespace, loTranslations)
|
|
61
|
+
i18n.addResources('my', namespace, myTranslations)
|
|
62
|
+
i18n.addResources('nb', namespace, nbTranslations)
|
|
63
|
+
i18n.addResources('nl', namespace, nlTranslations)
|
|
64
|
+
i18n.addResources('prs', namespace, prsTranslations)
|
|
65
|
+
i18n.addResources('ps', namespace, psTranslations)
|
|
66
|
+
i18n.addResources('pt', namespace, ptTranslations)
|
|
67
|
+
i18n.addResources('pt_BR', namespace, pt_BRTranslations)
|
|
68
|
+
i18n.addResources('ru', namespace, ruTranslations)
|
|
69
|
+
i18n.addResources('si', namespace, siTranslations)
|
|
70
|
+
i18n.addResources('sv', namespace, svTranslations)
|
|
71
|
+
i18n.addResources('tet', namespace, tetTranslations)
|
|
72
|
+
i18n.addResources('tg', namespace, tgTranslations)
|
|
73
|
+
i18n.addResources('uk', namespace, ukTranslations)
|
|
74
|
+
i18n.addResources('ur', namespace, urTranslations)
|
|
75
|
+
i18n.addResources('uz_Latn', namespace, uz_LatnTranslations)
|
|
76
|
+
i18n.addResources('uz_UZ_Cyrl', namespace, uz_UZ_CyrlTranslations)
|
|
77
|
+
i18n.addResources('uz_UZ_Latn', namespace, uz_UZ_LatnTranslations)
|
|
78
|
+
i18n.addResources('vi', namespace, viTranslations)
|
|
79
|
+
i18n.addResources('zh', namespace, zhTranslations)
|
|
80
|
+
i18n.addResources('zh_CN', namespace, zh_CNTranslations)
|
|
81
|
+
|
|
82
|
+
export default i18n
|