diff --git a/playroom/snippets.tsx b/playroom/snippets.tsx index 5d9f5662c1..0739704307 100644 --- a/playroom/snippets.tsx +++ b/playroom/snippets.tsx @@ -135,77 +135,253 @@ const accordionSnippets: Array = [ `, }, + { + group: 'Accordion', + name: 'Accordion (detail and right)', + code: ` + + } + title="What is Movistar Money" + detail="Detail" + right={} + content={ + + It's a loan available to anyone, whether or not you're a Movistar + customer. It offers from €2,000 to €15,000 with a simple and fast + application process, and you receive the money in less than 48 hours. + + } + /> + } + title="To whom is it aimed?" + detail="Detail" + right={} + content={ + + The Movistar Money loan service is aimed at anyone, whether you are a{" "} + + Movistar + {" "} + customer or not. + + } + /> + } + title="Who offers Movistar Money?" + detail="Detail" + right={} + content={ + +

+ At Telefónica, we have our own financial institution, Telefonica + Consumer Finance, and agreements with other institutions to assist + you in obtaining your loan. +

+
+ +
+

+ Depending on the characteristics of the information you provide us, + your application will be sent to one of the institutions{" "} + + with which Movistar has agreements + + . +

+
+ } + /> + } + title="How can I hire it?" + detail="Detail" + right={} + content={ + + It's a very agile process that you can access through the + money.movistar.es website. You can find more detailed information + about the process on our "How It Works" page. + + } + /> + } + title="What should I do if I don't receive the SMS with the contracting code?" + detail="Detail" + right={} + content={ + + It may take a few minutes until you receive the SMS with the code. If + you still haven't received the code, you can request a new one by + clicking on "resend SMS." + + } + /> +
+ `, + }, { group: 'Accordion', name: 'BoxedAccordion', code: ` - - } - title="What is Movistar Money" - content={ - - It's a loan available to anyone, whether or not you're a Movistar - customer. It offers from €2,000 to €15,000 with a simple and fast - application process, and you receive the money in less than 48 hours. - - } - /> - } - title="To whom is it aimed?" - content={ - - The Movistar Money loan service is aimed at anyone, whether you are a{" "} - Movistar customer or not. - - } - /> - } - title="Who offers Movistar Money?" - content={ - -

- At Telefónica, we have our own financial institution, Telefonica - Consumer Finance, and agreements with other institutions to assist - you in obtaining your loan. -

-
- -
-

- Depending on the characteristics of the information you provide us, - your application will be sent to one of the institutions{" "} - with which Movistar has agreements. -

-
- } - /> - } - title="How can I hire it?" - content={ - - It's a very agile process that you can access through the - money.movistar.es website. You can find more detailed information - about the process on our "How It Works" page. - - } - /> - } - title="What should I do if I don't receive the SMS with the contracting code?" - content={ - - It may take a few minutes until you receive the SMS with the code. If - you still haven't received the code, you can request a new one by - clicking on "resend SMS." - - } - /> -
- `, + + } + title="What is Movistar Money" + content={ + + It's a loan available to anyone, whether or not you're a Movistar + customer. It offers from €2,000 to €15,000 with a simple and fast + application process, and you receive the money in less than 48 hours. + + } + /> + } + title="To whom is it aimed?" + content={ + + The Movistar Money loan service is aimed at anyone, whether you are a{" "} + Movistar customer or not. + + } + /> + } + title="Who offers Movistar Money?" + content={ + +

+ At Telefónica, we have our own financial institution, Telefonica + Consumer Finance, and agreements with other institutions to assist + you in obtaining your loan. +

+
+ +
+

+ Depending on the characteristics of the information you provide us, + your application will be sent to one of the institutions{" "} + with which Movistar has agreements. +

+
+ } + /> + } + title="How can I hire it?" + content={ + + It's a very agile process that you can access through the + money.movistar.es website. You can find more detailed information + about the process on our "How It Works" page. + + } + /> + } + title="What should I do if I don't receive the SMS with the contracting code?" + content={ + + It may take a few minutes until you receive the SMS with the code. If + you still haven't received the code, you can request a new one by + clicking on "resend SMS." + + } + /> +
+ `, + }, + { + group: 'Accordion', + name: 'BoxedAccordion (detail and right)', + code: ` + + } + title="What is Movistar Money" + detail="Detail" + right={} + content={ + + It's a loan available to anyone, whether or not you're a Movistar + customer. It offers from €2,000 to €15,000 with a simple and fast + application process, and you receive the money in less than 48 hours. + + } + /> + } + title="To whom is it aimed?" + detail="Detail" + right={} + content={ + + The Movistar Money loan service is aimed at anyone, whether you are a{" "} + + Movistar + {" "} + customer or not. + + } + /> + } + title="Who offers Movistar Money?" + detail="Detail" + right={} + content={ + +

+ At Telefónica, we have our own financial institution, Telefonica + Consumer Finance, and agreements with other institutions to assist + you in obtaining your loan. +

+
+ +
+

+ Depending on the characteristics of the information you provide us, + your application will be sent to one of the institutions{" "} + + with which Movistar has agreements + + . +

+
+ } + /> + } + title="How can I hire it?" + detail="Detail" + right={} + content={ + + It's a very agile process that you can access through the + money.movistar.es website. You can find more detailed information + about the process on our "How It Works" page. + + } + /> + } + title="What should I do if I don't receive the SMS with the contracting code?" + detail="Detail" + right={} + content={ + + It may take a few minutes until you receive the SMS with the code. If + you still haven't received the code, you can request a new one by + clicking on "resend SMS." + + } + /> +
+ `, }, ]; diff --git a/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-accordion-detail-detail-right-false-over-inverse-false-1-snap.png b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-accordion-detail-detail-right-false-over-inverse-false-1-snap.png new file mode 100644 index 0000000000..83be4e1532 Binary files /dev/null and b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-accordion-detail-detail-right-false-over-inverse-false-1-snap.png differ diff --git a/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-accordion-detail-detail-right-true-over-inverse-false-1-snap.png b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-accordion-detail-detail-right-true-over-inverse-false-1-snap.png new file mode 100644 index 0000000000..e5f0dbd98a Binary files /dev/null and b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-accordion-detail-detail-right-true-over-inverse-false-1-snap.png differ diff --git a/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-accordion-detail-detail-right-true-over-inverse-true-1-snap.png b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-accordion-detail-detail-right-true-over-inverse-true-1-snap.png new file mode 100644 index 0000000000..c175fa6e7e Binary files /dev/null and b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-accordion-detail-detail-right-true-over-inverse-true-1-snap.png differ diff --git a/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-accordion-detail-right-false-over-inverse-false-1-snap.png b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-accordion-detail-right-false-over-inverse-false-1-snap.png new file mode 100644 index 0000000000..6ffb3aa038 Binary files /dev/null and b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-accordion-detail-right-false-over-inverse-false-1-snap.png differ diff --git a/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-accordion-detail-right-true-over-inverse-false-1-snap.png b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-accordion-detail-right-true-over-inverse-false-1-snap.png new file mode 100644 index 0000000000..3f0975b191 Binary files /dev/null and b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-accordion-detail-right-true-over-inverse-false-1-snap.png differ diff --git a/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-accordion-inverse-false-single-open-false-1-snap.png b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-accordion-inverse-false-single-open-false-1-snap.png deleted file mode 100644 index a245324914..0000000000 Binary files a/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-accordion-inverse-false-single-open-false-1-snap.png and /dev/null differ diff --git a/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-accordion-inverse-false-single-open-false-2-snap.png b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-accordion-inverse-false-single-open-false-2-snap.png deleted file mode 100644 index 33601d356b..0000000000 Binary files a/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-accordion-inverse-false-single-open-false-2-snap.png and /dev/null differ diff --git a/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-accordion-inverse-false-single-open-true-1-snap.png b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-accordion-inverse-false-single-open-true-1-snap.png deleted file mode 100644 index a245324914..0000000000 Binary files a/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-accordion-inverse-false-single-open-true-1-snap.png and /dev/null differ diff --git a/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-accordion-inverse-false-single-open-true-2-snap.png b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-accordion-inverse-false-single-open-true-2-snap.png deleted file mode 100644 index c701e1858e..0000000000 Binary files a/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-accordion-inverse-false-single-open-true-2-snap.png and /dev/null differ diff --git a/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-accordion-inverse-true-single-open-false-1-snap.png b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-accordion-inverse-true-single-open-false-1-snap.png deleted file mode 100644 index 15f2510543..0000000000 Binary files a/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-accordion-inverse-true-single-open-false-1-snap.png and /dev/null differ diff --git a/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-accordion-inverse-true-single-open-false-2-snap.png b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-accordion-inverse-true-single-open-false-2-snap.png deleted file mode 100644 index 3eb96c3fa1..0000000000 Binary files a/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-accordion-inverse-true-single-open-false-2-snap.png and /dev/null differ diff --git a/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-accordion-inverse-true-single-open-true-1-snap.png b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-accordion-inverse-true-single-open-true-1-snap.png deleted file mode 100644 index 15f2510543..0000000000 Binary files a/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-accordion-inverse-true-single-open-true-1-snap.png and /dev/null differ diff --git a/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-accordion-inverse-true-single-open-true-2-snap.png b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-accordion-inverse-true-single-open-true-2-snap.png deleted file mode 100644 index b1490666bb..0000000000 Binary files a/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-accordion-inverse-true-single-open-true-2-snap.png and /dev/null differ diff --git a/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-accordion-over-inverse-false-single-open-false-1-snap.png b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-accordion-over-inverse-false-single-open-false-1-snap.png new file mode 100644 index 0000000000..dfc02b702e Binary files /dev/null and b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-accordion-over-inverse-false-single-open-false-1-snap.png differ diff --git a/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-accordion-over-inverse-false-single-open-false-2-snap.png b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-accordion-over-inverse-false-single-open-false-2-snap.png new file mode 100644 index 0000000000..6ffb3aa038 Binary files /dev/null and b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-accordion-over-inverse-false-single-open-false-2-snap.png differ diff --git a/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-accordion-over-inverse-false-single-open-true-1-snap.png b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-accordion-over-inverse-false-single-open-true-1-snap.png new file mode 100644 index 0000000000..dfc02b702e Binary files /dev/null and b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-accordion-over-inverse-false-single-open-true-1-snap.png differ diff --git a/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-accordion-over-inverse-false-single-open-true-2-snap.png b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-accordion-over-inverse-false-single-open-true-2-snap.png new file mode 100644 index 0000000000..6d6ce641fc Binary files /dev/null and b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-accordion-over-inverse-false-single-open-true-2-snap.png differ diff --git a/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-accordion-over-inverse-true-single-open-false-1-snap.png b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-accordion-over-inverse-true-single-open-false-1-snap.png new file mode 100644 index 0000000000..6b109fb53e Binary files /dev/null and b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-accordion-over-inverse-true-single-open-false-1-snap.png differ diff --git a/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-accordion-over-inverse-true-single-open-false-2-snap.png b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-accordion-over-inverse-true-single-open-false-2-snap.png new file mode 100644 index 0000000000..7009adf376 Binary files /dev/null and b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-accordion-over-inverse-true-single-open-false-2-snap.png differ diff --git a/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-accordion-over-inverse-true-single-open-true-1-snap.png b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-accordion-over-inverse-true-single-open-true-1-snap.png new file mode 100644 index 0000000000..6b109fb53e Binary files /dev/null and b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-accordion-over-inverse-true-single-open-true-1-snap.png differ diff --git a/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-accordion-over-inverse-true-single-open-true-2-snap.png b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-accordion-over-inverse-true-single-open-true-2-snap.png new file mode 100644 index 0000000000..db63f224d7 Binary files /dev/null and b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-accordion-over-inverse-true-single-open-true-2-snap.png differ diff --git a/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-detail-detail-right-false-1-snap.png b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-detail-detail-right-false-1-snap.png new file mode 100644 index 0000000000..b6edf7d834 Binary files /dev/null and b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-detail-detail-right-false-1-snap.png differ diff --git a/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-detail-detail-right-true-1-snap.png b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-detail-detail-right-true-1-snap.png new file mode 100644 index 0000000000..8d7a79b18d Binary files /dev/null and b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-detail-detail-right-true-1-snap.png differ diff --git a/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-detail-right-false-1-snap.png b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-detail-right-false-1-snap.png new file mode 100644 index 0000000000..99fda83712 Binary files /dev/null and b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-detail-right-false-1-snap.png differ diff --git a/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-detail-right-true-1-snap.png b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-detail-right-true-1-snap.png new file mode 100644 index 0000000000..95546ea764 Binary files /dev/null and b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-detail-right-true-1-snap.png differ diff --git a/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-false-over-inverse-false-single-open-false-1-snap.png b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-false-over-inverse-false-single-open-false-1-snap.png new file mode 100644 index 0000000000..e48f81a0a6 Binary files /dev/null and b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-false-over-inverse-false-single-open-false-1-snap.png differ diff --git a/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-false-over-inverse-false-single-open-false-2-snap.png b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-false-over-inverse-false-single-open-false-2-snap.png new file mode 100644 index 0000000000..99fda83712 Binary files /dev/null and b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-false-over-inverse-false-single-open-false-2-snap.png differ diff --git a/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-false-over-inverse-false-single-open-true-1-snap.png b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-false-over-inverse-false-single-open-true-1-snap.png new file mode 100644 index 0000000000..e48f81a0a6 Binary files /dev/null and b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-false-over-inverse-false-single-open-true-1-snap.png differ diff --git a/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-false-over-inverse-false-single-open-true-2-snap.png b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-false-over-inverse-false-single-open-true-2-snap.png new file mode 100644 index 0000000000..d304355baa Binary files /dev/null and b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-false-over-inverse-false-single-open-true-2-snap.png differ diff --git a/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-false-over-inverse-true-single-open-false-1-snap.png b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-false-over-inverse-true-single-open-false-1-snap.png new file mode 100644 index 0000000000..a4a6294c83 Binary files /dev/null and b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-false-over-inverse-true-single-open-false-1-snap.png differ diff --git a/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-false-over-inverse-true-single-open-false-2-snap.png b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-false-over-inverse-true-single-open-false-2-snap.png new file mode 100644 index 0000000000..488443934b Binary files /dev/null and b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-false-over-inverse-true-single-open-false-2-snap.png differ diff --git a/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-false-over-inverse-true-single-open-true-1-snap.png b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-false-over-inverse-true-single-open-true-1-snap.png new file mode 100644 index 0000000000..a4a6294c83 Binary files /dev/null and b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-false-over-inverse-true-single-open-true-1-snap.png differ diff --git a/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-false-over-inverse-true-single-open-true-2-snap.png b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-false-over-inverse-true-single-open-true-2-snap.png new file mode 100644 index 0000000000..e17326bc13 Binary files /dev/null and b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-false-over-inverse-true-single-open-true-2-snap.png differ diff --git a/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-false-single-open-false-1-snap.png b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-false-single-open-false-1-snap.png deleted file mode 100644 index 92fdec3a90..0000000000 Binary files a/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-false-single-open-false-1-snap.png and /dev/null differ diff --git a/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-false-single-open-false-2-snap.png b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-false-single-open-false-2-snap.png deleted file mode 100644 index 7626ff2c36..0000000000 Binary files a/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-false-single-open-false-2-snap.png and /dev/null differ diff --git a/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-false-single-open-true-1-snap.png b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-false-single-open-true-1-snap.png deleted file mode 100644 index 92fdec3a90..0000000000 Binary files a/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-false-single-open-true-1-snap.png and /dev/null differ diff --git a/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-false-single-open-true-2-snap.png b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-false-single-open-true-2-snap.png deleted file mode 100644 index 42c3863989..0000000000 Binary files a/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-false-single-open-true-2-snap.png and /dev/null differ diff --git a/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-true-over-inverse-false-single-open-false-1-snap.png b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-true-over-inverse-false-single-open-false-1-snap.png new file mode 100644 index 0000000000..b719b3e99a Binary files /dev/null and b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-true-over-inverse-false-single-open-false-1-snap.png differ diff --git a/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-true-over-inverse-false-single-open-false-2-snap.png b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-true-over-inverse-false-single-open-false-2-snap.png new file mode 100644 index 0000000000..95844db292 Binary files /dev/null and b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-true-over-inverse-false-single-open-false-2-snap.png differ diff --git a/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-true-over-inverse-false-single-open-true-1-snap.png b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-true-over-inverse-false-single-open-true-1-snap.png new file mode 100644 index 0000000000..b719b3e99a Binary files /dev/null and b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-true-over-inverse-false-single-open-true-1-snap.png differ diff --git a/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-true-over-inverse-false-single-open-true-2-snap.png b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-true-over-inverse-false-single-open-true-2-snap.png new file mode 100644 index 0000000000..059044441a Binary files /dev/null and b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-true-over-inverse-false-single-open-true-2-snap.png differ diff --git a/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-true-over-inverse-true-single-open-false-1-snap.png b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-true-over-inverse-true-single-open-false-1-snap.png new file mode 100644 index 0000000000..7843c19bc1 Binary files /dev/null and b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-true-over-inverse-true-single-open-false-1-snap.png differ diff --git a/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-true-single-open-false-2-snap.png b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-true-over-inverse-true-single-open-false-2-snap.png similarity index 53% rename from src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-true-single-open-false-2-snap.png rename to src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-true-over-inverse-true-single-open-false-2-snap.png index 026d797638..e40ae6ef7b 100644 Binary files a/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-true-single-open-false-2-snap.png and b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-true-over-inverse-true-single-open-false-2-snap.png differ diff --git a/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-true-over-inverse-true-single-open-true-1-snap.png b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-true-over-inverse-true-single-open-true-1-snap.png new file mode 100644 index 0000000000..7843c19bc1 Binary files /dev/null and b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-true-over-inverse-true-single-open-true-1-snap.png differ diff --git a/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-true-over-inverse-true-single-open-true-2-snap.png b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-true-over-inverse-true-single-open-true-2-snap.png new file mode 100644 index 0000000000..7201907771 Binary files /dev/null and b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-true-over-inverse-true-single-open-true-2-snap.png differ diff --git a/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-true-single-open-false-1-snap.png b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-true-single-open-false-1-snap.png deleted file mode 100644 index de75142b29..0000000000 Binary files a/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-true-single-open-false-1-snap.png and /dev/null differ diff --git a/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-true-single-open-true-1-snap.png b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-true-single-open-true-1-snap.png deleted file mode 100644 index de75142b29..0000000000 Binary files a/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-true-single-open-true-1-snap.png and /dev/null differ diff --git a/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-true-single-open-true-2-snap.png b/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-true-single-open-true-2-snap.png deleted file mode 100644 index 93fa7f2fad..0000000000 Binary files a/src/__screenshot_tests__/__image_snapshots__/accordion-screenshot-test-tsx-boxed-accordion-inverse-true-single-open-true-2-snap.png and /dev/null differ diff --git a/src/__screenshot_tests__/accordion-screenshot-test.tsx b/src/__screenshot_tests__/accordion-screenshot-test.tsx index 346d4e9600..f2b53b4fb6 100644 --- a/src/__screenshot_tests__/accordion-screenshot-test.tsx +++ b/src/__screenshot_tests__/accordion-screenshot-test.tsx @@ -1,21 +1,17 @@ import {openStoryPage, screen} from '../test-utils'; test.each` - component | inverse | singleOpen - ${'Accordion'} | ${false} | ${false} - ${'Accordion'} | ${false} | ${true} - ${'Accordion'} | ${true} | ${false} - ${'Accordion'} | ${true} | ${true} - ${'Boxed accordion'} | ${false} | ${false} - ${'Boxed accordion'} | ${false} | ${true} - ${'Boxed accordion'} | ${true} | ${false} - ${'Boxed accordion'} | ${true} | ${true} -`('$component. inverse($inverse) singleOpen($singleOpen)', async ({component, inverse, singleOpen}) => { + overInverse | singleOpen + ${false} | ${false} + ${false} | ${true} + ${true} | ${false} + ${true} | ${true} +`('Accordion. overInverse($overInverse) singleOpen($singleOpen)', async ({overInverse, singleOpen}) => { await openStoryPage({ - id: `components-accordions--${component.toLowerCase().replace(' ', '-')}-story`, + id: 'components-accordions--accordion-story', device: 'MOBILE_IOS', args: { - inverse, + overInverse, singleOpen, }, }); @@ -32,3 +28,99 @@ test.each` expect(await accordion.screenshot()).toMatchImageSnapshot(); }); + +test.each` + inverse | overInverse | singleOpen + ${false} | ${false} | ${false} + ${false} | ${false} | ${true} + ${false} | ${true} | ${false} + ${false} | ${true} | ${true} + ${true} | ${false} | ${false} + ${true} | ${false} | ${true} + ${true} | ${true} | ${false} + ${true} | ${true} | ${true} +`( + 'BoxedAccordion. inverse($inverse) overInverse($overInverse) singleOpen($singleOpen)', + async ({inverse, overInverse, singleOpen}) => { + await openStoryPage({ + id: 'components-accordions--boxed-accordion-story', + device: 'MOBILE_IOS', + args: { + inverse, + overInverse, + singleOpen, + }, + }); + + const accordion = await screen.findByTestId('accordion'); + + expect(await accordion.screenshot()).toMatchImageSnapshot(); + + await (await screen.findByTestId('accordion-item-1')).click(); + await (await screen.findByTestId('accordion-item-1')).click(); + await (await screen.findByTestId('accordion-item-2')).click(); + await (await screen.findByTestId('accordion-item-4')).click(); + await (await screen.findByTestId('accordion-item-6')).click(); + + expect(await accordion.screenshot()).toMatchImageSnapshot(); + } +); + +test.each` + detail | right | overInverse + ${''} | ${false} | ${false} + ${''} | ${true} | ${false} + ${'Detail'} | ${false} | ${false} + ${'Detail'} | ${true} | ${false} + ${'Detail'} | ${true} | ${true} +`( + 'Accordion. detail($detail) right($right) overInverse($overInverse)', + async ({detail, right, overInverse}) => { + await openStoryPage({ + id: 'components-accordions--accordion-story', + device: 'MOBILE_IOS', + args: { + detail, + right, + overInverse, + }, + }); + + const accordion = await screen.findByTestId('accordion'); + + await (await screen.findByTestId('accordion-item-1')).click(); + await (await screen.findByTestId('accordion-item-1')).click(); + await (await screen.findByTestId('accordion-item-2')).click(); + await (await screen.findByTestId('accordion-item-4')).click(); + await (await screen.findByTestId('accordion-item-6')).click(); + + expect(await accordion.screenshot()).toMatchImageSnapshot(); + } +); + +test.each` + detail | right + ${''} | ${false} + ${''} | ${true} + ${'Detail'} | ${false} + ${'Detail'} | ${true} +`('BoxedAccordion. detail($detail) right($right)', async ({detail, right}) => { + await openStoryPage({ + id: 'components-accordions--boxed-accordion-story', + device: 'MOBILE_IOS', + args: { + detail, + right, + }, + }); + + const accordion = await screen.findByTestId('accordion'); + + await (await screen.findByTestId('accordion-item-1')).click(); + await (await screen.findByTestId('accordion-item-1')).click(); + await (await screen.findByTestId('accordion-item-2')).click(); + await (await screen.findByTestId('accordion-item-4')).click(); + await (await screen.findByTestId('accordion-item-6')).click(); + + expect(await accordion.screenshot()).toMatchImageSnapshot(); +}); diff --git a/src/__stories__/accordion-story.tsx b/src/__stories__/accordion-story.tsx index c20d437ed1..eec2f44906 100644 --- a/src/__stories__/accordion-story.tsx +++ b/src/__stories__/accordion-story.tsx @@ -25,97 +25,103 @@ export default { parameters: {fullScreen: true}, }; -type Args = {title: string; subtitle: string; singleOpen: boolean; inverse: boolean}; +type Args = { + title: string; + subtitle: string; + detail: string; + right: boolean; + singleOpen: boolean; + overInverse: boolean; +}; + +type BoxedArgs = Args & {inverse: boolean}; -const Template: StoryComponent = ({title, subtitle, singleOpen, inverse, type}) => { +const Template: StoryComponent = ({ + title, + subtitle, + detail, + right, + singleOpen, + inverse, + overInverse, + type, +}) => { const content = ; const AccordionComponent = type === 'boxed' ? BoxedAccordion : Accordion; const ItemComponent = type === 'boxed' ? BoxedAccordionItem : AccordionItem; + const getAccordionItemContentProps = () => { + return { + title, + subtitle, + content, + detail, + right: right ? ( +
+
+
+ ) : undefined, + ...(type === 'boxed' && {isInverse: inverse}), + }; + }; + return ( - + } - {...(type === 'boxed' && {isInverse: inverse})} dataAttributes={{testid: 'accordion-item-2'}} /> } - {...(type === 'boxed' && {isInverse: inverse})} dataAttributes={{testid: 'accordion-item-3'}} /> } - {...(type === 'boxed' && {isInverse: inverse})} dataAttributes={{testid: 'accordion-item-4'}} /> } - {...(type === 'boxed' && {isInverse: inverse})} dataAttributes={{testid: 'accordion-item-5'}} /> } - {...(type === 'boxed' && {isInverse: inverse})} dataAttributes={{testid: 'accordion-item-6'}} /> } - {...(type === 'boxed' && {isInverse: inverse})} dataAttributes={{testid: 'accordion-item-7'}} /> } - {...(type === 'boxed' && {isInverse: inverse})} dataAttributes={{testid: 'accordion-item-8'}} /> } - {...(type === 'boxed' && {isInverse: inverse})} dataAttributes={{testid: 'accordion-item-9'}} /> @@ -127,14 +133,16 @@ const Template: StoryComponent = ({title, subtitle, sin const defaultArgs = { title: 'Title', subtitle: 'Subtitle', + detail: '', + right: false, singleOpen: false, - inverse: false, + overInverse: false, }; -export const AccordionStory: StoryComponent = (args) =>