@transferwise/components 0.0.0-experimental-da80ff5 → 0.0.0-experimental-9c48d41
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 +4 -4
- package/build/inputs/SelectInput.mjs +1 -1
- package/build/listItem/Prompt/ListItemPrompt.js +0 -3
- package/build/listItem/Prompt/ListItemPrompt.js.map +1 -1
- package/build/listItem/Prompt/ListItemPrompt.mjs +1 -1
- package/build/popover/Popover.mjs +1 -1
- package/build/promoCard/PromoCardContext.mjs +1 -1
- package/build/tabs/Tabs.mjs +1 -1
- package/package.json +13 -13
package/build/index.js
CHANGED
|
@@ -23,7 +23,7 @@ var Body = require('./body/Body.js');
|
|
|
23
23
|
var Button_resolver = require('./button/Button.resolver.js');
|
|
24
24
|
var IconButton = require('./iconButton/IconButton.js');
|
|
25
25
|
var Carousel = require('./carousel/Carousel.js');
|
|
26
|
-
var Card = require('./card/Card.js');
|
|
26
|
+
var Card$1 = require('./card/Card.js');
|
|
27
27
|
var Checkbox = require('./checkbox/Checkbox.js');
|
|
28
28
|
var CheckboxButton = require('./checkboxButton/CheckboxButton.js');
|
|
29
29
|
var CheckboxOption = require('./checkboxOption/CheckboxOption.js');
|
|
@@ -33,7 +33,7 @@ var Chip = require('./chips/Chip.js');
|
|
|
33
33
|
var CircularButton = require('./circularButton/CircularButton.js');
|
|
34
34
|
var Option = require('./common/Option/Option.js');
|
|
35
35
|
var BottomSheet = require('./common/bottomSheet/BottomSheet.js');
|
|
36
|
-
var Card
|
|
36
|
+
var Card = require('./common/card/Card.js');
|
|
37
37
|
var CriticalCommsBanner = require('./criticalBanner/CriticalCommsBanner.js');
|
|
38
38
|
var DateInput = require('./dateInput/DateInput.js');
|
|
39
39
|
var DateLookup = require('./dateLookup/DateLookup.js');
|
|
@@ -171,7 +171,7 @@ exports.Body = Body.default;
|
|
|
171
171
|
exports.Button = Button_resolver.default;
|
|
172
172
|
exports.IconButton = IconButton.default;
|
|
173
173
|
exports.Carousel = Carousel.default;
|
|
174
|
-
exports.Card = Card.default;
|
|
174
|
+
exports.Card = Card$1.default;
|
|
175
175
|
exports.Checkbox = Checkbox.default;
|
|
176
176
|
exports.CheckboxButton = CheckboxButton.default;
|
|
177
177
|
exports.CheckboxOption = CheckboxOption.default;
|
|
@@ -181,7 +181,7 @@ exports.Chip = Chip.default;
|
|
|
181
181
|
exports.CircularButton = CircularButton.default;
|
|
182
182
|
exports.Option = Option.default;
|
|
183
183
|
exports.BottomSheet = BottomSheet.default;
|
|
184
|
-
exports.BaseCard = Card
|
|
184
|
+
exports.BaseCard = Card.default;
|
|
185
185
|
exports.CriticalCommsBanner = CriticalCommsBanner.default;
|
|
186
186
|
exports.DateInput = DateInput.default;
|
|
187
187
|
exports.DateLookup = DateLookup.default;
|
|
@@ -2,7 +2,7 @@ import { Listbox, ListboxOptions, ListboxButton, ListboxOption } from '@headless
|
|
|
2
2
|
import { CrossCircle, ChevronDown, Cross, Check } from '@transferwise/icons';
|
|
3
3
|
import { clsx } from 'clsx';
|
|
4
4
|
import mergeProps from 'merge-props';
|
|
5
|
-
import { useState, useRef, useEffect, useDeferredValue,
|
|
5
|
+
import { useState, useRef, useEffect, useDeferredValue, useContext, useMemo, useId, createContext, forwardRef } from 'react';
|
|
6
6
|
import { useIntl } from 'react-intl';
|
|
7
7
|
import { Virtualizer } from 'virtua';
|
|
8
8
|
import { useEffectEvent } from '../common/hooks/useEffectEvent.mjs';
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var React = require('react');
|
|
6
4
|
require('../../common/theme.js');
|
|
7
5
|
require('../../common/direction.js');
|
|
@@ -52,5 +50,4 @@ const Prompt = ({
|
|
|
52
50
|
Prompt.displayName = 'ListItem.Prompt';
|
|
53
51
|
|
|
54
52
|
exports.Prompt = Prompt;
|
|
55
|
-
exports.default = Prompt;
|
|
56
53
|
//# sourceMappingURL=ListItemPrompt.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItemPrompt.js","sources":["../../../src/listItem/Prompt/ListItemPrompt.tsx"],"sourcesContent":["import { useContext } from 'react';\nimport { Sentiment } from '../../common';\nimport { ListItemContext, type ListItemContextData } from '../ListItemContext';\nimport { InlinePrompt, type InlinePromptProps } from '../../prompt';\n\nexport type ListItemPromptProps = Pick<InlinePromptProps, 'children' | 'sentiment' | 'mediaLabel'>;\n\n/**\n * This component allows for rendering an Inline Prompt. <br />\n * In the future it will be a thin wrapper around a standalone component.<br />\n *\n * Please refer to the [Design documentation](https://wise.design/components/list-item#prompt) for details.\n */\nexport const Prompt = ({\n sentiment = Sentiment.NEUTRAL,\n mediaLabel,\n children,\n}: ListItemPromptProps) => {\n const { ids, props } = useContext<ListItemContextData>(ListItemContext);\n const isLongLivedMuted = props.disabled && Boolean(props.disabledPromptMessage);\n\n return (\n <InlinePrompt\n id={ids.prompt}\n sentiment={sentiment}\n mediaLabel={mediaLabel}\n muted={isLongLivedMuted}\n className=\"wds-list-item-prompt\"\n >\n {isLongLivedMuted ? props.disabledPromptMessage : children}\n </InlinePrompt>\n );\n};\n\nPrompt.displayName = 'ListItem.Prompt';\nexport default Prompt;\n"],"names":["Prompt","sentiment","Sentiment","NEUTRAL","mediaLabel","children","ids","props","useContext","ListItemContext","isLongLivedMuted","disabled","Boolean","disabledPromptMessage","_jsx","InlinePrompt","id","prompt","muted","className","displayName"],"mappings":"
|
|
1
|
+
{"version":3,"file":"ListItemPrompt.js","sources":["../../../src/listItem/Prompt/ListItemPrompt.tsx"],"sourcesContent":["import { useContext } from 'react';\nimport { Sentiment } from '../../common';\nimport { ListItemContext, type ListItemContextData } from '../ListItemContext';\nimport { InlinePrompt, type InlinePromptProps } from '../../prompt';\n\nexport type ListItemPromptProps = Pick<InlinePromptProps, 'children' | 'sentiment' | 'mediaLabel'>;\n\n/**\n * This component allows for rendering an Inline Prompt. <br />\n * In the future it will be a thin wrapper around a standalone component.<br />\n *\n * Please refer to the [Design documentation](https://wise.design/components/list-item#prompt) for details.\n */\nexport const Prompt = ({\n sentiment = Sentiment.NEUTRAL,\n mediaLabel,\n children,\n}: ListItemPromptProps) => {\n const { ids, props } = useContext<ListItemContextData>(ListItemContext);\n const isLongLivedMuted = props.disabled && Boolean(props.disabledPromptMessage);\n\n return (\n <InlinePrompt\n id={ids.prompt}\n sentiment={sentiment}\n mediaLabel={mediaLabel}\n muted={isLongLivedMuted}\n className=\"wds-list-item-prompt\"\n >\n {isLongLivedMuted ? props.disabledPromptMessage : children}\n </InlinePrompt>\n );\n};\n\nPrompt.displayName = 'ListItem.Prompt';\nexport default Prompt;\n"],"names":["Prompt","sentiment","Sentiment","NEUTRAL","mediaLabel","children","ids","props","useContext","ListItemContext","isLongLivedMuted","disabled","Boolean","disabledPromptMessage","_jsx","InlinePrompt","id","prompt","muted","className","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaO,MAAMA,MAAM,GAAGA,CAAC;aACrBC,WAAS,GAAGC,mBAAS,CAACC,OAAO;EAC7BC,UAAU;AACVC,EAAAA;AAAQ,CACY,KAAI;EACxB,MAAM;IAAEC,GAAG;AAAEC,IAAAA;AAAK,GAAE,GAAGC,gBAAU,CAAsBC,+BAAe,CAAC;EACvE,MAAMC,gBAAgB,GAAGH,KAAK,CAACI,QAAQ,IAAIC,OAAO,CAACL,KAAK,CAACM,qBAAqB,CAAC;EAE/E,oBACEC,cAAA,CAACC,yBAAY,EAAA;IACXC,EAAE,EAAEV,GAAG,CAACW,MAAO;AACfhB,IAAAA,SAAS,EAAEA,WAAU;AACrBG,IAAAA,UAAU,EAAEA,UAAW;AACvBc,IAAAA,KAAK,EAAER,gBAAiB;AACxBS,IAAAA,SAAS,EAAC,sBAAsB;AAAAd,IAAAA,QAAA,EAE/BK,gBAAgB,GAAGH,KAAK,CAACM,qBAAqB,GAAGR;AAAQ,GAC9C,CAAC;AAEnB;AAEAL,MAAM,CAACoB,WAAW,GAAG,iBAAiB;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { clsx } from 'clsx';
|
|
2
|
-
import { useId, useEffect, useRef, useState,
|
|
2
|
+
import { useId, useEffect, useRef, useState, isValidElement, cloneElement } from 'react';
|
|
3
3
|
import '../common/theme.mjs';
|
|
4
4
|
import '../common/direction.mjs';
|
|
5
5
|
import '../common/propsValues/control.mjs';
|
package/build/tabs/Tabs.mjs
CHANGED
|
@@ -29,7 +29,7 @@ import { DirectionContext } from '../provider/direction/DirectionProvider.mjs';
|
|
|
29
29
|
import Tab from './Tab.mjs';
|
|
30
30
|
import TabList from './TabList.mjs';
|
|
31
31
|
import TabPanel from './TabPanel.mjs';
|
|
32
|
-
import { swipedLeftToRight, swipedRightToLeft, getSwipeDifference,
|
|
32
|
+
import { swipedLeftToRight, swipedRightToLeft, getSwipeDifference, getVelocity, swipeShouldChangeTab, getElasticDragDifference } from './utils.mjs';
|
|
33
33
|
|
|
34
34
|
const MIN_INDEX = 0;
|
|
35
35
|
const SpacerWidth = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@transferwise/components",
|
|
3
|
-
"version": "0.0.0-experimental-
|
|
3
|
+
"version": "0.0.0-experimental-9c48d41",
|
|
4
4
|
"description": "Neptune React components",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -38,12 +38,12 @@
|
|
|
38
38
|
"!**/*.tsbuildinfo"
|
|
39
39
|
],
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@babel/core": "^7.28.
|
|
41
|
+
"@babel/core": "^7.28.6",
|
|
42
42
|
"@babel/plugin-transform-runtime": "^7.28.5",
|
|
43
|
-
"@babel/preset-env": "^7.28.
|
|
43
|
+
"@babel/preset-env": "^7.28.6",
|
|
44
44
|
"@babel/preset-react": "^7.28.5",
|
|
45
45
|
"@babel/preset-typescript": "^7.28.5",
|
|
46
|
-
"@formatjs/cli": "^6.
|
|
46
|
+
"@formatjs/cli": "^6.12.0",
|
|
47
47
|
"@rollup/plugin-babel": "^6.1.0",
|
|
48
48
|
"@rollup/plugin-json": "^6.1.0",
|
|
49
49
|
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
@@ -63,15 +63,15 @@
|
|
|
63
63
|
"@types/babel__core": "^7.20.5",
|
|
64
64
|
"@types/commonmark": "^0.27.10",
|
|
65
65
|
"@types/jest": "^30.0.0",
|
|
66
|
-
"@types/lodash": "4.17.
|
|
66
|
+
"@types/lodash": "4.17.23",
|
|
67
67
|
"@types/lodash.clamp": "^4.0.9",
|
|
68
68
|
"@types/lodash.debounce": "^4.0.9",
|
|
69
|
-
"@types/react": "^18.3.
|
|
69
|
+
"@types/react": "^18.3.27",
|
|
70
70
|
"@types/react-dom": "^18.3.7",
|
|
71
71
|
"@types/react-transition-group": "4.4.12",
|
|
72
72
|
"@wise/art": "^2.26.0",
|
|
73
73
|
"@wise/eslint-config": "^13.3.0",
|
|
74
|
-
"babel-plugin-formatjs": "^10.5.
|
|
74
|
+
"babel-plugin-formatjs": "^10.5.41",
|
|
75
75
|
"eslint": "^9.39.2",
|
|
76
76
|
"eslint-plugin-storybook": "^10.3.0-alpha.0",
|
|
77
77
|
"gulp": "^5.0.1",
|
|
@@ -80,11 +80,11 @@
|
|
|
80
80
|
"jest-fetch-mock": "^3.0.3",
|
|
81
81
|
"jsdom-testing-mocks": "^1.16.0",
|
|
82
82
|
"lodash.times": "^4.3.2",
|
|
83
|
-
"react-intl": "^7.1.
|
|
84
|
-
"rollup": "^4.
|
|
83
|
+
"react-intl": "^7.1.14",
|
|
84
|
+
"rollup": "^4.57.0",
|
|
85
85
|
"rollup-preserve-directives": "^1.1.3",
|
|
86
86
|
"storybook": "^10.3.0-alpha.0",
|
|
87
|
-
"storybook-addon-tag-badges": "^3.0.
|
|
87
|
+
"storybook-addon-tag-badges": "^3.0.5",
|
|
88
88
|
"storybook-addon-test-codegen": "^3.0.1",
|
|
89
89
|
"@transferwise/less-config": "3.1.2",
|
|
90
90
|
"@transferwise/neptune-css": "14.26.1",
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
"react-intl": "^5.10.0 || ^6 || ^7"
|
|
103
103
|
},
|
|
104
104
|
"dependencies": {
|
|
105
|
-
"@babel/runtime": "^7.28.
|
|
105
|
+
"@babel/runtime": "^7.28.6",
|
|
106
106
|
"@floating-ui/react": "^0.27.16",
|
|
107
107
|
"@headlessui/react": "^2.2.9",
|
|
108
108
|
"@popperjs/core": "^2.11.8",
|
|
@@ -113,8 +113,8 @@
|
|
|
113
113
|
"@transferwise/neptune-validation": "^3.3.1",
|
|
114
114
|
"clsx": "^2.1.1",
|
|
115
115
|
"commonmark": "^0.31.2",
|
|
116
|
-
"core-js": "^3.
|
|
117
|
-
"framer-motion": "^12.
|
|
116
|
+
"core-js": "^3.48.0",
|
|
117
|
+
"framer-motion": "^12.29.2",
|
|
118
118
|
"lodash.clamp": "^4.0.3",
|
|
119
119
|
"lodash.debounce": "^4.0.8",
|
|
120
120
|
"merge-props": "^6.0.0",
|