@transferwise/components 0.0.0-experimental-892d236 → 0.0.0-experimental-5d4d1ec
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.esm.js +20 -17
- package/build/index.esm.js.map +1 -1
- package/build/index.js +20 -17
- package/build/index.js.map +1 -1
- package/build/types/index.d.ts +1 -0
- package/build/types/index.d.ts.map +1 -1
- package/build/types/instructionsList/InstructionsList.d.ts +4 -2
- package/build/types/instructionsList/InstructionsList.d.ts.map +1 -1
- package/build/types/instructionsList/index.d.ts +2 -2
- package/build/types/instructionsList/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +1 -0
- package/src/instructionsList/InstructionsList.spec.tsx +14 -0
- package/src/instructionsList/{InstructionList.story.tsx → InstructionsList.story.tsx} +14 -2
- package/src/instructionsList/InstructionsList.tsx +23 -17
- package/src/instructionsList/index.ts +3 -0
- package/src/instructionsList/index.js +0 -3
package/build/index.esm.js
CHANGED
|
@@ -7382,23 +7382,27 @@ const InputWithDisplayFormat = props => /*#__PURE__*/jsx(WithDisplayFormat, {
|
|
|
7382
7382
|
|
|
7383
7383
|
const InstructionsList = ({
|
|
7384
7384
|
dos,
|
|
7385
|
-
donts
|
|
7385
|
+
donts,
|
|
7386
|
+
sort = 'dosFirst'
|
|
7386
7387
|
}) => {
|
|
7387
|
-
|
|
7388
|
+
const dosInstructions = dos?.map((doThis, index) =>
|
|
7389
|
+
/*#__PURE__*/
|
|
7390
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
7391
|
+
jsx(Instruction, {
|
|
7392
|
+
item: doThis,
|
|
7393
|
+
type: "do"
|
|
7394
|
+
}, index)) ?? null;
|
|
7395
|
+
const dontsInstructions = donts?.map((dont, index) =>
|
|
7396
|
+
/*#__PURE__*/
|
|
7397
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
7398
|
+
jsx(Instruction, {
|
|
7399
|
+
item: dont,
|
|
7400
|
+
type: "dont"
|
|
7401
|
+
}, index)) ?? null;
|
|
7402
|
+
const orderedInstructions = sort === 'dosFirst' ? [dosInstructions, dontsInstructions] : [dontsInstructions, dosInstructions];
|
|
7403
|
+
return /*#__PURE__*/jsx("div", {
|
|
7388
7404
|
className: "tw-instructions",
|
|
7389
|
-
children:
|
|
7390
|
-
/*#__PURE__*/
|
|
7391
|
-
// eslint-disable-next-line react/no-array-index-key
|
|
7392
|
-
jsx(Instruction, {
|
|
7393
|
-
item: doThis,
|
|
7394
|
-
type: "do"
|
|
7395
|
-
}, index)), donts && donts.map((dont, index) =>
|
|
7396
|
-
/*#__PURE__*/
|
|
7397
|
-
// eslint-disable-next-line react/no-array-index-key
|
|
7398
|
-
jsx(Instruction, {
|
|
7399
|
-
item: dont,
|
|
7400
|
-
type: "dont"
|
|
7401
|
-
}, index))]
|
|
7405
|
+
children: orderedInstructions
|
|
7402
7406
|
});
|
|
7403
7407
|
};
|
|
7404
7408
|
function Instruction({
|
|
@@ -7422,7 +7426,6 @@ function Instruction({
|
|
|
7422
7426
|
})]
|
|
7423
7427
|
});
|
|
7424
7428
|
}
|
|
7425
|
-
var InstructionsList$1 = InstructionsList;
|
|
7426
7429
|
|
|
7427
7430
|
const Loader = ({
|
|
7428
7431
|
small = false,
|
|
@@ -15148,5 +15151,5 @@ const translations = {
|
|
|
15148
15151
|
'zh-HK': zhHK
|
|
15149
15152
|
};
|
|
15150
15153
|
|
|
15151
|
-
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$1 as 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
|
|
15154
|
+
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$1 as 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$1 as 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$2 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$1 as SlidingPanel, SnackbarConsumer, SnackbarContext, SnackbarPortal, SnackbarProvider, Status, StatusIcon, Stepper, Sticky$1 as Sticky, Summary, Switch, SwitchOption, Tabs$1 as Tabs, TextArea, TextareaWithDisplayFormat, Theme, Title, Tooltip$1 as Tooltip, Type, Typeahead, Typography, Upload$1 as Upload, UploadInput, UploadStep, Variant, Width, adjustLocale, getCountryFromLocale, getDirectionFromLocale, getLangFromLocale, isBrowser, isServerSide, translations, useDirection, useLayout, useScreenSize, useSnackbar };
|
|
15152
15155
|
//# sourceMappingURL=index.esm.js.map
|