joyent-portal/packages/ui-toolkit/src/form/__tests__/__snapshots__/form.spec.js.snap

949 lines
16 KiB
Plaintext

// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Form Checkbox 1`] = `
.c2 {
font-family: sans-serif;
font-size: 100%;
line-height: 1.15;
margin: 0;
overflow: visible;
display: none;
}
.c2[type='checkbox'],
.c2[type='radio'] {
box-sizing: border-box;
padding: 0;
}
.c2[type='number']::-webkit-inner-spin-button,
.c2[type='number']::-webkit-outer-spin-button {
height: auto;
}
.c2[type='search'] {
-webkit-appearance: textfield;
-moz-appearance: textfield;
appearance: textfield;
outline-offset: -0.125rem;
}
.c2[type='search']::-webkit-search-cancel-button,
.c2[type='search']::-webkit-search-decoration {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
}
.c2::-webkit-file-upload-button {
-webkit-appearance: button;
-moz-appearance: button;
appearance: button;
font: inherit;
}
.c2:checked + label::after {
opacity: 1;
}
.c2:selected + label::after {
opacity: 1;
}
.c2:checked + label {
border-color: rgb(59,70,204);
}
.c2:selected + label {
border-color: rgb(59,70,204);
}
.c2:disabled + label {
background-color: rgb(249,249,249);
}
.c3 {
color: rgb(100,100,100);
position: absolute;
width: 1.125rem;
height: 1.125rem;
box-sizing: border-box;
top: 0;
right: 0;
cursor: pointer;
background-color: rgb(255,255,255);
box-shadow: none;
border: 0.0625rem solid rgb(216,216,216);
cursor: pointer;
border-radius: 0.25rem;
width: 1.125rem;
height: 1.125rem;
}
.c3::after {
opacity: 0;
content: '';
position: absolute;
width: 0.375rem;
height: 0.125rem;
background: transparent;
top: 0.3125rem;
left: 0.25rem;
border: 0.125rem solid rgb(45,45,45);
border-top: none;
border-right: none;
-webkit-transform: rotate(-45deg);
-ms-transform: rotate(-45deg);
transform: rotate(-45deg);
}
.c1 {
display: inline-block;
vertical-align: text-bottom;
width: 1.125rem;
height: 1.125rem;
position: relative;
cursor: pointer;
margin-bottom: 0.75rem;
}
.c4 {
margin-bottom: 0.75rem;
margin-left: 0.75rem;
}
.c0 {
list-style-type: none;
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-align-items: center;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
}
.c0 label {
font-weight: 400;
}
.c5 {
font-size: 0.9375rem;
font-style: normal;
font-stretch: normal;
display: block;
color: rgb(70,70,70);
text-align: left;
margin-right: 0.75rem;
font-weight: bold;
white-space: pre;
font-size: 0.8125rem;
}
<li
className="c0"
>
<div
checked={false}
className="c1"
disabled={false}
id=""
type="checkbox"
>
<input
checked={false}
className="c2"
disabled={false}
id="b"
type="checkbox"
/>
<label
className="c3"
htmlFor="b"
/>
</div>
<div
className="c4"
>
<label
className="c5"
htmlFor="b"
>
Detailed explanations
</label>
</div>
</li>
`;
exports[`Form Fieldset 1`] = `
.c0 {
display: inline-block;
margin: 0;
padding: 0;
border: none;
overflow: hidden;
height: auto;
-webkit-margin-start: 0;
-webkit-margin-end: 0;
-webkit-padding-before: 0;
-webkit-padding-start: 0;
-webkit-padding-end: 0;
-webkit-padding-after: 0;
}
<div
className="c0"
role="group"
>
Detailed explanations
</div>
`;
exports[`Form FormLabel 1`] = `
.c0 {
font-size: 0.9375rem;
font-style: normal;
font-stretch: normal;
display: block;
color: rgb(70,70,70);
text-align: left;
margin-right: 0.75rem;
font-weight: bold;
white-space: pre;
font-size: 0.8125rem;
}
<label
className="c0"
htmlFor=""
>
Detailed explanations
</label>
`;
exports[`Form FormMeta 1`] = `
.c0 {
font-size: 0.9375rem;
font-style: normal;
font-stretch: normal;
display: block;
color: rgb(70,70,70);
text-align: left;
float: right;
color: rgb(210,67,58);
-webkit-text-fill-color: currentcolor;
font-size: 0.8125rem;
float: none;
margin-left: 1.75rem;
}
.c1 {
font-size: 0.9375rem;
font-style: normal;
font-stretch: normal;
display: block;
color: rgb(70,70,70);
text-align: left;
float: right;
color: rgb(227,130,0);
-webkit-text-fill-color: currentcolor;
font-size: 0.8125rem;
float: none;
margin-left: 1.75rem;
}
.c2 {
font-size: 0.9375rem;
font-style: normal;
font-stretch: normal;
display: block;
color: rgb(70,70,70);
text-align: left;
float: right;
color: rgb(0,152,88);
-webkit-text-fill-color: currentcolor;
font-size: 0.8125rem;
float: none;
margin-left: 1.75rem;
}
<div>
<label
className="c0"
>
Unexpected children error!
</label>
<label
className="c1"
>
Unexpected children warning!
</label>
<label
className="c2"
>
Unexpected children success!
</label>
</div>
`;
exports[`Form Input 1`] = `
.c0 {
box-sizing: border-box;
width: 100%;
height: 3rem;
min-height: 3rem;
margin-bottom: 0.5rem;
margin-top: 0.5rem;
padding: 0.8125rem 1.125rem;
border-radius: 0.25rem;
background-color: rgb(255,255,255);
border: 0.0625rem solid rgb(216,216,216);
color: rgba(73,73,73,1);
max-width: 18.75rem;
text-overflow: ellipsis;
font-size: 0.9375rem;
line-height: normal !important;
font-style: normal;
font-stretch: normal;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
outline: 0;
}
.c0::-webkit-input-placeholder {
color: rgba(73,73,73,0.5);
}
.c0::-moz-placeholder {
color: rgba(73,73,73,0.5);
}
.c0:-ms-input-placeholder {
color: rgba(73,73,73,0.5);
}
.c0:invalid {
box-shadow: none;
}
.c0:disabled {
background-color: rgb(250,250,250);
color: rgb(216,216,216);
}
.c0:disabled::-webkit-input-placeholder {
color: rgba(73,73,73,0.5);
}
.c0:disabled::-moz-placeholder {
color: rgba(73,73,73,0.5);
}
.c0:disabled:-ms-input-placeholder {
color: rgba(73,73,73,0.5);
}
.c0:focus {
border-color: rgb(59,70,204);
outline: 0;
}
<input
className="c0"
disabled={false}
id=""
placeholder="Example: JarJarBinks"
/>
`;
exports[`Form Legend 1`] = `
.c0 {
box-sizing: border-box;
color: inherit;
display: table;
max-width: 100%;
padding: 0;
white-space: normal;
font-weight: 600;
}
<legend
className="c0"
>
I am the legend
</legend>
`;
exports[`Form Radio 1`] = `
.c2 {
font-family: sans-serif;
font-size: 100%;
line-height: 1.15;
margin: 0;
overflow: visible;
display: none;
}
.c2[type='checkbox'],
.c2[type='radio'] {
box-sizing: border-box;
padding: 0;
}
.c2[type='number']::-webkit-inner-spin-button,
.c2[type='number']::-webkit-outer-spin-button {
height: auto;
}
.c2[type='search'] {
-webkit-appearance: textfield;
-moz-appearance: textfield;
appearance: textfield;
outline-offset: -0.125rem;
}
.c2[type='search']::-webkit-search-cancel-button,
.c2[type='search']::-webkit-search-decoration {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
}
.c2::-webkit-file-upload-button {
-webkit-appearance: button;
-moz-appearance: button;
appearance: button;
font: inherit;
}
.c2:checked + label::after {
opacity: 1;
}
.c2:selected + label::after {
opacity: 1;
}
.c2:checked + label {
border-color: rgb(59,70,204);
}
.c2:selected + label {
border-color: rgb(59,70,204);
}
.c2:disabled + label {
background-color: rgb(249,249,249);
}
.c3 {
color: rgb(100,100,100);
position: absolute;
width: 1.125rem;
height: 1.125rem;
box-sizing: border-box;
top: 0;
right: 0;
cursor: pointer;
background-color: rgb(255,255,255);
box-shadow: none;
border: 0.0625rem solid rgb(216,216,216);
cursor: pointer;
width: 1.125rem;
height: 1.125rem;
border-radius: 50%;
}
.c3::after {
opacity: 0;
content: '';
position: absolute;
width: 0.375rem;
height: 0.375rem;
border-radius: 50%;
background-color: rgba(73,73,73,1);
top: 50%;
left: 50%;
-webkit-transform: translateX(-50%) translateY(-50%);
-ms-transform: translateX(-50%) translateY(-50%);
transform: translateX(-50%) translateY(-50%);
}
.c1 {
display: inline-block;
vertical-align: text-bottom;
width: 1.125rem;
height: 1.125rem;
position: relative;
cursor: pointer;
margin-bottom: 0.75rem;
}
.c4 {
margin-bottom: 0.75rem;
margin-left: 0.75rem;
}
.c5 {
font-size: 0.9375rem;
font-style: normal;
font-stretch: normal;
display: block;
color: rgb(70,70,70);
text-align: left;
margin-right: 0.75rem;
font-weight: bold;
white-space: pre;
font-size: 0.8125rem;
}
.c0 {
list-style-type: none;
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-align-items: center;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
}
.c0 label {
font-weight: 400;
}
<li
className="c0"
>
<div
checked={false}
className="c1"
disabled={false}
id=""
type="radio"
>
<input
checked={false}
className="c2"
disabled={false}
id="c"
type="radio"
/>
<label
className="c3"
htmlFor="c"
/>
</div>
<div
className="c4"
>
<label
className="c5"
htmlFor="c"
>
Detailed explanations
</label>
</div>
</li>
`;
exports[`Form Select 1`] = `
.c0 {
position: relative;
display: -webkit-inline-box;
display: -webkit-inline-flex;
display: -ms-inline-flexbox;
display: inline-flex;
width: 100%;
max-width: 100%;
min-width: 18.75rem;
}
.c0:after {
content: '';
width: 0.625rem;
height: 0.625rem;
background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOSIgaGVpZ2h0PSI2IiB2aWV3Qm94PSIwIDAgOSA2IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjx0aXRsZT5hcnJvdzogcmlnaHQ8L3RpdGxlPjxwYXRoIGQ9Ik05IDEuMzg2TDcuNjQ4IDAgNC41IDMuMjI4IDEuMzUyIDAgMCAxLjM4NiA0LjUgNnoiIGZpbGw9IiM0OTQ5NDkiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==) center center no-repeat;
display: block;
position: absolute;
top: 50%;
-webkit-transform: translateY(-50%);
-ms-transform: translateY(-50%);
transform: translateY(-50%);
right: 0.75rem;
}
.c2 {
box-sizing: border-box;
width: 100%;
height: 3rem;
min-height: 3rem;
margin-bottom: 0.5rem;
margin-top: 0.5rem;
padding: 0.8125rem 1.125rem;
border-radius: 0.25rem;
background-color: rgb(255,255,255);
border: 0.0625rem solid rgb(216,216,216);
color: rgba(73,73,73,1);
max-width: 18.75rem;
text-overflow: ellipsis;
font-size: 0.9375rem;
line-height: normal !important;
font-style: normal;
font-stretch: normal;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
outline: 0;
}
.c2::-webkit-input-placeholder {
color: rgba(73,73,73,0.5);
}
.c2::-moz-placeholder {
color: rgba(73,73,73,0.5);
}
.c2:-ms-input-placeholder {
color: rgba(73,73,73,0.5);
}
.c2:invalid {
box-shadow: none;
}
.c2:disabled {
background-color: rgb(250,250,250);
color: rgb(216,216,216);
}
.c2:disabled::-webkit-input-placeholder {
color: rgba(73,73,73,0.5);
}
.c2:disabled::-moz-placeholder {
color: rgba(73,73,73,0.5);
}
.c2:disabled:-ms-input-placeholder {
color: rgba(73,73,73,0.5);
}
.c2:focus {
border-color: rgb(59,70,204);
outline: 0;
}
.c1 {
position: relative;
padding: 0.75rem;
padding-right: 1.5625rem;
}
<div
className="c0"
disabled={false}
>
<select
className="c1 c2"
disabled={false}
id=""
>
<option
disabled={true}
selected={true}
>
Select a datacenter
</option>
<option>
Amsterdam, EU
</option>
<option>
San Francisco, USA
</option>
<option>
Seoul, South Korea
</option>
<option>
Tokyo, Japan
</option>
</select>
</div>
`;
exports[`Form Textarea 1`] = `
.c1 {
box-sizing: border-box;
width: 100%;
height: 6rem;
min-height: 6rem;
margin-bottom: 0.5rem;
margin-top: 0.5rem;
padding: 0.8125rem 1.125rem;
border-radius: 0.25rem;
background-color: rgb(255,255,255);
border: 0.0625rem solid rgb(216,216,216);
color: rgba(73,73,73,1);
max-width: 18.75rem;
text-overflow: ellipsis;
font-size: 0.9375rem;
line-height: normal !important;
font-style: normal;
font-stretch: normal;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
outline: 0;
}
.c1::-webkit-input-placeholder {
color: rgba(73,73,73,0.5);
}
.c1::-moz-placeholder {
color: rgba(73,73,73,0.5);
}
.c1:-ms-input-placeholder {
color: rgba(73,73,73,0.5);
}
.c1:invalid {
box-shadow: none;
}
.c1:disabled {
background-color: rgb(250,250,250);
color: rgb(216,216,216);
}
.c1:disabled::-webkit-input-placeholder {
color: rgba(73,73,73,0.5);
}
.c1:disabled::-moz-placeholder {
color: rgba(73,73,73,0.5);
}
.c1:disabled:-ms-input-placeholder {
color: rgba(73,73,73,0.5);
}
.c1:focus {
border-color: rgb(59,70,204);
outline: 0;
}
.c0 {
position: relative;
display: -webkit-inline-box;
display: -webkit-inline-flex;
display: -ms-inline-flexbox;
display: inline-flex;
}
<textarea
className="c0 c1"
disabled={false}
id=""
/>
`;
exports[`Form Toggle 1`] = `
.c0 {
display: inline-block;
margin: 0;
padding: 0;
border: none;
overflow: hidden;
height: auto;
-webkit-margin-start: 0;
-webkit-margin-end: 0;
-webkit-padding-before: 0;
-webkit-padding-start: 0;
-webkit-padding-end: 0;
-webkit-padding-after: 0;
}
.c4 {
font-size: 0.9375rem;
font-style: normal;
font-stretch: normal;
display: block;
color: rgb(70,70,70);
text-align: left;
margin-right: 0.75rem;
font-weight: bold;
white-space: pre;
font-size: 0.8125rem;
color: rgb(216,216,216);
}
.c1 {
position: relative;
vertical-align: text-bottom;
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-align-items: center;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
}
.c2 {
display: none;
}
.c2:checked + label {
background: #3B46CC;
border: 0.0625rem solid rgb(59,70,204);
}
.c2:checked + label:after {
left: 50%;
box-shadow: 0 0 0 0.0625rem rgb(59,70,204);
}
.c2:checked + label:active {
box-shadow: none;
}
.c2:checked + label:active:after {
margin-left: -00.75rem;
}
.c3 {
outline: 0;
display: block;
width: 2.875rem;
height: 1.5rem;
position: relative;
cursor: pointer;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
box-sizing: border-box;
background: rgb(250,250,250);
border-radius: 1.4375rem;
-webkit-transition: all 0.3s ease;
transition: all 0.3s ease;
border: 0.0625rem solid rgb(216,216,216);
margin-right: 0.375rem;
}
.c3::selection {
background: none;
}
.c3:active {
box-shadow: inset 0 0 0 1.5rem rgb(216,216,216);
}
.c3:active:after {
padding-right: 0.75rem;
}
.c3:hover {
border: 0.0625rem solid rgb(59,70,204);
}
.c3:hover:after {
box-shadow: 0 0 0 0.0625rem rgb(59,70,204);
}
.c3:after,
.c3:before {
position: relative;
display: block;
content: '';
width: 50%;
height: 100%;
}
.c3:after {
left: 0;
border-radius: 2em;
background: rgb(255,255,255);
-webkit-transition: left 0.3s cubic-bezier(0.175,0.885,0.32,1.275), padding 0.3s ease,margin 0.3s ease,box-shadow 0.3s ease;
transition: left 0.3s cubic-bezier(0.175,0.885,0.32,1.275), padding 0.3s ease,margin 0.3s ease,box-shadow 0.3s ease;
box-shadow: 0 0 0 0.0625rem rgb(216,216,216);
}
.c3:active {
box-shadow: inset 0 0 0 2em rgb(216,216,216);
}
.c3:active:after {
padding-right: 0.75rem;
}
.c3:before {
display: none;
}
.c3:active {
box-shadow: none;
}
.c3:active:after {
padding-right: 0;
}
.c3:after {
background: rgb(230,230,230);
}
.c3:hover {
border: 0.0625rem solid rgb(216,216,216);
}
.c3:hover:after {
box-shadow: 0 0 0 0.0625rem rgb(216,216,216);
}
<div
className="c0"
disabled={true}
name="who-killed-2"
role="group"
style={undefined}
>
<div
className="c1"
>
<input
className="c2"
disabled={true}
id="e"
name="who-killed-2"
type="checkbox"
value="video"
/>
<label
className="c3"
disabled={true}
htmlFor="e"
id="d"
value="video"
/>
<label
className="c4"
disabled={true}
htmlFor="d"
id="d"
value="video"
>
Video
</label>
</div>
</div>
`;