-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
381 changed files
with
10,183 additions
and
9,001 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,21 @@ | ||
{ | ||
"env": { | ||
"test": { | ||
"dev": { | ||
"presets": [ | ||
["env"] | ||
] | ||
}, | ||
"test": { | ||
"presets": [ | ||
[ | ||
"babel-preset-env", | ||
{ | ||
"targets": { | ||
"node": "current" | ||
} | ||
} | ||
] | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
node_modules | ||
/index.js | ||
!/.storybook | ||
src/atoms/icon/templates/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import 'storybook-addon-vue-info/lib/register' | ||
import '@storybook/addon-notes/register' | ||
import '@storybook/addon-storysource/register' | ||
import '@storybook/addon-a11y/register' | ||
import '@storybook/addon-knobs/register' | ||
import '@storybook/addon-viewport/register' | ||
import '@storybook/addon-actions/register' | ||
import '@storybook/addon-a11y/register' | ||
import '@storybook/addon-storysource/register' | ||
import '@storybook/addon-notes/register' | ||
import '@storybook/addon-viewport/register' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,6 @@ Snowdog team is monitoring for new pull requests. We'll review your PR and eithe | |
git clone [email protected]:SnowdogApps/alpaca-ui.git | ||
cd alpaca-ui | ||
yarn | ||
cd components | ||
yarn dev | ||
``` | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,9 +3,12 @@ | |
</p> | ||
<br/> | ||
|
||
|
||
## Alpaca UI | ||
|
||
[![CircleCI](https://circleci.com/gh/SnowdogApps/alpaca-ui/tree/develop.svg?style=svg)](https://circleci.com/gh/SnowdogApps/alpaca-ui/tree/develop) | ||
[![npm version](https://badge.fury.io/js/%40snowdog%2Falpaca-ui.svg)](https://www.npmjs.com/package/@snowdog/alpaca-ui) | ||
[![codecov](https://codecov.io/gh/SnowdogApps/alpaca-ui/branch/develop/graph/badge.svg)](https://codecov.io/gh/SnowdogApps/alpaca-ui) | ||
|
||
Highly customizable library of responsive UI components crafted for e-commerce. It is based on Vue.js and Alpaca design system. | ||
|
||
|
@@ -19,6 +22,61 @@ Highly customizable library of responsive UI components crafted for e-commerce. | |
- Semantic and accessible code output | ||
- Ready to use with Vue CLI, Vue Storefornt and Nuxt.js | ||
|
||
|
||
## Getting Started | ||
|
||
### Installation | ||
|
||
Add Alpaca UI to your project by using Yarn | ||
```bash | ||
yarn add @snowdog/alpaca-ui | ||
``` | ||
|
||
or NPM | ||
```bash | ||
npm install @snowdog/alpaca-ui | ||
``` | ||
|
||
### Usage | ||
|
||
Import component in your app using named imports: | ||
|
||
`import { AButton } from '@snowdog/alpaca-ui'` | ||
|
||
```vue | ||
<template> | ||
<a-button> | ||
Alpaca button | ||
</a-button> | ||
</template> | ||
<script> | ||
import { AButton } from '@snowdog/alpaca-ui' | ||
export default { | ||
name: 'MyComponent', | ||
components: AButton | ||
} | ||
</script> | ||
``` | ||
|
||
If you need more flexibility you can take the source: | ||
|
||
```vue | ||
<template src="@snowdog/alpaca-ui/src/atoms/button/Button.html" /> | ||
<script> | ||
import AButton from '@snowdog/alpaca-ui/src/atoms/button/Button.js' | ||
export default { | ||
mixins: [AButton] | ||
} | ||
</script> | ||
<style src="@snowdog/alpaca-ui/src/atoms/button/Button.scss" lang="scss" /> | ||
``` | ||
For now, to see all possible cases/modifiers, you should clone and run repo as in Development point, or check .stories.js file in component. | ||
|
||
## Browser support | ||
|
||
Recent versions of Firefox, Chrome, Edge, Opera, Safari and IE11+. | ||
|
@@ -34,16 +92,11 @@ We welcome all contributions. Please read our [CONTRIBUTING.md](https://github.c | |
git clone [email protected]:SnowdogApps/alpaca-ui.git | ||
cd alpaca-ui | ||
yarn | ||
cd components | ||
yarn dev | ||
``` | ||
|
||
Open your browser, visit http://127.0.0.1:6006 and have fun. | ||
|
||
## Cooperation with Storefront UI | ||
|
||
Ideas behind Alpaca UI and [Storefront UI](https://github.com/DivanteLtd/storefront-ui/) are common efforts. We share almost identical configuration and API so you can easily switch between these two ones. [SNOW.DOG](https://snow.dog) and [Divante](https://divante.co) joined forces in figuring out how to make things right to deliver the best possible experience to the users. | ||
|
||
## License | ||
|
||
Code released under MIT license. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
// Global styles to remove focus for mouse events | ||
.js-focus-visible :focus:not([data-focus-visible-added]) { | ||
outline: none; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,38 @@ | ||
$offset: -50px; | ||
$animationDuration: 400ms; | ||
|
||
@-webkit-keyframes slide-down-enter { | ||
from { | ||
-webkit-transform: translate3d(0, -50px, 0); | ||
transform: translate3d(0, -50px, 0); | ||
transform: translate3d(0, $offset, 0); | ||
opacity: 0; | ||
} | ||
} | ||
|
||
@keyframes slide-down-enter { | ||
from { | ||
-webkit-transform: translate3d(0, -50px, 0); | ||
transform: translate3d(0, -50px, 0); | ||
transform: translate3d(0, $offset, 0); | ||
opacity: 0; | ||
} | ||
} | ||
|
||
.slide-down-enter-active { | ||
-webkit-animation: slide-down-enter both cubic-bezier(0.4, 0, 0, 1.5); | ||
animation: slide-down-enter both cubic-bezier(0.4, 0, 0, 1.5); | ||
animation: slide-down-enter $animationDuration both cubic-bezier(0.4, 0, 0, 0); | ||
} | ||
|
||
@-webkit-keyframes slide-down-leave { | ||
to { | ||
-webkit-transform: translate3d(0, -50px, 0); | ||
transform: translate3d(0, -50px, 0); | ||
transform: translate3d(0, $offset, 0); | ||
opacity: 0; | ||
} | ||
} | ||
|
||
@keyframes slide-down-leave { | ||
to { | ||
-webkit-transform: translate3d(0, -50px, 0); | ||
transform: translate3d(0, -50px, 0); | ||
transform: translate3d(0, $offset, 0); | ||
opacity: 0; | ||
} | ||
} | ||
|
||
.slide-down-leave-active { | ||
-webkit-animation: slide-down-leave both; | ||
animation: slide-down-leave both; | ||
animation: slide-down-leave $animationDuration both; | ||
} |
Oops, something went wrong.