@zendeskgarden/react-forms 9.0.0-next.2 → 9.0.0-next.20
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/README.md +4 -4
- 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 +98 -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 +72 -0
- package/dist/esm/elements/faux-input/components/StartIcon.js +72 -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 +95 -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 +89 -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 +78 -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 +25 -0
- package/dist/esm/styled/common/StyledLabel.js +26 -0
- package/dist/esm/styled/common/StyledLegend.js +24 -0
- package/dist/esm/styled/common/StyledMessage.js +57 -0
- package/dist/esm/styled/common/StyledMessageIcon.js +45 -0
- package/dist/esm/styled/file-list/StyledFile.js +97 -0
- package/dist/esm/styled/file-list/StyledFileClose.js +25 -0
- package/dist/esm/styled/file-list/StyledFileDelete.js +26 -0
- package/dist/esm/styled/file-list/StyledFileIcon.js +42 -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 +116 -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 +122 -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 +210 -0
- package/dist/esm/styled/select/StyledSelect.js +60 -0
- package/dist/esm/styled/select/StyledSelectWrapper.js +32 -0
- package/dist/esm/styled/text/StyledTextFauxInput.js +69 -0
- package/dist/esm/styled/text/StyledTextInput.js +152 -0
- package/dist/esm/styled/text/StyledTextMediaFigure.js +68 -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 +114 -0
- package/dist/esm/styled/tiles/StyledTileDescription.js +34 -0
- package/dist/esm/styled/tiles/StyledTileIcon.js +77 -0
- package/dist/esm/styled/tiles/StyledTileInput.js +18 -0
- package/dist/esm/styled/tiles/StyledTileLabel.js +34 -0
- package/dist/esm/styled/toggle/StyledToggleHint.js +24 -0
- package/dist/esm/styled/toggle/StyledToggleInput.js +65 -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 +1239 -919
- package/dist/typings/elements/common/Field.d.ts +10 -9
- package/dist/typings/elements/common/Hint.d.ts +2 -0
- package/dist/typings/elements/common/Label.d.ts +2 -0
- package/dist/typings/elements/common/Message.d.ts +2 -0
- package/dist/typings/elements/faux-input/FauxInput.d.ts +1 -11
- package/dist/typings/elements/faux-input/components/EndIcon.d.ts +1 -1
- package/dist/typings/elements/faux-input/components/StartIcon.d.ts +1 -1
- package/dist/typings/index.d.ts +3 -4
- package/dist/typings/styled/file-list/StyledFileIcon.d.ts +8 -2
- package/dist/typings/styled/index.d.ts +0 -4
- package/dist/typings/styled/select/StyledSelect.d.ts +1 -4
- package/dist/typings/styled/select/StyledSelectWrapper.d.ts +3 -1
- package/dist/typings/styled/text/StyledTextFauxInput.d.ts +0 -4
- package/dist/typings/styled/text/StyledTextMediaFigure.d.ts +7 -7
- package/dist/typings/styled/text/StyledTextarea.d.ts +1 -1
- package/dist/typings/styled/tiles/StyledTile.d.ts +4 -7
- package/dist/typings/types/index.d.ts +6 -33
- package/dist/typings/utils/useFieldContext.d.ts +1 -2
- package/package.json +8 -9
- package/dist/index.esm.js +0 -2921
- package/dist/typings/elements/MultiThumbRange.d.ts +0 -14
- package/dist/typings/styled/range/StyledSlider.d.ts +0 -10
- package/dist/typings/styled/range/StyledSliderThumb.d.ts +0 -13
- package/dist/typings/styled/range/StyledSliderTrack.d.ts +0 -14
- package/dist/typings/styled/range/StyledSliderTrackRail.d.ts +0 -11
|
@@ -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': '9.0.0-next.20'
|
|
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,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 { getLineHeight, getColor, 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'] || '9.0.0-next.20'
|
|
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 => getColor({
|
|
18
|
+
theme: props.theme,
|
|
19
|
+
variable: 'foreground.subtle'
|
|
20
|
+
}), props => props.theme.fontSizes.md, props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
21
|
+
StyledHint.defaultProps = {
|
|
22
|
+
theme: DEFAULT_THEME
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export { StyledHint };
|
|
@@ -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 styled from 'styled-components';
|
|
8
|
+
import { hideVisually } from 'polished';
|
|
9
|
+
import { getLineHeight, getColor, 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'] || '9.0.0-next.20'
|
|
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 => getColor({
|
|
19
|
+
theme: props.theme,
|
|
20
|
+
variable: 'foreground.default'
|
|
21
|
+
}), 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));
|
|
22
|
+
StyledLabel.defaultProps = {
|
|
23
|
+
theme: DEFAULT_THEME
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
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': '9.0.0-next.20'
|
|
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,57 @@
|
|
|
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 { retrieveComponentStyles, DEFAULT_THEME, getColor, getLineHeight } from '@zendeskgarden/react-theming';
|
|
10
|
+
import { StyledMessageIcon } from './StyledMessageIcon.js';
|
|
11
|
+
import { StyledLabel } from './StyledLabel.js';
|
|
12
|
+
|
|
13
|
+
const COMPONENT_ID = 'forms.input_message';
|
|
14
|
+
const colorStyles = _ref => {
|
|
15
|
+
let {
|
|
16
|
+
theme,
|
|
17
|
+
validation
|
|
18
|
+
} = _ref;
|
|
19
|
+
let variable;
|
|
20
|
+
if (validation === 'error') {
|
|
21
|
+
variable = 'foreground.danger';
|
|
22
|
+
} else if (validation === 'success') {
|
|
23
|
+
variable = 'foreground.success';
|
|
24
|
+
} else if (validation === 'warning') {
|
|
25
|
+
variable = 'foreground.warning';
|
|
26
|
+
} else {
|
|
27
|
+
variable = 'foreground.subtle';
|
|
28
|
+
}
|
|
29
|
+
const foregroundColor = getColor({
|
|
30
|
+
theme,
|
|
31
|
+
variable
|
|
32
|
+
});
|
|
33
|
+
return css(["color:", ";"], foregroundColor);
|
|
34
|
+
};
|
|
35
|
+
const sizeStyles = _ref2 => {
|
|
36
|
+
let {
|
|
37
|
+
theme,
|
|
38
|
+
validation
|
|
39
|
+
} = _ref2;
|
|
40
|
+
const fontSize = theme.fontSizes.sm;
|
|
41
|
+
const lineHeight = getLineHeight(theme.iconSizes.md, theme.fontSizes.sm);
|
|
42
|
+
const marginTop = `${theme.space.base}px`;
|
|
43
|
+
const paddingHorizontal = validation ? math(`${theme.space.base * 2} + ${theme.iconSizes.md}`) : undefined;
|
|
44
|
+
return css(["padding-", ":", ";line-height:", ";font-size:", ";", ":not([hidden]) + &{margin-top:", ";}"], theme.rtl ? 'right' : 'left', paddingHorizontal, lineHeight, fontSize, StyledLabel, marginTop);
|
|
45
|
+
};
|
|
46
|
+
const StyledMessage = styled.div.attrs(props => ({
|
|
47
|
+
'data-garden-id': props['data-garden-id'] || COMPONENT_ID,
|
|
48
|
+
'data-garden-version': props['data-garden-version'] || '9.0.0-next.20'
|
|
49
|
+
})).withConfig({
|
|
50
|
+
displayName: "StyledMessage",
|
|
51
|
+
componentId: "sc-30hgg7-0"
|
|
52
|
+
})(["direction:", ";display:inline-block;position:relative;vertical-align:middle;", ";", ";& ", "{position:absolute;top:-1px;", ":0;}", ":not([hidden]) + &{display:block;}", ";"], props => props.theme.rtl && 'rtl', sizeStyles, colorStyles, StyledMessageIcon, props => props.theme.rtl ? 'right' : 'left', StyledLabel, props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
53
|
+
StyledMessage.defaultProps = {
|
|
54
|
+
theme: DEFAULT_THEME
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
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': '9.0.0-next.20',
|
|
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,97 @@
|
|
|
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, getColor, focusStyles, getLineHeight } from '@zendeskgarden/react-theming';
|
|
9
|
+
import { StyledFileClose } from './StyledFileClose.js';
|
|
10
|
+
|
|
11
|
+
const COMPONENT_ID = 'forms.file';
|
|
12
|
+
const colorStyles = _ref => {
|
|
13
|
+
let {
|
|
14
|
+
theme,
|
|
15
|
+
focusInset,
|
|
16
|
+
validation
|
|
17
|
+
} = _ref;
|
|
18
|
+
let borderVariable;
|
|
19
|
+
let focusBorderVariable;
|
|
20
|
+
let foregroundVariable;
|
|
21
|
+
if (validation === 'success') {
|
|
22
|
+
borderVariable = 'border.successEmphasis';
|
|
23
|
+
focusBorderVariable = borderVariable;
|
|
24
|
+
foregroundVariable = 'foreground.success';
|
|
25
|
+
} else if (validation === 'error') {
|
|
26
|
+
borderVariable = 'border.dangerEmphasis';
|
|
27
|
+
focusBorderVariable = borderVariable;
|
|
28
|
+
foregroundVariable = 'foreground.danger';
|
|
29
|
+
} else {
|
|
30
|
+
borderVariable = 'border.default';
|
|
31
|
+
focusBorderVariable = 'border.primaryEmphasis';
|
|
32
|
+
foregroundVariable = 'foreground.default';
|
|
33
|
+
}
|
|
34
|
+
const borderColor = getColor({
|
|
35
|
+
theme,
|
|
36
|
+
variable: borderVariable
|
|
37
|
+
});
|
|
38
|
+
const focusBorderColor = getColor({
|
|
39
|
+
theme,
|
|
40
|
+
variable: focusBorderVariable
|
|
41
|
+
});
|
|
42
|
+
const foregroundColor = getColor({
|
|
43
|
+
theme,
|
|
44
|
+
variable: foregroundVariable
|
|
45
|
+
});
|
|
46
|
+
return css(["border-color:", ";color:", ";", ""], borderColor, foregroundColor, focusStyles({
|
|
47
|
+
theme,
|
|
48
|
+
inset: focusInset,
|
|
49
|
+
color: {
|
|
50
|
+
variable: focusBorderVariable
|
|
51
|
+
},
|
|
52
|
+
styles: {
|
|
53
|
+
borderColor: focusBorderColor
|
|
54
|
+
}
|
|
55
|
+
}));
|
|
56
|
+
};
|
|
57
|
+
const sizeStyles = _ref2 => {
|
|
58
|
+
let {
|
|
59
|
+
theme,
|
|
60
|
+
isCompact
|
|
61
|
+
} = _ref2;
|
|
62
|
+
const size = `${theme.space.base * (isCompact ? 7 : 10)}px`;
|
|
63
|
+
const spacing = `${theme.space.base * (isCompact ? 2 : 3)}px`;
|
|
64
|
+
const fontSize = theme.fontSizes.md;
|
|
65
|
+
const lineHeight = getLineHeight(theme.space.base * 5, fontSize);
|
|
66
|
+
return `
|
|
67
|
+
box-sizing: border-box;
|
|
68
|
+
border: ${theme.borders.sm};
|
|
69
|
+
border-radius: ${theme.borderRadii.md};
|
|
70
|
+
padding: 0 ${spacing};
|
|
71
|
+
height: ${size};
|
|
72
|
+
line-height: ${lineHeight};
|
|
73
|
+
font-size: ${fontSize};
|
|
74
|
+
|
|
75
|
+
& > span {
|
|
76
|
+
width: 100%;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
& > ${StyledFileClose} {
|
|
80
|
+
width: ${size};
|
|
81
|
+
height: ${size};
|
|
82
|
+
margin-${theme.rtl ? 'left' : 'right'}: -${spacing};
|
|
83
|
+
}
|
|
84
|
+
`;
|
|
85
|
+
};
|
|
86
|
+
const StyledFile = styled.div.attrs({
|
|
87
|
+
'data-garden-id': COMPONENT_ID,
|
|
88
|
+
'data-garden-version': '9.0.0-next.20'
|
|
89
|
+
}).withConfig({
|
|
90
|
+
displayName: "StyledFile",
|
|
91
|
+
componentId: "sc-195lzp1-0"
|
|
92
|
+
})(["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));
|
|
93
|
+
StyledFile.defaultProps = {
|
|
94
|
+
theme: DEFAULT_THEME
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
export { StyledFile };
|
|
@@ -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 { getColor, 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': '9.0.0-next.20'
|
|
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 => getColor({
|
|
18
|
+
theme: props.theme,
|
|
19
|
+
variable: 'foreground.subtle'
|
|
20
|
+
}), props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
21
|
+
StyledFileClose.defaultProps = {
|
|
22
|
+
theme: DEFAULT_THEME
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export { StyledFileClose };
|
|
@@ -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 styled from 'styled-components';
|
|
8
|
+
import { getColor, 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': '9.0.0-next.20'
|
|
15
|
+
}).withConfig({
|
|
16
|
+
displayName: "StyledFileDelete",
|
|
17
|
+
componentId: "sc-a8nnhx-0"
|
|
18
|
+
})(["color:", ";", ";"], props => getColor({
|
|
19
|
+
theme: props.theme,
|
|
20
|
+
variable: 'foreground.danger'
|
|
21
|
+
}), props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
22
|
+
StyledFileDelete.defaultProps = {
|
|
23
|
+
theme: DEFAULT_THEME
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export { StyledFileDelete };
|
|
@@ -0,0 +1,42 @@
|
|
|
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 { StyledBaseIcon, retrieveComponentStyles, DEFAULT_THEME, getColor } from '@zendeskgarden/react-theming';
|
|
9
|
+
|
|
10
|
+
const COMPONENT_ID = 'forms.file.icon';
|
|
11
|
+
const colorStyles = _ref => {
|
|
12
|
+
let {
|
|
13
|
+
theme,
|
|
14
|
+
$validation
|
|
15
|
+
} = _ref;
|
|
16
|
+
const color = $validation ? undefined : getColor({
|
|
17
|
+
theme,
|
|
18
|
+
variable: 'foreground.subtle'
|
|
19
|
+
});
|
|
20
|
+
return css(["color:", ";"], color);
|
|
21
|
+
};
|
|
22
|
+
const sizeStyles = _ref2 => {
|
|
23
|
+
let {
|
|
24
|
+
$isCompact,
|
|
25
|
+
theme
|
|
26
|
+
} = _ref2;
|
|
27
|
+
const width = $isCompact ? theme.iconSizes.sm : theme.iconSizes.md;
|
|
28
|
+
const margin = `${theme.space.base * 2}px`;
|
|
29
|
+
return css(["width:", ";margin-", ":", ";"], width, theme.rtl ? 'left' : 'right', margin);
|
|
30
|
+
};
|
|
31
|
+
const StyledFileIcon = styled(StyledBaseIcon).attrs({
|
|
32
|
+
'data-garden-id': COMPONENT_ID,
|
|
33
|
+
'data-garden-version': '9.0.0-next.20'
|
|
34
|
+
}).withConfig({
|
|
35
|
+
displayName: "StyledFileIcon",
|
|
36
|
+
componentId: "sc-7b3q0c-0"
|
|
37
|
+
})(["flex-shrink:0;", ";", ";", ";"], sizeStyles, colorStyles, props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
38
|
+
StyledFileIcon.defaultProps = {
|
|
39
|
+
theme: DEFAULT_THEME
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
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': '9.0.0-next.20'
|
|
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 };
|
|
@@ -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 { StyledFileList } from './StyledFileList.js';
|
|
10
|
+
import { StyledFileUpload } from '../file-upload/StyledFileUpload.js';
|
|
11
|
+
|
|
12
|
+
const COMPONENT_ID = 'forms.file_list.item';
|
|
13
|
+
const StyledFileListItem = styled.li.attrs({
|
|
14
|
+
'data-garden-id': COMPONENT_ID,
|
|
15
|
+
'data-garden-version': '9.0.0-next.20'
|
|
16
|
+
}).withConfig({
|
|
17
|
+
displayName: "StyledFileListItem",
|
|
18
|
+
componentId: "sc-1ova3lo-0"
|
|
19
|
+
})(["&:not(:first-child),", " ~ ", " > &:first-child{margin-top:", "px;}", ";"], StyledFileUpload, StyledFileList, props => props.theme.space.base * 2, props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
20
|
+
StyledFileListItem.defaultProps = {
|
|
21
|
+
theme: DEFAULT_THEME
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export { StyledFileListItem };
|
|
@@ -0,0 +1,116 @@
|
|
|
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 { retrieveComponentStyles, DEFAULT_THEME, getColor, focusStyles, getLineHeight } from '@zendeskgarden/react-theming';
|
|
10
|
+
import { StyledLabel } from '../common/StyledLabel.js';
|
|
11
|
+
import { StyledHint } from '../common/StyledHint.js';
|
|
12
|
+
import { StyledMessage } from '../common/StyledMessage.js';
|
|
13
|
+
|
|
14
|
+
const COMPONENT_ID = 'forms.file_upload';
|
|
15
|
+
const colorStyles = _ref => {
|
|
16
|
+
let {
|
|
17
|
+
theme,
|
|
18
|
+
isDragging
|
|
19
|
+
} = _ref;
|
|
20
|
+
const borderOptions = {
|
|
21
|
+
theme,
|
|
22
|
+
variable: 'border.primaryEmphasis'
|
|
23
|
+
};
|
|
24
|
+
const backgroundOptions = {
|
|
25
|
+
theme,
|
|
26
|
+
variable: 'background.primaryEmphasis'
|
|
27
|
+
};
|
|
28
|
+
const foregroundOptions = {
|
|
29
|
+
theme,
|
|
30
|
+
variable: 'foreground.primary'
|
|
31
|
+
};
|
|
32
|
+
const offset100 = {
|
|
33
|
+
dark: {
|
|
34
|
+
offset: -100
|
|
35
|
+
},
|
|
36
|
+
light: {
|
|
37
|
+
offset: 100
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
const offset200 = {
|
|
41
|
+
dark: {
|
|
42
|
+
offset: -200
|
|
43
|
+
},
|
|
44
|
+
light: {
|
|
45
|
+
offset: 200
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
const borderColor = getColor({
|
|
49
|
+
theme,
|
|
50
|
+
variable: 'border.emphasis'
|
|
51
|
+
});
|
|
52
|
+
const foregroundColor = getColor(foregroundOptions);
|
|
53
|
+
const hoverBorderColor = getColor({
|
|
54
|
+
...borderOptions,
|
|
55
|
+
...offset100
|
|
56
|
+
});
|
|
57
|
+
const hoverBackgroundColor = getColor({
|
|
58
|
+
...backgroundOptions,
|
|
59
|
+
transparency: theme.opacity[100]
|
|
60
|
+
});
|
|
61
|
+
const hoverForegroundColor = getColor({
|
|
62
|
+
...foregroundOptions,
|
|
63
|
+
...offset100
|
|
64
|
+
});
|
|
65
|
+
const activeBorderColor = getColor({
|
|
66
|
+
...borderOptions,
|
|
67
|
+
...offset200
|
|
68
|
+
});
|
|
69
|
+
const activeBackgroundColor = getColor({
|
|
70
|
+
...backgroundOptions,
|
|
71
|
+
transparency: theme.opacity[200]
|
|
72
|
+
});
|
|
73
|
+
const activeForegroundColor = getColor({
|
|
74
|
+
...foregroundOptions,
|
|
75
|
+
...offset200
|
|
76
|
+
});
|
|
77
|
+
const disabledBorderColor = getColor({
|
|
78
|
+
theme,
|
|
79
|
+
variable: 'border.disabled'
|
|
80
|
+
});
|
|
81
|
+
const disabledBackgroundColor = getColor({
|
|
82
|
+
theme,
|
|
83
|
+
variable: 'background.disabled'
|
|
84
|
+
});
|
|
85
|
+
const disabledForegroundColor = getColor({
|
|
86
|
+
theme,
|
|
87
|
+
variable: 'foreground.disabled'
|
|
88
|
+
});
|
|
89
|
+
return css(["border-color:", ";background-color:", ";color:", ";&:hover{border-color:", ";background-color:", ";color:", ";}", " &:active{border-color:", ";background-color:", ";color:", ";}&[aria-disabled='true']{border-color:", ";background-color:", ";color:", ";}"], isDragging ? activeBorderColor : borderColor, isDragging ? activeBackgroundColor : undefined, isDragging ? activeForegroundColor : foregroundColor, hoverBorderColor, hoverBackgroundColor, hoverForegroundColor, focusStyles({
|
|
90
|
+
theme
|
|
91
|
+
}), activeBorderColor, activeBackgroundColor, activeForegroundColor, disabledBorderColor, disabledBackgroundColor, disabledForegroundColor);
|
|
92
|
+
};
|
|
93
|
+
const sizeStyles = _ref2 => {
|
|
94
|
+
let {
|
|
95
|
+
theme,
|
|
96
|
+
isCompact
|
|
97
|
+
} = _ref2;
|
|
98
|
+
const marginTop = `${theme.space.base * (isCompact ? 1 : 2)}px`;
|
|
99
|
+
const paddingHorizontal = `${isCompact ? 2 : 4}em`;
|
|
100
|
+
const paddingVertical = math(`${theme.space.base * (isCompact ? 2.5 : 5)} - ${theme.borderWidths.sm}`);
|
|
101
|
+
const fontSize = theme.fontSizes.md;
|
|
102
|
+
const lineHeight = getLineHeight(theme.space.base * 5, fontSize);
|
|
103
|
+
return css(["padding:", " ", ";min-width:4em;line-height:", ";font-size:", ";", ":not([hidden]) + &&,", " + &&,", " + &&,&& + ", ",&& + ", "{margin-top:", ";}"], paddingVertical, paddingHorizontal, lineHeight, fontSize, StyledLabel, StyledHint, StyledMessage, StyledHint, StyledMessage, marginTop);
|
|
104
|
+
};
|
|
105
|
+
const StyledFileUpload = styled.div.attrs({
|
|
106
|
+
'data-garden-id': COMPONENT_ID,
|
|
107
|
+
'data-garden-version': '9.0.0-next.20'
|
|
108
|
+
}).withConfig({
|
|
109
|
+
displayName: "StyledFileUpload",
|
|
110
|
+
componentId: "sc-1rodjgn-0"
|
|
111
|
+
})(["display:flex;align-items:center;justify-content:center;box-sizing:border-box;direction:", ";transition:border-color 0.25s ease-in-out,box-shadow 0.1s ease-in-out,background-color 0.25s ease-in-out,color 0.25s ease-in-out;border:dashed ", ";border-radius:", ";cursor:pointer;text-align:center;user-select:none;", ";&[aria-disabled='true']{cursor:default;}", ";", ";"], props => props.theme.rtl ? 'rtl' : 'ltr', props => props.theme.borderWidths.sm, props => props.theme.borderRadii.md, sizeStyles, colorStyles, props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
112
|
+
StyledFileUpload.defaultProps = {
|
|
113
|
+
theme: DEFAULT_THEME
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
export { StyledFileUpload };
|
|
@@ -0,0 +1,35 @@
|
|
|
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 } from '@zendeskgarden/react-theming';
|
|
9
|
+
import { StyledTextInput } from '../text/StyledTextInput.js';
|
|
10
|
+
import { StyledLabel } from '../common/StyledLabel.js';
|
|
11
|
+
import { StyledHint } from '../common/StyledHint.js';
|
|
12
|
+
import { StyledMessage } from '../common/StyledMessage.js';
|
|
13
|
+
|
|
14
|
+
const COMPONENT_ID = 'forms.input_group';
|
|
15
|
+
const positionStyles = props => {
|
|
16
|
+
const topMargin = `${props.theme.space.base * (props.isCompact ? 1 : 2)}px`;
|
|
17
|
+
return css(["", ":not([hidden]) + &&,", " + &&,", " + &&,&& + ", ",&& + ", "{margin-top:", ";}& > ", "{position:relative;flex:1 1 auto;margin-top:0;margin-bottom:0;width:auto;min-width:0;}"], StyledLabel, StyledHint, StyledMessage, StyledHint, StyledMessage, topMargin, StyledTextInput);
|
|
18
|
+
};
|
|
19
|
+
const itemStyles = props => {
|
|
20
|
+
const startDirection = props.theme.rtl ? 'right' : 'left';
|
|
21
|
+
const endDirection = props.theme.rtl ? 'left' : 'right';
|
|
22
|
+
return css(["& > *{z-index:-1;}& > ", "{z-index:0;}& > ", ":disabled{z-index:-2;}& > ", ":hover,& > button:hover,& > ", ":focus-visible,& > button:focus-visible,& > ", ":active,& > button:active,& > button[aria-pressed='true'],& > button[aria-pressed='mixed']{z-index:1;}& > button:disabled{border-top-width:0;border-bottom-width:0;}& > *:not(:first-child){margin-", ":-", ";}& > *:first-child:not(:last-child){border-top-", "-radius:0;border-bottom-", "-radius:0;}& > *:last-child:not(:first-child){border-top-", "-radius:0;border-bottom-", "-radius:0;}& > *:not(:first-child):not(:last-child){border-radius:0;}"], StyledTextInput, StyledTextInput, StyledTextInput, StyledTextInput, StyledTextInput, startDirection, props.theme.borderWidths.sm, endDirection, endDirection, startDirection, startDirection);
|
|
23
|
+
};
|
|
24
|
+
const StyledInputGroup = styled.div.attrs({
|
|
25
|
+
'data-garden-id': COMPONENT_ID,
|
|
26
|
+
'data-garden-version': '9.0.0-next.20'
|
|
27
|
+
}).withConfig({
|
|
28
|
+
displayName: "StyledInputGroup",
|
|
29
|
+
componentId: "sc-kjh1f0-0"
|
|
30
|
+
})(["display:inline-flex;position:relative;flex-wrap:nowrap;align-items:stretch;z-index:0;width:100%;", ";", ";", ";"], props => positionStyles(props), props => itemStyles(props), props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
31
|
+
StyledInputGroup.defaultProps = {
|
|
32
|
+
theme: DEFAULT_THEME
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export { StyledInputGroup };
|
|
@@ -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 { math } from 'polished';
|
|
9
|
+
import { retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-theming';
|
|
10
|
+
import { StyledHint } from '../common/StyledHint.js';
|
|
11
|
+
|
|
12
|
+
const COMPONENT_ID = 'forms.radio_hint';
|
|
13
|
+
const StyledRadioHint = styled(StyledHint).attrs({
|
|
14
|
+
'data-garden-id': COMPONENT_ID,
|
|
15
|
+
'data-garden-version': '9.0.0-next.20'
|
|
16
|
+
}).withConfig({
|
|
17
|
+
displayName: "StyledRadioHint",
|
|
18
|
+
componentId: "sc-eo8twg-0"
|
|
19
|
+
})(["padding-", ":", ";", ";"], props => props.theme.rtl ? 'right' : 'left', props => math(`${props.theme.space.base} * 6px`), props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
20
|
+
StyledRadioHint.defaultProps = {
|
|
21
|
+
theme: DEFAULT_THEME
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export { StyledRadioHint };
|