@spaced-out/ui-design-system 0.2.3 → 0.2.5
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/.cspell/custom-words.txt +4 -3
- package/CHANGELOG.md +14 -0
- package/lib/components/SideMenuLink/SideMenuLink.js +5 -0
- package/lib/components/SideMenuLink/SideMenuLink.js.flow +5 -0
- package/lib/components/Typeahead/Typeahead.js +6 -4
- package/lib/components/Typeahead/Typeahead.js.flow +5 -4
- package/package.json +1 -1
package/.cspell/custom-words.txt
CHANGED
|
@@ -11,6 +11,7 @@ Ashwini
|
|
|
11
11
|
ashwini-sensehq
|
|
12
12
|
atleast
|
|
13
13
|
autodocs
|
|
14
|
+
bhatiarush
|
|
14
15
|
Branco
|
|
15
16
|
Choibalsan
|
|
16
17
|
Chuuk
|
|
@@ -49,6 +50,7 @@ Kamchatskiy
|
|
|
49
50
|
Kiritimati
|
|
50
51
|
Kosrae
|
|
51
52
|
Kuala
|
|
53
|
+
kushwah
|
|
52
54
|
Lipsey
|
|
53
55
|
Lumpur
|
|
54
56
|
Magadan
|
|
@@ -87,12 +89,10 @@ Santo
|
|
|
87
89
|
sbdocs
|
|
88
90
|
Scoresbysund
|
|
89
91
|
senseai
|
|
92
|
+
sharad
|
|
90
93
|
Stapleton
|
|
91
94
|
storysource
|
|
92
95
|
superrover
|
|
93
|
-
sharad
|
|
94
|
-
kushwah
|
|
95
|
-
bhatiarush
|
|
96
96
|
Swatantramishra
|
|
97
97
|
Syowa
|
|
98
98
|
systemjs
|
|
@@ -114,6 +114,7 @@ Verda
|
|
|
114
114
|
vish
|
|
115
115
|
VishalBarnawal
|
|
116
116
|
Vivek
|
|
117
|
+
voiceflow
|
|
117
118
|
xmark
|
|
118
119
|
yourcomponentname
|
|
119
120
|
Yuzhno
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
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.2.5](https://github.com/spaced-out/ui-design-system/compare/v0.2.4...v0.2.5) (2024-10-18)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* adding voiceflow in sidenav bar ([#279](https://github.com/spaced-out/ui-design-system/issues/279)) ([522763a](https://github.com/spaced-out/ui-design-system/commit/522763ab2fb2f256cdd15e374a5f80c84ddbf5e9))
|
|
11
|
+
|
|
12
|
+
### [0.2.4](https://github.com/spaced-out/ui-design-system/compare/v0.2.3...v0.2.4) (2024-10-15)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* ♳ fixes an issue with typeahead when when events are controlled from trigger the menu toggles b/w open and close states ([#276](https://github.com/spaced-out/ui-design-system/issues/276)) ([230b754](https://github.com/spaced-out/ui-design-system/commit/230b754b1f69d30ea4770daf9ea9b9cf6af7f8b7))
|
|
18
|
+
|
|
5
19
|
### [0.2.3](https://github.com/spaced-out/ui-design-system/compare/v0.2.2...v0.2.3) (2024-10-10)
|
|
6
20
|
|
|
7
21
|
|
|
@@ -177,6 +177,11 @@ const MENU_NAME_LIST = Object.freeze({
|
|
|
177
177
|
title: 'Support Links',
|
|
178
178
|
iconName: 'circle-question',
|
|
179
179
|
iconType: 'duotone'
|
|
180
|
+
},
|
|
181
|
+
voiceflow: {
|
|
182
|
+
title: 'Voiceflow',
|
|
183
|
+
iconName: 'phone-volume',
|
|
184
|
+
iconType: 'duotone'
|
|
180
185
|
}
|
|
181
186
|
});
|
|
182
187
|
exports.MENU_NAME_LIST = MENU_NAME_LIST;
|
|
@@ -176,6 +176,11 @@ export const MENU_NAME_LIST = Object.freeze({
|
|
|
176
176
|
iconName: 'circle-question',
|
|
177
177
|
iconType: 'duotone',
|
|
178
178
|
},
|
|
179
|
+
voiceflow: {
|
|
180
|
+
title: 'Voiceflow',
|
|
181
|
+
iconName: 'phone-volume',
|
|
182
|
+
iconType: 'duotone',
|
|
183
|
+
},
|
|
179
184
|
});
|
|
180
185
|
|
|
181
186
|
type ClassNames = $ReadOnly<{wrapper?: string}>;
|
|
@@ -10,6 +10,7 @@ var _size = require("../../styles/variables/_size");
|
|
|
10
10
|
var _space = require("../../styles/variables/_space");
|
|
11
11
|
var _classify = require("../../utils/classify");
|
|
12
12
|
var _clickAway = require("../../utils/click-away");
|
|
13
|
+
var _mergeRefs = require("../../utils/merge-refs");
|
|
13
14
|
var _Menu = require("../Menu");
|
|
14
15
|
var _SearchInput = require("../SearchInput");
|
|
15
16
|
var _TypeaheadModule = _interopRequireDefault(require("./Typeahead.module.css"));
|
|
@@ -69,7 +70,8 @@ const Typeahead = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
69
70
|
isOpen,
|
|
70
71
|
onOpen,
|
|
71
72
|
clickAway,
|
|
72
|
-
boundaryRef
|
|
73
|
+
boundaryRef,
|
|
74
|
+
triggerRef
|
|
73
75
|
} = _ref2;
|
|
74
76
|
return /*#__PURE__*/React.createElement("div", {
|
|
75
77
|
"data-testid": "Typeahead",
|
|
@@ -77,7 +79,7 @@ const Typeahead = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
77
79
|
ref: boundaryRef
|
|
78
80
|
}, /*#__PURE__*/React.createElement(_SearchInput.SearchInput, _extends({}, inputProps, {
|
|
79
81
|
ref: ref,
|
|
80
|
-
boxRef: refs.setReference,
|
|
82
|
+
boxRef: (0, _mergeRefs.mergeRefs)([refs.setReference, triggerRef]),
|
|
81
83
|
size: size,
|
|
82
84
|
placeholder: placeholder,
|
|
83
85
|
value: typeaheadInputText,
|
|
@@ -89,14 +91,14 @@ const Typeahead = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
89
91
|
e.stopPropagation();
|
|
90
92
|
onSearch && onSearch(e);
|
|
91
93
|
if (e.target.value.length >= menuOpenOffset) {
|
|
92
|
-
onOpen();
|
|
94
|
+
!isOpen && onOpen();
|
|
93
95
|
} else {
|
|
94
96
|
clickAway();
|
|
95
97
|
}
|
|
96
98
|
},
|
|
97
99
|
onFocus: _e => {
|
|
98
100
|
if (typeaheadInputText.length >= menuOpenOffset) {
|
|
99
|
-
onOpen();
|
|
101
|
+
!isOpen && onOpen();
|
|
100
102
|
} else {
|
|
101
103
|
clickAway();
|
|
102
104
|
}
|
|
@@ -16,6 +16,7 @@ import {sizeFluid} from '../../styles/variables/_size';
|
|
|
16
16
|
import {spaceNone, spaceXXSmall} from '../../styles/variables/_space';
|
|
17
17
|
import {classify} from '../../utils/classify';
|
|
18
18
|
import {type ClickAwayRefType, ClickAway} from '../../utils/click-away';
|
|
19
|
+
import {mergeRefs} from '../../utils/merge-refs';
|
|
19
20
|
import type {InputProps} from '../Input';
|
|
20
21
|
import type {MenuOption, MenuProps} from '../Menu';
|
|
21
22
|
import {Menu} from '../Menu';
|
|
@@ -98,7 +99,7 @@ export const Typeahead: React$AbstractComponent<
|
|
|
98
99
|
|
|
99
100
|
return (
|
|
100
101
|
<ClickAway onChange={onMenuToggle} clickAwayRef={clickAwayRef}>
|
|
101
|
-
{({isOpen, onOpen, clickAway, boundaryRef}) => (
|
|
102
|
+
{({isOpen, onOpen, clickAway, boundaryRef, triggerRef}) => (
|
|
102
103
|
<div
|
|
103
104
|
data-testid="Typeahead"
|
|
104
105
|
className={classify(css.typeaheadContainer, classNames?.wrapper)}
|
|
@@ -107,7 +108,7 @@ export const Typeahead: React$AbstractComponent<
|
|
|
107
108
|
<SearchInput
|
|
108
109
|
{...inputProps}
|
|
109
110
|
ref={ref}
|
|
110
|
-
boxRef={refs.setReference}
|
|
111
|
+
boxRef={mergeRefs([refs.setReference, triggerRef])}
|
|
111
112
|
size={size}
|
|
112
113
|
placeholder={placeholder}
|
|
113
114
|
value={typeaheadInputText}
|
|
@@ -117,14 +118,14 @@ export const Typeahead: React$AbstractComponent<
|
|
|
117
118
|
e.stopPropagation();
|
|
118
119
|
onSearch && onSearch(e);
|
|
119
120
|
if (e.target.value.length >= menuOpenOffset) {
|
|
120
|
-
onOpen();
|
|
121
|
+
!isOpen && onOpen();
|
|
121
122
|
} else {
|
|
122
123
|
clickAway();
|
|
123
124
|
}
|
|
124
125
|
}}
|
|
125
126
|
onFocus={(_e) => {
|
|
126
127
|
if (typeaheadInputText.length >= menuOpenOffset) {
|
|
127
|
-
onOpen();
|
|
128
|
+
!isOpen && onOpen();
|
|
128
129
|
} else {
|
|
129
130
|
clickAway();
|
|
130
131
|
}
|