@transferwise/components 0.0.0-experimental-05a786f → 0.0.0-experimental-278276c
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/build/i18n/en.json +0 -1
- package/build/index.esm.js +206 -229
- package/build/index.esm.js.map +1 -1
- package/build/index.js +206 -229
- package/build/index.js.map +1 -1
- package/build/main.css +1 -1
- package/build/styles/actionButton/ActionButton.css +1 -1
- package/build/styles/chips/Chip.css +1 -1
- package/build/styles/circularButton/CircularButton.css +1 -1
- package/build/styles/common/Option/Option.css +1 -1
- package/build/styles/common/bottomSheet/BottomSheet.css +1 -1
- package/build/styles/common/closeButton/CloseButton.css +1 -1
- package/build/styles/dateLookup/DateLookup.css +1 -1
- package/build/styles/drawer/Drawer.css +1 -1
- package/build/styles/flowNavigation/FlowNavigation.css +1 -1
- package/build/styles/inputs/SelectInput.css +1 -1
- package/build/styles/main.css +1 -1
- package/build/styles/overlayHeader/OverlayHeader.css +1 -1
- package/build/styles/statusIcon/StatusIcon.css +1 -1
- package/build/styles/summary/Summary.css +1 -1
- package/build/styles/typeahead/Typeahead.css +1 -1
- package/build/styles/uploadInput/UploadInput.css +1 -1
- package/build/types/common/bottomSheet/BottomSheet.d.ts.map +1 -1
- package/build/types/common/propsValues/breakpoint.d.ts +1 -0
- package/build/types/common/propsValues/breakpoint.d.ts.map +1 -1
- package/build/types/dateLookup/DateLookup.d.ts.map +1 -1
- package/build/types/dateLookup/dateHeader/DateHeader.d.ts.map +1 -1
- package/build/types/inputs/SelectInput.d.ts.map +1 -1
- package/build/types/test-utils/story-config.d.ts +11 -1
- package/build/types/test-utils/story-config.d.ts.map +1 -1
- package/build/types/test-utils/window-mock.d.ts +2 -0
- package/build/types/test-utils/window-mock.d.ts.map +1 -0
- package/package.json +4 -4
- package/src/actionButton/ActionButton.css +1 -1
- package/src/actionButton/ActionButton.less +5 -1
- package/src/chips/Chip.css +1 -1
- package/src/chips/Chip.less +8 -0
- package/src/circularButton/CircularButton.css +1 -1
- package/src/circularButton/CircularButton.less +9 -3
- package/src/common/Option/Option.css +1 -1
- package/src/common/Option/Option.less +6 -0
- package/src/common/bottomSheet/BottomSheet.css +1 -1
- package/src/common/bottomSheet/BottomSheet.less +1 -1
- package/src/common/bottomSheet/BottomSheet.spec.tsx +4 -1
- package/src/common/bottomSheet/BottomSheet.story.tsx +4 -0
- package/src/common/bottomSheet/BottomSheet.tsx +10 -1
- package/src/common/closeButton/CloseButton.css +1 -1
- package/src/common/closeButton/CloseButton.less +12 -0
- package/src/common/hooks/useMedia.spec.ts +3 -17
- package/src/common/propsValues/breakpoint.ts +1 -0
- package/src/dateLookup/DateLookup.css +1 -1
- package/src/dateLookup/DateLookup.js +7 -3
- package/src/dateLookup/DateLookup.keyboardEvents.spec.js +3 -0
- package/src/dateLookup/DateLookup.less +6 -0
- package/src/dateLookup/DateLookup.story.js +6 -1
- package/src/dateLookup/DateLookup.testingLibrary.spec.js +3 -1
- package/src/dateLookup/DateLookup.view.spec.js +4 -0
- package/src/dateLookup/dateHeader/DateHeader.js +4 -2
- package/src/drawer/Drawer.css +1 -1
- package/src/drawer/Drawer.less +6 -8
- package/src/drawer/Drawer.story.js +42 -2
- package/src/flowNavigation/FlowNavigation.css +1 -1
- package/src/i18n/en.json +0 -1
- package/src/inputs/SelectInput.css +1 -1
- package/src/inputs/SelectInput.less +0 -12
- package/src/inputs/SelectInput.tsx +22 -55
- package/src/inputs/_BottomSheet.tsx +19 -19
- package/src/main.css +1 -1
- package/src/modal/Modal.tsx +2 -2
- package/src/overlayHeader/OverlayHeader.css +1 -1
- package/src/popover/Popover.spec.js +3 -1
- package/src/select/Select.spec.js +6 -9
- package/src/statusIcon/StatusIcon.css +1 -1
- package/src/statusIcon/StatusIcon.less +10 -0
- package/src/summary/Summary.css +1 -1
- package/src/summary/Summary.less +1 -1
- package/src/test-utils/index.js +1 -0
- package/src/test-utils/story-config.ts +21 -7
- package/src/test-utils/window-mock.ts +19 -0
- package/src/typeahead/Typeahead.css +1 -1
- package/src/typeahead/Typeahead.less +5 -6
- package/src/uploadInput/UploadInput.css +1 -1
- package/src/uploadInput/UploadInput.less +5 -1
- package/build/types/inputs/SelectInput.messages.d.ts +0 -9
- package/build/types/inputs/SelectInput.messages.d.ts.map +0 -1
- package/src/inputs/SelectInput.messages.ts +0 -9
package/build/index.js
CHANGED
|
@@ -14,11 +14,11 @@ var reactTransitionGroup = require('react-transition-group');
|
|
|
14
14
|
var reactDom = require('react-dom');
|
|
15
15
|
var focus = require('@react-aria/focus');
|
|
16
16
|
var mergeRefs = require('react-merge-refs');
|
|
17
|
+
var shim = require('use-sync-external-store/shim');
|
|
17
18
|
var neptuneValidation = require('@transferwise/neptune-validation');
|
|
18
19
|
var reactPopper = require('react-popper');
|
|
19
20
|
var react$1 = require('@headlessui/react');
|
|
20
21
|
var mergeProps = require('merge-props');
|
|
21
|
-
var shim = require('use-sync-external-store/shim');
|
|
22
22
|
var react = require('@floating-ui/react');
|
|
23
23
|
var overlays = require('@react-aria/overlays');
|
|
24
24
|
var art = require('@wise/art');
|
|
@@ -192,6 +192,7 @@ exports.Priority = void 0;
|
|
|
192
192
|
|
|
193
193
|
exports.Breakpoint = void 0;
|
|
194
194
|
(function (Breakpoint) {
|
|
195
|
+
Breakpoint[Breakpoint["ZOOM_400"] = 320] = "ZOOM_400";
|
|
195
196
|
Breakpoint[Breakpoint["EXTRA_SMALL"] = 480] = "EXTRA_SMALL";
|
|
196
197
|
Breakpoint[Breakpoint["SMALL"] = 576] = "SMALL";
|
|
197
198
|
Breakpoint[Breakpoint["MEDIUM"] = 768] = "MEDIUM";
|
|
@@ -1740,58 +1741,6 @@ const DimmerContentWrapper = ({
|
|
|
1740
1741
|
};
|
|
1741
1742
|
var Dimmer$1 = withNextPortalWrapper(Dimmer);
|
|
1742
1743
|
|
|
1743
|
-
const EXIT_ANIMATION = 350;
|
|
1744
|
-
const SlidingPanel = /*#__PURE__*/React.forwardRef(({
|
|
1745
|
-
children,
|
|
1746
|
-
className,
|
|
1747
|
-
open,
|
|
1748
|
-
position,
|
|
1749
|
-
showSlidingPanelBorder,
|
|
1750
|
-
slidingPanelPositionFixed,
|
|
1751
|
-
...rest
|
|
1752
|
-
}, reference) => {
|
|
1753
|
-
/** @type {RefObject<HTMLDivElement>} */
|
|
1754
|
-
const localReference = React.useRef(null);
|
|
1755
|
-
return /*#__PURE__*/jsxRuntime.jsx(reactTransitionGroup.CSSTransition, {
|
|
1756
|
-
...rest,
|
|
1757
|
-
nodeRef: localReference,
|
|
1758
|
-
in: open
|
|
1759
|
-
// Wait for animation to finish before unmount.
|
|
1760
|
-
,
|
|
1761
|
-
timeout: {
|
|
1762
|
-
enter: 0,
|
|
1763
|
-
exit: EXIT_ANIMATION
|
|
1764
|
-
},
|
|
1765
|
-
classNames: classNames__default.default(`sliding-panel--open-${position}`, showSlidingPanelBorder && `sliding-panel--border-${position}`, {
|
|
1766
|
-
'sliding-panel--fixed': slidingPanelPositionFixed
|
|
1767
|
-
}, 'sliding-panel'),
|
|
1768
|
-
appear: true,
|
|
1769
|
-
unmountOnExit: true,
|
|
1770
|
-
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
1771
|
-
ref: mergeRefs__default.default([reference, localReference]),
|
|
1772
|
-
className: classNames__default.default('sliding-panel', `sliding-panel--open-${position}`, className),
|
|
1773
|
-
children: children
|
|
1774
|
-
})
|
|
1775
|
-
});
|
|
1776
|
-
});
|
|
1777
|
-
SlidingPanel.propTypes = {
|
|
1778
|
-
children: PropTypes__default.default.node,
|
|
1779
|
-
className: PropTypes__default.default.string,
|
|
1780
|
-
open: PropTypes__default.default.bool,
|
|
1781
|
-
position: PropTypes__default.default.oneOf(['top', 'bottom', 'left', 'right']),
|
|
1782
|
-
showSlidingPanelBorder: PropTypes__default.default.bool,
|
|
1783
|
-
slidingPanelPositionFixed: PropTypes__default.default.bool
|
|
1784
|
-
};
|
|
1785
|
-
SlidingPanel.defaultProps = {
|
|
1786
|
-
children: null,
|
|
1787
|
-
className: undefined,
|
|
1788
|
-
open: false,
|
|
1789
|
-
position: 'left',
|
|
1790
|
-
showSlidingPanelBorder: false,
|
|
1791
|
-
slidingPanelPositionFixed: false
|
|
1792
|
-
};
|
|
1793
|
-
var SlidingPanel$1 = SlidingPanel;
|
|
1794
|
-
|
|
1795
1744
|
const THROTTLE_MS = 100;
|
|
1796
1745
|
const useIsomorphicLayoutEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;
|
|
1797
1746
|
const useClientWidth = ({
|
|
@@ -1962,6 +1911,137 @@ const useLayout = () => {
|
|
|
1962
1911
|
};
|
|
1963
1912
|
};
|
|
1964
1913
|
|
|
1914
|
+
const EXIT_ANIMATION = 350;
|
|
1915
|
+
const SlidingPanel = /*#__PURE__*/React.forwardRef(({
|
|
1916
|
+
children,
|
|
1917
|
+
className,
|
|
1918
|
+
open,
|
|
1919
|
+
position,
|
|
1920
|
+
showSlidingPanelBorder,
|
|
1921
|
+
slidingPanelPositionFixed,
|
|
1922
|
+
...rest
|
|
1923
|
+
}, reference) => {
|
|
1924
|
+
/** @type {RefObject<HTMLDivElement>} */
|
|
1925
|
+
const localReference = React.useRef(null);
|
|
1926
|
+
return /*#__PURE__*/jsxRuntime.jsx(reactTransitionGroup.CSSTransition, {
|
|
1927
|
+
...rest,
|
|
1928
|
+
nodeRef: localReference,
|
|
1929
|
+
in: open
|
|
1930
|
+
// Wait for animation to finish before unmount.
|
|
1931
|
+
,
|
|
1932
|
+
timeout: {
|
|
1933
|
+
enter: 0,
|
|
1934
|
+
exit: EXIT_ANIMATION
|
|
1935
|
+
},
|
|
1936
|
+
classNames: classNames__default.default(`sliding-panel--open-${position}`, showSlidingPanelBorder && `sliding-panel--border-${position}`, {
|
|
1937
|
+
'sliding-panel--fixed': slidingPanelPositionFixed
|
|
1938
|
+
}, 'sliding-panel'),
|
|
1939
|
+
appear: true,
|
|
1940
|
+
unmountOnExit: true,
|
|
1941
|
+
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
1942
|
+
ref: mergeRefs__default.default([reference, localReference]),
|
|
1943
|
+
className: classNames__default.default('sliding-panel', `sliding-panel--open-${position}`, className),
|
|
1944
|
+
children: children
|
|
1945
|
+
})
|
|
1946
|
+
});
|
|
1947
|
+
});
|
|
1948
|
+
SlidingPanel.propTypes = {
|
|
1949
|
+
children: PropTypes__default.default.node,
|
|
1950
|
+
className: PropTypes__default.default.string,
|
|
1951
|
+
open: PropTypes__default.default.bool,
|
|
1952
|
+
position: PropTypes__default.default.oneOf(['top', 'bottom', 'left', 'right']),
|
|
1953
|
+
showSlidingPanelBorder: PropTypes__default.default.bool,
|
|
1954
|
+
slidingPanelPositionFixed: PropTypes__default.default.bool
|
|
1955
|
+
};
|
|
1956
|
+
SlidingPanel.defaultProps = {
|
|
1957
|
+
children: null,
|
|
1958
|
+
className: undefined,
|
|
1959
|
+
open: false,
|
|
1960
|
+
position: 'left',
|
|
1961
|
+
showSlidingPanelBorder: false,
|
|
1962
|
+
slidingPanelPositionFixed: false
|
|
1963
|
+
};
|
|
1964
|
+
var SlidingPanel$1 = SlidingPanel;
|
|
1965
|
+
|
|
1966
|
+
const Drawer = ({
|
|
1967
|
+
children,
|
|
1968
|
+
className,
|
|
1969
|
+
footerContent,
|
|
1970
|
+
headerTitle,
|
|
1971
|
+
onClose,
|
|
1972
|
+
open,
|
|
1973
|
+
position
|
|
1974
|
+
}) => {
|
|
1975
|
+
logActionRequiredIf('Drawer now expects `onClose`, and will soon make this prop required. Please update your usage to provide it.', !onClose);
|
|
1976
|
+
const {
|
|
1977
|
+
isMobile
|
|
1978
|
+
} = useLayout();
|
|
1979
|
+
return /*#__PURE__*/jsxRuntime.jsx(Dimmer$1, {
|
|
1980
|
+
open: open,
|
|
1981
|
+
onClose: onClose,
|
|
1982
|
+
children: /*#__PURE__*/jsxRuntime.jsx(SlidingPanel$1, {
|
|
1983
|
+
open: open,
|
|
1984
|
+
position: isMobile ? exports.Position.BOTTOM : position,
|
|
1985
|
+
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
1986
|
+
className: classNames__default.default('np-drawer', className),
|
|
1987
|
+
role: "dialog",
|
|
1988
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
1989
|
+
className: classNames__default.default('np-drawer-header', {
|
|
1990
|
+
'np-drawer-header--withborder': headerTitle
|
|
1991
|
+
}),
|
|
1992
|
+
children: [headerTitle && /*#__PURE__*/jsxRuntime.jsx(Title, {
|
|
1993
|
+
type: exports.Typography.TITLE_BODY,
|
|
1994
|
+
children: headerTitle
|
|
1995
|
+
}), /*#__PURE__*/jsxRuntime.jsx(CloseButton, {
|
|
1996
|
+
onClick: onClose
|
|
1997
|
+
})]
|
|
1998
|
+
}), children && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
1999
|
+
className: classNames__default.default('np-drawer-content'),
|
|
2000
|
+
children: children
|
|
2001
|
+
}), footerContent && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
2002
|
+
className: classNames__default.default('np-drawer-footer'),
|
|
2003
|
+
children: footerContent
|
|
2004
|
+
})]
|
|
2005
|
+
})
|
|
2006
|
+
})
|
|
2007
|
+
});
|
|
2008
|
+
};
|
|
2009
|
+
Drawer.propTypes = {
|
|
2010
|
+
/** The content to appear in the drawer body. */
|
|
2011
|
+
children: PropTypes__default.default.node,
|
|
2012
|
+
className: PropTypes__default.default.string,
|
|
2013
|
+
/** The content to appear in the drawer footer. */
|
|
2014
|
+
footerContent: PropTypes__default.default.node,
|
|
2015
|
+
/** The content to appear in the drawer header. */
|
|
2016
|
+
headerTitle: PropTypes__default.default.node,
|
|
2017
|
+
/** The action to perform on close click. */
|
|
2018
|
+
onClose: PropTypes__default.default.func,
|
|
2019
|
+
/** The status of Drawer either open or not. */
|
|
2020
|
+
open: PropTypes__default.default.bool,
|
|
2021
|
+
/** The placement of Drawer on the screen either left or right. On mobile it will default to bottom. */
|
|
2022
|
+
position: PropTypes__default.default.oneOf(['left', 'right', 'bottom'])
|
|
2023
|
+
};
|
|
2024
|
+
Drawer.defaultProps = {
|
|
2025
|
+
children: null,
|
|
2026
|
+
className: undefined,
|
|
2027
|
+
footerContent: null,
|
|
2028
|
+
headerTitle: null,
|
|
2029
|
+
onClose: null,
|
|
2030
|
+
open: false,
|
|
2031
|
+
position: exports.Position.RIGHT
|
|
2032
|
+
};
|
|
2033
|
+
var Drawer$1 = Drawer;
|
|
2034
|
+
|
|
2035
|
+
function useMedia(query) {
|
|
2036
|
+
return shim.useSyncExternalStore(onStoreChange => {
|
|
2037
|
+
const mediaQueryList = window.matchMedia(query);
|
|
2038
|
+
mediaQueryList.addEventListener('change', onStoreChange);
|
|
2039
|
+
return () => {
|
|
2040
|
+
mediaQueryList.removeEventListener('change', onStoreChange);
|
|
2041
|
+
};
|
|
2042
|
+
}, () => typeof window !== 'undefined' ? window.matchMedia(query).matches : undefined, () => undefined);
|
|
2043
|
+
}
|
|
2044
|
+
|
|
1965
2045
|
const INITIAL_Y_POSITION = 0;
|
|
1966
2046
|
const CONTENT_SCROLL_THRESHOLD = 1;
|
|
1967
2047
|
const MOVE_OFFSET_THRESHOLD = 50;
|
|
@@ -2089,7 +2169,13 @@ const BottomSheet$1 = props => {
|
|
|
2089
2169
|
maxHeight: `calc(${screenHeight} - ${safeZoneHeight} - ${topbarHeight})`
|
|
2090
2170
|
};
|
|
2091
2171
|
}
|
|
2092
|
-
|
|
2172
|
+
const is400Zoom = useMedia(`(max-width: ${exports.Breakpoint.ZOOM_400}px)`);
|
|
2173
|
+
return is400Zoom ? /*#__PURE__*/jsxRuntime.jsx(Drawer$1, {
|
|
2174
|
+
open: props.open,
|
|
2175
|
+
className: props.className,
|
|
2176
|
+
onClose: close,
|
|
2177
|
+
children: props.children
|
|
2178
|
+
}) : /*#__PURE__*/jsxRuntime.jsx(Dimmer$1, {
|
|
2093
2179
|
open: props.open,
|
|
2094
2180
|
fadeContentOnEnter: true,
|
|
2095
2181
|
fadeContentOnExit: true,
|
|
@@ -3316,7 +3402,7 @@ const ResponsivePanel = /*#__PURE__*/React.forwardRef(({
|
|
|
3316
3402
|
});
|
|
3317
3403
|
var ResponsivePanel$1 = ResponsivePanel;
|
|
3318
3404
|
|
|
3319
|
-
var
|
|
3405
|
+
var messages$6 = reactIntl.defineMessages({
|
|
3320
3406
|
ariaLabel: {
|
|
3321
3407
|
id: "neptune.ClearButton.ariaLabel"
|
|
3322
3408
|
}
|
|
@@ -3379,7 +3465,7 @@ const DateTrigger = ({
|
|
|
3379
3465
|
className: "input-group-addon",
|
|
3380
3466
|
children: /*#__PURE__*/jsxRuntime.jsx(CloseButton, {
|
|
3381
3467
|
className: `clear-btn clear-btn--${size}`,
|
|
3382
|
-
"aria-label": formatMessage(
|
|
3468
|
+
"aria-label": formatMessage(messages$6.ariaLabel),
|
|
3383
3469
|
size: exports.Size.SMALL,
|
|
3384
3470
|
onClick: event => {
|
|
3385
3471
|
event.stopPropagation();
|
|
@@ -3409,7 +3495,7 @@ DateTrigger.defaultProps = {
|
|
|
3409
3495
|
};
|
|
3410
3496
|
var DateTrigger$1 = DateTrigger;
|
|
3411
3497
|
|
|
3412
|
-
var messages$
|
|
3498
|
+
var messages$5 = reactIntl.defineMessages({
|
|
3413
3499
|
next: {
|
|
3414
3500
|
id: "neptune.DateLookup.next"
|
|
3415
3501
|
},
|
|
@@ -3445,14 +3531,17 @@ const DateHeader = ({
|
|
|
3445
3531
|
dateMode
|
|
3446
3532
|
}) => {
|
|
3447
3533
|
const intl = reactIntl.useIntl();
|
|
3534
|
+
const {
|
|
3535
|
+
isMobile
|
|
3536
|
+
} = useLayout();
|
|
3448
3537
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
3449
|
-
className:
|
|
3538
|
+
className: classNames__default.default('text-xs-center', !isMobile && ['clearfix', 'p-y-1']),
|
|
3450
3539
|
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
3451
3540
|
className: "pull-left-single-direction",
|
|
3452
3541
|
children: /*#__PURE__*/jsxRuntime.jsx("button", {
|
|
3453
3542
|
type: "button",
|
|
3454
3543
|
className: `d-inline-flex ${buttonClasses}`,
|
|
3455
|
-
"aria-label": `${intl.formatMessage(messages$
|
|
3544
|
+
"aria-label": `${intl.formatMessage(messages$5.previous)} ${dateMode}`,
|
|
3456
3545
|
onClick: onPreviousClick,
|
|
3457
3546
|
children: /*#__PURE__*/jsxRuntime.jsx(Chevron$1, {
|
|
3458
3547
|
orientation: exports.Position.LEFT,
|
|
@@ -3466,7 +3555,7 @@ const DateHeader = ({
|
|
|
3466
3555
|
children: /*#__PURE__*/jsxRuntime.jsx("button", {
|
|
3467
3556
|
type: "button",
|
|
3468
3557
|
className: `tw-date-lookup-header-current ${buttonClasses}`,
|
|
3469
|
-
"aria-label": intl.formatMessage(messages$
|
|
3558
|
+
"aria-label": intl.formatMessage(messages$5.goTo20YearView),
|
|
3470
3559
|
onClick: onLabelClick,
|
|
3471
3560
|
children: label
|
|
3472
3561
|
})
|
|
@@ -3475,7 +3564,7 @@ const DateHeader = ({
|
|
|
3475
3564
|
children: /*#__PURE__*/jsxRuntime.jsx("button", {
|
|
3476
3565
|
type: "button",
|
|
3477
3566
|
className: `d-inline-flex ${buttonClasses}`,
|
|
3478
|
-
"aria-label": `${reactIntl.useIntl().formatMessage(messages$
|
|
3567
|
+
"aria-label": `${reactIntl.useIntl().formatMessage(messages$5.next)} ${dateMode}`,
|
|
3479
3568
|
onClick: onNextClick,
|
|
3480
3569
|
children: /*#__PURE__*/jsxRuntime.jsx(Chevron$1, {
|
|
3481
3570
|
orientation: exports.Position.RIGHT,
|
|
@@ -3519,7 +3608,7 @@ class TableLink extends React.PureComponent {
|
|
|
3519
3608
|
};
|
|
3520
3609
|
calculateAriaLabel = (longTitle, title, active, type, formatMessage) => {
|
|
3521
3610
|
if (active) {
|
|
3522
|
-
return `${longTitle || title}, ${formatMessage(messages$
|
|
3611
|
+
return `${longTitle || title}, ${formatMessage(messages$5.selected)} ${formatMessage(messages$5[type])}`;
|
|
3523
3612
|
}
|
|
3524
3613
|
return longTitle || title;
|
|
3525
3614
|
};
|
|
@@ -3742,7 +3831,7 @@ class DayCalendar extends React.PureComponent {
|
|
|
3742
3831
|
month: monthFormat,
|
|
3743
3832
|
year: 'numeric'
|
|
3744
3833
|
}),
|
|
3745
|
-
dateMode: formatMessage(messages$
|
|
3834
|
+
dateMode: formatMessage(messages$5.month),
|
|
3746
3835
|
onLabelClick: onLabelClick,
|
|
3747
3836
|
onPreviousClick: this.selectPreviousMonth,
|
|
3748
3837
|
onNextClick: this.selectNextMonth
|
|
@@ -3870,7 +3959,7 @@ class MonthCalendar extends React.PureComponent {
|
|
|
3870
3959
|
} = this.props;
|
|
3871
3960
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
3872
3961
|
children: [/*#__PURE__*/jsxRuntime.jsx(DateHeader$1, {
|
|
3873
|
-
dateMode: formatMessage(messages$
|
|
3962
|
+
dateMode: formatMessage(messages$5.year),
|
|
3874
3963
|
label: formatting.formatDate(new Date(viewYear, 0), locale, {
|
|
3875
3964
|
year: 'numeric'
|
|
3876
3965
|
}),
|
|
@@ -3995,7 +4084,7 @@ class YearCalendar extends React.PureComponent {
|
|
|
3995
4084
|
} = this.props;
|
|
3996
4085
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
3997
4086
|
children: [/*#__PURE__*/jsxRuntime.jsx(DateHeader$1, {
|
|
3998
|
-
dateMode: formatMessage(messages$
|
|
4087
|
+
dateMode: formatMessage(messages$5.twentyYears),
|
|
3999
4088
|
onPreviousClick: this.selectPreviousYears,
|
|
4000
4089
|
onNextClick: this.selectNextYears
|
|
4001
4090
|
}), /*#__PURE__*/jsxRuntime.jsx(YearCalendarTable$1, {
|
|
@@ -4042,7 +4131,8 @@ class DateLookup extends React.PureComponent {
|
|
|
4042
4131
|
viewMonth: (props.value || new Date()).getMonth(),
|
|
4043
4132
|
viewYear: (props.value || new Date()).getFullYear(),
|
|
4044
4133
|
open: false,
|
|
4045
|
-
mode: MODE.DAY
|
|
4134
|
+
mode: MODE.DAY,
|
|
4135
|
+
isMobile: false
|
|
4046
4136
|
};
|
|
4047
4137
|
}
|
|
4048
4138
|
static getDerivedStateFromProps(props, state) {
|
|
@@ -4077,6 +4167,10 @@ class DateLookup extends React.PureComponent {
|
|
|
4077
4167
|
if (+this.props.value !== +previousProps.value && this.state.open) {
|
|
4078
4168
|
this.focusOn('.active');
|
|
4079
4169
|
}
|
|
4170
|
+
this.mediaQuery = window.matchMedia(`(max-width: ${exports.Breakpoint.SMALL}px)`);
|
|
4171
|
+
this.setState({
|
|
4172
|
+
isMobile: this.mediaQuery.matches
|
|
4173
|
+
});
|
|
4080
4174
|
}
|
|
4081
4175
|
componentWillUnmount() {
|
|
4082
4176
|
// Prevents memory leak by cleaning state.
|
|
@@ -4209,14 +4303,17 @@ class DateLookup extends React.PureComponent {
|
|
|
4209
4303
|
max,
|
|
4210
4304
|
viewMonth,
|
|
4211
4305
|
viewYear,
|
|
4212
|
-
mode
|
|
4306
|
+
mode,
|
|
4307
|
+
isMobile
|
|
4213
4308
|
} = this.state;
|
|
4214
4309
|
const {
|
|
4215
4310
|
placeholder,
|
|
4216
4311
|
monthFormat
|
|
4217
4312
|
} = this.props;
|
|
4218
4313
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
4219
|
-
className:
|
|
4314
|
+
className: classNames__default.default({
|
|
4315
|
+
'p-a-1': !isMobile
|
|
4316
|
+
}),
|
|
4220
4317
|
children: [mode === MODE.DAY && /*#__PURE__*/jsxRuntime.jsx(DayCalendar$1, {
|
|
4221
4318
|
selectedDate,
|
|
4222
4319
|
min,
|
|
@@ -4724,75 +4821,6 @@ function Display({
|
|
|
4724
4821
|
});
|
|
4725
4822
|
}
|
|
4726
4823
|
|
|
4727
|
-
const Drawer = ({
|
|
4728
|
-
children,
|
|
4729
|
-
className,
|
|
4730
|
-
footerContent,
|
|
4731
|
-
headerTitle,
|
|
4732
|
-
onClose,
|
|
4733
|
-
open,
|
|
4734
|
-
position
|
|
4735
|
-
}) => {
|
|
4736
|
-
logActionRequiredIf('Drawer now expects `onClose`, and will soon make this prop required. Please update your usage to provide it.', !onClose);
|
|
4737
|
-
const {
|
|
4738
|
-
isMobile
|
|
4739
|
-
} = useLayout();
|
|
4740
|
-
return /*#__PURE__*/jsxRuntime.jsx(Dimmer$1, {
|
|
4741
|
-
open: open,
|
|
4742
|
-
onClose: onClose,
|
|
4743
|
-
children: /*#__PURE__*/jsxRuntime.jsx(SlidingPanel$1, {
|
|
4744
|
-
open: open,
|
|
4745
|
-
position: isMobile ? exports.Position.BOTTOM : position,
|
|
4746
|
-
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
4747
|
-
className: classNames__default.default('np-drawer', className),
|
|
4748
|
-
role: "dialog",
|
|
4749
|
-
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
4750
|
-
className: classNames__default.default('np-drawer-header', {
|
|
4751
|
-
'np-drawer-header--withborder': headerTitle
|
|
4752
|
-
}),
|
|
4753
|
-
children: [headerTitle && /*#__PURE__*/jsxRuntime.jsx(Title, {
|
|
4754
|
-
type: exports.Typography.TITLE_BODY,
|
|
4755
|
-
children: headerTitle
|
|
4756
|
-
}), /*#__PURE__*/jsxRuntime.jsx(CloseButton, {
|
|
4757
|
-
onClick: onClose
|
|
4758
|
-
})]
|
|
4759
|
-
}), children && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
4760
|
-
className: classNames__default.default('np-drawer-content'),
|
|
4761
|
-
children: children
|
|
4762
|
-
}), footerContent && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
4763
|
-
className: classNames__default.default('np-drawer-footer'),
|
|
4764
|
-
children: footerContent
|
|
4765
|
-
})]
|
|
4766
|
-
})
|
|
4767
|
-
})
|
|
4768
|
-
});
|
|
4769
|
-
};
|
|
4770
|
-
Drawer.propTypes = {
|
|
4771
|
-
/** The content to appear in the drawer body. */
|
|
4772
|
-
children: PropTypes__default.default.node,
|
|
4773
|
-
className: PropTypes__default.default.string,
|
|
4774
|
-
/** The content to appear in the drawer footer. */
|
|
4775
|
-
footerContent: PropTypes__default.default.node,
|
|
4776
|
-
/** The content to appear in the drawer header. */
|
|
4777
|
-
headerTitle: PropTypes__default.default.node,
|
|
4778
|
-
/** The action to perform on close click. */
|
|
4779
|
-
onClose: PropTypes__default.default.func,
|
|
4780
|
-
/** The status of Drawer either open or not. */
|
|
4781
|
-
open: PropTypes__default.default.bool,
|
|
4782
|
-
/** The placement of Drawer on the screen either left or right. On mobile it will default to bottom. */
|
|
4783
|
-
position: PropTypes__default.default.oneOf(['left', 'right', 'bottom'])
|
|
4784
|
-
};
|
|
4785
|
-
Drawer.defaultProps = {
|
|
4786
|
-
children: null,
|
|
4787
|
-
className: undefined,
|
|
4788
|
-
footerContent: null,
|
|
4789
|
-
headerTitle: null,
|
|
4790
|
-
onClose: null,
|
|
4791
|
-
open: false,
|
|
4792
|
-
position: exports.Position.RIGHT
|
|
4793
|
-
};
|
|
4794
|
-
var Drawer$1 = Drawer;
|
|
4795
|
-
|
|
4796
4824
|
const DropFade = ({
|
|
4797
4825
|
children,
|
|
4798
4826
|
show
|
|
@@ -5693,7 +5721,7 @@ const Stepper = ({
|
|
|
5693
5721
|
});
|
|
5694
5722
|
};
|
|
5695
5723
|
|
|
5696
|
-
var messages$
|
|
5724
|
+
var messages$4 = reactIntl.defineMessages({
|
|
5697
5725
|
back: {
|
|
5698
5726
|
id: "neptune.FlowNavigation.back"
|
|
5699
5727
|
}
|
|
@@ -5773,7 +5801,7 @@ const FlowNavigation = ({
|
|
|
5773
5801
|
className: "m-x-1",
|
|
5774
5802
|
labels: steps.map(step => step.label),
|
|
5775
5803
|
activeLabel: activeStep - 1,
|
|
5776
|
-
"aria-label": intl.formatMessage(messages$
|
|
5804
|
+
"aria-label": intl.formatMessage(messages$4.back)
|
|
5777
5805
|
}),
|
|
5778
5806
|
onClick: onGoBack
|
|
5779
5807
|
}) : logo
|
|
@@ -5925,13 +5953,14 @@ const Modal = ({
|
|
|
5925
5953
|
}) => {
|
|
5926
5954
|
const checkSpecialClasses = classToCheck => className?.split(' ').includes(classToCheck);
|
|
5927
5955
|
const {
|
|
5928
|
-
isMobile
|
|
5956
|
+
isMobile,
|
|
5957
|
+
isMedium: isTablet
|
|
5929
5958
|
} = useLayout();
|
|
5930
5959
|
// These should be replaced with props in breaking change.
|
|
5931
5960
|
const isCompact = checkSpecialClasses('compact');
|
|
5932
5961
|
const noDivider = checkSpecialClasses('no-divider');
|
|
5933
5962
|
const contentReference = React.useRef(null);
|
|
5934
|
-
return isMobile ? /*#__PURE__*/jsxRuntime.jsx(Drawer$1, {
|
|
5963
|
+
return isMobile || isTablet ? /*#__PURE__*/jsxRuntime.jsx(Drawer$1, {
|
|
5935
5964
|
open: open,
|
|
5936
5965
|
headerTitle: title,
|
|
5937
5966
|
footerContent: footer,
|
|
@@ -6354,16 +6383,6 @@ const SearchInput = /*#__PURE__*/React.forwardRef(function SearchInput({
|
|
|
6354
6383
|
});
|
|
6355
6384
|
});
|
|
6356
6385
|
|
|
6357
|
-
function useMedia(query) {
|
|
6358
|
-
return shim.useSyncExternalStore(onStoreChange => {
|
|
6359
|
-
const mediaQueryList = window.matchMedia(query);
|
|
6360
|
-
mediaQueryList.addEventListener('change', onStoreChange);
|
|
6361
|
-
return () => {
|
|
6362
|
-
mediaQueryList.removeEventListener('change', onStoreChange);
|
|
6363
|
-
};
|
|
6364
|
-
}, () => typeof window !== 'undefined' ? window.matchMedia(query).matches : undefined, () => undefined);
|
|
6365
|
-
}
|
|
6366
|
-
|
|
6367
6386
|
function useScreenSize(size) {
|
|
6368
6387
|
return useMedia(`(min-width: ${size}px)`);
|
|
6369
6388
|
}
|
|
@@ -6388,12 +6407,6 @@ function wrapInFragment(value) {
|
|
|
6388
6407
|
});
|
|
6389
6408
|
}
|
|
6390
6409
|
|
|
6391
|
-
var messages$4 = reactIntl.defineMessages({
|
|
6392
|
-
noResultsFound: {
|
|
6393
|
-
id: "neptune.SelectInput.noResultsFound"
|
|
6394
|
-
}
|
|
6395
|
-
});
|
|
6396
|
-
|
|
6397
6410
|
function PreventScroll() {
|
|
6398
6411
|
overlays.usePreventScroll();
|
|
6399
6412
|
return null;
|
|
@@ -6439,29 +6452,29 @@ function BottomSheet({
|
|
|
6439
6452
|
theme: theme,
|
|
6440
6453
|
screenMode: screenMode,
|
|
6441
6454
|
isNotRootProvider: true,
|
|
6442
|
-
children: /*#__PURE__*/jsxRuntime.
|
|
6455
|
+
children: /*#__PURE__*/jsxRuntime.jsxs(react$1.Transition, {
|
|
6443
6456
|
show: open,
|
|
6444
6457
|
className: "np-bottom-sheet-v2-container",
|
|
6445
6458
|
beforeEnter: () => {
|
|
6446
6459
|
setFloatingKey(prev => prev + 1);
|
|
6447
6460
|
},
|
|
6448
|
-
children: /*#__PURE__*/jsxRuntime.
|
|
6449
|
-
|
|
6450
|
-
|
|
6451
|
-
|
|
6452
|
-
|
|
6453
|
-
|
|
6454
|
-
|
|
6455
|
-
|
|
6456
|
-
|
|
6457
|
-
|
|
6458
|
-
|
|
6459
|
-
|
|
6460
|
-
|
|
6461
|
-
|
|
6462
|
-
|
|
6463
|
-
|
|
6464
|
-
|
|
6461
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(react$1.Transition.Child, {
|
|
6462
|
+
enter: "np-bottom-sheet-v2-backdrop-container--enter",
|
|
6463
|
+
enterFrom: "np-bottom-sheet-v2-backdrop-container--enter-from",
|
|
6464
|
+
leave: "np-bottom-sheet-v2-backdrop-container--leave",
|
|
6465
|
+
leaveTo: "np-bottom-sheet-v2-backdrop-container--leave-to",
|
|
6466
|
+
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
6467
|
+
className: "np-bottom-sheet-v2-backdrop"
|
|
6468
|
+
})
|
|
6469
|
+
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
6470
|
+
className: "np-bottom-sheet-v2",
|
|
6471
|
+
children: /*#__PURE__*/jsxRuntime.jsx(react$1.Transition.Child, {
|
|
6472
|
+
className: "np-bottom-sheet-v2-content",
|
|
6473
|
+
enter: "np-bottom-sheet-v2-content--enter",
|
|
6474
|
+
enterFrom: "np-bottom-sheet-v2-content--enter-from",
|
|
6475
|
+
leave: "np-bottom-sheet-v2-content--leave",
|
|
6476
|
+
leaveTo: "np-bottom-sheet-v2-content--leave-to",
|
|
6477
|
+
children: /*#__PURE__*/jsxRuntime.jsx(FocusBoundary, {
|
|
6465
6478
|
children: /*#__PURE__*/jsxRuntime.jsx(react.FloatingFocusManager, {
|
|
6466
6479
|
context: context,
|
|
6467
6480
|
initialFocus: initialFocusRef,
|
|
@@ -6495,8 +6508,8 @@ function BottomSheet({
|
|
|
6495
6508
|
}, floatingKey)
|
|
6496
6509
|
})
|
|
6497
6510
|
})
|
|
6498
|
-
})
|
|
6499
|
-
})
|
|
6511
|
+
})
|
|
6512
|
+
})]
|
|
6500
6513
|
})
|
|
6501
6514
|
})
|
|
6502
6515
|
})]
|
|
@@ -6647,14 +6660,14 @@ function useSelectInputItemCheckPadding() {
|
|
|
6647
6660
|
const SelectInputTriggerButtonPropsContext = /*#__PURE__*/React.createContext({});
|
|
6648
6661
|
const SelectInputOptionContentWithinTriggerContext = /*#__PURE__*/React.createContext(false);
|
|
6649
6662
|
function dedupeSelectInputOptionItem(item, existingValues) {
|
|
6650
|
-
if (
|
|
6651
|
-
|
|
6652
|
-
|
|
6663
|
+
if (existingValues.has(item.value)) {
|
|
6664
|
+
return {
|
|
6665
|
+
...item,
|
|
6666
|
+
value: undefined
|
|
6667
|
+
};
|
|
6653
6668
|
}
|
|
6654
|
-
|
|
6655
|
-
|
|
6656
|
-
value: undefined
|
|
6657
|
-
};
|
|
6669
|
+
existingValues.add(item.value);
|
|
6670
|
+
return item;
|
|
6658
6671
|
}
|
|
6659
6672
|
function dedupeSelectInputItems(items) {
|
|
6660
6673
|
const existingValues = new Set();
|
|
@@ -6675,24 +6688,6 @@ function dedupeSelectInputItems(items) {
|
|
|
6675
6688
|
return item;
|
|
6676
6689
|
});
|
|
6677
6690
|
}
|
|
6678
|
-
function filterSelectInputOptionItem(item, needle) {
|
|
6679
|
-
return inferSearchableStrings(item.filterMatchers ?? item.value).some(haystack => haystack.includes(needle));
|
|
6680
|
-
}
|
|
6681
|
-
function filterSelectInputItems(items, needle) {
|
|
6682
|
-
return items.filter(item => {
|
|
6683
|
-
switch (item.type) {
|
|
6684
|
-
case 'option':
|
|
6685
|
-
{
|
|
6686
|
-
return filterSelectInputOptionItem(item, needle);
|
|
6687
|
-
}
|
|
6688
|
-
case 'group':
|
|
6689
|
-
{
|
|
6690
|
-
return item.options.some(option => filterSelectInputOptionItem(option, needle));
|
|
6691
|
-
}
|
|
6692
|
-
}
|
|
6693
|
-
return false;
|
|
6694
|
-
});
|
|
6695
|
-
}
|
|
6696
6691
|
const defaultRenderTrigger = ({
|
|
6697
6692
|
content,
|
|
6698
6693
|
placeholderShown,
|
|
@@ -6740,7 +6735,7 @@ function SelectInputClearButton({
|
|
|
6740
6735
|
const intl = reactIntl.useIntl();
|
|
6741
6736
|
return /*#__PURE__*/jsxRuntime.jsx("button", {
|
|
6742
6737
|
type: "button",
|
|
6743
|
-
"aria-label": intl.formatMessage(
|
|
6738
|
+
"aria-label": intl.formatMessage(messages$6.ariaLabel),
|
|
6744
6739
|
className: classNames__default.default(className, 'np-select-input-addon np-select-input-addon--interactive'),
|
|
6745
6740
|
onClick: onClick,
|
|
6746
6741
|
children: /*#__PURE__*/jsxRuntime.jsx(icons.Cross, {
|
|
@@ -6881,14 +6876,9 @@ const SelectInputOptionsContainer = /*#__PURE__*/React.forwardRef(function Selec
|
|
|
6881
6876
|
ref: ref,
|
|
6882
6877
|
onKeyDown: event => {
|
|
6883
6878
|
// Prevent absorbing dismissal requests too early
|
|
6884
|
-
if (event.key
|
|
6885
|
-
|
|
6886
|
-
}
|
|
6887
|
-
// Prevent confirmation close without an active item
|
|
6888
|
-
if (event.key === 'Enter' && ariaActiveDescendant == null) {
|
|
6889
|
-
return;
|
|
6879
|
+
if (event.key !== 'Escape') {
|
|
6880
|
+
onKeyDown?.(event);
|
|
6890
6881
|
}
|
|
6891
|
-
onKeyDown?.(event);
|
|
6892
6882
|
},
|
|
6893
6883
|
...restProps
|
|
6894
6884
|
})
|
|
@@ -6902,8 +6892,6 @@ function SelectInputOptions({
|
|
|
6902
6892
|
searchInputRef,
|
|
6903
6893
|
listboxRef
|
|
6904
6894
|
}) {
|
|
6905
|
-
const intl = reactIntl.useIntl();
|
|
6906
|
-
const controllerRef = filterable ? searchInputRef : listboxRef;
|
|
6907
6895
|
const [query, setQuery] = React.useState('');
|
|
6908
6896
|
const needle = React.useMemo(() => {
|
|
6909
6897
|
if (filterable) {
|
|
@@ -6911,16 +6899,14 @@ function SelectInputOptions({
|
|
|
6911
6899
|
}
|
|
6912
6900
|
return undefined;
|
|
6913
6901
|
}, [filterable, query]);
|
|
6914
|
-
const empty = needle != null && filterSelectInputItems(items, needle).length === 0;
|
|
6915
6902
|
const listboxContainerRef = React.useRef(null);
|
|
6916
6903
|
React.useEffect(() => {
|
|
6917
6904
|
if (listboxContainerRef.current != null) {
|
|
6918
6905
|
listboxContainerRef.current.style.setProperty('--initial-height', `${listboxContainerRef.current.offsetHeight}px`);
|
|
6919
6906
|
}
|
|
6920
6907
|
}, []);
|
|
6921
|
-
const showStatus = empty;
|
|
6922
|
-
const statusId = reactId.useId();
|
|
6923
6908
|
const listboxId = reactId.useId();
|
|
6909
|
+
const controllerRef = filterable ? searchInputRef : listboxRef;
|
|
6924
6910
|
return /*#__PURE__*/jsxRuntime.jsxs(react$1.Listbox.Options, {
|
|
6925
6911
|
as: SelectInputOptionsContainer,
|
|
6926
6912
|
static: true,
|
|
@@ -6942,7 +6928,6 @@ function SelectInputOptions({
|
|
|
6942
6928
|
placeholder: filterPlaceholder,
|
|
6943
6929
|
value: query,
|
|
6944
6930
|
"aria-controls": listboxId,
|
|
6945
|
-
"aria-describedby": showStatus ? statusId : undefined,
|
|
6946
6931
|
onKeyDown: event => {
|
|
6947
6932
|
// Prevent interfering with the matcher of Headless UI
|
|
6948
6933
|
// https://mathiasbynens.be/notes/javascript-unicode#regex
|
|
@@ -6954,31 +6939,24 @@ function SelectInputOptions({
|
|
|
6954
6939
|
setQuery(event.currentTarget.value);
|
|
6955
6940
|
}
|
|
6956
6941
|
})
|
|
6957
|
-
}) : null, /*#__PURE__*/jsxRuntime.
|
|
6942
|
+
}) : null, /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
6958
6943
|
ref: listboxContainerRef,
|
|
6959
6944
|
className: classNames__default.default('np-select-input-listbox-container', items.some(item => item.type === 'group') && 'np-select-input-listbox-container--has-group'),
|
|
6960
|
-
children:
|
|
6961
|
-
id: statusId,
|
|
6962
|
-
className: "np-select-input-options-status",
|
|
6963
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(icons.CrossCircle, {
|
|
6964
|
-
size: 16,
|
|
6965
|
-
className: "np-select-input-options-status-icon"
|
|
6966
|
-
}), intl.formatMessage(messages$4.noResultsFound)]
|
|
6967
|
-
}) : null, /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
6945
|
+
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
6968
6946
|
ref: listboxRef,
|
|
6969
6947
|
id: listboxId,
|
|
6970
6948
|
role: "listbox",
|
|
6971
6949
|
"aria-orientation": "vertical",
|
|
6972
6950
|
tabIndex: 0,
|
|
6973
6951
|
className: "np-select-input-listbox",
|
|
6974
|
-
children: (needle
|
|
6952
|
+
children: (needle == null ? items : dedupeSelectInputItems(items)).map((item, index) => /*#__PURE__*/jsxRuntime.jsx(SelectInputItemView
|
|
6975
6953
|
// eslint-disable-next-line react/no-array-index-key
|
|
6976
6954
|
, {
|
|
6977
6955
|
item: item,
|
|
6978
6956
|
renderValue: renderValue,
|
|
6979
6957
|
needle: needle
|
|
6980
6958
|
}, index))
|
|
6981
|
-
})
|
|
6959
|
+
})
|
|
6982
6960
|
})]
|
|
6983
6961
|
});
|
|
6984
6962
|
}
|
|
@@ -6990,7 +6968,7 @@ function SelectInputItemView({
|
|
|
6990
6968
|
switch (item.type) {
|
|
6991
6969
|
case 'option':
|
|
6992
6970
|
{
|
|
6993
|
-
if (item.value != null && (needle
|
|
6971
|
+
if (item.value != null && (!needle || inferSearchableStrings(item.filterMatchers ?? item.value).some(haystack => haystack.includes(needle)))) {
|
|
6994
6972
|
return /*#__PURE__*/jsxRuntime.jsx(SelectInputOption, {
|
|
6995
6973
|
value: item.value,
|
|
6996
6974
|
disabled: item.disabled,
|
|
@@ -10765,7 +10743,6 @@ var en = {
|
|
|
10765
10743
|
"neptune.Link.opensInNewTab": "(opens in new tab)",
|
|
10766
10744
|
"neptune.MoneyInput.Select.placeholder": "Select an option...",
|
|
10767
10745
|
"neptune.Select.searchPlaceholder": "Search...",
|
|
10768
|
-
"neptune.SelectInput.noResultsFound": "No results found",
|
|
10769
10746
|
"neptune.Summary.statusDone": "Item done",
|
|
10770
10747
|
"neptune.Summary.statusNotDone": "Item to do",
|
|
10771
10748
|
"neptune.Summary.statusPending": "Item pending",
|