From 04cb9c32f86f0fcbd18731f4e467bde7aeb0a894 Mon Sep 17 00:00:00 2001 From: johnytiago Date: Mon, 14 May 2018 13:10:09 +0100 Subject: [PATCH] feat(instances): Firewall empty state update, more QA --- .../my-joy-images/src/components/empty.js | 4 +- .../__snapshots__/metadata.spec.js.snap | 2436 ++++++------- .../__snapshots__/snapshots.spec.js.snap | 2952 +++++++++------- .../__snapshots__/summary.spec.js.snap | 43 - .../__snapshots__/toolbar.spec.js.snap | 7 - .../src/components/instances/summary.js | 2 +- .../__tests__/__snapshots__/cns.spec.js.snap | 396 +-- .../__snapshots__/firewall.spec.js.snap | 3050 +++++++++-------- .../__tests__/__snapshots__/list.spec.js.snap | 21 - .../__snapshots__/metadata.spec.js.snap | 886 ++--- .../__snapshots__/networks.spec.js.snap | 492 +-- .../__snapshots__/summary.spec.js.snap | 14 - .../__tests__/__snapshots__/tags.spec.js.snap | 1139 +++--- packages/icons/src/empty-state.js | 126 + packages/icons/src/index.js | 1 + packages/instance-steps/src/firewall/index.js | 22 +- packages/instance-steps/src/name/index.js | 8 +- .../instance-steps/src/package/components.js | 4 +- packages/logos/assets/empty-state.svg | 1 + packages/resource-step/src/index.js | 1 + .../__tests__/__snapshots__/cns.spec.js.snap | 2 - .../__snapshots__/firewall.spec.js.snap | 127 +- packages/resource-widgets/src/cns/index.js | 28 +- packages/resource-widgets/src/empty/index.js | 4 +- .../__snapshots__/button.spec.js.snap | 5 - packages/ui-toolkit/src/button/index.js | 1 - .../__snapshots__/key-value.spec.js.snap | 2957 ++++++++-------- packages/ui-toolkit/src/key-value/index.js | 8 +- packages/ui-toolkit/src/tags/item.js | 30 +- packages/ui-toolkit/src/tags/list.js | 1 + 30 files changed, 7758 insertions(+), 7010 deletions(-) create mode 100644 packages/icons/src/empty-state.js create mode 100644 packages/logos/assets/empty-state.svg diff --git a/consoles/my-joy-images/src/components/empty.js b/consoles/my-joy-images/src/components/empty.js index 213c7b92..56bfa3c9 100644 --- a/consoles/my-joy-images/src/components/empty.js +++ b/consoles/my-joy-images/src/components/empty.js @@ -4,7 +4,7 @@ import { Margin, Padding } from 'styled-components-spacing'; import Flex from 'styled-flex-component'; import { H3, Card } from 'joyent-ui-toolkit'; -import { NoPackages } from 'joyent-logo-assets'; +import { EmptyState } from 'joyent-icons'; const NoPackagesTitle = styled(H3)` color: ${props => props.theme.greyDark}; @@ -20,7 +20,7 @@ export default ({ children }) => ( - + {children} diff --git a/consoles/my-joy-instances/src/components/instances/__tests__/__snapshots__/metadata.spec.js.snap b/consoles/my-joy-instances/src/components/instances/__tests__/__snapshots__/metadata.spec.js.snap index bb125c25..041180aa 100644 --- a/consoles/my-joy-instances/src/components/instances/__tests__/__snapshots__/metadata.spec.js.snap +++ b/consoles/my-joy-instances/src/components/instances/__tests__/__snapshots__/metadata.spec.js.snap @@ -1,1061 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`renders without throwing 1`] = ` -.c30 { - font-family: sans-serif; - font-size: 100%; - line-height: 1.15; - margin: 0; - overflow: visible; - text-transform: none; - -webkit-appearance: button; - -moz-appearance: button; - appearance: button; -} - -.c30::-moz-focus-inner, -.c30[type='button']::-moz-focus-inner, -.c30[type='reset']::-moz-focus-inner, -.c30[type='submit']::-moz-focus-inner { - border-style: none; - padding: 0; -} - -.c30:-moz-focusring, -.c30[type='button']:-moz-focusring, -.c30[type='reset']:-moz-focusring, -.c30[type='submit']:-moz-focusring { - outline: 0.0625rem dotted ButtonText; -} - -.c29 { - min-width: 7.5rem; -} - -.c28 { - display: inline-block; -} - -.c27 { - box-sizing: border-box; - display: inline-block; - -webkit-box-pack: center; - -webkit-justify-content: center; - -ms-flex-pack: center; - justify-content: center; - -webkit-align-items: center; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - min-height: 3rem; - height: 3rem; - min-width: 7.5rem; - padding: 0.9375rem 1.125rem; - position: relative; - font-family: "Libre Franklin",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica,sans-serif; - font-size: 0.9375rem; - text-align: center; - font-style: normal; - font-stretch: normal; - line-height: normal; - -webkit-letter-spacing: normal; - -moz-letter-spacing: normal; - -ms-letter-spacing: normal; - letter-spacing: normal; - -webkit-text-decoration: none; - text-decoration: none; - white-space: nowrap; - vertical-align: middle; - touch-action: manipulation; - cursor: pointer; - color: rgb(255,255,255); - -webkit-text-fill-color: currentcolor; - background-image: none; - background-color: rgb(59,70,204); - border-radius: 0.25rem; - border: solid 0.0625rem rgb(45,56,132); - color: rgb(70,70,70); - -webkit-text-fill-color: currentcolor; - background-color: rgb(255,255,255); - border-color: rgb(216,216,216); -} - -.c27:focus { - outline: 0; - -webkit-text-decoration: none; - text-decoration: none; - background-color: rgb(59,70,204); - border-color: rgb(45,56,132); -} - -.c27:hover { - background-color: rgb(72,83,217); - border: solid 0.0625rem rgb(45,56,132); -} - -.c27:active, -.c27:active:hover, -.c27:active:focus { - background-image: none; - outline: 0; - background-color: rgb(45,56,132); - border-color: rgb(45,56,132); -} - -.c27[disabled] { - cursor: not-allowed; - pointer-events: none; -} - -.c27:focus { - background-color: rgb(255,255,255); - border-color: rgb(216,216,216); -} - -.c27:hover { - background-color: rgb(247,247,247); - border-color: rgb(216,216,216); -} - -.c27:active, -.c27:active:hover, -.c27:active:focus { - background-color: rgb(230,230,230); - border-color: rgb(216,216,216); -} - -.c31 { - box-sizing: border-box; - display: inline-block; - -webkit-box-pack: center; - -webkit-justify-content: center; - -ms-flex-pack: center; - justify-content: center; - -webkit-align-items: center; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - min-height: 3rem; - height: 3rem; - min-width: 7.5rem; - padding: 0.9375rem 1.125rem; - position: relative; - font-family: "Libre Franklin",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica,sans-serif; - font-size: 0.9375rem; - text-align: center; - font-style: normal; - font-stretch: normal; - line-height: normal; - -webkit-letter-spacing: normal; - -moz-letter-spacing: normal; - -ms-letter-spacing: normal; - letter-spacing: normal; - -webkit-text-decoration: none; - text-decoration: none; - white-space: nowrap; - vertical-align: middle; - touch-action: manipulation; - cursor: pointer; - color: rgb(255,255,255); - -webkit-text-fill-color: currentcolor; - background-image: none; - background-color: rgb(59,70,204); - border-radius: 0.25rem; - border: solid 0.0625rem rgb(45,56,132); - cursor: not-allowed; - pointer-events: none; - color: rgb(216,216,216); - background-color: rgb(250,250,250); - border-color: rgb(216,216,216); -} - -.c31:focus { - outline: 0; - -webkit-text-decoration: none; - text-decoration: none; - background-color: rgb(59,70,204); - border-color: rgb(45,56,132); -} - -.c31:hover { - background-color: rgb(72,83,217); - border: solid 0.0625rem rgb(45,56,132); -} - -.c31:active, -.c31:active:hover, -.c31:active:focus { - background-image: none; - outline: 0; - background-color: rgb(45,56,132); - border-color: rgb(45,56,132); -} - -.c31[disabled] { - cursor: not-allowed; - pointer-events: none; -} - -.c31:focus { - background-color: rgb(250,250,250); - border-color: rgb(216,216,216); -} - -.c31:hover { - background-color: rgb(250,250,250); - border-color: rgb(250,250,250); -} - -.c31:active, -.c31:active:hover, -.c31:active:focus { - background-color: rgb(250,250,250); - border-color: rgb(250,250,250); -} - -.c33 { - box-sizing: border-box; - display: inline-block; - -webkit-box-pack: center; - -webkit-justify-content: center; - -ms-flex-pack: center; - justify-content: center; - -webkit-align-items: center; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - min-height: 3rem; - height: 3rem; - min-width: 7.5rem; - padding: 0.9375rem 1.125rem; - position: relative; - font-family: "Libre Franklin",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica,sans-serif; - font-size: 0.9375rem; - text-align: center; - font-style: normal; - font-stretch: normal; - line-height: normal; - -webkit-letter-spacing: normal; - -moz-letter-spacing: normal; - -ms-letter-spacing: normal; - letter-spacing: normal; - -webkit-text-decoration: none; - text-decoration: none; - white-space: nowrap; - vertical-align: middle; - touch-action: manipulation; - cursor: pointer; - color: rgb(255,255,255); - -webkit-text-fill-color: currentcolor; - background-image: none; - background-color: rgb(59,70,204); - border-radius: 0.25rem; - border: solid 0.0625rem rgb(45,56,132); - color: rgb(70,70,70); - -webkit-text-fill-color: currentcolor; - background-color: rgb(255,255,255); - border-color: rgb(216,216,216); - color: rgb(210,67,58); - -webkit-text-fill-color: currentcolor; - background-color: rgb(255,255,255); - border-color: rgb(210,67,58); - display: -webkit-inline-box; - display: -webkit-inline-flex; - display: -ms-inline-flexbox; - display: inline-flex; - -webkit-align-items: center; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - float: right; -} - -.c33:focus { - outline: 0; - -webkit-text-decoration: none; - text-decoration: none; - background-color: rgb(59,70,204); - border-color: rgb(45,56,132); -} - -.c33:hover { - background-color: rgb(72,83,217); - border: solid 0.0625rem rgb(45,56,132); -} - -.c33:active, -.c33:active:hover, -.c33:active:focus { - background-image: none; - outline: 0; - background-color: rgb(45,56,132); - border-color: rgb(45,56,132); -} - -.c33[disabled] { - cursor: not-allowed; - pointer-events: none; -} - -.c33:focus { - background-color: rgb(255,255,255); - border-color: rgb(216,216,216); -} - -.c33:hover { - background-color: rgb(247,247,247); - border-color: rgb(216,216,216); -} - -.c33:active, -.c33:active:hover, -.c33:active:focus { - background-color: rgb(230,230,230); - border-color: rgb(216,216,216); -} - -.c33:focus { - color: rgb(205,37,27); - background-color: rgb(255,255,255); - border-color: rgb(205,37,27); -} - -.c33:hover { - color: rgb(205,37,27); - background-color: rgb(255,255,255); - border-color: rgb(205,37,27); -} - -.c33:active, -.c33:active:hover, -.c33:active:focus { - background-color: rgba(210,67,58,0.1); - border-color: rgb(205,37,27); -} - -.c17 { - font-size: 0.9375rem; - line-height: 1.125rem; - font-style: normal; - font-stretch: normal; - display: block; - color: rgb(70,70,70); - text-align: left; -} - -.c13 { - box-sizing: border-box; - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-flex: 1 1 auto; - -ms-flex: 1 1 auto; - flex: 1 1 auto; - -webkit-flex-direction: row; - -ms-flex-direction: row; - flex-direction: row; - -webkit-flex-wrap: wrap; - -ms-flex-wrap: wrap; - flex-wrap: wrap; - margin-right: -0.625rem; - margin-left: -0.625rem; -} - -.c25 { - box-sizing: border-box; - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-flex: 1 1 auto; - -ms-flex: 1 1 auto; - flex: 1 1 auto; - -webkit-flex-direction: row; - -ms-flex-direction: row; - flex-direction: row; - -webkit-flex-wrap: wrap; - -ms-flex-wrap: wrap; - flex-wrap: wrap; - margin-right: -0.625rem; - margin-left: -0.625rem; -} - -.c14 { - box-sizing: border-box; - -webkit-flex: 0 0 auto; - -ms-flex: 0 0 auto; - flex: 0 0 auto; - padding-right: 0.625rem; - padding-left: 0.625rem; - display: block; -} - -.c20 { - box-sizing: border-box; - -webkit-flex: 0 0 auto; - -ms-flex: 0 0 auto; - flex: 0 0 auto; - padding-right: 0.625rem; - padding-left: 0.625rem; - display: block; -} - -.c32 { - box-sizing: border-box; - -webkit-flex: 0 0 auto; - -ms-flex: 0 0 auto; - flex: 0 0 auto; - padding-right: 0.625rem; - padding-left: 0.625rem; - display: block; -} - -.c9 { - margin: 0; - color: rgb(73,73,73); - font-weight: 600; - line-height: 1.5rem; - font-size: 0.9375rem; -} - -.c21 { - height: 1px; - background-color: rgb(216,216,216); - background-color: transparent; -} - -.c18 { - margin-top: 0.1875rem; -} - -.c24 { - margin-top: 0.75rem; -} - -.c34 { - margin-right: 0.75rem; -} - -.c5 { - padding-right: 1.125rem; - padding-left: 1.125rem; -} - -.c12 { - padding-left: 1.125rem; - padding-right: 1.125rem; - padding-top: 1.125rem; - padding-bottom: 1.125rem; -} - -.c6 { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-flex-direction: row; - -ms-flex-direction: row; - flex-direction: row; - -webkit-flex-wrap: nowrap; - -ms-flex-wrap: nowrap; - flex-wrap: nowrap; - -webkit-box-pack: start; - -webkit-justify-content: flex-start; - -ms-flex-pack: start; - justify-content: flex-start; - -webkit-align-content: stretch; - -ms-flex-line-pack: stretch; - align-content: stretch; - -webkit-box-pack: justify; - -webkit-justify-content: space-between; - -ms-flex-pack: justify; - justify-content: space-between; - -webkit-align-items: center; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; -} - -.c0 { - box-sizing: content-box; - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-flex: 1 0 auto; - -ms-flex: 1 0 auto; - flex: 1 0 auto; - -webkit-flex-direction: column; - -ms-flex-direction: column; - flex-direction: column; - position: relative; - border-width: 0.0625rem; - border-style: solid; - -webkit-transition: all 300ms ease; - transition: all 300ms ease; - color: rgb(73,73,73); - background-color: rgb(255,255,255); - border-color: rgb(216,216,216); - box-shadow: 0 0.125rem 0 0 rgba(0,0,0,0.05); -} - -.c3 { - box-sizing: content-box; - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-flex: 1 0 auto; - -ms-flex: 1 0 auto; - flex: 1 0 auto; - -webkit-flex-direction: column; - -ms-flex-direction: column; - flex-direction: column; - position: relative; - border-width: 0.0625rem; - border-style: solid; - -webkit-transition: all 300ms ease; - transition: all 300ms ease; - color: rgb(73,73,73); - background-color: rgb(255,255,255); - border-color: rgb(216,216,216); - min-height: auto; - height: 2.875rem; - -webkit-flex: 0 0 2.875rem; - -ms-flex: 0 0 2.875rem; - flex: 0 0 2.875rem; -} - -.c11 { - box-sizing: content-box; - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-flex: 1 0 auto; - -ms-flex: 1 0 auto; - flex: 1 0 auto; - -webkit-flex-direction: column; - -ms-flex-direction: column; - flex-direction: column; - position: relative; - border-width: 0.0625rem; - border-style: solid; - -webkit-transition: all 300ms ease; - transition: all 300ms ease; - color: rgb(73,73,73); - background-color: rgb(255,255,255); - border-color: rgb(216,216,216); -} - -.c10 { - box-sizing: border-box; - display: -webkit-inline-box; - display: -webkit-inline-flex; - display: -ms-inline-flexbox; - display: inline-flex; - -webkit-flex: 1 1 auto; - -ms-flex: 1 1 auto; - flex: 1 1 auto; - -webkit-flex-direction: column; - -ms-flex-direction: column; - flex-direction: column; - border-width: 0; - background-color: transparent; -} - -.c2 { - -webkit-flex-direction: row; - -ms-flex-direction: row; - flex-direction: row; - z-index: 1; - line-height: 1.5rem; - max-width: 100%; - border-top: 0; - border-left: 0; - border-right: 0; -} - -.c8 { - box-sizing: border-box; - min-height: 2.9375rem; - max-width: 100%; - width: auto; - height: auto; - display: -webkit-inline-box; - display: -webkit-inline-flex; - display: -ms-inline-flexbox; - display: inline-flex; - -webkit-flex: 1 1 auto; - -ms-flex: 1 1 auto; - flex: 1 1 auto; - -webkit-flex-direction: column; - -ms-flex-direction: column; - flex-direction: column; - -webkit-box-pack: center; - -webkit-justify-content: center; - -ms-flex-pack: center; - justify-content: center; - -webkit-align-items: stretch; - -webkit-box-align: stretch; - -ms-flex-align: stretch; - align-items: stretch; - -webkit-align-content: stretch; - -ms-flex-line-pack: stretch; - align-content: stretch; - overflow: hidden; - background-color: transparent; - border-width: 0; - box-shadow: none; - color: inherit; -} - -.c15 { - display: inline-block; - padding: 0; - border: none; - overflow: hidden; - height: auto; - -webkit-padding-before: 0; - -webkit-padding-start: 0; - -webkit-padding-end: 0; - -webkit-padding-after: 0; - width: 100%; -} - -.c19 { - box-sizing: border-box; - width: 18.75rem; - height: 3rem; - min-height: 3rem; - padding: 0.8125rem 0.75rem; - border-radius: 0.25rem; - background-color: rgb(255,255,255); - border: 0.0625rem solid rgb(216,216,216); - color: rgb(73,73,73); - font-size: 0.9375rem; - line-height: normal !important; - font-style: normal; - font-stretch: normal; - -webkit-appearance: none; - -moz-appearance: none; - appearance: none; - outline: 0; - max-width: 22.1875rem; - text-overflow: ellipsis; -} - -.c19:focus { - border-color: rgb(59,70,204); - outline: 0; -} - -.c19::-webkit-input-placeholder { - color: rgba(73,73,73,0.5); -} - -.c19::-moz-placeholder { - color: rgba(73,73,73,0.5); -} - -.c19:-ms-input-placeholder { - color: rgba(73,73,73,0.5); -} - -.c19:invalid { - box-shadow: none; -} - -.c19:disabled { - background-color: rgb(250,250,250); - color: rgb(216,216,216); - cursor: not-allowed; -} - -.c19:disabled::-webkit-input-placeholder { - color: rgba(73,73,73,0.5); -} - -.c19:disabled::-moz-placeholder { - color: rgba(73,73,73,0.5); -} - -.c19:disabled:-ms-input-placeholder { - color: rgba(73,73,73,0.5); -} - -.c23 { - box-sizing: border-box; - width: 18.75rem; - height: 6rem; - min-height: 6rem; - padding: 0.8125rem 0.75rem; - border-radius: 0.25rem; - background-color: rgb(255,255,255); - border: 0.0625rem solid rgb(216,216,216); - color: rgb(73,73,73); - font-size: 0.9375rem; - line-height: normal !important; - font-style: normal; - font-stretch: normal; - -webkit-appearance: none; - -moz-appearance: none; - appearance: none; - outline: 0; - font-family: "Roboto Mono",monospace; - width: 100%; - min-width: 100%; - text-overflow: ellipsis; - resize: vertical; -} - -.c23:focus { - border-color: rgb(59,70,204); - outline: 0; -} - -.c23::-webkit-input-placeholder { - color: rgba(73,73,73,0.5); -} - -.c23::-moz-placeholder { - color: rgba(73,73,73,0.5); -} - -.c23:-ms-input-placeholder { - color: rgba(73,73,73,0.5); -} - -.c23:invalid { - box-shadow: none; -} - -.c23:disabled { - background-color: rgb(250,250,250); - color: rgb(216,216,216); - cursor: not-allowed; -} - -.c23:disabled::-webkit-input-placeholder { - color: rgba(73,73,73,0.5); -} - -.c23:disabled::-moz-placeholder { - color: rgba(73,73,73,0.5); -} - -.c23:disabled:-ms-input-placeholder { - color: rgba(73,73,73,0.5); -} - -.c23:disabled { - color: rgb(73,73,73); -} - -.c23:disabled::-webkit-input-placeholder { - color: rgb(73,73,73); -} - -.c23:disabled::-moz-placeholder { - color: rgb(73,73,73); -} - -.c23:disabled:-ms-input-placeholder { - color: rgb(73,73,73); -} - -.c22 { - position: relative; - display: -webkit-inline-box; - display: -webkit-inline-flex; - display: -ms-inline-flexbox; - display: inline-flex; - -webkit-flex: 1 1 auto; - -ms-flex: 1 1 auto; - flex: 1 1 auto; - width: 100%; - max-width: 100%; -} - -.c16 { - font-weight: 600; - white-space: pre; - font-size: 0.8125rem; -} - -.c1 { - border-top: 0; - border-left: 0; - border-right: 0; -} - -.c26 { - margin-right: 0.375rem; -} - -.c4 { - word-wrap: break-word; - overflow-wrap: break-word; - width: 100%; - box-sizing: border-box; -} - -.c7 { - height: 2.9375rem; - max-width: 98%; -} - -@media only screen and (min-width:0em) { - .c25 { - -webkit-align-items: center; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - } -} - -@media only screen and (min-width:0em) { - .c25 { - -webkit-box-pack: justify; - -webkit-justify-content: space-between; - -ms-flex-pack: justify; - justify-content: space-between; - } -} - -@media only screen and (min-width:0em) { - .c14 { - -webkit-flex-basis: 100%; - -ms-flex-preferred-size: 100%; - flex-basis: 100%; - max-width: 100%; - } -} - -@media only screen and (min-width:48em) { - .c20 { - -webkit-flex-basis: 58.333333333333336%; - -ms-flex-preferred-size: 58.333333333333336%; - flex-basis: 58.333333333333336%; - max-width: 58.333333333333336%; - } -} - -@media only screen and (min-width:0em) { - .c32 { - display: none; - } -} - -
-
-
-
-
-
-

- Add metadata -

-
-
-
-
-
-
-
-
-
- -
- -
-
-
-
-
-
-
-
-
-
-
- -
-