-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into feature/nucleus-tabs
- Loading branch information
Showing
10 changed files
with
253 additions
and
2 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
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,149 @@ | ||
body.dark { | ||
& > .ember-view { | ||
background: #171717; | ||
} | ||
|
||
:root { | ||
--brand-primary: #021f60; | ||
} | ||
|
||
.docs-bg-brand { | ||
background-color: #021f60 !important; | ||
} | ||
|
||
//Dark Mode Toggle Icon Fill | ||
.toggle-icon { | ||
fill: #ddd; | ||
} | ||
|
||
.data-search-box-input { | ||
color: white; | ||
} | ||
|
||
.docs-viewer { | ||
background-color: #202020; | ||
} | ||
|
||
.docs-pt-8 { | ||
color: #ddd; | ||
} | ||
|
||
.docs-rounded, | ||
.docs-bg-code-base { | ||
background-color: #272b34; | ||
color: white; | ||
} | ||
|
||
::placeholder { | ||
color: #adabab; | ||
} | ||
|
||
.docs-md__code { | ||
background: #272b34; | ||
color: #abb2bf; | ||
} | ||
|
||
.docs-text-black { | ||
color: #ddd; | ||
} | ||
|
||
.docs-bg-grey-lighter { | ||
background: #272b34; | ||
} | ||
|
||
.docs-text-grey-darker { | ||
color: #8d8d8d; | ||
} | ||
|
||
//Code blocks within text | ||
li > code { | ||
color: rgb(226, 165, 52); | ||
background: rgb(57, 61, 61); | ||
} | ||
|
||
p > code { | ||
color: rgb(226, 165, 52); | ||
background: rgb(57, 61, 61); | ||
} | ||
|
||
.docs-my-8 { | ||
box-shadow: 0 2px 8px 0 rgba(40, 46, 53, .25); | ||
} | ||
|
||
.docs-rounded .docs-p-4 { | ||
border-bottom: 1px dashed #202020; | ||
} | ||
|
||
.docs-text-brand, | ||
h4 a.heading-anchor { | ||
color: #2c5cc5 !important; | ||
text-decoration: none; | ||
} | ||
|
||
.AddonDocs-DocsViewer-Nav { | ||
border-color: #171717; | ||
} | ||
|
||
.docs-border-grey-light { | ||
border-color: #171717; | ||
} | ||
|
||
.docs-border-grey-lighter { | ||
border-color: #171717; | ||
} | ||
|
||
.docs-bg-grey-lightest { | ||
background-color: #151515; | ||
} | ||
|
||
.docs-bg-white { | ||
background-color: #151515; | ||
} | ||
|
||
.docs-shadow { | ||
box-shadow: 0 2px 8px 0 rgba(0, 0, 0, .5); | ||
} | ||
|
||
.docs-demo__snippets-nav.docs-tracking-tight { | ||
background-color: #272b34; | ||
border-color: #272b34; | ||
} | ||
|
||
//Finds all forms of text | ||
.docs-font-title, | ||
.docs-text-grey-darkest, | ||
.docs-h1, | ||
.docs-md__h1, | ||
.docs-h2, | ||
.docs-md__h2, | ||
.docs-md__h2 a, | ||
.docs-md__h3 a, | ||
.docs-h3 a, | ||
.docs-md > p, | ||
li { | ||
color: #ddd; | ||
} | ||
|
||
input, | ||
optgroup, | ||
select, | ||
textarea { | ||
color: #000; | ||
} | ||
|
||
.playground-container { | ||
border-bottom: 1px dotted #202020; | ||
|
||
&--props { | ||
border-left: 1px dotted #202020; | ||
|
||
.item { | ||
margin: 10px; | ||
|
||
.ember-text-field { | ||
border: 1px solid #202020; | ||
} | ||
} | ||
} | ||
} | ||
} |
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.
32 changes: 32 additions & 0 deletions
32
packages/@nucleus/tests/dummy/app/components/theme-toggle.js
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,32 @@ | ||
import Component from '@ember/component'; | ||
import { set, computed } from '@ember/object'; | ||
|
||
export default Component.extend({ | ||
dark: true, | ||
iconName: computed("dark", function(){ | ||
return this.dark ? "light" : "dark" | ||
}), | ||
|
||
toggleDarkTheme(match) { | ||
document.body.classList.toggle('dark', match); | ||
}, | ||
init() { | ||
this._super(); | ||
const prefersDark = window.matchMedia('(prefers-color-scheme: dark)'); | ||
set(this, 'dark', prefersDark.matches); | ||
this.toggleDarkTheme(this.dark); | ||
prefersDark.addListener((mediaQuery) => this.toggleDarkTheme(mediaQuery.matches)) | ||
}, | ||
actions: { | ||
onToggle() { | ||
if (this.dark) { | ||
set(this, 'dark', false); | ||
this.toggleDarkTheme(this.dark); | ||
} | ||
else { | ||
set(this,'dark', true); | ||
this.toggleDarkTheme(this.dark); | ||
} | ||
} | ||
} | ||
}); |
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,4 +1,6 @@ | ||
{{docs-header name="Nucleus" prefix="Freshworks"}} | ||
{{theme-toggle}} | ||
{{#docs-header name="Nucleus" prefix="Freshworks" as |header|}} | ||
{{/docs-header}} | ||
{{outlet}} | ||
{{nucleus-banner isFixed=true}} | ||
{{nucleus-toast-message}} |
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
3 changes: 3 additions & 0 deletions
3
packages/@nucleus/tests/dummy/app/templates/components/theme-toggle.hbs
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,3 @@ | ||
<button class="mode-toggle" onclick={{action "onToggle"}}> | ||
{{nucleus-icon name=iconName customClass="toggle-icon" size="large"}} | ||
</button> |