baseui 14.0.0 → 15.0.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/accordion/accordion.js +4 -4
- package/accordion/panel.d.ts +1 -1
- package/accordion/styled-components.js +1 -1
- package/accordion/types.d.ts +1 -1
- package/app-nav-bar/mobile-menu.js +3 -1
- package/banner/banner.js +3 -1
- package/banner/types.d.ts +2 -1
- package/bottom-navigation/bottom-navigation.js +3 -1
- package/bottom-navigation/selector.js +1 -1
- package/bottom-navigation/styled-components.js +1 -1
- package/button/button.d.ts +1 -3
- package/button/button.js +6 -2
- package/button/styled-components.d.ts +1 -0
- package/button/styled-components.js +61 -4
- package/button/types.d.ts +15 -3
- package/button-timed/button-timed.js +4 -5
- package/button-timed/styled-components.js +5 -3
- package/button-timed/types.d.ts +1 -1
- package/data-table/column-categorical.js +2 -2
- package/data-table/locale.d.ts +2 -0
- package/data-table/locale.js +2 -1
- package/data-table/stateful-container.js +1 -1
- package/data-table/stateful-data-table.js +7 -3
- package/data-table/types.d.ts +2 -0
- package/datepicker/day.js +2 -4
- package/datepicker/utils/date-helpers.d.ts +1 -0
- package/datepicker/utils/date-helpers.js +3 -0
- package/dialog/dialog.d.ts +1 -1
- package/dialog/dialog.js +38 -56
- package/dialog/styled-components.d.ts +2 -2
- package/dialog/styled-components.js +56 -24
- package/dialog/types.d.ts +5 -2
- package/file-uploader/constants.d.ts +16 -0
- package/file-uploader/constants.js +30 -0
- package/file-uploader/file-uploader.d.ts +2 -2
- package/file-uploader/file-uploader.js +387 -117
- package/file-uploader/index.d.ts +1 -1
- package/file-uploader/index.js +67 -18
- package/file-uploader/locale.d.ts +10 -10
- package/file-uploader/locale.js +5 -5
- package/file-uploader/styled-components.d.ts +13 -6
- package/file-uploader/styled-components.js +261 -64
- package/file-uploader/types.d.ts +47 -32
- package/file-uploader/utils.d.ts +5 -0
- package/file-uploader/utils.js +45 -0
- package/file-uploader-basic/file-uploader-basic.d.ts +10 -0
- package/file-uploader-basic/file-uploader-basic.js +175 -0
- package/file-uploader-basic/index.d.ts +4 -0
- package/file-uploader-basic/index.js +71 -0
- package/file-uploader-basic/locale.d.ts +15 -0
- package/file-uploader-basic/locale.js +21 -0
- package/file-uploader-basic/styled-components.d.ts +7 -0
- package/file-uploader-basic/styled-components.js +83 -0
- package/file-uploader-basic/types.d.ts +41 -0
- package/form-control/form-control.js +38 -3
- package/form-control/styled-components.d.ts +2 -0
- package/form-control/styled-components.js +22 -2
- package/form-control/types.d.ts +4 -0
- package/icon/circle-check-filled.d.ts +9 -0
- package/icon/circle-check-filled.js +50 -0
- package/icon/circle-exclamation-point-filled.d.ts +9 -0
- package/icon/circle-exclamation-point-filled.js +50 -0
- package/icon/hide.js +1 -1
- package/icon/icon-exports.d.ts +4 -0
- package/icon/icon-exports.js +28 -0
- package/icon/paperclip-filled.d.ts +9 -0
- package/icon/paperclip-filled.js +50 -0
- package/icon/show.js +1 -1
- package/icon/trash-can-filled.d.ts +9 -0
- package/{button-docked/button-docked.js → icon/trash-can-filled.js} +35 -16
- package/locale/en_US.js +14 -12
- package/locale/es_AR.js +9 -1
- package/locale/index.d.ts +3 -0
- package/locale/index.js +2 -0
- package/locale/tr_TR.js +9 -1
- package/locale/types.d.ts +2 -0
- package/message-card/message-card.js +2 -2
- package/message-card/utils.js +8 -3
- package/modal/modal-button.d.ts +1 -3
- package/package.json +5 -3
- package/payment-card/custom-cards.config.d.ts +1 -11
- package/payment-card/payment-card.js +1 -3
- package/phone-input/base-country-picker.js +2 -2
- package/phone-input/country-picker.js +0 -10
- package/progress-bar/progressbar-rounded.js +1 -1
- package/progress-bar/styled-components.js +8 -6
- package/rating/styled-components.js +3 -2
- package/rating/svg-icons.d.ts +5 -5
- package/rating/svg-icons.js +20 -20
- package/select/multi-value.js +1 -1
- package/snackbar/index.d.ts +1 -0
- package/snackbar/snackbar-context.d.ts +1 -2
- package/snackbar/snackbar-context.js +27 -21
- package/spinner/index.d.ts +4 -2
- package/stepper/stepper.js +28 -27
- package/styles/__mocks__/styled.js +0 -2
- package/styles/as-primary-export-hoc.js +0 -2
- package/styles/styled.js +0 -2
- package/styles/types.d.ts +7 -3
- package/tabs-motion/tabs.js +2 -2
- package/tag/constants.d.ts +5 -4
- package/tag/constants.js +7 -6
- package/tag/index.d.ts +1 -1
- package/tag/index.js +7 -7
- package/tag/styled-components.d.ts +1 -1
- package/tag/styled-components.js +137 -124
- package/tag/tag.js +2 -2
- package/tag/types.d.ts +9 -8
- package/tag/types.js +2 -2
- package/themes/dark-theme/color-component-tokens.d.ts +2 -2
- package/themes/dark-theme/color-component-tokens.js +279 -275
- package/themes/dark-theme/color-foundation-tokens.d.ts +3 -0
- package/themes/dark-theme/{color-tokens.js → color-foundation-tokens.js} +11 -14
- package/themes/dark-theme/color-semantic-tokens.d.ts +2 -2
- package/themes/dark-theme/color-semantic-tokens.js +52 -58
- package/themes/dark-theme/create-dark-theme.d.ts +1 -1
- package/themes/dark-theme/create-dark-theme.js +12 -32
- package/themes/dark-theme/dark-theme.js +4 -4
- package/themes/dark-theme/primitives.js +2 -2
- package/themes/light-theme/color-component-tokens.d.ts +2 -2
- package/themes/light-theme/color-component-tokens.js +287 -282
- package/themes/light-theme/color-foundation-tokens.d.ts +3 -0
- package/themes/light-theme/{color-tokens.js → color-foundation-tokens.js} +10 -13
- package/themes/light-theme/color-semantic-tokens.d.ts +2 -2
- package/themes/light-theme/color-semantic-tokens.js +50 -53
- package/themes/light-theme/create-light-theme.d.ts +1 -1
- package/themes/light-theme/create-light-theme.js +12 -32
- package/themes/light-theme/light-theme.js +4 -4
- package/themes/light-theme/primitives.js +2 -2
- package/themes/types.d.ts +74 -13
- package/themes/utils.d.ts +1 -1
- package/themes/utils.js +4 -4
- package/tile/tile-group.js +2 -2
- package/timezonepicker/update-tzdata.js +0 -1
- package/tokens/color-primitive-tokens.d.ts +5 -0
- package/tokens/color-primitive-tokens.js +301 -0
- package/tokens/index.d.ts +5 -4
- package/tokens/index.js +25 -3
- package/tokens/types.d.ts +170 -1
- package/button-docked/button-docked.d.ts +0 -4
- package/button-docked/index.d.ts +0 -3
- package/button-docked/index.js +0 -40
- package/button-docked/styled-components.d.ts +0 -5
- package/button-docked/styled-components.js +0 -55
- package/button-docked/types.d.ts +0 -14
- package/themes/dark-theme/color-tokens.d.ts +0 -3
- package/themes/light-theme/color-tokens.d.ts +0 -3
- package/tokens/colors.d.ts +0 -3
- package/tokens/colors.js +0 -125
- /package/{button-docked → file-uploader-basic}/types.js +0 -0
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _reactDropzone = _interopRequireDefault(require("react-dropzone"));
|
|
9
|
+
var _locale = require("../locale");
|
|
10
|
+
var _styles = require("../styles");
|
|
11
|
+
var _button = require("../button");
|
|
12
|
+
var _overrides = require("../helpers/overrides");
|
|
13
|
+
var _progressBar = require("../progress-bar");
|
|
14
|
+
var _spinner = require("../spinner");
|
|
15
|
+
var _styledComponents = require("./styled-components");
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
18
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
19
|
+
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); } /*
|
|
20
|
+
Copyright (c) Uber Technologies, Inc.
|
|
21
|
+
|
|
22
|
+
This source code is licensed under the MIT license found in the
|
|
23
|
+
LICENSE file in the root directory of this source tree.
|
|
24
|
+
*/
|
|
25
|
+
// @ts-ignore
|
|
26
|
+
function prependStyleProps(styleProps) {
|
|
27
|
+
return Object.keys(styleProps).reduce((nextStyleProps, currentKey) => {
|
|
28
|
+
// @ts-ignore
|
|
29
|
+
nextStyleProps[`$${currentKey}`] = styleProps[currentKey];
|
|
30
|
+
return nextStyleProps;
|
|
31
|
+
}, {});
|
|
32
|
+
}
|
|
33
|
+
function FileUploaderBasic(props) {
|
|
34
|
+
const {
|
|
35
|
+
overrides = {}
|
|
36
|
+
} = props;
|
|
37
|
+
const [, theme] = (0, _styles.useStyletron)();
|
|
38
|
+
const [Root, rootProps] = (0, _overrides.getOverrides)(overrides.Root, _styledComponents.StyledRoot);
|
|
39
|
+
const [FileDragAndDrop, fileDragAndDropProps] = (0, _overrides.getOverrides)(overrides.FileDragAndDrop, _styledComponents.StyledFileDragAndDrop);
|
|
40
|
+
const [ContentMessage, contentMessageProps] = (0, _overrides.getOverrides)(overrides.ContentMessage, _styledComponents.StyledContentMessage);
|
|
41
|
+
const [ContentSeparator, contentSeparatorProps] = (0, _overrides.getOverrides)(overrides.ContentSeparator, _styledComponents.StyledContentSeparator);
|
|
42
|
+
const [ErrorMessage, errorMessageProps] = (0, _overrides.getOverrides)(overrides.ErrorMessage, _styledComponents.StyledErrorMessage);
|
|
43
|
+
const [HiddenInput, hiddenInputProps] = (0, _overrides.getOverrides)(overrides.HiddenInput, _styledComponents.StyledHiddenInput);
|
|
44
|
+
const [ButtonComponent, buttonProps] = (0, _overrides.getOverrides)(overrides.ButtonComponent, _button.Button);
|
|
45
|
+
const [RetryButtonComponent, retryButtonProps] = (0, _overrides.getOverrides)(overrides.RetryButtonComponent, _button.Button);
|
|
46
|
+
const [CancelButtonComponent, cancelButtonProps] = (0, _overrides.getOverrides)(overrides.CancelButtonComponent, _button.Button);
|
|
47
|
+
const [SpinnerComponent, spinnerProps] = (0, _overrides.getOverrides)(overrides.Spinner, _spinner.Spinner);
|
|
48
|
+
const [ProgressBarComponent, progressBarProps] = (0, _overrides.getOverrides)(overrides.ProgressBar, _progressBar.ProgressBar);
|
|
49
|
+
const afterFileDrop = !!(props.progressAmount || props.progressMessage || props.errorMessage);
|
|
50
|
+
let accept;
|
|
51
|
+
if (Array.isArray(props.accept)) {
|
|
52
|
+
accept = props.accept.join(',');
|
|
53
|
+
} else if (typeof props.accept === 'string') {
|
|
54
|
+
accept = props.accept;
|
|
55
|
+
}
|
|
56
|
+
let displayButtonIcon = null;
|
|
57
|
+
if (props.buttonIcon) {
|
|
58
|
+
displayButtonIcon = props.buttonIcon();
|
|
59
|
+
}
|
|
60
|
+
return /*#__PURE__*/React.createElement(_reactDropzone.default, _extends({}, props, {
|
|
61
|
+
accept: accept,
|
|
62
|
+
disabled: props.disabled || afterFileDrop
|
|
63
|
+
}), renderProps => {
|
|
64
|
+
const {
|
|
65
|
+
getRootProps,
|
|
66
|
+
getInputProps,
|
|
67
|
+
open,
|
|
68
|
+
...styleProps
|
|
69
|
+
} = renderProps;
|
|
70
|
+
const prefixedStyledProps = prependStyleProps({
|
|
71
|
+
...styleProps,
|
|
72
|
+
isDisabled: props.disabled,
|
|
73
|
+
afterFileDrop
|
|
74
|
+
});
|
|
75
|
+
const getRootPropsArgs = {
|
|
76
|
+
...(props.disableClick ? {
|
|
77
|
+
onClick: evt => evt.preventDefault()
|
|
78
|
+
} : {}),
|
|
79
|
+
tabIndex: -1
|
|
80
|
+
};
|
|
81
|
+
return /*#__PURE__*/React.createElement(_locale.LocaleContext.Consumer, null, locale => /*#__PURE__*/React.createElement(Root, _extends({
|
|
82
|
+
"data-baseweb": "file-uploader-basic"
|
|
83
|
+
}, prefixedStyledProps, rootProps), /*#__PURE__*/React.createElement(FileDragAndDrop, _extends({}, getRootProps(getRootPropsArgs), prefixedStyledProps, fileDragAndDropProps), !afterFileDrop && /*#__PURE__*/React.createElement(React.Fragment, null, props.swapButtonAndMessage ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ButtonComponent, _extends({
|
|
84
|
+
disabled: props.disabled,
|
|
85
|
+
kind: _button.KIND.secondary,
|
|
86
|
+
shape: _button.SHAPE.pill,
|
|
87
|
+
size: _button.SIZE.compact,
|
|
88
|
+
onClick: open,
|
|
89
|
+
role: "button",
|
|
90
|
+
overrides: {
|
|
91
|
+
BaseButton: {
|
|
92
|
+
// @ts-ignore
|
|
93
|
+
style: ({
|
|
94
|
+
$theme
|
|
95
|
+
}) => ({
|
|
96
|
+
display: 'flex',
|
|
97
|
+
flexDirection: 'row',
|
|
98
|
+
gap: '8px',
|
|
99
|
+
marginTop: $theme.sizing.scale500
|
|
100
|
+
})
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}, prefixedStyledProps, buttonProps), displayButtonIcon, props.buttonText ? props.buttonText : locale.fileuploaderbasic.browseFiles), /*#__PURE__*/React.createElement(ContentSeparator, _extends({}, prefixedStyledProps, contentSeparatorProps), locale.fileuploaderbasic.or), /*#__PURE__*/React.createElement(ContentMessage, _extends({}, prefixedStyledProps, contentMessageProps), props.contentMessage ? props.contentMessage : locale.fileuploaderbasic.dropFilesToUpload)) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ContentMessage, _extends({}, prefixedStyledProps, contentMessageProps), props.contentMessage ? props.contentMessage : locale.fileuploaderbasic.dropFilesToUpload), /*#__PURE__*/React.createElement(ContentSeparator, _extends({}, prefixedStyledProps, contentSeparatorProps), locale.fileuploaderbasic.or), /*#__PURE__*/React.createElement(ButtonComponent, _extends({
|
|
104
|
+
disabled: props.disabled,
|
|
105
|
+
kind: _button.KIND.secondary,
|
|
106
|
+
shape: _button.SHAPE.pill,
|
|
107
|
+
size: _button.SIZE.compact,
|
|
108
|
+
onClick: open,
|
|
109
|
+
role: "button",
|
|
110
|
+
overrides: {
|
|
111
|
+
BaseButton: {
|
|
112
|
+
// @ts-ignore
|
|
113
|
+
style: ({
|
|
114
|
+
$theme
|
|
115
|
+
}) => ({
|
|
116
|
+
display: 'flex',
|
|
117
|
+
flexDirection: 'row',
|
|
118
|
+
gap: '8px',
|
|
119
|
+
marginTop: $theme.sizing.scale500
|
|
120
|
+
})
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}, prefixedStyledProps, buttonProps), displayButtonIcon, props.buttonText ? props.buttonText : locale.fileuploaderbasic.browseFiles))), afterFileDrop && /*#__PURE__*/React.createElement(React.Fragment, null, typeof props.progressAmount === 'number' ? /*#__PURE__*/React.createElement(ProgressBarComponent, _extends({
|
|
124
|
+
value: props.progressAmount,
|
|
125
|
+
overrides: {
|
|
126
|
+
BarProgress: {
|
|
127
|
+
// @ts-ignore
|
|
128
|
+
style: ({
|
|
129
|
+
$theme
|
|
130
|
+
}) => ({
|
|
131
|
+
backgroundColor: props.errorMessage ? $theme.colors.negative : $theme.colors.accent
|
|
132
|
+
})
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}, progressBarProps)) : props.errorMessage ? null : /*#__PURE__*/React.createElement(SpinnerComponent, _extends({
|
|
136
|
+
$size: _spinner.SIZE.medium,
|
|
137
|
+
$style: {
|
|
138
|
+
marginBottom: theme.sizing.scale300
|
|
139
|
+
}
|
|
140
|
+
}, spinnerProps)), (props.errorMessage || props.progressMessage) && props.errorMessage ? /*#__PURE__*/React.createElement(ErrorMessage, _extends({}, prefixedStyledProps, errorMessageProps), props.errorMessage) : /*#__PURE__*/React.createElement(ContentMessage, _extends({}, prefixedStyledProps, contentMessageProps), props.progressMessage), props.errorMessage ? /*#__PURE__*/React.createElement(RetryButtonComponent, _extends({
|
|
141
|
+
kind: _button.KIND.tertiary,
|
|
142
|
+
onClick: () => {
|
|
143
|
+
props.onRetry && props.onRetry();
|
|
144
|
+
},
|
|
145
|
+
"aria-invalid": Boolean(props.errorMessage),
|
|
146
|
+
"aria-describedby": props['aria-describedby'],
|
|
147
|
+
"aria-errormessage": props.errorMessage
|
|
148
|
+
}, retryButtonProps), locale.fileuploaderbasic.retry) : /*#__PURE__*/React.createElement(CancelButtonComponent, _extends({
|
|
149
|
+
kind: _button.KIND.tertiary,
|
|
150
|
+
onClick: () => {
|
|
151
|
+
props.onCancel && props.onCancel();
|
|
152
|
+
},
|
|
153
|
+
"aria-describedby": props['aria-describedby'],
|
|
154
|
+
overrides: {
|
|
155
|
+
BaseButton: {
|
|
156
|
+
// @ts-ignore
|
|
157
|
+
style: ({
|
|
158
|
+
$theme
|
|
159
|
+
}) => ({
|
|
160
|
+
color: $theme.colors.contentNegative
|
|
161
|
+
})
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}, cancelButtonProps), locale.fileuploaderbasic.cancel))), /*#__PURE__*/React.createElement(HiddenInput, _extends({
|
|
165
|
+
"aria-invalid": Boolean(props.errorMessage) || null,
|
|
166
|
+
"aria-describedby": props['aria-describedby'],
|
|
167
|
+
"aria-errormessage": props.errorMessage || null
|
|
168
|
+
}, getInputProps(), prefixedStyledProps, hiddenInputProps))));
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
FileUploaderBasic.defaultProps = {
|
|
172
|
+
disableClick: true,
|
|
173
|
+
overrides: {}
|
|
174
|
+
};
|
|
175
|
+
var _default = exports.default = FileUploaderBasic;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { default as FileUploaderBasic } from './file-uploader-basic';
|
|
2
|
+
export { StyledRoot, StyledFileDragAndDrop, StyledContentMessage, StyledContentSeparator, StyledErrorMessage, StyledHiddenInput, } from './styled-components';
|
|
3
|
+
export * from './types';
|
|
4
|
+
export type { FileUploaderBasicLocale } from './locale';
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _exportNames = {
|
|
7
|
+
FileUploaderBasic: true,
|
|
8
|
+
StyledRoot: true,
|
|
9
|
+
StyledFileDragAndDrop: true,
|
|
10
|
+
StyledContentMessage: true,
|
|
11
|
+
StyledContentSeparator: true,
|
|
12
|
+
StyledErrorMessage: true,
|
|
13
|
+
StyledHiddenInput: true
|
|
14
|
+
};
|
|
15
|
+
Object.defineProperty(exports, "FileUploaderBasic", {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function () {
|
|
18
|
+
return _fileUploaderBasic.default;
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
Object.defineProperty(exports, "StyledContentMessage", {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () {
|
|
24
|
+
return _styledComponents.StyledContentMessage;
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
Object.defineProperty(exports, "StyledContentSeparator", {
|
|
28
|
+
enumerable: true,
|
|
29
|
+
get: function () {
|
|
30
|
+
return _styledComponents.StyledContentSeparator;
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
Object.defineProperty(exports, "StyledErrorMessage", {
|
|
34
|
+
enumerable: true,
|
|
35
|
+
get: function () {
|
|
36
|
+
return _styledComponents.StyledErrorMessage;
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
Object.defineProperty(exports, "StyledFileDragAndDrop", {
|
|
40
|
+
enumerable: true,
|
|
41
|
+
get: function () {
|
|
42
|
+
return _styledComponents.StyledFileDragAndDrop;
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
Object.defineProperty(exports, "StyledHiddenInput", {
|
|
46
|
+
enumerable: true,
|
|
47
|
+
get: function () {
|
|
48
|
+
return _styledComponents.StyledHiddenInput;
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
Object.defineProperty(exports, "StyledRoot", {
|
|
52
|
+
enumerable: true,
|
|
53
|
+
get: function () {
|
|
54
|
+
return _styledComponents.StyledRoot;
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
var _fileUploaderBasic = _interopRequireDefault(require("./file-uploader-basic"));
|
|
58
|
+
var _styledComponents = require("./styled-components");
|
|
59
|
+
var _types = require("./types");
|
|
60
|
+
Object.keys(_types).forEach(function (key) {
|
|
61
|
+
if (key === "default" || key === "__esModule") return;
|
|
62
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
63
|
+
if (key in exports && exports[key] === _types[key]) return;
|
|
64
|
+
Object.defineProperty(exports, key, {
|
|
65
|
+
enumerable: true,
|
|
66
|
+
get: function () {
|
|
67
|
+
return _types[key];
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type FileUploaderBasicLocale = {
|
|
2
|
+
dropFilesToUpload: string;
|
|
3
|
+
or: string;
|
|
4
|
+
browseFiles: string;
|
|
5
|
+
retry: string;
|
|
6
|
+
cancel: string;
|
|
7
|
+
};
|
|
8
|
+
declare const locale: {
|
|
9
|
+
dropFilesToUpload: string;
|
|
10
|
+
or: string;
|
|
11
|
+
browseFiles: string;
|
|
12
|
+
retry: string;
|
|
13
|
+
cancel: string;
|
|
14
|
+
};
|
|
15
|
+
export default locale;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
/*
|
|
8
|
+
Copyright (c) Uber Technologies, Inc.
|
|
9
|
+
|
|
10
|
+
This source code is licensed under the MIT license found in the
|
|
11
|
+
LICENSE file in the root directory of this source tree.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
const locale = {
|
|
15
|
+
dropFilesToUpload: 'Drop files here to upload...',
|
|
16
|
+
or: '',
|
|
17
|
+
browseFiles: 'Browse files',
|
|
18
|
+
retry: 'Retry Upload',
|
|
19
|
+
cancel: 'Cancel'
|
|
20
|
+
};
|
|
21
|
+
var _default = exports.default = locale;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { StyleProps } from './types';
|
|
2
|
+
export declare const StyledFileDragAndDrop: import("styletron-react").StyletronComponent<"div", StyleProps>;
|
|
3
|
+
export declare const StyledContentMessage: import("styletron-react").StyletronComponent<"div", StyleProps>;
|
|
4
|
+
export declare const StyledContentSeparator: import("styletron-react").StyletronComponent<"div", StyleProps>;
|
|
5
|
+
export declare const StyledErrorMessage: import("styletron-react").StyletronComponent<"div", StyleProps>;
|
|
6
|
+
export declare const StyledRoot: import("styletron-react").StyletronComponent<"div", StyleProps>;
|
|
7
|
+
export declare const StyledHiddenInput: import("styletron-react").StyletronComponent<"input", {}>;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.StyledRoot = exports.StyledHiddenInput = exports.StyledFileDragAndDrop = exports.StyledErrorMessage = exports.StyledContentSeparator = exports.StyledContentMessage = void 0;
|
|
7
|
+
var _styles = require("../styles");
|
|
8
|
+
/*
|
|
9
|
+
Copyright (c) Uber Technologies, Inc.
|
|
10
|
+
|
|
11
|
+
This source code is licensed under the MIT license found in the
|
|
12
|
+
LICENSE file in the root directory of this source tree.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
const StyledFileDragAndDrop = exports.StyledFileDragAndDrop = (0, _styles.styled)('div', props => {
|
|
16
|
+
const borderColor = props.$isDragActive ? props.$theme.colors.borderAccent : props.$theme.colors.fileUploaderBorderColorDefault;
|
|
17
|
+
const borderStyle = props.$afterFileDrop ? 'none' : 'dashed';
|
|
18
|
+
return {
|
|
19
|
+
alignItems: 'center',
|
|
20
|
+
backgroundColor: props.$isDragActive ? props.$theme.colors.backgroundAccentLight : props.$theme.colors.fileUploaderBackgroundColor,
|
|
21
|
+
borderLeftColor: borderColor,
|
|
22
|
+
borderRightColor: borderColor,
|
|
23
|
+
borderTopColor: borderColor,
|
|
24
|
+
borderBottomColor: borderColor,
|
|
25
|
+
borderLeftStyle: borderStyle,
|
|
26
|
+
borderRightStyle: borderStyle,
|
|
27
|
+
borderTopStyle: borderStyle,
|
|
28
|
+
borderBottomStyle: borderStyle,
|
|
29
|
+
borderLeftWidth: props.$theme.sizing.scale0,
|
|
30
|
+
borderRightWidth: props.$theme.sizing.scale0,
|
|
31
|
+
borderTopWidth: props.$theme.sizing.scale0,
|
|
32
|
+
borderBottomWidth: props.$theme.sizing.scale0,
|
|
33
|
+
borderTopLeftRadius: props.$theme.borders.radius400,
|
|
34
|
+
borderTopRightRadius: props.$theme.borders.radius400,
|
|
35
|
+
borderBottomLeftRadius: props.$theme.borders.radius400,
|
|
36
|
+
borderBottomRightRadius: props.$theme.borders.radius400,
|
|
37
|
+
boxSizing: 'border-box',
|
|
38
|
+
display: 'flex',
|
|
39
|
+
flexDirection: 'column',
|
|
40
|
+
outline: 'none',
|
|
41
|
+
paddingTop: props.$theme.sizing.scale900,
|
|
42
|
+
paddingRight: props.$theme.sizing.scale800,
|
|
43
|
+
paddingBottom: props.$afterFileDrop ? props.$theme.sizing.scale300 : props.$theme.sizing.scale900,
|
|
44
|
+
paddingLeft: props.$theme.sizing.scale800,
|
|
45
|
+
width: '100%'
|
|
46
|
+
};
|
|
47
|
+
});
|
|
48
|
+
StyledFileDragAndDrop.displayName = "StyledFileDragAndDrop";
|
|
49
|
+
StyledFileDragAndDrop.displayName = 'StyledFileDragAndDrop';
|
|
50
|
+
const StyledContentMessage = exports.StyledContentMessage = (0, _styles.styled)('div',
|
|
51
|
+
// @ts-ignore
|
|
52
|
+
({
|
|
53
|
+
$theme,
|
|
54
|
+
$afterFileDrop,
|
|
55
|
+
$isDragActive
|
|
56
|
+
}) => ({
|
|
57
|
+
...($afterFileDrop ? $theme.typography.LabelMedium : $theme.typography.LabelSmall),
|
|
58
|
+
color: $afterFileDrop ? $theme.colors.contentPrimary : $isDragActive ? $theme.colors.contentAccent : null,
|
|
59
|
+
marginTop: $afterFileDrop ? $theme.sizing.scale100 : null,
|
|
60
|
+
marginBottom: $afterFileDrop ? $theme.sizing.scale100 : null
|
|
61
|
+
}));
|
|
62
|
+
StyledContentMessage.displayName = "StyledContentMessage";
|
|
63
|
+
StyledContentMessage.displayName = 'StyledContentMessage';
|
|
64
|
+
const StyledContentSeparator = exports.StyledContentSeparator = StyledContentMessage;
|
|
65
|
+
|
|
66
|
+
// @ts-ignore
|
|
67
|
+
const StyledErrorMessage = exports.StyledErrorMessage = (0, _styles.styled)('div', props => ({
|
|
68
|
+
...props.$theme.typography.LabelMedium,
|
|
69
|
+
color: props.$theme.colors.contentNegative,
|
|
70
|
+
marginTop: props.$afterFileDrop ? props.$theme.sizing.scale100 : null,
|
|
71
|
+
marginBottom: props.$afterFileDrop ? props.$theme.sizing.scale100 : null
|
|
72
|
+
}));
|
|
73
|
+
StyledErrorMessage.displayName = "StyledErrorMessage";
|
|
74
|
+
StyledErrorMessage.displayName = 'StyledErrorMessage';
|
|
75
|
+
const StyledRoot = exports.StyledRoot = (0, _styles.styled)('div', props => ({
|
|
76
|
+
...props.$theme.typography.font300,
|
|
77
|
+
color: props.$theme.colors.fileUploaderMessageColor
|
|
78
|
+
}));
|
|
79
|
+
StyledRoot.displayName = "StyledRoot";
|
|
80
|
+
StyledRoot.displayName = 'StyledRoot';
|
|
81
|
+
const StyledHiddenInput = exports.StyledHiddenInput = (0, _styles.styled)('input', {});
|
|
82
|
+
StyledHiddenInput.displayName = "StyledHiddenInput";
|
|
83
|
+
StyledHiddenInput.displayName = 'StyledHiddenInput';
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { DropzoneProps } from 'react-dropzone';
|
|
2
|
+
import type { DragEvent } from 'react';
|
|
3
|
+
import type { Override } from '../helpers/overrides';
|
|
4
|
+
export type StyleProps = {
|
|
5
|
+
$afterFileDrop: boolean;
|
|
6
|
+
$disabled: boolean;
|
|
7
|
+
$isDragActive: boolean;
|
|
8
|
+
$isDragAccept: boolean;
|
|
9
|
+
$isDragReject: boolean;
|
|
10
|
+
$isFocused: boolean;
|
|
11
|
+
};
|
|
12
|
+
export type FileUploaderBasicOverrides = {
|
|
13
|
+
Root?: Override;
|
|
14
|
+
FileDragAndDrop?: Override;
|
|
15
|
+
ContentMessage?: Override;
|
|
16
|
+
ContentSeparator?: Override;
|
|
17
|
+
HiddenInput?: Override;
|
|
18
|
+
ProgressMessage?: Override;
|
|
19
|
+
ErrorMessage?: Override;
|
|
20
|
+
ButtonComponent?: Override;
|
|
21
|
+
CancelButtonComponent?: Override;
|
|
22
|
+
RetryButtonComponent?: Override;
|
|
23
|
+
Spinner?: Override;
|
|
24
|
+
ProgressBar?: Override;
|
|
25
|
+
};
|
|
26
|
+
export type FileUploaderBasicProps = Omit<DropzoneProps, 'accept'> & {
|
|
27
|
+
accept?: string[] | string;
|
|
28
|
+
buttonIcon?: () => JSX.Element;
|
|
29
|
+
buttonText?: string;
|
|
30
|
+
contentMessage?: string;
|
|
31
|
+
disableClick?: boolean;
|
|
32
|
+
'aria-describedby'?: string;
|
|
33
|
+
errorMessage?: string;
|
|
34
|
+
onCancel?: () => unknown;
|
|
35
|
+
onRetry?: () => unknown;
|
|
36
|
+
overrides?: FileUploaderBasicOverrides;
|
|
37
|
+
progressAmount?: number;
|
|
38
|
+
progressMessage?: string;
|
|
39
|
+
swapButtonAndMessage?: boolean;
|
|
40
|
+
};
|
|
41
|
+
export type DropFilesEventHandler = (accepted: File[], rejected: File[], event: DragEvent<HTMLElement>) => unknown;
|
|
@@ -7,6 +7,7 @@ exports.default = void 0;
|
|
|
7
7
|
var React = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _overrides = require("../helpers/overrides");
|
|
9
9
|
var _reactUid = require("react-uid");
|
|
10
|
+
var _icon = require("../icon");
|
|
10
11
|
var _styledComponents = require("./styled-components");
|
|
11
12
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
12
13
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
@@ -19,7 +20,6 @@ Copyright (c) Uber Technologies, Inc.
|
|
|
19
20
|
This source code is licensed under the MIT license found in the
|
|
20
21
|
LICENSE file in the root directory of this source tree.
|
|
21
22
|
*/
|
|
22
|
-
// @ts-ignore
|
|
23
23
|
function chooseRenderedHint(caption, error, positive, sharedProps) {
|
|
24
24
|
if (!!error && typeof error !== 'boolean') {
|
|
25
25
|
return typeof error === 'function' ? error(sharedProps) : error;
|
|
@@ -32,6 +32,34 @@ function chooseRenderedHint(caption, error, positive, sharedProps) {
|
|
|
32
32
|
}
|
|
33
33
|
return null;
|
|
34
34
|
}
|
|
35
|
+
|
|
36
|
+
// @ts-ignore
|
|
37
|
+
function chooseRenderedHintIcon(hint, error, positive) {
|
|
38
|
+
if (!hint) {
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
if (!!error) {
|
|
42
|
+
if (typeof error === 'function') {
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
45
|
+
return /*#__PURE__*/React.createElement(_icon.Alert, {
|
|
46
|
+
size: 12,
|
|
47
|
+
"aria-hidden": "true",
|
|
48
|
+
title: ""
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
if (!!positive) {
|
|
52
|
+
if (typeof positive === 'function') {
|
|
53
|
+
return null;
|
|
54
|
+
}
|
|
55
|
+
return /*#__PURE__*/React.createElement(_icon.Check, {
|
|
56
|
+
size: 12,
|
|
57
|
+
"aria-hidden": "true",
|
|
58
|
+
title: ""
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
return null;
|
|
62
|
+
}
|
|
35
63
|
class FormControl extends React.Component {
|
|
36
64
|
render() {
|
|
37
65
|
const {
|
|
@@ -45,6 +73,10 @@ class FormControl extends React.Component {
|
|
|
45
73
|
// @ts-ignore
|
|
46
74
|
Caption: CaptionOverride,
|
|
47
75
|
// @ts-ignore
|
|
76
|
+
CaptionMessage: CaptionMessageOverride,
|
|
77
|
+
// @ts-ignore
|
|
78
|
+
CaptionIcon: CaptionIconOverride,
|
|
79
|
+
// @ts-ignore
|
|
48
80
|
ControlContainer: ControlContainerOverride
|
|
49
81
|
},
|
|
50
82
|
label,
|
|
@@ -68,8 +100,11 @@ class FormControl extends React.Component {
|
|
|
68
100
|
const LabelEndEnhancer = (0, _overrides.getOverride)(LabelEndEnhancerOverride) || _styledComponents.LabelEndEnhancer;
|
|
69
101
|
const LabelContainer = (0, _overrides.getOverride)(LabelContainerOverride) || _styledComponents.LabelContainer;
|
|
70
102
|
const Caption = (0, _overrides.getOverride)(CaptionOverride) || _styledComponents.Caption;
|
|
103
|
+
const CaptionMessage = (0, _overrides.getOverride)(CaptionMessageOverride) || _styledComponents.CaptionMessage;
|
|
104
|
+
const CaptionIcon = (0, _overrides.getOverride)(CaptionIconOverride) || _styledComponents.CaptionIcon;
|
|
71
105
|
const ControlContainer = (0, _overrides.getOverride)(ControlContainerOverride) || _styledComponents.ControlContainer;
|
|
72
106
|
const hint = chooseRenderedHint(caption, error, positive, sharedProps);
|
|
107
|
+
const hintIcon = chooseRenderedHintIcon(hint, error, positive);
|
|
73
108
|
if (process.env.NODE_ENV !== "production") {
|
|
74
109
|
if (error && positive) {
|
|
75
110
|
// eslint-disable-next-line no-console
|
|
@@ -130,10 +165,10 @@ class FormControl extends React.Component {
|
|
|
130
165
|
error: typeof onlyChildProps.error !== 'undefined' ? onlyChildProps.error : sharedProps.$error === false ? undefined : sharedProps.$error,
|
|
131
166
|
positive: typeof onlyChildProps.positive !== 'undefined' ? onlyChildProps.positive : sharedProps.$positive === false ? undefined : sharedProps.$positive
|
|
132
167
|
});
|
|
133
|
-
}),
|
|
168
|
+
}), hint && /*#__PURE__*/React.createElement(Caption, _extends({
|
|
134
169
|
"data-baseweb": "form-control-caption",
|
|
135
170
|
id: captionId
|
|
136
|
-
}, sharedProps, (0, _overrides.getOverrideProps)(CaptionOverride)), hint))));
|
|
171
|
+
}, sharedProps, (0, _overrides.getOverrideProps)(CaptionOverride)), hintIcon && /*#__PURE__*/React.createElement(CaptionIcon, null, hintIcon), /*#__PURE__*/React.createElement(CaptionMessage, null, hint)))));
|
|
137
172
|
}
|
|
138
173
|
}
|
|
139
174
|
exports.default = FormControl;
|
|
@@ -3,4 +3,6 @@ export declare const Label: import("styletron-react").StyletronComponent<"label"
|
|
|
3
3
|
export declare const LabelContainer: import("styletron-react").StyletronComponent<"span", StyleProps>;
|
|
4
4
|
export declare const LabelEndEnhancer: import("styletron-react").StyletronComponent<"span", StyleProps>;
|
|
5
5
|
export declare const Caption: import("styletron-react").StyletronComponent<"div", StyleProps>;
|
|
6
|
+
export declare const CaptionMessage: import("styletron-react").StyletronComponent<"div", StyleProps>;
|
|
7
|
+
export declare const CaptionIcon: import("styletron-react").StyletronComponent<"div", StyleProps>;
|
|
6
8
|
export declare const ControlContainer: import("styletron-react").StyletronComponent<"div", StyleProps>;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.LabelEndEnhancer = exports.LabelContainer = exports.Label = exports.ControlContainer = exports.Caption = void 0;
|
|
6
|
+
exports.LabelEndEnhancer = exports.LabelContainer = exports.Label = exports.ControlContainer = exports.CaptionMessage = exports.CaptionIcon = exports.Caption = void 0;
|
|
7
7
|
var _styles = require("../styles");
|
|
8
8
|
/*
|
|
9
9
|
Copyright (c) Uber Technologies, Inc.
|
|
@@ -88,11 +88,31 @@ const Caption = exports.Caption = (0, _styles.styled)('div', props => {
|
|
|
88
88
|
marginTop: sizing.scale300,
|
|
89
89
|
marginRight: 0,
|
|
90
90
|
marginBottom: sizing.scale300,
|
|
91
|
-
marginLeft: 0
|
|
91
|
+
marginLeft: 0,
|
|
92
|
+
display: 'flex'
|
|
92
93
|
};
|
|
93
94
|
});
|
|
94
95
|
Caption.displayName = "Caption";
|
|
95
96
|
Caption.displayName = 'Caption';
|
|
97
|
+
const CaptionMessage = exports.CaptionMessage = (0, _styles.styled)('div', {
|
|
98
|
+
fontFamily: 'inherit',
|
|
99
|
+
fontSize: 'inherit',
|
|
100
|
+
fontWeight: 'inherit',
|
|
101
|
+
lineHeight: 'inherit',
|
|
102
|
+
flexGrow: 1
|
|
103
|
+
});
|
|
104
|
+
CaptionMessage.displayName = "CaptionMessage";
|
|
105
|
+
CaptionMessage.displayName = 'CaptionMessage';
|
|
106
|
+
const CaptionIcon = exports.CaptionIcon = (0, _styles.styled)('div', ({
|
|
107
|
+
$theme
|
|
108
|
+
}) => ({
|
|
109
|
+
display: 'flex',
|
|
110
|
+
paddingTop: $theme.sizing.scale100,
|
|
111
|
+
paddingRight: $theme.sizing.scale100,
|
|
112
|
+
flexShrink: 0
|
|
113
|
+
}));
|
|
114
|
+
CaptionIcon.displayName = "CaptionIcon";
|
|
115
|
+
CaptionIcon.displayName = 'CaptionIcon';
|
|
96
116
|
const ControlContainer = exports.ControlContainer = (0, _styles.styled)('div', props => {
|
|
97
117
|
const {
|
|
98
118
|
$theme: {
|
package/form-control/types.d.ts
CHANGED
|
@@ -12,6 +12,10 @@ export type FormControlOverrides = {
|
|
|
12
12
|
LabelContainer?: Override;
|
|
13
13
|
/** Customizes the caption element. */
|
|
14
14
|
Caption?: Override;
|
|
15
|
+
/** Customizes the caption message element. */
|
|
16
|
+
CaptionMessage?: Override;
|
|
17
|
+
/** Customizes the caption icon element. */
|
|
18
|
+
CaptionIcon?: Override;
|
|
15
19
|
/** Customizes the container element. */
|
|
16
20
|
ControlContainer?: Override;
|
|
17
21
|
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
declare const _default: React.ForwardRefExoticComponent<React.SVGAttributes<SVGElement> & {
|
|
3
|
+
children?: React.ReactNode;
|
|
4
|
+
size?: import("./types").Size;
|
|
5
|
+
color?: string;
|
|
6
|
+
title?: string;
|
|
7
|
+
overrides?: import("./types").IconOverrides;
|
|
8
|
+
} & import("./types").StyledComponentArgs & React.RefAttributes<SVGSVGElement>>;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _styles = require("../styles");
|
|
9
|
+
var _overrides = require("../helpers/overrides");
|
|
10
|
+
var _icon = _interopRequireDefault(require("./icon"));
|
|
11
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
13
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
14
|
+
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); } /*
|
|
15
|
+
Copyright (c) Uber Technologies, Inc.
|
|
16
|
+
|
|
17
|
+
This source code is licensed under the MIT license found in the
|
|
18
|
+
LICENSE file in the root directory of this source tree.
|
|
19
|
+
*/ // BASEUI-GENERATED-REACT-ICON
|
|
20
|
+
// DO NOT EDIT THIS FILE DIRECTLY, SEE README.md
|
|
21
|
+
// @ts-ignore
|
|
22
|
+
function CircleCheckFilled(props, ref) {
|
|
23
|
+
const [, theme] = (0, _styles.useStyletron)();
|
|
24
|
+
const {
|
|
25
|
+
title = 'CircleCheckFilled',
|
|
26
|
+
size,
|
|
27
|
+
color,
|
|
28
|
+
overrides = {},
|
|
29
|
+
...restProps
|
|
30
|
+
} = props;
|
|
31
|
+
const SvgOverride = (0, _overrides.mergeOverride)(
|
|
32
|
+
// Icons from the theme target the SVG override in the underlying Icon component
|
|
33
|
+
{
|
|
34
|
+
component: theme.icons && theme.icons.CircleCheckFilled ? theme.icons.CircleCheckFilled : null
|
|
35
|
+
}, overrides && overrides.Svg ? (0, _overrides.toObjectOverride)(overrides.Svg) : {});
|
|
36
|
+
return /*#__PURE__*/React.createElement(_icon.default, _extends({
|
|
37
|
+
viewBox: "0 0 24 24",
|
|
38
|
+
ref: ref,
|
|
39
|
+
title: title,
|
|
40
|
+
size: size,
|
|
41
|
+
color: color,
|
|
42
|
+
overrides: {
|
|
43
|
+
Svg: SvgOverride
|
|
44
|
+
}
|
|
45
|
+
}, restProps), /*#__PURE__*/React.createElement("path", {
|
|
46
|
+
d: "M12 1C5.9 1 1 5.9 1 12s4.9 11 11 11 11-4.9 11-11S18.1 1 12 1Zm-1.5 16.1-5.6-5.6L7 9.4l3.4 3.4 6.4-6.4 2.1 2.1-8.4 8.6Z",
|
|
47
|
+
fill: "currentColor"
|
|
48
|
+
}));
|
|
49
|
+
}
|
|
50
|
+
var _default = exports.default = /*#__PURE__*/React.forwardRef(CircleCheckFilled);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
declare const _default: React.ForwardRefExoticComponent<React.SVGAttributes<SVGElement> & {
|
|
3
|
+
children?: React.ReactNode;
|
|
4
|
+
size?: import("./types").Size;
|
|
5
|
+
color?: string;
|
|
6
|
+
title?: string;
|
|
7
|
+
overrides?: import("./types").IconOverrides;
|
|
8
|
+
} & import("./types").StyledComponentArgs & React.RefAttributes<SVGSVGElement>>;
|
|
9
|
+
export default _default;
|