@transferwise/components 0.0.0-experimental-c8ab32e → 0.0.0-experimental-d349b91
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/field/Field.js +4 -13
- package/build/field/Field.js.map +1 -1
- package/build/field/Field.mjs +4 -13
- package/build/field/Field.mjs.map +1 -1
- package/build/i18n/en.json +1 -3
- package/build/i18n/en.json.js +1 -3
- package/build/i18n/en.json.js.map +1 -1
- package/build/i18n/en.json.mjs +1 -3
- package/build/i18n/en.json.mjs.map +1 -1
- package/build/i18n/zh-HK.json +2 -0
- package/build/i18n/zh-HK.json.js +2 -0
- package/build/i18n/zh-HK.json.js.map +1 -1
- package/build/i18n/zh-HK.json.mjs +2 -0
- package/build/i18n/zh-HK.json.mjs.map +1 -1
- package/build/label/Label.js +1 -29
- package/build/label/Label.js.map +1 -1
- package/build/label/Label.mjs +2 -30
- package/build/label/Label.mjs.map +1 -1
- package/build/stepper/Stepper.js +5 -2
- package/build/stepper/Stepper.js.map +1 -1
- package/build/stepper/Stepper.mjs +5 -2
- package/build/stepper/Stepper.mjs.map +1 -1
- package/build/types/field/Field.d.ts +2 -4
- package/build/types/field/Field.d.ts.map +1 -1
- package/build/types/index.d.ts +1 -1
- package/build/types/index.d.ts.map +1 -1
- package/build/types/label/Label.d.ts +1 -10
- package/build/types/label/Label.d.ts.map +1 -1
- package/build/types/stepper/Stepper.d.ts +4 -0
- package/build/types/stepper/Stepper.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/dateInput/DateInput.story.tsx +1 -6
- package/src/dateLookup/DateLookup.rtl.spec.tsx +1 -1
- package/src/field/Field.spec.tsx +3 -4
- package/src/field/Field.story.tsx +4 -38
- package/src/field/Field.tests.story.tsx +2 -4
- package/src/field/Field.tsx +8 -17
- package/src/flowNavigation/__snapshots__/FlowNavigation.spec.js.snap +4 -4
- package/src/i18n/en.json +1 -3
- package/src/i18n/zh-HK.json +2 -0
- package/src/index.ts +1 -1
- package/src/inlineAlert/InlineAlert.story.tsx +14 -11
- package/src/inputs/InputGroup.spec.tsx +1 -1
- package/src/inputs/SearchInput.spec.tsx +1 -1
- package/src/inputs/SelectInput.spec.tsx +1 -1
- package/src/label/Label.story.tsx +21 -37
- package/src/label/Label.tsx +2 -42
- package/src/radioGroup/RadioGroup.rtl.spec.tsx +1 -1
- package/src/select/Select.rtl.spec.tsx +1 -1
- package/src/stepper/Stepper.less +2 -2
- package/src/stepper/Stepper.story.tsx +49 -0
- package/src/stepper/Stepper.tsx +7 -3
- package/src/switch/Switch.spec.tsx +1 -1
- package/build/label/Label.messages.js +0 -15
- package/build/label/Label.messages.js.map +0 -1
- package/build/label/Label.messages.mjs +0 -13
- package/build/label/Label.messages.mjs.map +0 -1
- package/build/types/label/Label.messages.d.ts +0 -12
- package/build/types/label/Label.messages.d.ts.map +0 -1
- package/build/types/label/index.d.ts +0 -3
- package/build/types/label/index.d.ts.map +0 -1
- package/src/label/Label.messages.tsx +0 -12
- package/src/label/index.ts +0 -2
- package/src/stepper/Stepper.story.js +0 -40
package/src/stepper/Stepper.tsx
CHANGED
|
@@ -23,7 +23,10 @@ export interface StepperProps {
|
|
|
23
23
|
className?: string;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
/**
|
|
27
|
+
* This component is considered user-unfriendly and inaccessible on its own and will likely be made internal in the future. Please use `FlowNavigation` instead.
|
|
28
|
+
* @see https://storybook.wise.design/?path=/story/navigation-flownavigation--variants
|
|
29
|
+
*/
|
|
27
30
|
const Stepper = ({ steps, activeStep = 0, className }: StepperProps) => {
|
|
28
31
|
const { isRTL } = useDirection();
|
|
29
32
|
|
|
@@ -50,6 +53,7 @@ const Stepper = ({ steps, activeStep = 0, className }: StepperProps) => {
|
|
|
50
53
|
) : (
|
|
51
54
|
<span className="tw-stepper__step-label">{step.label}</span>
|
|
52
55
|
);
|
|
56
|
+
|
|
53
57
|
return (
|
|
54
58
|
<li
|
|
55
59
|
key={index}
|
|
@@ -83,10 +87,10 @@ const Stepper = ({ steps, activeStep = 0, className }: StepperProps) => {
|
|
|
83
87
|
<div className="progress">
|
|
84
88
|
<div className="progress-bar" style={{ width: `${percentageCompleted * 100}%` }} />
|
|
85
89
|
</div>
|
|
86
|
-
|
|
90
|
+
|
|
91
|
+
<ol className="tw-stepper-steps p-t-1 m-b-0">{steps.map(renderStep)}</ol>
|
|
87
92
|
</div>
|
|
88
93
|
);
|
|
89
94
|
};
|
|
90
|
-
/* eslint-enable react/no-array-index-key */
|
|
91
95
|
|
|
92
96
|
export default Stepper;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var reactIntl = require('react-intl');
|
|
4
|
-
|
|
5
|
-
var messages = reactIntl.defineMessages({
|
|
6
|
-
optionalLabel: {
|
|
7
|
-
id: "neptune.Label.optional"
|
|
8
|
-
},
|
|
9
|
-
optionalAriaLabel: {
|
|
10
|
-
id: "neptune.aria.Label.optional"
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
module.exports = messages;
|
|
15
|
-
//# sourceMappingURL=Label.messages.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Label.messages.js","sources":["../../src/label/Label.messages.tsx"],"sourcesContent":["import { defineMessages } from 'react-intl';\n\nexport default defineMessages({\n optionalLabel: {\n id: 'neptune.Label.optional',\n defaultMessage: '(Optional)',\n },\n optionalAriaLabel: {\n id: 'neptune.aria.Label.optional',\n defaultMessage: 'This field is optional',\n },\n});\n"],"names":["defineMessages","optionalLabel","id","optionalAriaLabel"],"mappings":";;;;AAEA,eAAeA,wBAAc,CAAC;AAC5BC,EAAAA,aAAa,EAAE;IACbC,EAAE,EAAA,wBAAA;GAEH;AACDC,EAAAA,iBAAiB,EAAE;IACjBD,EAAE,EAAA,6BAAA;AAEH,GAAA;AACF,CAAA,CAAC;;;;"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { defineMessages } from 'react-intl';
|
|
2
|
-
|
|
3
|
-
var messages = defineMessages({
|
|
4
|
-
optionalLabel: {
|
|
5
|
-
id: "neptune.Label.optional"
|
|
6
|
-
},
|
|
7
|
-
optionalAriaLabel: {
|
|
8
|
-
id: "neptune.aria.Label.optional"
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
export { messages as default };
|
|
13
|
-
//# sourceMappingURL=Label.messages.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Label.messages.mjs","sources":["../../src/label/Label.messages.tsx"],"sourcesContent":["import { defineMessages } from 'react-intl';\n\nexport default defineMessages({\n optionalLabel: {\n id: 'neptune.Label.optional',\n defaultMessage: '(Optional)',\n },\n optionalAriaLabel: {\n id: 'neptune.aria.Label.optional',\n defaultMessage: 'This field is optional',\n },\n});\n"],"names":["defineMessages","optionalLabel","id","optionalAriaLabel"],"mappings":";;AAEA,eAAeA,cAAc,CAAC;AAC5BC,EAAAA,aAAa,EAAE;IACbC,EAAE,EAAA,wBAAA;GAEH;AACDC,EAAAA,iBAAiB,EAAE;IACjBD,EAAE,EAAA,6BAAA;AAEH,GAAA;AACF,CAAA,CAAC;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Label.messages.d.ts","sourceRoot":"","sources":["../../../src/label/Label.messages.tsx"],"names":[],"mappings":";;;;;;;;;;AAEA,wBASG"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/label/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,YAAY,EAAE,UAAU,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { defineMessages } from 'react-intl';
|
|
2
|
-
|
|
3
|
-
export default defineMessages({
|
|
4
|
-
optionalLabel: {
|
|
5
|
-
id: 'neptune.Label.optional',
|
|
6
|
-
defaultMessage: '(Optional)',
|
|
7
|
-
},
|
|
8
|
-
optionalAriaLabel: {
|
|
9
|
-
id: 'neptune.aria.Label.optional',
|
|
10
|
-
defaultMessage: 'This field is optional',
|
|
11
|
-
},
|
|
12
|
-
});
|
package/src/label/index.ts
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { action } from '@storybook/addon-actions';
|
|
2
|
-
import { select } from '@storybook/addon-knobs';
|
|
3
|
-
|
|
4
|
-
import Stepper from './Stepper';
|
|
5
|
-
|
|
6
|
-
export default {
|
|
7
|
-
component: Stepper,
|
|
8
|
-
title: 'Navigation/Stepper',
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export const Basic = () => {
|
|
12
|
-
const activeStep = select('activeStep', [0, 1, 2, 3, 4], 0);
|
|
13
|
-
return (
|
|
14
|
-
<Stepper
|
|
15
|
-
activeStep={activeStep}
|
|
16
|
-
steps={[
|
|
17
|
-
{
|
|
18
|
-
label: 'One',
|
|
19
|
-
onClick() {
|
|
20
|
-
action('You clicked on step 1, which triggered this function, which alerted you.');
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
label: 'Two',
|
|
25
|
-
hoverLabel: (
|
|
26
|
-
<>
|
|
27
|
-
<div>
|
|
28
|
-
<strong>Diana Jaramillo</strong>
|
|
29
|
-
</div>
|
|
30
|
-
dianajarm123@gmail.com
|
|
31
|
-
</>
|
|
32
|
-
),
|
|
33
|
-
},
|
|
34
|
-
{ label: 'Recipient' },
|
|
35
|
-
{ label: 'Smellification' },
|
|
36
|
-
{ label: 'Battle' },
|
|
37
|
-
]}
|
|
38
|
-
/>
|
|
39
|
-
);
|
|
40
|
-
};
|