Skip to content

Commit

Permalink
Refactors the rest of the showcase card views to use flexgrid
Browse files Browse the repository at this point in the history
  • Loading branch information
roblevintennis committed Sep 25, 2020
1 parent 9bea4f4 commit c9df4fb
Show file tree
Hide file tree
Showing 5 changed files with 561 additions and 493 deletions.
1 change: 1 addition & 0 deletions showcase/src/App.vue
Expand Up @@ -123,6 +123,7 @@ export default {
}
.main {
/* TODO -- once we've got everything in the flexgrid I think we'll turn all this off */
width: var(--app-width-initial);
margin: 0 auto;
flex: 1 1 auto;
Expand Down
337 changes: 182 additions & 155 deletions showcase/src/views/InputCards.vue
@@ -1,168 +1,192 @@
<template>
<div>
<h4 id="inputs" :class="$style.types">Inputs</h4>
<div :class="$style.cards">
<Card css="card-override" v-bind:isStacked="true">
<header :class="$style.cardheader">
<h6>Button</h6>
</header>
<a href="#buttons" :class="$style.cardbody">
<svg
width="88"
height="32"
viewBox="0 0 88 32"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<rect width="88" height="32" rx="3" fill="#D8D8D8" />
</svg>
</a>
</Card>
<Card css="card-override" v-bind:isStacked="true">
<header :class="$style.cardheader">
<h6>Input</h6>
</header>
<a href="#" :class="$style.cardbody">
<svg
width="88"
height="32"
viewBox="0 0 88 32"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<rect x="0.5" y="0.5" width="87" height="31" rx="2.5" stroke="#D8D8D8" />
</svg>
</a>
</Card>

<Card css="card-override" v-bind:isStacked="true">
<header :class="$style.cardheader">
<h6>Textarea</h6>
</header>
<a href="#" :class="$style.cardbody">
<svg
width="88"
height="72"
viewBox="0 0 88 72"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<rect x="0.5" y="0.5" width="87" height="71" rx="2.5" stroke="#D8D8D8" />
<line x1="83.3536" y1="60.3536" x2="76.3536" y2="67.3536" stroke="#D8D8D8" />
</svg>
</a>
</Card>
<Card css="card-override" v-bind:isStacked="true">
<header :class="$style.cardheader">
<h6>Select</h6>
</header>
<a href="#" :class="$style.cardbody">
<svg
width="88"
height="32"
viewBox="0 0 88 32"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path d="M75 21L70.6699 13.5L79.3301 13.5L75 21Z" fill="#C4C4C4" />
<rect x="0.5" y="0.5" width="87" height="31" rx="2.5" stroke="#D8D8D8" />
</svg>
</a>
</Card>
</div>

<div :class="$style.cards">
<Card css="card-override" v-bind:isStacked="true">
<header :class="$style.cardheader">
<h6>Progress</h6>
</header>
<a href="#" :class="$style.cardbody">
<svg
width="88"
height="10"
viewBox="0 0 88 10"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<rect x="0.5" y="0.5" width="87" height="9" rx="4.5" stroke="#D8D8D8" />
<path
d="M0 5C0 2.23858 2.23858 0 5 0H34.4667V10H5C2.23858 10 0 7.76142 0 5Z"
fill="#D8D8D8"
/>
</svg>
</a>
</Card>
<Card css="card-override" v-bind:isStacked="true">
<header :class="$style.cardheader">
<h6>Checkbox</h6>
</header>
<a href="#" :class="$style.cardbody">
<svg
width="92"
height="54"
viewBox="0 0 92 54"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<rect x="28.5" y="22.5" width="63" height="9" stroke="#D8D8D8" />
<rect x="28.5" y="0.5" width="63" height="9" stroke="#D8D8D8" />
<rect x="28.5" y="44.5" width="63" height="9" stroke="#D8D8D8" />
<rect y="22" width="10" height="10" fill="#D8D8D8" />
<rect x="0.5" y="0.5" width="9" height="9" stroke="#D8D8D8" />
<rect x="0.5" y="44.5" width="9" height="9" stroke="#D8D8D8" />
</svg>
</a>
</Card>
<Card css="card-override" v-bind:isStacked="true">
<header :class="$style.cardheader">
<h6>Radio</h6>
</header>
<a href="#" :class="$style.cardbody">
<svg
width="90"
height="54"
viewBox="0 0 90 54"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<rect x="26.5" y="0.5" width="63" height="9" stroke="#D8D8D8" />
<rect x="26.5" y="22.5" width="63" height="9" stroke="#D8D8D8" />
<rect x="26.5" y="44.5" width="63" height="9" stroke="#D8D8D8" />
<circle cx="5" cy="5" r="4.5" stroke="#D8D8D8" />
<circle cx="5" cy="27" r="5" fill="#CCCCCC" />
<circle cx="5" cy="49" r="4.5" stroke="#D8D8D8" />
</svg>
</a>
</Card>
<Card css="card-override" v-bind:isStacked="true">
<header :class="$style.cardheader">
<h6>Button Select</h6>
</header>
<a href="#" :class="$style.cardbody">
<svg
width="104"
height="20"
viewBox="0 0 104 20"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path d="M36 0H68V20H36V0Z" fill="#D8D8D8" />
<path d="M0 0H32V20H0V0Z" fill="#CCCCCC" />
<path d="M72 0H104V20H72V0Z" fill="#D8D8D8" />
</svg>
</a>
</Card>
</div>
</div>
<FlexGrid tagName="section">
<FlexRow v-bind:gutter="16">
<FlexCol v-bind:xs="12">
<h4 id="inputs" :class="$style.types">Inputs</h4>
</FlexCol>
</FlexRow>
<FlexRow v-bind:gutter="16">
<FlexCol v-bind:xs="12" auto>
<Card v-bind:isStacked="true">
<header :class="$style.cardheader">
<h6>Button</h6>
</header>
<a href="#buttons" :class="$style.cardbody">
<svg
width="88"
height="32"
viewBox="0 0 88 32"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<rect width="88" height="32" rx="3" fill="#D8D8D8" />
</svg>
</a>
</Card>
</FlexCol>
<FlexCol v-bind:xs="12" auto>
<Card v-bind:isStacked="true">
<header :class="$style.cardheader">
<h6>Input</h6>
</header>
<a href="#" :class="$style.cardbody">
<svg
width="88"
height="32"
viewBox="0 0 88 32"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<rect x="0.5" y="0.5" width="87" height="31" rx="2.5" stroke="#D8D8D8" />
</svg>
</a>
</Card>
</FlexCol>
<FlexCol v-bind:xs="12" auto>
<Card v-bind:isStacked="true">
<header :class="$style.cardheader">
<h6>Textarea</h6>
</header>
<a href="#" :class="$style.cardbody">
<svg
width="88"
height="72"
viewBox="0 0 88 72"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<rect x="0.5" y="0.5" width="87" height="71" rx="2.5" stroke="#D8D8D8" />
<line x1="83.3536" y1="60.3536" x2="76.3536" y2="67.3536" stroke="#D8D8D8" />
</svg>
</a>
</Card>
</FlexCol>
<FlexCol v-bind:xs="12" auto>
<Card v-bind:isStacked="true">
<header :class="$style.cardheader">
<h6>Select</h6>
</header>
<a href="#" :class="$style.cardbody">
<svg
width="88"
height="32"
viewBox="0 0 88 32"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path d="M75 21L70.6699 13.5L79.3301 13.5L75 21Z" fill="#C4C4C4" />
<rect x="0.5" y="0.5" width="87" height="31" rx="2.5" stroke="#D8D8D8" />
</svg>
</a>
</Card>
</FlexCol>
</FlexRow>
<FlexRow :customClasses="$style.row2" v-bind:gutter="16">
<FlexCol v-bind:xs="12" auto>
<Card v-bind:isStacked="true">
<header :class="$style.cardheader">
<h6>Progress</h6>
</header>
<a href="#" :class="$style.cardbody">
<svg
width="88"
height="10"
viewBox="0 0 88 10"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<rect x="0.5" y="0.5" width="87" height="9" rx="4.5" stroke="#D8D8D8" />
<path
d="M0 5C0 2.23858 2.23858 0 5 0H34.4667V10H5C2.23858 10 0 7.76142 0 5Z"
fill="#D8D8D8"
/>
</svg>
</a>
</Card>
</FlexCol>
<FlexCol v-bind:xs="12" auto>
<Card v-bind:isStacked="true">
<header :class="$style.cardheader">
<h6>Checkbox</h6>
</header>
<a href="#" :class="$style.cardbody">
<svg
width="92"
height="54"
viewBox="0 0 92 54"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<rect x="28.5" y="22.5" width="63" height="9" stroke="#D8D8D8" />
<rect x="28.5" y="0.5" width="63" height="9" stroke="#D8D8D8" />
<rect x="28.5" y="44.5" width="63" height="9" stroke="#D8D8D8" />
<rect y="22" width="10" height="10" fill="#D8D8D8" />
<rect x="0.5" y="0.5" width="9" height="9" stroke="#D8D8D8" />
<rect x="0.5" y="44.5" width="9" height="9" stroke="#D8D8D8" />
</svg>
</a>
</Card>
</FlexCol>
<FlexCol v-bind:xs="12" auto>
<Card v-bind:isStacked="true">
<header :class="$style.cardheader">
<h6>Radio</h6>
</header>
<a href="#" :class="$style.cardbody">
<svg
width="90"
height="54"
viewBox="0 0 90 54"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<rect x="26.5" y="0.5" width="63" height="9" stroke="#D8D8D8" />
<rect x="26.5" y="22.5" width="63" height="9" stroke="#D8D8D8" />
<rect x="26.5" y="44.5" width="63" height="9" stroke="#D8D8D8" />
<circle cx="5" cy="5" r="4.5" stroke="#D8D8D8" />
<circle cx="5" cy="27" r="5" fill="#CCCCCC" />
<circle cx="5" cy="49" r="4.5" stroke="#D8D8D8" />
</svg>
</a>
</Card>
</FlexCol>
<FlexCol v-bind:xs="12" auto>
<Card v-bind:isStacked="true">
<header :class="$style.cardheader">
<h6>Button Select</h6>
</header>
<a href="#" :class="$style.cardbody">
<svg
width="104"
height="20"
viewBox="0 0 104 20"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path d="M36 0H68V20H36V0Z" fill="#D8D8D8" />
<path d="M0 0H32V20H0V0Z" fill="#CCCCCC" />
<path d="M72 0H104V20H72V0Z" fill="#D8D8D8" />
</svg>
</a>
</Card>
</FlexCol>
</FlexRow>
</FlexGrid>
</template>

<script>
import Card from "agnosticui/Card.vue";
import FlexGrid from "agnosticui/FlexGrid/FlexGrid";
import FlexRow from "agnosticui/FlexGrid/FlexRow";
import FlexCol from "agnosticui/FlexGrid/FlexCol";
export default {
name: "InputCards",
components: {
Card,
FlexCol,
FlexGrid,
FlexRow,
},
};
</script>
Expand All @@ -180,4 +204,7 @@ export default {
.cardbody {
composes: cardbody from "./views.module.css";
}
.row2 {
margin-top: var(--Space-24);
}
</style>

0 comments on commit c9df4fb

Please sign in to comment.