@transferwise/components 0.0.0-experimental-81baec1 → 0.0.0-experimental-76a7e6a
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/{index.mjs → index.esm.js} +4 -15
- package/build/index.esm.js.map +1 -0
- package/build/index.js +7 -17
- package/build/index.js.map +1 -1
- package/build/{mocks.mjs → mocks.esm.js} +1 -1
- package/build/mocks.esm.js.map +1 -0
- package/build/types/common/hooks/useMedia.d.ts.map +1 -1
- package/build/types/segmentedControl/SegmentedControl.d.ts.map +1 -1
- package/package.json +6 -22
- package/src/common/hooks/useMedia.ts +1 -2
- package/src/inputWithDisplayFormat/InputWithDisplayFormat.story.js +3 -2
- package/src/radio/Radio.story.tsx +3 -4
- package/src/segmentedControl/SegmentedControl.tsx +1 -0
- package/src/switch/Switch.story.tsx +4 -1
- package/build/index.mjs.map +0 -1
- package/build/mocks.mjs.map +0 -1
|
@@ -10,7 +10,8 @@ import { useTheme, ThemeProvider } from '@wise/components-theming';
|
|
|
10
10
|
import { formatDate, formatNumber, formatMoney, formatAmount } from '@transferwise/formatting';
|
|
11
11
|
import { Transition, Listbox } from '@headlessui/react';
|
|
12
12
|
import mergeProps from 'merge-props';
|
|
13
|
-
import
|
|
13
|
+
import mergeRefs from 'react-merge-refs';
|
|
14
|
+
import { useSyncExternalStore } from 'use-sync-external-store/shim';
|
|
14
15
|
import { useFloating, useDismiss, useRole, useInteractions, FloatingPortal, FloatingFocusManager, offset, flip, shift, size, autoUpdate } from '@floating-ui/react';
|
|
15
16
|
import { FocusScope } from '@react-aria/focus';
|
|
16
17
|
import { usePreventScroll } from '@react-aria/overlays';
|
|
@@ -1717,7 +1718,6 @@ const useHasIntersected = ({
|
|
|
1717
1718
|
return [hasIntersected];
|
|
1718
1719
|
};
|
|
1719
1720
|
|
|
1720
|
-
// eslint-disable-next-line import/extensions
|
|
1721
1721
|
function useMedia(query) {
|
|
1722
1722
|
return useSyncExternalStore(onStoreChange => {
|
|
1723
1723
|
const mediaQueryList = window.matchMedia(query);
|
|
@@ -1751,18 +1751,6 @@ const useLayout = () => {
|
|
|
1751
1751
|
};
|
|
1752
1752
|
};
|
|
1753
1753
|
|
|
1754
|
-
function mergeRefs(refs) {
|
|
1755
|
-
return function (value) {
|
|
1756
|
-
refs.forEach(function (ref) {
|
|
1757
|
-
if (typeof ref === "function") {
|
|
1758
|
-
ref(value);
|
|
1759
|
-
} else if (ref != null) {
|
|
1760
|
-
ref.current = value;
|
|
1761
|
-
}
|
|
1762
|
-
});
|
|
1763
|
-
};
|
|
1764
|
-
}
|
|
1765
|
-
|
|
1766
1754
|
const EXIT_ANIMATION = 350;
|
|
1767
1755
|
const SlidingPanel = /*#__PURE__*/forwardRef(({
|
|
1768
1756
|
position = 'left',
|
|
@@ -10730,6 +10718,7 @@ const SegmentedControl = ({
|
|
|
10730
10718
|
className: classNames('segmented-control__segments', {
|
|
10731
10719
|
'segmented-control__segments--no-animate': !animate
|
|
10732
10720
|
}),
|
|
10721
|
+
role: mode !== 'input' ? 'tablist' : undefined,
|
|
10733
10722
|
children: segmentsWithRefs.map(segment => mode === 'input' ? /*#__PURE__*/jsxs("label", {
|
|
10734
10723
|
ref: segment.ref,
|
|
10735
10724
|
htmlFor: segment.id,
|
|
@@ -15072,4 +15061,4 @@ const translations = {
|
|
|
15072
15061
|
};
|
|
15073
15062
|
|
|
15074
15063
|
export { Accordion, ActionButton, ActionOption, Alert$1 as Alert, ArrowPosition as AlertArrowPosition, Avatar, AvatarType, AvatarWrapper, Badge, Card as BaseCard, Body, BottomSheet$2 as BottomSheet, Breakpoint, Button, Card$2 as Card, Checkbox$1 as Checkbox, CheckboxButton$1 as CheckboxButton, CheckboxOption, Chevron, Chip, Chips, CircularButton, ControlType, CriticalCommsBanner, DEFAULT_LANG, DEFAULT_LOCALE, DateInput, DateLookup$1 as DateLookup, DateMode, Decision, DecisionPresentation, DecisionType, DefinitionList$1 as DefinitionList, Dimmer$1 as Dimmer, Direction, DirectionProvider, Display, Drawer$1 as Drawer, DropFade, DynamicFieldDefinitionList$1 as DynamicFieldDefinitionList, Emphasis, FileType, FlowNavigation, Header, Image, Info, InfoPresentation, InlineAlert, Input, InputGroup, InputWithDisplayFormat, InstructionsList, LanguageProvider, Layout, Link, ListItem$1 as ListItem, Loader$1 as Loader, Logo$1 as Logo, LogoType, Markdown, MarkdownNodeType, Modal, Money$1 as Money, MoneyInput$1 as MoneyInput, MonthFormat, NavigationOption, NavigationOptionList$1 as NavigationOptionsList, Nudge, Option$2 as Option, OverlayHeader$1 as OverlayHeader, PhoneNumberInput, Popover$1 as Popover, Position, Priority, ProcessIndicator$1 as ProcessIndicator, ProfileType, Progress, ProgressBar, PromoCard$1 as PromoCard, PromoCard$1 as PromoCardGroup, Provider$1 as Provider, RTL_LANGUAGES, Radio, RadioGroup, RadioOption, SUPPORTED_LANGUAGES, Scroll, SearchInput, Section, SegmentedControl, Select, SelectInput, SelectInputOptionContent, SelectInputTriggerButton, Sentiment, Size, SlidingPanel, SnackbarConsumer, SnackbarContext, SnackbarPortal, SnackbarProvider, Status, StatusIcon, Stepper, Sticky, Summary, Switch, SwitchOption, Tabs$1 as Tabs, TextArea, TextareaWithDisplayFormat, Theme, Title, Tooltip, Type, Typeahead, Typography, Upload$1 as Upload, UploadInput, UploadStep, Variant, Width, adjustLocale, getCountryFromLocale, getDirectionFromLocale, getLangFromLocale, isBrowser, isServerSide, translations, useDirection, useLayout, useScreenSize, useSnackbar };
|
|
15075
|
-
//# sourceMappingURL=index.
|
|
15064
|
+
//# sourceMappingURL=index.esm.js.map
|