@zendeskgarden/react-forms 8.75.1 → 8.76.0
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 +101 -0
- package/dist/esm/elements/FileUpload.js +79 -0
- package/dist/esm/elements/Input.js +97 -0
- package/dist/esm/elements/MediaInput.js +160 -0
- package/dist/esm/elements/MultiThumbRange.js +166 -0
- package/dist/esm/elements/Radio.js +85 -0
- package/dist/esm/elements/Range.js +112 -0
- package/dist/esm/elements/Select.js +101 -0
- package/dist/esm/elements/Textarea.js +174 -0
- package/dist/esm/elements/Toggle.js +85 -0
- package/dist/esm/elements/common/Field.js +96 -0
- package/dist/esm/elements/common/Fieldset.js +77 -0
- package/dist/esm/elements/common/Hint.js +96 -0
- package/dist/esm/elements/common/Label.js +142 -0
- package/dist/esm/elements/common/Legend.js +67 -0
- package/dist/esm/elements/common/Message.js +117 -0
- package/dist/esm/elements/faux-input/FauxInput.js +104 -0
- package/dist/esm/elements/faux-input/components/EndIcon.js +63 -0
- package/dist/esm/elements/faux-input/components/StartIcon.js +63 -0
- package/dist/esm/elements/file-list/FileList.js +70 -0
- package/dist/esm/elements/file-list/components/Close.js +79 -0
- package/dist/esm/elements/file-list/components/Delete.js +79 -0
- package/dist/esm/elements/file-list/components/File.js +98 -0
- package/dist/esm/elements/file-list/components/Item.js +68 -0
- package/dist/esm/elements/file-list/utils.js +50 -0
- package/dist/esm/elements/input-group/InputGroup.js +79 -0
- package/dist/esm/elements/tiles/Tiles.js +64 -0
- package/dist/esm/elements/tiles/components/Description.js +68 -0
- package/dist/esm/elements/tiles/components/Icon.js +68 -0
- package/dist/esm/elements/tiles/components/Label.js +77 -0
- package/dist/esm/elements/tiles/components/Tile.js +95 -0
- package/dist/esm/index.js +27 -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 +74 -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 +45 -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/range/StyledSlider.js +26 -0
- package/dist/esm/styled/range/StyledSliderThumb.js +45 -0
- package/dist/esm/styled/range/StyledSliderTrack.js +42 -0
- package/dist/esm/styled/range/StyledSliderTrackRail.js +28 -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 +59 -0
- package/dist/esm/styled/text/StyledTextInput.js +105 -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 +53 -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 +82 -98
- package/package.json +5 -5
- package/dist/index.esm.js +0 -2921
|
@@ -0,0 +1,27 @@
|
|
|
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 * as React from 'react';
|
|
8
|
+
|
|
9
|
+
var _path;
|
|
10
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
11
|
+
var SvgFileZipStroke = function SvgFileZipStroke(props) {
|
|
12
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
13
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
14
|
+
width: 16,
|
|
15
|
+
height: 16,
|
|
16
|
+
focusable: "false",
|
|
17
|
+
viewBox: "0 0 16 16",
|
|
18
|
+
"aria-hidden": "true"
|
|
19
|
+
}, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
|
|
20
|
+
fill: "none",
|
|
21
|
+
stroke: "currentColor",
|
|
22
|
+
strokeLinecap: "round",
|
|
23
|
+
d: "M6.5.5v11M5 2.5h1.5m0 1H8m-3 1h1.5m0 1H8m-3 1h1.5m0 1H8m-3 1h1.5m0 1H8m-3 1h1.5m8-6.3V15c0 .28-.22.5-.5.5H2c-.28 0-.5-.22-.5-.5V1c0-.28.22-.5.5-.5h8.85c.13 0 .26.05.36.15l3.15 3.2c.09.1.14.22.14.35zm-4-3.7V4c0 .28.22.5.5.5h3.5"
|
|
24
|
+
})));
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export { SvgFileZipStroke as default };
|
|
@@ -0,0 +1,27 @@
|
|
|
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 * as React from 'react';
|
|
8
|
+
|
|
9
|
+
var _path;
|
|
10
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
11
|
+
var SvgTrashStroke = function SvgTrashStroke(props) {
|
|
12
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
13
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
14
|
+
width: 16,
|
|
15
|
+
height: 16,
|
|
16
|
+
focusable: "false",
|
|
17
|
+
viewBox: "0 0 16 16",
|
|
18
|
+
"aria-hidden": "true"
|
|
19
|
+
}, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
|
|
20
|
+
fill: "none",
|
|
21
|
+
stroke: "currentColor",
|
|
22
|
+
strokeLinecap: "round",
|
|
23
|
+
d: "M6.5 2.5V1c0-.3.2-.5.5-.5h2c.3 0 .5.2.5.5v1.5M3 2.5h10m-6.5 11v-8m3 8v-8m-6-1V15c0 .3.2.5.5.5h8c.3 0 .5-.2.5-.5V4.5"
|
|
24
|
+
})));
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export { SvgTrashStroke as default };
|
|
@@ -0,0 +1,26 @@
|
|
|
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 * as React from 'react';
|
|
8
|
+
|
|
9
|
+
var _path;
|
|
10
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
11
|
+
var SvgXStroke = function SvgXStroke(props) {
|
|
12
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
13
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
14
|
+
width: 16,
|
|
15
|
+
height: 16,
|
|
16
|
+
focusable: "false",
|
|
17
|
+
viewBox: "0 0 16 16",
|
|
18
|
+
"aria-hidden": "true"
|
|
19
|
+
}, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
|
|
20
|
+
stroke: "currentColor",
|
|
21
|
+
strokeLinecap: "round",
|
|
22
|
+
d: "M3 13L13 3m0 10L3 3"
|
|
23
|
+
})));
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export { SvgXStroke as default };
|
|
@@ -0,0 +1,23 @@
|
|
|
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 styled from 'styled-components';
|
|
8
|
+
import { retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-theming';
|
|
9
|
+
import { StyledRadioHint } from '../radio/StyledRadioHint.js';
|
|
10
|
+
|
|
11
|
+
const COMPONENT_ID = 'forms.checkbox_hint';
|
|
12
|
+
const StyledCheckHint = styled(StyledRadioHint).attrs({
|
|
13
|
+
'data-garden-id': COMPONENT_ID,
|
|
14
|
+
'data-garden-version': '8.76.0'
|
|
15
|
+
}).withConfig({
|
|
16
|
+
displayName: "StyledCheckHint",
|
|
17
|
+
componentId: "sc-1kl8e8c-0"
|
|
18
|
+
})(["", ";"], props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
19
|
+
StyledCheckHint.defaultProps = {
|
|
20
|
+
theme: DEFAULT_THEME
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export { StyledCheckHint };
|
|
@@ -0,0 +1,34 @@
|
|
|
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 styled, { css } from 'styled-components';
|
|
8
|
+
import { retrieveComponentStyles, DEFAULT_THEME, getColorV8 } from '@zendeskgarden/react-theming';
|
|
9
|
+
import { StyledRadioInput } from '../radio/StyledRadioInput.js';
|
|
10
|
+
import { StyledCheckLabel } from './StyledCheckLabel.js';
|
|
11
|
+
|
|
12
|
+
const COMPONENT_ID = 'forms.checkbox';
|
|
13
|
+
const colorStyles = props => {
|
|
14
|
+
const SHADE = 600;
|
|
15
|
+
const indeterminateBorderColor = getColorV8('primaryHue', SHADE, props.theme);
|
|
16
|
+
const indeterminateBackgroundColor = indeterminateBorderColor;
|
|
17
|
+
const indeterminateActiveBorderColor = getColorV8('primaryHue', SHADE + 100, props.theme);
|
|
18
|
+
const indeterminateActiveBackgroundColor = indeterminateActiveBorderColor;
|
|
19
|
+
const indeterminateDisabledBackgroundColor = getColorV8('neutralHue', SHADE - 400, props.theme);
|
|
20
|
+
return css(["&:indeterminate ~ ", "::before{border-color:", ";background-color:", ";}&:enabled:indeterminate ~ ", ":active::before{border-color:", ";background-color:", ";}&:disabled:indeterminate ~ ", "::before{border-color:transparent;background-color:", ";}"], StyledCheckLabel, indeterminateBorderColor, indeterminateBackgroundColor, StyledCheckLabel, indeterminateActiveBorderColor, indeterminateActiveBackgroundColor, StyledCheckLabel, indeterminateDisabledBackgroundColor);
|
|
21
|
+
};
|
|
22
|
+
const StyledCheckInput = styled(StyledRadioInput).attrs({
|
|
23
|
+
'data-garden-id': COMPONENT_ID,
|
|
24
|
+
'data-garden-version': '8.76.0',
|
|
25
|
+
type: 'checkbox'
|
|
26
|
+
}).withConfig({
|
|
27
|
+
displayName: "StyledCheckInput",
|
|
28
|
+
componentId: "sc-176jxxe-0"
|
|
29
|
+
})(["& ~ ", "::before{border-radius:", ";}", ";", ";"], StyledCheckLabel, props => props.theme.borderRadii.md, props => colorStyles(props), props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
30
|
+
StyledCheckInput.defaultProps = {
|
|
31
|
+
theme: DEFAULT_THEME
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export { StyledCheckInput };
|
|
@@ -0,0 +1,23 @@
|
|
|
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 styled from 'styled-components';
|
|
8
|
+
import { retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-theming';
|
|
9
|
+
import { StyledRadioLabel } from '../radio/StyledRadioLabel.js';
|
|
10
|
+
|
|
11
|
+
const COMPONENT_ID = 'forms.checkbox_label';
|
|
12
|
+
const StyledCheckLabel = styled(StyledRadioLabel).attrs({
|
|
13
|
+
'data-garden-id': COMPONENT_ID,
|
|
14
|
+
'data-garden-version': '8.76.0'
|
|
15
|
+
}).withConfig({
|
|
16
|
+
displayName: "StyledCheckLabel",
|
|
17
|
+
componentId: "sc-x7nr1-0"
|
|
18
|
+
})(["", ";"], props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
19
|
+
StyledCheckLabel.defaultProps = {
|
|
20
|
+
theme: DEFAULT_THEME
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export { StyledCheckLabel };
|
|
@@ -0,0 +1,23 @@
|
|
|
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 styled from 'styled-components';
|
|
8
|
+
import { retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-theming';
|
|
9
|
+
import { StyledRadioMessage } from '../radio/StyledRadioMessage.js';
|
|
10
|
+
|
|
11
|
+
const COMPONENT_ID = 'forms.checkbox_message';
|
|
12
|
+
const StyledCheckMessage = styled(StyledRadioMessage).attrs({
|
|
13
|
+
'data-garden-id': COMPONENT_ID,
|
|
14
|
+
'data-garden-version': '8.76.0'
|
|
15
|
+
}).withConfig({
|
|
16
|
+
displayName: "StyledCheckMessage",
|
|
17
|
+
componentId: "sc-s4p6kd-0"
|
|
18
|
+
})(["", ";"], props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
19
|
+
StyledCheckMessage.defaultProps = {
|
|
20
|
+
theme: DEFAULT_THEME
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export { StyledCheckMessage };
|
|
@@ -0,0 +1,25 @@
|
|
|
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 styled from 'styled-components';
|
|
8
|
+
import SvgCheckSmFill from '../../node_modules/@zendeskgarden/svg-icons/src/12/check-sm-fill.svg.js';
|
|
9
|
+
import { retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-theming';
|
|
10
|
+
import { StyledCheckInput } from './StyledCheckInput.js';
|
|
11
|
+
import { StyledCheckLabel } from './StyledCheckLabel.js';
|
|
12
|
+
|
|
13
|
+
const COMPONENT_ID = 'forms.check_svg';
|
|
14
|
+
const StyledCheckSvg = styled(SvgCheckSmFill).attrs({
|
|
15
|
+
'data-garden-id': COMPONENT_ID,
|
|
16
|
+
'data-garden-version': '8.76.0'
|
|
17
|
+
}).withConfig({
|
|
18
|
+
displayName: "StyledCheckSvg",
|
|
19
|
+
componentId: "sc-fvxetk-0"
|
|
20
|
+
})(["transition:opacity 0.25s ease-in-out;opacity:0;pointer-events:none;", ":checked ~ ", " > &{opacity:1;}", ":indeterminate ~ ", " > &{opacity:0;}", ";"], StyledCheckInput, StyledCheckLabel, StyledCheckInput, StyledCheckLabel, props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
21
|
+
StyledCheckSvg.defaultProps = {
|
|
22
|
+
theme: DEFAULT_THEME
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export { StyledCheckSvg };
|
|
@@ -0,0 +1,25 @@
|
|
|
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 styled from 'styled-components';
|
|
8
|
+
import SvgDashFill from '../../node_modules/@zendeskgarden/svg-icons/src/12/dash-fill.svg.js';
|
|
9
|
+
import { retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-theming';
|
|
10
|
+
import { StyledCheckInput } from './StyledCheckInput.js';
|
|
11
|
+
import { StyledCheckLabel } from './StyledCheckLabel.js';
|
|
12
|
+
|
|
13
|
+
const COMPONENT_ID = 'forms.dash_svg';
|
|
14
|
+
const StyledDashSvg = styled(SvgDashFill).attrs({
|
|
15
|
+
'data-garden-id': COMPONENT_ID,
|
|
16
|
+
'data-garden-version': '8.76.0'
|
|
17
|
+
}).withConfig({
|
|
18
|
+
displayName: "StyledDashSvg",
|
|
19
|
+
componentId: "sc-z3vq71-0"
|
|
20
|
+
})(["transition:opacity 0.25s ease-in-out;opacity:0;pointer-events:none;", ":indeterminate ~ ", " > &{opacity:1;}", ";"], StyledCheckInput, StyledCheckLabel, props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
21
|
+
StyledDashSvg.defaultProps = {
|
|
22
|
+
theme: DEFAULT_THEME
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export { StyledDashSvg };
|
|
@@ -0,0 +1,22 @@
|
|
|
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 styled from 'styled-components';
|
|
8
|
+
import { retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-theming';
|
|
9
|
+
|
|
10
|
+
const COMPONENT_ID = 'forms.field';
|
|
11
|
+
const StyledField = styled.div.attrs({
|
|
12
|
+
'data-garden-id': COMPONENT_ID,
|
|
13
|
+
'data-garden-version': '8.76.0'
|
|
14
|
+
}).withConfig({
|
|
15
|
+
displayName: "StyledField",
|
|
16
|
+
componentId: "sc-12gzfsu-0"
|
|
17
|
+
})(["position:relative;direction:", ";margin:0;border:0;padding:0;font-size:0;", ";"], props => props.theme.rtl ? 'rtl' : 'ltr', props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
18
|
+
StyledField.defaultProps = {
|
|
19
|
+
theme: DEFAULT_THEME
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export { StyledField };
|
|
@@ -0,0 +1,24 @@
|
|
|
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 styled from 'styled-components';
|
|
8
|
+
import { retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-theming';
|
|
9
|
+
import { StyledField } from './StyledField.js';
|
|
10
|
+
|
|
11
|
+
const COMPONENT_ID = 'forms.fieldset';
|
|
12
|
+
const StyledFieldset = styled(StyledField).attrs({
|
|
13
|
+
as: 'fieldset',
|
|
14
|
+
'data-garden-id': COMPONENT_ID,
|
|
15
|
+
'data-garden-version': '8.76.0'
|
|
16
|
+
}).withConfig({
|
|
17
|
+
displayName: "StyledFieldset",
|
|
18
|
+
componentId: "sc-1vr4mxv-0"
|
|
19
|
+
})(["", "{margin-top:", "px;}", ";"], StyledField, props => props.theme.space.base * (props.isCompact ? 1 : 2), props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
20
|
+
StyledFieldset.defaultProps = {
|
|
21
|
+
theme: DEFAULT_THEME
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export { StyledFieldset };
|
|
@@ -0,0 +1,22 @@
|
|
|
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 styled from 'styled-components';
|
|
8
|
+
import { getLineHeight, getColorV8, retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-theming';
|
|
9
|
+
|
|
10
|
+
const COMPONENT_ID = 'forms.input_hint';
|
|
11
|
+
const StyledHint = styled.div.attrs(props => ({
|
|
12
|
+
'data-garden-id': props['data-garden-id'] || COMPONENT_ID,
|
|
13
|
+
'data-garden-version': props['data-garden-version'] || '8.76.0'
|
|
14
|
+
})).withConfig({
|
|
15
|
+
displayName: "StyledHint",
|
|
16
|
+
componentId: "sc-17c2wu8-0"
|
|
17
|
+
})(["direction:", ";display:block;vertical-align:middle;line-height:", ";color:", ";font-size:", ";", ";"], props => props.theme.rtl && 'rtl', props => getLineHeight(props.theme.space.base * 5, props.theme.fontSizes.md), props => getColorV8('neutralHue', 600, props.theme), props => props.theme.fontSizes.md, props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
18
|
+
StyledHint.defaultProps = {
|
|
19
|
+
theme: DEFAULT_THEME
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export { StyledHint };
|
|
@@ -0,0 +1,23 @@
|
|
|
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 styled from 'styled-components';
|
|
8
|
+
import { hideVisually } from 'polished';
|
|
9
|
+
import { getLineHeight, getColorV8, retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-theming';
|
|
10
|
+
|
|
11
|
+
const COMPONENT_ID = 'forms.input_label';
|
|
12
|
+
const StyledLabel = styled.label.attrs(props => ({
|
|
13
|
+
'data-garden-id': props['data-garden-id'] || COMPONENT_ID,
|
|
14
|
+
'data-garden-version': props['data-garden-version'] || '8.76.0'
|
|
15
|
+
})).withConfig({
|
|
16
|
+
displayName: "StyledLabel",
|
|
17
|
+
componentId: "sc-2utmsz-0"
|
|
18
|
+
})(["direction:", ";vertical-align:middle;line-height:", ";color:", ";font-size:", ";font-weight:", ";&[hidden]{display:", ";vertical-align:", ";text-indent:", ";font-size:", ";", ";}", ";"], props => props.theme.rtl && 'rtl', props => getLineHeight(props.theme.space.base * 5, props.theme.fontSizes.md), props => getColorV8('foreground', 600 , props.theme), props => props.theme.fontSizes.md, props => props.isRegular ? props.theme.fontWeights.regular : props.theme.fontWeights.semibold, props => props.isRadio ? 'inline-block' : 'inline', props => props.isRadio && 'top', props => props.isRadio && '-100%', props => props.isRadio && '0', props => !props.isRadio && hideVisually(), props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
19
|
+
StyledLabel.defaultProps = {
|
|
20
|
+
theme: DEFAULT_THEME
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export { StyledLabel };
|
|
@@ -0,0 +1,24 @@
|
|
|
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 styled from 'styled-components';
|
|
8
|
+
import { retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-theming';
|
|
9
|
+
import { StyledLabel } from './StyledLabel.js';
|
|
10
|
+
|
|
11
|
+
const COMPONENT_ID = 'forms.fieldset_legend';
|
|
12
|
+
const StyledLegend = styled(StyledLabel).attrs({
|
|
13
|
+
as: 'legend',
|
|
14
|
+
'data-garden-id': COMPONENT_ID,
|
|
15
|
+
'data-garden-version': '8.76.0'
|
|
16
|
+
}).withConfig({
|
|
17
|
+
displayName: "StyledLegend",
|
|
18
|
+
componentId: "sc-6s0zwq-0"
|
|
19
|
+
})(["padding:0;", ";"], props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
20
|
+
StyledLegend.defaultProps = {
|
|
21
|
+
theme: DEFAULT_THEME
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export { StyledLegend };
|
|
@@ -0,0 +1,40 @@
|
|
|
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 styled, { css } from 'styled-components';
|
|
8
|
+
import { math } from 'polished';
|
|
9
|
+
import { getLineHeight, retrieveComponentStyles, DEFAULT_THEME, getColorV8 } from '@zendeskgarden/react-theming';
|
|
10
|
+
import { StyledMessageIcon } from './StyledMessageIcon.js';
|
|
11
|
+
import { StyledLabel } from './StyledLabel.js';
|
|
12
|
+
|
|
13
|
+
const validationStyles = props => {
|
|
14
|
+
const rtl = props.theme.rtl;
|
|
15
|
+
const padding = math(`${props.theme.space.base} * 2px + ${props.theme.iconSizes.md}`);
|
|
16
|
+
let color;
|
|
17
|
+
if (props.validation === 'error') {
|
|
18
|
+
color = getColorV8('dangerHue', 600, props.theme);
|
|
19
|
+
} else if (props.validation === 'success') {
|
|
20
|
+
color = getColorV8('successHue', 600, props.theme);
|
|
21
|
+
} else if (props.validation === 'warning') {
|
|
22
|
+
color = getColorV8('warningHue', 700, props.theme);
|
|
23
|
+
} else {
|
|
24
|
+
color = getColorV8('neutralHue', 700, props.theme);
|
|
25
|
+
}
|
|
26
|
+
return css(["padding-", ":", ";color:", ";"], rtl ? 'right' : 'left', props.validation && padding, color);
|
|
27
|
+
};
|
|
28
|
+
const COMPONENT_ID = 'forms.input_message';
|
|
29
|
+
const StyledMessage = styled.div.attrs(props => ({
|
|
30
|
+
'data-garden-id': props['data-garden-id'] || COMPONENT_ID,
|
|
31
|
+
'data-garden-version': props['data-garden-version'] || '8.76.0'
|
|
32
|
+
})).withConfig({
|
|
33
|
+
displayName: "StyledMessage",
|
|
34
|
+
componentId: "sc-30hgg7-0"
|
|
35
|
+
})(["direction:", ";display:inline-block;position:relative;vertical-align:middle;line-height:", ";font-size:", ";", ";& ", "{position:absolute;top:-1px;", ":0;}", ":not([hidden]) + &{display:block;margin-top:", ";}", ";"], props => props.theme.rtl && 'rtl', props => getLineHeight(props.theme.iconSizes.md, props.theme.fontSizes.sm), props => props.theme.fontSizes.sm, props => validationStyles(props), StyledMessageIcon, props => props.theme.rtl ? 'right' : 'left', StyledLabel, props => math(`${props.theme.space.base} * 1px`), props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
36
|
+
StyledMessage.defaultProps = {
|
|
37
|
+
theme: DEFAULT_THEME
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export { StyledMessage };
|
|
@@ -0,0 +1,45 @@
|
|
|
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 styled from 'styled-components';
|
|
8
|
+
import React__default, { Children } from 'react';
|
|
9
|
+
import { retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-theming';
|
|
10
|
+
import SvgAlertErrorStroke from '../../node_modules/@zendeskgarden/svg-icons/src/16/alert-error-stroke.svg.js';
|
|
11
|
+
import SvgAlertWarningStroke from '../../node_modules/@zendeskgarden/svg-icons/src/16/alert-warning-stroke.svg.js';
|
|
12
|
+
import SvgCheckCircleStroke from '../../node_modules/@zendeskgarden/svg-icons/src/16/check-circle-stroke.svg.js';
|
|
13
|
+
|
|
14
|
+
const MessageIcon = _ref => {
|
|
15
|
+
let {
|
|
16
|
+
children,
|
|
17
|
+
validation,
|
|
18
|
+
...props
|
|
19
|
+
} = _ref;
|
|
20
|
+
let retVal;
|
|
21
|
+
if (validation === 'error') {
|
|
22
|
+
retVal = React__default.createElement(SvgAlertErrorStroke, props);
|
|
23
|
+
} else if (validation === 'success') {
|
|
24
|
+
retVal = React__default.createElement(SvgCheckCircleStroke, props);
|
|
25
|
+
} else if (validation === 'warning') {
|
|
26
|
+
retVal = React__default.createElement(SvgAlertWarningStroke, props);
|
|
27
|
+
} else {
|
|
28
|
+
retVal = React__default.cloneElement(Children.only(children));
|
|
29
|
+
}
|
|
30
|
+
return retVal;
|
|
31
|
+
};
|
|
32
|
+
const COMPONENT_ID = 'forms.input_message_icon';
|
|
33
|
+
const StyledMessageIcon = styled(MessageIcon).attrs({
|
|
34
|
+
'data-garden-id': COMPONENT_ID,
|
|
35
|
+
'data-garden-version': '8.76.0',
|
|
36
|
+
'aria-hidden': null
|
|
37
|
+
}).withConfig({
|
|
38
|
+
displayName: "StyledMessageIcon",
|
|
39
|
+
componentId: "sc-1ph2gba-0"
|
|
40
|
+
})(["width:", ";height:", ";", ";"], props => props.theme.iconSizes.md, props => props.theme.iconSizes.md, props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
41
|
+
StyledMessageIcon.defaultProps = {
|
|
42
|
+
theme: DEFAULT_THEME
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export { StyledMessageIcon };
|
|
@@ -0,0 +1,74 @@
|
|
|
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 styled, { css } from 'styled-components';
|
|
8
|
+
import { retrieveComponentStyles, DEFAULT_THEME, getColorV8, focusStyles, getLineHeight } from '@zendeskgarden/react-theming';
|
|
9
|
+
import { StyledFileClose } from './StyledFileClose.js';
|
|
10
|
+
|
|
11
|
+
const COMPONENT_ID = 'forms.file';
|
|
12
|
+
const colorStyles = props => {
|
|
13
|
+
let borderColor;
|
|
14
|
+
let focusBorderColor;
|
|
15
|
+
let foregroundColor;
|
|
16
|
+
if (props.validation === 'success') {
|
|
17
|
+
borderColor = getColorV8('successHue', 600, props.theme);
|
|
18
|
+
focusBorderColor = borderColor;
|
|
19
|
+
foregroundColor = borderColor;
|
|
20
|
+
} else if (props.validation === 'error') {
|
|
21
|
+
borderColor = getColorV8('dangerHue', 600, props.theme);
|
|
22
|
+
focusBorderColor = borderColor;
|
|
23
|
+
foregroundColor = borderColor;
|
|
24
|
+
} else {
|
|
25
|
+
borderColor = getColorV8('neutralHue', 300, props.theme);
|
|
26
|
+
focusBorderColor = getColorV8('primaryHue', 600, props.theme);
|
|
27
|
+
foregroundColor = getColorV8('foreground', 600 , props.theme);
|
|
28
|
+
}
|
|
29
|
+
return css(["border-color:", ";color:", ";", ""], borderColor, foregroundColor, focusStyles({
|
|
30
|
+
theme: props.theme,
|
|
31
|
+
inset: props.focusInset,
|
|
32
|
+
hue: focusBorderColor,
|
|
33
|
+
styles: {
|
|
34
|
+
borderColor: focusBorderColor
|
|
35
|
+
}
|
|
36
|
+
}));
|
|
37
|
+
};
|
|
38
|
+
const sizeStyles = props => {
|
|
39
|
+
const size = `${props.theme.space.base * (props.isCompact ? 7 : 10)}px`;
|
|
40
|
+
const spacing = `${props.theme.space.base * (props.isCompact ? 2 : 3)}px`;
|
|
41
|
+
const fontSize = props.theme.fontSizes.md;
|
|
42
|
+
const lineHeight = getLineHeight(props.theme.space.base * 5, fontSize);
|
|
43
|
+
return `
|
|
44
|
+
box-sizing: border-box;
|
|
45
|
+
border: ${props.theme.borders.sm};
|
|
46
|
+
border-radius: ${props.theme.borderRadii.md};
|
|
47
|
+
padding: 0 ${spacing};
|
|
48
|
+
height: ${size};
|
|
49
|
+
line-height: ${lineHeight};
|
|
50
|
+
font-size: ${fontSize};
|
|
51
|
+
|
|
52
|
+
& > span {
|
|
53
|
+
width: 100%;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
& > ${StyledFileClose} {
|
|
57
|
+
width: ${size};
|
|
58
|
+
height: ${size};
|
|
59
|
+
margin-${props.theme.rtl ? 'left' : 'right'}: -${spacing};
|
|
60
|
+
}
|
|
61
|
+
`;
|
|
62
|
+
};
|
|
63
|
+
const StyledFile = styled.div.attrs({
|
|
64
|
+
'data-garden-id': COMPONENT_ID,
|
|
65
|
+
'data-garden-version': '8.76.0'
|
|
66
|
+
}).withConfig({
|
|
67
|
+
displayName: "StyledFile",
|
|
68
|
+
componentId: "sc-195lzp1-0"
|
|
69
|
+
})(["display:flex;position:relative;flex-wrap:nowrap;align-items:center;transition:box-shadow 0.1s ease-in-out;", ";", ";& > span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}& > [role='progressbar']{position:absolute;bottom:0;left:0;transition:opacity 0.2s ease-in-out;margin:0;border-top-left-radius:0;border-top-right-radius:0;width:100%;& > div{border-top-", "-radius:0;}}& > [role='progressbar'][aria-valuenow='0'],& > [role='progressbar'][aria-valuenow='100']{opacity:0;}", ";"], sizeStyles, colorStyles, props => props.theme.rtl ? 'right' : 'left', props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
70
|
+
StyledFile.defaultProps = {
|
|
71
|
+
theme: DEFAULT_THEME
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
export { StyledFile };
|
|
@@ -0,0 +1,22 @@
|
|
|
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 styled from 'styled-components';
|
|
8
|
+
import { getColorV8, retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-theming';
|
|
9
|
+
|
|
10
|
+
const COMPONENT_ID = 'forms.file.close';
|
|
11
|
+
const StyledFileClose = styled.button.attrs({
|
|
12
|
+
'data-garden-id': COMPONENT_ID,
|
|
13
|
+
'data-garden-version': '8.76.0'
|
|
14
|
+
}).withConfig({
|
|
15
|
+
displayName: "StyledFileClose",
|
|
16
|
+
componentId: "sc-1m31jbf-0"
|
|
17
|
+
})(["display:flex;flex-shrink:0;align-items:center;justify-content:center;transition:opacity 0.25s ease-in-out;opacity:0.8;border:none;background:transparent;cursor:pointer;color:", ";appearance:none;&:hover{opacity:0.9;}&:focus{outline:none;}", ";"], props => getColorV8('foreground', 600 , props.theme), props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
18
|
+
StyledFileClose.defaultProps = {
|
|
19
|
+
theme: DEFAULT_THEME
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export { StyledFileClose };
|
|
@@ -0,0 +1,23 @@
|
|
|
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 styled from 'styled-components';
|
|
8
|
+
import { getColorV8, retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-theming';
|
|
9
|
+
import { StyledFileClose } from './StyledFileClose.js';
|
|
10
|
+
|
|
11
|
+
const COMPONENT_ID = 'forms.file.delete';
|
|
12
|
+
const StyledFileDelete = styled(StyledFileClose).attrs({
|
|
13
|
+
'data-garden-id': COMPONENT_ID,
|
|
14
|
+
'data-garden-version': '8.76.0'
|
|
15
|
+
}).withConfig({
|
|
16
|
+
displayName: "StyledFileDelete",
|
|
17
|
+
componentId: "sc-a8nnhx-0"
|
|
18
|
+
})(["color:", ";", ";"], props => getColorV8('dangerHue', 600, props.theme), props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
19
|
+
StyledFileDelete.defaultProps = {
|
|
20
|
+
theme: DEFAULT_THEME
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export { StyledFileDelete };
|
|
@@ -0,0 +1,31 @@
|
|
|
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, { Children } from 'react';
|
|
8
|
+
import styled from 'styled-components';
|
|
9
|
+
import { retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-theming';
|
|
10
|
+
|
|
11
|
+
const COMPONENT_ID = 'forms.file.icon';
|
|
12
|
+
const StyledFileIcon = styled(_ref => {
|
|
13
|
+
let {
|
|
14
|
+
children,
|
|
15
|
+
isCompact,
|
|
16
|
+
theme,
|
|
17
|
+
...props
|
|
18
|
+
} = _ref;
|
|
19
|
+
return React__default.cloneElement(Children.only(children), props);
|
|
20
|
+
}).attrs({
|
|
21
|
+
'data-garden-id': COMPONENT_ID,
|
|
22
|
+
'data-garden-version': '8.76.0'
|
|
23
|
+
}).withConfig({
|
|
24
|
+
displayName: "StyledFileIcon",
|
|
25
|
+
componentId: "sc-7b3q0c-0"
|
|
26
|
+
})(["flex-shrink:0;width:", ";margin-", ":", "px;", ";"], props => props.isCompact ? props.theme.iconSizes.sm : props.theme.iconSizes.md, props => props.theme.rtl ? 'left' : 'right', props => props.theme.space.base * 2, props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
27
|
+
StyledFileIcon.defaultProps = {
|
|
28
|
+
theme: DEFAULT_THEME
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export { StyledFileIcon };
|
|
@@ -0,0 +1,22 @@
|
|
|
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 styled from 'styled-components';
|
|
8
|
+
import { retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-theming';
|
|
9
|
+
|
|
10
|
+
const COMPONENT_ID = 'forms.file_list';
|
|
11
|
+
const StyledFileList = styled.ul.attrs({
|
|
12
|
+
'data-garden-id': COMPONENT_ID,
|
|
13
|
+
'data-garden-version': '8.76.0'
|
|
14
|
+
}).withConfig({
|
|
15
|
+
displayName: "StyledFileList",
|
|
16
|
+
componentId: "sc-gbahjg-0"
|
|
17
|
+
})(["margin:0;padding:0;list-style:none;", ";"], props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
18
|
+
StyledFileList.defaultProps = {
|
|
19
|
+
theme: DEFAULT_THEME
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export { StyledFileList };
|