td-stylekit 30.17.2 → 31.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/CHANGELOG.md +19 -0
- package/dist/es/ActionBar/ActionBar.js +10 -12
- package/dist/es/ActionBar/components/IconButton.d.ts +11 -1
- package/dist/es/ActionBar/components/IconButton.js +28 -8
- package/dist/es/BarChart/BarChart.d.ts +3 -16
- package/dist/es/BarChart/BarChart.js +12 -17
- package/dist/es/Box/Box.js +3 -5
- package/dist/es/Button/Button.d.ts +1 -16
- package/dist/es/Button/Button.js +55 -23
- package/dist/es/Checkbox/Checkbox.d.ts +0 -4
- package/dist/es/Checkbox/Checkbox.js +9 -11
- package/dist/es/ComparisonChart/ComparisonChart.d.ts +2 -13
- package/dist/es/ComparisonChart/ComparisonChart.js +10 -12
- package/dist/es/DataGrid/DataGrid.d.ts +3 -14
- package/dist/es/DataGrid/DataGrid.js +83 -61
- package/dist/es/DataGrid/components/ColumnHeader.d.ts +2 -6
- package/dist/es/DataGrid/components/ColumnHeader.js +8 -10
- package/dist/es/DataGrid/components/FocusableRow.js +1 -1
- package/dist/es/DataGrid/components/InputCell.js +0 -3
- package/dist/es/DataGrid/components/ScrollableTable.d.ts +0 -15
- package/dist/es/DataGrid/components/ScrollableTable.js +32 -32
- package/dist/es/DataGrid/elements.d.ts +3 -6
- package/dist/es/DateControl/DateControl.d.ts +1 -6
- package/dist/es/DateControl/DateControl.js +2 -4
- package/dist/es/DateControl/elements.d.ts +1 -238
- package/dist/es/DatePicker/DatePicker.d.ts +0 -6
- package/dist/es/DatePicker/DatePicker.js +28 -19
- package/dist/es/DropdownButton/DropdownButton.d.ts +3 -10
- package/dist/es/DropdownButton/DropdownButton.js +18 -16
- package/dist/es/FileInput/FileInput.d.ts +1 -6
- package/dist/es/FileInput/FileInput.js +7 -9
- package/dist/es/FormControl/FormControl.d.ts +1 -2
- package/dist/es/FormControl/FormControl.js +31 -29
- package/dist/es/FormModal/FormModal.d.ts +1 -6
- package/dist/es/FormModal/FormModal.js +3 -5
- package/dist/es/GrowthRateChart/GrowthRateChart.d.ts +4 -64
- package/dist/es/GrowthRateChart/GrowthRateChart.js +32 -17
- package/dist/es/IconBar/IconBar.d.ts +4 -2
- package/dist/es/IconBar/IconItem.d.ts +4 -2
- package/dist/es/Link/Link.d.ts +4 -2
- package/dist/es/Link/Link.js +43 -11
- package/dist/es/Logo/Logo.d.ts +0 -7
- package/dist/es/Logo/Logo.js +6 -8
- package/dist/es/Logo/LogoDark.d.ts +1 -8
- package/dist/es/Logo/LogoDark.js +5 -7
- package/dist/es/Logo/LogoLight.d.ts +1 -8
- package/dist/es/Logo/LogoLight.js +5 -7
- package/dist/es/Menu/Menu.d.ts +0 -4
- package/dist/es/Menu/Menu.js +6 -8
- package/dist/es/Menu/MenuElements.d.ts +2 -6
- package/dist/es/Menu/MenuElements.js +10 -9
- package/dist/es/Modal/Modal.d.ts +2 -9
- package/dist/es/Modal/Modal.js +13 -13
- package/dist/es/Modal/components/MenuBody.d.ts +1 -3
- package/dist/es/Modal/components/ModalMessage.d.ts +1 -6
- package/dist/es/Modal/components/ModalMessage.js +14 -16
- package/dist/es/Modal/components/ModalOverlay.d.ts +1 -0
- package/dist/es/Modal/components/elements.d.ts +19 -19
- package/dist/es/Modal/components/elements.js +20 -21
- package/dist/es/MultiSelect/MultiSelect.d.ts +3 -27
- package/dist/es/MultiSelect/MultiSelect.js +46 -46
- package/dist/es/Radio/Radio.d.ts +1 -6
- package/dist/es/Radio/Radio.js +14 -15
- package/dist/es/SecondaryNavigation/SecondaryNavigation.d.ts +1 -7
- package/dist/es/SecondaryNavigation/SecondaryNavigation.js +3 -5
- package/dist/es/Section/Section.d.ts +1 -5
- package/dist/es/Section/Section.js +4 -6
- package/dist/es/Select/Select.d.ts +1 -13
- package/dist/es/Select/Select.js +9 -22
- package/dist/es/Shuttle/Shuttle.d.ts +3 -15
- package/dist/es/Shuttle/Shuttle.js +22 -22
- package/dist/es/Tagger/Tagger.d.ts +2 -10
- package/dist/es/Tagger/Tagger.js +39 -41
- package/dist/es/Tagger/TaggerElements.d.ts +4 -2
- package/dist/es/Tagger/components/PopupSelector.d.ts +13 -19
- package/dist/es/Tagger/components/PopupSelector.js +49 -50
- package/dist/es/Tagger/components/PopupSelectorElements.d.ts +4 -2
- package/dist/es/Tagger/types.d.ts +5 -5
- package/dist/es/TimeControl/TimeControl.js +25 -18
- package/dist/es/TimeControl/elements.d.ts +1 -238
- package/dist/es/TimePicker/TimePicker.js +6 -10
- package/dist/es/TimePicker/components/Spinner.js +16 -12
- package/dist/es/Toast/Toast.d.ts +4 -11
- package/dist/es/Toast/Toast.js +12 -13
- package/dist/es/Toggle/Toggle.d.ts +0 -5
- package/dist/es/Toggle/Toggle.js +10 -11
- package/dist/es/TooltipPopover/TooltipPopover.d.ts +1 -8
- package/dist/es/TooltipPopover/TooltipPopover.js +6 -9
- package/dist/es/Tree/Tree.js +2 -4
- package/dist/es/VolumeChart/VolumeChart.d.ts +1 -10
- package/dist/es/VolumeChart/VolumeChart.js +6 -8
- package/package.json +4 -4
|
@@ -6,15 +6,15 @@ export type DropdownButtonProps = {
|
|
|
6
6
|
className?: string;
|
|
7
7
|
disabled?: boolean;
|
|
8
8
|
disabledTitle?: string;
|
|
9
|
-
'data-instrumentation'
|
|
9
|
+
'data-instrumentation'?: string;
|
|
10
10
|
id?: string;
|
|
11
11
|
loading?: boolean;
|
|
12
12
|
/** Fired when main button is clicked */
|
|
13
13
|
onClick: () => void;
|
|
14
14
|
/** Fired when dropdown is closed */
|
|
15
|
-
onClose
|
|
15
|
+
onClose?: () => void;
|
|
16
16
|
/** Fired when dropdown is opened */
|
|
17
|
-
onOpen
|
|
17
|
+
onOpen?: () => void;
|
|
18
18
|
forceOpenUp?: boolean;
|
|
19
19
|
primary?: boolean;
|
|
20
20
|
/** Array of nodes to show in dropdown */
|
|
@@ -26,13 +26,6 @@ type DropdownButtonState = {
|
|
|
26
26
|
hovered: boolean;
|
|
27
27
|
};
|
|
28
28
|
declare class DropdownButton extends Component<DropdownButtonProps, DropdownButtonState> {
|
|
29
|
-
static defaultProps: {
|
|
30
|
-
onClose: () => void;
|
|
31
|
-
onOpen: () => void;
|
|
32
|
-
'data-instrumentation': string;
|
|
33
|
-
primary: boolean;
|
|
34
|
-
forceOpenUp: boolean;
|
|
35
|
-
};
|
|
36
29
|
static SecondaryAction: import("@emotion/styled").StyledComponent<any, {}, {}>;
|
|
37
30
|
state: {
|
|
38
31
|
open: boolean;
|
|
@@ -14,7 +14,7 @@ var _Modal = _interopRequireDefault(require("../Modal"));
|
|
|
14
14
|
var _Button = require("../Button");
|
|
15
15
|
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
16
16
|
var _excluded = ["children", "placement"],
|
|
17
|
-
_excluded2 = ["children", "data-instrumentation", "disabled", "loading", "onClick", "onClose", "onOpen", "forceOpenUp", "secondaryActions", "className"];
|
|
17
|
+
_excluded2 = ["children", "data-instrumentation", "disabled", "loading", "onClick", "onClose", "onOpen", "forceOpenUp", "secondaryActions", "className", "primary"];
|
|
18
18
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
19
19
|
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
20
20
|
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
@@ -121,8 +121,10 @@ var DropdownButton = /*#__PURE__*/function (_Component) {
|
|
|
121
121
|
key: "componentDidUpdate",
|
|
122
122
|
value: function componentDidUpdate(_prevProps, prevState) {
|
|
123
123
|
var _this$props = this.props,
|
|
124
|
-
onClose = _this$props.onClose,
|
|
125
|
-
|
|
124
|
+
_this$props$onClose = _this$props.onClose,
|
|
125
|
+
onClose = _this$props$onClose === void 0 ? _DropdownButtonUtils.noop : _this$props$onClose,
|
|
126
|
+
_this$props$onOpen = _this$props.onOpen,
|
|
127
|
+
onOpen = _this$props$onOpen === void 0 ? _DropdownButtonUtils.noop : _this$props$onOpen;
|
|
126
128
|
if (prevState.open !== this.state.open) {
|
|
127
129
|
if (this.state.open) {
|
|
128
130
|
onOpen();
|
|
@@ -137,16 +139,22 @@ var DropdownButton = /*#__PURE__*/function (_Component) {
|
|
|
137
139
|
var _this2 = this;
|
|
138
140
|
var _this$props2 = this.props,
|
|
139
141
|
children = _this$props2.children,
|
|
140
|
-
|
|
142
|
+
_this$props2$dataIns = _this$props2['data-instrumentation'],
|
|
143
|
+
dataInstrumentation = _this$props2$dataIns === void 0 ? 'dropdownbutton' : _this$props2$dataIns,
|
|
141
144
|
disabled = _this$props2.disabled,
|
|
142
145
|
_this$props2$loading = _this$props2.loading,
|
|
143
146
|
loading = _this$props2$loading === void 0 ? false : _this$props2$loading,
|
|
144
147
|
onClick = _this$props2.onClick,
|
|
145
|
-
onClose = _this$props2.onClose,
|
|
146
|
-
|
|
147
|
-
|
|
148
|
+
_this$props2$onClose = _this$props2.onClose,
|
|
149
|
+
onClose = _this$props2$onClose === void 0 ? _DropdownButtonUtils.noop : _this$props2$onClose,
|
|
150
|
+
_this$props2$onOpen = _this$props2.onOpen,
|
|
151
|
+
onOpen = _this$props2$onOpen === void 0 ? _DropdownButtonUtils.noop : _this$props2$onOpen,
|
|
152
|
+
_this$props2$forceOpe = _this$props2.forceOpenUp,
|
|
153
|
+
forceOpenUp = _this$props2$forceOpe === void 0 ? false : _this$props2$forceOpe,
|
|
148
154
|
secondaryActions = _this$props2.secondaryActions,
|
|
149
155
|
className = _this$props2.className,
|
|
156
|
+
_this$props2$primary = _this$props2.primary,
|
|
157
|
+
primary = _this$props2$primary === void 0 ? true : _this$props2$primary,
|
|
150
158
|
buttonProps = _objectWithoutProperties(_this$props2, _excluded2);
|
|
151
159
|
var buttonWidth = this.baseButton.current ? Math.floor(this.baseButton.current.getBoundingClientRect().width) : undefined;
|
|
152
160
|
var generateId = function generateId(childId) {
|
|
@@ -174,6 +182,7 @@ var DropdownButton = /*#__PURE__*/function (_Component) {
|
|
|
174
182
|
return _this2.hover(false);
|
|
175
183
|
}
|
|
176
184
|
}, buttonProps), {}, {
|
|
185
|
+
primary: primary,
|
|
177
186
|
tabIndex: -1,
|
|
178
187
|
role: "presentation",
|
|
179
188
|
children: [(0, _jsxRuntime.jsxs)(_DropdownButtonElements.ActionTrigger, {
|
|
@@ -187,7 +196,7 @@ var DropdownButton = /*#__PURE__*/function (_Component) {
|
|
|
187
196
|
onKeyDown: !disabled ? (0, _DropdownButtonUtils.onEnterOrSpace)(onClick) : undefined,
|
|
188
197
|
tabIndex: disabled ? -1 : 0,
|
|
189
198
|
role: "button",
|
|
190
|
-
darkFocus: !
|
|
199
|
+
darkFocus: !primary && !this.state.hovered,
|
|
191
200
|
children: [children, loading && (0, _jsxRuntime.jsx)(_Button.Spinner, {
|
|
192
201
|
"data-gs": gs("src", "dropdownbutton", "dropdownbutton.tsx", "container", "action-trigger", "spinner"),
|
|
193
202
|
"data-testid": "spinner",
|
|
@@ -210,7 +219,7 @@ var DropdownButton = /*#__PURE__*/function (_Component) {
|
|
|
210
219
|
"aria-haspopup": "true",
|
|
211
220
|
"aria-label": "Show more actions",
|
|
212
221
|
"aria-disabled": disabled || loading,
|
|
213
|
-
darkFocus: !
|
|
222
|
+
darkFocus: !primary && !this.state.hovered,
|
|
214
223
|
children: (0, _jsxRuntime.jsx)(_DropdownButtonElements.DropdownTrigger, {
|
|
215
224
|
"data-gs": gs("src", "dropdownbutton", "dropdownbutton.tsx", "container", "dropdown-trigger-container", "dropdown-trigger"),
|
|
216
225
|
showBorder: !disabled && (this.state.open || this.state.hovered),
|
|
@@ -242,12 +251,5 @@ var DropdownButton = /*#__PURE__*/function (_Component) {
|
|
|
242
251
|
}
|
|
243
252
|
}]);
|
|
244
253
|
}(_react.Component);
|
|
245
|
-
_defineProperty(DropdownButton, "defaultProps", {
|
|
246
|
-
onClose: _DropdownButtonUtils.noop,
|
|
247
|
-
onOpen: _DropdownButtonUtils.noop,
|
|
248
|
-
'data-instrumentation': 'dropdownbutton',
|
|
249
|
-
primary: true,
|
|
250
|
-
forceOpenUp: false
|
|
251
|
-
});
|
|
252
254
|
_defineProperty(DropdownButton, "SecondaryAction", _DropdownButtonElements.SecondaryAction);
|
|
253
255
|
var _default = exports["default"] = DropdownButton;
|
|
@@ -3,7 +3,7 @@ export type FileInputProps = {
|
|
|
3
3
|
/** comma-separated list of [content type specifiers](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#attr-accept). */
|
|
4
4
|
accept?: string;
|
|
5
5
|
/** Allow multiple files to be selected. */
|
|
6
|
-
multiple
|
|
6
|
+
multiple?: boolean;
|
|
7
7
|
/** Value for the html name property. */
|
|
8
8
|
name?: string;
|
|
9
9
|
/** Receives an Array of [Files](https://developer.mozilla.org/en-US/docs/Web/API/File) as argument. */
|
|
@@ -14,11 +14,6 @@ export type FileInputProps = {
|
|
|
14
14
|
'data-instrumentation'?: string;
|
|
15
15
|
};
|
|
16
16
|
declare class FileInput extends Component<FileInputProps> {
|
|
17
|
-
static defaultProps: {
|
|
18
|
-
accept: string;
|
|
19
|
-
multiple: boolean;
|
|
20
|
-
'data-instrumentation': string;
|
|
21
|
-
};
|
|
22
17
|
input: import("react").RefObject<HTMLInputElement>;
|
|
23
18
|
render(): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
24
19
|
_onChange: ({ target }: ChangeEvent<HTMLInputElement>) => void;
|
|
@@ -37,7 +37,7 @@ var HiddenInput = /*#__PURE__*/(0, _base["default"])('input', process.env.NODE_E
|
|
|
37
37
|
} : {
|
|
38
38
|
name: "eivff4",
|
|
39
39
|
styles: "display:none",
|
|
40
|
-
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
40
|
+
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL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AgdHlwZT1cImZpbGVcIlxuICAgICAgICAgIGRhdGEtaW5zdHJ1bWVudGF0aW9uPXtgJHtkYXRhSW5zdHJ1bWVudGF0aW9ufS1pbnB1dGB9XG4gICAgICAgIC8+XG4gICAgICA8L0J1dHRvbj5cbiAgICApXG4gIH1cblxuICBfb25DaGFuZ2UgPSAoeyB0YXJnZXQgfTogQ2hhbmdlRXZlbnQ8SFRNTElucHV0RWxlbWVudD4pID0+IHtcbiAgICB0aGlzLnByb3BzLm9uQ2hhbmdlKEFycmF5LmZyb20odGFyZ2V0LmZpbGVzIGFzIEZpbGVMaXN0KSlcbiAgfVxufVxuXG5leHBvcnQgZGVmYXVsdCBGaWxlSW5wdXRcbiJdfQ== */",
|
|
41
41
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
42
42
|
});
|
|
43
43
|
var FileInput = /*#__PURE__*/function (_Component) {
|
|
@@ -61,10 +61,13 @@ var FileInput = /*#__PURE__*/function (_Component) {
|
|
|
61
61
|
value: function render() {
|
|
62
62
|
var _this2 = this;
|
|
63
63
|
var _this$props = this.props,
|
|
64
|
-
accept = _this$props.accept,
|
|
65
|
-
|
|
64
|
+
_this$props$accept = _this$props.accept,
|
|
65
|
+
accept = _this$props$accept === void 0 ? '' : _this$props$accept,
|
|
66
|
+
_this$props$dataInst = _this$props['data-instrumentation'],
|
|
67
|
+
dataInstrumentation = _this$props$dataInst === void 0 ? 'fileinput' : _this$props$dataInst,
|
|
66
68
|
name = _this$props.name,
|
|
67
|
-
multiple = _this$props.multiple,
|
|
69
|
+
_this$props$multiple = _this$props.multiple,
|
|
70
|
+
multiple = _this$props$multiple === void 0 ? false : _this$props$multiple,
|
|
68
71
|
text = _this$props.text;
|
|
69
72
|
return (0, _jsxRuntime.jsxs)(_Button["default"], {
|
|
70
73
|
"data-gs": gs("src", "fileinput", "fileinput.tsx", "button"),
|
|
@@ -87,9 +90,4 @@ var FileInput = /*#__PURE__*/function (_Component) {
|
|
|
87
90
|
}
|
|
88
91
|
}]);
|
|
89
92
|
}(_react.Component);
|
|
90
|
-
_defineProperty(FileInput, "defaultProps", {
|
|
91
|
-
accept: '',
|
|
92
|
-
multiple: false,
|
|
93
|
-
'data-instrumentation': 'fileinput'
|
|
94
|
-
});
|
|
95
93
|
var _default = exports["default"] = FileInput;
|
|
@@ -38,7 +38,7 @@ export type FormControlProps<T extends FormControlTypes = 'text'> = {
|
|
|
38
38
|
/** Show only first error with ellipsis */
|
|
39
39
|
truncateErrors?: boolean;
|
|
40
40
|
truncateWarnings?: boolean;
|
|
41
|
-
type
|
|
41
|
+
type?: T;
|
|
42
42
|
valueCanBeNull?: boolean;
|
|
43
43
|
warning?: ReactNode | null;
|
|
44
44
|
/** Gives a custom width to the LabelWrapper */
|
|
@@ -56,7 +56,6 @@ export type FormControlProps<T extends FormControlTypes = 'text'> = {
|
|
|
56
56
|
* @deprecated Use FormRow instead.
|
|
57
57
|
*/
|
|
58
58
|
declare class FormControl<T extends FormControlTypes = 'text'> extends PureComponent<FormControlProps<T>> {
|
|
59
|
-
static defaultProps: Partial<FormControlProps>;
|
|
60
59
|
hintIconRef: import("react").RefObject<SVGSVGElement>;
|
|
61
60
|
warningIconRef: import("react").RefObject<HTMLDivElement>;
|
|
62
61
|
getTypeComponent: (type: FormControlTypes) => typeof Input | import("react").FunctionComponent<import("react").PropsWithChildren<CheckboxGroupProps>> | import("react").FunctionComponent<import("react").PropsWithChildren<RadioGroupProps>> | ((props: any) => import("@emotion/react/jsx-runtime").JSX.Element);
|
|
@@ -15,7 +15,7 @@ var _Select = _interopRequireDefault(require("../Select"));
|
|
|
15
15
|
var _components = require("./components");
|
|
16
16
|
var _elements = require("./elements");
|
|
17
17
|
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
18
|
-
var _excluded = ["addOnClassName", "blockLabel", "className", "isClearable", "data-gs-c", "data-instrumentation", "showFullError", "showFullHint", "showFullInfo", "showFullLabel", "showFullWarning", "error", "info", "getRef", "hint", "hintNode", "id", "invalid", "label", "name", "onChange", "required", "size", "truncateErrors", "truncateWarnings", "type", "value", "warning", "labelWidth", "inputCss", "optionRenderer"];
|
|
18
|
+
var _excluded = ["addOnClassName", "blockLabel", "className", "isClearable", "data-gs-c", "data-instrumentation", "showFullError", "showFullHint", "showFullInfo", "showFullLabel", "showFullWarning", "error", "info", "getRef", "hint", "hintNode", "id", "invalid", "label", "name", "onChange", "required", "size", "truncateErrors", "truncateWarnings", "type", "value", "warning", "labelWidth", "inputCss", "optionRenderer", "guessMenuWidth"];
|
|
19
19
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
20
20
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
21
21
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -76,33 +76,48 @@ var FormControl = /*#__PURE__*/function (_PureComponent) {
|
|
|
76
76
|
className = _this$props.className,
|
|
77
77
|
isClearable = _this$props.isClearable,
|
|
78
78
|
dataGsC = _this$props['data-gs-c'],
|
|
79
|
-
|
|
79
|
+
_this$props$dataInst = _this$props['data-instrumentation'],
|
|
80
|
+
dataInstrumentation = _this$props$dataInst === void 0 ? 'formcontrol' : _this$props$dataInst,
|
|
80
81
|
showFullError = _this$props.showFullError,
|
|
81
82
|
showFullHint = _this$props.showFullHint,
|
|
82
|
-
|
|
83
|
-
|
|
83
|
+
_this$props$showFullI = _this$props.showFullInfo,
|
|
84
|
+
showFullInfo = _this$props$showFullI === void 0 ? true : _this$props$showFullI,
|
|
85
|
+
_this$props$showFullL = _this$props.showFullLabel,
|
|
86
|
+
showFullLabel = _this$props$showFullL === void 0 ? false : _this$props$showFullL,
|
|
84
87
|
showFullWarning = _this$props.showFullWarning,
|
|
85
|
-
error = _this$props.error,
|
|
86
|
-
|
|
88
|
+
_this$props$error = _this$props.error,
|
|
89
|
+
error = _this$props$error === void 0 ? [] : _this$props$error,
|
|
90
|
+
_this$props$info = _this$props.info,
|
|
91
|
+
info = _this$props$info === void 0 ? '' : _this$props$info,
|
|
87
92
|
getRef = _this$props.getRef,
|
|
88
|
-
hint = _this$props.hint,
|
|
93
|
+
_this$props$hint = _this$props.hint,
|
|
94
|
+
hint = _this$props$hint === void 0 ? '' : _this$props$hint,
|
|
89
95
|
hintNode = _this$props.hintNode,
|
|
90
96
|
id = _this$props.id,
|
|
91
|
-
invalid = _this$props.invalid,
|
|
97
|
+
_this$props$invalid = _this$props.invalid,
|
|
98
|
+
invalid = _this$props$invalid === void 0 ? false : _this$props$invalid,
|
|
92
99
|
label = _this$props.label,
|
|
93
100
|
name = _this$props.name,
|
|
94
101
|
onChange = _this$props.onChange,
|
|
95
102
|
required = _this$props.required,
|
|
96
|
-
size = _this$props.size,
|
|
97
|
-
|
|
103
|
+
_this$props$size = _this$props.size,
|
|
104
|
+
size = _this$props$size === void 0 ? 'medium' : _this$props$size,
|
|
105
|
+
_this$props$truncateE = _this$props.truncateErrors,
|
|
106
|
+
truncateErrors = _this$props$truncateE === void 0 ? true : _this$props$truncateE,
|
|
98
107
|
truncateWarnings = _this$props.truncateWarnings,
|
|
99
|
-
type = _this$props.type,
|
|
108
|
+
_this$props$type = _this$props.type,
|
|
109
|
+
type = _this$props$type === void 0 ? 'text' : _this$props$type,
|
|
100
110
|
value = _this$props.value,
|
|
101
|
-
warning = _this$props.warning,
|
|
111
|
+
_this$props$warning = _this$props.warning,
|
|
112
|
+
warning = _this$props$warning === void 0 ? [] : _this$props$warning,
|
|
102
113
|
labelWidth = _this$props.labelWidth,
|
|
103
114
|
inputCss = _this$props.inputCss,
|
|
104
115
|
optionRenderer = _this$props.optionRenderer,
|
|
116
|
+
_this$props$guessMenu = _this$props.guessMenuWidth,
|
|
117
|
+
guessMenuWidth = _this$props$guessMenu === void 0 ? true : _this$props$guessMenu,
|
|
105
118
|
props = _objectWithoutProperties(_this$props, _excluded);
|
|
119
|
+
var disabled = 'disabled' in this.props ? this.props.disabled : false;
|
|
120
|
+
var placeholder = 'placeholder' in this.props ? this.props.placeholder : '';
|
|
106
121
|
var InputComponent = this.getTypeComponent(type);
|
|
107
122
|
var errorList = (0, _FormField.getErrorList)(error);
|
|
108
123
|
var warningList = (0, _FormField.getWarningList)(warning);
|
|
@@ -132,7 +147,10 @@ var FormControl = /*#__PURE__*/function (_PureComponent) {
|
|
|
132
147
|
optionRenderer: optionRenderer,
|
|
133
148
|
css: Object.assign({}, {
|
|
134
149
|
width: '100%'
|
|
135
|
-
}, inputCss)
|
|
150
|
+
}, inputCss),
|
|
151
|
+
disabled: disabled,
|
|
152
|
+
placeholder: placeholder,
|
|
153
|
+
guessMenuWidth: guessMenuWidth
|
|
136
154
|
}, props));
|
|
137
155
|
var hintAddon = (0, _jsxRuntime.jsx)(_FormFieldAddon["default"], {
|
|
138
156
|
"data-gs": gs("src", "formcontrol", "formcontrol.tsx", "form-field-addon"),
|
|
@@ -251,20 +269,4 @@ var FormControl = /*#__PURE__*/function (_PureComponent) {
|
|
|
251
269
|
}
|
|
252
270
|
}]);
|
|
253
271
|
}(_react.PureComponent); // eslint-disable-next-line deprecation/deprecation
|
|
254
|
-
_defineProperty(FormControl, "defaultProps", {
|
|
255
|
-
disabled: false,
|
|
256
|
-
error: [],
|
|
257
|
-
info: '',
|
|
258
|
-
hint: '',
|
|
259
|
-
invalid: false,
|
|
260
|
-
'data-instrumentation': 'formcontrol',
|
|
261
|
-
placeholder: '',
|
|
262
|
-
size: 'medium',
|
|
263
|
-
truncateErrors: true,
|
|
264
|
-
type: 'text',
|
|
265
|
-
showFullInfo: true,
|
|
266
|
-
showFullLabel: false,
|
|
267
|
-
warning: [],
|
|
268
|
-
guessMenuWidth: true
|
|
269
|
-
});
|
|
270
272
|
var _default = exports["default"] = FormControl;
|
|
@@ -16,11 +16,6 @@ export type FormProps = {
|
|
|
16
16
|
name: string;
|
|
17
17
|
onSubmit: (event: FormEvent<HTMLFormElement>) => void;
|
|
18
18
|
};
|
|
19
|
-
declare const FormModal: {
|
|
20
|
-
({ cancelLabel, cancelProps, children, closeTitle, confirmLabel, confirmProps, destructive, dialogIdentifier, disableCancel, "data-instrumentation": dataInstrumentation, dynamite, formName, headerId, hideCancel, leftAction, onCancel, onConfirm, onHide, onSubmit, show, size, smallFont, submitAutoFocus, submitDisabled, subtitle, title, ...props }: FormModalProps): ReactElement;
|
|
21
|
-
defaultProps: {
|
|
22
|
-
'data-instrumentation': string;
|
|
23
|
-
};
|
|
24
|
-
};
|
|
19
|
+
declare const FormModal: ({ cancelLabel, cancelProps, children, closeTitle, confirmLabel, confirmProps, destructive, dialogIdentifier, disableCancel, "data-instrumentation": dataInstrumentation, dynamite, formName, headerId, hideCancel, leftAction, onCancel, onConfirm, onHide, onSubmit, show, size, smallFont, submitAutoFocus, submitDisabled, subtitle, title, ...props }: FormModalProps) => ReactElement;
|
|
25
20
|
export default FormModal;
|
|
26
21
|
//# sourceMappingURL=FormModal.d.ts.map
|
|
@@ -31,7 +31,7 @@ var StyledForm = /*#__PURE__*/(0, _base["default"])('form', process.env.NODE_ENV
|
|
|
31
31
|
} : {
|
|
32
32
|
name: "cjeekl",
|
|
33
33
|
styles: "display:flex;flex-direction:column;flex:auto;overflow:auto",
|
|
34
|
-
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9Gb3JtTW9kYWwvRm9ybU1vZGFsLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFpQ21CIiwiZmlsZSI6Ii4uLy4uLy4uL3NyYy9Gb3JtTW9kYWwvRm9ybU1vZGFsLnRzeCIsInNvdX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249e2xlZnRBY3Rpb259XG4gICAgICAgIG9uQ2FuY2VsPXtvbkNhbmNlbH1cbiAgICAgICAgb25Db25maXJtPXtvbkNvbmZpcm19XG4gICAgICAvPlxuICAgIDwvRm9ybT5cbiAgPC9Nb2RhbD5cbilcblxuZXhwb3J0IGRlZmF1bHQgRm9ybU1vZGFsXG4iXX0= */",
|
|
35
35
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
36
36
|
});
|
|
37
37
|
var Form = function Form(_ref) {
|
|
@@ -59,7 +59,8 @@ var FormModal = function FormModal(_ref2) {
|
|
|
59
59
|
destructive = _ref2.destructive,
|
|
60
60
|
dialogIdentifier = _ref2.dialogIdentifier,
|
|
61
61
|
disableCancel = _ref2.disableCancel,
|
|
62
|
-
|
|
62
|
+
_ref2$dataInstrument = _ref2['data-instrumentation'],
|
|
63
|
+
dataInstrumentation = _ref2$dataInstrument === void 0 ? 'formmodal' : _ref2$dataInstrument,
|
|
63
64
|
dynamite = _ref2.dynamite,
|
|
64
65
|
formName = _ref2.formName,
|
|
65
66
|
headerId = _ref2.headerId,
|
|
@@ -137,7 +138,4 @@ var FormModal = function FormModal(_ref2) {
|
|
|
137
138
|
})]
|
|
138
139
|
}));
|
|
139
140
|
};
|
|
140
|
-
FormModal.defaultProps = {
|
|
141
|
-
'data-instrumentation': 'formmodal'
|
|
142
|
-
};
|
|
143
141
|
var _default = exports["default"] = FormModal;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { BarChartProps } from '../BarChart';
|
|
2
2
|
import { chartUtils } from '../ChartPrimitives';
|
|
3
3
|
import type { Theme } from '../ThemeProvider';
|
|
4
|
-
export type GrowthRateChartProps = Omit<BarChartProps, 'customizeTheme' | 'barColor'> & {
|
|
4
|
+
export type GrowthRateChartProps = Omit<BarChartProps, 'customizeTheme' | 'barColor' | 'tooltipLabel' | 'theme'> & {
|
|
5
5
|
width: number;
|
|
6
6
|
height: number;
|
|
7
7
|
data: chartUtils.Datum[];
|
|
@@ -9,72 +9,12 @@ export type GrowthRateChartProps = Omit<BarChartProps, 'customizeTheme' | 'barCo
|
|
|
9
9
|
xTickLabel?: (data: chartUtils.Datum['x']) => string;
|
|
10
10
|
xTickValues?: any[];
|
|
11
11
|
yTickLabel?: (data: chartUtils.Datum['y']) => string;
|
|
12
|
-
tooltipLabel
|
|
12
|
+
tooltipLabel?: (data: chartUtils.Datum) => string | string[];
|
|
13
13
|
detailed?: boolean;
|
|
14
14
|
grayscale?: boolean;
|
|
15
|
-
theme
|
|
15
|
+
theme?: Theme;
|
|
16
16
|
};
|
|
17
|
-
declare function GrowthRateChart(props: GrowthRateChartProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
18
|
-
declare namespace GrowthRateChart {
|
|
19
|
-
var defaultProps: {
|
|
20
|
-
barRatio: number;
|
|
21
|
-
theme: {
|
|
22
|
-
readonly space: string[];
|
|
23
|
-
readonly palette: {
|
|
24
|
-
success: string[];
|
|
25
|
-
warning: string[];
|
|
26
|
-
error: string[];
|
|
27
|
-
primary: string[];
|
|
28
|
-
secondary: string[];
|
|
29
|
-
neutral: string[];
|
|
30
|
-
};
|
|
31
|
-
readonly fontFamily: {
|
|
32
|
-
body: string;
|
|
33
|
-
monospace: string;
|
|
34
|
-
};
|
|
35
|
-
readonly fontSize: string[];
|
|
36
|
-
readonly lineHeight: number[];
|
|
37
|
-
readonly radius: string[];
|
|
38
|
-
readonly borderWidth: string[];
|
|
39
|
-
readonly grid: number[];
|
|
40
|
-
readonly shadows: {
|
|
41
|
-
small: string;
|
|
42
|
-
big: string;
|
|
43
|
-
pill: string;
|
|
44
|
-
bigCentered: string;
|
|
45
|
-
popover: string;
|
|
46
|
-
secondaryNavActiveItem: string;
|
|
47
|
-
flyout: string;
|
|
48
|
-
};
|
|
49
|
-
readonly sizes: {
|
|
50
|
-
PageHeaderIcon: number;
|
|
51
|
-
};
|
|
52
|
-
readonly zIndex: {
|
|
53
|
-
Base: number;
|
|
54
|
-
Overlay: number;
|
|
55
|
-
FormControl: number;
|
|
56
|
-
SecondaryNav: number;
|
|
57
|
-
SecondaryNavActiveItem: number;
|
|
58
|
-
PrimaryNav: number;
|
|
59
|
-
PopOver: number;
|
|
60
|
-
PageHeaderSearch: number;
|
|
61
|
-
Modal: number;
|
|
62
|
-
Tether: number;
|
|
63
|
-
GlobalNav: number;
|
|
64
|
-
Toast: number;
|
|
65
|
-
};
|
|
66
|
-
readonly gradient: {
|
|
67
|
-
main: string;
|
|
68
|
-
neutral: string;
|
|
69
|
-
};
|
|
70
|
-
};
|
|
71
|
-
tooltipLabel: (d: any) => any[];
|
|
72
|
-
xTickLabel: (ts: number) => string;
|
|
73
|
-
yTickLabel: (percentage: any) => string;
|
|
74
|
-
animate: boolean;
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
export default GrowthRateChart;
|
|
78
17
|
export declare const defaultYTickLabel: (percentage: any) => string;
|
|
79
18
|
export declare const defaultTooltipLabel: (d: any) => any[];
|
|
19
|
+
export default function GrowthRateChart({ barRatio, theme, tooltipLabel, xTickLabel, yTickLabel, animate, ...props }: GrowthRateChartProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
80
20
|
//# sourceMappingURL=GrowthRateChart.d.ts.map
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
@@ -9,37 +10,51 @@ var _BarChart = _interopRequireDefault(require("../BarChart"));
|
|
|
9
10
|
var _ChartPrimitives = require("../ChartPrimitives");
|
|
10
11
|
var _ThemeProvider = require("../ThemeProvider");
|
|
11
12
|
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
13
|
+
var _excluded = ["barRatio", "theme", "tooltipLabel", "xTickLabel", "yTickLabel", "animate"];
|
|
12
14
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
13
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
14
15
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
15
16
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
16
17
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
17
18
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
18
19
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
20
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
21
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
19
22
|
if (typeof window !== "undefined" && !window.gs) window.gs = function () {};
|
|
20
23
|
if (typeof window !== "undefined" && !window.gsC) window.gsC = function () {};
|
|
21
|
-
function
|
|
24
|
+
var defaultYTickLabel = exports.defaultYTickLabel = function defaultYTickLabel(percentage) {
|
|
25
|
+
return "".concat(percentage, "%");
|
|
26
|
+
};
|
|
27
|
+
var defaultTooltipLabel = exports.defaultTooltipLabel = function defaultTooltipLabel(d) {
|
|
28
|
+
return ["".concat(_ChartPrimitives.chartUtils.dateTickLabel()(d.x)), "".concat(defaultYTickLabel(d.y), " Growth"), d.profiles && "(".concat(d.profiles, " Profiles)")].filter(Boolean);
|
|
29
|
+
};
|
|
30
|
+
var defaultXTickLabel = _ChartPrimitives.chartUtils.dateTickLabel();
|
|
31
|
+
function GrowthRateChart(_ref) {
|
|
32
|
+
var _ref$barRatio = _ref.barRatio,
|
|
33
|
+
barRatio = _ref$barRatio === void 0 ? 0.8 : _ref$barRatio,
|
|
34
|
+
_ref$theme = _ref.theme,
|
|
35
|
+
theme = _ref$theme === void 0 ? _ThemeProvider.theme : _ref$theme,
|
|
36
|
+
_ref$tooltipLabel = _ref.tooltipLabel,
|
|
37
|
+
tooltipLabel = _ref$tooltipLabel === void 0 ? defaultTooltipLabel : _ref$tooltipLabel,
|
|
38
|
+
_ref$xTickLabel = _ref.xTickLabel,
|
|
39
|
+
xTickLabel = _ref$xTickLabel === void 0 ? defaultXTickLabel : _ref$xTickLabel,
|
|
40
|
+
_ref$yTickLabel = _ref.yTickLabel,
|
|
41
|
+
yTickLabel = _ref$yTickLabel === void 0 ? defaultYTickLabel : _ref$yTickLabel,
|
|
42
|
+
_ref$animate = _ref.animate,
|
|
43
|
+
animate = _ref$animate === void 0 ? _ChartPrimitives.chartUtils.ANIMATE : _ref$animate,
|
|
44
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
22
45
|
var defaultBarColor = function defaultBarColor(datum) {
|
|
23
46
|
return datum.y < 0 ? _ChartPrimitives.chartUtils.DEFAULT_COLORS[3] : _ChartPrimitives.chartUtils.DEFAULT_COLORS[2];
|
|
24
47
|
};
|
|
25
48
|
return (0, _jsxRuntime.jsx)(_BarChart["default"], _objectSpread(_objectSpread({
|
|
26
49
|
"data-gs": gs("src", "growthratechart", "growthratechart.tsx", "growth-rate-chart", "bar-chart")
|
|
27
50
|
}, props), {}, {
|
|
51
|
+
barRatio: barRatio,
|
|
52
|
+
theme: theme,
|
|
53
|
+
tooltipLabel: tooltipLabel,
|
|
54
|
+
xTickLabel: xTickLabel,
|
|
55
|
+
yTickLabel: yTickLabel,
|
|
56
|
+
animate: animate,
|
|
28
57
|
barColor: defaultBarColor,
|
|
29
58
|
isGrowthRateChart: true
|
|
30
59
|
}));
|
|
31
|
-
}
|
|
32
|
-
var defaultYTickLabel = exports.defaultYTickLabel = function defaultYTickLabel(percentage) {
|
|
33
|
-
return "".concat(percentage, "%");
|
|
34
|
-
};
|
|
35
|
-
var defaultTooltipLabel = exports.defaultTooltipLabel = function defaultTooltipLabel(d) {
|
|
36
|
-
return ["".concat(_ChartPrimitives.chartUtils.dateTickLabel()(d.x)), "".concat(defaultYTickLabel(d.y), " Growth"), d.profiles && "(".concat(d.profiles, " Profiles)")].filter(Boolean);
|
|
37
|
-
};
|
|
38
|
-
GrowthRateChart.defaultProps = {
|
|
39
|
-
barRatio: 0.8,
|
|
40
|
-
theme: _ThemeProvider.theme,
|
|
41
|
-
tooltipLabel: defaultTooltipLabel,
|
|
42
|
-
xTickLabel: _ChartPrimitives.chartUtils.dateTickLabel(),
|
|
43
|
-
yTickLabel: defaultYTickLabel,
|
|
44
|
-
animate: _ChartPrimitives.chartUtils.ANIMATE
|
|
45
|
-
};
|
|
60
|
+
}
|
|
@@ -33,12 +33,14 @@ declare namespace IconBar {
|
|
|
33
33
|
variantStyles?: import("./variants").VariantStyles | undefined;
|
|
34
34
|
}): import("@emotion/react/jsx-runtime").JSX.Element | null;
|
|
35
35
|
displayName: string;
|
|
36
|
-
Link: import("@emotion/styled").StyledComponent<{
|
|
36
|
+
Link: import("@emotion/styled").StyledComponent<Omit<{
|
|
37
37
|
theme?: import("@emotion/react").Theme | undefined;
|
|
38
38
|
as?: import("react").ElementType<any> | undefined;
|
|
39
39
|
} & Partial<import("../mixins").Border & import("../mixins").Color & import("../mixins").Spacing> & import("react").ClassAttributes<HTMLSpanElement> & import("react").HTMLAttributes<HTMLSpanElement> & {
|
|
40
40
|
theme?: import("@emotion/react").Theme | undefined;
|
|
41
|
-
} & import("../Link").LinkProps & import("react").ClassAttributes<HTMLAnchorElement> & import("react").AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
41
|
+
} & import("../Link").LinkProps & import("react").ClassAttributes<HTMLAnchorElement> & import("react").AnchorHTMLAttributes<HTMLAnchorElement>, "ref"> & import("react").RefAttributes<HTMLAnchorElement> & {
|
|
42
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
43
|
+
} & import("../Link").LinkProps & {
|
|
42
44
|
active?: boolean | undefined;
|
|
43
45
|
variantStyles?: import("./variants").VariantStyles | undefined;
|
|
44
46
|
}, {}, {}>;
|
|
@@ -17,12 +17,14 @@ type IconItemProps = React.ComponentProps<typeof Container>;
|
|
|
17
17
|
declare const IconItem: {
|
|
18
18
|
({ children, active, variantStyles, ...props }: IconItemProps): import("@emotion/react/jsx-runtime").JSX.Element | null;
|
|
19
19
|
displayName: string;
|
|
20
|
-
Link: import("@emotion/styled").StyledComponent<{
|
|
20
|
+
Link: import("@emotion/styled").StyledComponent<Omit<{
|
|
21
21
|
theme?: import("@emotion/react").Theme | undefined;
|
|
22
22
|
as?: React.ElementType<any> | undefined;
|
|
23
23
|
} & Partial<import("../mixins").Border & import("../mixins").Color & import("../mixins").Spacing> & React.ClassAttributes<HTMLSpanElement> & React.HTMLAttributes<HTMLSpanElement> & {
|
|
24
24
|
theme?: import("@emotion/react").Theme | undefined;
|
|
25
|
-
} & import("../Link").LinkProps & React.ClassAttributes<HTMLAnchorElement> & React.AnchorHTMLAttributes<HTMLAnchorElement> &
|
|
25
|
+
} & import("../Link").LinkProps & React.ClassAttributes<HTMLAnchorElement> & React.AnchorHTMLAttributes<HTMLAnchorElement>, "ref"> & React.RefAttributes<HTMLAnchorElement> & {
|
|
26
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
27
|
+
} & import("../Link").LinkProps & ComponentProps, {}, {}>;
|
|
26
28
|
};
|
|
27
29
|
export default IconItem;
|
|
28
30
|
//# sourceMappingURL=IconItem.d.ts.map
|
package/dist/es/Link/Link.d.ts
CHANGED
|
@@ -3,11 +3,13 @@ export type LinkProps = {
|
|
|
3
3
|
disabled?: boolean;
|
|
4
4
|
'data-instrumentation'?: string;
|
|
5
5
|
};
|
|
6
|
-
declare const Link: import("@emotion/styled").StyledComponent<{
|
|
6
|
+
declare const Link: import("@emotion/styled").StyledComponent<Omit<{
|
|
7
7
|
theme?: import("@emotion/react").Theme | undefined;
|
|
8
8
|
as?: import("react").ElementType<any> | undefined;
|
|
9
9
|
} & Partial<import("../mixins").Border & import("../mixins").Color & import("../mixins").Spacing> & import("react").ClassAttributes<HTMLSpanElement> & import("react").HTMLAttributes<HTMLSpanElement> & {
|
|
10
10
|
theme?: import("@emotion/react").Theme | undefined;
|
|
11
|
-
} & LinkProps
|
|
11
|
+
} & LinkProps & import("react").ClassAttributes<HTMLAnchorElement> & import("react").AnchorHTMLAttributes<HTMLAnchorElement>, "ref"> & import("react").RefAttributes<HTMLAnchorElement> & {
|
|
12
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
13
|
+
} & LinkProps, {}, {}>;
|
|
12
14
|
export default Link;
|
|
13
15
|
//# sourceMappingURL=Link.d.ts.map
|