-
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.
* master: fix(modal): fixes positioning of elements (#154) fix(toast-message): Design review updates (#155) feat(tabs): Implementation (#138) chore(nucleus): Nucleus now lives in the Dark! (#152) fix(Inline-banner): refactored yield (#151) # Conflicts: # packages/@nucleus/package.json
- Loading branch information
Showing
90 changed files
with
2,074 additions
and
45 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
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.
17 changes: 17 additions & 0 deletions
17
packages/@nucleus/tests/dummy/app/components/nucleus-tabs/demo-1.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,17 @@ | ||
// BEGIN-SNIPPET nucleus-tabs-2.js | ||
import Component from '@ember/component'; | ||
import { inject } from '@ember/service'; | ||
import { get } from '@ember/object'; | ||
|
||
export default Component.extend({ | ||
flashMessages: inject(), | ||
actions: { | ||
onChange(changedTo) { // changedTo, ChangedFrom, event params accepted | ||
const flashMessages = get(this, 'flashMessages'); | ||
flashMessages.info(`Custom action invoked. '${changedTo}' tab selected!`, { | ||
timeout: 1500 | ||
}); | ||
} | ||
} | ||
}); | ||
// END-SNIPPET |
29 changes: 29 additions & 0 deletions
29
packages/@nucleus/tests/dummy/app/components/nucleus-tabs/demo-2.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,29 @@ | ||
// BEGIN-SNIPPET nucleus-tabs-3.js | ||
import Component from '@ember/component'; | ||
import { inject } from '@ember/service'; | ||
import RSVP from 'rsvp'; | ||
import { get } from '@ember/object'; | ||
|
||
export default Component.extend({ | ||
flashMessages: inject(), | ||
actions: { | ||
beforeChange() { // changedTo, changedFrom, event params accepted | ||
const flashMessages = get(this, 'flashMessages'); | ||
flashMessages.info(`Performing asyncronous operation..`, { | ||
timeout: 1500 | ||
}); | ||
return new RSVP.Promise(function(resolve) { | ||
setTimeout(function () { | ||
resolve(); | ||
}, 2000); | ||
}); | ||
}, | ||
onChange() { // changedTo, ChangedFrom, event params accepted | ||
const flashMessages = get(this, 'flashMessages'); | ||
flashMessages.info(`Tab changed.`, { | ||
timeout: 1500 | ||
}); | ||
} | ||
} | ||
}); | ||
// END-SNIPPET |
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
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
17 changes: 2 additions & 15 deletions
17
packages/@nucleus/tests/dummy/app/templates/components/nucleus-inline-banner/demo-2.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
Oops, something went wrong.