@dxc-technology/halstack-react 0.0.0-e961efe → 0.0.0-e9cf865
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/BackgroundColorContext.d.ts +10 -0
- package/BackgroundColorContext.js +48 -0
- package/ThemeContext.d.ts +15 -0
- package/ThemeContext.js +243 -0
- package/{dist/V3Select → V3Select}/V3Select.js +35 -129
- package/{dist/V3Select → V3Select}/index.d.ts +0 -0
- package/{dist/V3Textarea → V3Textarea}/V3Textarea.js +12 -16
- package/{dist/V3Textarea → V3Textarea}/index.d.ts +0 -0
- package/accordion/Accordion.d.ts +4 -0
- package/{dist/accordion → accordion}/Accordion.js +37 -132
- package/accordion/types.d.ts +68 -0
- package/accordion/types.js +5 -0
- package/accordion-group/AccordionGroup.d.ts +7 -0
- package/accordion-group/AccordionGroup.js +170 -0
- package/accordion-group/AccordionGroup.stories.tsx +225 -0
- package/accordion-group/types.d.ts +72 -0
- package/accordion-group/types.js +5 -0
- package/alert/Alert.d.ts +4 -0
- package/{dist/alert → alert}/Alert.js +40 -153
- package/alert/Alert.stories.tsx +170 -0
- package/alert/types.d.ts +49 -0
- package/alert/types.js +5 -0
- package/badge/Badge.js +59 -0
- package/box/Box.d.ts +4 -0
- package/{dist/box → box}/Box.js +15 -45
- package/box/Box.stories.tsx +132 -0
- package/box/types.d.ts +43 -0
- package/box/types.js +5 -0
- package/button/Button.d.ts +4 -0
- package/{dist/button → button}/Button.js +24 -83
- package/button/Button.stories.tsx +276 -0
- package/button/types.d.ts +57 -0
- package/button/types.js +5 -0
- package/card/Card.d.ts +4 -0
- package/{dist/card → card}/Card.js +34 -124
- package/card/Card.stories.tsx +201 -0
- package/card/ice-cream.jpg +0 -0
- package/card/types.d.ts +67 -0
- package/card/types.js +5 -0
- package/checkbox/Checkbox.d.ts +4 -0
- package/{dist/checkbox → checkbox}/Checkbox.js +15 -61
- package/checkbox/Checkbox.stories.tsx +192 -0
- package/checkbox/types.d.ts +60 -0
- package/checkbox/types.js +5 -0
- package/chip/Chip.d.ts +4 -0
- package/{dist/chip → chip}/Chip.js +18 -84
- package/chip/Chip.stories.tsx +121 -0
- package/chip/types.d.ts +53 -0
- package/chip/types.js +5 -0
- package/{dist/common → common}/OpenSans.css +0 -0
- package/{dist/common → common}/RequiredComponent.js +3 -11
- package/{dist/common → common}/fonts/OpenSans-Bold.ttf +0 -0
- package/{dist/common → common}/fonts/OpenSans-BoldItalic.ttf +0 -0
- package/{dist/common → common}/fonts/OpenSans-ExtraBold.ttf +0 -0
- package/{dist/common → common}/fonts/OpenSans-ExtraBoldItalic.ttf +0 -0
- package/{dist/common → common}/fonts/OpenSans-Italic.ttf +0 -0
- package/{dist/common → common}/fonts/OpenSans-Light.ttf +0 -0
- package/{dist/common → common}/fonts/OpenSans-LightItalic.ttf +0 -0
- package/{dist/common → common}/fonts/OpenSans-Regular.ttf +0 -0
- package/{dist/common → common}/fonts/OpenSans-SemiBold.ttf +0 -0
- package/{dist/common → common}/fonts/OpenSans-SemiBoldItalic.ttf +0 -0
- package/{dist/common → common}/utils.js +0 -0
- package/{dist/common → common}/variables.js +88 -88
- package/{dist/date → date}/Date.js +17 -23
- package/{dist/date → date}/index.d.ts +0 -0
- package/date-input/DateInput.d.ts +4 -0
- package/{dist/date-input → date-input}/DateInput.js +26 -68
- package/date-input/DateInput.stories.tsx +138 -0
- package/date-input/types.d.ts +100 -0
- package/date-input/types.js +5 -0
- package/dialog/Dialog.d.ts +4 -0
- package/{dist/dialog → dialog}/Dialog.js +22 -75
- package/dialog/Dialog.stories.tsx +212 -0
- package/dialog/types.d.ts +43 -0
- package/dialog/types.js +5 -0
- package/dropdown/Dropdown.d.ts +4 -0
- package/{dist/dropdown → dropdown}/Dropdown.js +45 -172
- package/dropdown/types.d.ts +89 -0
- package/dropdown/types.js +5 -0
- package/file-input/FileInput.d.ts +4 -0
- package/{dist/file-input → file-input}/FileInput.js +98 -221
- package/file-input/FileItem.d.ts +14 -0
- package/file-input/FileItem.js +184 -0
- package/file-input/types.d.ts +112 -0
- package/file-input/types.js +5 -0
- package/footer/Footer.d.ts +4 -0
- package/footer/Footer.js +260 -0
- package/footer/Footer.stories.tsx +130 -0
- package/footer/Icons.d.ts +2 -0
- package/{dist/footer → footer}/Icons.js +15 -15
- package/footer/types.d.ts +65 -0
- package/footer/types.js +5 -0
- package/header/Header.d.ts +7 -0
- package/{dist/header → header}/Header.js +58 -204
- package/header/Header.stories.tsx +162 -0
- package/header/Icons.d.ts +2 -0
- package/{dist/header → header}/Icons.js +7 -32
- package/header/types.d.ts +47 -0
- package/header/types.js +5 -0
- package/heading/Heading.d.ts +4 -0
- package/{dist/heading → heading}/Heading.js +25 -96
- package/heading/Heading.stories.tsx +53 -0
- package/heading/types.d.ts +33 -0
- package/heading/types.js +5 -0
- package/{dist/input-text → input-text}/Icons.js +2 -2
- package/{dist/input-text → input-text}/InputText.js +38 -132
- package/{dist/input-text → input-text}/index.d.ts +1 -1
- package/layout/ApplicationLayout.d.ts +10 -0
- package/{dist/layout → layout}/ApplicationLayout.js +39 -141
- package/layout/ApplicationLayout.stories.tsx +171 -0
- package/{dist/layout → layout}/Icons.js +7 -7
- package/layout/types.d.ts +57 -0
- package/layout/types.js +5 -0
- package/link/Link.d.ts +3 -0
- package/{dist/link → link}/Link.js +19 -95
- package/link/Link.stories.tsx +146 -0
- package/link/types.d.ts +74 -0
- package/link/types.js +5 -0
- package/list/List.d.ts +7 -0
- package/list/List.js +37 -0
- package/list/List.stories.tsx +70 -0
- package/main.d.ts +48 -0
- package/{dist/main.js → main.js} +118 -82
- package/number-input/NumberInput.d.ts +4 -0
- package/number-input/NumberInput.js +83 -0
- package/number-input/NumberInput.stories.tsx +115 -0
- package/number-input/NumberInputContext.d.ts +4 -0
- package/{dist/number-input → number-input}/NumberInputContext.js +5 -2
- package/number-input/numberInputContextTypes.d.ts +19 -0
- package/number-input/numberInputContextTypes.js +5 -0
- package/number-input/types.d.ts +117 -0
- package/number-input/types.js +5 -0
- package/package.json +20 -17
- package/{dist/paginator → paginator}/Icons.js +9 -9
- package/paginator/Paginator.d.ts +4 -0
- package/paginator/Paginator.js +192 -0
- package/paginator/Paginator.stories.tsx +63 -0
- package/paginator/types.d.ts +38 -0
- package/paginator/types.js +5 -0
- package/password-input/PasswordInput.d.ts +4 -0
- package/{dist/password-input → password-input}/PasswordInput.js +37 -77
- package/password-input/PasswordInput.stories.tsx +131 -0
- package/password-input/types.d.ts +107 -0
- package/password-input/types.js +5 -0
- package/progress-bar/ProgressBar.d.ts +4 -0
- package/{dist/progress-bar → progress-bar}/ProgressBar.js +22 -94
- package/progress-bar/ProgressBar.stories.jsx +58 -0
- package/progress-bar/types.d.ts +37 -0
- package/progress-bar/types.js +5 -0
- package/radio/Radio.d.ts +4 -0
- package/{dist/radio → radio}/Radio.js +17 -52
- package/radio/Radio.stories.tsx +192 -0
- package/radio/types.d.ts +54 -0
- package/radio/types.js +5 -0
- package/resultsetTable/ResultsetTable.d.ts +4 -0
- package/{dist/resultsetTable → resultsetTable}/ResultsetTable.js +39 -146
- package/resultsetTable/types.d.ts +67 -0
- package/resultsetTable/types.js +5 -0
- package/row/Row.d.ts +11 -0
- package/row/Row.js +124 -0
- package/row/Row.stories.tsx +223 -0
- package/{dist/select → select}/Select.js +254 -487
- package/select/Select.stories.tsx +572 -0
- package/select/index.d.ts +131 -0
- package/sidenav/Sidenav.d.ts +9 -0
- package/{dist/sidenav → sidenav}/Sidenav.js +21 -64
- package/sidenav/Sidenav.stories.tsx +165 -0
- package/sidenav/types.d.ts +50 -0
- package/sidenav/types.js +5 -0
- package/slider/Slider.d.ts +4 -0
- package/{dist/slider → slider}/Slider.js +74 -161
- package/slider/Slider.stories.tsx +177 -0
- package/slider/types.d.ts +78 -0
- package/slider/types.js +5 -0
- package/spinner/Spinner.d.ts +4 -0
- package/spinner/Spinner.js +250 -0
- package/spinner/Spinner.stories.jsx +102 -0
- package/spinner/types.d.ts +32 -0
- package/spinner/types.js +5 -0
- package/stack/Stack.d.ts +10 -0
- package/stack/Stack.js +94 -0
- package/stack/Stack.stories.tsx +150 -0
- package/switch/Switch.d.ts +4 -0
- package/{dist/switch → switch}/Switch.js +28 -71
- package/switch/Switch.stories.tsx +160 -0
- package/switch/types.d.ts +58 -0
- package/switch/types.js +5 -0
- package/table/Table.d.ts +4 -0
- package/{dist/table → table}/Table.js +12 -26
- package/table/Table.stories.jsx +276 -0
- package/table/types.d.ts +21 -0
- package/table/types.js +5 -0
- package/tabs/Tabs.d.ts +4 -0
- package/tabs/Tabs.js +213 -0
- package/tabs/Tabs.stories.tsx +121 -0
- package/tabs/types.d.ts +70 -0
- package/tabs/types.js +5 -0
- package/tag/Tag.d.ts +4 -0
- package/tag/Tag.js +193 -0
- package/tag/Tag.stories.tsx +145 -0
- package/tag/types.d.ts +60 -0
- package/tag/types.js +5 -0
- package/text/Text.d.ts +7 -0
- package/text/Text.js +30 -0
- package/text/Text.stories.tsx +19 -0
- package/text-input/TextInput.d.ts +4 -0
- package/{dist/text-input → text-input}/TextInput.js +269 -457
- package/text-input/TextInput.stories.tsx +456 -0
- package/text-input/types.d.ts +159 -0
- package/text-input/types.js +5 -0
- package/{dist/textarea → textarea}/Textarea.js +40 -95
- package/textarea/Textarea.stories.jsx +135 -0
- package/{dist/textarea → textarea}/index.d.ts +18 -8
- package/{dist/toggle → toggle}/Toggle.js +16 -50
- package/{dist/toggle → toggle}/index.d.ts +0 -0
- package/toggle-group/ToggleGroup.d.ts +4 -0
- package/{dist/toggle-group → toggle-group}/ToggleGroup.js +30 -140
- package/toggle-group/ToggleGroup.stories.tsx +178 -0
- package/toggle-group/types.d.ts +84 -0
- package/toggle-group/types.js +5 -0
- package/{dist/upload → upload}/Upload.js +11 -15
- package/upload/buttons-upload/ButtonsUpload.js +111 -0
- package/{dist/upload → upload}/buttons-upload/Icons.js +7 -7
- package/upload/dragAndDropArea/DragAndDropArea.js +225 -0
- package/{dist/upload → upload}/dragAndDropArea/Icons.js +6 -6
- package/upload/file-upload/FileToUpload.js +115 -0
- package/{dist/upload → upload}/file-upload/Icons.js +13 -13
- package/{dist/upload → upload}/files-upload/FilesToUpload.js +13 -27
- package/{dist/upload → upload}/index.d.ts +0 -0
- package/{dist/upload → upload}/transaction/Icons.js +31 -31
- package/upload/transaction/Transaction.js +104 -0
- package/upload/transactions/Transactions.js +94 -0
- package/useTheme.d.ts +2 -0
- package/{dist/useTheme.js → useTheme.js} +1 -1
- package/{dist/wizard → wizard}/Icons.js +8 -8
- package/wizard/Wizard.d.ts +4 -0
- package/wizard/Wizard.js +231 -0
- package/wizard/Wizard.stories.jsx +224 -0
- package/wizard/types.d.ts +64 -0
- package/wizard/types.js +5 -0
- package/README.md +0 -66
- package/babel.config.js +0 -7
- package/dist/BackgroundColorContext.js +0 -46
- package/dist/ThemeContext.js +0 -250
- package/dist/accordion/index.d.ts +0 -28
- package/dist/accordion-group/AccordionGroup.js +0 -186
- package/dist/accordion-group/index.d.ts +0 -16
- package/dist/alert/index.d.ts +0 -51
- package/dist/badge/Badge.js +0 -63
- package/dist/box/index.d.ts +0 -25
- package/dist/button/index.d.ts +0 -24
- package/dist/card/index.d.ts +0 -22
- package/dist/checkbox/index.d.ts +0 -24
- package/dist/chip/index.d.ts +0 -22
- package/dist/date-input/index.d.ts +0 -95
- package/dist/dialog/index.d.ts +0 -18
- package/dist/dropdown/index.d.ts +0 -26
- package/dist/file-input/FileItem.js +0 -287
- package/dist/file-input/index.d.ts +0 -81
- package/dist/footer/Footer.js +0 -421
- package/dist/footer/index.d.ts +0 -25
- package/dist/header/index.d.ts +0 -25
- package/dist/heading/index.d.ts +0 -17
- package/dist/link/index.d.ts +0 -23
- package/dist/main.d.ts +0 -40
- package/dist/number-input/NumberInput.js +0 -136
- package/dist/number-input/index.d.ts +0 -113
- package/dist/paginator/Paginator.js +0 -305
- package/dist/paginator/index.d.ts +0 -20
- package/dist/password-input/index.d.ts +0 -94
- package/dist/progress-bar/index.d.ts +0 -18
- package/dist/radio/index.d.ts +0 -23
- package/dist/resultsetTable/index.d.ts +0 -19
- package/dist/select/index.d.ts +0 -53
- package/dist/sidenav/index.d.ts +0 -13
- package/dist/slider/index.d.ts +0 -29
- package/dist/spinner/Spinner.js +0 -381
- package/dist/spinner/index.d.ts +0 -17
- package/dist/stories/Button.js +0 -71
- package/dist/stories/Button.stories.js +0 -55
- package/dist/stories/Header.js +0 -67
- package/dist/stories/Header.stories.js +0 -31
- package/dist/stories/Introduction.stories.mdx +0 -211
- package/dist/stories/Page.js +0 -68
- package/dist/stories/Page.stories.js +0 -39
- package/dist/stories/assets/code-brackets.svg +0 -1
- package/dist/stories/assets/colors.svg +0 -1
- package/dist/stories/assets/comments.svg +0 -1
- package/dist/stories/assets/direction.svg +0 -1
- package/dist/stories/assets/flow.svg +0 -1
- package/dist/stories/assets/plugin.svg +0 -1
- package/dist/stories/assets/repo.svg +0 -1
- package/dist/stories/assets/stackalt.svg +0 -1
- package/dist/stories/button.css +0 -30
- package/dist/stories/header.css +0 -26
- package/dist/stories/page.css +0 -69
- package/dist/switch/index.d.ts +0 -24
- package/dist/table/index.d.ts +0 -13
- package/dist/tabs/Tabs.js +0 -343
- package/dist/tabs/index.d.ts +0 -19
- package/dist/tag/Tag.js +0 -282
- package/dist/tag/index.d.ts +0 -24
- package/dist/text-input/index.d.ts +0 -135
- package/dist/toggle-group/index.d.ts +0 -21
- package/dist/upload/buttons-upload/ButtonsUpload.js +0 -135
- package/dist/upload/dragAndDropArea/DragAndDropArea.js +0 -329
- package/dist/upload/file-upload/FileToUpload.js +0 -189
- package/dist/upload/transaction/Transaction.js +0 -148
- package/dist/upload/transactions/Transactions.js +0 -138
- package/dist/wizard/Wizard.js +0 -405
- package/dist/wizard/index.d.ts +0 -18
- package/test/Accordion.test.js +0 -33
- package/test/AccordionGroup.test.js +0 -125
- package/test/Alert.test.js +0 -53
- package/test/Box.test.js +0 -10
- package/test/Button.test.js +0 -18
- package/test/Card.test.js +0 -30
- package/test/Checkbox.test.js +0 -45
- package/test/Chip.test.js +0 -25
- package/test/Date.test.js +0 -395
- package/test/DateInput.test.js +0 -242
- package/test/Dialog.test.js +0 -23
- package/test/Dropdown.test.js +0 -145
- package/test/FileInput.test.js +0 -201
- package/test/Footer.test.js +0 -94
- package/test/Header.test.js +0 -34
- package/test/Heading.test.js +0 -83
- package/test/InputText.test.js +0 -239
- package/test/Link.test.js +0 -43
- package/test/NumberInput.test.js +0 -259
- package/test/Paginator.test.js +0 -181
- package/test/PasswordInput.test.js +0 -83
- package/test/ProgressBar.test.js +0 -35
- package/test/Radio.test.js +0 -37
- package/test/ResultsetTable.test.js +0 -330
- package/test/Select.test.js +0 -415
- package/test/Sidenav.test.js +0 -45
- package/test/Slider.test.js +0 -74
- package/test/Spinner.test.js +0 -32
- package/test/Switch.test.js +0 -45
- package/test/Table.test.js +0 -36
- package/test/Tabs.test.js +0 -109
- package/test/Tag.test.js +0 -32
- package/test/TextInput.test.js +0 -732
- package/test/Textarea.test.js +0 -193
- package/test/ToggleGroup.test.js +0 -85
- package/test/Upload.test.js +0 -60
- package/test/V3Select.test.js +0 -212
- package/test/V3TextArea.test.js +0 -51
- package/test/Wizard.test.js +0 -130
- package/test/mocks/pngMock.js +0 -1
- package/test/mocks/svgMock.js +0 -1
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
type Size = "small" | "medium" | "large" | "fillParent";
|
|
2
|
-
type Space = "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
|
|
3
|
-
type Margin = {
|
|
4
|
-
top?: Space;
|
|
5
|
-
bottom?: Space;
|
|
6
|
-
left?: Space;
|
|
7
|
-
right?: Space;
|
|
8
|
-
};
|
|
9
|
-
type SVG = string | (HTMLElement & SVGElement);
|
|
10
|
-
type Action = {
|
|
11
|
-
onClick: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
12
|
-
icon: SVG;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
type Props = {
|
|
16
|
-
/**
|
|
17
|
-
* Text to be placed above the input. This label will be used as the aria-label attribute of the list of suggestions.
|
|
18
|
-
*/
|
|
19
|
-
label?: string;
|
|
20
|
-
/**
|
|
21
|
-
* Name attribute of the input element.
|
|
22
|
-
*/
|
|
23
|
-
name?: string;
|
|
24
|
-
/**
|
|
25
|
-
* Value of the input. If undefined, the component will be uncontrolled and the value will be managed internally by the component.
|
|
26
|
-
*/
|
|
27
|
-
value?: string;
|
|
28
|
-
/**
|
|
29
|
-
* Helper text to be placed above the input.
|
|
30
|
-
*/
|
|
31
|
-
helperText?: string;
|
|
32
|
-
/**
|
|
33
|
-
* Text to be put as placeholder of the input.
|
|
34
|
-
*/
|
|
35
|
-
placeholder?: string;
|
|
36
|
-
/**
|
|
37
|
-
* Action to be shown in the input. This is an object composed of an onClick function and an icon,
|
|
38
|
-
* being the latter either an inline svg or a URL to the image.
|
|
39
|
-
*/
|
|
40
|
-
action?: Action;
|
|
41
|
-
/**
|
|
42
|
-
* If true, the input will have an action to clear the entered value.
|
|
43
|
-
*/
|
|
44
|
-
clearable?: boolean;
|
|
45
|
-
/**
|
|
46
|
-
* If true, the component will be disabled.
|
|
47
|
-
*/
|
|
48
|
-
disabled?: boolean;
|
|
49
|
-
/**
|
|
50
|
-
* If true, the input will be optional, showing '(Optional)'
|
|
51
|
-
* next to the label. Otherwise, the field will be considered required and an error will be
|
|
52
|
-
* passed as a parameter to the OnBlur and onChange functions when it has
|
|
53
|
-
* not been filled.
|
|
54
|
-
*/
|
|
55
|
-
optional?: boolean;
|
|
56
|
-
/**
|
|
57
|
-
* Prefix to be placed before the input value.
|
|
58
|
-
*/
|
|
59
|
-
prefix?: string;
|
|
60
|
-
/**
|
|
61
|
-
* Suffix to be placed after the input value.
|
|
62
|
-
*/
|
|
63
|
-
suffix?: string;
|
|
64
|
-
/**
|
|
65
|
-
* This function will be called when the user types within the input
|
|
66
|
-
* element of the component. An object including the current value and
|
|
67
|
-
* the error (if the value entered is not valid) will be passed to this
|
|
68
|
-
* function. If there is no error, error will be null.
|
|
69
|
-
*/
|
|
70
|
-
onChange?: (val: { value: string; error: string }) => void;
|
|
71
|
-
/**
|
|
72
|
-
* This function will be called when the input element loses the focus.
|
|
73
|
-
* An object including the input value and the error (if the value
|
|
74
|
-
* entered is not valid) will be passed to this function. If there is no error,
|
|
75
|
-
* error will be null.
|
|
76
|
-
*/
|
|
77
|
-
onBlur?: (obj: { value: string; error: string }) => void;
|
|
78
|
-
/**
|
|
79
|
-
* If it is defined, the component will change its appearance, showing
|
|
80
|
-
* the error below the input component. If it is not defined, the error
|
|
81
|
-
* messages will be managed internally, but never displayed on its own.
|
|
82
|
-
*/
|
|
83
|
-
error?: string;
|
|
84
|
-
/**
|
|
85
|
-
* These are the options to be displayed as suggestions. It can be either an array or a function:
|
|
86
|
-
* - Array: Array of options that will be filtered by the component.
|
|
87
|
-
* - Function: This function will be called when the user changes the value, we will send as a parameter the new value;
|
|
88
|
-
* apart from that this function should return one promise on which we should make 'then' to get the suggestions filtered.
|
|
89
|
-
*/
|
|
90
|
-
suggestions?: string[] | (() => void);
|
|
91
|
-
/**
|
|
92
|
-
* Regular expression that defines the valid format allowed by the input.
|
|
93
|
-
* This will be checked both when the input element loses the focus and
|
|
94
|
-
* while typing within it. If the string entered does not match the
|
|
95
|
-
* pattern, the onBlur and onChange functions will be called with the
|
|
96
|
-
* current value and an internal error informing that this value does not
|
|
97
|
-
* match the pattern. If the pattern is met, the error parameter of both
|
|
98
|
-
* events will be null.
|
|
99
|
-
*/
|
|
100
|
-
pattern?: string;
|
|
101
|
-
/**
|
|
102
|
-
* Specifies the minimun and maximum length allowed by the input.
|
|
103
|
-
* This will be checked both when the input element loses the
|
|
104
|
-
* focus and while typing within it. If the string entered does not
|
|
105
|
-
* comply the length, the onBlur and onChange functions will be called
|
|
106
|
-
* with the current value and an internal error informing that the value
|
|
107
|
-
* length does not comply the specified range. If a valid length is
|
|
108
|
-
* reached, the error parameter of both events will be null.
|
|
109
|
-
*/
|
|
110
|
-
length?: { min?: number; max?: number };
|
|
111
|
-
/**
|
|
112
|
-
* HTML autocomplete attribute. Lets the user specify if any permission the user agent has to provide automated assistance in filling out the input value.
|
|
113
|
-
* Its value must be one of all the possible values of the HTML autocomplete attribute: 'on', 'off', 'email', 'username', 'new-password', ...
|
|
114
|
-
*/
|
|
115
|
-
autocomplete?: string;
|
|
116
|
-
/**
|
|
117
|
-
* Size of the margin to be applied to the component ('xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge').
|
|
118
|
-
* You can pass an object with 'top', 'bottom', 'left' and 'right' properties in order to specify different margin sizes.
|
|
119
|
-
*/
|
|
120
|
-
margin?: Space | Margin;
|
|
121
|
-
/**
|
|
122
|
-
* Size of the component ('small' | 'medium' | 'large' | 'fillParent').
|
|
123
|
-
*/
|
|
124
|
-
size?: Size;
|
|
125
|
-
/**
|
|
126
|
-
* Value of the tabindex attribute.
|
|
127
|
-
*/
|
|
128
|
-
tabIndex?: number;
|
|
129
|
-
/**
|
|
130
|
-
* Reference to the component.
|
|
131
|
-
*/
|
|
132
|
-
ref?: React.RefObject<HTMLDivElement>;
|
|
133
|
-
};
|
|
134
|
-
|
|
135
|
-
export default function DxcTextInput(props: Props): JSX.Element;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
type Space = "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
|
|
2
|
-
type Margin = {
|
|
3
|
-
top?: Space;
|
|
4
|
-
bottom?: Space;
|
|
5
|
-
left?: Space;
|
|
6
|
-
right?: Space;
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
type Props = {
|
|
10
|
-
label?: string;
|
|
11
|
-
helperText?: string;
|
|
12
|
-
value?: any;
|
|
13
|
-
onChange?: void;
|
|
14
|
-
disabled?: boolean;
|
|
15
|
-
options?: any;
|
|
16
|
-
multiple?: boolean;
|
|
17
|
-
margin?: Space | Margin;
|
|
18
|
-
tabIndex?: number;
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export default function DxcToggleGroup(props: Props): JSX.Element;
|
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
|
4
|
-
|
|
5
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
6
|
-
|
|
7
|
-
Object.defineProperty(exports, "__esModule", {
|
|
8
|
-
value: true
|
|
9
|
-
});
|
|
10
|
-
exports["default"] = void 0;
|
|
11
|
-
|
|
12
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
13
|
-
|
|
14
|
-
var _react = _interopRequireDefault(require("react"));
|
|
15
|
-
|
|
16
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
17
|
-
|
|
18
|
-
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
19
|
-
|
|
20
|
-
var _Button = _interopRequireDefault(require("../../button/Button"));
|
|
21
|
-
|
|
22
|
-
var _Icons = require("./Icons");
|
|
23
|
-
|
|
24
|
-
var _useTheme = _interopRequireDefault(require("../../useTheme.js"));
|
|
25
|
-
|
|
26
|
-
var _BackgroundColorContext = require("../../BackgroundColorContext.js");
|
|
27
|
-
|
|
28
|
-
function _templateObject3() {
|
|
29
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n height: ", ";\n width: ", ";\n margin-right: 5px;\n & svg {\n fill: ", ";\n }\n"]);
|
|
30
|
-
|
|
31
|
-
_templateObject3 = function _templateObject3() {
|
|
32
|
-
return data;
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
return data;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
function _templateObject2() {
|
|
39
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: row;\n align-items: center;\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n text-transform: ", ";\n color: ", ";\n margin-right: 50px;\n"]);
|
|
40
|
-
|
|
41
|
-
_templateObject2 = function _templateObject2() {
|
|
42
|
-
return data;
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
return data;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
function _templateObject() {
|
|
49
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n margin-right: 80px;\n display: flex;\n flex-direction: row;\n justify-content: flex-end;\n"]);
|
|
50
|
-
|
|
51
|
-
_templateObject = function _templateObject() {
|
|
52
|
-
return data;
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
return data;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
var DxcButtonsUpload = function DxcButtonsUpload(_ref) {
|
|
59
|
-
var addFile = _ref.addFile,
|
|
60
|
-
onUpload = _ref.onUpload;
|
|
61
|
-
var colorsTheme = (0, _useTheme["default"])();
|
|
62
|
-
|
|
63
|
-
var selectFile = function selectFile(e) {
|
|
64
|
-
var filesObject = e.target.files;
|
|
65
|
-
|
|
66
|
-
if (filesObject && filesObject.length > 0) {
|
|
67
|
-
var filesArray = Object.keys(filesObject).map(function (key) {
|
|
68
|
-
return filesObject[key];
|
|
69
|
-
});
|
|
70
|
-
addFile(filesArray);
|
|
71
|
-
}
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
var handleClick = function handleClick() {
|
|
75
|
-
document.getElementById("chooseFiles").click();
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
return _react["default"].createElement(_styledComponents.ThemeProvider, {
|
|
79
|
-
theme: colorsTheme.upload
|
|
80
|
-
}, _react["default"].createElement(_BackgroundColorContext.BackgroundColorProvider, {
|
|
81
|
-
color: colorsTheme.upload.backgroundColor
|
|
82
|
-
}, _react["default"].createElement(DXCButtonsUpload, null, _react["default"].createElement(DragAndDropLabel, null, _react["default"].createElement(DragAndDropIconContainer, null, _Icons.dragAndDropIcon), "Drag and Drop area"), _react["default"].createElement(_Button["default"], {
|
|
83
|
-
margin: {
|
|
84
|
-
right: "small"
|
|
85
|
-
},
|
|
86
|
-
mode: "text",
|
|
87
|
-
label: "CHOOSE FILES",
|
|
88
|
-
onClick: handleClick
|
|
89
|
-
}), _react["default"].createElement("input", {
|
|
90
|
-
id: "chooseFiles",
|
|
91
|
-
type: "file",
|
|
92
|
-
multiple: true,
|
|
93
|
-
onChange: selectFile,
|
|
94
|
-
style: {
|
|
95
|
-
display: "none"
|
|
96
|
-
}
|
|
97
|
-
}), _react["default"].createElement(_Button["default"], {
|
|
98
|
-
label: "UPLOAD",
|
|
99
|
-
iconPosition: "after",
|
|
100
|
-
icon: _Icons.uploadIcon,
|
|
101
|
-
onClick: onUpload
|
|
102
|
-
}))));
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
DxcButtonsUpload.propTypes = {
|
|
106
|
-
addFile: _propTypes["default"].func,
|
|
107
|
-
onUpload: _propTypes["default"].func
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
var DXCButtonsUpload = _styledComponents["default"].div(_templateObject());
|
|
111
|
-
|
|
112
|
-
var DragAndDropLabel = _styledComponents["default"].div(_templateObject2(), function (props) {
|
|
113
|
-
return props.theme.fontFamily;
|
|
114
|
-
}, function (props) {
|
|
115
|
-
return props.theme.dragAndDropAreaTextFontSize;
|
|
116
|
-
}, function (props) {
|
|
117
|
-
return props.theme.dragAndDropAreaTextFontStyle;
|
|
118
|
-
}, function (props) {
|
|
119
|
-
return props.theme.dragAndDropAreaTextFontWeight;
|
|
120
|
-
}, function (props) {
|
|
121
|
-
return props.theme.dragAndDropAreaTextFontTextTransform;
|
|
122
|
-
}, function (props) {
|
|
123
|
-
return props.theme.dragAndDropAreaTextFontColor;
|
|
124
|
-
});
|
|
125
|
-
|
|
126
|
-
var DragAndDropIconContainer = _styledComponents["default"].div(_templateObject3(), function (props) {
|
|
127
|
-
return props.theme.dragAndDropAreaIconSize;
|
|
128
|
-
}, function (props) {
|
|
129
|
-
return props.theme.dragAndDropAreaIconSize;
|
|
130
|
-
}, function (props) {
|
|
131
|
-
return props.theme.dragAndDropAreaIconColor;
|
|
132
|
-
});
|
|
133
|
-
|
|
134
|
-
var _default = DxcButtonsUpload;
|
|
135
|
-
exports["default"] = _default;
|
|
@@ -1,329 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
|
4
|
-
|
|
5
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
6
|
-
|
|
7
|
-
Object.defineProperty(exports, "__esModule", {
|
|
8
|
-
value: true
|
|
9
|
-
});
|
|
10
|
-
exports["default"] = void 0;
|
|
11
|
-
|
|
12
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
13
|
-
|
|
14
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
15
|
-
|
|
16
|
-
var _react = _interopRequireDefault(require("react"));
|
|
17
|
-
|
|
18
|
-
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
19
|
-
|
|
20
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
21
|
-
|
|
22
|
-
var _Icons = require("./Icons");
|
|
23
|
-
|
|
24
|
-
var _Button = _interopRequireDefault(require("../../button/Button"));
|
|
25
|
-
|
|
26
|
-
var _useTheme = _interopRequireDefault(require("../../useTheme.js"));
|
|
27
|
-
|
|
28
|
-
var _BackgroundColorContext = require("../../BackgroundColorContext.js");
|
|
29
|
-
|
|
30
|
-
function _templateObject11() {
|
|
31
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n text-transform: ", ";\n color: ", ";\n margin-bottom: 10px;\n"]);
|
|
32
|
-
|
|
33
|
-
_templateObject11 = function _templateObject11() {
|
|
34
|
-
return data;
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
return data;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
function _templateObject10() {
|
|
41
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n height: ", ";\n width: ", ";\n & svg {\n fill: ", ";\n height: ", ";\n width: ", ";\n }\n"]);
|
|
42
|
-
|
|
43
|
-
_templateObject10 = function _templateObject10() {
|
|
44
|
-
return data;
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
return data;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
function _templateObject9() {
|
|
51
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n --border-color: #666666;\n --border-weight: 1px;\n --dash-size: 8px;\n --gap-size: 8px;\n background: linear-gradient(90deg, var(--border-color) 100%, transparent 100%) top left no-repeat,\n linear-gradient(\n 90deg,\n transparent calc(var(--gap-size) / 2),\n var(--border-color) calc(var(--gap-size) / 2),\n var(--border-color) calc(var(--gap-size) / 2 + var(--dash-size)),\n transparent calc(var(--gap-size) / 2 + var(--dash-size))\n )\n top center repeat-x,\n linear-gradient(90deg, var(--border-color) 100%, transparent 100%) top right no-repeat,\n linear-gradient(0deg, var(--border-color) 100%, transparent 100%) top left no-repeat,\n linear-gradient(\n 0deg,\n transparent calc(var(--gap-size) / 2),\n var(--border-color) calc(var(--gap-size) / 2),\n var(--border-color) calc(var(--gap-size) / 2 + var(--dash-size)),\n transparent calc(var(--gap-size) / 2 + var(--dash-size))\n )\n center left repeat-y,\n linear-gradient(0deg, var(--border-color) 100%, transparent 100%) bottom left no-repeat,\n linear-gradient(90deg, var(--border-color) 100%, transparent 100%) bottom left no-repeat,\n linear-gradient(\n 90deg,\n transparent calc(var(--gap-size) / 2),\n var(--border-color) calc(var(--gap-size) / 2),\n var(--border-color) calc(var(--gap-size) / 2 + var(--dash-size)),\n transparent calc(var(--gap-size) / 2 + var(--dash-size))\n )\n bottom center repeat-x,\n linear-gradient(90deg, var(--border-color) 100%, transparent 100%) bottom right no-repeat,\n linear-gradient(0deg, var(--border-color) 100%, transparent 100%) top right no-repeat,\n linear-gradient(\n 0deg,\n transparent calc(var(--gap-size) / 2),\n var(--border-color) calc(var(--gap-size) / 2),\n var(--border-color) calc(var(--gap-size) / 2 + var(--dash-size)),\n transparent calc(var(--gap-size) / 2 + var(--dash-size))\n )\n center right repeat-y,\n linear-gradient(0deg, var(--border-color) 100%, transparent 100%) bottom right no-repeat;\n background-size: var(--dash-size) var(--border-weight), calc(var(--dash-size) + var(--gap-size)) var(--border-weight),\n var(--dash-size) var(--border-weight), var(--border-weight) var(--dash-size),\n var(--border-weight) calc(var(--dash-size) + var(--gap-size)), var(--border-weight) var(--dash-size);\n background-color: ", ";\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 100%;\n cursor: pointer;\n"]);
|
|
52
|
-
|
|
53
|
-
_templateObject9 = function _templateObject9() {
|
|
54
|
-
return data;
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
return data;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
function _templateObject8() {
|
|
61
|
-
var data = (0, _taggedTemplateLiteral2["default"])([""]);
|
|
62
|
-
|
|
63
|
-
_templateObject8 = function _templateObject8() {
|
|
64
|
-
return data;
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
return data;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
function _templateObject7() {
|
|
71
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n text-transform: ", ";\n color: ", ";\n margin-bottom: 40px;\n"]);
|
|
72
|
-
|
|
73
|
-
_templateObject7 = function _templateObject7() {
|
|
74
|
-
return data;
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
return data;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
function _templateObject6() {
|
|
81
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n text-transform: ", ";\n color: ", ";\n margin-bottom: 10px;\n"]);
|
|
82
|
-
|
|
83
|
-
_templateObject6 = function _templateObject6() {
|
|
84
|
-
return data;
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
return data;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
function _templateObject5() {
|
|
91
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: column;\n align-items: center;\n"]);
|
|
92
|
-
|
|
93
|
-
_templateObject5 = function _templateObject5() {
|
|
94
|
-
return data;
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
return data;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
function _templateObject4() {
|
|
101
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n height: ", ";\n width: ", ";\n margin-bottom: 20px;\n & svg {\n fill: ", ";\n height: ", ";\n width: ", ";\n }\n"]);
|
|
102
|
-
|
|
103
|
-
_templateObject4 = function _templateObject4() {
|
|
104
|
-
return data;
|
|
105
|
-
};
|
|
106
|
-
|
|
107
|
-
return data;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
function _templateObject3() {
|
|
111
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n"]);
|
|
112
|
-
|
|
113
|
-
_templateObject3 = function _templateObject3() {
|
|
114
|
-
return data;
|
|
115
|
-
};
|
|
116
|
-
|
|
117
|
-
return data;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
function _templateObject2() {
|
|
121
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n border-radius: 4px;\n box-shadow: 0px 3px 6px ", ";\n"]);
|
|
122
|
-
|
|
123
|
-
_templateObject2 = function _templateObject2() {
|
|
124
|
-
return data;
|
|
125
|
-
};
|
|
126
|
-
|
|
127
|
-
return data;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
function _templateObject() {
|
|
131
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n font-family: ", ";\n background-color: ", ";\n width: 100%;\n height: 100%;\n"]);
|
|
132
|
-
|
|
133
|
-
_templateObject = function _templateObject() {
|
|
134
|
-
return data;
|
|
135
|
-
};
|
|
136
|
-
|
|
137
|
-
return data;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
var DxcDragAndDropArea = function DxcDragAndDropArea(_ref) {
|
|
141
|
-
var _ref$dashed = _ref.dashed,
|
|
142
|
-
dashed = _ref$dashed === void 0 ? false : _ref$dashed,
|
|
143
|
-
addFile = _ref.addFile,
|
|
144
|
-
tabIndexValue = _ref.tabIndexValue;
|
|
145
|
-
|
|
146
|
-
var _React$useState = _react["default"].useState(false),
|
|
147
|
-
_React$useState2 = (0, _slicedToArray2["default"])(_React$useState, 2),
|
|
148
|
-
dragging = _React$useState2[0],
|
|
149
|
-
setDragging = _React$useState2[1];
|
|
150
|
-
|
|
151
|
-
var colorsTheme = (0, _useTheme["default"])();
|
|
152
|
-
var text = "There are no files to upload";
|
|
153
|
-
var description = "Drag and drop your files here or choose one from your computer";
|
|
154
|
-
var textHover = "Drag your file here";
|
|
155
|
-
|
|
156
|
-
var handleDrag = function handleDrag(e) {
|
|
157
|
-
e.preventDefault();
|
|
158
|
-
e.stopPropagation();
|
|
159
|
-
};
|
|
160
|
-
|
|
161
|
-
var handleDragIn = function handleDragIn(e) {
|
|
162
|
-
e.preventDefault();
|
|
163
|
-
e.stopPropagation();
|
|
164
|
-
|
|
165
|
-
if (e.dataTransfer.items && e.dataTransfer.items.length > 0) {
|
|
166
|
-
setDragging(true);
|
|
167
|
-
}
|
|
168
|
-
};
|
|
169
|
-
|
|
170
|
-
var handleDragOut = function handleDragOut(e) {
|
|
171
|
-
e.preventDefault();
|
|
172
|
-
e.stopPropagation();
|
|
173
|
-
setDragging(false);
|
|
174
|
-
};
|
|
175
|
-
|
|
176
|
-
var handleDrop = function handleDrop(e) {
|
|
177
|
-
e.preventDefault();
|
|
178
|
-
e.stopPropagation();
|
|
179
|
-
var filesObject = e.dataTransfer.files;
|
|
180
|
-
|
|
181
|
-
if (filesObject && filesObject.length > 0) {
|
|
182
|
-
var filesArray = Object.keys(filesObject).map(function (key) {
|
|
183
|
-
return filesObject[key];
|
|
184
|
-
});
|
|
185
|
-
addFile(filesArray);
|
|
186
|
-
e.dataTransfer.clearData();
|
|
187
|
-
}
|
|
188
|
-
};
|
|
189
|
-
|
|
190
|
-
var selectFile = function selectFile(e) {
|
|
191
|
-
var filesObject = e.target.files;
|
|
192
|
-
|
|
193
|
-
if (filesObject && filesObject.length > 0) {
|
|
194
|
-
var filesArray = Object.keys(filesObject).map(function (key) {
|
|
195
|
-
return filesObject[key];
|
|
196
|
-
});
|
|
197
|
-
addFile(filesArray);
|
|
198
|
-
}
|
|
199
|
-
};
|
|
200
|
-
|
|
201
|
-
var handleClick = function handleClick() {
|
|
202
|
-
document.getElementById("chooseFiles").click();
|
|
203
|
-
};
|
|
204
|
-
|
|
205
|
-
return _react["default"].createElement(_styledComponents.ThemeProvider, {
|
|
206
|
-
theme: colorsTheme.upload
|
|
207
|
-
}, _react["default"].createElement(_BackgroundColorContext.BackgroundColorProvider, {
|
|
208
|
-
color: colorsTheme.upload.backgroundColor
|
|
209
|
-
}, _react["default"].createElement(DXCDragAndDrop, {
|
|
210
|
-
onDrop: handleDrop,
|
|
211
|
-
onDragEnter: handleDragIn,
|
|
212
|
-
onDragOver: handleDrag,
|
|
213
|
-
onDragLeave: handleDragOut,
|
|
214
|
-
dashed: dashed
|
|
215
|
-
}, !dragging && !dashed && _react["default"].createElement(DXCDragAndDropArea, null, _react["default"].createElement(DragAndDropContent, null, _react["default"].createElement(DragAndDropIcon, null, _Icons.uploadFileIcon), _react["default"].createElement(DragAndDropText, null, _react["default"].createElement(DragAndDropTitle, null, text), _react["default"].createElement(DragAndDropDescription, null, description)), _react["default"].createElement("div", null, _react["default"].createElement(_Button["default"], {
|
|
216
|
-
label: "CHOOSE FILES",
|
|
217
|
-
onClick: handleClick,
|
|
218
|
-
tabIndex: tabIndexValue
|
|
219
|
-
}), _react["default"].createElement("input", {
|
|
220
|
-
id: "chooseFiles",
|
|
221
|
-
type: "file",
|
|
222
|
-
multiple: true,
|
|
223
|
-
onChange: selectFile,
|
|
224
|
-
style: {
|
|
225
|
-
display: "none"
|
|
226
|
-
}
|
|
227
|
-
})))), !dragging && dashed && _react["default"].createElement(DragAndDropContentHover, null, _react["default"].createElement(DragAndDropContent, null, _react["default"].createElement(DragAndDropIcon, null, _Icons.uploadFileIcon), _react["default"].createElement(DragAndDropText, null, _react["default"].createElement(DragAndDropTitle, null, text), _react["default"].createElement(DragAndDropDescription, null, description)), _react["default"].createElement(ButtonChooseFiles, null, _react["default"].createElement(_Button["default"], {
|
|
228
|
-
theme: "light",
|
|
229
|
-
label: "CHOOSE FILES",
|
|
230
|
-
onClick: handleClick,
|
|
231
|
-
tabIndex: tabIndexValue
|
|
232
|
-
}), _react["default"].createElement("input", {
|
|
233
|
-
id: "chooseFiles",
|
|
234
|
-
type: "file",
|
|
235
|
-
multiple: true,
|
|
236
|
-
onChange: selectFile,
|
|
237
|
-
style: {
|
|
238
|
-
display: "none"
|
|
239
|
-
}
|
|
240
|
-
})))), dragging && _react["default"].createElement(DragAndDropContentHover, null, _react["default"].createElement(DragAndDropTextHover, null, textHover), _react["default"].createElement(DragAndDropIconHover, null, _Icons.dropFileIcon)))));
|
|
241
|
-
};
|
|
242
|
-
|
|
243
|
-
DxcDragAndDropArea.propTypes = {
|
|
244
|
-
dashed: _propTypes["default"].bool,
|
|
245
|
-
addFile: _propTypes["default"].func
|
|
246
|
-
};
|
|
247
|
-
|
|
248
|
-
var DXCDragAndDrop = _styledComponents["default"].div(_templateObject(), function (props) {
|
|
249
|
-
return props.theme.fontFamily;
|
|
250
|
-
}, function (props) {
|
|
251
|
-
return props.theme.backgroundColor;
|
|
252
|
-
});
|
|
253
|
-
|
|
254
|
-
var DXCDragAndDropArea = _styledComponents["default"].div(_templateObject2(), function (props) {
|
|
255
|
-
return props.theme.shadowColor;
|
|
256
|
-
});
|
|
257
|
-
|
|
258
|
-
var DragAndDropContent = _styledComponents["default"].div(_templateObject3());
|
|
259
|
-
|
|
260
|
-
var DragAndDropIcon = _styledComponents["default"].div(_templateObject4(), function (props) {
|
|
261
|
-
return props.theme.dragAndDropIconSize;
|
|
262
|
-
}, function (props) {
|
|
263
|
-
return props.theme.dragAndDropIconSize;
|
|
264
|
-
}, function (props) {
|
|
265
|
-
return props.theme.dragAndDropIconColor;
|
|
266
|
-
}, function (props) {
|
|
267
|
-
return props.theme.dragAndDropIconSize;
|
|
268
|
-
}, function (props) {
|
|
269
|
-
return props.theme.dragAndDropIconSize;
|
|
270
|
-
});
|
|
271
|
-
|
|
272
|
-
var DragAndDropText = _styledComponents["default"].div(_templateObject5());
|
|
273
|
-
|
|
274
|
-
var DragAndDropTitle = _styledComponents["default"].div(_templateObject6(), function (props) {
|
|
275
|
-
return props.theme.dragAndDropTitleFontSize;
|
|
276
|
-
}, function (props) {
|
|
277
|
-
return props.theme.dragAndDropTitleFontStyle;
|
|
278
|
-
}, function (props) {
|
|
279
|
-
return props.theme.dragAndDropTitleFontWeight;
|
|
280
|
-
}, function (props) {
|
|
281
|
-
return props.theme.dragAndDropTitleFontTextTransform;
|
|
282
|
-
}, function (props) {
|
|
283
|
-
return props.theme.dragAndDropTitleFontColor;
|
|
284
|
-
});
|
|
285
|
-
|
|
286
|
-
var DragAndDropDescription = _styledComponents["default"].div(_templateObject7(), function (props) {
|
|
287
|
-
return props.theme.dragAndDropDescriptionFontSize;
|
|
288
|
-
}, function (props) {
|
|
289
|
-
return props.theme.dragAndDropDescriptionFontStyle;
|
|
290
|
-
}, function (props) {
|
|
291
|
-
return props.theme.dragAndDropDescriptionFontWeight;
|
|
292
|
-
}, function (props) {
|
|
293
|
-
return props.theme.dragAndDropDescriptionFontTextTransform;
|
|
294
|
-
}, function (props) {
|
|
295
|
-
return props.theme.dragAndDropDescriptionFontColor;
|
|
296
|
-
});
|
|
297
|
-
|
|
298
|
-
var ButtonChooseFiles = _styledComponents["default"].div(_templateObject8());
|
|
299
|
-
|
|
300
|
-
var DragAndDropContentHover = _styledComponents["default"].div(_templateObject9(), function (props) {
|
|
301
|
-
return props.theme.draggingStateBackgroundColor;
|
|
302
|
-
});
|
|
303
|
-
|
|
304
|
-
var DragAndDropIconHover = _styledComponents["default"].div(_templateObject10(), function (props) {
|
|
305
|
-
return props.theme.dragAndDropDraggingStateIconSize;
|
|
306
|
-
}, function (props) {
|
|
307
|
-
return props.theme.dragAndDropDraggingStateIconSize;
|
|
308
|
-
}, function (props) {
|
|
309
|
-
return props.theme.dragAndDropDraggingStateIconColor;
|
|
310
|
-
}, function (props) {
|
|
311
|
-
return props.theme.dragAndDropDraggingStateIconSize;
|
|
312
|
-
}, function (props) {
|
|
313
|
-
return props.theme.dragAndDropDraggingStateIconSize;
|
|
314
|
-
});
|
|
315
|
-
|
|
316
|
-
var DragAndDropTextHover = _styledComponents["default"].div(_templateObject11(), function (props) {
|
|
317
|
-
return props.theme.dragAndDropDraggingStateFontSize;
|
|
318
|
-
}, function (props) {
|
|
319
|
-
return props.theme.dragAndDropDraggingStateFontStyle;
|
|
320
|
-
}, function (props) {
|
|
321
|
-
return props.theme.dragAndDropDraggingStateFontWeight;
|
|
322
|
-
}, function (props) {
|
|
323
|
-
return props.theme.dragAndDropDraggingStateFontTextTransform;
|
|
324
|
-
}, function (props) {
|
|
325
|
-
return props.theme.dragAndDropDraggingStateFontColor;
|
|
326
|
-
});
|
|
327
|
-
|
|
328
|
-
var _default = DxcDragAndDropArea;
|
|
329
|
-
exports["default"] = _default;
|