-
Notifications
You must be signed in to change notification settings - Fork 0
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
34 changed files
with
1,111 additions
and
153 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Binary file not shown.
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
sharpen-loading { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
align-content: center; | ||
gap: 15px; | ||
width: 159px; | ||
height: 159px; | ||
margin-left: auto; | ||
margin-right: auto; | ||
|
||
.dot { | ||
width: 18px; | ||
height: 18px; | ||
border-radius: 50%; | ||
animation: wave 1.3s linear infinite; | ||
background-color: var(--color-mint); | ||
|
||
&:nth-child(2) { animation-delay: -1.1s; background-color: #0f3e88; } | ||
&:nth-child(3) { animation-delay: -0.9s; background-color: #3F3148; } | ||
} | ||
} | ||
|
||
@keyframes wave { | ||
0%, | ||
60%, | ||
100% { | ||
transform: initial; | ||
} | ||
30% { | ||
transform: translateY(-15px); | ||
} | ||
} |
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,11 @@ | ||
/** | ||
* A loading indicator consisting of 3 bouncing dots. | ||
*/ | ||
export default { | ||
title: 'Atoms/Loading', | ||
tags: ['autodocs'], | ||
render: () => `<sharpen-loading></sharpen-loading>` | ||
}; | ||
|
||
export const Example = { | ||
}; |
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,19 @@ | ||
import { Component, Host, h } from '@stencil/core'; | ||
|
||
@Component({ | ||
tag: 'sharpen-loading', | ||
styleUrl: 'sharpen-loading.scss', | ||
}) | ||
export class SharpenLoading { | ||
|
||
render() { | ||
return ( | ||
<Host> | ||
<span class="dot dot1"></span> | ||
<span class="dot dot2"></span> | ||
<span class="dot dot3"></span> | ||
</Host> | ||
); | ||
} | ||
|
||
} |
42 changes: 23 additions & 19 deletions
42
src/components/sharpen-progress-dial/sharpen-progress-dial.scss
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,24 +1,28 @@ | ||
// sharpen-progress-dial { | ||
// display: block; | ||
sharpen-progress-dial { | ||
display: block; | ||
|
||
// .progress-description { | ||
// font-family: var(--font-family-sans); | ||
// font-size: var(--font-size-xl); | ||
// margin-top: var(--spacing-md); | ||
// font-weight: 700; | ||
// text-align: center; | ||
// } | ||
img { max-width: 100%; } | ||
|
||
// &[status="low"] { | ||
// .progress-description { color: var(--color-pine); } | ||
// } | ||
.progress-container { text-align: center; } | ||
|
||
// &[status="elevated"] { | ||
// .progress-description { color: var(--color-orange); } | ||
// } | ||
.progress-description { | ||
font-family: var(--font-family-sans); | ||
font-size: var(--font-size-xl); | ||
margin-top: var(--spacing-md); | ||
font-weight: 700; | ||
text-align: center; | ||
} | ||
|
||
// &[status="high"] { | ||
// .progress-description { color: var(--color-red); } | ||
// } | ||
&[status="low"] { | ||
.progress-description { color: var(--color-pine); } | ||
} | ||
|
||
// } | ||
&[status="elevated"] { | ||
.progress-description { color: var(--color-orange); } | ||
} | ||
|
||
&[status="high"] { | ||
.progress-description { color: var(--color-red); } | ||
} | ||
|
||
} |
81 changes: 81 additions & 0 deletions
81
src/components/sharpen-progress-dial/sharpen-progress-dial.stories.ts
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,81 @@ | ||
import { optional } from '../../utils/utils'; | ||
|
||
/** | ||
* A dial-style visual progress indicator, with semantic coloring depending on | ||
* the progress value. | ||
* | ||
* Note: Dials are static images, so the size of the color band is based on the | ||
* threshold, not on the exact progress value. | ||
*/ | ||
export default { | ||
title: 'Molecules/Progress Dial', | ||
tags: ['autodocs'], | ||
argTypes: { | ||
highThreshold: { | ||
description: 'The maximum possible value of the progress dial', | ||
table: { defaultValue: { summary: 100 } } | ||
}, | ||
lowThreshold: { | ||
description: 'The value under which the progress bar will display "low" styling. Default is computed to be 33% of the highThreshold.', | ||
}, | ||
elevatedThreshold: { | ||
description: 'The value under which the progress bar will display "elevated" styling. Default is computed to be 66% of the highThreshold.', | ||
}, | ||
progressVal: { | ||
description: 'The current progress value', | ||
table: { defaultValue: { summary: 0 } } | ||
}, | ||
showDescription: { | ||
description: 'Whether or not to display the status description' | ||
}, | ||
statusLabel: { | ||
description: 'An optional label to append after the computed threshold name' | ||
} | ||
}, | ||
render: (args) => ` | ||
<sharpen-progress-dial progress-val="${args.progressVal}"${optional('show-description', args.showDescription)}${optional('status-label', args.statusLabel)}${optional('high-threshold', args.highThreshold)}${optional('low-threshold', args.lowThreshold)}${optional('elevated-threshold', args.elevatedThreshold)}></sharpen-progress-bar>` | ||
}; | ||
|
||
/** Including custom thresholds. */ | ||
export const AllOptions = { | ||
args: { | ||
progressVal: 170, | ||
showDescription: true, | ||
statusLabel: 'Risk', | ||
highThreshold: 200, | ||
lowThreshold: 75, | ||
elevatedThreshold: 180 | ||
}, | ||
}; | ||
|
||
export const ThresholdColors = { | ||
render: () => ` | ||
<div class="row"> | ||
<div class="col-sm"><sharpen-progress-dial progress-val="0" show-description="true"></sharpen-progress-dial></div> | ||
<div class="col-sm"><sharpen-progress-dial progress-val="10" show-description="true"></sharpen-progress-dial></div> | ||
<div class="col-sm"><sharpen-progress-dial progress-val="50" show-description="true"></sharpen-progress-dial></div> | ||
<div class="col-sm"><sharpen-progress-dial progress-val="90" show-description="true"></sharpen-progress-dial></div> | ||
</div> | ||
` | ||
}; | ||
|
||
export const WithDescriptionAndLabel = { | ||
args: { | ||
showDescription: true, | ||
statusLabel: 'Risk', | ||
progressVal: 50 | ||
} | ||
}; | ||
|
||
export const WithDescription = { | ||
args: { | ||
showDescription: true, | ||
progressVal: 50 | ||
} | ||
}; | ||
|
||
export const OnlyDial = { | ||
args: { | ||
progressVal: 50 | ||
} | ||
}; |
Oops, something went wrong.