|^function\s*\(/,$a=/\([^)]*?\);*$/,wa=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,Ca={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},xa={esc:["Esc","Escape"],tab:"Tab",enter:"Enter",space:[" ","Spacebar"],up:["Up","ArrowUp"],left:["Left","ArrowLeft"],right:["Right","ArrowRight"],down:["Down","ArrowDown"],delete:["Backspace","Delete","Del"]},Aa=function(e){return"if("+e+")return null;"},ka={stop:"$event.stopPropagation();",prevent:"$event.preventDefault();",self:Aa("$event.target !== $event.currentTarget"),ctrl:Aa("!$event.ctrlKey"),shift:Aa("!$event.shiftKey"),alt:Aa("!$event.altKey"),meta:Aa("!$event.metaKey"),left:Aa("'button' in $event && $event.button !== 0"),middle:Aa("'button' in $event && $event.button !== 1"),right:Aa("'button' in $event && $event.button !== 2")};function Oa(e,t){var n=t?"nativeOn:":"on:",r="",i="";for(var o in e){var a=Sa(e[o]);e[o]&&e[o].dynamic?i+=o+","+a+",":r+='"'+o+'":'+a+","}return r="{"+r.slice(0,-1)+"}",i?n+"_d("+r+",["+i.slice(0,-1)+"])":n+r}function Sa(e){if(!e)return"function(){}";if(Array.isArray(e))return"["+e.map(function(e){return Sa(e)}).join(",")+"]";var t=wa.test(e.value),n=ba.test(e.value),r=wa.test(e.value.replace($a,""));if(e.modifiers){var i="",o="",a=[];for(var s in e.modifiers)if(ka[s])o+=ka[s],Ca[s]&&a.push(s);else if("exact"===s){var c=e.modifiers;o+=Aa(["ctrl","shift","alt","meta"].filter(function(e){return!c[e]}).map(function(e){return"$event."+e+"Key"}).join("||"))}else a.push(s);return a.length&&(i+=function(e){return"if(('keyCode' in $event)&&"+e.map(Ta).join("&&")+")return null;"}(a)),o&&(i+=o),"function($event){"+i+(t?"return "+e.value+"($event)":n?"return ("+e.value+")($event)":r?"return "+e.value:e.value)+"}"}return t||n?e.value:"function($event){"+(r?"return "+e.value:e.value)+"}"}function Ta(e){var t=parseInt(e,10);if(t)return"$event.keyCode!=="+t;var n=Ca[e],r=xa[e];return"_k($event.keyCode,"+JSON.stringify(e)+","+JSON.stringify(n)+",$event.key,"+JSON.stringify(r)+")"}var Ea={on:function(e,t){e.wrapListeners=function(e){return"_g("+e+","+t.value+")"}},bind:function(e,t){e.wrapData=function(n){return"_b("+n+",'"+e.tag+"',"+t.value+","+(t.modifiers&&t.modifiers.prop?"true":"false")+(t.modifiers&&t.modifiers.sync?",true":"")+")"}},cloak:S},ja=function(e){this.options=e,this.warn=e.warn||xr,this.transforms=Ar(e.modules,"transformCode"),this.dataGenFns=Ar(e.modules,"genData"),this.directives=k(k({},Ea),e.directives);var t=e.isReservedTag||T;this.maybeComponent=function(e){return!!e.component||!t(e.tag)},this.onceId=0,this.staticRenderFns=[],this.pre=!1};function Na(e,t){var n=new ja(t);return{render:"with(this){return "+(e?La(e,n):'_c("div")')+"}",staticRenderFns:n.staticRenderFns}}function La(e,t){if(e.parent&&(e.pre=e.pre||e.parent.pre),e.staticRoot&&!e.staticProcessed)return Ma(e,t);if(e.once&&!e.onceProcessed)return Ia(e,t);if(e.for&&!e.forProcessed)return Pa(e,t);if(e.if&&!e.ifProcessed)return Da(e,t);if("template"!==e.tag||e.slotTarget||t.pre){if("slot"===e.tag)return function(e,t){var n=e.slotName||'"default"',r=Ha(e,t),i="_t("+n+(r?","+r:""),o=e.attrs&&"{"+e.attrs.map(function(e){return b(e.name)+":"+e.value}).join(",")+"}",a=e.attrsMap["v-bind"];!o&&!a||r||(i+=",null");o&&(i+=","+o);a&&(i+=(o?"":",null")+","+a);return i+")"}(e,t);var n;if(e.component)n=function(e,t,n){var r=t.inlineTemplate?null:Ha(t,n,!0);return"_c("+e+","+Ra(t,n)+(r?","+r:"")+")"}(e.component,e,t);else{var r;(!e.plain||e.pre&&t.maybeComponent(e))&&(r=Ra(e,t));var i=e.inlineTemplate?null:Ha(e,t,!0);n="_c('"+e.tag+"'"+(r?","+r:"")+(i?","+i:"")+")"}for(var o=0;o':'',Wa.innerHTML.indexOf("
")>0}var Ya=!!U&&Xa(!1),Qa=!!U&&Xa(!0),es=g(function(e){var t=Wn(e);return t&&t.innerHTML}),ts=gn.prototype.$mount;return gn.prototype.$mount=function(e,t){if((e=e&&Wn(e))===document.body||e===document.documentElement)return this;var n=this.$options;if(!n.render){var r=n.template;if(r)if("string"==typeof r)"#"===r.charAt(0)&&(r=es(r));else{if(!r.nodeType)return this;r=r.innerHTML}else e&&(r=function(e){if(e.outerHTML)return e.outerHTML;var t=document.createElement("div");return t.appendChild(e.cloneNode(!0)),t.innerHTML}(e));if(r){var i=Ga(r,{outputSourceRange:!1,shouldDecodeNewlines:Ya,shouldDecodeNewlinesForHref:Qa,delimiters:n.delimiters,comments:n.comments},this),o=i.render,a=i.staticRenderFns;n.render=o,n.staticRenderFns=a}}return ts.call(this,e,t)},gn.compile=Ga,gn});
diff --git a/docs/script.js b/docs/script.js
new file mode 100644
index 00000000..a2c18f5a
--- /dev/null
+++ b/docs/script.js
@@ -0,0 +1,639 @@
+const sampleCollection = [
+ {
+ title: 'texts',
+ showCode: false,
+ code: `Primary
+Success
+Warning
+Error
+Disabled`,
+ },
+ {
+ title: 'buttons',
+ showCode: false,
+ code: `Normal
+
+
+
+
+
+`,
+ },
+ {
+ title: 'radios',
+ showCode: false,
+ code: `
+
+
+
+
+
+
+
+
`,
+ },
+ {
+ title: 'checkboxes',
+ showCode: false,
+ code: `
+
+
+
+
`,
+ },
+ {
+ title: 'inputs',
+ showCode: false,
+ code: `
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
`,
+ },
+ {
+ title: 'textarea',
+ showCode: false,
+ code: `
+`,
+ },
+ {
+ title: 'selects',
+ showCode: false,
+ code: `
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
`,
+ },
+ {
+ title: 'containers',
+ showCode: false,
+ code: `
+
Container.is-centered
+
Good morning. Thou hast had a good night's sleep, I hope.
+
+
+
+
Container.is-dark
+
Good morning. Thou hast had a good night's sleep, I hope.
+
+
+
+
Good morning. Thou hast had a good night's sleep, I hope.
+
+
+
+
Good morning. Thou hast had a good night's sleep, I hope.
+
`,
+ },
+ {
+ title: 'dialogs',
+ note:
+ 'NES.css does not include any JavaScript. If you want to use dialog element other than Chrome, you need polyfill.',
+ showCode: false,
+ code: `
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+`,
+ },
+ {
+ title: 'lists',
+ showCode: false,
+ code: `
+
+ - Good morning.
+ - Thou hast had a good night's sleep, I hope.
+ - Thou hast had a good afternoon
+ - Good night.
+
+
+
+
+
+ - Good morning.
+ - Thou hast had a good night's sleep, I hope.
+ - Thou hast had a good afternoon
+ - Good night.
+
+
`,
+ },
+ {
+ title: 'tables',
+ showCode: false,
+ code: `
+
+
+
+ Table.is-bordered |
+ Table.is-centered |
+ Table.is-centered |
+ Table.is-centered |
+
+
+
+
+ Thou hast had a good morning |
+ Thou hast had a good afternoon |
+ Thou hast had a good evening |
+ Thou hast had a good night |
+
+
+ Thou hast had a good morning |
+ Thou hast had a good afternoon |
+ Thou hast had a good evening |
+ Thou hast had a good night |
+
+
+
+
+
+
+
+
+
+ Table.is-dark |
+ Table.is-bordered |
+
+
+
+
+ Thou hast had a good morning |
+ Thou hast had a good afternon |
+
+
+ Thou hast had a good morning |
+ Thou hast had a good afternoon |
+
+
+
+
`,
+ },
+ {
+ title: 'progress',
+ showCode: false,
+ code: `
+
+
+
+
+`,
+ },
+ {
+ title: 'avatars',
+ description: 'It is recommended to "image-rendering: pixelated".',
+ showCode: false,
+ code: `
+
+
+
+
+
+
+
+
+
+
+`,
+ },
+ {
+ title: 'balloons',
+ showCode: false,
+ code: `
+
+
+
+
+
+
Good morning. Thou hast had a good night's sleep, I hope.
+
+
+
+`,
+ },
+ {
+ title: 'badges',
+ showCode: false,
+ code: `
+ NES.css
+
+
+
+ is
+
+
+
+ a
+
+
+
+ great
+
+
+
+ framework!
+
+
+
+ npm
+ 1.1.0
+
+
+
+ test
+ 100%
+
+
+
+
+ Icons
+
+
+
+ hi
+ Text
+`,
+ },
+ {
+ title: 'reaction-icons',
+ showCode: false,
+ description:
+ 'If you wanto to change icon size, please use "is-small", "is-medium" and "is-large".',
+ code: `
+
+
+
+
+
+
+
+
+
+
+
+
+
+`,
+ },
+ {
+ title: 'sns-icons',
+ showCode: false,
+ description:
+ 'If you wanto to change icon size, please use "is-small", "is-medium" and "is-large".',
+ code: `
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+`,
+ },
+ {
+ title: 'other-icons',
+ showCode: false,
+ description:
+ 'If you wanto to change icon size, please use "is-small", "is-medium" and "is-large".',
+ code: ``,
+ },
+ {
+ title: 'pixel-arts',
+ showCode: false,
+ code: `
+
+
+
+
+
+
+
+
+
+
+
+
+`,
+ },
+ {
+ title: 'Nintendo-characters',
+ showCode: false,
+ note:
+ 'Nintendo owns the copyright of these characters. Please comply with the Nintendo guidelines and laws of the applicable jurisdiction.',
+ code: ``,
+ },
+];
+
+const coreteam = [
+ {
+ name: 'B.C.Rikko',
+ feat: 'Creator of NES.css',
+ github: 'BcRikko',
+ twitter: 'bc_rikko',
+ },
+ {
+ name: 'Igor Guastalla',
+ feat: 'Development support',
+ github: 'guastallaigor',
+ twitter: 'guastallaigor',
+ },
+];
+
+const emeriti = [
+ {
+ name: 'Trezy',
+ feat: 'Setup DevOps',
+ github: 'trezy',
+ twitter: 'TrezyCodes',
+ },
+ {
+ name: 'Abdullah Samman',
+ feat: 'Setup test suite',
+ github: 'evexoio',
+ twitter: 'evexoio',
+ },
+];
+
+new Vue({
+ el: '#nescss',
+ data() {
+ return {
+ collection: sampleCollection,
+ coreteam,
+ emeriti,
+ contributors: [],
+ animateOctocat: false,
+ copiedBalloon: {
+ display: 'none',
+ top: 0,
+ left: 0,
+ },
+ scrollPos: 0,
+ };
+ },
+ filters: {
+ capitalize(val) {
+ if (!val) return '';
+ val = val.toString();
+ return val.charAt(0).toUpperCase() + val.slice(1);
+ },
+ },
+ created() {
+ this.fetchContributors();
+ },
+ mounted() {
+ document.addEventListener('scroll', () => {
+ this.scrollPos = document.documentElement.scrollTop || document.body.scrollTop;
+ });
+ hljs.initHighlightingOnLoad();
+ [].forEach.call(document.querySelectorAll('dialog'), (a) => {
+ dialogPolyfill.registerDialog(a);
+ });
+ },
+ methods: {
+ share(media) {
+ const url = (() => {
+ switch (media) {
+ case 'twitter':
+ return 'https://twitter.com/share?text=NES.css%EF%BD%9CNES-style%20CSS%20Framework%20%40bc_rikko&url=https://nostalgic-css.github.io/NES.css/';
+ case 'facebook':
+ return 'https://www.facebook.com/sharer.php?u=https://nostalgic-css.github.io/NES.css/&t=NES.css%EF%BD%9CNES-style%20CSS%20Framework';
+ case 'linkedin':
+ return 'https://www.linkedin.com/shareArticle?url=https%3A//nostalgic-css.github.io/NES.css/&title=NES.css%EF%BD%9CNES-style%20CSS%20Framework';
+ case 'github':
+ return 'https://github.com/nostalgic-css/NES.css';
+ }
+ })();
+
+ window.open(url, '');
+ },
+ copy(event, id) {
+ this.showCopiedBalloon(event.pageY, event.pageX);
+
+ const fake = document.createElement('textarea');
+ fake.value = this.collection.find(a => a.title === id).code;
+ fake.setAttribute('readonly', '');
+ Object.assign(fake.style, {
+ position: 'absolute',
+ left: '-9999px',
+ });
+ this.$el.appendChild(fake);
+ fake.select();
+ document.execCommand('copy');
+ this.$el.removeChild(fake);
+ },
+ startAnimate() {
+ this.animateOctocat = true;
+ },
+ stopAnimate() {
+ this.animateOctocat = false;
+ },
+ showCopiedBalloon(top, left) {
+ this.copiedBalloon = {
+ display: 'block',
+ top: `${top - 100}px`,
+ left: `${left - 180}px`,
+ };
+ setTimeout(() => {
+ this.copiedBalloon.display = 'none';
+ }, 1000);
+ },
+ async fetchContributors() {
+ try {
+ const res = await fetch('https://api.github.com/repos/nostalgic-css/NES.css/contributors');
+ const json = await res.json();
+
+ const coreMembers = [...this.coreteam, ...this.emeriti].map(a => a.github);
+ this.contributors = json.filter(a => !coreMembers.includes(a.login)).map(a => a.login);
+ } catch (e) {
+ console.error(e);
+ return;
+ }
+
+ await this.$nextTick();
+ this.replaceImages();
+ },
+ replaceImages() {
+ Array.from(document.querySelectorAll('img.lazy')).forEach((img) => {
+ img.onload = () => img.classList.remove('lazy');
+ img.src = img.dataset.src;
+ });
+ },
+ },
+});
diff --git a/docs/style.css b/docs/style.css
new file mode 100644
index 00000000..263469d8
--- /dev/null
+++ b/docs/style.css
@@ -0,0 +1,318 @@
+@charset "utf-8";
+@import url(https://fonts.googleapis.com/css?family=Press+Start+2P);
+
+body {
+ padding: 0 2rem;
+ margin: 0 2rem;
+}
+
+#nescss > .container {
+ max-width: 980px;
+ margin: 0 auto;
+ margin-top: 150px;
+}
+
+/* Header */
+header {
+ position: fixed;
+ top: 0;
+ left: 0;
+ right: 0;
+ z-index: 9;
+ border-bottom: 4px solid #D3D3D3;
+ background-color: white;
+}
+
+header > .container {
+ display: flex;
+ align-items: baseline;
+ max-width: 980px;
+ margin: 0 auto;
+ padding-top: 1rem;
+ transition: all 0.2s ease;
+}
+
+header > .container > .nav-brand {
+ margin-right: auto;
+}
+header > .container > .social-button {
+ margin-left: auto;
+}
+
+.nav-brand .brand-logo {
+ margin-right: 1rem;
+}
+.nav-brand > a {
+ color: #212529;
+ text-decoration: none;
+}
+
+.social-buttons p {
+ margin-bottom: 0;
+}
+
+/* Header-sticky */
+header.sticky > .container {
+ font-size: 0.8rem;
+ padding: 0;
+ align-items: center;
+}
+header.sticky .nav-brand h1 {
+ margin: 0;
+}
+header.sticky .nav-brand p {
+ display: none;
+ margin-bottom: 0;
+ font-size: 0.6rem;
+}
+
+/* Main */
+.main-content {
+ margin-bottom: 4rem;
+}
+
+/* Footer */
+footer {
+ text-align: center;
+ margin-bottom: 2rem;
+}
+footer a {
+ color: #333;
+ text-decoration: none;
+}
+
+h2 > a {
+ margin-right: 1rem;
+}
+
+.topic {
+ margin-bottom: 3rem;
+}
+
+/* github link */
+.github-link {
+ position: fixed;
+ top: 100px;
+ right: -240px;
+ z-index: 999;
+ display: flex;
+ height: 100px;
+ color: #333;
+ text-decoration: none;
+ transition: all 0.3s ease;
+}
+.github-link.active {
+ right: 10px;
+}
+.github-link:hover {
+ text-decoration: none;
+}
+.github-link > p.nes-balloon {
+ align-self: flex-start;
+ padding: 0.2rem 0.5rem;
+ font-size: 0.8rem;
+ color: #333;
+}
+.github-link > i.nes-octocat {
+ align-self: flex-end;
+}
+
+/* Showcase */
+section.showcase {
+ margin-top: 2.5rem;
+}
+section.showcase > section.nes-container {
+ padding-bottom: 2.5rem;
+}
+section.showcase > section.nes-container,
+section.showcase > section.samplecode {
+ position: relative;
+}
+.nes-btn.showcode {
+ position: absolute;
+ font-size: 12px;
+ bottom: 0px;
+ right: -4px;
+}
+.nes-btn.copycode {
+ position: absolute;
+ font-size: 12px;
+ top: 0;
+ right: 0px;
+}
+
+section.showcase > section.samplecode > pre code {
+ font-size: 13px;
+ line-height: 1.5;
+ padding: 1.5rem;
+}
+
+.item {
+ margin-bottom: -1rem;
+}
+.item > * {
+ margin-bottom: 1.5rem !important;
+}
+
+/* Containers */
+.item.containers > .nes-container {
+ display: inline-block;
+ max-width: 400px;
+}
+
+/* Balloons sample */
+section.message-list {
+ display: flex;
+ flex-direction: column;
+}
+.message-list > .message {
+ display: flex;
+ margin-top: 2rem;
+}
+.message-list > .message > .nes-balloon {
+ max-width: 550px;
+}
+.message-list > .message i {
+ align-self: flex-end;
+}
+.message-list > .message.-left {
+ align-self: flex-start;
+}
+.message-list > .message.-right {
+ align-self: flex-end;
+}
+.message-list > .message.-left i {
+ margin-right: 2rem;
+}
+.message-list > .message.-right i {
+ margin-left: 2rem;
+}
+
+.icon-list > .blur-filter {
+ filter: blur(10px);
+}
+
+/* Copied balloon */
+.nes-balloon.copied-balloon {
+ position: absolute;
+ display: none;
+ padding: 1rem;
+ box-shadow: 0 5px 20px 5px rgba(0,0,0,.6);
+ z-index: 1;
+}
+
+/* Topic */
+h3.topic-title {
+ display: flex;
+ align-items: center;
+ margin-bottom: 1rem;
+}
+
+h3.topic-title > i {
+ margin-right: 1.5rem;
+}
+
+/* coreteam */
+.coreteam-members {
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: space-between;
+}
+.nes-container.member-card {
+ display: flex;
+ padding: 1rem 1.5rem;
+ width: 470px;
+ margin-bottom: 2rem;
+}
+
+.member-card .avatar > img {
+ display: block;
+ width: 80px;
+ height: 80px;
+ border-radius: 50%;
+}
+.member-card > .profile {
+ margin-left: 1.5rem;
+}
+.member-card > .profile > .name {
+ font-size: 20px;
+}
+
+/* Contributors */
+.contributor {
+ display: inline-block;
+ margin: 1rem;
+ text-align: center;
+ width: 160px;
+}
+.contributor > p {
+ margin: .5rem;
+ font-size: 12px;
+}
+.contributor img.nes-avatar {
+ transition: all .4s;
+ display: inline-block;
+}
+.contributor:hover {
+ text-decoration: none;
+ opacity: 0.7;
+}
+
+/* Articles */
+.article-link > .title a {
+ color: #333;
+}
+.article-link > .title span {
+ margin-left: 1rem;
+}
+
+/* Scroll back to top */
+.scroll-btn {
+ position: fixed;
+ bottom: -60px;
+ right: 2rem;
+ box-shadow: 0 5px 20px rgba(0,0,0,.6);
+ transition: all 0.3s ease;
+}
+.scroll-btn.active {
+ bottom: 25px;
+}
+.scroll-btn > span {
+ display: block;
+ transform: rotateZ(90deg);
+}
+
+img.lazy {
+ background-color: #D3D3D3;
+}
+
+@media screen and (max-width: calc(980px - 4rem)) {
+ header > .container {
+ margin: 0 4rem;
+ }
+}
+
+@media screen and (max-width: 768px) {
+ body {
+ margin: 2rem 0.5rem;
+ padding: 0;
+ }
+
+ header > .container {
+ margin: 0 0.5rem;
+ }
+
+ .github-link {
+ display: none;
+ }
+
+ .message-list > .message > .nes-balloon {
+ max-width: 60%;
+ }
+}
+
+@media screen and (max-width: 580px) {
+ #nescss > .container {
+ margin-top: 190px;
+ }
+}
diff --git a/index.html b/index.html
deleted file mode 100644
index 0567b860..00000000
--- a/index.html
+++ /dev/null
@@ -1,1073 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
- NES.css - NES-style CSS Framework
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- NES.css
- NES-style CSS Framework.
-
-
-
- Fork me
on GitHub
-
-
-
-
- Buttons
-
-
-
-
-
-
-
-
-
- Copied!
-
-
-
-
- Containers
-
-
-
Container.is-centered
-
Good morning. Thou hast had a good night's sleep, I hope.
-
-
-
Container.is-dark
-
Good morning. Thou hast had a good night's sleep, I hope.
-
-
-
Good morning. Thou hast had a good night's sleep, I hope.
-
-
-
Good morning. Thou hast had a good night's sleep, I hope.
-
-
-
- Copied!
-
-
- <div class="nes-container with-title is-centered">
- <p class="title">Container.is-centered</p>
- <p>Good morning. Thou hast had a good night's sleep, I hope.</p>
-</div>
-<div class="nes-container is-dark with-title">
- <p class="title">Container.is-dark</p>
- <p>Good morning. Thou hast had a good night's sleep, I hope.</p>
-</div>
-<div class="nes-container is-rounded">
- <p>Good morning. Thou hast had a good night's sleep, I hope.</p>
-</div>
-<div class="nes-container is-rounded is-dark">
- <p>Good morning. Thou hast had a good night's sleep, I hope.</p>
-</div>
-
-
-
-
- Dialogs
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- NES.css does not include any JavaScript. If you want to use dialog element other than Chrome, you need polyfill.
-
-
- Copied!
-
-
-
- <section>
- <button type="button" class="nes-btn is-primary" onclick="document.getElementById('dialog-default').showModal();">Open dialog</button>
- <dialog class="nes-dialog" id="dialog-default">
- <form method="dialog">
- <p class="title">Dialog</p>
- <p>Alert: this is a dialog.</p>
- <menu class="dialog-menu">
- <button class="nes-btn">Cancel</button>
- <button class="nes-btn is-primary">Confirm</button>
- </menu>
- </form>
- </dialog>
-</section>
-
-<section>
- <button type="button" class="nes-btn is-primary" onclick="document.getElementById('dialog-dark').showModal();">Open dark dialog</button>
- <dialog class="nes-dialog is-dark" id="dialog-dark">
- <form method="dialog">
- <p class="title">Dark dialog</p>
- <p>Alert: this is a dialog.</p>
- <menu class="dialog-menu">
- <button class="nes-btn">Cancel</button>
- <button class="nes-btn is-primary">Confirm</button>
- </menu>
- </form>
- </dialog>
-</section>
-
-<section>
- <button type="button" class="nes-btn is-primary" onclick="document.getElementById('dialog-rounded').showModal();">Open rounded dialog</button>
- <dialog class="nes-dialog is-rounded" id="dialog-rounded">
- <form method="dialog">
- <p class="title">Rounded dialog</p>
- <p>Alert: this is a dialog.</p>
- <menu class="dialog-menu">
- <button class="nes-btn">Cancel</button>
- <button class="nes-btn is-primary">Confirm</button>
- </menu>
- </form>
- </dialog>
-</section>
-
-<section>
- <button type="button" class="nes-btn is-primary" onclick="document.getElementById('dialog-dark-rounded').showModal();">Open dark and rounded dialog</button>
- <dialog class="nes-dialog is-dark is-rounded" id="dialog-dark-rounded">
- <form method="dialog">
- <p class="title">Dark and Rounded dialog</p>
- <p>Alert: this is a dialog.</p>
- <menu class="dialog-menu">
- <button class="nes-btn">Cancel</button>
- <button class="nes-btn is-primary">Confirm</button>
- </menu>
- </form>
- </dialog>
-</section>
-
-
-
-
-
- <label>
- <input type="radio" class="nes-radio" name="answer" checked />
- <span>Yes</span>
-</label>
-<label>
- <input type="radio" class="nes-radio" name="answer" />
- <span>No</span>
-</label>
-
-
-
-
-
- <label>
- <input type="checkbox" class="nes-checkbox" checked />
- <span>Enable</span>
-</label>
-<label>
- <input type="checkbox" class="nes-checkbox is-dark" checked />
- <span>Dark</span>
-</label>
-
-
-
-
- Avatars
-
-
- Copied!
-
-
- <img src="https://www.gravatar.com/avatar?s=15" class="nes-avatar is-small" alt="Gravatar Image Example" style="image-rendering: pixelated;">
-<img src="https://www.gravatar.com/avatar?s=15" class="nes-avatar" alt="Gravatar Image Example" style="image-rendering: pixelated;">
-<img src="https://www.gravatar.com/avatar?s=15" class="nes-avatar is-medium" alt="Gravatar Image Example" style="image-rendering: pixelated;">
-<img src="https://www.gravatar.com/avatar?s=15" class="nes-avatar is-large" alt="Gravatar Image Example" style="image-rendering: pixelated;">
-<img src="https://www.gravatar.com/avatar?s=15" class="nes-avatar is-rounded" alt="Gravatar Image Example" style="image-rendering: pixelated;">
-<img src="https://www.gravatar.com/avatar?s=15" class="nes-avatar is-small is-rounded" alt="Gravatar Image Example" style="image-rendering: pixelated;">
-<img src="https://www.gravatar.com/avatar?s=15" class="nes-avatar is-medium is-rounded" alt="Gravatar Image Example" style="image-rendering: pixelated;">
-<img src="https://www.gravatar.com/avatar?s=15" class="nes-avatar is-large is-rounded" alt="Gravatar Image Example" style="image-rendering: pixelated;">
-
-
-
-
-
-
-
- Balloons
-
-
-
-
-
Good morning. Thou hast had a good night's sleep, I hope.
-
-
-
-
-
- Copied!
-
-
- <div class="message -left">
- <i class="nes-bcrikko"></i>
- <div class="nes-balloon from-left">
- <p>Hello NES.css</p>
- </div>
-</div>
-<div class="message -right">
- <div class="nes-balloon from-right">
- <p>Good morning. Thou hast had a good night's sleep, I hope.</p>
- </div>
- <i class="nes-bcrikko"></i>
-</div>
-
-
-
-
- Lists
-
-
-
- - Good morning.
- - Thou hast had a good night's sleep, I hope.
- - Thou hast had a good afternoon
- - Good night.
-
-
-
-
-
- - Good morning.
- - Thou hast had a good night's sleep, I hope.
- - Thou hast had a good afternoon
- - Good night.
-
-
-
-
- Copied!
-
-
- <div class="lists">
- <ul class="nes-list is-disc">
- <li>Good morning.</li>
- <li>Thou hast had a good night's sleep, I hope.</li>
- <li>Thou hast had a good afternoon</li>
- <li>Good night.</li>
- </ul>
-</div>
-
-<div class="lists">
- <ul class="nes-list is-circle">
- <li>Good morning.</li>
- <li>Thou hast had a good night's sleep, I hope.</li>
- <li>Thou hast had a good afternoon</li>
- <li>Good night.</li>
- </ul>
-</div>
-
-
-
-
- Texts
-
- Normal
- Primary
- Success
- Warning
- Error
- Disabled
-
-
- Copied!
-
-
- <span class="nes-text">Normal</span>
-<span class="nes-text is-primary">Primary</span>
-<span class="nes-text is-success">Success</span>
-<span class="nes-text is-warning">Warning</span>
-<span class="nes-text is-error">Error</span>
-<span class="nes-text is-disabled">Disabled</span>
-
-
-
-
- Tables
-
-
-
-
- Table.is-bordered |
- Table.is-centered |
- Table.is-centered |
- Table.is-centered |
-
-
-
-
- Thou hast had a good morning |
- Thou hast had a good afternoon |
- Thou hast had a good evening |
- Thou hast had a good night |
-
-
- Thou hast had a good morning |
- Thou hast had a good afternoon |
- Thou hast had a good evening |
- Thou hast had a good night |
-
-
-
-
-
-
-
-
- Table.is-dark |
- Table.is-bordered |
- Table.is-bordered |
- Table.is-bordered |
-
-
-
-
- Thou hast had a good morning |
- Thou hast had a good afternon |
- Thou hast had a good evening |
- Thou hast had a good night |
-
-
- Thou hast had a good morning |
- Thou hast had a good afternoon |
- Thou hast had a good afternoon |
- Thou hast had a good afternoon |
-
-
-
-
-
- Copied!
-
-
- <div class="nes-table-responsive">
- <table class="nes-table is-bordered is-centered">
- <thead>
- <tr>
- <th>Table.is-bordered</th>
- <th>Table.is-centered</th>
- <th>Table.is-centered</th>
- <th>Table.is-centered</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>Thou hast had a good morning</td>
- <td>Thou hast had a good afternoon</td>
- <td>Thou hast had a good evening</td>
- <td>Thou hast had a good night</td>
- </tr>
- <tr>
- <td>Thou hast had a good morning</td>
- <td>Thou hast had a good afternoon</td>
- <td>Thou hast had a good evening</td>
- <td>Thou hast had a good night</td>
- </tr>
- </tbody>
- </table>
-</div>
-<div class="nes-table-responsive">
- <table class="nes-table is-bordered is-dark">
- <thead>
- <tr>
- <th>Table.is-dark</th>
- <th>Table.is-bordered</th>
- <th>Table.is-bordered</th>
- <th>Table.is-bordered</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>Thou hast had a good morning</td>
- <td>Thou hast had a good afternon</td>
- <td>Thou hast had a good evening</td>
- <td>Thou hast had a good night</td>
- </tr>
- <tr>
- <td>Thou hast had a good morning</td>
- <td>Thou hast had a good afternoon</td>
- <td>Thou hast had a good afternoon</td>
- <td>Thou hast had a good afternoon</td>
- </tr>
- </tbody>
- </table>
-</div>
-
-
-
-
- Progress
-
-
- Copied!
-
-
- <progress class="nes-progress" value="90" max="100"></progress>
-<progress class="nes-progress is-primary" value="80" max="100"></progress>
-<progress class="nes-progress is-success" value="50" max="100"></progress>
-<progress class="nes-progress is-warning" value="30" max="100"></progress>
-<progress class="nes-progress is-error" value="10" max="100"></progress>
-<progress class="nes-progress is-pattern" value="50" max="100"></progress>
-
-
-
-
- Badges
-
-
- Copied!
-
-
- <a href="#" class="nes-badge">
- <span class="is-dark">NES.css</span>
-</a>
-<a href="#" class="nes-badge">
- <span class="is-primary">is</span>
-</a>
-<a href="#" class="nes-badge">
- <span class="is-success">a</span>
-</a>
-<a href="#" class="nes-badge">
- <span class="is-warning">great</span>
-</a>
-<a href="#" class="nes-badge">
- <span class="is-error">framework!</span>
-</a>
-<a href="#" class="nes-badge is-splited">
- <span class="is-dark">npm</span>
- <span class="is-primary">1.1.0</span>
-</a>
-<a href="#" class="nes-badge is-splited">
- <span class="is-dark">test</span>
- <span class="is-success">100%</span>
-</a>
-<a href="#" class="nes-badge is-icon">
- <span class="is-warning">
- <i class="nes-icon star is-small"></i>
- </span>
- <span class="is-primary">Icons</span>
-</a>
-<a href="#" class="nes-badge is-icon">
- <span class="is-dark">hi</span>
- <span class="is-warning">Text</span>
-</a>
-
-
-
-
- Icons
-
- Reaction
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Copied!
-
-
- <i class="nes-icon heart is-small"></i>
-<i class="nes-icon heart"></i>
-<i class="nes-icon heart is-medium"></i>
-<i class="nes-icon heart is-large"></i>
-<i class="nes-icon heart is-empty"></i>
-
-<i class="nes-icon star is-small"></i>
-<i class="nes-icon star"></i>
-<i class="nes-icon star is-medium"></i>
-<i class="nes-icon star is-large"></i>
-
-<i class="nes-icon star is-half is-small"></i>
-<i class="nes-icon star is-half"></i>
-<i class="nes-icon star is-half is-medium"></i>
-<i class="nes-icon star is-half is-large"></i>
-
-<i class="nes-icon star is-transparent is-small"></i>
-<i class="nes-icon star is-transparent"></i>
-<i class="nes-icon star is-transparent is-medium"></i>
-<i class="nes-icon star is-transparent is-large"></i>
-
-<i class="nes-icon star is-empty"></i>
-
-<i class="nes-icon like is-small"></i>
-<i class="nes-icon like"></i>
-<i class="nes-icon like is-medium"></i>
-<i class="nes-icon like is-large"></i>
-<i class="nes-icon like is-empty"></i>
-
-
-
-
- SNS
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Copied!
-
-
- <i class="nes-icon twitter is-small"></i>
-<i class="nes-icon twitter"></i>
-<i class="nes-icon twitter is-medium"></i>
-<i class="nes-icon twitter is-large"></i>
-
-<i class="nes-icon facebook is-small"></i>
-<i class="nes-icon facebook"></i>
-<i class="nes-icon facebook is-medium"></i>
-<i class="nes-icon facebook is-large"></i>
-
-<i class="nes-icon github is-small"></i>
-<i class="nes-icon github"></i>
-<i class="nes-icon github is-medium"></i>
-<i class="nes-icon github is-large"></i>
-
-<i class="nes-icon youtube is-small"></i>
-<i class="nes-icon youtube"></i>
-<i class="nes-icon youtube is-medium"></i>
-<i class="nes-icon youtube is-large"></i>
-
-<i class="nes-icon google is-small"></i>
-<i class="nes-icon google"></i>
-<i class="nes-icon google is-medium"></i>
-<i class="nes-icon google is-large"></i>
-
-<i class="nes-icon medium is-small"></i>
-<i class="nes-icon medium"></i>
-<i class="nes-icon medium is-medium"></i>
-<i class="nes-icon medium is-large"></i>
-
-<i class="nes-icon twitch is-small"></i>
-<i class="nes-icon twitch"></i>
-<i class="nes-icon twitch is-medium"></i>
-<i class="nes-icon twitch is-large"></i>
-
-<i class="nes-icon reddit is-small"></i>
-<i class="nes-icon reddit"></i>
-<i class="nes-icon reddit is-medium"></i>
-<i class="nes-icon reddit is-large"></i>
-
-<i class="nes-icon whatsapp is-small"></i>
-<i class="nes-icon whatsapp"></i>
-<i class="nes-icon whatsapp is-medium"></i>
-<i class="nes-icon whatsapp is-large"></i>
-
-<i class="nes-icon gmail is-small"></i>
-<i class="nes-icon gmail"></i>
-<i class="nes-icon gmail is-medium"></i>
-<i class="nes-icon gmail is-large"></i>
-
-<i class="nes-icon linkedin is-small"></i>
-<i class="nes-icon linkedin"></i>
-<i class="nes-icon linkedin is-medium"></i>
-<i class="nes-icon linkedin is-large"></i>
-
-
-
-
- Others
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Copied!
-
-
- <i class="nes-icon close is-small"></i>
-<i class="nes-icon close"></i>
-<i class="nes-icon close is-medium"></i>
-<i class="nes-icon close is-large"></i>
-
-<i class="nes-octocat animate"></i>
-
-<i class="nes-icon trophy is-small"></i>
-<i class="nes-icon trophy"></i>
-<i class="nes-icon trophy is-medium"></i>
-<i class="nes-icon trophy is-large"></i>
-
-<i class="nes-icon coin is-small"></i>
-<i class="nes-icon coin"></i>
-<i class="nes-icon coin is-medium"></i>
-<i class="nes-icon coin is-large"></i>
-
-<i class="nes-mario"></i>
-<i class="nes-ash"></i>
-<i class="nes-pokeball"></i>
-
-<i class="nes-bulbasaur"></i>
-<i class="nes-charmander"></i>
-<i class="nes-squirtle"></i>
-
-<i class="nes-smartphone"></i>
-<i class="nes-phone"></i>
-<i class="nes-kirby"></i>
-
-
-
-
- Controllers
-
-
-
-
-
-
-
- Copied!
-
-
- <i class="nes-logo"></i>
-<i class="nes-jp-logo"></i>
-<i class="snes-logo"></i>
-<i class="snes-jp-logo"></i>
-
-
-
-
-
-
-
-
diff --git a/package.json b/package.json
index f90d045f..bc29a19b 100644
--- a/package.json
+++ b/package.json
@@ -3,7 +3,7 @@
"description": "NES.css is NES-style CSS Framework.",
"scripts": {
"watch": "npm run build:sass -- --watch",
- "//": "Build task",
+ "// Build task": "",
"build": "run-p build:core build:main",
"build:core": "npm run build:sass-core && npm run build:autoprefix-core && npm run build:cleancss-core",
"build:main": "npm run build:sass && npm run build:autoprefix && npm run build:cleancss",
@@ -11,15 +11,15 @@
"prebuild:stylelint": "npm run stylelint -- --fix",
"prebuild:clean": "rimraf css",
"postbuild": "npm run build:storybook",
- "//": "For nes.css",
+ "// For nes.css": "",
"build:sass": "node-sass --output-style expanded --source-map true --functions scripts/scssFunctions.js scss/nes.scss css/nes.css",
"build:autoprefix": "postcss --use autoprefixer --map false --output css/nes.css css/nes.css",
"build:cleancss": "cleancss -o css/nes.min.css css/nes.css",
- "//": "For nes-core.css",
+ "// For nes-core.css": "",
"build:sass-core": "node-sass --output-style expanded --source-map true --functions scripts/scssFunctions.js scss/nes-core.scss css/nes-core.css",
"build:autoprefix-core": "postcss --use autoprefixer --map false --output css/nes-core.css css/nes-core.css",
"build:cleancss-core": "cleancss -o css/nes-core.min.css css/nes-core.css",
- "//": "Misc",
+ "// Misc": "",
"stylelint": "stylelint scss/**/*.scss",
"storybook": "start-storybook -p 6006",
"build:storybook": "build-storybook",
@@ -111,7 +111,7 @@
"npm run postbuild"
],
"*.js": [
- "eslint '.storybook/**/*.js' 'docs/**/*.js'"
+ "eslint '.storybook/**/*.js' 'story/**/*.js'"
]
},
"prettier": {
@@ -148,18 +148,18 @@
"scss/at-rule-no-unknown": true
},
"ignoreFiles": [
- "demo/lib/*"
+ "docs/*"
]
},
"eslintConfig": {
"extends": "airbnb-base"
},
"eslintIgnore": [
- "demo/lib/*"
+ "docs/*"
],
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
}
-}
+}
\ No newline at end of file
diff --git a/scss/base/variables.scss b/scss/base/variables.scss
index 4a0cad9a..b7606237 100644
--- a/scss/base/variables.scss
+++ b/scss/base/variables.scss
@@ -6,7 +6,7 @@ $base-color: $color-black !default;
$background-color: $color-white !default;
$cursor-url: url(../assets/cursor.png) !default;
-$cursor-click-url: url(../assets/cursor-click.png) !default;
+$cursor-click-url: url(../assets/cursor-click.png) 14 0 !default;
$border-size: 4px !default;
diff --git a/scss/form/radios.scss b/scss/form/radios.scss
index ac136691..f5546267 100644
--- a/scss/form/radios.scss
+++ b/scss/form/radios.scss
@@ -20,6 +20,7 @@
(2,2,0,0,0,0),
);
$colors: ($base-color, map-get($default-colors, "shadow"));
+ $colors-radio-dark: ($color-white, map-get($default-colors, "shadow"));
margin-right: 20px;
-webkit-appearance: none;
@@ -50,4 +51,24 @@
&:checked:focus + span::before {
@include pixelize(2px, $radio-checked-focus, $colors);
}
+ &.is-dark {
+ + span {
+ color: $color-white;
+ }
+ // prettier-ignore
+ + span::before { /* stylelint-disable-line no-descending-specificity */
+ color: $color-white;
+ }
+
+ &:checked + span::before {
+ @include pixelize(2px, $radio-checked-focus, $colors-radio-dark);
+
+ color: $color-white;
+ }
+ &:checked:focus + span::before {
+ @include pixelize(2px, $radio-checked-focus, $colors-radio-dark);
+
+ color: $color-white;
+ }
+ }
}
diff --git a/scss/icons/icons.scss b/scss/icons/icons.scss
index e88e098a..202bb61b 100644
--- a/scss/icons/icons.scss
+++ b/scss/icons/icons.scss
@@ -15,6 +15,7 @@
@import "whatsapp.scss";
@import "gmail.scss";
@import "linkedin.scss";
+@import "instagram.scss";
// others
@import "close.scss";
@@ -148,6 +149,10 @@
@include pixelize($default-size, $icon-linkedin, $icon-linkedin-colors);
}
+ &.instagram::before {
+ @include pixelize($default-size, $icon-instagram, $icon-instagram-colors);
+ }
+
&.coin::before {
@include pixelize($default-size, $icon-coin, $icon-coin-colors);
}
diff --git a/scss/icons/instagram.scss b/scss/icons/instagram.scss
new file mode 100644
index 00000000..ba8e8b25
--- /dev/null
+++ b/scss/icons/instagram.scss
@@ -0,0 +1,20 @@
+$icon-instagram-colors: (#fff, #8005c8, #d40075, #e98c25, #d84646);
+// prettier-ignore
+$icon-instagram: (
+ ( 0,0,2,2,2,2,2,2,2,2,2,2,2,2,0,0),
+ ( 0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0),
+ ( 2,2,0,0,0,0,0,0,0,0,0,0,0,0,2,2),
+ ( 2,2,0,0,0,0,0,0,0,0,0,2,2,0,2,2),
+ ( 2,2,0,0,0,0,0,0,0,0,0,2,2,0,2,2),
+ ( 2,2,0,0,0,0,2,2,2,2,0,0,0,0,2,2),
+ ( 3,2,0,0,0,2,0,0,0,0,2,0,0,0,2,3),
+ ( 3,3,0,0,0,2,0,0,0,0,2,0,0,0,3,3),
+ ( 3,3,0,0,0,3,0,0,0,0,3,0,0,0,3,3),
+ ( 3,3,0,0,0,3,0,0,0,0,3,0,0,0,3,3),
+ ( 4,4,0,0,0,0,3,3,3,3,0,0,0,0,3,3),
+ ( 4,4,0,0,0,0,0,0,0,0,0,0,0,0,3,3),
+ ( 4,4,0,0,0,0,0,0,0,0,0,0,0,0,5,5),
+ ( 4,4,0,0,0,0,0,0,0,0,0,0,0,0,5,5),
+ ( 0,4,4,4,4,4,4,4,4,5,5,5,5,5,5,0),
+ ( 0,0,4,4,4,4,4,4,5,5,5,5,5,5,0,0)
+);
diff --git a/scss/utilities/icon-mixin.scss b/scss/utilities/icon-mixin.scss
index 1fd110aa..d884bc52 100644
--- a/scss/utilities/icon-mixin.scss
+++ b/scss/utilities/icon-mixin.scss
@@ -38,10 +38,10 @@
$color: nth($colors, $dot);
@if $color == $default-color {
$ret: $ret + ($j * $size) + " " + ($i * $size);
- $moz: $moz + ($j * $size) + " " + ($i * $size) + "0 0.020px";
+ $moz: $moz + ($j * $size) + " " + ($i * $size) + " 0 0.020em";
} @else {
- $ret: $ret + ($j * $size) + " " + ($i * $size) + "" + $color;
- $moz: $moz + ($j * $size) + " " + ($i * $size) + "0 0.020px " + $color;
+ $ret: $ret + ($j * $size) + " " + ($i * $size) + " " + $color;
+ $moz: $moz + ($j * $size) + " " + ($i * $size) + " 0 0.020em " + $color;
}
}
}
@@ -51,7 +51,9 @@
height: $size;
color: $default-color;
box-shadow: unquote($ret);
- @-moz-document url-prefix() {
- -webkit-box-shadow: unquote($moz);
+
+ // firefox only style
+ @supports (-moz-appearance: meterbar) {
+ box-shadow: unquote($moz);
}
}
diff --git a/scss/utilities/rounded-corners-mixin.scss b/scss/utilities/rounded-corners-mixin.scss
index 7d00e5de..91f1bf9b 100644
--- a/scss/utilities/rounded-corners-mixin.scss
+++ b/scss/utilities/rounded-corners-mixin.scss
@@ -16,7 +16,7 @@
border-image-slice: 3;
border-image-width: 3;
- border-image-repeat: space;
+ border-image-repeat: stretch;
@if $isDark {
@include border-image($color-white);
@@ -34,7 +34,7 @@
border-image-slice: 2;
border-image-width: 2;
- border-image-repeat: space;
+ border-image-repeat: stretch;
@if $isDark {
@include compact-border-image($color-white);
diff --git a/docs/avatars.stories.js b/story/avatars.stories.js
similarity index 100%
rename from docs/avatars.stories.js
rename to story/avatars.stories.js
diff --git a/docs/badge.stories.js b/story/badge.stories.js
similarity index 100%
rename from docs/badge.stories.js
rename to story/badge.stories.js
diff --git a/docs/balloons.stories.js b/story/balloons.stories.js
similarity index 100%
rename from docs/balloons.stories.js
rename to story/balloons.stories.js
diff --git a/docs/buttons.stories.js b/story/buttons.stories.js
similarity index 100%
rename from docs/buttons.stories.js
rename to story/buttons.stories.js
diff --git a/docs/containers.stories.js b/story/containers.stories.js
similarity index 100%
rename from docs/containers.stories.js
rename to story/containers.stories.js
diff --git a/docs/dialogs.stories.js b/story/dialogs.stories.js
similarity index 100%
rename from docs/dialogs.stories.js
rename to story/dialogs.stories.js
diff --git a/docs/icons.stories.js b/story/icons.stories.js
similarity index 97%
rename from docs/icons.stories.js
rename to story/icons.stories.js
index a08438f4..2a0e8a8d 100644
--- a/docs/icons.stories.js
+++ b/story/icons.stories.js
@@ -16,6 +16,7 @@ stories.add('icon', () => {
'nes-icon whatsapp': 'nes-icon whatsapp',
'nes-icon gmail': 'nes-icon gmail',
'nes-icon linkedin': 'nes-icon linkedin',
+ 'nes-icon instagram': 'nes-icon instagram',
'nes-icon close': 'nes-icon close',
'nes-icon coin': 'nes-icon coin',
'nes-pokeball': 'nes-pokeball',
diff --git a/docs/inputs.stories.js b/story/inputs.stories.js
similarity index 58%
rename from docs/inputs.stories.js
rename to story/inputs.stories.js
index 970a1d4a..2ed2d028 100644
--- a/docs/inputs.stories.js
+++ b/story/inputs.stories.js
@@ -1,28 +1,31 @@
import { storiesOf } from '@storybook/html'; // eslint-disable-line import/no-extraneous-dependencies
import { // eslint-disable-line import/no-extraneous-dependencies
- withKnobs, radios,
+ withKnobs, radios, boolean,
} from '@storybook/addon-knobs';
const stories = storiesOf('Inputs', module);
stories.addDecorator(withKnobs);
-stories.add('input.radio', () => `
- `)
+stories.add('input.radio', () => {
+ const isDark = boolean('is-dark', false) ? 'is-dark' : '';
+
+ return (
+ `
+ `
+ );
+})
.add('input.checkbox', () => {
- const selectedClass = radios('class', {
- default: '',
- 'is-dark': 'is-dark',
- }, '');
+ const isDark = boolean('is-dark', false) ? 'is-dark' : '';
return (
``
);
diff --git a/docs/lists.stories.js b/story/lists.stories.js
similarity index 100%
rename from docs/lists.stories.js
rename to story/lists.stories.js
diff --git a/docs/progress.stories.js b/story/progress.stories.js
similarity index 100%
rename from docs/progress.stories.js
rename to story/progress.stories.js
diff --git a/docs/select.stories.js b/story/select.stories.js
similarity index 100%
rename from docs/select.stories.js
rename to story/select.stories.js
diff --git a/docs/table.stories.js b/story/table.stories.js
similarity index 100%
rename from docs/table.stories.js
rename to story/table.stories.js
diff --git a/docs/text.stories.js b/story/text.stories.js
similarity index 100%
rename from docs/text.stories.js
rename to story/text.stories.js
diff --git a/docs/textarea.stories.js b/story/textarea.stories.js
similarity index 100%
rename from docs/textarea.stories.js
rename to story/textarea.stories.js