@spaced-out/ui-design-system 0.1.9 → 0.1.10
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 +10 -0
- package/lib/components/Button/Button.js +2 -0
- package/lib/components/Button/Button.js.flow +4 -0
- package/lib/components/Dropdown/Dropdown.js +2 -3
- package/lib/components/Dropdown/Dropdown.js.flow +2 -1
- package/lib/components/Input/Input.js +2 -2
- package/lib/components/Input/Input.js.flow +2 -1
- package/lib/components/Menu/Menu.js +4 -3
- package/lib/components/Menu/Menu.js.flow +23 -19
- package/lib/components/SearchInput/SearchInput.js +2 -3
- package/lib/components/SearchInput/SearchInput.js.flow +2 -1
- package/lib/components/Text/Text.js +69 -51
- package/lib/components/Text/Text.js.flow +565 -397
- package/lib/components/Textarea/Textarea.js +2 -2
- package/lib/components/Textarea/Textarea.js.flow +2 -1
- package/lib/components/Toast/Toast.js +10 -6
- package/lib/components/Toast/Toast.js.flow +18 -10
- package/lib/components/Toggle/Toggle.js +4 -3
- package/lib/components/Toggle/Toggle.js.flow +69 -62
- package/lib/components/Truncate/Truncate.js +10 -7
- package/lib/components/Truncate/Truncate.js.flow +49 -37
- package/lib/components/Typeahead/Typeahead.js +2 -3
- package/lib/components/Typeahead/Typeahead.js.flow +2 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.1.10](https://github.com/spaced-out/ui-design-system/compare/v0.1.9...v0.1.10) (2023-04-10)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* added tabIndex support for buttons ([e3eb705](https://github.com/spaced-out/ui-design-system/commit/e3eb705a1dee1ee6ac9b9431974f0e216dcea171))
|
|
11
|
+
* aded nested dialog example ([b56a835](https://github.com/spaced-out/ui-design-system/commit/b56a835350137f1b291b3a5e72e241af5f6b0b9b))
|
|
12
|
+
* props fix ([952c7f0](https://github.com/spaced-out/ui-design-system/commit/952c7f0c8e9bd85b9a05db3564064985d8e6d852))
|
|
13
|
+
* ref forwarding in text, truncate, menu etc ([#94](https://github.com/spaced-out/ui-design-system/issues/94)) ([eb4f559](https://github.com/spaced-out/ui-design-system/commit/eb4f559e83c298d0376c99abf59cea386afd4bca))
|
|
14
|
+
|
|
5
15
|
### [0.1.9](https://github.com/spaced-out/ui-design-system/compare/v0.1.8...v0.1.9) (2023-04-05)
|
|
6
16
|
|
|
7
17
|
|
|
@@ -41,6 +41,7 @@ const UnstyledButton = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
41
41
|
className,
|
|
42
42
|
ariaLabel,
|
|
43
43
|
actionType,
|
|
44
|
+
tabIndex = 0,
|
|
44
45
|
...props
|
|
45
46
|
} = _ref;
|
|
46
47
|
return /*#__PURE__*/React.createElement("button", _extends({}, props, ariaLabel ? {
|
|
@@ -50,6 +51,7 @@ const UnstyledButton = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
50
51
|
ref: ref,
|
|
51
52
|
role: "button",
|
|
52
53
|
disabled: disabled,
|
|
54
|
+
tabIndex: disabled ? -1 : tabIndex,
|
|
53
55
|
type: actionType,
|
|
54
56
|
onClick: event => {
|
|
55
57
|
if (disabled) {
|
|
@@ -36,6 +36,7 @@ export type UnstyledButtonProps = {
|
|
|
36
36
|
onClick?: ?(SyntheticEvent<HTMLElement>) => mixed,
|
|
37
37
|
className?: string,
|
|
38
38
|
ariaLabel?: string,
|
|
39
|
+
tabIndex?: number,
|
|
39
40
|
...
|
|
40
41
|
};
|
|
41
42
|
|
|
@@ -53,6 +54,7 @@ export type ButtonProps = {
|
|
|
53
54
|
disabled?: boolean,
|
|
54
55
|
size?: 'medium' | 'small',
|
|
55
56
|
ariaLabel?: string,
|
|
57
|
+
tabIndex?: number,
|
|
56
58
|
...
|
|
57
59
|
};
|
|
58
60
|
|
|
@@ -75,6 +77,7 @@ export const UnstyledButton: React$AbstractComponent<
|
|
|
75
77
|
className,
|
|
76
78
|
ariaLabel,
|
|
77
79
|
actionType,
|
|
80
|
+
tabIndex = 0,
|
|
78
81
|
...props
|
|
79
82
|
}: UnstyledButtonProps,
|
|
80
83
|
ref: React.Ref<'button'>,
|
|
@@ -86,6 +89,7 @@ export const UnstyledButton: React$AbstractComponent<
|
|
|
86
89
|
ref={ref}
|
|
87
90
|
role="button"
|
|
88
91
|
disabled={disabled}
|
|
92
|
+
tabIndex={disabled ? -1 : tabIndex}
|
|
89
93
|
type={actionType}
|
|
90
94
|
onClick={(event) => {
|
|
91
95
|
if (disabled) {
|
|
@@ -59,15 +59,14 @@ const Dropdown = _ref => {
|
|
|
59
59
|
"data-testid": "Dropdown",
|
|
60
60
|
className: (0, _classify.classify)(_DropdownModule.default.dropdownContainer, classNames?.wrapper),
|
|
61
61
|
ref: dropdownRef
|
|
62
|
-
}, /*#__PURE__*/React.createElement(_Input.Input, _extends({
|
|
62
|
+
}, /*#__PURE__*/React.createElement(_Input.Input, _extends({}, inputProps, {
|
|
63
63
|
boxRef: reference,
|
|
64
64
|
size: size,
|
|
65
65
|
placeholder: placeholder,
|
|
66
66
|
value: dropdownInputText,
|
|
67
67
|
classNames: {
|
|
68
68
|
box: _DropdownModule.default.inputBox
|
|
69
|
-
}
|
|
70
|
-
}, inputProps, {
|
|
69
|
+
},
|
|
71
70
|
iconRightName: isOpen ? 'angle-up' : 'angle-down',
|
|
72
71
|
readOnly: true,
|
|
73
72
|
onContainerClick: e => {
|
|
@@ -35,6 +35,7 @@ export type DropdownProps = {
|
|
|
35
35
|
onMenuClose?: () => mixed,
|
|
36
36
|
dropdownInputText?: string,
|
|
37
37
|
menu?: MenuProps,
|
|
38
|
+
...
|
|
38
39
|
};
|
|
39
40
|
|
|
40
41
|
export const Dropdown = ({
|
|
@@ -69,12 +70,12 @@ export const Dropdown = ({
|
|
|
69
70
|
ref={dropdownRef}
|
|
70
71
|
>
|
|
71
72
|
<Input
|
|
73
|
+
{...inputProps}
|
|
72
74
|
boxRef={reference}
|
|
73
75
|
size={size}
|
|
74
76
|
placeholder={placeholder}
|
|
75
77
|
value={dropdownInputText}
|
|
76
78
|
classNames={{box: css.inputBox}}
|
|
77
|
-
{...inputProps}
|
|
78
79
|
iconRightName={isOpen ? 'angle-up' : 'angle-down'}
|
|
79
80
|
readOnly
|
|
80
81
|
onContainerClick={(e) => {
|
|
@@ -97,7 +97,7 @@ const Input_ = (props, ref) => {
|
|
|
97
97
|
color: disabled ? 'disabled' : 'secondary',
|
|
98
98
|
size: "small",
|
|
99
99
|
type: iconLeftType
|
|
100
|
-
}), /*#__PURE__*/React.createElement("input", _extends({
|
|
100
|
+
}), /*#__PURE__*/React.createElement("input", _extends({}, inputProps, {
|
|
101
101
|
disabled: locked || disabled,
|
|
102
102
|
name: name,
|
|
103
103
|
ref: ref,
|
|
@@ -108,7 +108,7 @@ const Input_ = (props, ref) => {
|
|
|
108
108
|
onBlur: onBlur,
|
|
109
109
|
type: showPassword ? 'text' : type,
|
|
110
110
|
readOnly: readOnly && 'readOnly'
|
|
111
|
-
}
|
|
111
|
+
})), type === 'color' && /*#__PURE__*/React.createElement("div", {
|
|
112
112
|
className: (0, _classify.classify)(_InputModule.default.colorText, _InputModule.default[size], {
|
|
113
113
|
[_InputModule.default.hasValue]: value
|
|
114
114
|
})
|
|
@@ -72,6 +72,7 @@ export type InputProps = {
|
|
|
72
72
|
* Only values which are equal to the basis for stepping (min if specified, value otherwise, and an
|
|
73
73
|
* appropriate default value if neither of those is provided) are valid. */
|
|
74
74
|
step?: string,
|
|
75
|
+
...
|
|
75
76
|
};
|
|
76
77
|
|
|
77
78
|
const Input_ = (props: InputProps, ref): React.Node => {
|
|
@@ -156,6 +157,7 @@ const Input_ = (props: InputProps, ref): React.Node => {
|
|
|
156
157
|
/>
|
|
157
158
|
)}
|
|
158
159
|
<input
|
|
160
|
+
{...inputProps}
|
|
159
161
|
disabled={locked || disabled}
|
|
160
162
|
name={name}
|
|
161
163
|
ref={ref}
|
|
@@ -166,7 +168,6 @@ const Input_ = (props: InputProps, ref): React.Node => {
|
|
|
166
168
|
onBlur={onBlur}
|
|
167
169
|
type={showPassword ? 'text' : type}
|
|
168
170
|
readOnly={readOnly && 'readOnly'}
|
|
169
|
-
{...inputProps}
|
|
170
171
|
/>
|
|
171
172
|
{type === 'color' && (
|
|
172
173
|
<div
|
|
@@ -59,7 +59,7 @@ const RenderOption = _ref => {
|
|
|
59
59
|
}
|
|
60
60
|
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
61
61
|
};
|
|
62
|
-
const Menu = props => {
|
|
62
|
+
const Menu = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
63
63
|
const {
|
|
64
64
|
classNames,
|
|
65
65
|
size = 'medium',
|
|
@@ -74,7 +74,8 @@ const Menu = props => {
|
|
|
74
74
|
}, classNames?.wrapper),
|
|
75
75
|
style: {
|
|
76
76
|
width
|
|
77
|
-
}
|
|
77
|
+
},
|
|
78
|
+
ref: ref
|
|
78
79
|
}, /*#__PURE__*/React.createElement(RenderOption, props));
|
|
79
|
-
};
|
|
80
|
+
});
|
|
80
81
|
exports.Menu = Menu;
|
|
@@ -147,23 +147,27 @@ const RenderOption = ({
|
|
|
147
147
|
return <></>;
|
|
148
148
|
};
|
|
149
149
|
|
|
150
|
-
export const Menu
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
150
|
+
export const Menu: React$AbstractComponent<MenuProps, HTMLDivElement> =
|
|
151
|
+
React.forwardRef<MenuProps, HTMLDivElement>(
|
|
152
|
+
(props: MenuProps, ref): React.Node => {
|
|
153
|
+
const {classNames, size = 'medium', width, isFluid = true} = props;
|
|
154
|
+
|
|
155
|
+
return (
|
|
156
|
+
<div
|
|
157
|
+
className={classify(
|
|
158
|
+
css.menuCard,
|
|
159
|
+
{
|
|
160
|
+
[css.fluid]: isFluid,
|
|
161
|
+
[css.medium]: size === 'medium',
|
|
162
|
+
[css.small]: size === 'small',
|
|
163
|
+
},
|
|
164
|
+
classNames?.wrapper,
|
|
165
|
+
)}
|
|
166
|
+
style={{width}}
|
|
167
|
+
ref={ref}
|
|
168
|
+
>
|
|
169
|
+
<RenderOption {...props} />
|
|
170
|
+
</div>
|
|
171
|
+
);
|
|
172
|
+
},
|
|
168
173
|
);
|
|
169
|
-
};
|
|
@@ -31,9 +31,8 @@ const SearchInput = _ref => {
|
|
|
31
31
|
};
|
|
32
32
|
return /*#__PURE__*/React.createElement("div", {
|
|
33
33
|
className: (0, _classify.default)(_SearchInputModule.default.searchInputWrapper, classNames?.wrapper)
|
|
34
|
-
}, /*#__PURE__*/React.createElement(_Input.Input, _extends({
|
|
35
|
-
type: "text"
|
|
36
|
-
}, searchInputProps, {
|
|
34
|
+
}, /*#__PURE__*/React.createElement(_Input.Input, _extends({}, searchInputProps, {
|
|
35
|
+
type: "text",
|
|
37
36
|
classNames: {
|
|
38
37
|
iconRight: value && !(disabled || locked) ? _SearchInputModule.default.clickable : '',
|
|
39
38
|
iconLeft: value && !disabled ? _SearchInputModule.default.primaryText : '',
|
|
@@ -21,6 +21,7 @@ export type SearchInputProps = {
|
|
|
21
21
|
classNames?: ClassNames,
|
|
22
22
|
onClear?: () => void,
|
|
23
23
|
isLoading?: boolean,
|
|
24
|
+
...
|
|
24
25
|
};
|
|
25
26
|
|
|
26
27
|
export const SearchInput = ({
|
|
@@ -42,8 +43,8 @@ export const SearchInput = ({
|
|
|
42
43
|
return (
|
|
43
44
|
<div className={classify(css.searchInputWrapper, classNames?.wrapper)}>
|
|
44
45
|
<Input
|
|
45
|
-
type="text"
|
|
46
46
|
{...searchInputProps}
|
|
47
|
+
type="text"
|
|
47
48
|
classNames={{
|
|
48
49
|
iconRight: value && !(disabled || locked) ? css.clickable : '',
|
|
49
50
|
iconLeft: value && !disabled ? css.primaryText : '',
|
|
@@ -13,7 +13,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
13
13
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
14
14
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
15
15
|
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); }
|
|
16
|
-
const HighlightText = _ref => {
|
|
16
|
+
const HighlightText = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
17
17
|
let {
|
|
18
18
|
text,
|
|
19
19
|
highlight,
|
|
@@ -29,15 +29,17 @@ const HighlightText = _ref => {
|
|
|
29
29
|
highlights = (0, _string.escapeRegExp)(highlight);
|
|
30
30
|
}
|
|
31
31
|
const parts = text.split(new RegExp(`(${highlights})`, caseSensitiveHighlighting ? '' : 'gi')).filter(part => part !== '');
|
|
32
|
-
return /*#__PURE__*/React.createElement("span",
|
|
32
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
33
|
+
ref: ref
|
|
34
|
+
}, parts.map((part, idx) => highlights.toLowerCase().includes((0, _string.escapeRegExp)(part).toLowerCase()) ? /*#__PURE__*/React.createElement("span", {
|
|
33
35
|
// eslint-disable-next-line react/no-array-index-key
|
|
34
36
|
key: idx,
|
|
35
37
|
className: (0, _classify.default)(_typographyModule.default.highlightText, {
|
|
36
38
|
[_typographyModule.default.bgHighlighting]: highlightWithBackground
|
|
37
39
|
}, highlightClassName)
|
|
38
40
|
}, part) : part));
|
|
39
|
-
};
|
|
40
|
-
const JumboMedium = _ref2 => {
|
|
41
|
+
});
|
|
42
|
+
const JumboMedium = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
41
43
|
let {
|
|
42
44
|
color = _typography.TEXT_COLORS.primary,
|
|
43
45
|
children,
|
|
@@ -49,7 +51,8 @@ const JumboMedium = _ref2 => {
|
|
|
49
51
|
...props
|
|
50
52
|
} = _ref2;
|
|
51
53
|
return /*#__PURE__*/React.createElement("span", _extends({}, props, {
|
|
52
|
-
className: (0, _classify.default)(_typographyModule.default.jumboMedium, _typographyModule.default[color], className)
|
|
54
|
+
className: (0, _classify.default)(_typographyModule.default.jumboMedium, _typographyModule.default[color], className),
|
|
55
|
+
ref: ref
|
|
53
56
|
}), !!highlightString?.length && typeof children === 'string' ? /*#__PURE__*/React.createElement(HighlightText, {
|
|
54
57
|
text: children,
|
|
55
58
|
highlight: highlightString,
|
|
@@ -57,9 +60,9 @@ const JumboMedium = _ref2 => {
|
|
|
57
60
|
highlightClassName: highlightedTextClassName,
|
|
58
61
|
highlightWithBackground: highlightWithBackground
|
|
59
62
|
}) : children);
|
|
60
|
-
};
|
|
63
|
+
});
|
|
61
64
|
exports.JumboMedium = JumboMedium;
|
|
62
|
-
const TitleMedium = _ref3 => {
|
|
65
|
+
const TitleMedium = /*#__PURE__*/React.forwardRef((_ref3, ref) => {
|
|
63
66
|
let {
|
|
64
67
|
color = _typography.TEXT_COLORS.primary,
|
|
65
68
|
children,
|
|
@@ -71,7 +74,8 @@ const TitleMedium = _ref3 => {
|
|
|
71
74
|
...props
|
|
72
75
|
} = _ref3;
|
|
73
76
|
return /*#__PURE__*/React.createElement("h1", _extends({}, props, {
|
|
74
|
-
className: (0, _classify.default)(_typographyModule.default.titleMedium, _typographyModule.default[color], className)
|
|
77
|
+
className: (0, _classify.default)(_typographyModule.default.titleMedium, _typographyModule.default[color], className),
|
|
78
|
+
ref: ref
|
|
75
79
|
}), !!highlightString?.length && typeof children === 'string' ? /*#__PURE__*/React.createElement(HighlightText, {
|
|
76
80
|
text: children,
|
|
77
81
|
highlight: highlightString,
|
|
@@ -79,9 +83,9 @@ const TitleMedium = _ref3 => {
|
|
|
79
83
|
highlightClassName: highlightedTextClassName,
|
|
80
84
|
highlightWithBackground: highlightWithBackground
|
|
81
85
|
}) : children);
|
|
82
|
-
};
|
|
86
|
+
});
|
|
83
87
|
exports.TitleMedium = TitleMedium;
|
|
84
|
-
const SubTitleLarge = _ref4 => {
|
|
88
|
+
const SubTitleLarge = /*#__PURE__*/React.forwardRef((_ref4, ref) => {
|
|
85
89
|
let {
|
|
86
90
|
color = _typography.TEXT_COLORS.primary,
|
|
87
91
|
children,
|
|
@@ -93,7 +97,8 @@ const SubTitleLarge = _ref4 => {
|
|
|
93
97
|
...props
|
|
94
98
|
} = _ref4;
|
|
95
99
|
return /*#__PURE__*/React.createElement("h2", _extends({}, props, {
|
|
96
|
-
className: (0, _classify.default)(_typographyModule.default.subTitleLarge, _typographyModule.default[color], className)
|
|
100
|
+
className: (0, _classify.default)(_typographyModule.default.subTitleLarge, _typographyModule.default[color], className),
|
|
101
|
+
ref: ref
|
|
97
102
|
}), !!highlightString?.length && typeof children === 'string' ? /*#__PURE__*/React.createElement(HighlightText, {
|
|
98
103
|
text: children,
|
|
99
104
|
highlight: highlightString,
|
|
@@ -101,9 +106,9 @@ const SubTitleLarge = _ref4 => {
|
|
|
101
106
|
highlightClassName: highlightedTextClassName,
|
|
102
107
|
highlightWithBackground: highlightWithBackground
|
|
103
108
|
}) : children);
|
|
104
|
-
};
|
|
109
|
+
});
|
|
105
110
|
exports.SubTitleLarge = SubTitleLarge;
|
|
106
|
-
const SubTitleMedium = _ref5 => {
|
|
111
|
+
const SubTitleMedium = /*#__PURE__*/React.forwardRef((_ref5, ref) => {
|
|
107
112
|
let {
|
|
108
113
|
color = _typography.TEXT_COLORS.primary,
|
|
109
114
|
children,
|
|
@@ -115,7 +120,8 @@ const SubTitleMedium = _ref5 => {
|
|
|
115
120
|
...props
|
|
116
121
|
} = _ref5;
|
|
117
122
|
return /*#__PURE__*/React.createElement("h3", _extends({}, props, {
|
|
118
|
-
className: (0, _classify.default)(_typographyModule.default.subTitleMedium, _typographyModule.default[color], className)
|
|
123
|
+
className: (0, _classify.default)(_typographyModule.default.subTitleMedium, _typographyModule.default[color], className),
|
|
124
|
+
ref: ref
|
|
119
125
|
}), !!highlightString?.length && typeof children === 'string' ? /*#__PURE__*/React.createElement(HighlightText, {
|
|
120
126
|
text: children,
|
|
121
127
|
highlight: highlightString,
|
|
@@ -123,9 +129,9 @@ const SubTitleMedium = _ref5 => {
|
|
|
123
129
|
highlightClassName: highlightedTextClassName,
|
|
124
130
|
highlightWithBackground: highlightWithBackground
|
|
125
131
|
}) : children);
|
|
126
|
-
};
|
|
132
|
+
});
|
|
127
133
|
exports.SubTitleMedium = SubTitleMedium;
|
|
128
|
-
const SubTitleSmall = _ref6 => {
|
|
134
|
+
const SubTitleSmall = /*#__PURE__*/React.forwardRef((_ref6, ref) => {
|
|
129
135
|
let {
|
|
130
136
|
color = _typography.TEXT_COLORS.primary,
|
|
131
137
|
children,
|
|
@@ -137,7 +143,8 @@ const SubTitleSmall = _ref6 => {
|
|
|
137
143
|
...props
|
|
138
144
|
} = _ref6;
|
|
139
145
|
return /*#__PURE__*/React.createElement("h4", _extends({}, props, {
|
|
140
|
-
className: (0, _classify.default)(_typographyModule.default.subTitleSmall, _typographyModule.default[color], className)
|
|
146
|
+
className: (0, _classify.default)(_typographyModule.default.subTitleSmall, _typographyModule.default[color], className),
|
|
147
|
+
ref: ref
|
|
141
148
|
}), !!highlightString?.length && typeof children === 'string' ? /*#__PURE__*/React.createElement(HighlightText, {
|
|
142
149
|
text: children,
|
|
143
150
|
highlight: highlightString,
|
|
@@ -145,9 +152,9 @@ const SubTitleSmall = _ref6 => {
|
|
|
145
152
|
highlightClassName: highlightedTextClassName,
|
|
146
153
|
highlightWithBackground: highlightWithBackground
|
|
147
154
|
}) : children);
|
|
148
|
-
};
|
|
155
|
+
});
|
|
149
156
|
exports.SubTitleSmall = SubTitleSmall;
|
|
150
|
-
const SubTitleExtraSmall = _ref7 => {
|
|
157
|
+
const SubTitleExtraSmall = /*#__PURE__*/React.forwardRef((_ref7, ref) => {
|
|
151
158
|
let {
|
|
152
159
|
color = _typography.TEXT_COLORS.primary,
|
|
153
160
|
children,
|
|
@@ -159,7 +166,8 @@ const SubTitleExtraSmall = _ref7 => {
|
|
|
159
166
|
...props
|
|
160
167
|
} = _ref7;
|
|
161
168
|
return /*#__PURE__*/React.createElement("h5", _extends({}, props, {
|
|
162
|
-
className: (0, _classify.default)(_typographyModule.default.subTitleExtraSmall, _typographyModule.default[color], className)
|
|
169
|
+
className: (0, _classify.default)(_typographyModule.default.subTitleExtraSmall, _typographyModule.default[color], className),
|
|
170
|
+
ref: ref
|
|
163
171
|
}), !!highlightString?.length && typeof children === 'string' ? /*#__PURE__*/React.createElement(HighlightText, {
|
|
164
172
|
text: children,
|
|
165
173
|
highlight: highlightString,
|
|
@@ -167,9 +175,9 @@ const SubTitleExtraSmall = _ref7 => {
|
|
|
167
175
|
highlightClassName: highlightedTextClassName,
|
|
168
176
|
highlightWithBackground: highlightWithBackground
|
|
169
177
|
}) : children);
|
|
170
|
-
};
|
|
178
|
+
});
|
|
171
179
|
exports.SubTitleExtraSmall = SubTitleExtraSmall;
|
|
172
|
-
const ButtonTextMedium = _ref8 => {
|
|
180
|
+
const ButtonTextMedium = /*#__PURE__*/React.forwardRef((_ref8, ref) => {
|
|
173
181
|
let {
|
|
174
182
|
color = _typography.TEXT_COLORS.primary,
|
|
175
183
|
children,
|
|
@@ -181,7 +189,8 @@ const ButtonTextMedium = _ref8 => {
|
|
|
181
189
|
...props
|
|
182
190
|
} = _ref8;
|
|
183
191
|
return /*#__PURE__*/React.createElement("span", _extends({}, props, {
|
|
184
|
-
className: (0, _classify.default)(_typographyModule.default.buttonTextMedium, _typographyModule.default[color], className)
|
|
192
|
+
className: (0, _classify.default)(_typographyModule.default.buttonTextMedium, _typographyModule.default[color], className),
|
|
193
|
+
ref: ref
|
|
185
194
|
}), !!highlightString?.length && typeof children === 'string' ? /*#__PURE__*/React.createElement(HighlightText, {
|
|
186
195
|
text: children,
|
|
187
196
|
highlight: highlightString,
|
|
@@ -189,9 +198,9 @@ const ButtonTextMedium = _ref8 => {
|
|
|
189
198
|
highlightClassName: highlightedTextClassName,
|
|
190
199
|
highlightWithBackground: highlightWithBackground
|
|
191
200
|
}) : children);
|
|
192
|
-
};
|
|
201
|
+
});
|
|
193
202
|
exports.ButtonTextMedium = ButtonTextMedium;
|
|
194
|
-
const ButtonTextSmall = _ref9 => {
|
|
203
|
+
const ButtonTextSmall = /*#__PURE__*/React.forwardRef((_ref9, ref) => {
|
|
195
204
|
let {
|
|
196
205
|
color = _typography.TEXT_COLORS.primary,
|
|
197
206
|
children,
|
|
@@ -203,7 +212,8 @@ const ButtonTextSmall = _ref9 => {
|
|
|
203
212
|
...props
|
|
204
213
|
} = _ref9;
|
|
205
214
|
return /*#__PURE__*/React.createElement("span", _extends({}, props, {
|
|
206
|
-
className: (0, _classify.default)(_typographyModule.default.buttonTextSmall, _typographyModule.default[color], className)
|
|
215
|
+
className: (0, _classify.default)(_typographyModule.default.buttonTextSmall, _typographyModule.default[color], className),
|
|
216
|
+
ref: ref
|
|
207
217
|
}), !!highlightString?.length && typeof children === 'string' ? /*#__PURE__*/React.createElement(HighlightText, {
|
|
208
218
|
text: children,
|
|
209
219
|
highlight: highlightString,
|
|
@@ -211,9 +221,9 @@ const ButtonTextSmall = _ref9 => {
|
|
|
211
221
|
highlightClassName: highlightedTextClassName,
|
|
212
222
|
highlightWithBackground: highlightWithBackground
|
|
213
223
|
}) : children);
|
|
214
|
-
};
|
|
224
|
+
});
|
|
215
225
|
exports.ButtonTextSmall = ButtonTextSmall;
|
|
216
|
-
const ButtonTextExtraSmall = _ref10 => {
|
|
226
|
+
const ButtonTextExtraSmall = /*#__PURE__*/React.forwardRef((_ref10, ref) => {
|
|
217
227
|
let {
|
|
218
228
|
color = _typography.TEXT_COLORS.primary,
|
|
219
229
|
children,
|
|
@@ -225,7 +235,8 @@ const ButtonTextExtraSmall = _ref10 => {
|
|
|
225
235
|
...props
|
|
226
236
|
} = _ref10;
|
|
227
237
|
return /*#__PURE__*/React.createElement("span", _extends({}, props, {
|
|
228
|
-
className: (0, _classify.default)(_typographyModule.default.buttonTextExtraSmall, _typographyModule.default[color], className)
|
|
238
|
+
className: (0, _classify.default)(_typographyModule.default.buttonTextExtraSmall, _typographyModule.default[color], className),
|
|
239
|
+
ref: ref
|
|
229
240
|
}), !!highlightString?.length && typeof children === 'string' ? /*#__PURE__*/React.createElement(HighlightText, {
|
|
230
241
|
text: children,
|
|
231
242
|
highlight: highlightString,
|
|
@@ -233,9 +244,9 @@ const ButtonTextExtraSmall = _ref10 => {
|
|
|
233
244
|
highlightClassName: highlightedTextClassName,
|
|
234
245
|
highlightWithBackground: highlightWithBackground
|
|
235
246
|
}) : children);
|
|
236
|
-
};
|
|
247
|
+
});
|
|
237
248
|
exports.ButtonTextExtraSmall = ButtonTextExtraSmall;
|
|
238
|
-
const FormInputMedium = _ref11 => {
|
|
249
|
+
const FormInputMedium = /*#__PURE__*/React.forwardRef((_ref11, ref) => {
|
|
239
250
|
let {
|
|
240
251
|
color = _typography.TEXT_COLORS.primary,
|
|
241
252
|
children,
|
|
@@ -247,7 +258,8 @@ const FormInputMedium = _ref11 => {
|
|
|
247
258
|
...props
|
|
248
259
|
} = _ref11;
|
|
249
260
|
return /*#__PURE__*/React.createElement("p", _extends({}, props, {
|
|
250
|
-
className: (0, _classify.default)(_typographyModule.default.formInputMedium, _typographyModule.default[color], className)
|
|
261
|
+
className: (0, _classify.default)(_typographyModule.default.formInputMedium, _typographyModule.default[color], className),
|
|
262
|
+
ref: ref
|
|
251
263
|
}), !!highlightString?.length && typeof children === 'string' ? /*#__PURE__*/React.createElement(HighlightText, {
|
|
252
264
|
text: children,
|
|
253
265
|
highlight: highlightString,
|
|
@@ -255,9 +267,9 @@ const FormInputMedium = _ref11 => {
|
|
|
255
267
|
highlightClassName: highlightedTextClassName,
|
|
256
268
|
highlightWithBackground: highlightWithBackground
|
|
257
269
|
}) : children);
|
|
258
|
-
};
|
|
270
|
+
});
|
|
259
271
|
exports.FormInputMedium = FormInputMedium;
|
|
260
|
-
const FormInputSmall = _ref12 => {
|
|
272
|
+
const FormInputSmall = /*#__PURE__*/React.forwardRef((_ref12, ref) => {
|
|
261
273
|
let {
|
|
262
274
|
color = _typography.TEXT_COLORS.primary,
|
|
263
275
|
children,
|
|
@@ -269,7 +281,8 @@ const FormInputSmall = _ref12 => {
|
|
|
269
281
|
...props
|
|
270
282
|
} = _ref12;
|
|
271
283
|
return /*#__PURE__*/React.createElement("p", _extends({}, props, {
|
|
272
|
-
className: (0, _classify.default)(_typographyModule.default.formInputSmall, _typographyModule.default[color], className)
|
|
284
|
+
className: (0, _classify.default)(_typographyModule.default.formInputSmall, _typographyModule.default[color], className),
|
|
285
|
+
ref: ref
|
|
273
286
|
}), !!highlightString?.length && typeof children === 'string' ? /*#__PURE__*/React.createElement(HighlightText, {
|
|
274
287
|
text: children,
|
|
275
288
|
highlight: highlightString,
|
|
@@ -277,9 +290,9 @@ const FormInputSmall = _ref12 => {
|
|
|
277
290
|
highlightClassName: highlightedTextClassName,
|
|
278
291
|
highlightWithBackground: highlightWithBackground
|
|
279
292
|
}) : children);
|
|
280
|
-
};
|
|
293
|
+
});
|
|
281
294
|
exports.FormInputSmall = FormInputSmall;
|
|
282
|
-
const BodyLarge = _ref13 => {
|
|
295
|
+
const BodyLarge = /*#__PURE__*/React.forwardRef((_ref13, ref) => {
|
|
283
296
|
let {
|
|
284
297
|
color = _typography.TEXT_COLORS.primary,
|
|
285
298
|
children,
|
|
@@ -291,7 +304,8 @@ const BodyLarge = _ref13 => {
|
|
|
291
304
|
...props
|
|
292
305
|
} = _ref13;
|
|
293
306
|
return /*#__PURE__*/React.createElement("p", _extends({}, props, {
|
|
294
|
-
className: (0, _classify.default)(_typographyModule.default.bodyLarge, _typographyModule.default[color], className)
|
|
307
|
+
className: (0, _classify.default)(_typographyModule.default.bodyLarge, _typographyModule.default[color], className),
|
|
308
|
+
ref: ref
|
|
295
309
|
}), !!highlightString?.length && typeof children === 'string' ? /*#__PURE__*/React.createElement(HighlightText, {
|
|
296
310
|
text: children,
|
|
297
311
|
highlight: highlightString,
|
|
@@ -299,9 +313,9 @@ const BodyLarge = _ref13 => {
|
|
|
299
313
|
highlightClassName: highlightedTextClassName,
|
|
300
314
|
highlightWithBackground: highlightWithBackground
|
|
301
315
|
}) : children);
|
|
302
|
-
};
|
|
316
|
+
});
|
|
303
317
|
exports.BodyLarge = BodyLarge;
|
|
304
|
-
const BodyMedium = _ref14 => {
|
|
318
|
+
const BodyMedium = /*#__PURE__*/React.forwardRef((_ref14, ref) => {
|
|
305
319
|
let {
|
|
306
320
|
color = _typography.TEXT_COLORS.primary,
|
|
307
321
|
children,
|
|
@@ -313,7 +327,8 @@ const BodyMedium = _ref14 => {
|
|
|
313
327
|
...props
|
|
314
328
|
} = _ref14;
|
|
315
329
|
return /*#__PURE__*/React.createElement("p", _extends({}, props, {
|
|
316
|
-
className: (0, _classify.default)(_typographyModule.default.bodyMedium, _typographyModule.default[color], className)
|
|
330
|
+
className: (0, _classify.default)(_typographyModule.default.bodyMedium, _typographyModule.default[color], className),
|
|
331
|
+
ref: ref
|
|
317
332
|
}), !!highlightString?.length && typeof children === 'string' ? /*#__PURE__*/React.createElement(HighlightText, {
|
|
318
333
|
text: children,
|
|
319
334
|
highlight: highlightString,
|
|
@@ -321,9 +336,9 @@ const BodyMedium = _ref14 => {
|
|
|
321
336
|
highlightClassName: highlightedTextClassName,
|
|
322
337
|
highlightWithBackground: highlightWithBackground
|
|
323
338
|
}) : children);
|
|
324
|
-
};
|
|
339
|
+
});
|
|
325
340
|
exports.BodyMedium = BodyMedium;
|
|
326
|
-
const BodySmall = _ref15 => {
|
|
341
|
+
const BodySmall = /*#__PURE__*/React.forwardRef((_ref15, ref) => {
|
|
327
342
|
let {
|
|
328
343
|
color = _typography.TEXT_COLORS.primary,
|
|
329
344
|
children,
|
|
@@ -335,7 +350,8 @@ const BodySmall = _ref15 => {
|
|
|
335
350
|
...props
|
|
336
351
|
} = _ref15;
|
|
337
352
|
return /*#__PURE__*/React.createElement("p", _extends({}, props, {
|
|
338
|
-
className: (0, _classify.default)(_typographyModule.default.bodySmall, _typographyModule.default[color], className)
|
|
353
|
+
className: (0, _classify.default)(_typographyModule.default.bodySmall, _typographyModule.default[color], className),
|
|
354
|
+
ref: ref
|
|
339
355
|
}), !!highlightString?.length && typeof children === 'string' ? /*#__PURE__*/React.createElement(HighlightText, {
|
|
340
356
|
text: children,
|
|
341
357
|
highlight: highlightString,
|
|
@@ -343,9 +359,9 @@ const BodySmall = _ref15 => {
|
|
|
343
359
|
highlightClassName: highlightedTextClassName,
|
|
344
360
|
highlightWithBackground: highlightWithBackground
|
|
345
361
|
}) : children);
|
|
346
|
-
};
|
|
362
|
+
});
|
|
347
363
|
exports.BodySmall = BodySmall;
|
|
348
|
-
const FormLabelMedium = _ref16 => {
|
|
364
|
+
const FormLabelMedium = /*#__PURE__*/React.forwardRef((_ref16, ref) => {
|
|
349
365
|
let {
|
|
350
366
|
color = _typography.TEXT_COLORS.primary,
|
|
351
367
|
children,
|
|
@@ -357,7 +373,8 @@ const FormLabelMedium = _ref16 => {
|
|
|
357
373
|
...props
|
|
358
374
|
} = _ref16;
|
|
359
375
|
return /*#__PURE__*/React.createElement("span", _extends({}, props, {
|
|
360
|
-
className: (0, _classify.default)(_typographyModule.default.formLabelMedium, _typographyModule.default[color], className)
|
|
376
|
+
className: (0, _classify.default)(_typographyModule.default.formLabelMedium, _typographyModule.default[color], className),
|
|
377
|
+
ref: ref
|
|
361
378
|
}), !!highlightString?.length && typeof children === 'string' ? /*#__PURE__*/React.createElement(HighlightText, {
|
|
362
379
|
text: children,
|
|
363
380
|
highlight: highlightString,
|
|
@@ -365,9 +382,9 @@ const FormLabelMedium = _ref16 => {
|
|
|
365
382
|
highlightClassName: highlightedTextClassName,
|
|
366
383
|
highlightWithBackground: highlightWithBackground
|
|
367
384
|
}) : children);
|
|
368
|
-
};
|
|
385
|
+
});
|
|
369
386
|
exports.FormLabelMedium = FormLabelMedium;
|
|
370
|
-
const FormLabelSmall = _ref17 => {
|
|
387
|
+
const FormLabelSmall = /*#__PURE__*/React.forwardRef((_ref17, ref) => {
|
|
371
388
|
let {
|
|
372
389
|
color = _typography.TEXT_COLORS.primary,
|
|
373
390
|
children,
|
|
@@ -379,7 +396,8 @@ const FormLabelSmall = _ref17 => {
|
|
|
379
396
|
...props
|
|
380
397
|
} = _ref17;
|
|
381
398
|
return /*#__PURE__*/React.createElement("span", _extends({}, props, {
|
|
382
|
-
className: (0, _classify.default)(_typographyModule.default.formLabelSmall, _typographyModule.default[color], className)
|
|
399
|
+
className: (0, _classify.default)(_typographyModule.default.formLabelSmall, _typographyModule.default[color], className),
|
|
400
|
+
ref: ref
|
|
383
401
|
}), !!highlightString?.length && typeof children === 'string' ? /*#__PURE__*/React.createElement(HighlightText, {
|
|
384
402
|
text: children,
|
|
385
403
|
highlight: highlightString,
|
|
@@ -387,5 +405,5 @@ const FormLabelSmall = _ref17 => {
|
|
|
387
405
|
highlightClassName: highlightedTextClassName,
|
|
388
406
|
highlightWithBackground: highlightWithBackground
|
|
389
407
|
}) : children);
|
|
390
|
-
};
|
|
408
|
+
});
|
|
391
409
|
exports.FormLabelSmall = FormLabelSmall;
|