@transferwise/components 0.0.0-experimental-61e8d6a → 0.0.0-experimental-aa02721
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 +10 -9
- package/build/index.esm.js.map +1 -1
- package/build/index.js +9 -8
- package/build/index.js.map +1 -1
- package/build/main.css +3 -0
- package/build/styles/main.css +3 -0
- package/build/styles/slidingPanel/SlidingPanel.css +3 -0
- package/build/types/slidingPanel/SlidingPanel.d.ts.map +1 -1
- package/build/types/stepper/Stepper.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/flowNavigation/__snapshots__/FlowNavigation.spec.js.snap +6 -0
- package/src/main.css +3 -0
- package/src/slidingPanel/SlidingPanel.css +3 -0
- package/src/slidingPanel/SlidingPanel.js +1 -0
- package/src/slidingPanel/SlidingPanel.less +1 -0
- package/src/stepper/Stepper.spec.js +16 -0
- package/src/stepper/Stepper.tsx +1 -0
package/build/main.css
CHANGED
|
@@ -3850,6 +3850,9 @@ html:not([dir="rtl"]) .np-navigation-option {
|
|
|
3850
3850
|
left: auto;
|
|
3851
3851
|
left: initial;
|
|
3852
3852
|
}
|
|
3853
|
+
.sliding-panel.sliding-panel-enter-done {
|
|
3854
|
+
background-color: pink;
|
|
3855
|
+
}
|
|
3853
3856
|
.sliding-panel.sliding-panel-enter-done.sliding-panel--open-right,
|
|
3854
3857
|
.sliding-panel.sliding-panel-enter-done.sliding-panel--open-left {
|
|
3855
3858
|
transform: translateX(0);
|
package/build/styles/main.css
CHANGED
|
@@ -3850,6 +3850,9 @@ html:not([dir="rtl"]) .np-navigation-option {
|
|
|
3850
3850
|
left: auto;
|
|
3851
3851
|
left: initial;
|
|
3852
3852
|
}
|
|
3853
|
+
.sliding-panel.sliding-panel-enter-done {
|
|
3854
|
+
background-color: pink;
|
|
3855
|
+
}
|
|
3853
3856
|
.sliding-panel.sliding-panel-enter-done.sliding-panel--open-right,
|
|
3854
3857
|
.sliding-panel.sliding-panel-enter-done.sliding-panel--open-left {
|
|
3855
3858
|
transform: translateX(0);
|
|
@@ -41,6 +41,9 @@
|
|
|
41
41
|
left: auto;
|
|
42
42
|
left: initial;
|
|
43
43
|
}
|
|
44
|
+
.sliding-panel.sliding-panel-enter-done {
|
|
45
|
+
background-color: pink;
|
|
46
|
+
}
|
|
44
47
|
.sliding-panel.sliding-panel-enter-done.sliding-panel--open-right,
|
|
45
48
|
.sliding-panel.sliding-panel-enter-done.sliding-panel--open-left {
|
|
46
49
|
transform: translateX(0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SlidingPanel.d.ts","sourceRoot":"","sources":["../../../src/slidingPanel/SlidingPanel.js"],"names":[],"mappings":"AAMA,iCAAkC;;AAElC,
|
|
1
|
+
{"version":3,"file":"SlidingPanel.d.ts","sourceRoot":"","sources":["../../../src/slidingPanel/SlidingPanel.js"],"names":[],"mappings":"AAMA,iCAAkC;;AAElC,0GA4CE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Stepper.d.ts","sourceRoot":"","sources":["../../../src/stepper/Stepper.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAY/B,MAAM,WAAW,IAAI;IACnB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC9B;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAGD,QAAA,MAAM,OAAO,qCAA0C,YAAY,
|
|
1
|
+
{"version":3,"file":"Stepper.d.ts","sourceRoot":"","sources":["../../../src/stepper/Stepper.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAY/B,MAAM,WAAW,IAAI;IACnB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC9B;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAGD,QAAA,MAAM,OAAO,qCAA0C,YAAY,6BA8DlE,CAAC;AAGF,eAAe,OAAO,CAAC"}
|
package/package.json
CHANGED
|
@@ -75,6 +75,7 @@ exports[`FlowNavigation on mobile renders as expected 1`] = `
|
|
|
75
75
|
class="tw-stepper-steps p-t-1 m-b-0"
|
|
76
76
|
>
|
|
77
77
|
<li
|
|
78
|
+
aria-current="false"
|
|
78
79
|
class="hidden-xs tw-stepper__step np-text-body-default"
|
|
79
80
|
style="left: 0%;"
|
|
80
81
|
>
|
|
@@ -85,6 +86,7 @@ exports[`FlowNavigation on mobile renders as expected 1`] = `
|
|
|
85
86
|
</span>
|
|
86
87
|
</li>
|
|
87
88
|
<li
|
|
89
|
+
aria-current="step"
|
|
88
90
|
class="hidden-xs tw-stepper__step np-text-body-default-bold tw-stepper__step--active"
|
|
89
91
|
style="left: 50%;"
|
|
90
92
|
>
|
|
@@ -95,6 +97,7 @@ exports[`FlowNavigation on mobile renders as expected 1`] = `
|
|
|
95
97
|
</span>
|
|
96
98
|
</li>
|
|
97
99
|
<li
|
|
100
|
+
aria-current="false"
|
|
98
101
|
class="hidden-xs tw-stepper__step np-text-body-default"
|
|
99
102
|
style="left: 100%;"
|
|
100
103
|
>
|
|
@@ -188,6 +191,7 @@ exports[`FlowNavigation renders as expected 1`] = `
|
|
|
188
191
|
class="tw-stepper-steps p-t-1 m-b-0"
|
|
189
192
|
>
|
|
190
193
|
<li
|
|
194
|
+
aria-current="step"
|
|
191
195
|
class="hidden-xs tw-stepper__step np-text-body-default-bold tw-stepper__step--active"
|
|
192
196
|
style="left: 0%;"
|
|
193
197
|
>
|
|
@@ -198,6 +202,7 @@ exports[`FlowNavigation renders as expected 1`] = `
|
|
|
198
202
|
</span>
|
|
199
203
|
</li>
|
|
200
204
|
<li
|
|
205
|
+
aria-current="false"
|
|
201
206
|
class="hidden-xs tw-stepper__step np-text-body-default"
|
|
202
207
|
style="left: 50%;"
|
|
203
208
|
>
|
|
@@ -208,6 +213,7 @@ exports[`FlowNavigation renders as expected 1`] = `
|
|
|
208
213
|
</span>
|
|
209
214
|
</li>
|
|
210
215
|
<li
|
|
216
|
+
aria-current="false"
|
|
211
217
|
class="hidden-xs tw-stepper__step np-text-body-default"
|
|
212
218
|
style="left: 100%;"
|
|
213
219
|
>
|
package/src/main.css
CHANGED
|
@@ -3850,6 +3850,9 @@ html:not([dir="rtl"]) .np-navigation-option {
|
|
|
3850
3850
|
left: auto;
|
|
3851
3851
|
left: initial;
|
|
3852
3852
|
}
|
|
3853
|
+
.sliding-panel.sliding-panel-enter-done {
|
|
3854
|
+
background-color: pink;
|
|
3855
|
+
}
|
|
3853
3856
|
.sliding-panel.sliding-panel-enter-done.sliding-panel--open-right,
|
|
3854
3857
|
.sliding-panel.sliding-panel-enter-done.sliding-panel--open-left {
|
|
3855
3858
|
transform: translateX(0);
|
|
@@ -41,6 +41,9 @@
|
|
|
41
41
|
left: auto;
|
|
42
42
|
left: initial;
|
|
43
43
|
}
|
|
44
|
+
.sliding-panel.sliding-panel-enter-done {
|
|
45
|
+
background-color: pink;
|
|
46
|
+
}
|
|
44
47
|
.sliding-panel.sliding-panel-enter-done.sliding-panel--open-right,
|
|
45
48
|
.sliding-panel.sliding-panel-enter-done.sliding-panel--open-left {
|
|
46
49
|
transform: translateX(0);
|
|
@@ -162,6 +162,22 @@ describe('Stepper', () => {
|
|
|
162
162
|
expect(step(1).clickable).toBe(true);
|
|
163
163
|
expect(step(2).clickable).toBe(true);
|
|
164
164
|
});
|
|
165
|
+
|
|
166
|
+
it('are aria-current=step when active', () => {
|
|
167
|
+
const stepCurrent = (index) =>
|
|
168
|
+
component.find('.tw-stepper__step').at(index).props()['aria-current'];
|
|
169
|
+
steps(4);
|
|
170
|
+
activeStep(1);
|
|
171
|
+
expect(stepCurrent(0)).toBe(false);
|
|
172
|
+
expect(stepCurrent(1)).toBe('step');
|
|
173
|
+
expect(stepCurrent(2)).toBe(false);
|
|
174
|
+
expect(stepCurrent(3)).toBe(false);
|
|
175
|
+
activeStep(2);
|
|
176
|
+
expect(stepCurrent(0)).toBe(false);
|
|
177
|
+
expect(stepCurrent(1)).toBe(false);
|
|
178
|
+
expect(stepCurrent(2)).toBe('step');
|
|
179
|
+
expect(stepCurrent(3)).toBe(false);
|
|
180
|
+
});
|
|
165
181
|
});
|
|
166
182
|
|
|
167
183
|
describe('hover labels', () => {
|
package/src/stepper/Stepper.tsx
CHANGED
|
@@ -60,6 +60,7 @@ const Stepper = ({ steps, activeStep = 0, className }: StepperProps) => {
|
|
|
60
60
|
clickable && 'tw-stepper__step--clickable',
|
|
61
61
|
step.hoverLabel && 'tw-stepper__step--has-tooltip',
|
|
62
62
|
)}
|
|
63
|
+
aria-current={active ? 'step' : false}
|
|
63
64
|
style={
|
|
64
65
|
isRTL
|
|
65
66
|
? { right: `${index * stepPercentage * 100}%` }
|