@transferwise/components 0.0.0-experimental-cbd2a4c → 0.0.0-experimental-9dec57a
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.js +13 -45
- package/build/index.js.map +1 -1
- package/build/index.mjs +12 -44
- package/build/index.mjs.map +1 -1
- package/build/types/alert/inlineMarkdown/InlineMarkdown.d.ts +5 -11
- package/build/types/alert/inlineMarkdown/InlineMarkdown.d.ts.map +1 -1
- package/build/types/alert/inlineMarkdown/index.d.ts +2 -1
- package/build/types/alert/inlineMarkdown/index.d.ts.map +1 -1
- package/build/types/drawer/Drawer.d.ts +19 -36
- package/build/types/drawer/Drawer.d.ts.map +1 -1
- package/build/types/drawer/index.d.ts +2 -1
- package/build/types/drawer/index.d.ts.map +1 -1
- package/build/types/index.d.ts +1 -0
- package/build/types/index.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/alert/inlineMarkdown/InlineMarkdown.tsx +13 -0
- package/src/alert/inlineMarkdown/index.ts +2 -0
- package/src/drawer/{Drawer.rtl.spec.js → Drawer.rtl.spec.tsx} +4 -2
- package/src/drawer/{Drawer.story.js → Drawer.story.tsx} +20 -28
- package/src/drawer/{Drawer.js → Drawer.tsx} +26 -31
- package/src/drawer/index.ts +2 -0
- package/src/index.ts +1 -0
- package/src/alert/inlineMarkdown/InlineMarkdown.js +0 -21
- package/src/alert/inlineMarkdown/index.js +0 -1
- package/src/drawer/index.js +0 -1
- /package/src/drawer/__snapshots__/{Drawer.rtl.spec.js.snap → Drawer.rtl.spec.tsx.snap} +0 -0
package/build/index.mjs
CHANGED
|
@@ -4,7 +4,6 @@ import classNames from 'classnames';
|
|
|
4
4
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
5
5
|
import { ChevronUp, CrossCircleFill, Cross, Check, Info as Info$1, Alert as Alert$1, ClockBorderless, NavigateAway, Briefcase, Person, ArrowRight, Download, ChevronLeft, ChevronRight, AlertCircleFill, AlertCircle, ArrowLeft, QuestionMarkCircle, Search, CrossCircle, ChevronDown, CheckCircleFill, ClockFill, Upload as Upload$2, Document, Plus, PlusCircle } from '@transferwise/icons';
|
|
6
6
|
import { defineMessages, useIntl, injectIntl, IntlProvider } from 'react-intl';
|
|
7
|
-
import PropTypes from 'prop-types';
|
|
8
7
|
import commonmark from 'commonmark';
|
|
9
8
|
import { useTheme, ThemeProvider } from '@wise/components-theming';
|
|
10
9
|
import { CSSTransition } from 'react-transition-group';
|
|
@@ -17,6 +16,7 @@ import mergeProps from 'merge-props';
|
|
|
17
16
|
import { useFloating, useDismiss, useRole, useInteractions, FloatingPortal, FloatingFocusManager, offset, flip, shift, size, autoUpdate } from '@floating-ui/react';
|
|
18
17
|
import { usePreventScroll } from '@react-aria/overlays';
|
|
19
18
|
import { usePopper } from 'react-popper';
|
|
19
|
+
import PropTypes from 'prop-types';
|
|
20
20
|
import { Flag, Illustration } from '@wise/art';
|
|
21
21
|
import clamp$2 from 'lodash.clamp';
|
|
22
22
|
import debounce from 'lodash.debounce';
|
|
@@ -830,21 +830,14 @@ function stripNodes({
|
|
|
830
830
|
}
|
|
831
831
|
|
|
832
832
|
const allowList = [MarkdownNodeType.STRONG];
|
|
833
|
-
|
|
833
|
+
function InlineMarkdown(props) {
|
|
834
834
|
return /*#__PURE__*/jsx(Markdown, {
|
|
835
835
|
...props,
|
|
836
836
|
as: "span",
|
|
837
837
|
allowList: allowList,
|
|
838
838
|
blockList: undefined
|
|
839
839
|
});
|
|
840
|
-
}
|
|
841
|
-
InlineMarkdown.propTypes = {
|
|
842
|
-
children: PropTypes.string.isRequired,
|
|
843
|
-
className: PropTypes.string
|
|
844
|
-
};
|
|
845
|
-
InlineMarkdown.defaultProps = {
|
|
846
|
-
className: undefined
|
|
847
|
-
};
|
|
840
|
+
}
|
|
848
841
|
|
|
849
842
|
var messages$c = defineMessages({
|
|
850
843
|
opensInNewTab: {
|
|
@@ -2749,15 +2742,15 @@ const SlidingPanel = /*#__PURE__*/forwardRef(({
|
|
|
2749
2742
|
}));
|
|
2750
2743
|
});
|
|
2751
2744
|
|
|
2752
|
-
|
|
2745
|
+
function Drawer({
|
|
2753
2746
|
children,
|
|
2754
2747
|
className,
|
|
2755
2748
|
footerContent,
|
|
2756
2749
|
headerTitle,
|
|
2757
2750
|
onClose,
|
|
2758
|
-
open,
|
|
2759
|
-
position
|
|
2760
|
-
})
|
|
2751
|
+
open = false,
|
|
2752
|
+
position = 'right'
|
|
2753
|
+
}) {
|
|
2761
2754
|
logActionRequiredIf('Drawer now expects `onClose`, and will soon make this prop required. Please update your usage to provide it.', !onClose);
|
|
2762
2755
|
const {
|
|
2763
2756
|
isMobile
|
|
@@ -2795,32 +2788,7 @@ const Drawer = ({
|
|
|
2795
2788
|
})
|
|
2796
2789
|
})
|
|
2797
2790
|
});
|
|
2798
|
-
}
|
|
2799
|
-
Drawer.propTypes = {
|
|
2800
|
-
/** The content to appear in the drawer body. */
|
|
2801
|
-
children: PropTypes.node,
|
|
2802
|
-
className: PropTypes.string,
|
|
2803
|
-
/** The content to appear in the drawer footer. */
|
|
2804
|
-
footerContent: PropTypes.node,
|
|
2805
|
-
/** The content to appear in the drawer header. */
|
|
2806
|
-
headerTitle: PropTypes.node,
|
|
2807
|
-
/** The status of Drawer either open or not. */
|
|
2808
|
-
open: PropTypes.bool,
|
|
2809
|
-
/** The placement of Drawer on the screen either left or right. On mobile it will default to bottom. */
|
|
2810
|
-
position: PropTypes.oneOf(['left', 'right', 'bottom']),
|
|
2811
|
-
/** The action to perform on close click. */
|
|
2812
|
-
onClose: PropTypes.func
|
|
2813
|
-
};
|
|
2814
|
-
Drawer.defaultProps = {
|
|
2815
|
-
children: null,
|
|
2816
|
-
className: undefined,
|
|
2817
|
-
footerContent: null,
|
|
2818
|
-
headerTitle: null,
|
|
2819
|
-
onClose: null,
|
|
2820
|
-
open: false,
|
|
2821
|
-
position: Position.RIGHT
|
|
2822
|
-
};
|
|
2823
|
-
var Drawer$1 = Drawer;
|
|
2791
|
+
}
|
|
2824
2792
|
|
|
2825
2793
|
const INITIAL_Y_POSITION = 0;
|
|
2826
2794
|
const CONTENT_SCROLL_THRESHOLD = 1;
|
|
@@ -2950,7 +2918,7 @@ const BottomSheet$1 = props => {
|
|
|
2950
2918
|
};
|
|
2951
2919
|
}
|
|
2952
2920
|
const is400Zoom = useMedia(`(max-width: ${Breakpoint.ZOOM_400}px)`);
|
|
2953
|
-
return is400Zoom ? /*#__PURE__*/jsx(Drawer
|
|
2921
|
+
return is400Zoom ? /*#__PURE__*/jsx(Drawer, {
|
|
2954
2922
|
open: props.open,
|
|
2955
2923
|
className: props.className,
|
|
2956
2924
|
onClose: close,
|
|
@@ -5543,7 +5511,7 @@ const Modal = ({
|
|
|
5543
5511
|
const noDivider = checkSpecialClasses('no-divider');
|
|
5544
5512
|
const contentReference = useRef(null);
|
|
5545
5513
|
const titleId = useId();
|
|
5546
|
-
return !isMedium ? /*#__PURE__*/jsx(Drawer
|
|
5514
|
+
return !isMedium ? /*#__PURE__*/jsx(Drawer, {
|
|
5547
5515
|
open: open,
|
|
5548
5516
|
headerTitle: title,
|
|
5549
5517
|
footerContent: footer,
|
|
@@ -10371,7 +10339,7 @@ function Select({
|
|
|
10371
10339
|
, {
|
|
10372
10340
|
className: classNames(s('tw-icon'), s('tw-chevron-up-icon'), s('tw-chevron'), s('bottom'), s('np-select-chevron'))
|
|
10373
10341
|
})]
|
|
10374
|
-
}), isMobile ? isSearchEnabled ? /*#__PURE__*/jsx(Drawer
|
|
10342
|
+
}), isMobile ? isSearchEnabled ? /*#__PURE__*/jsx(Drawer, {
|
|
10375
10343
|
open: open,
|
|
10376
10344
|
headerTitle: searchPlaceholder || formatMessage(messages$2.searchPlaceholder),
|
|
10377
10345
|
onClose: handleCloseOptions,
|
|
@@ -14665,5 +14633,5 @@ const translations = {
|
|
|
14665
14633
|
'zh-HK': zhHK
|
|
14666
14634
|
};
|
|
14667
14635
|
|
|
14668
|
-
export { Accordion, ActionButton, ActionOption, Alert, AlertArrowPosition, Avatar, AvatarType, AvatarWrapper, Badge, Card$2 as BaseCard, Body, BottomSheet$1 as BottomSheet, Breakpoint, Button, Card$1 as Card, Carousel, Checkbox, CheckboxButton, CheckboxOption, Chevron, Chip, Chips, CircularButton, ControlType, CriticalCommsBanner, DEFAULT_LANG, DEFAULT_LOCALE, DateInput, DateLookup$1 as DateLookup, DateMode, Decision, DecisionPresentation, DecisionType, DefinitionList, Dimmer$1 as Dimmer, Direction, DirectionProvider, Display, Drawer
|
|
14636
|
+
export { Accordion, ActionButton, ActionOption, Alert, AlertArrowPosition, Avatar, AvatarType, AvatarWrapper, Badge, Card$2 as BaseCard, Body, BottomSheet$1 as BottomSheet, Breakpoint, Button, Card$1 as Card, Carousel, Checkbox, CheckboxButton, CheckboxOption, Chevron, Chip, Chips, CircularButton, ControlType, CriticalCommsBanner, DEFAULT_LANG, DEFAULT_LOCALE, DateInput, DateLookup$1 as DateLookup, DateMode, Decision, DecisionPresentation, DecisionType, DefinitionList, Dimmer$1 as Dimmer, Direction, DirectionProvider, Display, Drawer, DropFade, Emphasis, Field, FileType, FlowNavigation, Header, Image, Info, InfoPresentation, InlineAlert, Input, InputGroup, InputWithDisplayFormat, InstructionsList, Label, LanguageProvider, Layout, Link, ListItem$1 as ListItem, Loader, Logo, LogoType, Markdown, MarkdownNodeType, Modal, Money, MoneyInput$1 as MoneyInput, MonthFormat, NavigationOption, NavigationOptionList as NavigationOptionsList, Nudge, Option$2 as Option, OverlayHeader$1 as OverlayHeader, PhoneNumberInput, Popover$1 as Popover, Position, Priority, ProcessIndicator, ProfileType, Progress, ProgressBar, PromoCard$1 as PromoCard, PromoCardGroup$1 as PromoCardGroup, 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$1 as Typeahead, Typography, Upload$1 as Upload, UploadInput, UploadStep, Variant, Width, adjustLocale, getCountryFromLocale, getDirectionFromLocale, getLangFromLocale, isBrowser, isServerSide, translations, useDirection, useLayout, useScreenSize, useSnackbar };
|
|
14669
14637
|
//# sourceMappingURL=index.mjs.map
|