glints-aries 4.0.186 → 4.0.187
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/es/@next/Alert/Alert.d.ts +1 -1
- package/es/@next/Alert/Alert.js +3 -2
- package/es/@next/Alert/AlertWithProvider.d.ts +2 -2
- package/es/@next/Alert/AlertWithProvider.js +5 -3
- package/es/@next/Avatar/Avatar.d.ts +1 -1
- package/es/@next/Avatar/Avatar.js +3 -2
- package/es/@next/Badge/Badge.d.ts +1 -1
- package/es/@next/Badge/Badge.js +3 -2
- package/es/@next/Banner/Banner.d.ts +1 -1
- package/es/@next/Banner/Banner.js +3 -2
- package/es/@next/Button/Button.d.ts +1 -1
- package/es/@next/Button/Button.js +3 -2
- package/es/@next/Button/DesctructiveButtonStyle.d.ts +1 -1
- package/es/@next/Button/OutlineButtonStyle.d.ts +1 -1
- package/es/@next/Button/OutlineMonochromeStyle.d.ts +1 -1
- package/es/@next/Button/PrimaryButtonStyle.d.ts +1 -1
- package/es/@next/ButtonGroup/ButtonGroup.d.ts +1 -1
- package/es/@next/ButtonGroup/ButtonGroup.js +3 -2
- package/es/@next/Checkbox/Checkbox.d.ts +1 -1
- package/es/@next/Checkbox/Checkbox.js +3 -2
- package/es/@next/CurrencyInput/CurrencyInput.d.ts +6 -2
- package/es/@next/CurrencyInput/CurrencyInput.js +3 -2
- package/es/@next/CurrencyInput/CurrencyStyles.d.ts +1 -1
- package/es/@next/Divider/Divider.d.ts +1 -1
- package/es/@next/Divider/Divider.js +5 -5
- package/es/@next/IndexTable/indexTableStoryHelper/ButtonGroupStyle.d.ts +1 -1
- package/es/@next/Input/Input.d.ts +1 -1
- package/es/@next/Input/Input.js +3 -2
- package/es/@next/NumberInput/NumberInput.d.ts +2 -2
- package/es/@next/NumberInput/NumberInput.js +3 -2
- package/es/@next/Pagination/Pagination.d.ts +2 -2
- package/es/@next/Pagination/Pagination.js +5 -3
- package/es/@next/Pagination/PaginationStyle.d.ts +2 -2
- package/es/@next/Pagination/SimplePagination.d.ts +2 -2
- package/es/@next/Pagination/SimplePagination.js +5 -3
- package/es/@next/Popover/Popover.d.ts +3 -3
- package/es/@next/Popover/Popover.js +6 -3
- package/es/@next/RadioButton/RadioButton.d.ts +1 -1
- package/es/@next/RadioButton/RadioButton.js +3 -2
- package/es/@next/Tabs/Tabs.d.ts +1 -1
- package/es/@next/Tabs/Tabs.js +5 -3
- package/es/@next/Tag/Tag.d.ts +1 -1
- package/es/@next/Tag/Tag.js +5 -3
- package/es/@next/TextInput/TextInput.d.ts +4 -2
- package/es/@next/TextInput/TextInput.js +3 -2
- package/lib/@next/Alert/Alert.d.ts +1 -1
- package/lib/@next/Alert/Alert.js +3 -2
- package/lib/@next/Alert/AlertWithProvider.d.ts +2 -2
- package/lib/@next/Alert/AlertWithProvider.js +5 -3
- package/lib/@next/Avatar/Avatar.d.ts +1 -1
- package/lib/@next/Avatar/Avatar.js +3 -2
- package/lib/@next/Badge/Badge.d.ts +1 -1
- package/lib/@next/Badge/Badge.js +3 -2
- package/lib/@next/Banner/Banner.d.ts +1 -1
- package/lib/@next/Banner/Banner.js +3 -2
- package/lib/@next/Button/Button.d.ts +1 -1
- package/lib/@next/Button/Button.js +3 -2
- package/lib/@next/Button/DesctructiveButtonStyle.d.ts +1 -1
- package/lib/@next/Button/OutlineButtonStyle.d.ts +1 -1
- package/lib/@next/Button/OutlineMonochromeStyle.d.ts +1 -1
- package/lib/@next/Button/PrimaryButtonStyle.d.ts +1 -1
- package/lib/@next/ButtonGroup/ButtonGroup.d.ts +1 -1
- package/lib/@next/ButtonGroup/ButtonGroup.js +3 -2
- package/lib/@next/Checkbox/Checkbox.d.ts +1 -1
- package/lib/@next/Checkbox/Checkbox.js +3 -2
- package/lib/@next/CurrencyInput/CurrencyInput.d.ts +6 -2
- package/lib/@next/CurrencyInput/CurrencyInput.js +3 -2
- package/lib/@next/CurrencyInput/CurrencyStyles.d.ts +1 -1
- package/lib/@next/Divider/Divider.d.ts +1 -1
- package/lib/@next/Divider/Divider.js +5 -5
- package/lib/@next/IndexTable/indexTableStoryHelper/ButtonGroupStyle.d.ts +1 -1
- package/lib/@next/Input/Input.d.ts +1 -1
- package/lib/@next/Input/Input.js +3 -2
- package/lib/@next/NumberInput/NumberInput.d.ts +2 -2
- package/lib/@next/NumberInput/NumberInput.js +3 -2
- package/lib/@next/Pagination/Pagination.d.ts +2 -2
- package/lib/@next/Pagination/Pagination.js +5 -3
- package/lib/@next/Pagination/PaginationStyle.d.ts +2 -2
- package/lib/@next/Pagination/SimplePagination.d.ts +2 -2
- package/lib/@next/Pagination/SimplePagination.js +5 -3
- package/lib/@next/Popover/Popover.d.ts +3 -3
- package/lib/@next/Popover/Popover.js +6 -3
- package/lib/@next/RadioButton/RadioButton.d.ts +1 -1
- package/lib/@next/RadioButton/RadioButton.js +3 -2
- package/lib/@next/Tabs/Tabs.d.ts +1 -1
- package/lib/@next/Tabs/Tabs.js +5 -3
- package/lib/@next/Tag/Tag.d.ts +1 -1
- package/lib/@next/Tag/Tag.js +5 -3
- package/lib/@next/TextInput/TextInput.d.ts +4 -2
- package/lib/@next/TextInput/TextInput.js +3 -2
- package/package.json +1 -1
|
@@ -9,4 +9,4 @@ export declare type AlertProps = {
|
|
|
9
9
|
duration?: number;
|
|
10
10
|
onDismissed?: () => void;
|
|
11
11
|
};
|
|
12
|
-
export declare const Alert:
|
|
12
|
+
export declare const Alert: React.ForwardRefExoticComponent<AlertProps & React.RefAttributes<HTMLDivElement>>;
|
package/es/@next/Alert/Alert.js
CHANGED
|
@@ -8,7 +8,7 @@ var iconNameStatusMap = {
|
|
|
8
8
|
warning: 'ri-error-warning-fill',
|
|
9
9
|
error: 'ri-error-warning-fill'
|
|
10
10
|
};
|
|
11
|
-
export var Alert = function Alert(_ref) {
|
|
11
|
+
export var Alert = /*#__PURE__*/React.forwardRef(function Alert(_ref, ref) {
|
|
12
12
|
var show = _ref.show,
|
|
13
13
|
title = _ref.title,
|
|
14
14
|
content = _ref.content,
|
|
@@ -38,6 +38,7 @@ export var Alert = function Alert(_ref) {
|
|
|
38
38
|
return null;
|
|
39
39
|
}
|
|
40
40
|
return /*#__PURE__*/React.createElement(StyledAlertContainer, {
|
|
41
|
+
ref: ref,
|
|
41
42
|
role: "alert",
|
|
42
43
|
"data-titled": hasTitle,
|
|
43
44
|
"data-status": status || 'info'
|
|
@@ -60,4 +61,4 @@ export var Alert = function Alert(_ref) {
|
|
|
60
61
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
61
62
|
name: "ri-close"
|
|
62
63
|
})));
|
|
63
|
-
};
|
|
64
|
+
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const AlertWithProvider:
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const AlertWithProvider: React.ForwardRefExoticComponent<React.RefAttributes<HTMLDivElement>>;
|
|
@@ -5,7 +5,7 @@ var _excluded = ["closeAlert"],
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { Alert } from './Alert';
|
|
7
7
|
import { useAlert } from './useAlert';
|
|
8
|
-
export var AlertWithProvider = function AlertWithProvider() {
|
|
8
|
+
export var AlertWithProvider = /*#__PURE__*/React.forwardRef(function AlertWithProvider(_, alertRef) {
|
|
9
9
|
var _useAlert = useAlert(),
|
|
10
10
|
closeAlert = _useAlert.closeAlert,
|
|
11
11
|
rest = _objectWithoutPropertiesLoose(_useAlert, _excluded);
|
|
@@ -14,10 +14,12 @@ export var AlertWithProvider = function AlertWithProvider() {
|
|
|
14
14
|
if (!show) {
|
|
15
15
|
return null;
|
|
16
16
|
}
|
|
17
|
-
return /*#__PURE__*/React.createElement(Alert, _extends({
|
|
17
|
+
return /*#__PURE__*/React.createElement(Alert, _extends({
|
|
18
|
+
ref: alertRef
|
|
19
|
+
}, alertProps, {
|
|
18
20
|
show: show,
|
|
19
21
|
onDismissed: function onDismissed() {
|
|
20
22
|
return closeAlert();
|
|
21
23
|
}
|
|
22
24
|
}));
|
|
23
|
-
};
|
|
25
|
+
});
|
|
@@ -8,5 +8,5 @@ export interface AvatarProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
8
8
|
size?: AvatarSizeVariant;
|
|
9
9
|
initials?: string;
|
|
10
10
|
}
|
|
11
|
-
export declare const Avatar:
|
|
11
|
+
export declare const Avatar: React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<HTMLDivElement>>;
|
|
12
12
|
export {};
|
|
@@ -7,7 +7,7 @@ import { Neutral } from '../utilities/colors';
|
|
|
7
7
|
import { AvatarStyle } from './AvatarStyle';
|
|
8
8
|
var avatarBackgroundColorVariant = ['supplementary', 'warning', 'danger', 'success', 'outstanding'];
|
|
9
9
|
var avatarSizeVariant = ['large', 'medium'];
|
|
10
|
-
export var Avatar = function Avatar(_ref) {
|
|
10
|
+
export var Avatar = /*#__PURE__*/React.forwardRef(function Avatar(_ref, ref) {
|
|
11
11
|
var _ref$variant = _ref.variant,
|
|
12
12
|
variant = _ref$variant === void 0 ? 'supplementary' : _ref$variant,
|
|
13
13
|
_ref$size = _ref.size,
|
|
@@ -15,6 +15,7 @@ export var Avatar = function Avatar(_ref) {
|
|
|
15
15
|
initials = _ref.initials,
|
|
16
16
|
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
17
17
|
return /*#__PURE__*/React.createElement(AvatarStyle, _extends({
|
|
18
|
+
ref: ref,
|
|
18
19
|
variant: variant,
|
|
19
20
|
size: size
|
|
20
21
|
}, props), /*#__PURE__*/React.createElement(Typography, {
|
|
@@ -22,4 +23,4 @@ export var Avatar = function Avatar(_ref) {
|
|
|
22
23
|
color: Neutral.B18,
|
|
23
24
|
as: 'span'
|
|
24
25
|
}, initials.slice(0, 2)));
|
|
25
|
-
};
|
|
26
|
+
});
|
|
@@ -6,5 +6,5 @@ export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
6
6
|
status?: BadgeStatusVariant;
|
|
7
7
|
textColor?: string;
|
|
8
8
|
}
|
|
9
|
-
export declare const Badge:
|
|
9
|
+
export declare const Badge: React.ForwardRefExoticComponent<BadgeProps & React.RefAttributes<HTMLDivElement>>;
|
|
10
10
|
export {};
|
package/es/@next/Badge/Badge.js
CHANGED
|
@@ -15,7 +15,7 @@ var renderTextColor = function renderTextColor(textColor, status) {
|
|
|
15
15
|
}
|
|
16
16
|
return Neutral.B18;
|
|
17
17
|
};
|
|
18
|
-
export var Badge = function Badge(_ref) {
|
|
18
|
+
export var Badge = /*#__PURE__*/React.forwardRef(function Badge(_ref, ref) {
|
|
19
19
|
var children = _ref.children,
|
|
20
20
|
status = _ref.status,
|
|
21
21
|
textColor = _ref.textColor,
|
|
@@ -26,6 +26,7 @@ export var Badge = function Badge(_ref) {
|
|
|
26
26
|
as: 'span'
|
|
27
27
|
}, children) : children;
|
|
28
28
|
return /*#__PURE__*/React.createElement(BadgeStyle, _extends({
|
|
29
|
+
ref: ref,
|
|
29
30
|
status: status ? status : 'neutral'
|
|
30
31
|
}, props), /*#__PURE__*/React.createElement("div", null, content));
|
|
31
|
-
};
|
|
32
|
+
});
|
|
@@ -11,4 +11,4 @@ export declare type BannerProps = {
|
|
|
11
11
|
dismissable?: boolean;
|
|
12
12
|
onDismiss?: () => void;
|
|
13
13
|
};
|
|
14
|
-
export declare const Banner:
|
|
14
|
+
export declare const Banner: React.ForwardRefExoticComponent<BannerProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -12,7 +12,7 @@ var iconNameStatusMap = {
|
|
|
12
12
|
warning: 'ri-error-warning-fill',
|
|
13
13
|
critical: 'ri-error-warning-fill'
|
|
14
14
|
};
|
|
15
|
-
export var Banner = function Banner(_ref) {
|
|
15
|
+
export var Banner = /*#__PURE__*/React.forwardRef(function Banner(_ref, ref) {
|
|
16
16
|
var title = _ref.title,
|
|
17
17
|
status = _ref.status,
|
|
18
18
|
iconName = _ref.iconName,
|
|
@@ -29,6 +29,7 @@ export var Banner = function Banner(_ref) {
|
|
|
29
29
|
}
|
|
30
30
|
var iconNameValue = iconName ? iconName : iconByStatus || iconNameStatusMap['info'];
|
|
31
31
|
return /*#__PURE__*/React.createElement(StyledBanner, _extends({
|
|
32
|
+
ref: ref,
|
|
32
33
|
"data-titled": !!title,
|
|
33
34
|
"data-status": status
|
|
34
35
|
}, props), /*#__PURE__*/React.createElement(StyledBannerTitleContainer, null, /*#__PURE__*/React.createElement(Icon, {
|
|
@@ -47,4 +48,4 @@ export var Banner = function Banner(_ref) {
|
|
|
47
48
|
as: "div",
|
|
48
49
|
variant: "body1"
|
|
49
50
|
}, children)), /*#__PURE__*/React.createElement(StyledBannerContentContainer, null, action || secondaryAction && /*#__PURE__*/React.createElement(ButtonGroup, null, action, secondaryAction)));
|
|
50
|
-
};
|
|
51
|
+
});
|
|
@@ -11,4 +11,4 @@ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElemen
|
|
|
11
11
|
iconPosition?: IconPosition;
|
|
12
12
|
loading?: boolean;
|
|
13
13
|
}
|
|
14
|
-
export declare const Button:
|
|
14
|
+
export declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -5,7 +5,7 @@ import React from 'react';
|
|
|
5
5
|
import { Spinner } from '../Spinner/Spinner';
|
|
6
6
|
import { Typography } from '../Typography';
|
|
7
7
|
import { StyledButton } from './ButtonStyle';
|
|
8
|
-
export var Button = function Button(_ref) {
|
|
8
|
+
export var Button = /*#__PURE__*/React.forwardRef(function Button(_ref, ref) {
|
|
9
9
|
var children = _ref.children,
|
|
10
10
|
icon = _ref.icon,
|
|
11
11
|
_ref$iconPosition = _ref.iconPosition,
|
|
@@ -24,6 +24,7 @@ export var Button = function Button(_ref) {
|
|
|
24
24
|
return null;
|
|
25
25
|
};
|
|
26
26
|
return /*#__PURE__*/React.createElement(StyledButton, _extends({
|
|
27
|
+
ref: ref,
|
|
27
28
|
"data-active": active,
|
|
28
29
|
"data-full-width": fullWidth,
|
|
29
30
|
"data-loading": loading,
|
|
@@ -33,4 +34,4 @@ export var Button = function Button(_ref) {
|
|
|
33
34
|
return e.currentTarget.blur();
|
|
34
35
|
}
|
|
35
36
|
}), loading && /*#__PURE__*/React.createElement(Spinner, null), renderIcon('left'), content, renderIcon('right'));
|
|
36
|
-
};
|
|
37
|
+
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const DestructiveButton: import("styled-components").StyledComponent<(
|
|
2
|
+
export declare const DestructiveButton: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("./Button").ButtonProps & import("react").RefAttributes<HTMLButtonElement>>, any, {}, never>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const OutlineButton: import("styled-components").StyledComponent<(
|
|
2
|
+
export declare const OutlineButton: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("./Button").ButtonProps & import("react").RefAttributes<HTMLButtonElement>>, any, {}, never>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const OutlineMonochromeButton: import("styled-components").StyledComponent<(
|
|
2
|
+
export declare const OutlineMonochromeButton: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("./Button").ButtonProps & import("react").RefAttributes<HTMLButtonElement>>, any, {}, never>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const PrimaryButton: import("styled-components").StyledComponent<(
|
|
2
|
+
export declare const PrimaryButton: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("./Button").ButtonProps & import("react").RefAttributes<HTMLButtonElement>>, any, {}, never>;
|
|
@@ -5,4 +5,4 @@ export interface ButtonGroupProps extends React.HtmlHTMLAttributes<HTMLDivElemen
|
|
|
5
5
|
/** Set this true when buttons are wrapped by another element (e.g as an activator for Popover) */
|
|
6
6
|
isButtonWrapped?: boolean;
|
|
7
7
|
}
|
|
8
|
-
export declare const ButtonGroup:
|
|
8
|
+
export declare const ButtonGroup: React.ForwardRefExoticComponent<ButtonGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -3,14 +3,15 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutP
|
|
|
3
3
|
var _excluded = ["segmented", "fullWidth", "isButtonWrapped"];
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { StyledButtonGroup } from './ButtonGroupStyle';
|
|
6
|
-
export var ButtonGroup = function ButtonGroup(_ref) {
|
|
6
|
+
export var ButtonGroup = /*#__PURE__*/React.forwardRef(function ButtonGroup(_ref, ref) {
|
|
7
7
|
var segmented = _ref.segmented,
|
|
8
8
|
fullWidth = _ref.fullWidth,
|
|
9
9
|
isButtonWrapped = _ref.isButtonWrapped,
|
|
10
10
|
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
11
11
|
return /*#__PURE__*/React.createElement(StyledButtonGroup, _extends({
|
|
12
|
+
ref: ref,
|
|
12
13
|
"data-segmented": segmented,
|
|
13
14
|
"data-full-width": fullWidth,
|
|
14
15
|
"data-button-wrapped": isButtonWrapped
|
|
15
16
|
}, props));
|
|
16
|
-
};
|
|
17
|
+
});
|
|
@@ -10,4 +10,4 @@ export interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputE
|
|
|
10
10
|
onChange?(newChecked: boolean, id: string): void;
|
|
11
11
|
isPadded?: boolean;
|
|
12
12
|
}
|
|
13
|
-
export declare const Checkbox:
|
|
13
|
+
export declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -7,7 +7,7 @@ import { noop } from 'lodash-es';
|
|
|
7
7
|
import { Icon } from '../Icon';
|
|
8
8
|
import { Typography } from '../Typography';
|
|
9
9
|
import nextId from 'react-id-generator';
|
|
10
|
-
export var Checkbox = function Checkbox(_ref) {
|
|
10
|
+
export var Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(_ref, ref) {
|
|
11
11
|
var label = _ref.label,
|
|
12
12
|
id = _ref.id,
|
|
13
13
|
checked = _ref.checked,
|
|
@@ -43,6 +43,7 @@ export var Checkbox = function Checkbox(_ref) {
|
|
|
43
43
|
onChange == null ? void 0 : onChange(checkedValue, checkBoxId);
|
|
44
44
|
};
|
|
45
45
|
return /*#__PURE__*/React.createElement(StyledContainer, {
|
|
46
|
+
ref: ref,
|
|
46
47
|
"aria-disabled": disabled,
|
|
47
48
|
"data-error": hasError,
|
|
48
49
|
"data-spacing": isPadded
|
|
@@ -98,4 +99,4 @@ export var Checkbox = function Checkbox(_ref) {
|
|
|
98
99
|
as: "span",
|
|
99
100
|
variant: "subtitle2"
|
|
100
101
|
}, helpText))));
|
|
101
|
-
};
|
|
102
|
+
});
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { InputProps } from '../Input/Input';
|
|
3
3
|
export declare type CurrencyInputProps = Omit<InputProps, 'type' | 'prefix' | 'onChange' | 'value'> & {
|
|
4
4
|
locale?: string;
|
|
5
5
|
value?: number;
|
|
6
6
|
onChange?: (value: number) => void;
|
|
7
7
|
};
|
|
8
|
-
export declare const CurrencyInput:
|
|
8
|
+
export declare const CurrencyInput: React.ForwardRefExoticComponent<Omit<InputProps, "type" | "value" | "prefix" | "onChange"> & {
|
|
9
|
+
locale?: string;
|
|
10
|
+
value?: number;
|
|
11
|
+
onChange?: (value: number) => void;
|
|
12
|
+
} & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -3,7 +3,7 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutP
|
|
|
3
3
|
var _excluded = ["locale", "value", "onChange"];
|
|
4
4
|
import React, { useState } from 'react';
|
|
5
5
|
import { StyledCurrency } from './CurrencyStyles';
|
|
6
|
-
export var CurrencyInput = function CurrencyInput(_ref) {
|
|
6
|
+
export var CurrencyInput = /*#__PURE__*/React.forwardRef(function CurrencyInput(_ref, ref) {
|
|
7
7
|
var _ref$locale = _ref.locale,
|
|
8
8
|
locale = _ref$locale === void 0 ? 'en' : _ref$locale,
|
|
9
9
|
_ref$value = _ref.value,
|
|
@@ -37,10 +37,11 @@ export var CurrencyInput = function CurrencyInput(_ref) {
|
|
|
37
37
|
setFormattedValue(formatter.format(rawValue));
|
|
38
38
|
};
|
|
39
39
|
return /*#__PURE__*/React.createElement(StyledCurrency, _extends({
|
|
40
|
+
ref: ref,
|
|
40
41
|
type: "text",
|
|
41
42
|
prefix: /*#__PURE__*/React.createElement("div", null, "$")
|
|
42
43
|
}, props, {
|
|
43
44
|
value: formattedValue === '0' ? '' : formattedValue,
|
|
44
45
|
onChange: handleChange
|
|
45
46
|
}));
|
|
46
|
-
};
|
|
47
|
+
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const StyledCurrency: import("styled-components").StyledComponent<(
|
|
2
|
+
export declare const StyledCurrency: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../Input/Input").InputProps & import("react").RefAttributes<HTMLInputElement>>, any, {}, never>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export declare type DividerProps = React.HTMLAttributes<HTMLDivElement>;
|
|
3
|
-
export declare const Divider:
|
|
3
|
+
export declare const Divider: React.ForwardRefExoticComponent<DividerProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import _objectDestructuringEmpty from "@babel/runtime/helpers/objectDestructuringEmpty";
|
|
2
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
2
|
import React from 'react';
|
|
4
3
|
import { DividerStyle } from './DividerStyle';
|
|
5
|
-
export var Divider = function Divider(
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
};
|
|
4
|
+
export var Divider = /*#__PURE__*/React.forwardRef(function Divider(props, ref) {
|
|
5
|
+
return /*#__PURE__*/React.createElement(DividerStyle, _extends({
|
|
6
|
+
ref: ref
|
|
7
|
+
}, props));
|
|
8
|
+
});
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const StyledButtonGroup: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
|
-
export declare const StyledButton: import("styled-components").StyledComponent<(
|
|
3
|
+
export declare const StyledButton: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../..").ButtonProps & import("react").RefAttributes<HTMLButtonElement>>, any, {}, never>;
|
|
@@ -4,4 +4,4 @@ export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElem
|
|
|
4
4
|
prefix?: React.ReactNode;
|
|
5
5
|
suffix?: React.ReactNode;
|
|
6
6
|
}
|
|
7
|
-
export declare const Input:
|
|
7
|
+
export declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
package/es/@next/Input/Input.js
CHANGED
|
@@ -3,7 +3,7 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutP
|
|
|
3
3
|
var _excluded = ["error", "disabled", "prefix", "suffix"];
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { StyledContainer, StyledInput, StyledPrefixContainer, StyledSuffixContainer } from './InputStyle';
|
|
6
|
-
export var Input = function Input(_ref) {
|
|
6
|
+
export var Input = /*#__PURE__*/React.forwardRef(function Input(_ref, ref) {
|
|
7
7
|
var error = _ref.error,
|
|
8
8
|
disabled = _ref.disabled,
|
|
9
9
|
prefix = _ref.prefix,
|
|
@@ -18,10 +18,11 @@ export var Input = function Input(_ref) {
|
|
|
18
18
|
return hasSuffix ? /*#__PURE__*/React.createElement(StyledSuffixContainer, null, suffix) : null;
|
|
19
19
|
};
|
|
20
20
|
return /*#__PURE__*/React.createElement(StyledContainer, {
|
|
21
|
+
ref: ref,
|
|
21
22
|
"data-prefix": hasPrefix,
|
|
22
23
|
"data-error": error,
|
|
23
24
|
"data-disabled": disabled
|
|
24
25
|
}, /*#__PURE__*/React.createElement(Prefix, null), /*#__PURE__*/React.createElement(StyledInput, _extends({
|
|
25
26
|
disabled: disabled
|
|
26
27
|
}, props)), /*#__PURE__*/React.createElement(Suffix, null));
|
|
27
|
-
};
|
|
28
|
+
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { InputProps } from '../Input/Input';
|
|
3
3
|
export declare type NumberInputProps = Omit<InputProps, 'type' | 'prefix'>;
|
|
4
|
-
export declare const NumberInput:
|
|
4
|
+
export declare const NumberInput: React.ForwardRefExoticComponent<NumberInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -6,8 +6,9 @@ var StyledInput = styled(Input).withConfig({
|
|
|
6
6
|
displayName: "NumberInput__StyledInput",
|
|
7
7
|
componentId: "sc-1f5ws9y-0"
|
|
8
8
|
})(["&[type='number']{-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield;}&[type='number']::-webkit-inner-spin-button,&[type='number']::-webkit-outer-spin-button{-webkit-appearance:none;}"]);
|
|
9
|
-
export var NumberInput = function NumberInput(props) {
|
|
9
|
+
export var NumberInput = /*#__PURE__*/React.forwardRef(function NumberInput(props, ref) {
|
|
10
10
|
return /*#__PURE__*/React.createElement(StyledInput, _extends({
|
|
11
|
+
ref: ref,
|
|
11
12
|
type: "number"
|
|
12
13
|
}, props));
|
|
13
|
-
};
|
|
14
|
+
});
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { PaginationProps } from './paginationUtils';
|
|
3
|
-
export declare const Pagination:
|
|
3
|
+
export declare const Pagination: React.ForwardRefExoticComponent<PaginationProps & React.RefAttributes<HTMLElement>>;
|
|
@@ -6,7 +6,7 @@ import { PageButton } from './PageButton';
|
|
|
6
6
|
import { StyledNav } from './PaginationStyle';
|
|
7
7
|
import { defaultBufferSize, defaultPageSize, getAllPages, getBufferSize } from './paginationUtils';
|
|
8
8
|
import { NextStepper, PreviousStepper } from './Stepper';
|
|
9
|
-
export var Pagination = function Pagination(_ref) {
|
|
9
|
+
export var Pagination = /*#__PURE__*/React.forwardRef(function Pagination(_ref, ref) {
|
|
10
10
|
var _ref$totalItems = _ref.totalItems,
|
|
11
11
|
totalItems = _ref$totalItems === void 0 ? 1 : _ref$totalItems,
|
|
12
12
|
_ref$currentPage = _ref.currentPage,
|
|
@@ -118,5 +118,7 @@ export var Pagination = function Pagination(_ref) {
|
|
|
118
118
|
disabled: !hasNext || disabled,
|
|
119
119
|
onClick: handlePagerClick
|
|
120
120
|
}));
|
|
121
|
-
return /*#__PURE__*/React.createElement(StyledNav,
|
|
122
|
-
|
|
121
|
+
return /*#__PURE__*/React.createElement(StyledNav, {
|
|
122
|
+
ref: ref
|
|
123
|
+
}, pageList);
|
|
124
|
+
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { PageButtonProps } from './PageButton';
|
|
3
3
|
export declare const StyledNav: import("styled-components").StyledComponent<"nav", any, {}, never>;
|
|
4
4
|
export declare const SimplePaginationStyledNav: import("styled-components").StyledComponent<"nav", any, {}, never>;
|
|
5
5
|
export declare const StyledPageButton: import("styled-components").StyledComponent<"button", any, PageButtonProps, never>;
|
|
6
6
|
export declare const StyledSimplePaginationButton: import("styled-components").StyledComponent<"button", any, PageButtonProps, never>;
|
|
7
7
|
export declare const StyledActiveSimplePaginationButton: import("styled-components").StyledComponent<(props: PageButtonProps) => JSX.Element, any, {}, never>;
|
|
8
|
-
export declare const StyledSimplePaginationInput: import("styled-components").StyledComponent<
|
|
8
|
+
export declare const StyledSimplePaginationInput: import("styled-components").StyledComponent<React.ForwardRefExoticComponent<import("../NumberInput").NumberInputProps & React.RefAttributes<HTMLInputElement>>, any, {}, never>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { PaginationProps } from './paginationUtils';
|
|
3
|
-
export declare const SimplePagination:
|
|
3
|
+
export declare const SimplePagination: React.ForwardRefExoticComponent<PaginationProps & React.RefAttributes<HTMLElement>>;
|
|
@@ -3,7 +3,7 @@ import { Typography } from '../Typography';
|
|
|
3
3
|
import { StyledActiveSimplePaginationButton, StyledSimplePaginationInput, StyledSimplePaginationButton, SimplePaginationStyledNav } from './PaginationStyle';
|
|
4
4
|
import { defaultPageSize, getAllPages } from './paginationUtils';
|
|
5
5
|
import { NextStepper, PreviousStepper } from './Stepper';
|
|
6
|
-
export var SimplePagination = function SimplePagination(_ref) {
|
|
6
|
+
export var SimplePagination = /*#__PURE__*/React.forwardRef(function SimplePagination(_ref, ref) {
|
|
7
7
|
var _ref$totalItems = _ref.totalItems,
|
|
8
8
|
totalItems = _ref$totalItems === void 0 ? 1 : _ref$totalItems,
|
|
9
9
|
_ref$currentPage = _ref.currentPage,
|
|
@@ -37,7 +37,9 @@ export var SimplePagination = function SimplePagination(_ref) {
|
|
|
37
37
|
var handleFocus = function handleFocus(e) {
|
|
38
38
|
e.target.select();
|
|
39
39
|
};
|
|
40
|
-
return /*#__PURE__*/React.createElement(SimplePaginationStyledNav,
|
|
40
|
+
return /*#__PURE__*/React.createElement(SimplePaginationStyledNav, {
|
|
41
|
+
ref: ref
|
|
42
|
+
}, /*#__PURE__*/React.createElement(PreviousStepper, {
|
|
41
43
|
value: currentPage - 1,
|
|
42
44
|
disabled: !hasPrevious || disabled,
|
|
43
45
|
onClick: handlePageNumberChange
|
|
@@ -77,4 +79,4 @@ export var SimplePagination = function SimplePagination(_ref) {
|
|
|
77
79
|
disabled: !hasNext || disabled,
|
|
78
80
|
onClick: handlePageNumberChange
|
|
79
81
|
}));
|
|
80
|
-
};
|
|
82
|
+
});
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
import { PopoverProps as PolarisPopoverProps } from 'polaris-glints';
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PopoverProps as PolarisPopoverProps, PopoverPublicAPI } from 'polaris-glints';
|
|
3
3
|
export declare type PopoverProps = PolarisPopoverProps;
|
|
4
4
|
/** Using Popover from polaris-glints repository internally
|
|
5
5
|
* Please add `<div id="glints-portal-container"></div>` as a sibling element of where your React app is rendered.
|
|
6
6
|
* This is a temporary workaround, as React Portal need this as the anchor */
|
|
7
|
-
export declare const Popover:
|
|
7
|
+
export declare const Popover: React.ForwardRefExoticComponent<PolarisPopoverProps & React.RefAttributes<PopoverPublicAPI>> & {
|
|
8
8
|
Pane: typeof import("polaris-glints/build/ts/latest/src/components/Popover/components").Pane;
|
|
9
9
|
Section: typeof import("polaris-glints/build/ts/latest/src/components/Popover/components").Section;
|
|
10
10
|
};
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import { Popover as PolarisPopover } from 'polaris-glints';
|
|
3
4
|
import { StyledPopover } from './PopoverStyle';
|
|
4
|
-
var PopoverComponent = function
|
|
5
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(StyledPopover, null), /*#__PURE__*/React.createElement(PolarisPopover,
|
|
6
|
-
|
|
5
|
+
var PopoverComponent = /*#__PURE__*/React.forwardRef(function Popoever(props, ref) {
|
|
6
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(StyledPopover, null), /*#__PURE__*/React.createElement(PolarisPopover, _extends({
|
|
7
|
+
ref: ref
|
|
8
|
+
}, props)));
|
|
9
|
+
});
|
|
7
10
|
|
|
8
11
|
/** Using Popover from polaris-glints repository internally
|
|
9
12
|
* Please add `<div id="glints-portal-container"></div>` as a sibling element of where your React app is rendered.
|
|
@@ -11,4 +11,4 @@ export interface RadioButtonProps extends Omit<React.HTMLAttributes<HTMLInputEle
|
|
|
11
11
|
/**
|
|
12
12
|
* This is a controlled component, so you need to pass in the `checked` and `onChange` prop to make it work.
|
|
13
13
|
*/
|
|
14
|
-
export declare const RadioButton:
|
|
14
|
+
export declare const RadioButton: React.ForwardRefExoticComponent<RadioButtonProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -8,7 +8,7 @@ import { Colors } from '..';
|
|
|
8
8
|
/**
|
|
9
9
|
* This is a controlled component, so you need to pass in the `checked` and `onChange` prop to make it work.
|
|
10
10
|
*/
|
|
11
|
-
export var RadioButton = function RadioButton(_ref) {
|
|
11
|
+
export var RadioButton = /*#__PURE__*/React.forwardRef(function RadioButton(_ref, ref) {
|
|
12
12
|
var label = _ref.label,
|
|
13
13
|
helperText = _ref.helperText,
|
|
14
14
|
disabled = _ref.disabled,
|
|
@@ -18,6 +18,7 @@ export var RadioButton = function RadioButton(_ref) {
|
|
|
18
18
|
onChange = _ref.onChange,
|
|
19
19
|
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
20
20
|
return /*#__PURE__*/React.createElement(RadioButtonWrapper, null, /*#__PURE__*/React.createElement(RadioButtonInput, _extends({
|
|
21
|
+
ref: ref,
|
|
21
22
|
disabled: disabled,
|
|
22
23
|
name: name,
|
|
23
24
|
checked: checked,
|
|
@@ -38,4 +39,4 @@ export var RadioButton = function RadioButton(_ref) {
|
|
|
38
39
|
as: "span",
|
|
39
40
|
color: Colors.Neutral.B40
|
|
40
41
|
}, helperText)));
|
|
41
|
-
};
|
|
42
|
+
});
|
package/es/@next/Tabs/Tabs.d.ts
CHANGED
|
@@ -18,4 +18,4 @@ export declare type TabsProps = {
|
|
|
18
18
|
fitted?: boolean;
|
|
19
19
|
onSelected?: (index: number) => void;
|
|
20
20
|
};
|
|
21
|
-
export declare const Tabs:
|
|
21
|
+
export declare const Tabs: React.ForwardRefExoticComponent<TabsProps & React.RefAttributes<HTMLDivElement>>;
|
package/es/@next/Tabs/Tabs.js
CHANGED
|
@@ -2,7 +2,7 @@ import nextId from 'react-id-generator';
|
|
|
2
2
|
import React, { useEffect, useState } from 'react';
|
|
3
3
|
import { Tab } from './Tab';
|
|
4
4
|
import { StyledLi, StyledTabHeaderContainer, StyledTabsContainer, StyledUl } from './TabStyle';
|
|
5
|
-
export var Tabs = function Tabs(_ref) {
|
|
5
|
+
export var Tabs = /*#__PURE__*/React.forwardRef(function Tabs(_ref, ref) {
|
|
6
6
|
var tabs = _ref.tabs,
|
|
7
7
|
_ref$selected = _ref.selected,
|
|
8
8
|
selectedIndex = _ref$selected === void 0 ? 0 : _ref$selected,
|
|
@@ -37,7 +37,9 @@ export var Tabs = function Tabs(_ref) {
|
|
|
37
37
|
selected: index === selectedTabIndex
|
|
38
38
|
}));
|
|
39
39
|
});
|
|
40
|
-
return /*#__PURE__*/React.createElement(StyledTabsContainer,
|
|
40
|
+
return /*#__PURE__*/React.createElement(StyledTabsContainer, {
|
|
41
|
+
ref: ref
|
|
42
|
+
}, /*#__PURE__*/React.createElement(StyledTabHeaderContainer, null, /*#__PURE__*/React.createElement(StyledUl, {
|
|
41
43
|
"data-fitted": fitted
|
|
42
44
|
}, renderTabs, " ")), /*#__PURE__*/React.createElement("div", null, children));
|
|
43
|
-
};
|
|
45
|
+
});
|
package/es/@next/Tag/Tag.d.ts
CHANGED
|
@@ -6,4 +6,4 @@ export interface TagProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
6
6
|
}
|
|
7
7
|
export declare type TagRemoveContainerProps = React.HTMLAttributes<HTMLDivElement>;
|
|
8
8
|
export declare type TagContentProps = React.HTMLAttributes<HTMLSpanElement> & TagProps;
|
|
9
|
-
export declare const Tag:
|
|
9
|
+
export declare const Tag: React.ForwardRefExoticComponent<TagProps & React.RefAttributes<HTMLDivElement>>;
|
package/es/@next/Tag/Tag.js
CHANGED
|
@@ -6,7 +6,7 @@ import { Icon } from '../Icon';
|
|
|
6
6
|
import { Typography } from '../Typography';
|
|
7
7
|
import { Neutral } from '../utilities/colors';
|
|
8
8
|
import { TagContentStyle, TagIconWrapper, TagRemoveContainerStyle, TagStyle } from './TagStyle';
|
|
9
|
-
export var Tag = function Tag(_ref) {
|
|
9
|
+
export var Tag = /*#__PURE__*/React.forwardRef(function Tag(_ref, ref) {
|
|
10
10
|
var children = _ref.children,
|
|
11
11
|
onRemove = _ref.onRemove,
|
|
12
12
|
value = _ref.value,
|
|
@@ -25,9 +25,11 @@ export var Tag = function Tag(_ref) {
|
|
|
25
25
|
height: 20,
|
|
26
26
|
onClick: onRemove
|
|
27
27
|
})));
|
|
28
|
-
return /*#__PURE__*/React.createElement(TagStyle, _extends({
|
|
28
|
+
return /*#__PURE__*/React.createElement(TagStyle, _extends({
|
|
29
|
+
ref: ref
|
|
30
|
+
}, props, {
|
|
29
31
|
value: value
|
|
30
32
|
}), /*#__PURE__*/React.createElement(TagContentStyle, {
|
|
31
33
|
"data-removeable": !!onRemove
|
|
32
34
|
}, content), removeButton);
|
|
33
|
-
};
|
|
35
|
+
});
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { InputProps } from '../Input/Input';
|
|
3
3
|
export declare type TextInputProps = Omit<InputProps, 'type'> & {
|
|
4
4
|
canClear?: boolean;
|
|
5
5
|
};
|
|
6
|
-
export declare const TextInput:
|
|
6
|
+
export declare const TextInput: React.ForwardRefExoticComponent<Omit<InputProps, "type"> & {
|
|
7
|
+
canClear?: boolean;
|
|
8
|
+
} & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -4,7 +4,7 @@ var _excluded = ["canClear", "suffix", "value", "onChange"];
|
|
|
4
4
|
import React, { useState } from 'react';
|
|
5
5
|
import { Icon } from '../Icon';
|
|
6
6
|
import { Input } from '../Input/Input';
|
|
7
|
-
export var TextInput = function TextInput(_ref) {
|
|
7
|
+
export var TextInput = /*#__PURE__*/React.forwardRef(function TextInput(_ref, ref) {
|
|
8
8
|
var canClear = _ref.canClear,
|
|
9
9
|
suffix = _ref.suffix,
|
|
10
10
|
value = _ref.value,
|
|
@@ -39,9 +39,10 @@ export var TextInput = function TextInput(_ref) {
|
|
|
39
39
|
onChange == null ? void 0 : onChange(e);
|
|
40
40
|
};
|
|
41
41
|
return /*#__PURE__*/React.createElement(Input, _extends({
|
|
42
|
+
ref: ref,
|
|
42
43
|
type: "text",
|
|
43
44
|
suffix: suffixValue,
|
|
44
45
|
value: currentValue,
|
|
45
46
|
onChange: handleChange
|
|
46
47
|
}, props));
|
|
47
|
-
};
|
|
48
|
+
});
|