This repository has been archived by the owner on Sep 9, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix type on umd gulp script * 0.1.5 * Update issue templates (#69) * Hotfix 0.1.5 (#63) * Fix type on umd gulp script * 0.1.5 * Update issue templates * Add pull request template (#70) * Add test for configuring/disabling default autofocus ability (#75) * Update package description * Hotfix 0.1.6 (#79) * Hotfix 0.1.5 (#63) * Fix type on umd gulp script * 0.1.5 * Add popup animation * 0.1.6 * Add the codepen example link from readme (#80) * Link the created CodePen bug report boilerplate (#81) * Add default dark theme (#83) * 0.2.0
- Loading branch information
Showing
10 changed files
with
273 additions
and
9 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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
labels: bug | ||
assignees: '' | ||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**CodePen sample or screenshots** | ||
If applicable, add a fork of [this CodePen](https://codepen.io/ranndev/pen/LYEPgmL) that describe the found bug or add screenshots to help explain your problem. | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Additional context** | ||
Add any other context about the problem here. |
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,7 @@ | ||
--- | ||
name: Custom issue template | ||
about: Describe this issue template's purpose here. | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
--- |
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,18 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
labels: '' | ||
assignees: '' | ||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
**Additional context** | ||
Add any other context or screenshots about the feature request here. |
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,31 @@ | ||
(Thanks for sending a pull request!) | ||
|
||
## Proposed changes | ||
|
||
Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. | ||
|
||
## Related issues | ||
|
||
If it fixes a bug or resolves a feature request, be sure to link to that issue. | ||
|
||
## Types of changes | ||
|
||
What types of changes does your code introduce to UIGuide? | ||
_Put an `x` in the boxes that apply_ | ||
|
||
- [ ] Bugfix (non-breaking change which fixes an issue) | ||
- [ ] New feature (non-breaking change which adds functionality) | ||
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) | ||
- [ ] Documentation Update (if none of the other choices apply) | ||
|
||
## Checklist | ||
|
||
_Put an `x` in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code._ | ||
|
||
- [ ] I have read the [CONTRIBUTING](https://github.com/ranndev/ui-guide/CONTRIBUTING.md) doc | ||
- [ ] I have added tests that prove my fix is effective or that my feature works | ||
- [ ] I have added necessary documentation (if appropriate) | ||
|
||
## Further comments | ||
|
||
If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc... |
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import UIGuide from '../../src/ui-guide'; | ||
|
||
describe('configure - autofocus', () => { | ||
let uiguide: typeof UIGuide; | ||
|
||
before(() => { | ||
cy.visit('/').then((contentWindow) => { | ||
uiguide = contentWindow.__LIBRARY__['ui-guide'].default; | ||
}); | ||
}); | ||
|
||
it('should able to disable the default autofocus ability', () => { | ||
uiguide.configure({ highlightOptions: { autofocus: false } }); | ||
uiguide.highlight('[data-testid="target-1"]'); | ||
|
||
cy.get('[uig-target]').should('not.have.focus'); | ||
}); | ||
}); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,161 @@ | ||
@import '../src/ui-guide-variables'; | ||
|
||
$theme-color: rgb(77, 168, 100) !default; | ||
$popup-arrow-size: 8px; | ||
$box-gutter-size: 8px !default; | ||
$box-border-size: 3px !default; | ||
|
||
[uig-highlight-box] { | ||
box-sizing: content-box !important; | ||
border: $box-border-size solid lighten($theme-color, 5%); | ||
border-radius: 0.25rem; | ||
box-shadow: 0 0 0 999rem lighten(rgba($theme-color, 0.15), 10%), | ||
0 0 0.25rem rgba($theme-color, 0.3); | ||
opacity: 0; | ||
will-change: padding, margin, opacity; | ||
|
||
&[uig-show] { | ||
animation: shrink 0.3s 0.2s forwards; | ||
|
||
@keyframes shrink { | ||
from { | ||
opacity: 0; | ||
padding: $box-gutter-size + 30px; | ||
margin: -$box-gutter-size - $box-border-size - 30px; | ||
} | ||
|
||
to { | ||
opacity: 1; | ||
padding: $box-gutter-size; | ||
margin: -$box-gutter-size - $box-border-size; | ||
} | ||
} | ||
} | ||
} | ||
|
||
[uig-popup-wrapper] { | ||
position: relative; | ||
display: flex; | ||
max-width: 450px; | ||
opacity: 0; | ||
will-change: opacity, transform; | ||
|
||
[uig-popup][uig-show][x-placement='top'] & { | ||
animation: slide-top 0.2s 0.3s ease-out forwards; | ||
|
||
@keyframes slide-top { | ||
from { | ||
transform: translateY(30px); | ||
opacity: 0; | ||
} | ||
|
||
to { | ||
transform: translateY(0); | ||
opacity: 1; | ||
} | ||
} | ||
} | ||
|
||
[uig-popup][uig-show][x-placement='right'] & { | ||
animation: slide-right 0.2s 0.3s ease-out forwards; | ||
|
||
@keyframes slide-right { | ||
from { | ||
transform: translateX(-30px); | ||
opacity: 0; | ||
} | ||
|
||
to { | ||
transform: translateX(0); | ||
opacity: 1; | ||
} | ||
} | ||
} | ||
|
||
[uig-popup][uig-show][x-placement='bottom'] & { | ||
animation: slide-bottom 0.2s 0.3s ease-out forwards; | ||
|
||
@keyframes slide-bottom { | ||
from { | ||
transform: translateY(-30px); | ||
opacity: 0; | ||
} | ||
|
||
to { | ||
transform: translateY(0); | ||
opacity: 1; | ||
} | ||
} | ||
} | ||
|
||
[uig-popup][uig-show][x-placement='left'] & { | ||
animation: slide-left 0.2s 0.3s ease-out forwards; | ||
|
||
@keyframes slide-left { | ||
from { | ||
transform: translateX(30px); | ||
opacity: 0; | ||
} | ||
|
||
to { | ||
transform: translateX(0); | ||
opacity: 1; | ||
} | ||
} | ||
} | ||
} | ||
|
||
span[x-arrow] { | ||
position: absolute; | ||
z-index: 2; | ||
display: inline-block; | ||
border: $popup-arrow-size solid transparent; | ||
|
||
[uig-popup][x-placement='bottom'] & { | ||
top: $box-gutter-size + $box-border-size; | ||
border-bottom-color: darken($theme-color, 5%); | ||
} | ||
|
||
[uig-popup][x-placement='top'] & { | ||
bottom: $box-gutter-size + $box-border-size; | ||
border-top-color: darken($theme-color, 5%); | ||
} | ||
|
||
[uig-popup][x-placement='right'] & { | ||
left: $box-gutter-size + $box-border-size; | ||
border-right-color: darken($theme-color, 5%); | ||
} | ||
|
||
[uig-popup][x-placement='left'] & { | ||
right: $box-gutter-size + $box-border-size; | ||
border-left-color: darken($theme-color, 5%); | ||
} | ||
} | ||
|
||
[uig-popup-card] { | ||
position: relative; | ||
z-index: 1; | ||
display: flex; | ||
flex-direction: column; | ||
padding: 0.75rem; | ||
background-color: $theme-color; | ||
color: #fff; | ||
border-radius: 0.2rem; | ||
overflow: hidden; | ||
|
||
[uig-popup][x-placement='bottom'] & { | ||
margin-top: ($popup-arrow-size * 2) + $box-gutter-size + $box-border-size; | ||
} | ||
|
||
[uig-popup][x-placement='top'] & { | ||
margin-bottom: ($popup-arrow-size * 2) + $box-gutter-size + $box-border-size; | ||
} | ||
|
||
[uig-popup][x-placement='right'] & { | ||
margin-left: ($popup-arrow-size * 2) + $box-gutter-size + $box-border-size; | ||
} | ||
|
||
[uig-popup][x-placement='left'] & { | ||
margin-right: ($popup-arrow-size * 2) + $box-gutter-size + $box-border-size; | ||
} | ||
} |