Skip to content

Commit 006acbc

Browse files
committed
add 'height: 100%;' and 'align-items: center;' style to 'IndicatorIcon' div - expands size of active icon element for easier user manipulation; added new property menuPosition (typeof 'top' | 'auto' | 'bottom'). Determines where menu will be placed in relation to the control - 'auto' will first check if menu has space to open below the control, otherwise it will open above the control. Defaults to 'bottom', which essentially keeps current functionality intact; bump some dev dependencies; rebuild storybook files
1 parent d6aebd1 commit 006acbc

File tree

63 files changed

+2329
-1734
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+2329
-1734
lines changed

.storybook/config/reactToastifyCss.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,20 +102,24 @@ export default css`
102102
103103
.Toastify__close-button {
104104
color: #fff;
105-
font-weight: 700;
106-
font-size: 1rem;
107105
background: transparent;
108106
outline: none;
109107
border: none;
110108
padding: 0;
111109
cursor: pointer;
112110
opacity: 0.7;
113-
transition: color 0.3s ease, opacity 0.3s ease;
111+
transition: 0.3s ease;
114112
align-self: flex-start;
115113
&--default {
116114
color: #000;
117115
opacity: 0.3;
118116
}
117+
& > svg {
118+
fill: currentColor;
119+
height: 16px;
120+
width: 14px;
121+
font-weight: 700;
122+
}
119123
&:hover,
120124
&:focus {
121125
opacity: 1;

.storybook/preview.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22
import ReactDOM from 'react-dom';
3+
import { toast } from 'react-toastify';
34
import { addParameters } from '@storybook/react';
4-
import { toast, ToastPosition } from 'react-toastify';
55
import { polyfillBrowserMS, GlobalStyle } from './config';
66

77
// Polyfill IE and Edge browsers
@@ -34,7 +34,7 @@ const completeSetupDOM = () => {
3434
autoClose: 2500,
3535
draggable: false,
3636
newestOnTop: true,
37-
position: ToastPosition.TOP_RIGHT,
37+
position: 'top-right'
3838
});
3939

4040
if (globalStyleEl) {

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ All properties are technically optional (with a few having default values). Very
150150
|`scrollMenuIntoView`| bool | `true` | Performs animated scroll to show menu in view when menu is opened (if there is room to do so)
151151
|`backspaceClearsValue`| bool | `true` | Remove the currently focused option when the user presses backspace
152152
|`filterMatchFrom`| 'any' OR 'start' | `'any'` | Position in stringified option to match search input
153+
|`menuPosition`| 'top' OR 'auto' OR 'bottom' | `'bottom'` | Determines where menu will be placed in relation to the control - `'auto'` will first check if menu has space to open below the control, otherwise it will open above the control.
153154
|`filterIgnoreCase`| bool | `true` | Search input ignores case of characters when comparing
154155
|`filterIgnoreAccents`| bool | `false` | Search input will strip diacritics from string before comparing
155156
|`onMenuOpen`| (...args: any[]): void | `undefined` | Callback function executed after the menu is opened

__tests__/Menu.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ const createMenuProps = (menuOptions = []): MenuProps => {
3030
width: '100%',
3131
renderOptionLabel,
3232
focusedOptionIndex,
33+
height: MENU_MAX_HEIGHT_DEFAULT,
3334
loadingMsg: LOADING_MSG_DEFAULT,
3435
itemSize: MENU_ITEM_SIZE_DEFAULT,
35-
maxHeight: MENU_MAX_HEIGHT_DEFAULT,
3636
noOptionsMsg: NO_OPTIONS_MSG_DEFAULT
3737
};
3838
};

docs/8.b6fb2797418f51894f9f.bundle.js.map

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/8.ed9c8847484ee859d3c8.bundle.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/asset-manifest.json

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,41 @@
11
{
22
"files": {
3-
"main~24120820.js": "./main~24120820.b6fb2797418f51894f9f.bundle.js",
4-
"main~24120820.js.map": "./main~24120820.b6fb2797418f51894f9f.bundle.js.map",
5-
"runtime~main.js": "./runtime~main.b6fb2797418f51894f9f.bundle.js",
6-
"runtime~main.js.map": "./runtime~main.b6fb2797418f51894f9f.bundle.js.map",
7-
"vendors~main~1f20a385.js": "./vendors~main~1f20a385.b6fb2797418f51894f9f.bundle.js",
8-
"vendors~main~1f20a385.js.map": "./vendors~main~1f20a385.b6fb2797418f51894f9f.bundle.js.map",
9-
"vendors~main~253ae210.js": "./vendors~main~253ae210.b6fb2797418f51894f9f.bundle.js",
10-
"vendors~main~253ae210.js.map": "./vendors~main~253ae210.b6fb2797418f51894f9f.bundle.js.map",
11-
"vendors~main~678f84af.js": "./vendors~main~678f84af.b6fb2797418f51894f9f.bundle.js",
12-
"vendors~main~678f84af.js.map": "./vendors~main~678f84af.b6fb2797418f51894f9f.bundle.js.map",
13-
"vendors~main~d939e436.js": "./vendors~main~d939e436.b6fb2797418f51894f9f.bundle.js",
14-
"vendors~main~d939e436.js.map": "./vendors~main~d939e436.b6fb2797418f51894f9f.bundle.js.map",
15-
"vendors~main~db300d2f.js": "./vendors~main~db300d2f.b6fb2797418f51894f9f.bundle.js",
16-
"vendors~main~db300d2f.js.map": "./vendors~main~db300d2f.b6fb2797418f51894f9f.bundle.js.map",
17-
"vendors~main~ec8c427e.js": "./vendors~main~ec8c427e.b6fb2797418f51894f9f.bundle.js",
18-
"vendors~main~ec8c427e.js.map": "./vendors~main~ec8c427e.b6fb2797418f51894f9f.bundle.js.map",
19-
"8.b6fb2797418f51894f9f.bundle.js": "./8.b6fb2797418f51894f9f.bundle.js",
20-
"8.b6fb2797418f51894f9f.bundle.js.map": "./8.b6fb2797418f51894f9f.bundle.js.map",
3+
"main~24120820.js": "./main~24120820.ed9c8847484ee859d3c8.bundle.js",
4+
"main~24120820.js.map": "./main~24120820.ed9c8847484ee859d3c8.bundle.js.map",
5+
"runtime~main.js": "./runtime~main.ed9c8847484ee859d3c8.bundle.js",
6+
"runtime~main.js.map": "./runtime~main.ed9c8847484ee859d3c8.bundle.js.map",
7+
"vendors~main~1f20a385.js": "./vendors~main~1f20a385.ed9c8847484ee859d3c8.bundle.js",
8+
"vendors~main~1f20a385.js.map": "./vendors~main~1f20a385.ed9c8847484ee859d3c8.bundle.js.map",
9+
"vendors~main~253ae210.js": "./vendors~main~253ae210.ed9c8847484ee859d3c8.bundle.js",
10+
"vendors~main~253ae210.js.map": "./vendors~main~253ae210.ed9c8847484ee859d3c8.bundle.js.map",
11+
"vendors~main~678f84af.js": "./vendors~main~678f84af.ed9c8847484ee859d3c8.bundle.js",
12+
"vendors~main~678f84af.js.map": "./vendors~main~678f84af.ed9c8847484ee859d3c8.bundle.js.map",
13+
"vendors~main~d939e436.js": "./vendors~main~d939e436.ed9c8847484ee859d3c8.bundle.js",
14+
"vendors~main~d939e436.js.map": "./vendors~main~d939e436.ed9c8847484ee859d3c8.bundle.js.map",
15+
"vendors~main~db300d2f.js": "./vendors~main~db300d2f.ed9c8847484ee859d3c8.bundle.js",
16+
"vendors~main~db300d2f.js.map": "./vendors~main~db300d2f.ed9c8847484ee859d3c8.bundle.js.map",
17+
"vendors~main~ec8c427e.js": "./vendors~main~ec8c427e.ed9c8847484ee859d3c8.bundle.js",
18+
"vendors~main~ec8c427e.js.map": "./vendors~main~ec8c427e.ed9c8847484ee859d3c8.bundle.js.map",
19+
"8.ed9c8847484ee859d3c8.bundle.js": "./8.ed9c8847484ee859d3c8.bundle.js",
20+
"8.ed9c8847484ee859d3c8.bundle.js.map": "./8.ed9c8847484ee859d3c8.bundle.js.map",
2121
"iframe.html": "./iframe.html",
22-
"precache-manifest.110fb9d4f264103e9eeaefc4a77056dd.js": "./precache-manifest.110fb9d4f264103e9eeaefc4a77056dd.js",
22+
"precache-manifest.49a1aed0c2f4f97c285ae38fb46d43bf.js": "./precache-manifest.49a1aed0c2f4f97c285ae38fb46d43bf.js",
2323
"service-worker.js": "./service-worker.js",
2424
"static/media/react-logo.svg": "./static/media/react-logo.9f16557d.svg",
25-
"vendors~main~1f20a385.b6fb2797418f51894f9f.bundle.js.LICENSE.txt": "./vendors~main~1f20a385.b6fb2797418f51894f9f.bundle.js.LICENSE.txt",
26-
"vendors~main~253ae210.b6fb2797418f51894f9f.bundle.js.LICENSE.txt": "./vendors~main~253ae210.b6fb2797418f51894f9f.bundle.js.LICENSE.txt",
27-
"vendors~main~678f84af.b6fb2797418f51894f9f.bundle.js.LICENSE.txt": "./vendors~main~678f84af.b6fb2797418f51894f9f.bundle.js.LICENSE.txt",
28-
"vendors~main~db300d2f.b6fb2797418f51894f9f.bundle.js.LICENSE.txt": "./vendors~main~db300d2f.b6fb2797418f51894f9f.bundle.js.LICENSE.txt",
29-
"vendors~main~ec8c427e.b6fb2797418f51894f9f.bundle.js.LICENSE.txt": "./vendors~main~ec8c427e.b6fb2797418f51894f9f.bundle.js.LICENSE.txt"
25+
"vendors~main~1f20a385.ed9c8847484ee859d3c8.bundle.js.LICENSE.txt": "./vendors~main~1f20a385.ed9c8847484ee859d3c8.bundle.js.LICENSE.txt",
26+
"vendors~main~253ae210.ed9c8847484ee859d3c8.bundle.js.LICENSE.txt": "./vendors~main~253ae210.ed9c8847484ee859d3c8.bundle.js.LICENSE.txt",
27+
"vendors~main~678f84af.ed9c8847484ee859d3c8.bundle.js.LICENSE.txt": "./vendors~main~678f84af.ed9c8847484ee859d3c8.bundle.js.LICENSE.txt",
28+
"vendors~main~db300d2f.ed9c8847484ee859d3c8.bundle.js.LICENSE.txt": "./vendors~main~db300d2f.ed9c8847484ee859d3c8.bundle.js.LICENSE.txt",
29+
"vendors~main~ec8c427e.ed9c8847484ee859d3c8.bundle.js.LICENSE.txt": "./vendors~main~ec8c427e.ed9c8847484ee859d3c8.bundle.js.LICENSE.txt"
3030
},
3131
"entrypoints": [
32-
"runtime~main.b6fb2797418f51894f9f.bundle.js",
33-
"vendors~main~253ae210.b6fb2797418f51894f9f.bundle.js",
34-
"vendors~main~d939e436.b6fb2797418f51894f9f.bundle.js",
35-
"vendors~main~db300d2f.b6fb2797418f51894f9f.bundle.js",
36-
"vendors~main~1f20a385.b6fb2797418f51894f9f.bundle.js",
37-
"vendors~main~678f84af.b6fb2797418f51894f9f.bundle.js",
38-
"vendors~main~ec8c427e.b6fb2797418f51894f9f.bundle.js",
39-
"main~24120820.b6fb2797418f51894f9f.bundle.js"
32+
"runtime~main.ed9c8847484ee859d3c8.bundle.js",
33+
"vendors~main~253ae210.ed9c8847484ee859d3c8.bundle.js",
34+
"vendors~main~d939e436.ed9c8847484ee859d3c8.bundle.js",
35+
"vendors~main~db300d2f.ed9c8847484ee859d3c8.bundle.js",
36+
"vendors~main~1f20a385.ed9c8847484ee859d3c8.bundle.js",
37+
"vendors~main~678f84af.ed9c8847484ee859d3c8.bundle.js",
38+
"vendors~main~ec8c427e.ed9c8847484ee859d3c8.bundle.js",
39+
"main~24120820.ed9c8847484ee859d3c8.bundle.js"
4040
]
4141
}

docs/iframe.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,4 @@
7171
}</script><style>#root[hidden],
7272
#docs-root[hidden] {
7373
display: none !important;
74-
}</style></head><body><div class="sb-nopreview sb-wrapper"><div class="sb-nopreview_main"><h1 class="sb-nopreview_heading sb-heading">No Preview</h1><p>Sorry, but you either have no stories or none are selected somehow.</p><ul><li>Please check the Storybook config.</li><li>Try reloading the page.</li></ul><p>If the problem persists, check the browser console, or the terminal you've run Storybook from.</p></div></div><div class="sb-errordisplay sb-wrapper"><pre id="error-message" class="sb-heading"></pre><pre class="sb-errordisplay_code"><code id="error-stack"></code></pre></div><div id="root"></div><div id="docs-root"></div><script src="runtime~main.b6fb2797418f51894f9f.bundle.js"></script><script src="vendors~main~253ae210.b6fb2797418f51894f9f.bundle.js"></script><script src="vendors~main~d939e436.b6fb2797418f51894f9f.bundle.js"></script><script src="vendors~main~db300d2f.b6fb2797418f51894f9f.bundle.js"></script><script src="vendors~main~1f20a385.b6fb2797418f51894f9f.bundle.js"></script><script src="vendors~main~678f84af.b6fb2797418f51894f9f.bundle.js"></script><script src="vendors~main~ec8c427e.b6fb2797418f51894f9f.bundle.js"></script><script src="main~24120820.b6fb2797418f51894f9f.bundle.js"></script></body></html>
74+
}</style></head><body><div class="sb-nopreview sb-wrapper"><div class="sb-nopreview_main"><h1 class="sb-nopreview_heading sb-heading">No Preview</h1><p>Sorry, but you either have no stories or none are selected somehow.</p><ul><li>Please check the Storybook config.</li><li>Try reloading the page.</li></ul><p>If the problem persists, check the browser console, or the terminal you've run Storybook from.</p></div></div><div class="sb-errordisplay sb-wrapper"><pre id="error-message" class="sb-heading"></pre><pre class="sb-errordisplay_code"><code id="error-stack"></code></pre></div><div id="root"></div><div id="docs-root"></div><script src="runtime~main.ed9c8847484ee859d3c8.bundle.js"></script><script src="vendors~main~253ae210.ed9c8847484ee859d3c8.bundle.js"></script><script src="vendors~main~d939e436.ed9c8847484ee859d3c8.bundle.js"></script><script src="vendors~main~db300d2f.ed9c8847484ee859d3c8.bundle.js"></script><script src="vendors~main~1f20a385.ed9c8847484ee859d3c8.bundle.js"></script><script src="vendors~main~678f84af.ed9c8847484ee859d3c8.bundle.js"></script><script src="vendors~main~ec8c427e.ed9c8847484ee859d3c8.bundle.js"></script><script src="main~24120820.ed9c8847484ee859d3c8.bundle.js"></script></body></html>

docs/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,4 @@
7474
}</style><style>#root[hidden],
7575
#docs-root[hidden] {
7676
display: none !important;
77-
}</style></head><body><div id="root"></div><div id="docs-root"></div><script>window['DOCS_MODE'] = false;</script><script src="runtime~main.015293d2bd2970586a57.bundle.js"></script><script src="vendors~main.d1e6a754a7cfd25b2088.bundle.js"></script><script src="main.b8c72c42851a138bf38c.bundle.js"></script></body></html>
77+
}</style></head><body><div id="root"></div><div id="docs-root"></div><script>window['DOCS_MODE'] = false;</script><script src="runtime~main.015293d2bd2970586a57.bundle.js"></script><script src="vendors~main.d1e6a754a7cfd25b2088.bundle.js"></script><script src="main.409c007b3bff3c47005e.bundle.js"></script></body></html>

0 commit comments

Comments
 (0)