@zendeskgarden/react-forms 9.0.0-next.7 → 9.0.0-next.8
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/dist/esm/elements/Checkbox.js +97 -0
- package/dist/esm/elements/FileUpload.js +75 -0
- package/dist/esm/elements/Input.js +93 -0
- package/dist/esm/elements/MediaInput.js +156 -0
- package/dist/esm/elements/Radio.js +81 -0
- package/dist/esm/elements/Range.js +108 -0
- package/dist/esm/elements/Select.js +97 -0
- package/dist/esm/elements/Textarea.js +170 -0
- package/dist/esm/elements/Toggle.js +81 -0
- package/dist/esm/elements/common/Field.js +97 -0
- package/dist/esm/elements/common/Fieldset.js +73 -0
- package/dist/esm/elements/common/Hint.js +92 -0
- package/dist/esm/elements/common/Label.js +134 -0
- package/dist/esm/elements/common/Legend.js +63 -0
- package/dist/esm/elements/common/Message.js +113 -0
- package/dist/esm/elements/faux-input/FauxInput.js +100 -0
- package/dist/esm/elements/faux-input/components/EndIcon.js +59 -0
- package/dist/esm/elements/faux-input/components/StartIcon.js +59 -0
- package/dist/esm/elements/file-list/FileList.js +66 -0
- package/dist/esm/elements/file-list/components/Close.js +75 -0
- package/dist/esm/elements/file-list/components/Delete.js +75 -0
- package/dist/esm/elements/file-list/components/File.js +94 -0
- package/dist/esm/elements/file-list/components/Item.js +64 -0
- package/dist/esm/elements/file-list/utils.js +50 -0
- package/dist/esm/elements/input-group/InputGroup.js +75 -0
- package/dist/esm/elements/tiles/Tiles.js +64 -0
- package/dist/esm/elements/tiles/components/Description.js +64 -0
- package/dist/esm/elements/tiles/components/Icon.js +64 -0
- package/dist/esm/elements/tiles/components/Label.js +73 -0
- package/dist/esm/elements/tiles/components/Tile.js +91 -0
- package/dist/esm/index.js +26 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/12/check-circle-stroke.svg.js +33 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/12/check-sm-fill.svg.js +29 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/12/circle-sm-fill.svg.js +27 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/12/dash-fill.svg.js +27 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/12/file-document-stroke.svg.js +27 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/12/file-error-stroke.svg.js +27 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/12/file-generic-stroke.svg.js +26 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/12/file-image-stroke.svg.js +33 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/12/file-pdf-stroke.svg.js +35 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/12/file-presentation-stroke.svg.js +26 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/12/file-spreadsheet-stroke.svg.js +27 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/12/file-zip-stroke.svg.js +27 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/12/trash-stroke.svg.js +27 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/12/x-stroke.svg.js +26 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/alert-error-stroke.svg.js +37 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/alert-warning-stroke.svg.js +32 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/check-circle-stroke.svg.js +33 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/chevron-down-stroke.svg.js +25 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/circle-sm-fill.svg.js +27 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/file-document-stroke.svg.js +27 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/file-error-stroke.svg.js +27 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/file-generic-stroke.svg.js +26 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/file-image-stroke.svg.js +32 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/file-pdf-stroke.svg.js +35 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/file-presentation-stroke.svg.js +26 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/file-spreadsheet-stroke.svg.js +27 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/file-zip-stroke.svg.js +27 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/trash-stroke.svg.js +27 -0
- package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/x-stroke.svg.js +26 -0
- package/dist/esm/styled/checkbox/StyledCheckHint.js +23 -0
- package/dist/esm/styled/checkbox/StyledCheckInput.js +34 -0
- package/dist/esm/styled/checkbox/StyledCheckLabel.js +23 -0
- package/dist/esm/styled/checkbox/StyledCheckMessage.js +23 -0
- package/dist/esm/styled/checkbox/StyledCheckSvg.js +25 -0
- package/dist/esm/styled/checkbox/StyledDashSvg.js +25 -0
- package/dist/esm/styled/common/StyledField.js +22 -0
- package/dist/esm/styled/common/StyledFieldset.js +24 -0
- package/dist/esm/styled/common/StyledHint.js +22 -0
- package/dist/esm/styled/common/StyledLabel.js +23 -0
- package/dist/esm/styled/common/StyledLegend.js +24 -0
- package/dist/esm/styled/common/StyledMessage.js +40 -0
- package/dist/esm/styled/common/StyledMessageIcon.js +45 -0
- package/dist/esm/styled/file-list/StyledFile.js +76 -0
- package/dist/esm/styled/file-list/StyledFileClose.js +22 -0
- package/dist/esm/styled/file-list/StyledFileDelete.js +23 -0
- package/dist/esm/styled/file-list/StyledFileIcon.js +31 -0
- package/dist/esm/styled/file-list/StyledFileList.js +22 -0
- package/dist/esm/styled/file-list/StyledFileListItem.js +24 -0
- package/dist/esm/styled/file-upload/StyledFileUpload.js +47 -0
- package/dist/esm/styled/input-group/StyledInputGroup.js +35 -0
- package/dist/esm/styled/radio/StyledRadioHint.js +24 -0
- package/dist/esm/styled/radio/StyledRadioInput.js +61 -0
- package/dist/esm/styled/radio/StyledRadioLabel.js +30 -0
- package/dist/esm/styled/radio/StyledRadioMessage.js +24 -0
- package/dist/esm/styled/radio/StyledRadioSvg.js +25 -0
- package/dist/esm/styled/range/StyledRangeInput.js +160 -0
- package/dist/esm/styled/select/StyledSelect.js +36 -0
- package/dist/esm/styled/select/StyledSelectWrapper.js +24 -0
- package/dist/esm/styled/text/StyledTextFauxInput.js +61 -0
- package/dist/esm/styled/text/StyledTextInput.js +107 -0
- package/dist/esm/styled/text/StyledTextMediaFigure.js +57 -0
- package/dist/esm/styled/text/StyledTextMediaInput.js +24 -0
- package/dist/esm/styled/text/StyledTextarea.js +33 -0
- package/dist/esm/styled/tiles/StyledTile.js +55 -0
- package/dist/esm/styled/tiles/StyledTileDescription.js +34 -0
- package/dist/esm/styled/tiles/StyledTileIcon.js +38 -0
- package/dist/esm/styled/tiles/StyledTileInput.js +18 -0
- package/dist/esm/styled/tiles/StyledTileLabel.js +36 -0
- package/dist/esm/styled/toggle/StyledToggleHint.js +24 -0
- package/dist/esm/styled/toggle/StyledToggleInput.js +40 -0
- package/dist/esm/styled/toggle/StyledToggleLabel.js +28 -0
- package/dist/esm/styled/toggle/StyledToggleMessage.js +25 -0
- package/dist/esm/styled/toggle/StyledToggleSvg.js +23 -0
- package/dist/esm/types/index.js +11 -0
- package/dist/esm/utils/useFieldContext.js +15 -0
- package/dist/esm/utils/useFieldsetContext.js +15 -0
- package/dist/esm/utils/useFileContext.js +14 -0
- package/dist/esm/utils/useInputContext.js +14 -0
- package/dist/esm/utils/useInputGroupContext.js +14 -0
- package/dist/esm/utils/useTilesContext.js +14 -0
- package/dist/index.cjs.js +91 -97
- package/package.json +5 -5
- package/dist/index.esm.js +0 -2720
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Zendesk, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
+
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
*/
|
|
7
|
+
import React__default from 'react';
|
|
8
|
+
import { composeEventHandlers } from '@zendeskgarden/container-utilities';
|
|
9
|
+
import SvgXStroke from '../../../node_modules/@zendeskgarden/svg-icons/src/12/x-stroke.svg.js';
|
|
10
|
+
import SvgXStroke$1 from '../../../node_modules/@zendeskgarden/svg-icons/src/16/x-stroke.svg.js';
|
|
11
|
+
import useFileContext from '../../../utils/useFileContext.js';
|
|
12
|
+
import '../../../styled/common/StyledField.js';
|
|
13
|
+
import '../../../styled/common/StyledFieldset.js';
|
|
14
|
+
import '../../../styled/common/StyledLegend.js';
|
|
15
|
+
import '../../../styled/common/StyledHint.js';
|
|
16
|
+
import '../../../styled/common/StyledLabel.js';
|
|
17
|
+
import '../../../styled/common/StyledMessage.js';
|
|
18
|
+
import '../../../styled/common/StyledMessageIcon.js';
|
|
19
|
+
import '../../../styled/text/StyledTextInput.js';
|
|
20
|
+
import '../../../styled/text/StyledTextarea.js';
|
|
21
|
+
import '../../../styled/text/StyledTextFauxInput.js';
|
|
22
|
+
import '../../../styled/text/StyledTextMediaInput.js';
|
|
23
|
+
import '../../../styled/text/StyledTextMediaFigure.js';
|
|
24
|
+
import '../../../styled/input-group/StyledInputGroup.js';
|
|
25
|
+
import '../../../styled/checkbox/StyledCheckLabel.js';
|
|
26
|
+
import '../../../styled/checkbox/StyledCheckHint.js';
|
|
27
|
+
import '../../../styled/checkbox/StyledCheckInput.js';
|
|
28
|
+
import '../../../styled/checkbox/StyledCheckMessage.js';
|
|
29
|
+
import '../../../styled/checkbox/StyledCheckSvg.js';
|
|
30
|
+
import '../../../styled/checkbox/StyledDashSvg.js';
|
|
31
|
+
import '../../../styled/file-upload/StyledFileUpload.js';
|
|
32
|
+
import '../../../styled/file-list/StyledFile.js';
|
|
33
|
+
import { StyledFileClose } from '../../../styled/file-list/StyledFileClose.js';
|
|
34
|
+
import '../../../styled/file-list/StyledFileDelete.js';
|
|
35
|
+
import '../../../styled/file-list/StyledFileIcon.js';
|
|
36
|
+
import '../../../styled/file-list/StyledFileList.js';
|
|
37
|
+
import '../../../styled/file-list/StyledFileListItem.js';
|
|
38
|
+
import '../../../styled/radio/StyledRadioLabel.js';
|
|
39
|
+
import '../../../styled/radio/StyledRadioHint.js';
|
|
40
|
+
import '../../../styled/radio/StyledRadioInput.js';
|
|
41
|
+
import '../../../styled/radio/StyledRadioMessage.js';
|
|
42
|
+
import '../../../styled/radio/StyledRadioSvg.js';
|
|
43
|
+
import '../../../styled/toggle/StyledToggleLabel.js';
|
|
44
|
+
import '../../../styled/toggle/StyledToggleHint.js';
|
|
45
|
+
import '../../../styled/toggle/StyledToggleInput.js';
|
|
46
|
+
import '../../../styled/toggle/StyledToggleMessage.js';
|
|
47
|
+
import '../../../styled/toggle/StyledToggleSvg.js';
|
|
48
|
+
import '../../../styled/select/StyledSelect.js';
|
|
49
|
+
import '../../../styled/select/StyledSelectWrapper.js';
|
|
50
|
+
import '../../../styled/range/StyledRangeInput.js';
|
|
51
|
+
import '../../../styled/tiles/StyledTile.js';
|
|
52
|
+
import '../../../styled/tiles/StyledTileDescription.js';
|
|
53
|
+
import '../../../styled/tiles/StyledTileIcon.js';
|
|
54
|
+
import '../../../styled/tiles/StyledTileInput.js';
|
|
55
|
+
import '../../../styled/tiles/StyledTileLabel.js';
|
|
56
|
+
import { useText } from '@zendeskgarden/react-theming';
|
|
57
|
+
|
|
58
|
+
const CloseComponent = React__default.forwardRef((props, ref) => {
|
|
59
|
+
const fileContext = useFileContext();
|
|
60
|
+
const onMouseDown = composeEventHandlers(props.onMouseDown, event => event.preventDefault()
|
|
61
|
+
);
|
|
62
|
+
const ariaLabel = useText(CloseComponent, props, 'aria-label', 'Close');
|
|
63
|
+
return React__default.createElement(StyledFileClose, Object.assign({
|
|
64
|
+
ref: ref,
|
|
65
|
+
"aria-label": ariaLabel
|
|
66
|
+
}, props, {
|
|
67
|
+
type: "button",
|
|
68
|
+
tabIndex: -1,
|
|
69
|
+
onMouseDown: onMouseDown
|
|
70
|
+
}), fileContext && fileContext.isCompact ? React__default.createElement(SvgXStroke, null) : React__default.createElement(SvgXStroke$1, null));
|
|
71
|
+
});
|
|
72
|
+
CloseComponent.displayName = 'File.Close';
|
|
73
|
+
const Close = CloseComponent;
|
|
74
|
+
|
|
75
|
+
export { Close };
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Zendesk, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
+
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
*/
|
|
7
|
+
import React__default from 'react';
|
|
8
|
+
import { composeEventHandlers } from '@zendeskgarden/container-utilities';
|
|
9
|
+
import SvgTrashStroke from '../../../node_modules/@zendeskgarden/svg-icons/src/12/trash-stroke.svg.js';
|
|
10
|
+
import SvgTrashStroke$1 from '../../../node_modules/@zendeskgarden/svg-icons/src/16/trash-stroke.svg.js';
|
|
11
|
+
import useFileContext from '../../../utils/useFileContext.js';
|
|
12
|
+
import '../../../styled/common/StyledField.js';
|
|
13
|
+
import '../../../styled/common/StyledFieldset.js';
|
|
14
|
+
import '../../../styled/common/StyledLegend.js';
|
|
15
|
+
import '../../../styled/common/StyledHint.js';
|
|
16
|
+
import '../../../styled/common/StyledLabel.js';
|
|
17
|
+
import '../../../styled/common/StyledMessage.js';
|
|
18
|
+
import '../../../styled/common/StyledMessageIcon.js';
|
|
19
|
+
import '../../../styled/text/StyledTextInput.js';
|
|
20
|
+
import '../../../styled/text/StyledTextarea.js';
|
|
21
|
+
import '../../../styled/text/StyledTextFauxInput.js';
|
|
22
|
+
import '../../../styled/text/StyledTextMediaInput.js';
|
|
23
|
+
import '../../../styled/text/StyledTextMediaFigure.js';
|
|
24
|
+
import '../../../styled/input-group/StyledInputGroup.js';
|
|
25
|
+
import '../../../styled/checkbox/StyledCheckLabel.js';
|
|
26
|
+
import '../../../styled/checkbox/StyledCheckHint.js';
|
|
27
|
+
import '../../../styled/checkbox/StyledCheckInput.js';
|
|
28
|
+
import '../../../styled/checkbox/StyledCheckMessage.js';
|
|
29
|
+
import '../../../styled/checkbox/StyledCheckSvg.js';
|
|
30
|
+
import '../../../styled/checkbox/StyledDashSvg.js';
|
|
31
|
+
import '../../../styled/file-upload/StyledFileUpload.js';
|
|
32
|
+
import '../../../styled/file-list/StyledFile.js';
|
|
33
|
+
import '../../../styled/file-list/StyledFileClose.js';
|
|
34
|
+
import { StyledFileDelete } from '../../../styled/file-list/StyledFileDelete.js';
|
|
35
|
+
import '../../../styled/file-list/StyledFileIcon.js';
|
|
36
|
+
import '../../../styled/file-list/StyledFileList.js';
|
|
37
|
+
import '../../../styled/file-list/StyledFileListItem.js';
|
|
38
|
+
import '../../../styled/radio/StyledRadioLabel.js';
|
|
39
|
+
import '../../../styled/radio/StyledRadioHint.js';
|
|
40
|
+
import '../../../styled/radio/StyledRadioInput.js';
|
|
41
|
+
import '../../../styled/radio/StyledRadioMessage.js';
|
|
42
|
+
import '../../../styled/radio/StyledRadioSvg.js';
|
|
43
|
+
import '../../../styled/toggle/StyledToggleLabel.js';
|
|
44
|
+
import '../../../styled/toggle/StyledToggleHint.js';
|
|
45
|
+
import '../../../styled/toggle/StyledToggleInput.js';
|
|
46
|
+
import '../../../styled/toggle/StyledToggleMessage.js';
|
|
47
|
+
import '../../../styled/toggle/StyledToggleSvg.js';
|
|
48
|
+
import '../../../styled/select/StyledSelect.js';
|
|
49
|
+
import '../../../styled/select/StyledSelectWrapper.js';
|
|
50
|
+
import '../../../styled/range/StyledRangeInput.js';
|
|
51
|
+
import '../../../styled/tiles/StyledTile.js';
|
|
52
|
+
import '../../../styled/tiles/StyledTileDescription.js';
|
|
53
|
+
import '../../../styled/tiles/StyledTileIcon.js';
|
|
54
|
+
import '../../../styled/tiles/StyledTileInput.js';
|
|
55
|
+
import '../../../styled/tiles/StyledTileLabel.js';
|
|
56
|
+
import { useText } from '@zendeskgarden/react-theming';
|
|
57
|
+
|
|
58
|
+
const DeleteComponent = React__default.forwardRef((props, ref) => {
|
|
59
|
+
const fileContext = useFileContext();
|
|
60
|
+
const onMouseDown = composeEventHandlers(props.onMouseDown, event => event.preventDefault()
|
|
61
|
+
);
|
|
62
|
+
const ariaLabel = useText(DeleteComponent, props, 'aria-label', 'Delete');
|
|
63
|
+
return React__default.createElement(StyledFileDelete, Object.assign({
|
|
64
|
+
ref: ref,
|
|
65
|
+
"aria-label": ariaLabel
|
|
66
|
+
}, props, {
|
|
67
|
+
type: "button",
|
|
68
|
+
tabIndex: -1,
|
|
69
|
+
onMouseDown: onMouseDown
|
|
70
|
+
}), fileContext && fileContext.isCompact ? React__default.createElement(SvgTrashStroke, null) : React__default.createElement(SvgTrashStroke$1, null));
|
|
71
|
+
});
|
|
72
|
+
DeleteComponent.displayName = 'File.Delete';
|
|
73
|
+
const Delete = DeleteComponent;
|
|
74
|
+
|
|
75
|
+
export { Delete };
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Zendesk, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
+
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
*/
|
|
7
|
+
import React__default, { forwardRef, useMemo, Children } from 'react';
|
|
8
|
+
import PropTypes from 'prop-types';
|
|
9
|
+
import { FILE_TYPE, FILE_VALIDATION } from '../../../types/index.js';
|
|
10
|
+
import { Close } from './Close.js';
|
|
11
|
+
import { Delete } from './Delete.js';
|
|
12
|
+
import '../../../styled/common/StyledField.js';
|
|
13
|
+
import '../../../styled/common/StyledFieldset.js';
|
|
14
|
+
import '../../../styled/common/StyledLegend.js';
|
|
15
|
+
import '../../../styled/common/StyledHint.js';
|
|
16
|
+
import '../../../styled/common/StyledLabel.js';
|
|
17
|
+
import '../../../styled/common/StyledMessage.js';
|
|
18
|
+
import '../../../styled/common/StyledMessageIcon.js';
|
|
19
|
+
import '../../../styled/text/StyledTextInput.js';
|
|
20
|
+
import '../../../styled/text/StyledTextarea.js';
|
|
21
|
+
import '../../../styled/text/StyledTextFauxInput.js';
|
|
22
|
+
import '../../../styled/text/StyledTextMediaInput.js';
|
|
23
|
+
import '../../../styled/text/StyledTextMediaFigure.js';
|
|
24
|
+
import '../../../styled/input-group/StyledInputGroup.js';
|
|
25
|
+
import '../../../styled/checkbox/StyledCheckLabel.js';
|
|
26
|
+
import '../../../styled/checkbox/StyledCheckHint.js';
|
|
27
|
+
import '../../../styled/checkbox/StyledCheckInput.js';
|
|
28
|
+
import '../../../styled/checkbox/StyledCheckMessage.js';
|
|
29
|
+
import '../../../styled/checkbox/StyledCheckSvg.js';
|
|
30
|
+
import '../../../styled/checkbox/StyledDashSvg.js';
|
|
31
|
+
import '../../../styled/file-upload/StyledFileUpload.js';
|
|
32
|
+
import { StyledFile } from '../../../styled/file-list/StyledFile.js';
|
|
33
|
+
import '../../../styled/file-list/StyledFileClose.js';
|
|
34
|
+
import '../../../styled/file-list/StyledFileDelete.js';
|
|
35
|
+
import { StyledFileIcon } from '../../../styled/file-list/StyledFileIcon.js';
|
|
36
|
+
import '../../../styled/file-list/StyledFileList.js';
|
|
37
|
+
import '../../../styled/file-list/StyledFileListItem.js';
|
|
38
|
+
import '../../../styled/radio/StyledRadioLabel.js';
|
|
39
|
+
import '../../../styled/radio/StyledRadioHint.js';
|
|
40
|
+
import '../../../styled/radio/StyledRadioInput.js';
|
|
41
|
+
import '../../../styled/radio/StyledRadioMessage.js';
|
|
42
|
+
import '../../../styled/radio/StyledRadioSvg.js';
|
|
43
|
+
import '../../../styled/toggle/StyledToggleLabel.js';
|
|
44
|
+
import '../../../styled/toggle/StyledToggleHint.js';
|
|
45
|
+
import '../../../styled/toggle/StyledToggleInput.js';
|
|
46
|
+
import '../../../styled/toggle/StyledToggleMessage.js';
|
|
47
|
+
import '../../../styled/toggle/StyledToggleSvg.js';
|
|
48
|
+
import '../../../styled/select/StyledSelect.js';
|
|
49
|
+
import '../../../styled/select/StyledSelectWrapper.js';
|
|
50
|
+
import '../../../styled/range/StyledRangeInput.js';
|
|
51
|
+
import '../../../styled/tiles/StyledTile.js';
|
|
52
|
+
import '../../../styled/tiles/StyledTileDescription.js';
|
|
53
|
+
import '../../../styled/tiles/StyledTileIcon.js';
|
|
54
|
+
import '../../../styled/tiles/StyledTileInput.js';
|
|
55
|
+
import '../../../styled/tiles/StyledTileLabel.js';
|
|
56
|
+
import { FileContext } from '../../../utils/useFileContext.js';
|
|
57
|
+
import { fileIconsCompact, fileIconsDefault } from '../utils.js';
|
|
58
|
+
|
|
59
|
+
const FileComponent = forwardRef((_ref, ref) => {
|
|
60
|
+
let {
|
|
61
|
+
children,
|
|
62
|
+
type,
|
|
63
|
+
isCompact,
|
|
64
|
+
focusInset,
|
|
65
|
+
validation,
|
|
66
|
+
...props
|
|
67
|
+
} = _ref;
|
|
68
|
+
const fileContextValue = useMemo(() => ({
|
|
69
|
+
isCompact
|
|
70
|
+
}), [isCompact]);
|
|
71
|
+
const validationType = validation || type;
|
|
72
|
+
return React__default.createElement(FileContext.Provider, {
|
|
73
|
+
value: fileContextValue
|
|
74
|
+
}, React__default.createElement(StyledFile, Object.assign({}, props, {
|
|
75
|
+
isCompact: isCompact,
|
|
76
|
+
focusInset: focusInset,
|
|
77
|
+
validation: validation,
|
|
78
|
+
ref: ref
|
|
79
|
+
}), validationType && React__default.createElement(StyledFileIcon, {
|
|
80
|
+
isCompact: isCompact
|
|
81
|
+
}, isCompact ? fileIconsCompact[validationType] : fileIconsDefault[validationType]), Children.map(children, child => typeof child === 'string' ? React__default.createElement("span", null, child) : child)));
|
|
82
|
+
});
|
|
83
|
+
FileComponent.displayName = 'File';
|
|
84
|
+
FileComponent.propTypes = {
|
|
85
|
+
focusInset: PropTypes.bool,
|
|
86
|
+
isCompact: PropTypes.bool,
|
|
87
|
+
type: PropTypes.oneOf(FILE_TYPE),
|
|
88
|
+
validation: PropTypes.oneOf(FILE_VALIDATION)
|
|
89
|
+
};
|
|
90
|
+
const File = FileComponent;
|
|
91
|
+
File.Close = Close;
|
|
92
|
+
File.Delete = Delete;
|
|
93
|
+
|
|
94
|
+
export { File };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Zendesk, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
+
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
*/
|
|
7
|
+
import React__default, { forwardRef } from 'react';
|
|
8
|
+
import '../../../styled/common/StyledField.js';
|
|
9
|
+
import '../../../styled/common/StyledFieldset.js';
|
|
10
|
+
import '../../../styled/common/StyledLegend.js';
|
|
11
|
+
import '../../../styled/common/StyledHint.js';
|
|
12
|
+
import '../../../styled/common/StyledLabel.js';
|
|
13
|
+
import '../../../styled/common/StyledMessage.js';
|
|
14
|
+
import '../../../styled/common/StyledMessageIcon.js';
|
|
15
|
+
import '../../../styled/text/StyledTextInput.js';
|
|
16
|
+
import '../../../styled/text/StyledTextarea.js';
|
|
17
|
+
import '../../../styled/text/StyledTextFauxInput.js';
|
|
18
|
+
import '../../../styled/text/StyledTextMediaInput.js';
|
|
19
|
+
import '../../../styled/text/StyledTextMediaFigure.js';
|
|
20
|
+
import '../../../styled/input-group/StyledInputGroup.js';
|
|
21
|
+
import '../../../styled/checkbox/StyledCheckLabel.js';
|
|
22
|
+
import '../../../styled/checkbox/StyledCheckHint.js';
|
|
23
|
+
import '../../../styled/checkbox/StyledCheckInput.js';
|
|
24
|
+
import '../../../styled/checkbox/StyledCheckMessage.js';
|
|
25
|
+
import '../../../styled/checkbox/StyledCheckSvg.js';
|
|
26
|
+
import '../../../styled/checkbox/StyledDashSvg.js';
|
|
27
|
+
import '../../../styled/file-upload/StyledFileUpload.js';
|
|
28
|
+
import '../../../styled/file-list/StyledFile.js';
|
|
29
|
+
import '../../../styled/file-list/StyledFileClose.js';
|
|
30
|
+
import '../../../styled/file-list/StyledFileDelete.js';
|
|
31
|
+
import '../../../styled/file-list/StyledFileIcon.js';
|
|
32
|
+
import '../../../styled/file-list/StyledFileList.js';
|
|
33
|
+
import { StyledFileListItem } from '../../../styled/file-list/StyledFileListItem.js';
|
|
34
|
+
import '../../../styled/radio/StyledRadioLabel.js';
|
|
35
|
+
import '../../../styled/radio/StyledRadioHint.js';
|
|
36
|
+
import '../../../styled/radio/StyledRadioInput.js';
|
|
37
|
+
import '../../../styled/radio/StyledRadioMessage.js';
|
|
38
|
+
import '../../../styled/radio/StyledRadioSvg.js';
|
|
39
|
+
import '../../../styled/toggle/StyledToggleLabel.js';
|
|
40
|
+
import '../../../styled/toggle/StyledToggleHint.js';
|
|
41
|
+
import '../../../styled/toggle/StyledToggleInput.js';
|
|
42
|
+
import '../../../styled/toggle/StyledToggleMessage.js';
|
|
43
|
+
import '../../../styled/toggle/StyledToggleSvg.js';
|
|
44
|
+
import '../../../styled/select/StyledSelect.js';
|
|
45
|
+
import '../../../styled/select/StyledSelectWrapper.js';
|
|
46
|
+
import '../../../styled/range/StyledRangeInput.js';
|
|
47
|
+
import '../../../styled/tiles/StyledTile.js';
|
|
48
|
+
import '../../../styled/tiles/StyledTileDescription.js';
|
|
49
|
+
import '../../../styled/tiles/StyledTileIcon.js';
|
|
50
|
+
import '../../../styled/tiles/StyledTileInput.js';
|
|
51
|
+
import '../../../styled/tiles/StyledTileLabel.js';
|
|
52
|
+
|
|
53
|
+
const ItemComponent = forwardRef((_ref, ref) => {
|
|
54
|
+
let {
|
|
55
|
+
...props
|
|
56
|
+
} = _ref;
|
|
57
|
+
return React__default.createElement(StyledFileListItem, Object.assign({}, props, {
|
|
58
|
+
ref: ref
|
|
59
|
+
}));
|
|
60
|
+
});
|
|
61
|
+
ItemComponent.displayName = 'FileList.Item';
|
|
62
|
+
const Item = ItemComponent;
|
|
63
|
+
|
|
64
|
+
export { Item };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Zendesk, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
+
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
*/
|
|
7
|
+
import React__default from 'react';
|
|
8
|
+
import SvgFilePdfStroke$1 from '../../node_modules/@zendeskgarden/svg-icons/src/12/file-pdf-stroke.svg.js';
|
|
9
|
+
import SvgFileZipStroke$1 from '../../node_modules/@zendeskgarden/svg-icons/src/12/file-zip-stroke.svg.js';
|
|
10
|
+
import SvgFileImageStroke$1 from '../../node_modules/@zendeskgarden/svg-icons/src/12/file-image-stroke.svg.js';
|
|
11
|
+
import SvgFileDocumentStroke$1 from '../../node_modules/@zendeskgarden/svg-icons/src/12/file-document-stroke.svg.js';
|
|
12
|
+
import SvgFileSpreadsheetStroke$1 from '../../node_modules/@zendeskgarden/svg-icons/src/12/file-spreadsheet-stroke.svg.js';
|
|
13
|
+
import SvgFilePresentationStroke$1 from '../../node_modules/@zendeskgarden/svg-icons/src/12/file-presentation-stroke.svg.js';
|
|
14
|
+
import SvgFileGenericStroke$1 from '../../node_modules/@zendeskgarden/svg-icons/src/12/file-generic-stroke.svg.js';
|
|
15
|
+
import SvgCheckCircleStroke$1 from '../../node_modules/@zendeskgarden/svg-icons/src/12/check-circle-stroke.svg.js';
|
|
16
|
+
import SvgFileErrorStroke$1 from '../../node_modules/@zendeskgarden/svg-icons/src/12/file-error-stroke.svg.js';
|
|
17
|
+
import SvgFilePdfStroke from '../../node_modules/@zendeskgarden/svg-icons/src/16/file-pdf-stroke.svg.js';
|
|
18
|
+
import SvgFileZipStroke from '../../node_modules/@zendeskgarden/svg-icons/src/16/file-zip-stroke.svg.js';
|
|
19
|
+
import SvgFileImageStroke from '../../node_modules/@zendeskgarden/svg-icons/src/16/file-image-stroke.svg.js';
|
|
20
|
+
import SvgFileDocumentStroke from '../../node_modules/@zendeskgarden/svg-icons/src/16/file-document-stroke.svg.js';
|
|
21
|
+
import SvgFileSpreadsheetStroke from '../../node_modules/@zendeskgarden/svg-icons/src/16/file-spreadsheet-stroke.svg.js';
|
|
22
|
+
import SvgFilePresentationStroke from '../../node_modules/@zendeskgarden/svg-icons/src/16/file-presentation-stroke.svg.js';
|
|
23
|
+
import SvgFileGenericStroke from '../../node_modules/@zendeskgarden/svg-icons/src/16/file-generic-stroke.svg.js';
|
|
24
|
+
import SvgCheckCircleStroke from '../../node_modules/@zendeskgarden/svg-icons/src/16/check-circle-stroke.svg.js';
|
|
25
|
+
import SvgFileErrorStroke from '../../node_modules/@zendeskgarden/svg-icons/src/16/file-error-stroke.svg.js';
|
|
26
|
+
|
|
27
|
+
const fileIconsDefault = {
|
|
28
|
+
pdf: React__default.createElement(SvgFilePdfStroke, null),
|
|
29
|
+
zip: React__default.createElement(SvgFileZipStroke, null),
|
|
30
|
+
image: React__default.createElement(SvgFileImageStroke, null),
|
|
31
|
+
document: React__default.createElement(SvgFileDocumentStroke, null),
|
|
32
|
+
spreadsheet: React__default.createElement(SvgFileSpreadsheetStroke, null),
|
|
33
|
+
presentation: React__default.createElement(SvgFilePresentationStroke, null),
|
|
34
|
+
generic: React__default.createElement(SvgFileGenericStroke, null),
|
|
35
|
+
success: React__default.createElement(SvgCheckCircleStroke, null),
|
|
36
|
+
error: React__default.createElement(SvgFileErrorStroke, null)
|
|
37
|
+
};
|
|
38
|
+
const fileIconsCompact = {
|
|
39
|
+
pdf: React__default.createElement(SvgFilePdfStroke$1, null),
|
|
40
|
+
zip: React__default.createElement(SvgFileZipStroke$1, null),
|
|
41
|
+
image: React__default.createElement(SvgFileImageStroke$1, null),
|
|
42
|
+
document: React__default.createElement(SvgFileDocumentStroke$1, null),
|
|
43
|
+
spreadsheet: React__default.createElement(SvgFileSpreadsheetStroke$1, null),
|
|
44
|
+
presentation: React__default.createElement(SvgFilePresentationStroke$1, null),
|
|
45
|
+
generic: React__default.createElement(SvgFileGenericStroke$1, null),
|
|
46
|
+
success: React__default.createElement(SvgCheckCircleStroke$1, null),
|
|
47
|
+
error: React__default.createElement(SvgFileErrorStroke$1, null)
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export { fileIconsCompact, fileIconsDefault };
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Zendesk, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
+
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
*/
|
|
7
|
+
import React__default, { useMemo } from 'react';
|
|
8
|
+
import PropTypes from 'prop-types';
|
|
9
|
+
import { InputGroupContext } from '../../utils/useInputGroupContext.js';
|
|
10
|
+
import '../../styled/common/StyledField.js';
|
|
11
|
+
import '../../styled/common/StyledFieldset.js';
|
|
12
|
+
import '../../styled/common/StyledLegend.js';
|
|
13
|
+
import '../../styled/common/StyledHint.js';
|
|
14
|
+
import '../../styled/common/StyledLabel.js';
|
|
15
|
+
import '../../styled/common/StyledMessage.js';
|
|
16
|
+
import '../../styled/common/StyledMessageIcon.js';
|
|
17
|
+
import '../../styled/text/StyledTextInput.js';
|
|
18
|
+
import '../../styled/text/StyledTextarea.js';
|
|
19
|
+
import '../../styled/text/StyledTextFauxInput.js';
|
|
20
|
+
import '../../styled/text/StyledTextMediaInput.js';
|
|
21
|
+
import '../../styled/text/StyledTextMediaFigure.js';
|
|
22
|
+
import { StyledInputGroup } from '../../styled/input-group/StyledInputGroup.js';
|
|
23
|
+
import '../../styled/checkbox/StyledCheckLabel.js';
|
|
24
|
+
import '../../styled/checkbox/StyledCheckHint.js';
|
|
25
|
+
import '../../styled/checkbox/StyledCheckInput.js';
|
|
26
|
+
import '../../styled/checkbox/StyledCheckMessage.js';
|
|
27
|
+
import '../../styled/checkbox/StyledCheckSvg.js';
|
|
28
|
+
import '../../styled/checkbox/StyledDashSvg.js';
|
|
29
|
+
import '../../styled/file-upload/StyledFileUpload.js';
|
|
30
|
+
import '../../styled/file-list/StyledFile.js';
|
|
31
|
+
import '../../styled/file-list/StyledFileClose.js';
|
|
32
|
+
import '../../styled/file-list/StyledFileDelete.js';
|
|
33
|
+
import '../../styled/file-list/StyledFileIcon.js';
|
|
34
|
+
import '../../styled/file-list/StyledFileList.js';
|
|
35
|
+
import '../../styled/file-list/StyledFileListItem.js';
|
|
36
|
+
import '../../styled/radio/StyledRadioLabel.js';
|
|
37
|
+
import '../../styled/radio/StyledRadioHint.js';
|
|
38
|
+
import '../../styled/radio/StyledRadioInput.js';
|
|
39
|
+
import '../../styled/radio/StyledRadioMessage.js';
|
|
40
|
+
import '../../styled/radio/StyledRadioSvg.js';
|
|
41
|
+
import '../../styled/toggle/StyledToggleLabel.js';
|
|
42
|
+
import '../../styled/toggle/StyledToggleHint.js';
|
|
43
|
+
import '../../styled/toggle/StyledToggleInput.js';
|
|
44
|
+
import '../../styled/toggle/StyledToggleMessage.js';
|
|
45
|
+
import '../../styled/toggle/StyledToggleSvg.js';
|
|
46
|
+
import '../../styled/select/StyledSelect.js';
|
|
47
|
+
import '../../styled/select/StyledSelectWrapper.js';
|
|
48
|
+
import '../../styled/range/StyledRangeInput.js';
|
|
49
|
+
import '../../styled/tiles/StyledTile.js';
|
|
50
|
+
import '../../styled/tiles/StyledTileDescription.js';
|
|
51
|
+
import '../../styled/tiles/StyledTileIcon.js';
|
|
52
|
+
import '../../styled/tiles/StyledTileInput.js';
|
|
53
|
+
import '../../styled/tiles/StyledTileLabel.js';
|
|
54
|
+
|
|
55
|
+
const InputGroup = React__default.forwardRef((_ref, ref) => {
|
|
56
|
+
let {
|
|
57
|
+
isCompact,
|
|
58
|
+
...props
|
|
59
|
+
} = _ref;
|
|
60
|
+
const contextValue = useMemo(() => ({
|
|
61
|
+
isCompact
|
|
62
|
+
}), [isCompact]);
|
|
63
|
+
return React__default.createElement(InputGroupContext.Provider, {
|
|
64
|
+
value: contextValue
|
|
65
|
+
}, React__default.createElement(StyledInputGroup, Object.assign({
|
|
66
|
+
ref: ref,
|
|
67
|
+
isCompact: isCompact
|
|
68
|
+
}, props)));
|
|
69
|
+
});
|
|
70
|
+
InputGroup.displayName = 'InputGroup';
|
|
71
|
+
InputGroup.propTypes = {
|
|
72
|
+
isCompact: PropTypes.bool
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
export { InputGroup };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Zendesk, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
+
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
*/
|
|
7
|
+
import React__default, { forwardRef, useState, useCallback, useMemo } from 'react';
|
|
8
|
+
import PropTypes from 'prop-types';
|
|
9
|
+
import { getControlledValue } from '@zendeskgarden/container-utilities';
|
|
10
|
+
import { TilesContext } from '../../utils/useTilesContext.js';
|
|
11
|
+
import { Tile } from './components/Tile.js';
|
|
12
|
+
import { Description } from './components/Description.js';
|
|
13
|
+
import { Icon } from './components/Icon.js';
|
|
14
|
+
import { Label } from './components/Label.js';
|
|
15
|
+
|
|
16
|
+
const TilesComponent = forwardRef((_ref, ref) => {
|
|
17
|
+
let {
|
|
18
|
+
onChange,
|
|
19
|
+
value: controlledValue,
|
|
20
|
+
name,
|
|
21
|
+
isCentered,
|
|
22
|
+
...props
|
|
23
|
+
} = _ref;
|
|
24
|
+
const [value, setValue] = useState(controlledValue);
|
|
25
|
+
const handleOnChange = useCallback(function () {
|
|
26
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
27
|
+
args[_key] = arguments[_key];
|
|
28
|
+
}
|
|
29
|
+
setValue(args[0].target.value);
|
|
30
|
+
if (onChange) {
|
|
31
|
+
onChange(...args);
|
|
32
|
+
}
|
|
33
|
+
}, [onChange]);
|
|
34
|
+
const selectedValue = getControlledValue(controlledValue, value);
|
|
35
|
+
const tileContext = useMemo(() => ({
|
|
36
|
+
onChange: handleOnChange,
|
|
37
|
+
value: selectedValue,
|
|
38
|
+
name,
|
|
39
|
+
isCentered
|
|
40
|
+
}), [handleOnChange, selectedValue, name, isCentered]);
|
|
41
|
+
return React__default.createElement(TilesContext.Provider, {
|
|
42
|
+
value: tileContext
|
|
43
|
+
}, React__default.createElement("div", Object.assign({
|
|
44
|
+
ref: ref,
|
|
45
|
+
role: "radiogroup"
|
|
46
|
+
}, props)));
|
|
47
|
+
});
|
|
48
|
+
TilesComponent.displayName = 'Tiles';
|
|
49
|
+
TilesComponent.propTypes = {
|
|
50
|
+
value: PropTypes.string,
|
|
51
|
+
onChange: PropTypes.func,
|
|
52
|
+
name: PropTypes.string.isRequired,
|
|
53
|
+
isCentered: PropTypes.bool
|
|
54
|
+
};
|
|
55
|
+
TilesComponent.defaultProps = {
|
|
56
|
+
isCentered: true
|
|
57
|
+
};
|
|
58
|
+
const Tiles = TilesComponent;
|
|
59
|
+
Tiles.Description = Description;
|
|
60
|
+
Tiles.Icon = Icon;
|
|
61
|
+
Tiles.Label = Label;
|
|
62
|
+
Tiles.Tile = Tile;
|
|
63
|
+
|
|
64
|
+
export { Tiles };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Zendesk, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
+
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
*/
|
|
7
|
+
import React__default, { forwardRef } from 'react';
|
|
8
|
+
import '../../../styled/common/StyledField.js';
|
|
9
|
+
import '../../../styled/common/StyledFieldset.js';
|
|
10
|
+
import '../../../styled/common/StyledLegend.js';
|
|
11
|
+
import '../../../styled/common/StyledHint.js';
|
|
12
|
+
import '../../../styled/common/StyledLabel.js';
|
|
13
|
+
import '../../../styled/common/StyledMessage.js';
|
|
14
|
+
import '../../../styled/common/StyledMessageIcon.js';
|
|
15
|
+
import '../../../styled/text/StyledTextInput.js';
|
|
16
|
+
import '../../../styled/text/StyledTextarea.js';
|
|
17
|
+
import '../../../styled/text/StyledTextFauxInput.js';
|
|
18
|
+
import '../../../styled/text/StyledTextMediaInput.js';
|
|
19
|
+
import '../../../styled/text/StyledTextMediaFigure.js';
|
|
20
|
+
import '../../../styled/input-group/StyledInputGroup.js';
|
|
21
|
+
import '../../../styled/checkbox/StyledCheckLabel.js';
|
|
22
|
+
import '../../../styled/checkbox/StyledCheckHint.js';
|
|
23
|
+
import '../../../styled/checkbox/StyledCheckInput.js';
|
|
24
|
+
import '../../../styled/checkbox/StyledCheckMessage.js';
|
|
25
|
+
import '../../../styled/checkbox/StyledCheckSvg.js';
|
|
26
|
+
import '../../../styled/checkbox/StyledDashSvg.js';
|
|
27
|
+
import '../../../styled/file-upload/StyledFileUpload.js';
|
|
28
|
+
import '../../../styled/file-list/StyledFile.js';
|
|
29
|
+
import '../../../styled/file-list/StyledFileClose.js';
|
|
30
|
+
import '../../../styled/file-list/StyledFileDelete.js';
|
|
31
|
+
import '../../../styled/file-list/StyledFileIcon.js';
|
|
32
|
+
import '../../../styled/file-list/StyledFileList.js';
|
|
33
|
+
import '../../../styled/file-list/StyledFileListItem.js';
|
|
34
|
+
import '../../../styled/radio/StyledRadioLabel.js';
|
|
35
|
+
import '../../../styled/radio/StyledRadioHint.js';
|
|
36
|
+
import '../../../styled/radio/StyledRadioInput.js';
|
|
37
|
+
import '../../../styled/radio/StyledRadioMessage.js';
|
|
38
|
+
import '../../../styled/radio/StyledRadioSvg.js';
|
|
39
|
+
import '../../../styled/toggle/StyledToggleLabel.js';
|
|
40
|
+
import '../../../styled/toggle/StyledToggleHint.js';
|
|
41
|
+
import '../../../styled/toggle/StyledToggleInput.js';
|
|
42
|
+
import '../../../styled/toggle/StyledToggleMessage.js';
|
|
43
|
+
import '../../../styled/toggle/StyledToggleSvg.js';
|
|
44
|
+
import '../../../styled/select/StyledSelect.js';
|
|
45
|
+
import '../../../styled/select/StyledSelectWrapper.js';
|
|
46
|
+
import '../../../styled/range/StyledRangeInput.js';
|
|
47
|
+
import '../../../styled/tiles/StyledTile.js';
|
|
48
|
+
import { StyledTileDescription } from '../../../styled/tiles/StyledTileDescription.js';
|
|
49
|
+
import '../../../styled/tiles/StyledTileIcon.js';
|
|
50
|
+
import '../../../styled/tiles/StyledTileInput.js';
|
|
51
|
+
import '../../../styled/tiles/StyledTileLabel.js';
|
|
52
|
+
import { useTilesContext } from '../../../utils/useTilesContext.js';
|
|
53
|
+
|
|
54
|
+
const DescriptionComponent = forwardRef((props, ref) => {
|
|
55
|
+
const tilesContext = useTilesContext();
|
|
56
|
+
return React__default.createElement(StyledTileDescription, Object.assign({
|
|
57
|
+
ref: ref,
|
|
58
|
+
isCentered: tilesContext && tilesContext.isCentered
|
|
59
|
+
}, props));
|
|
60
|
+
});
|
|
61
|
+
DescriptionComponent.displayName = 'Tiles.Description';
|
|
62
|
+
const Description = DescriptionComponent;
|
|
63
|
+
|
|
64
|
+
export { Description };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Zendesk, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
+
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
*/
|
|
7
|
+
import React__default, { forwardRef } from 'react';
|
|
8
|
+
import { useTilesContext } from '../../../utils/useTilesContext.js';
|
|
9
|
+
import '../../../styled/common/StyledField.js';
|
|
10
|
+
import '../../../styled/common/StyledFieldset.js';
|
|
11
|
+
import '../../../styled/common/StyledLegend.js';
|
|
12
|
+
import '../../../styled/common/StyledHint.js';
|
|
13
|
+
import '../../../styled/common/StyledLabel.js';
|
|
14
|
+
import '../../../styled/common/StyledMessage.js';
|
|
15
|
+
import '../../../styled/common/StyledMessageIcon.js';
|
|
16
|
+
import '../../../styled/text/StyledTextInput.js';
|
|
17
|
+
import '../../../styled/text/StyledTextarea.js';
|
|
18
|
+
import '../../../styled/text/StyledTextFauxInput.js';
|
|
19
|
+
import '../../../styled/text/StyledTextMediaInput.js';
|
|
20
|
+
import '../../../styled/text/StyledTextMediaFigure.js';
|
|
21
|
+
import '../../../styled/input-group/StyledInputGroup.js';
|
|
22
|
+
import '../../../styled/checkbox/StyledCheckLabel.js';
|
|
23
|
+
import '../../../styled/checkbox/StyledCheckHint.js';
|
|
24
|
+
import '../../../styled/checkbox/StyledCheckInput.js';
|
|
25
|
+
import '../../../styled/checkbox/StyledCheckMessage.js';
|
|
26
|
+
import '../../../styled/checkbox/StyledCheckSvg.js';
|
|
27
|
+
import '../../../styled/checkbox/StyledDashSvg.js';
|
|
28
|
+
import '../../../styled/file-upload/StyledFileUpload.js';
|
|
29
|
+
import '../../../styled/file-list/StyledFile.js';
|
|
30
|
+
import '../../../styled/file-list/StyledFileClose.js';
|
|
31
|
+
import '../../../styled/file-list/StyledFileDelete.js';
|
|
32
|
+
import '../../../styled/file-list/StyledFileIcon.js';
|
|
33
|
+
import '../../../styled/file-list/StyledFileList.js';
|
|
34
|
+
import '../../../styled/file-list/StyledFileListItem.js';
|
|
35
|
+
import '../../../styled/radio/StyledRadioLabel.js';
|
|
36
|
+
import '../../../styled/radio/StyledRadioHint.js';
|
|
37
|
+
import '../../../styled/radio/StyledRadioInput.js';
|
|
38
|
+
import '../../../styled/radio/StyledRadioMessage.js';
|
|
39
|
+
import '../../../styled/radio/StyledRadioSvg.js';
|
|
40
|
+
import '../../../styled/toggle/StyledToggleLabel.js';
|
|
41
|
+
import '../../../styled/toggle/StyledToggleHint.js';
|
|
42
|
+
import '../../../styled/toggle/StyledToggleInput.js';
|
|
43
|
+
import '../../../styled/toggle/StyledToggleMessage.js';
|
|
44
|
+
import '../../../styled/toggle/StyledToggleSvg.js';
|
|
45
|
+
import '../../../styled/select/StyledSelect.js';
|
|
46
|
+
import '../../../styled/select/StyledSelectWrapper.js';
|
|
47
|
+
import '../../../styled/range/StyledRangeInput.js';
|
|
48
|
+
import '../../../styled/tiles/StyledTile.js';
|
|
49
|
+
import '../../../styled/tiles/StyledTileDescription.js';
|
|
50
|
+
import { StyledTileIcon } from '../../../styled/tiles/StyledTileIcon.js';
|
|
51
|
+
import '../../../styled/tiles/StyledTileInput.js';
|
|
52
|
+
import '../../../styled/tiles/StyledTileLabel.js';
|
|
53
|
+
|
|
54
|
+
const IconComponent = forwardRef((props, ref) => {
|
|
55
|
+
const tileContext = useTilesContext();
|
|
56
|
+
return React__default.createElement(StyledTileIcon, Object.assign({
|
|
57
|
+
ref: ref,
|
|
58
|
+
isCentered: tileContext && tileContext.isCentered
|
|
59
|
+
}, props));
|
|
60
|
+
});
|
|
61
|
+
IconComponent.displayName = 'Tiles.Icon';
|
|
62
|
+
const Icon = IconComponent;
|
|
63
|
+
|
|
64
|
+
export { Icon };
|