@spaced-out/ui-design-system 0.1.57 → 0.1.59
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/lib/components/ButtonDropdown/ButtonDropdown.js +2 -2
- package/lib/components/ButtonDropdown/ButtonDropdown.js.flow +3 -3
- package/lib/components/ButtonDropdown/SimpleButtonDropdown.js +3 -2
- package/lib/components/ButtonDropdown/SimpleButtonDropdown.js.flow +4 -3
- package/lib/components/Dropdown/Dropdown.js +2 -2
- package/lib/components/Dropdown/Dropdown.js.flow +3 -3
- package/lib/components/Dropdown/SimpleDropdown.js +3 -2
- package/lib/components/Dropdown/SimpleDropdown.js.flow +4 -3
- package/lib/components/InlineDropdown/InlineDropdown.js +2 -2
- package/lib/components/InlineDropdown/InlineDropdown.js.flow +3 -3
- package/lib/components/InlineDropdown/SimpleInlineDropdown.js +3 -2
- package/lib/components/InlineDropdown/SimpleInlineDropdown.js.flow +4 -3
- package/lib/components/Menu/Menu.js.flow +1 -1
- package/lib/components/Menu/MenuOptionButton.js +1 -1
- package/lib/components/Menu/MenuOptionButton.js.flow +1 -1
- package/lib/components/OptionButton/OptionButton.js.flow +1 -1
- package/lib/components/OptionButton/SimpleOptionButton.js +3 -2
- package/lib/components/OptionButton/SimpleOptionButton.js.flow +4 -3
- package/lib/components/Tabs/TabList/TabDropdown.js +2 -2
- package/lib/components/Tabs/TabList/TabDropdown.js.flow +3 -3
- package/lib/components/Text/Text.js +152 -14
- package/lib/components/Text/Text.js.flow +237 -0
- package/lib/components/Text/index.js +36 -0
- package/lib/components/Text/index.js.flow +6 -0
- package/lib/components/Toggle/Toggle.js +5 -2
- package/lib/components/Toggle/Toggle.js.flow +8 -1
- package/lib/components/Typeahead/SimpleTypeahead.js +3 -2
- package/lib/components/Typeahead/SimpleTypeahead.js.flow +4 -3
- package/lib/components/Typeahead/Typeahead.js +2 -2
- package/lib/components/Typeahead/Typeahead.js.flow +3 -3
- package/lib/styles/typography.module.css +10 -1
- package/lib/utils/array/are-arrays-equal.js +11 -0
- package/lib/utils/array/are-arrays-equal.js.flow +14 -0
- package/lib/utils/array/index.js +16 -0
- package/lib/utils/array/index.js.flow +3 -0
- package/lib/utils/index.js +11 -0
- package/lib/utils/index.js.flow +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,25 @@
|
|
|
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.59](https://github.com/spaced-out/ui-design-system/compare/v0.1.58...v0.1.59) (2023-10-13)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* 🤘 expose event for Menu selection for all menu derivatives ([ff9704c](https://github.com/spaced-out/ui-design-system/commit/ff9704c3116d6743cc26fee20be43a89a6095b0a))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* renamed story ([b2541ee](https://github.com/spaced-out/ui-design-system/commit/b2541ee368a69e357d28b9485135d09d86f2a54b))
|
|
16
|
+
|
|
17
|
+
### [0.1.58](https://github.com/spaced-out/ui-design-system/compare/v0.1.57...v0.1.58) (2023-10-09)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* new typography components, added toggle label position prop ([869ed49](https://github.com/spaced-out/ui-design-system/commit/869ed49f8448b8a0630b2eebf0e2a65eb533160e))
|
|
23
|
+
|
|
5
24
|
### [0.1.57](https://github.com/spaced-out/ui-design-system/compare/v0.1.56...v0.1.57) (2023-10-04)
|
|
6
25
|
|
|
7
26
|
|
|
@@ -125,8 +125,8 @@ const ButtonDropdown = /*#__PURE__*/React.forwardRef((_ref, forwardRef) => {
|
|
|
125
125
|
})
|
|
126
126
|
}
|
|
127
127
|
}, /*#__PURE__*/React.createElement(_Menu.Menu, _extends({}, menu, {
|
|
128
|
-
onSelect: option => {
|
|
129
|
-
onOptionSelect && onOptionSelect(option);
|
|
128
|
+
onSelect: (option, e) => {
|
|
129
|
+
onOptionSelect && onOptionSelect(option, e);
|
|
130
130
|
if (!menu.optionsVariant || menu.optionsVariant === 'normal') {
|
|
131
131
|
clickAway();
|
|
132
132
|
}
|
|
@@ -58,7 +58,7 @@ export type ButtonDropdownProps = {
|
|
|
58
58
|
menu?: MenuProps,
|
|
59
59
|
positionStrategy?: Strategy,
|
|
60
60
|
anchorPosition?: AnchorType,
|
|
61
|
-
onOptionSelect?: (option: MenuOption) => mixed,
|
|
61
|
+
onOptionSelect?: (option: MenuOption, ?SyntheticEvent<HTMLElement>) => mixed,
|
|
62
62
|
onMenuOpen?: () => mixed,
|
|
63
63
|
onMenuClose?: () => mixed,
|
|
64
64
|
tooltip?: BaseTooltipProps,
|
|
@@ -176,8 +176,8 @@ export const ButtonDropdown: React$AbstractComponent<
|
|
|
176
176
|
>
|
|
177
177
|
<Menu
|
|
178
178
|
{...menu}
|
|
179
|
-
onSelect={(option) => {
|
|
180
|
-
onOptionSelect && onOptionSelect(option);
|
|
179
|
+
onSelect={(option, e) => {
|
|
180
|
+
onOptionSelect && onOptionSelect(option, e);
|
|
181
181
|
if (
|
|
182
182
|
!menu.optionsVariant ||
|
|
183
183
|
menu.optionsVariant === 'normal'
|
|
@@ -35,7 +35,8 @@ const SimpleButtonDropdownBase = (props, ref) => {
|
|
|
35
35
|
setButtonDropdownSelectedKeys(selectedKeys);
|
|
36
36
|
setBtnText(newBtnText);
|
|
37
37
|
}, [selectedKeys]);
|
|
38
|
-
const handleOptionChange = selectedOption => {
|
|
38
|
+
const handleOptionChange = (selectedOption, e) => {
|
|
39
|
+
e?.stopPropagation();
|
|
39
40
|
let newSelectedKeys = [];
|
|
40
41
|
if (optionsVariant === 'checkbox') {
|
|
41
42
|
newSelectedKeys = (0, _menu.getSelectedKeysFromSelectedOption)(selectedOption, buttonDropdownSelectedKeys);
|
|
@@ -46,7 +47,7 @@ const SimpleButtonDropdownBase = (props, ref) => {
|
|
|
46
47
|
setButtonDropdownSelectedKeys(newSelectedKeys);
|
|
47
48
|
setBtnText(newBtnText);
|
|
48
49
|
setTimeout(() => {
|
|
49
|
-
onOptionSelect?.(selectedOption);
|
|
50
|
+
onOptionSelect?.(selectedOption, e);
|
|
50
51
|
});
|
|
51
52
|
};
|
|
52
53
|
React.useImperativeHandle(ref, () => ({
|
|
@@ -40,7 +40,7 @@ export type SimpleButtonDropdownProps = {
|
|
|
40
40
|
selectedKeys?: Array<string>,
|
|
41
41
|
|
|
42
42
|
// events
|
|
43
|
-
onOptionSelect?: (option: MenuOption) => mixed,
|
|
43
|
+
onOptionSelect?: (option: MenuOption, ?SyntheticEvent<HTMLElement>) => mixed,
|
|
44
44
|
onMenuOpen?: () => mixed,
|
|
45
45
|
onMenuClose?: () => mixed,
|
|
46
46
|
|
|
@@ -80,7 +80,8 @@ const SimpleButtonDropdownBase = (props: SimpleButtonDropdownProps, ref) => {
|
|
|
80
80
|
setBtnText(newBtnText);
|
|
81
81
|
}, [selectedKeys]);
|
|
82
82
|
|
|
83
|
-
const handleOptionChange = (selectedOption: MenuOption) => {
|
|
83
|
+
const handleOptionChange = (selectedOption: MenuOption, e) => {
|
|
84
|
+
e?.stopPropagation();
|
|
84
85
|
let newSelectedKeys = [];
|
|
85
86
|
|
|
86
87
|
if (optionsVariant === 'checkbox') {
|
|
@@ -101,7 +102,7 @@ const SimpleButtonDropdownBase = (props: SimpleButtonDropdownProps, ref) => {
|
|
|
101
102
|
setBtnText(newBtnText);
|
|
102
103
|
|
|
103
104
|
setTimeout(() => {
|
|
104
|
-
onOptionSelect?.(selectedOption);
|
|
105
|
+
onOptionSelect?.(selectedOption, e);
|
|
105
106
|
});
|
|
106
107
|
};
|
|
107
108
|
|
|
@@ -83,8 +83,8 @@ const Dropdown = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
83
83
|
width: _size.sizeFluid
|
|
84
84
|
}
|
|
85
85
|
}, /*#__PURE__*/React.createElement(_Menu.Menu, _extends({}, menu, {
|
|
86
|
-
onSelect: option => {
|
|
87
|
-
onChange && onChange(option);
|
|
86
|
+
onSelect: (option, e) => {
|
|
87
|
+
onChange && onChange(option, e);
|
|
88
88
|
if (!menu.optionsVariant || menu.optionsVariant === 'normal') {
|
|
89
89
|
clickAway();
|
|
90
90
|
}
|
|
@@ -29,7 +29,7 @@ type ClassNames = $ReadOnly<{wrapper?: string, box?: string}>;
|
|
|
29
29
|
export type DropdownProps = {
|
|
30
30
|
...InputProps,
|
|
31
31
|
classNames?: ClassNames,
|
|
32
|
-
onChange?: (option: MenuOption) => mixed,
|
|
32
|
+
onChange?: (option: MenuOption, ?SyntheticEvent<HTMLElement>) => mixed,
|
|
33
33
|
onMenuOpen?: () => mixed,
|
|
34
34
|
onMenuClose?: () => mixed,
|
|
35
35
|
dropdownInputText?: string,
|
|
@@ -105,8 +105,8 @@ export const Dropdown: React$AbstractComponent<
|
|
|
105
105
|
>
|
|
106
106
|
<Menu
|
|
107
107
|
{...menu}
|
|
108
|
-
onSelect={(option) => {
|
|
109
|
-
onChange && onChange(option);
|
|
108
|
+
onSelect={(option, e) => {
|
|
109
|
+
onChange && onChange(option, e);
|
|
110
110
|
if (
|
|
111
111
|
!menu.optionsVariant ||
|
|
112
112
|
menu.optionsVariant === 'normal'
|
|
@@ -33,7 +33,8 @@ const SimpleDropdownBase = (props, ref) => {
|
|
|
33
33
|
setDropdownSelectedKeys(selectedKeys);
|
|
34
34
|
setDropdownInputText(newDropdownText);
|
|
35
35
|
}, [selectedKeys]);
|
|
36
|
-
const handleOptionChange = selectedOption => {
|
|
36
|
+
const handleOptionChange = (selectedOption, e) => {
|
|
37
|
+
e?.stopPropagation();
|
|
37
38
|
let newSelectedKeys = [];
|
|
38
39
|
if (optionsVariant === 'checkbox') {
|
|
39
40
|
newSelectedKeys = (0, _menu.getSelectedKeysFromSelectedOption)(selectedOption, dropdownSelectedKeys);
|
|
@@ -44,7 +45,7 @@ const SimpleDropdownBase = (props, ref) => {
|
|
|
44
45
|
setDropdownSelectedKeys(newSelectedKeys);
|
|
45
46
|
setDropdownInputText(newDropdownText);
|
|
46
47
|
setTimeout(() => {
|
|
47
|
-
onChange?.(selectedOption);
|
|
48
|
+
onChange?.(selectedOption, e);
|
|
48
49
|
});
|
|
49
50
|
};
|
|
50
51
|
React.useImperativeHandle(ref, () => ({
|
|
@@ -35,7 +35,7 @@ export type SimpleDropdownProps = {
|
|
|
35
35
|
selectedKeys?: Array<string>,
|
|
36
36
|
|
|
37
37
|
// events
|
|
38
|
-
onChange?: (option: MenuOption) => mixed,
|
|
38
|
+
onChange?: (option: MenuOption, ?SyntheticEvent<HTMLElement>) => mixed,
|
|
39
39
|
onMenuOpen?: () => mixed,
|
|
40
40
|
onMenuClose?: () => mixed,
|
|
41
41
|
|
|
@@ -73,7 +73,8 @@ const SimpleDropdownBase = (props: SimpleDropdownProps, ref) => {
|
|
|
73
73
|
setDropdownInputText(newDropdownText);
|
|
74
74
|
}, [selectedKeys]);
|
|
75
75
|
|
|
76
|
-
const handleOptionChange = (selectedOption: MenuOption) => {
|
|
76
|
+
const handleOptionChange = (selectedOption: MenuOption, e) => {
|
|
77
|
+
e?.stopPropagation();
|
|
77
78
|
let newSelectedKeys = [];
|
|
78
79
|
|
|
79
80
|
if (optionsVariant === 'checkbox') {
|
|
@@ -94,7 +95,7 @@ const SimpleDropdownBase = (props: SimpleDropdownProps, ref) => {
|
|
|
94
95
|
setDropdownInputText(newDropdownText);
|
|
95
96
|
|
|
96
97
|
setTimeout(() => {
|
|
97
|
-
onChange?.(selectedOption);
|
|
98
|
+
onChange?.(selectedOption, e);
|
|
98
99
|
});
|
|
99
100
|
};
|
|
100
101
|
|
|
@@ -88,8 +88,8 @@ const InlineDropdown = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
88
88
|
left: x ?? _space.spaceNone
|
|
89
89
|
}
|
|
90
90
|
}, /*#__PURE__*/React.createElement(_Menu.Menu, _extends({}, menu, {
|
|
91
|
-
onSelect: option => {
|
|
92
|
-
onOptionSelect && onOptionSelect(option);
|
|
91
|
+
onSelect: (option, e) => {
|
|
92
|
+
onOptionSelect && onOptionSelect(option, e);
|
|
93
93
|
if (!menu.optionsVariant || menu.optionsVariant === 'normal') {
|
|
94
94
|
clickAway();
|
|
95
95
|
}
|
|
@@ -38,7 +38,7 @@ export type InlineDropdownProps = {
|
|
|
38
38
|
classNames?: ClassNames,
|
|
39
39
|
menu?: MenuProps,
|
|
40
40
|
anchorPosition?: AnchorType,
|
|
41
|
-
onOptionSelect?: (option: MenuOption) => mixed,
|
|
41
|
+
onOptionSelect?: (option: MenuOption, ?SyntheticEvent<HTMLElement>) => mixed,
|
|
42
42
|
onMenuOpen?: () => mixed,
|
|
43
43
|
onMenuClose?: () => mixed,
|
|
44
44
|
size?: 'medium' | 'small' | 'extraSmall',
|
|
@@ -129,8 +129,8 @@ export const InlineDropdown: React$AbstractComponent<
|
|
|
129
129
|
>
|
|
130
130
|
<Menu
|
|
131
131
|
{...menu}
|
|
132
|
-
onSelect={(option) => {
|
|
133
|
-
onOptionSelect && onOptionSelect(option);
|
|
132
|
+
onSelect={(option, e) => {
|
|
133
|
+
onOptionSelect && onOptionSelect(option, e);
|
|
134
134
|
if (
|
|
135
135
|
!menu.optionsVariant ||
|
|
136
136
|
menu.optionsVariant === 'normal'
|
|
@@ -35,7 +35,8 @@ const SimpleInlineDropdownBase = (props, ref) => {
|
|
|
35
35
|
setInlineDropdownSelectedKeys(selectedKeys);
|
|
36
36
|
setBtnText(newBtnText);
|
|
37
37
|
}, [selectedKeys]);
|
|
38
|
-
const handleOptionChange = selectedOption => {
|
|
38
|
+
const handleOptionChange = (selectedOption, e) => {
|
|
39
|
+
e?.stopPropagation();
|
|
39
40
|
let newSelectedKeys = [];
|
|
40
41
|
if (optionsVariant === 'checkbox') {
|
|
41
42
|
newSelectedKeys = (0, _menu.getSelectedKeysFromSelectedOption)(selectedOption, inlineDropdownSelectedKeys);
|
|
@@ -46,7 +47,7 @@ const SimpleInlineDropdownBase = (props, ref) => {
|
|
|
46
47
|
setInlineDropdownSelectedKeys(newSelectedKeys);
|
|
47
48
|
setBtnText(newBtnText);
|
|
48
49
|
setTimeout(() => {
|
|
49
|
-
onOptionSelect?.(selectedOption);
|
|
50
|
+
onOptionSelect?.(selectedOption, e);
|
|
50
51
|
});
|
|
51
52
|
};
|
|
52
53
|
React.useImperativeHandle(ref, () => ({
|
|
@@ -37,7 +37,7 @@ export type SimpleInlineDropdownProps = {
|
|
|
37
37
|
selectedKeys?: Array<string>,
|
|
38
38
|
|
|
39
39
|
// events
|
|
40
|
-
onOptionSelect?: (option: MenuOption) => mixed,
|
|
40
|
+
onOptionSelect?: (option: MenuOption, ?SyntheticEvent<HTMLElement>) => mixed,
|
|
41
41
|
onMenuOpen?: () => mixed,
|
|
42
42
|
onMenuClose?: () => mixed,
|
|
43
43
|
|
|
@@ -77,7 +77,8 @@ const SimpleInlineDropdownBase = (props: SimpleInlineDropdownProps, ref) => {
|
|
|
77
77
|
setBtnText(newBtnText);
|
|
78
78
|
}, [selectedKeys]);
|
|
79
79
|
|
|
80
|
-
const handleOptionChange = (selectedOption: MenuOption) => {
|
|
80
|
+
const handleOptionChange = (selectedOption: MenuOption, e) => {
|
|
81
|
+
e?.stopPropagation();
|
|
81
82
|
let newSelectedKeys = [];
|
|
82
83
|
|
|
83
84
|
if (optionsVariant === 'checkbox') {
|
|
@@ -98,7 +99,7 @@ const SimpleInlineDropdownBase = (props: SimpleInlineDropdownProps, ref) => {
|
|
|
98
99
|
setBtnText(newBtnText);
|
|
99
100
|
|
|
100
101
|
setTimeout(() => {
|
|
101
|
-
onOptionSelect?.(selectedOption);
|
|
102
|
+
onOptionSelect?.(selectedOption, e);
|
|
102
103
|
});
|
|
103
104
|
};
|
|
104
105
|
|
|
@@ -49,7 +49,7 @@ export type MenuOption = {
|
|
|
49
49
|
// Render first available option set
|
|
50
50
|
|
|
51
51
|
export type BaseMenuProps = {
|
|
52
|
-
onSelect?: (option: MenuOption) => mixed,
|
|
52
|
+
onSelect?: (option: MenuOption, ?SyntheticEvent<HTMLElement>) => mixed,
|
|
53
53
|
selectedOption?: ?MenuOption,
|
|
54
54
|
optionsVariant?: MenuOptionsVariant,
|
|
55
55
|
selectedKeys?: Array<string>,
|
|
@@ -80,7 +80,7 @@ const MenuOptionButton = props => {
|
|
|
80
80
|
[_MenuModule.default.withIconRight]: !!iconRight
|
|
81
81
|
}, classNames?.option, optionClassNames?.wrapper),
|
|
82
82
|
disabled: menuDisabled || disabled,
|
|
83
|
-
onClick:
|
|
83
|
+
onClick: e => onSelect && onSelect(option, e),
|
|
84
84
|
autoFocus: selectedOption?.key === key
|
|
85
85
|
}, isLastItem ? {
|
|
86
86
|
ref: lastMenuItemRef
|
|
@@ -98,7 +98,7 @@ export const MenuOptionButton = (props: MenuOptionProps): React.Node => {
|
|
|
98
98
|
optionClassNames?.wrapper,
|
|
99
99
|
)}
|
|
100
100
|
disabled={menuDisabled || disabled}
|
|
101
|
-
onClick={() => onSelect && onSelect(option)}
|
|
101
|
+
onClick={(e) => onSelect && onSelect(option, e)}
|
|
102
102
|
autoFocus={selectedOption?.key === key}
|
|
103
103
|
{...(isLastItem ? {ref: lastMenuItemRef} : {})}
|
|
104
104
|
>
|
|
@@ -33,7 +33,7 @@ export type OptionButtonProps = {
|
|
|
33
33
|
...ButtonProps,
|
|
34
34
|
menu?: MenuProps,
|
|
35
35
|
anchorPosition?: AnchorType,
|
|
36
|
-
onOptionSelect?: (option: MenuOption) => mixed,
|
|
36
|
+
onOptionSelect?: (option: MenuOption, ?SyntheticEvent<HTMLElement>) => mixed,
|
|
37
37
|
onButtonClick?: ?(SyntheticEvent<HTMLElement>) => mixed,
|
|
38
38
|
onMenuOpen?: () => mixed,
|
|
39
39
|
onMenuClose?: () => mixed,
|
|
@@ -34,7 +34,8 @@ const SimpleOptionButtonBase = (props, ref) => {
|
|
|
34
34
|
React.useEffect(() => {
|
|
35
35
|
setOptionButtonSelectedKeys(selectedKeys);
|
|
36
36
|
}, [selectedKeys]);
|
|
37
|
-
const handleOptionChange = selectedOption => {
|
|
37
|
+
const handleOptionChange = (selectedOption, e) => {
|
|
38
|
+
e?.stopPropagation();
|
|
38
39
|
let newSelectedKeys = [selectedOption.key];
|
|
39
40
|
if (optionsVariant === 'checkbox') {
|
|
40
41
|
newSelectedKeys = (0, _menu.getSelectedKeysFromSelectedOption)(selectedOption, optionButtonSelectedKeys);
|
|
@@ -43,7 +44,7 @@ const SimpleOptionButtonBase = (props, ref) => {
|
|
|
43
44
|
}
|
|
44
45
|
setOptionButtonSelectedKeys(newSelectedKeys);
|
|
45
46
|
setTimeout(() => {
|
|
46
|
-
onOptionSelect?.(selectedOption);
|
|
47
|
+
onOptionSelect?.(selectedOption, e);
|
|
47
48
|
});
|
|
48
49
|
};
|
|
49
50
|
React.useImperativeHandle(ref, () => ({
|
|
@@ -42,7 +42,7 @@ export type SimpleOptionButtonProps = {
|
|
|
42
42
|
selectedKeys?: Array<string>,
|
|
43
43
|
|
|
44
44
|
// events
|
|
45
|
-
onOptionSelect?: (option: MenuOption) => mixed,
|
|
45
|
+
onOptionSelect?: (option: MenuOption, ?SyntheticEvent<HTMLElement>) => mixed,
|
|
46
46
|
onButtonClick?: ?(SyntheticEvent<HTMLElement>) => mixed,
|
|
47
47
|
onMenuOpen?: () => mixed,
|
|
48
48
|
onMenuClose?: () => mixed,
|
|
@@ -81,7 +81,8 @@ const SimpleOptionButtonBase = (props: SimpleOptionButtonProps, ref) => {
|
|
|
81
81
|
setOptionButtonSelectedKeys(selectedKeys);
|
|
82
82
|
}, [selectedKeys]);
|
|
83
83
|
|
|
84
|
-
const handleOptionChange = (selectedOption: MenuOption) => {
|
|
84
|
+
const handleOptionChange = (selectedOption: MenuOption, e) => {
|
|
85
|
+
e?.stopPropagation();
|
|
85
86
|
let newSelectedKeys = [selectedOption.key];
|
|
86
87
|
|
|
87
88
|
if (optionsVariant === 'checkbox') {
|
|
@@ -96,7 +97,7 @@ const SimpleOptionButtonBase = (props: SimpleOptionButtonProps, ref) => {
|
|
|
96
97
|
setOptionButtonSelectedKeys(newSelectedKeys);
|
|
97
98
|
|
|
98
99
|
setTimeout(() => {
|
|
99
|
-
onOptionSelect?.(selectedOption);
|
|
100
|
+
onOptionSelect?.(selectedOption, e);
|
|
100
101
|
});
|
|
101
102
|
};
|
|
102
103
|
|
|
@@ -69,8 +69,8 @@ const TabDropdown = _ref => {
|
|
|
69
69
|
left: x ?? _space.spaceNone
|
|
70
70
|
}
|
|
71
71
|
}, /*#__PURE__*/React.createElement(_Menu.Menu, _extends({}, props.menu, {
|
|
72
|
-
onSelect: option => {
|
|
73
|
-
onOptionSelect && onOptionSelect(option);
|
|
72
|
+
onSelect: (option, e) => {
|
|
73
|
+
onOptionSelect && onOptionSelect(option, e);
|
|
74
74
|
clickAway();
|
|
75
75
|
},
|
|
76
76
|
size: props.menu.size || size,
|
|
@@ -35,7 +35,7 @@ export type TabDropdownProps = {
|
|
|
35
35
|
tab: TabProps,
|
|
36
36
|
menu: MenuProps,
|
|
37
37
|
},
|
|
38
|
-
onOptionSelect?: (option: MenuOption) => mixed,
|
|
38
|
+
onOptionSelect?: (option: MenuOption, ?SyntheticEvent<HTMLElement>) => mixed,
|
|
39
39
|
classNames?: ClassNames,
|
|
40
40
|
selected?: boolean,
|
|
41
41
|
disabled?: boolean,
|
|
@@ -91,8 +91,8 @@ export const TabDropdown = ({
|
|
|
91
91
|
>
|
|
92
92
|
<Menu
|
|
93
93
|
{...props.menu}
|
|
94
|
-
onSelect={(option) => {
|
|
95
|
-
onOptionSelect && onOptionSelect(option);
|
|
94
|
+
onSelect={(option, e) => {
|
|
95
|
+
onOptionSelect && onOptionSelect(option, e);
|
|
96
96
|
clickAway();
|
|
97
97
|
}}
|
|
98
98
|
size={props.menu.size || size}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.TitleMedium = exports.SubTitleSmall = exports.SubTitleMedium = exports.SubTitleLarge = exports.SubTitleExtraSmall = exports.JumboSmall = exports.JumboMedium = exports.FormLabelSmall = exports.FormLabelMedium = exports.FormInputSmall = exports.FormInputMedium = exports.ButtonTextSmall = exports.ButtonTextMedium = exports.ButtonTextExtraSmall = exports.BodySmall = exports.BodyMedium = exports.BodyLarge = void 0;
|
|
6
|
+
exports.TitleMedium = exports.SubTitleSmall = exports.SubTitleMedium = exports.SubTitleLarge = exports.SubTitleExtraSmall = exports.JumboSmall = exports.JumboMedium = exports.FormLabelSmall = exports.FormLabelMedium = exports.FormInputSmall = exports.FormInputMedium = exports.ButtonTextSmallUnderline = exports.ButtonTextSmall = exports.ButtonTextMediumUnderline = exports.ButtonTextMedium = exports.ButtonTextExtraSmallUnderline = exports.ButtonTextExtraSmall = exports.BodySmallBold = exports.BodySmall = exports.BodyMediumBold = exports.BodyMedium = exports.BodyLargeBold = exports.BodyLarge = void 0;
|
|
7
7
|
var React = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _typography = require("../../types/typography");
|
|
9
9
|
var _classify = _interopRequireDefault(require("../../utils/classify"));
|
|
@@ -269,7 +269,7 @@ const ButtonTextExtraSmall = /*#__PURE__*/React.forwardRef((_ref11, ref) => {
|
|
|
269
269
|
}) : children);
|
|
270
270
|
});
|
|
271
271
|
exports.ButtonTextExtraSmall = ButtonTextExtraSmall;
|
|
272
|
-
const
|
|
272
|
+
const ButtonTextMediumUnderline = /*#__PURE__*/React.forwardRef((_ref12, ref) => {
|
|
273
273
|
let {
|
|
274
274
|
color = _typography.TEXT_COLORS.primary,
|
|
275
275
|
children,
|
|
@@ -280,6 +280,75 @@ const FormInputMedium = /*#__PURE__*/React.forwardRef((_ref12, ref) => {
|
|
|
280
280
|
highlightWithBackground,
|
|
281
281
|
...props
|
|
282
282
|
} = _ref12;
|
|
283
|
+
return /*#__PURE__*/React.createElement("span", _extends({}, props, {
|
|
284
|
+
className: (0, _classify.default)(_typographyModule.default.buttonTextMedium, _typographyModule.default.underline, _typographyModule.default[color], className),
|
|
285
|
+
ref: ref
|
|
286
|
+
}), !!highlightString?.length && typeof children === 'string' ? /*#__PURE__*/React.createElement(HighlightText, {
|
|
287
|
+
text: children,
|
|
288
|
+
highlight: highlightString,
|
|
289
|
+
caseSensitiveHighlighting: caseSensitiveHighlighting,
|
|
290
|
+
highlightClassName: highlightedTextClassName,
|
|
291
|
+
highlightWithBackground: highlightWithBackground
|
|
292
|
+
}) : children);
|
|
293
|
+
});
|
|
294
|
+
exports.ButtonTextMediumUnderline = ButtonTextMediumUnderline;
|
|
295
|
+
const ButtonTextSmallUnderline = /*#__PURE__*/React.forwardRef((_ref13, ref) => {
|
|
296
|
+
let {
|
|
297
|
+
color = _typography.TEXT_COLORS.primary,
|
|
298
|
+
children,
|
|
299
|
+
className,
|
|
300
|
+
highlightedTextClassName,
|
|
301
|
+
highlightString,
|
|
302
|
+
caseSensitiveHighlighting,
|
|
303
|
+
highlightWithBackground,
|
|
304
|
+
...props
|
|
305
|
+
} = _ref13;
|
|
306
|
+
return /*#__PURE__*/React.createElement("span", _extends({}, props, {
|
|
307
|
+
className: (0, _classify.default)(_typographyModule.default.buttonTextSmall, _typographyModule.default.underline, _typographyModule.default[color], className),
|
|
308
|
+
ref: ref
|
|
309
|
+
}), !!highlightString?.length && typeof children === 'string' ? /*#__PURE__*/React.createElement(HighlightText, {
|
|
310
|
+
text: children,
|
|
311
|
+
highlight: highlightString,
|
|
312
|
+
caseSensitiveHighlighting: caseSensitiveHighlighting,
|
|
313
|
+
highlightClassName: highlightedTextClassName,
|
|
314
|
+
highlightWithBackground: highlightWithBackground
|
|
315
|
+
}) : children);
|
|
316
|
+
});
|
|
317
|
+
exports.ButtonTextSmallUnderline = ButtonTextSmallUnderline;
|
|
318
|
+
const ButtonTextExtraSmallUnderline = /*#__PURE__*/React.forwardRef((_ref14, ref) => {
|
|
319
|
+
let {
|
|
320
|
+
color = _typography.TEXT_COLORS.primary,
|
|
321
|
+
children,
|
|
322
|
+
className,
|
|
323
|
+
highlightedTextClassName,
|
|
324
|
+
highlightString,
|
|
325
|
+
caseSensitiveHighlighting,
|
|
326
|
+
highlightWithBackground,
|
|
327
|
+
...props
|
|
328
|
+
} = _ref14;
|
|
329
|
+
return /*#__PURE__*/React.createElement("span", _extends({}, props, {
|
|
330
|
+
className: (0, _classify.default)(_typographyModule.default.buttonTextExtraSmall, _typographyModule.default.underline, _typographyModule.default[color], className),
|
|
331
|
+
ref: ref
|
|
332
|
+
}), !!highlightString?.length && typeof children === 'string' ? /*#__PURE__*/React.createElement(HighlightText, {
|
|
333
|
+
text: children,
|
|
334
|
+
highlight: highlightString,
|
|
335
|
+
caseSensitiveHighlighting: caseSensitiveHighlighting,
|
|
336
|
+
highlightClassName: highlightedTextClassName,
|
|
337
|
+
highlightWithBackground: highlightWithBackground
|
|
338
|
+
}) : children);
|
|
339
|
+
});
|
|
340
|
+
exports.ButtonTextExtraSmallUnderline = ButtonTextExtraSmallUnderline;
|
|
341
|
+
const FormInputMedium = /*#__PURE__*/React.forwardRef((_ref15, ref) => {
|
|
342
|
+
let {
|
|
343
|
+
color = _typography.TEXT_COLORS.primary,
|
|
344
|
+
children,
|
|
345
|
+
className,
|
|
346
|
+
highlightedTextClassName,
|
|
347
|
+
highlightString,
|
|
348
|
+
caseSensitiveHighlighting,
|
|
349
|
+
highlightWithBackground,
|
|
350
|
+
...props
|
|
351
|
+
} = _ref15;
|
|
283
352
|
return /*#__PURE__*/React.createElement("p", _extends({}, props, {
|
|
284
353
|
className: (0, _classify.default)(_typographyModule.default.formInputMedium, _typographyModule.default[color], className),
|
|
285
354
|
ref: ref
|
|
@@ -292,7 +361,7 @@ const FormInputMedium = /*#__PURE__*/React.forwardRef((_ref12, ref) => {
|
|
|
292
361
|
}) : children);
|
|
293
362
|
});
|
|
294
363
|
exports.FormInputMedium = FormInputMedium;
|
|
295
|
-
const FormInputSmall = /*#__PURE__*/React.forwardRef((
|
|
364
|
+
const FormInputSmall = /*#__PURE__*/React.forwardRef((_ref16, ref) => {
|
|
296
365
|
let {
|
|
297
366
|
color = _typography.TEXT_COLORS.primary,
|
|
298
367
|
children,
|
|
@@ -302,7 +371,7 @@ const FormInputSmall = /*#__PURE__*/React.forwardRef((_ref13, ref) => {
|
|
|
302
371
|
caseSensitiveHighlighting,
|
|
303
372
|
highlightWithBackground,
|
|
304
373
|
...props
|
|
305
|
-
} =
|
|
374
|
+
} = _ref16;
|
|
306
375
|
return /*#__PURE__*/React.createElement("p", _extends({}, props, {
|
|
307
376
|
className: (0, _classify.default)(_typographyModule.default.formInputSmall, _typographyModule.default[color], className),
|
|
308
377
|
ref: ref
|
|
@@ -315,7 +384,7 @@ const FormInputSmall = /*#__PURE__*/React.forwardRef((_ref13, ref) => {
|
|
|
315
384
|
}) : children);
|
|
316
385
|
});
|
|
317
386
|
exports.FormInputSmall = FormInputSmall;
|
|
318
|
-
const BodyLarge = /*#__PURE__*/React.forwardRef((
|
|
387
|
+
const BodyLarge = /*#__PURE__*/React.forwardRef((_ref17, ref) => {
|
|
319
388
|
let {
|
|
320
389
|
color = _typography.TEXT_COLORS.primary,
|
|
321
390
|
children,
|
|
@@ -325,7 +394,7 @@ const BodyLarge = /*#__PURE__*/React.forwardRef((_ref14, ref) => {
|
|
|
325
394
|
caseSensitiveHighlighting,
|
|
326
395
|
highlightWithBackground,
|
|
327
396
|
...props
|
|
328
|
-
} =
|
|
397
|
+
} = _ref17;
|
|
329
398
|
return /*#__PURE__*/React.createElement("p", _extends({}, props, {
|
|
330
399
|
className: (0, _classify.default)(_typographyModule.default.bodyLarge, _typographyModule.default[color], className),
|
|
331
400
|
ref: ref
|
|
@@ -338,7 +407,7 @@ const BodyLarge = /*#__PURE__*/React.forwardRef((_ref14, ref) => {
|
|
|
338
407
|
}) : children);
|
|
339
408
|
});
|
|
340
409
|
exports.BodyLarge = BodyLarge;
|
|
341
|
-
const BodyMedium = /*#__PURE__*/React.forwardRef((
|
|
410
|
+
const BodyMedium = /*#__PURE__*/React.forwardRef((_ref18, ref) => {
|
|
342
411
|
let {
|
|
343
412
|
color = _typography.TEXT_COLORS.primary,
|
|
344
413
|
children,
|
|
@@ -348,7 +417,7 @@ const BodyMedium = /*#__PURE__*/React.forwardRef((_ref15, ref) => {
|
|
|
348
417
|
caseSensitiveHighlighting,
|
|
349
418
|
highlightWithBackground,
|
|
350
419
|
...props
|
|
351
|
-
} =
|
|
420
|
+
} = _ref18;
|
|
352
421
|
return /*#__PURE__*/React.createElement("p", _extends({}, props, {
|
|
353
422
|
className: (0, _classify.default)(_typographyModule.default.bodyMedium, _typographyModule.default[color], className),
|
|
354
423
|
ref: ref
|
|
@@ -361,7 +430,7 @@ const BodyMedium = /*#__PURE__*/React.forwardRef((_ref15, ref) => {
|
|
|
361
430
|
}) : children);
|
|
362
431
|
});
|
|
363
432
|
exports.BodyMedium = BodyMedium;
|
|
364
|
-
const BodySmall = /*#__PURE__*/React.forwardRef((
|
|
433
|
+
const BodySmall = /*#__PURE__*/React.forwardRef((_ref19, ref) => {
|
|
365
434
|
let {
|
|
366
435
|
color = _typography.TEXT_COLORS.primary,
|
|
367
436
|
children,
|
|
@@ -371,7 +440,7 @@ const BodySmall = /*#__PURE__*/React.forwardRef((_ref16, ref) => {
|
|
|
371
440
|
caseSensitiveHighlighting,
|
|
372
441
|
highlightWithBackground,
|
|
373
442
|
...props
|
|
374
|
-
} =
|
|
443
|
+
} = _ref19;
|
|
375
444
|
return /*#__PURE__*/React.createElement("p", _extends({}, props, {
|
|
376
445
|
className: (0, _classify.default)(_typographyModule.default.bodySmall, _typographyModule.default[color], className),
|
|
377
446
|
ref: ref
|
|
@@ -384,7 +453,7 @@ const BodySmall = /*#__PURE__*/React.forwardRef((_ref16, ref) => {
|
|
|
384
453
|
}) : children);
|
|
385
454
|
});
|
|
386
455
|
exports.BodySmall = BodySmall;
|
|
387
|
-
const
|
|
456
|
+
const BodyLargeBold = /*#__PURE__*/React.forwardRef((_ref20, ref) => {
|
|
388
457
|
let {
|
|
389
458
|
color = _typography.TEXT_COLORS.primary,
|
|
390
459
|
children,
|
|
@@ -394,7 +463,76 @@ const FormLabelMedium = /*#__PURE__*/React.forwardRef((_ref17, ref) => {
|
|
|
394
463
|
caseSensitiveHighlighting,
|
|
395
464
|
highlightWithBackground,
|
|
396
465
|
...props
|
|
397
|
-
} =
|
|
466
|
+
} = _ref20;
|
|
467
|
+
return /*#__PURE__*/React.createElement("p", _extends({}, props, {
|
|
468
|
+
className: (0, _classify.default)(_typographyModule.default.bodyLarge, _typographyModule.default.bold, _typographyModule.default[color], className),
|
|
469
|
+
ref: ref
|
|
470
|
+
}), !!highlightString?.length && typeof children === 'string' ? /*#__PURE__*/React.createElement(HighlightText, {
|
|
471
|
+
text: children,
|
|
472
|
+
highlight: highlightString,
|
|
473
|
+
caseSensitiveHighlighting: caseSensitiveHighlighting,
|
|
474
|
+
highlightClassName: highlightedTextClassName,
|
|
475
|
+
highlightWithBackground: highlightWithBackground
|
|
476
|
+
}) : children);
|
|
477
|
+
});
|
|
478
|
+
exports.BodyLargeBold = BodyLargeBold;
|
|
479
|
+
const BodyMediumBold = /*#__PURE__*/React.forwardRef((_ref21, ref) => {
|
|
480
|
+
let {
|
|
481
|
+
color = _typography.TEXT_COLORS.primary,
|
|
482
|
+
children,
|
|
483
|
+
className,
|
|
484
|
+
highlightedTextClassName,
|
|
485
|
+
highlightString,
|
|
486
|
+
caseSensitiveHighlighting,
|
|
487
|
+
highlightWithBackground,
|
|
488
|
+
...props
|
|
489
|
+
} = _ref21;
|
|
490
|
+
return /*#__PURE__*/React.createElement("p", _extends({}, props, {
|
|
491
|
+
className: (0, _classify.default)(_typographyModule.default.bodyMedium, _typographyModule.default.bold, _typographyModule.default[color], className),
|
|
492
|
+
ref: ref
|
|
493
|
+
}), !!highlightString?.length && typeof children === 'string' ? /*#__PURE__*/React.createElement(HighlightText, {
|
|
494
|
+
text: children,
|
|
495
|
+
highlight: highlightString,
|
|
496
|
+
caseSensitiveHighlighting: caseSensitiveHighlighting,
|
|
497
|
+
highlightClassName: highlightedTextClassName,
|
|
498
|
+
highlightWithBackground: highlightWithBackground
|
|
499
|
+
}) : children);
|
|
500
|
+
});
|
|
501
|
+
exports.BodyMediumBold = BodyMediumBold;
|
|
502
|
+
const BodySmallBold = /*#__PURE__*/React.forwardRef((_ref22, ref) => {
|
|
503
|
+
let {
|
|
504
|
+
color = _typography.TEXT_COLORS.primary,
|
|
505
|
+
children,
|
|
506
|
+
className,
|
|
507
|
+
highlightedTextClassName,
|
|
508
|
+
highlightString,
|
|
509
|
+
caseSensitiveHighlighting,
|
|
510
|
+
highlightWithBackground,
|
|
511
|
+
...props
|
|
512
|
+
} = _ref22;
|
|
513
|
+
return /*#__PURE__*/React.createElement("p", _extends({}, props, {
|
|
514
|
+
className: (0, _classify.default)(_typographyModule.default.bodySmall, _typographyModule.default.bold, _typographyModule.default[color], className),
|
|
515
|
+
ref: ref
|
|
516
|
+
}), !!highlightString?.length && typeof children === 'string' ? /*#__PURE__*/React.createElement(HighlightText, {
|
|
517
|
+
text: children,
|
|
518
|
+
highlight: highlightString,
|
|
519
|
+
caseSensitiveHighlighting: caseSensitiveHighlighting,
|
|
520
|
+
highlightClassName: highlightedTextClassName,
|
|
521
|
+
highlightWithBackground: highlightWithBackground
|
|
522
|
+
}) : children);
|
|
523
|
+
});
|
|
524
|
+
exports.BodySmallBold = BodySmallBold;
|
|
525
|
+
const FormLabelMedium = /*#__PURE__*/React.forwardRef((_ref23, ref) => {
|
|
526
|
+
let {
|
|
527
|
+
color = _typography.TEXT_COLORS.primary,
|
|
528
|
+
children,
|
|
529
|
+
className,
|
|
530
|
+
highlightedTextClassName,
|
|
531
|
+
highlightString,
|
|
532
|
+
caseSensitiveHighlighting,
|
|
533
|
+
highlightWithBackground,
|
|
534
|
+
...props
|
|
535
|
+
} = _ref23;
|
|
398
536
|
return /*#__PURE__*/React.createElement("span", _extends({}, props, {
|
|
399
537
|
className: (0, _classify.default)(_typographyModule.default.formLabelMedium, _typographyModule.default[color], className),
|
|
400
538
|
ref: ref
|
|
@@ -407,7 +545,7 @@ const FormLabelMedium = /*#__PURE__*/React.forwardRef((_ref17, ref) => {
|
|
|
407
545
|
}) : children);
|
|
408
546
|
});
|
|
409
547
|
exports.FormLabelMedium = FormLabelMedium;
|
|
410
|
-
const FormLabelSmall = /*#__PURE__*/React.forwardRef((
|
|
548
|
+
const FormLabelSmall = /*#__PURE__*/React.forwardRef((_ref24, ref) => {
|
|
411
549
|
let {
|
|
412
550
|
color = _typography.TEXT_COLORS.primary,
|
|
413
551
|
children,
|
|
@@ -417,7 +555,7 @@ const FormLabelSmall = /*#__PURE__*/React.forwardRef((_ref18, ref) => {
|
|
|
417
555
|
caseSensitiveHighlighting,
|
|
418
556
|
highlightWithBackground,
|
|
419
557
|
...props
|
|
420
|
-
} =
|
|
558
|
+
} = _ref24;
|
|
421
559
|
return /*#__PURE__*/React.createElement("span", _extends({}, props, {
|
|
422
560
|
className: (0, _classify.default)(_typographyModule.default.formLabelSmall, _typographyModule.default[color], className),
|
|
423
561
|
ref: ref
|
|
@@ -454,6 +454,132 @@ export const ButtonTextExtraSmall: React$AbstractComponent<
|
|
|
454
454
|
),
|
|
455
455
|
);
|
|
456
456
|
|
|
457
|
+
export const ButtonTextMediumUnderline: React$AbstractComponent<
|
|
458
|
+
TextProps,
|
|
459
|
+
HTMLSpanElement,
|
|
460
|
+
> = React.forwardRef<TextProps, HTMLSpanElement>(
|
|
461
|
+
(
|
|
462
|
+
{
|
|
463
|
+
color = TEXT_COLORS.primary,
|
|
464
|
+
children,
|
|
465
|
+
className,
|
|
466
|
+
highlightedTextClassName,
|
|
467
|
+
highlightString,
|
|
468
|
+
caseSensitiveHighlighting,
|
|
469
|
+
highlightWithBackground,
|
|
470
|
+
...props
|
|
471
|
+
}: TextProps,
|
|
472
|
+
ref,
|
|
473
|
+
): React.Node => (
|
|
474
|
+
<span
|
|
475
|
+
{...props}
|
|
476
|
+
className={classify(
|
|
477
|
+
css.buttonTextMedium,
|
|
478
|
+
css.underline,
|
|
479
|
+
css[color],
|
|
480
|
+
className,
|
|
481
|
+
)}
|
|
482
|
+
ref={ref}
|
|
483
|
+
>
|
|
484
|
+
{!!highlightString?.length && typeof children === 'string' ? (
|
|
485
|
+
<HighlightText
|
|
486
|
+
text={children}
|
|
487
|
+
highlight={highlightString}
|
|
488
|
+
caseSensitiveHighlighting={caseSensitiveHighlighting}
|
|
489
|
+
highlightClassName={highlightedTextClassName}
|
|
490
|
+
highlightWithBackground={highlightWithBackground}
|
|
491
|
+
/>
|
|
492
|
+
) : (
|
|
493
|
+
children
|
|
494
|
+
)}
|
|
495
|
+
</span>
|
|
496
|
+
),
|
|
497
|
+
);
|
|
498
|
+
|
|
499
|
+
export const ButtonTextSmallUnderline: React$AbstractComponent<
|
|
500
|
+
TextProps,
|
|
501
|
+
HTMLSpanElement,
|
|
502
|
+
> = React.forwardRef<TextProps, HTMLSpanElement>(
|
|
503
|
+
(
|
|
504
|
+
{
|
|
505
|
+
color = TEXT_COLORS.primary,
|
|
506
|
+
children,
|
|
507
|
+
className,
|
|
508
|
+
highlightedTextClassName,
|
|
509
|
+
highlightString,
|
|
510
|
+
caseSensitiveHighlighting,
|
|
511
|
+
highlightWithBackground,
|
|
512
|
+
...props
|
|
513
|
+
}: TextProps,
|
|
514
|
+
ref,
|
|
515
|
+
): React.Node => (
|
|
516
|
+
<span
|
|
517
|
+
{...props}
|
|
518
|
+
className={classify(
|
|
519
|
+
css.buttonTextSmall,
|
|
520
|
+
css.underline,
|
|
521
|
+
css[color],
|
|
522
|
+
className,
|
|
523
|
+
)}
|
|
524
|
+
ref={ref}
|
|
525
|
+
>
|
|
526
|
+
{!!highlightString?.length && typeof children === 'string' ? (
|
|
527
|
+
<HighlightText
|
|
528
|
+
text={children}
|
|
529
|
+
highlight={highlightString}
|
|
530
|
+
caseSensitiveHighlighting={caseSensitiveHighlighting}
|
|
531
|
+
highlightClassName={highlightedTextClassName}
|
|
532
|
+
highlightWithBackground={highlightWithBackground}
|
|
533
|
+
/>
|
|
534
|
+
) : (
|
|
535
|
+
children
|
|
536
|
+
)}
|
|
537
|
+
</span>
|
|
538
|
+
),
|
|
539
|
+
);
|
|
540
|
+
|
|
541
|
+
export const ButtonTextExtraSmallUnderline: React$AbstractComponent<
|
|
542
|
+
TextProps,
|
|
543
|
+
HTMLSpanElement,
|
|
544
|
+
> = React.forwardRef<TextProps, HTMLSpanElement>(
|
|
545
|
+
(
|
|
546
|
+
{
|
|
547
|
+
color = TEXT_COLORS.primary,
|
|
548
|
+
children,
|
|
549
|
+
className,
|
|
550
|
+
highlightedTextClassName,
|
|
551
|
+
highlightString,
|
|
552
|
+
caseSensitiveHighlighting,
|
|
553
|
+
highlightWithBackground,
|
|
554
|
+
...props
|
|
555
|
+
}: TextProps,
|
|
556
|
+
ref,
|
|
557
|
+
): React.Node => (
|
|
558
|
+
<span
|
|
559
|
+
{...props}
|
|
560
|
+
className={classify(
|
|
561
|
+
css.buttonTextExtraSmall,
|
|
562
|
+
css.underline,
|
|
563
|
+
css[color],
|
|
564
|
+
className,
|
|
565
|
+
)}
|
|
566
|
+
ref={ref}
|
|
567
|
+
>
|
|
568
|
+
{!!highlightString?.length && typeof children === 'string' ? (
|
|
569
|
+
<HighlightText
|
|
570
|
+
text={children}
|
|
571
|
+
highlight={highlightString}
|
|
572
|
+
caseSensitiveHighlighting={caseSensitiveHighlighting}
|
|
573
|
+
highlightClassName={highlightedTextClassName}
|
|
574
|
+
highlightWithBackground={highlightWithBackground}
|
|
575
|
+
/>
|
|
576
|
+
) : (
|
|
577
|
+
children
|
|
578
|
+
)}
|
|
579
|
+
</span>
|
|
580
|
+
),
|
|
581
|
+
);
|
|
582
|
+
|
|
457
583
|
export const FormInputMedium: React$AbstractComponent<
|
|
458
584
|
TextProps,
|
|
459
585
|
HTMLParagraphElement,
|
|
@@ -639,6 +765,117 @@ export const BodySmall: React$AbstractComponent<
|
|
|
639
765
|
),
|
|
640
766
|
);
|
|
641
767
|
|
|
768
|
+
export const BodyLargeBold: React$AbstractComponent<
|
|
769
|
+
TextProps,
|
|
770
|
+
HTMLParagraphElement,
|
|
771
|
+
> = React.forwardRef<TextProps, HTMLParagraphElement>(
|
|
772
|
+
(
|
|
773
|
+
{
|
|
774
|
+
color = TEXT_COLORS.primary,
|
|
775
|
+
children,
|
|
776
|
+
className,
|
|
777
|
+
highlightedTextClassName,
|
|
778
|
+
highlightString,
|
|
779
|
+
caseSensitiveHighlighting,
|
|
780
|
+
highlightWithBackground,
|
|
781
|
+
...props
|
|
782
|
+
}: TextProps,
|
|
783
|
+
ref,
|
|
784
|
+
): React.Node => (
|
|
785
|
+
<p
|
|
786
|
+
{...props}
|
|
787
|
+
className={classify(css.bodyLarge, css.bold, css[color], className)}
|
|
788
|
+
ref={ref}
|
|
789
|
+
>
|
|
790
|
+
{!!highlightString?.length && typeof children === 'string' ? (
|
|
791
|
+
<HighlightText
|
|
792
|
+
text={children}
|
|
793
|
+
highlight={highlightString}
|
|
794
|
+
caseSensitiveHighlighting={caseSensitiveHighlighting}
|
|
795
|
+
highlightClassName={highlightedTextClassName}
|
|
796
|
+
highlightWithBackground={highlightWithBackground}
|
|
797
|
+
/>
|
|
798
|
+
) : (
|
|
799
|
+
children
|
|
800
|
+
)}
|
|
801
|
+
</p>
|
|
802
|
+
),
|
|
803
|
+
);
|
|
804
|
+
|
|
805
|
+
export const BodyMediumBold: React$AbstractComponent<
|
|
806
|
+
TextProps,
|
|
807
|
+
HTMLParagraphElement,
|
|
808
|
+
> = React.forwardRef<TextProps, HTMLParagraphElement>(
|
|
809
|
+
(
|
|
810
|
+
{
|
|
811
|
+
color = TEXT_COLORS.primary,
|
|
812
|
+
children,
|
|
813
|
+
className,
|
|
814
|
+
highlightedTextClassName,
|
|
815
|
+
highlightString,
|
|
816
|
+
caseSensitiveHighlighting,
|
|
817
|
+
highlightWithBackground,
|
|
818
|
+
...props
|
|
819
|
+
}: TextProps,
|
|
820
|
+
ref,
|
|
821
|
+
): React.Node => (
|
|
822
|
+
<p
|
|
823
|
+
{...props}
|
|
824
|
+
className={classify(css.bodyMedium, css.bold, css[color], className)}
|
|
825
|
+
ref={ref}
|
|
826
|
+
>
|
|
827
|
+
{!!highlightString?.length && typeof children === 'string' ? (
|
|
828
|
+
<HighlightText
|
|
829
|
+
text={children}
|
|
830
|
+
highlight={highlightString}
|
|
831
|
+
caseSensitiveHighlighting={caseSensitiveHighlighting}
|
|
832
|
+
highlightClassName={highlightedTextClassName}
|
|
833
|
+
highlightWithBackground={highlightWithBackground}
|
|
834
|
+
/>
|
|
835
|
+
) : (
|
|
836
|
+
children
|
|
837
|
+
)}
|
|
838
|
+
</p>
|
|
839
|
+
),
|
|
840
|
+
);
|
|
841
|
+
|
|
842
|
+
export const BodySmallBold: React$AbstractComponent<
|
|
843
|
+
TextProps,
|
|
844
|
+
HTMLParagraphElement,
|
|
845
|
+
> = React.forwardRef<TextProps, HTMLParagraphElement>(
|
|
846
|
+
(
|
|
847
|
+
{
|
|
848
|
+
color = TEXT_COLORS.primary,
|
|
849
|
+
children,
|
|
850
|
+
className,
|
|
851
|
+
highlightedTextClassName,
|
|
852
|
+
highlightString,
|
|
853
|
+
caseSensitiveHighlighting,
|
|
854
|
+
highlightWithBackground,
|
|
855
|
+
...props
|
|
856
|
+
}: TextProps,
|
|
857
|
+
ref,
|
|
858
|
+
): React.Node => (
|
|
859
|
+
<p
|
|
860
|
+
{...props}
|
|
861
|
+
className={classify(css.bodySmall, css.bold, css[color], className)}
|
|
862
|
+
ref={ref}
|
|
863
|
+
>
|
|
864
|
+
{!!highlightString?.length && typeof children === 'string' ? (
|
|
865
|
+
<HighlightText
|
|
866
|
+
text={children}
|
|
867
|
+
highlight={highlightString}
|
|
868
|
+
caseSensitiveHighlighting={caseSensitiveHighlighting}
|
|
869
|
+
highlightClassName={highlightedTextClassName}
|
|
870
|
+
highlightWithBackground={highlightWithBackground}
|
|
871
|
+
/>
|
|
872
|
+
) : (
|
|
873
|
+
children
|
|
874
|
+
)}
|
|
875
|
+
</p>
|
|
876
|
+
),
|
|
877
|
+
);
|
|
878
|
+
|
|
642
879
|
export const FormLabelMedium: React$AbstractComponent<
|
|
643
880
|
TextProps,
|
|
644
881
|
HTMLSpanElement,
|
|
@@ -9,36 +9,72 @@ Object.defineProperty(exports, "BodyLarge", {
|
|
|
9
9
|
return _Text.BodyLarge;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
+
Object.defineProperty(exports, "BodyLargeBold", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _Text.BodyLargeBold;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
12
18
|
Object.defineProperty(exports, "BodyMedium", {
|
|
13
19
|
enumerable: true,
|
|
14
20
|
get: function () {
|
|
15
21
|
return _Text.BodyMedium;
|
|
16
22
|
}
|
|
17
23
|
});
|
|
24
|
+
Object.defineProperty(exports, "BodyMediumBold", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () {
|
|
27
|
+
return _Text.BodyMediumBold;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
18
30
|
Object.defineProperty(exports, "BodySmall", {
|
|
19
31
|
enumerable: true,
|
|
20
32
|
get: function () {
|
|
21
33
|
return _Text.BodySmall;
|
|
22
34
|
}
|
|
23
35
|
});
|
|
36
|
+
Object.defineProperty(exports, "BodySmallBold", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function () {
|
|
39
|
+
return _Text.BodySmallBold;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
24
42
|
Object.defineProperty(exports, "ButtonTextExtraSmall", {
|
|
25
43
|
enumerable: true,
|
|
26
44
|
get: function () {
|
|
27
45
|
return _Text.ButtonTextExtraSmall;
|
|
28
46
|
}
|
|
29
47
|
});
|
|
48
|
+
Object.defineProperty(exports, "ButtonTextExtraSmallUnderline", {
|
|
49
|
+
enumerable: true,
|
|
50
|
+
get: function () {
|
|
51
|
+
return _Text.ButtonTextExtraSmallUnderline;
|
|
52
|
+
}
|
|
53
|
+
});
|
|
30
54
|
Object.defineProperty(exports, "ButtonTextMedium", {
|
|
31
55
|
enumerable: true,
|
|
32
56
|
get: function () {
|
|
33
57
|
return _Text.ButtonTextMedium;
|
|
34
58
|
}
|
|
35
59
|
});
|
|
60
|
+
Object.defineProperty(exports, "ButtonTextMediumUnderline", {
|
|
61
|
+
enumerable: true,
|
|
62
|
+
get: function () {
|
|
63
|
+
return _Text.ButtonTextMediumUnderline;
|
|
64
|
+
}
|
|
65
|
+
});
|
|
36
66
|
Object.defineProperty(exports, "ButtonTextSmall", {
|
|
37
67
|
enumerable: true,
|
|
38
68
|
get: function () {
|
|
39
69
|
return _Text.ButtonTextSmall;
|
|
40
70
|
}
|
|
41
71
|
});
|
|
72
|
+
Object.defineProperty(exports, "ButtonTextSmallUnderline", {
|
|
73
|
+
enumerable: true,
|
|
74
|
+
get: function () {
|
|
75
|
+
return _Text.ButtonTextSmallUnderline;
|
|
76
|
+
}
|
|
77
|
+
});
|
|
42
78
|
Object.defineProperty(exports, "FormInputMedium", {
|
|
43
79
|
enumerable: true,
|
|
44
80
|
get: function () {
|
|
@@ -4,11 +4,17 @@ export {TEXT_COLORS} from '../../types/typography';
|
|
|
4
4
|
export type {TextProps} from './Text';
|
|
5
5
|
export {
|
|
6
6
|
BodyLarge,
|
|
7
|
+
BodyLargeBold,
|
|
7
8
|
BodyMedium,
|
|
9
|
+
BodyMediumBold,
|
|
8
10
|
BodySmall,
|
|
11
|
+
BodySmallBold,
|
|
9
12
|
ButtonTextExtraSmall,
|
|
13
|
+
ButtonTextExtraSmallUnderline,
|
|
10
14
|
ButtonTextMedium,
|
|
15
|
+
ButtonTextMediumUnderline,
|
|
11
16
|
ButtonTextSmall,
|
|
17
|
+
ButtonTextSmallUnderline,
|
|
12
18
|
FormInputMedium,
|
|
13
19
|
FormInputSmall,
|
|
14
20
|
FormLabelMedium,
|
|
@@ -22,6 +22,7 @@ const Toggle = /*#__PURE__*/React.forwardRef((_ref, forwardRef) => {
|
|
|
22
22
|
focused,
|
|
23
23
|
onChange,
|
|
24
24
|
ariaLabel,
|
|
25
|
+
labelPosition = 'right',
|
|
25
26
|
...props
|
|
26
27
|
} = _ref;
|
|
27
28
|
const toggleInput = /*#__PURE__*/React.createRef();
|
|
@@ -48,7 +49,9 @@ const Toggle = /*#__PURE__*/React.forwardRef((_ref, forwardRef) => {
|
|
|
48
49
|
[_ToggleModule.default.disabled]: disabled
|
|
49
50
|
}, classNames?.wrapper),
|
|
50
51
|
onClick: onWrapClickHandler
|
|
51
|
-
}, /*#__PURE__*/React.createElement("
|
|
52
|
+
}, labelPosition === 'left' && React.Children.count(children) > 0 && /*#__PURE__*/React.createElement("div", {
|
|
53
|
+
className: (0, _classify.default)(_ToggleModule.default.toggleLabel, classNames?.label)
|
|
54
|
+
}, children), /*#__PURE__*/React.createElement("span", {
|
|
52
55
|
className: _ToggleModule.default.toggleWrap
|
|
53
56
|
}, /*#__PURE__*/React.createElement("input", _extends({
|
|
54
57
|
type: "checkbox",
|
|
@@ -63,7 +66,7 @@ const Toggle = /*#__PURE__*/React.forwardRef((_ref, forwardRef) => {
|
|
|
63
66
|
className: (0, _classify.default)(_ToggleModule.default.toggle, {
|
|
64
67
|
[_ToggleModule.default.disabledButton]: disabled
|
|
65
68
|
})
|
|
66
|
-
})), React.Children.count(children) > 0 && /*#__PURE__*/React.createElement("div", {
|
|
69
|
+
})), labelPosition === 'right' && React.Children.count(children) > 0 && /*#__PURE__*/React.createElement("div", {
|
|
67
70
|
className: (0, _classify.default)(_ToggleModule.default.toggleLabel, classNames?.label)
|
|
68
71
|
}, children));
|
|
69
72
|
});
|
|
@@ -25,6 +25,7 @@ export type ToggleProps = {
|
|
|
25
25
|
focused?: boolean,
|
|
26
26
|
value?: string,
|
|
27
27
|
ariaLabel?: string,
|
|
28
|
+
labelPosition?: 'left' | 'right',
|
|
28
29
|
};
|
|
29
30
|
|
|
30
31
|
export const Toggle: React$AbstractComponent<ToggleProps, HTMLInputElement> =
|
|
@@ -40,6 +41,7 @@ export const Toggle: React$AbstractComponent<ToggleProps, HTMLInputElement> =
|
|
|
40
41
|
focused,
|
|
41
42
|
onChange,
|
|
42
43
|
ariaLabel,
|
|
44
|
+
labelPosition = 'right',
|
|
43
45
|
...props
|
|
44
46
|
}: ToggleProps,
|
|
45
47
|
forwardRef,
|
|
@@ -77,6 +79,11 @@ export const Toggle: React$AbstractComponent<ToggleProps, HTMLInputElement> =
|
|
|
77
79
|
)}
|
|
78
80
|
onClick={onWrapClickHandler}
|
|
79
81
|
>
|
|
82
|
+
{labelPosition === 'left' && React.Children.count(children) > 0 && (
|
|
83
|
+
<div className={classify(css.toggleLabel, classNames?.label)}>
|
|
84
|
+
{children}
|
|
85
|
+
</div>
|
|
86
|
+
)}
|
|
80
87
|
<span className={css.toggleWrap}>
|
|
81
88
|
<input
|
|
82
89
|
type="checkbox"
|
|
@@ -95,7 +102,7 @@ export const Toggle: React$AbstractComponent<ToggleProps, HTMLInputElement> =
|
|
|
95
102
|
})}
|
|
96
103
|
/>
|
|
97
104
|
</span>
|
|
98
|
-
{React.Children.count(children) > 0 && (
|
|
105
|
+
{labelPosition === 'right' && React.Children.count(children) > 0 && (
|
|
99
106
|
<div className={classify(css.toggleLabel, classNames?.label)}>
|
|
100
107
|
{children}
|
|
101
108
|
</div>
|
|
@@ -33,13 +33,14 @@ const SimpleTypeaheadBase = (props, ref) => {
|
|
|
33
33
|
setTypeaheadSelectedKeys(selectedKeys);
|
|
34
34
|
setTypeaheadInputText(newTypeaheadText);
|
|
35
35
|
}, [selectedKeys]);
|
|
36
|
-
const handleOptionChange = selectedOption => {
|
|
36
|
+
const handleOptionChange = (selectedOption, e) => {
|
|
37
|
+
e?.stopPropagation();
|
|
37
38
|
const newSelectedKeys = [selectedOption.key];
|
|
38
39
|
const newTypeaheadText = (0, _menu.getTextLabelFromSelectedKeys)(newSelectedKeys, options);
|
|
39
40
|
setTypeaheadSelectedKeys(newSelectedKeys);
|
|
40
41
|
setTypeaheadInputText(newTypeaheadText);
|
|
41
42
|
setTimeout(() => {
|
|
42
|
-
onSelect?.(selectedOption);
|
|
43
|
+
onSelect?.(selectedOption, e);
|
|
43
44
|
});
|
|
44
45
|
};
|
|
45
46
|
React.useImperativeHandle(ref, () => ({
|
|
@@ -32,7 +32,7 @@ export type SimpleTypeaheadProps = {
|
|
|
32
32
|
selectedKeys?: Array<string>,
|
|
33
33
|
|
|
34
34
|
// events
|
|
35
|
-
onSelect?: (option: MenuOption) => mixed,
|
|
35
|
+
onSelect?: (option: MenuOption, ?SyntheticEvent<HTMLElement>) => mixed,
|
|
36
36
|
onSearch?: (evt: SyntheticInputEvent<HTMLInputElement>) => mixed,
|
|
37
37
|
onMenuOpen?: () => mixed,
|
|
38
38
|
onMenuClose?: () => mixed,
|
|
@@ -75,7 +75,8 @@ const SimpleTypeaheadBase = (props: SimpleTypeaheadProps, ref) => {
|
|
|
75
75
|
setTypeaheadInputText(newTypeaheadText);
|
|
76
76
|
}, [selectedKeys]);
|
|
77
77
|
|
|
78
|
-
const handleOptionChange = (selectedOption: MenuOption) => {
|
|
78
|
+
const handleOptionChange = (selectedOption: MenuOption, e) => {
|
|
79
|
+
e?.stopPropagation();
|
|
79
80
|
const newSelectedKeys = [selectedOption.key];
|
|
80
81
|
|
|
81
82
|
const newTypeaheadText = getTextLabelFromSelectedKeys(
|
|
@@ -87,7 +88,7 @@ const SimpleTypeaheadBase = (props: SimpleTypeaheadProps, ref) => {
|
|
|
87
88
|
setTypeaheadInputText(newTypeaheadText);
|
|
88
89
|
|
|
89
90
|
setTimeout(() => {
|
|
90
|
-
onSelect?.(selectedOption);
|
|
91
|
+
onSelect?.(selectedOption, e);
|
|
91
92
|
});
|
|
92
93
|
};
|
|
93
94
|
|
|
@@ -112,8 +112,8 @@ const Typeahead = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
112
112
|
}
|
|
113
113
|
}, /*#__PURE__*/React.createElement(_Menu.Menu, _extends({}, menu, {
|
|
114
114
|
options: filteredOptions,
|
|
115
|
-
onSelect: option => {
|
|
116
|
-
onSelect && onSelect(option);
|
|
115
|
+
onSelect: (option, e) => {
|
|
116
|
+
onSelect && onSelect(option, e);
|
|
117
117
|
if (!menu.optionsVariant || menu.optionsVariant === 'normal') {
|
|
118
118
|
clickAway();
|
|
119
119
|
}
|
|
@@ -29,7 +29,7 @@ type ClassNames = $ReadOnly<{wrapper?: string, box?: string}>;
|
|
|
29
29
|
export type TypeaheadProps = {
|
|
30
30
|
...InputProps,
|
|
31
31
|
classNames?: ClassNames,
|
|
32
|
-
onSelect?: (option: MenuOption) => mixed,
|
|
32
|
+
onSelect?: (option: MenuOption, ?SyntheticEvent<HTMLElement>) => mixed,
|
|
33
33
|
onSearch?: (evt: SyntheticInputEvent<HTMLInputElement>) => mixed,
|
|
34
34
|
onMenuOpen?: () => mixed,
|
|
35
35
|
onMenuClose?: () => mixed,
|
|
@@ -148,8 +148,8 @@ export const Typeahead: React$AbstractComponent<
|
|
|
148
148
|
<Menu
|
|
149
149
|
{...menu}
|
|
150
150
|
options={filteredOptions}
|
|
151
|
-
onSelect={(option) => {
|
|
152
|
-
onSelect && onSelect(option);
|
|
151
|
+
onSelect={(option, e) => {
|
|
152
|
+
onSelect && onSelect(option, e);
|
|
153
153
|
if (
|
|
154
154
|
!menu.optionsVariant ||
|
|
155
155
|
menu.optionsVariant === 'normal'
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
fontLineHeight100,
|
|
31
31
|
fontLineHeight120,
|
|
32
32
|
fontLineHeight125,
|
|
33
|
+
fontLineHeight130,
|
|
33
34
|
fontLineHeight140,
|
|
34
35
|
fontLineHeight150,
|
|
35
36
|
fontLineHeight170,
|
|
@@ -61,6 +62,10 @@
|
|
|
61
62
|
align-items: center;
|
|
62
63
|
}
|
|
63
64
|
|
|
65
|
+
.underline {
|
|
66
|
+
text-decoration: underline;
|
|
67
|
+
}
|
|
68
|
+
|
|
64
69
|
.jumboMedium {
|
|
65
70
|
composes: baseType;
|
|
66
71
|
font-size: fontSize46;
|
|
@@ -154,7 +159,7 @@
|
|
|
154
159
|
composes: baseType;
|
|
155
160
|
font-size: fontSize12;
|
|
156
161
|
font-weight: fontWeightBook;
|
|
157
|
-
line-height:
|
|
162
|
+
line-height: fontLineHeight130;
|
|
158
163
|
letter-spacing: fontLetterSpacing4;
|
|
159
164
|
}
|
|
160
165
|
|
|
@@ -170,6 +175,10 @@
|
|
|
170
175
|
line-height: fontLineHeight140;
|
|
171
176
|
}
|
|
172
177
|
|
|
178
|
+
.bold {
|
|
179
|
+
font-weight: fontWeightMedium;
|
|
180
|
+
}
|
|
181
|
+
|
|
173
182
|
.primary {
|
|
174
183
|
color: colorTextPrimary;
|
|
175
184
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.areArraysEqual = areArraysEqual;
|
|
7
|
+
|
|
8
|
+
function areArraysEqual(array1, array2) {
|
|
9
|
+
let itemComparer = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : (a, b) => a === b;
|
|
10
|
+
return array1.length === array2.length && array1.every((value, index) => itemComparer(value, array2[index]));
|
|
11
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// @flow strict
|
|
2
|
+
|
|
3
|
+
type ItemComparer<Item> = (a: Item, b: Item) => boolean;
|
|
4
|
+
|
|
5
|
+
export function areArraysEqual<Item>(
|
|
6
|
+
array1: Item[],
|
|
7
|
+
array2: Item[],
|
|
8
|
+
itemComparer: ItemComparer<Item> = (a, b) => a === b,
|
|
9
|
+
): boolean {
|
|
10
|
+
return (
|
|
11
|
+
array1.length === array2.length &&
|
|
12
|
+
array1.every((value, index) => itemComparer(value, array2[index]))
|
|
13
|
+
);
|
|
14
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _areArraysEqual = require("./are-arrays-equal");
|
|
7
|
+
Object.keys(_areArraysEqual).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _areArraysEqual[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _areArraysEqual[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
package/lib/utils/index.js
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
var _array = require("./array");
|
|
7
|
+
Object.keys(_array).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _array[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _array[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
6
17
|
var _classify = require("./classify");
|
|
7
18
|
Object.keys(_classify).forEach(function (key) {
|
|
8
19
|
if (key === "default" || key === "__esModule") return;
|
package/lib/utils/index.js.flow
CHANGED