From 8ad0a093c6421ed2776165a550e4a9553b278d20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Connor=20B=C3=A4r?= Date: Sun, 3 May 2020 22:00:37 +0200 Subject: [PATCH] test(components): update storyshots feature/focus-outline --- src/__snapshots__/storyshots.spec.js.snap | 948 ++++++++++++++++------ 1 file changed, 715 insertions(+), 233 deletions(-) diff --git a/src/__snapshots__/storyshots.spec.js.snap b/src/__snapshots__/storyshots.spec.js.snap index 7fbc33b540..c8303c5880 100644 --- a/src/__snapshots__/storyshots.spec.js.snap +++ b/src/__snapshots__/storyshots.spec.js.snap @@ -45,9 +45,8 @@ exports[`Storyshots Components/AspectRatio Base 1`] = ` exports[`Storyshots Components/Badge Base 1`] = ` .circuit-0 { - border-radius: 100px; + border-radius: 999999px; color: #FFFFFF; - cursor: default; display: inline-block; padding: 0 8px; font-size: 12px; @@ -72,9 +71,8 @@ exports[`Storyshots Components/Badge Base 1`] = ` exports[`Storyshots Components/Badge Circular 1`] = ` .circuit-0 { - border-radius: 100px; + border-radius: 999999px; color: #FFFFFF; - cursor: default; display: inline-block; padding: 0 8px; font-size: 12px; @@ -111,12 +109,56 @@ exports[`Storyshots Components/Badge Circular 1`] = ` `; +exports[`Storyshots Components/Badge Clickable 1`] = ` +.circuit-0 { + border-radius: 999999px; + color: #FFFFFF; + display: inline-block; + padding: 0 8px; + font-size: 12px; + line-height: 20px; + font-weight: 700; + text-transform: uppercase; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + text-align: center; + background-color: #3388FF; + border: 0; + outline: 0; + cursor: pointer; +} + +.circuit-0:hover { + background-color: #1760CE; +} + +.circuit-0:active { + background-color: #003C8B; +} + +.circuit-0:focus { + box-shadow: 0 0 0 4px #AFD0FE; +} + +.circuit-0:focus::-moz-focus-inner { + border: 0; +} + + +`; + exports[`Storyshots Components/Badge Colors 1`] = ` HTMLCollection [ .circuit-0 { - border-radius: 100px; + border-radius: 999999px; color: #FFFFFF; - cursor: default; display: inline-block; padding: 0 8px; font-size: 12px; @@ -138,9 +180,8 @@ HTMLCollection [ Neutral , .circuit-0 { - border-radius: 100px; + border-radius: 999999px; color: #FFFFFF; - cursor: default; display: inline-block; padding: 0 8px; font-size: 12px; @@ -162,9 +203,8 @@ HTMLCollection [ Primary , .circuit-0 { - border-radius: 100px; + border-radius: 999999px; color: #FFFFFF; - cursor: default; display: inline-block; padding: 0 8px; font-size: 12px; @@ -186,9 +226,8 @@ HTMLCollection [ Success , .circuit-0 { - border-radius: 100px; + border-radius: 999999px; color: #FFFFFF; - cursor: default; display: inline-block; padding: 0 8px; font-size: 12px; @@ -210,9 +249,8 @@ HTMLCollection [ Warning , .circuit-0 { - border-radius: 100px; + border-radius: 999999px; color: #FFFFFF; - cursor: default; display: inline-block; padding: 0 8px; font-size: 12px; @@ -1814,15 +1852,25 @@ exports[`Storyshots Components/Calendar/CalendarTag Base 1`] = ` border-radius: 4px; font-size: 16px; line-height: 24px; - box-shadow: 0px 0px 0px 1px #D8DDE1; + border: 1px solid #D8DDE1; padding: 4px 12px; cursor: default; cursor: pointer; + outline: 0; + background: transparent; } .circuit-0:hover { background-color: #D8DDE1; - box-shadow: 0px 0px 0px 1px #D8DDE1; + border: 1px solid #9DA7B1; +} + +.circuit-0:focus { + box-shadow: 0 0 0 4px #AFD0FE; +} + +.circuit-0:focus::-moz-focus-inner { + border: 0; }
@@ -1847,15 +1895,25 @@ exports[`Storyshots Components/Calendar/CalendarTagTwoStep Base 1`] = ` border-radius: 4px; font-size: 16px; line-height: 24px; - box-shadow: 0px 0px 0px 1px #D8DDE1; + border: 1px solid #D8DDE1; padding: 4px 12px; cursor: default; cursor: pointer; + outline: 0; + background: transparent; } .circuit-0:hover { background-color: #D8DDE1; - box-shadow: 0px 0px 0px 1px #D8DDE1; + border: 1px solid #9DA7B1; +} + +.circuit-0:focus { + box-shadow: 0 0 0 4px #AFD0FE; +} + +.circuit-0:focus::-moz-focus-inner { + border: 0; }
@@ -11638,36 +11696,49 @@ exports[`Storyshots Components/Step Swiper 1`] = ` `; exports[`Storyshots Components/Table Base 1`] = ` -.circuit-62 { +.circuit-2 { + border: 0; + -webkit-clip: rect(0 0 0 0); + clip: rect(0 0 0 0); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + white-space: nowrap; + width: 1px; +} + +.circuit-66 { position: relative; box-shadow: 0 0 0 1px rgba(12,15,20,0.02), 0 0 1px 0 rgba(12,15,20,0.06), 0 2px 2px 0 rgba(12,15,20,0.06); } -.circuit-60 { +.circuit-64 { border-radius: 4px; } @media (max-width:767px) { - .circuit-60 { + .circuit-64 { height: unset; margin-left: 145px; overflow-x: auto; } } -.circuit-58 { +.circuit-62 { background-color: #FFFFFF; border-collapse: separate; width: 100%; } @media (max-width:767px) { - .circuit-58 { + .circuit-62 { margin-left: -145px; width: calc(100% + 145px); } - .circuit-58:after { + .circuit-62:after { content: ''; background-image: linear-gradient( 90deg,rgba(0,0,0,0.12),transparent ); height: 100%; @@ -11678,16 +11749,16 @@ exports[`Storyshots Components/Table Base 1`] = ` } } -.circuit-18 { +.circuit-22 { vertical-align: middle; } -tbody .circuit-18:last-child th, -tbody .circuit-18:last-child td { +tbody .circuit-22:last-child th, +tbody .circuit-22:last-child td { border-bottom: none; } -.circuit-4 { +.circuit-6 { background-color: #FFFFFF; border-bottom: 1px solid #D8DDE1; padding: 24px; @@ -11709,7 +11780,7 @@ tbody .circuit-18:last-child td { } @media (max-width:767px) { - .circuit-4 { + .circuit-6 { left: 0; top: auto; position: absolute; @@ -11718,16 +11789,36 @@ tbody .circuit-18:last-child td { } } -.circuit-4:hover { +.circuit-6:focus-within::after { + content: ''; + display: block; + width: 100%; + height: 100%; + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 1; + box-shadow: 0 0 0 4px #AFD0FE; +} + +.circuit-6:focus-within::after::-moz-focus-inner { + border: 0; +} + +.circuit-6:focus-within, +.circuit-6:hover { background-color: #FAFBFC; color: #3388FF; } -.circuit-4:hover > span { +.circuit-6:focus-within > button, +.circuit-6:hover > button { opacity: 1; } -.circuit-2 { +.circuit-4 { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; @@ -11751,6 +11842,20 @@ tbody .circuit-18:last-child td { -webkit-transition: opacity 200ms ease-in-out; transition: opacity 200ms ease-in-out; color: #3388FF; + border: 0; + background: none; + outline: 0; + padding: 0; + margin: 0; + cursor: pointer; +} + +.circuit-4:focus { + opacity: 1; +} + +.circuit-4:focus::-moz-focus-inner { + border: 0; } .circuit-0 { @@ -11758,7 +11863,7 @@ tbody .circuit-18:last-child td { margin-bottom: -7px; } -.circuit-6 { +.circuit-8 { background-color: #FFFFFF; border-bottom: 1px solid #D8DDE1; padding: 24px; @@ -11774,7 +11879,7 @@ tbody .circuit-18:last-child td { } @media (max-width:767px) { - .circuit-6 { + .circuit-8 { display: table-cell; min-width: 145px; white-space: unset; @@ -11782,7 +11887,7 @@ tbody .circuit-18:last-child td { } } -.circuit-12 { +.circuit-16 { background-color: #FFFFFF; border-bottom: 1px solid #D8DDE1; padding: 24px; @@ -11803,16 +11908,36 @@ tbody .circuit-18:last-child td { user-select: none; } -.circuit-12:hover { +.circuit-16:focus-within::after { + content: ''; + display: block; + width: 100%; + height: 100%; + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 1; + box-shadow: 0 0 0 4px #AFD0FE; +} + +.circuit-16:focus-within::after::-moz-focus-inner { + border: 0; +} + +.circuit-16:focus-within, +.circuit-16:hover { background-color: #FAFBFC; color: #3388FF; } -.circuit-12:hover > span { +.circuit-16:focus-within > button, +.circuit-16:hover > button { opacity: 1; } -.circuit-14 { +.circuit-18 { background-color: #FFFFFF; border-bottom: 1px solid #D8DDE1; padding: 24px; @@ -11827,7 +11952,7 @@ tbody .circuit-18:last-child td { vertical-align: middle; } -.circuit-16 { +.circuit-20 { background-color: #FFFFFF; border-bottom: 1px solid #D8DDE1; padding: 24px; @@ -11842,23 +11967,44 @@ tbody .circuit-18:last-child td { vertical-align: middle; } -.circuit-32 { +.circuit-36 { vertical-align: middle; cursor: pointer; + position: relative; } -tbody .circuit-32:last-child th, -tbody .circuit-32:last-child td { +tbody .circuit-36:last-child th, +tbody .circuit-36:last-child td { border-bottom: none; } -tbody .circuit-32:hover td, -tbody .circuit-32:hover th { +.circuit-36:focus::after { + content: ''; + display: block; + width: 100%; + height: 100%; + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 1; + box-shadow: 0 0 0 4px #AFD0FE; +} + +.circuit-36:focus::after::-moz-focus-inner { + border: 0; +} + +tbody .circuit-36:focus td, +tbody .circuit-36:hover td, +tbody .circuit-36:focus th, +tbody .circuit-36:hover th { color: #3388FF; background-color: #FAFBFC; } -.circuit-22 { +.circuit-26 { background-color: #FFFFFF; border-bottom: 1px solid #D8DDE1; padding: 24px; @@ -11869,7 +12015,7 @@ tbody .circuit-32:hover th { } @media (max-width:767px) { - .circuit-22 { + .circuit-26 { left: 0; top: auto; position: absolute; @@ -11878,7 +12024,7 @@ tbody .circuit-32:hover th { } } -.circuit-24 { +.circuit-28 { background-color: #FFFFFF; border-bottom: 1px solid #D8DDE1; padding: 24px; @@ -11891,7 +12037,7 @@ tbody .circuit-32:hover th { } @media (max-width:767px) { - .circuit-24 { + .circuit-28 { display: table-cell; min-width: 145px; white-space: unset; @@ -11899,7 +12045,7 @@ tbody .circuit-32:hover th { } } -.circuit-26 { +.circuit-30 { background-color: #FFFFFF; border-bottom: 1px solid #D8DDE1; padding: 24px; @@ -11910,7 +12056,7 @@ tbody .circuit-32:hover th { white-space: nowrap; } -.circuit-30 { +.circuit-34 { background-color: #FFFFFF; border-bottom: 1px solid #D8DDE1; padding: 24px; @@ -11922,28 +12068,30 @@ tbody .circuit-32:hover th { }
- - + + Sort + + Name - - + + Sort + + Created at Permissions @@ -12050,12 +12210,13 @@ tbody .circuit-32:hover th {
@@ -12063,38 +12224,39 @@ tbody .circuit-32:hover th { 12/01/2017 - Disabled
@@ -12102,37 +12264,38 @@ tbody .circuit-32:hover th { 13/01/2017 Virtual Terminal Enabled
@@ -12140,26 +12303,26 @@ tbody .circuit-32:hover th { 14/01/2017 - Disabled @@ -12172,36 +12335,49 @@ tbody .circuit-32:hover th { `; exports[`Storyshots Components/Table Custom Sort 1`] = ` -.circuit-46 { +.circuit-2 { + border: 0; + -webkit-clip: rect(0 0 0 0); + clip: rect(0 0 0 0); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + white-space: nowrap; + width: 1px; +} + +.circuit-48 { position: relative; box-shadow: 0 0 0 1px rgba(12,15,20,0.02), 0 0 1px 0 rgba(12,15,20,0.06), 0 2px 2px 0 rgba(12,15,20,0.06); } -.circuit-44 { +.circuit-46 { border-radius: 4px; } @media (max-width:767px) { - .circuit-44 { + .circuit-46 { height: unset; margin-left: 145px; overflow-x: auto; } } -.circuit-42 { +.circuit-44 { background-color: #FFFFFF; border-collapse: separate; width: 100%; } @media (max-width:767px) { - .circuit-42 { + .circuit-44 { margin-left: -145px; width: calc(100% + 145px); } - .circuit-42:after { + .circuit-44:after { content: ''; background-image: linear-gradient( 90deg,rgba(0,0,0,0.12),transparent ); height: 100%; @@ -12212,16 +12388,16 @@ exports[`Storyshots Components/Table Custom Sort 1`] = ` } } -.circuit-8 { +.circuit-10 { vertical-align: middle; } -tbody .circuit-8:last-child th, -tbody .circuit-8:last-child td { +tbody .circuit-10:last-child th, +tbody .circuit-10:last-child td { border-bottom: none; } -.circuit-4 { +.circuit-6 { background-color: #FFFFFF; border-bottom: 1px solid #D8DDE1; padding: 24px; @@ -12243,7 +12419,7 @@ tbody .circuit-8:last-child td { } @media (max-width:767px) { - .circuit-4 { + .circuit-6 { left: 0; top: auto; position: absolute; @@ -12252,16 +12428,36 @@ tbody .circuit-8:last-child td { } } -.circuit-4:hover { +.circuit-6:focus-within::after { + content: ''; + display: block; + width: 100%; + height: 100%; + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 1; + box-shadow: 0 0 0 4px #AFD0FE; +} + +.circuit-6:focus-within::after::-moz-focus-inner { + border: 0; +} + +.circuit-6:focus-within, +.circuit-6:hover { background-color: #FAFBFC; color: #3388FF; } -.circuit-4:hover > span { +.circuit-6:focus-within > button, +.circuit-6:hover > button { opacity: 1; } -.circuit-2 { +.circuit-4 { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; @@ -12285,6 +12481,20 @@ tbody .circuit-8:last-child td { -webkit-transition: opacity 200ms ease-in-out; transition: opacity 200ms ease-in-out; color: #3388FF; + border: 0; + background: none; + outline: 0; + padding: 0; + margin: 0; + cursor: pointer; +} + +.circuit-4:focus { + opacity: 1; +} + +.circuit-4:focus::-moz-focus-inner { + border: 0; } .circuit-0 { @@ -12292,7 +12502,7 @@ tbody .circuit-8:last-child td { margin-bottom: -7px; } -.circuit-6 { +.circuit-8 { background-color: #FFFFFF; border-bottom: 1px solid #D8DDE1; padding: 24px; @@ -12308,7 +12518,7 @@ tbody .circuit-8:last-child td { } @media (max-width:767px) { - .circuit-6 { + .circuit-8 { display: table-cell; min-width: 145px; white-space: unset; @@ -12316,7 +12526,7 @@ tbody .circuit-8:last-child td { } } -.circuit-12 { +.circuit-14 { background-color: #FFFFFF; border-bottom: 1px solid #D8DDE1; padding: 24px; @@ -12327,7 +12537,7 @@ tbody .circuit-8:last-child td { } @media (max-width:767px) { - .circuit-12 { + .circuit-14 { left: 0; top: auto; position: absolute; @@ -12336,7 +12546,7 @@ tbody .circuit-8:last-child td { } } -.circuit-14 { +.circuit-16 { background-color: #FFFFFF; border-bottom: 1px solid #D8DDE1; padding: 24px; @@ -12349,7 +12559,7 @@ tbody .circuit-8:last-child td { } @media (max-width:767px) { - .circuit-14 { + .circuit-16 { display: table-cell; min-width: 145px; white-space: unset; @@ -12358,28 +12568,30 @@ tbody .circuit-8:last-child td { }
- - + + Sort + + Country
@@ -12440,7 +12657,7 @@ tbody .circuit-8:last-child td {
@@ -12460,7 +12677,7 @@ tbody .circuit-8:last-child td {
@@ -12480,7 +12697,7 @@ tbody .circuit-8:last-child td {
@@ -12500,7 +12717,7 @@ tbody .circuit-8:last-child td {
@@ -12520,7 +12737,7 @@ tbody .circuit-8:last-child td {