-
Notifications
You must be signed in to change notification settings - Fork 2
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
1 parent
3cf9fe2
commit 32cc938
Showing
13 changed files
with
855 additions
and
837 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
Large diffs are not rendered by default.
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
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 @@ | ||
.c-input { | ||
display: grid; | ||
grid-template-columns: [input-start] 1fr [input-end]; | ||
grid-template-rows: [input-start] 1fr [input-end]; | ||
border: 0; | ||
font-size: inherit; | ||
color: inherit; | ||
} | ||
|
||
.c-input::after { | ||
content: ''; | ||
display: block; | ||
grid-area: input; | ||
background-color: currentColor; | ||
opacity: 0.1; | ||
border-radius: var(--size-border-radius-s); | ||
padding: var(--s-1) var(--s-2); | ||
} | ||
|
||
.c-input__field { | ||
border: 0; | ||
grid-area: input; | ||
background-color: transparent; | ||
font-size: inherit; | ||
color: inherit; | ||
padding: var(--s-1) var(--s-2); | ||
font-family: var(--font-family-mono); | ||
min-width: 0; | ||
} | ||
|
||
.c-input.-reset { | ||
appearance: none; | ||
} |
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,28 @@ | ||
.c-timezone { | ||
--timezone-color-background: var(--color-background-primary); | ||
background-color: var(--timezone-color-background); | ||
color: var(--color-text-primary); | ||
border-radius: var(--size-border-radius-m); | ||
padding: var(--s-3) var(--s-4); | ||
font-size: var(--font-size-m); | ||
} | ||
|
||
.c-timezone__title { | ||
margin-top: var(--s-0); | ||
margin-bottom: var(--s-0); | ||
font-weight: var(--font-weight-semibold); | ||
font-size: inherit; | ||
} | ||
|
||
.c-timezone__zone { | ||
margin-top: var(--s-0); | ||
margin-bottom: var(--s-0); | ||
font-size: var(--font-size-s); | ||
} | ||
|
||
.c-timezone__fieldset { | ||
border: 0; | ||
padding: 0; | ||
margin-left: 0; | ||
margin-right: 0; | ||
} |
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,12 @@ | ||
@import 'sanitize.css/evergreen.css'; | ||
@import 'sanitize.css/reduce-motion.css'; | ||
@import './tokens'; | ||
@import 'components/timezone.css'; | ||
@import 'components/input.css'; | ||
@import './utilities.css'; | ||
|
||
html { | ||
font-family: var(--font-family-sans); | ||
font-size: 100%; | ||
line-height: 1.5; | ||
} |
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,36 @@ | ||
:root { | ||
--color-white: 255, 255, 255; | ||
--color-gray-700: 56, 56, 56; | ||
--color-green-900: 37, 89, 87; | ||
--color-green-500: 42, 157, 143; | ||
--color-red-400: 231, 111, 81; | ||
--color-yellow-400: 233, 196, 106; | ||
--color-background-canvas: rgb(var(--color-white)); | ||
--color-background-primary: rgb(var(--color-gray-700)); | ||
--color-text-canvas: rgb(var(--color-gray-700)); | ||
--color-text-primary: rgb(var(--color-white)); | ||
|
||
/* Font sizes */ | ||
--font-size-s: 0.75rem; | ||
--font-size-m: 1.125rem; | ||
--font-weight-regular: 400; | ||
--font-weight-semibold: 600; | ||
--font-family-sans: 'Inter', sans-serif; | ||
--font-family-mono: 'Roboto Mono', monospace; | ||
|
||
/* Size */ | ||
--size-spacing-0: 0; | ||
--size-spacing-1: 0.25rem; | ||
--size-spacing-2: 0.5rem; | ||
--size-spacing-3: 0.75rem; | ||
--size-spacing-4: 1rem; | ||
--size-border-radius-s: 0.25rem; | ||
--size-border-radius-m: 0.5rem; | ||
|
||
/* Size shortcuts */ | ||
--s-0: var(--size-spacing-0); | ||
--s-1: var(--size-spacing-1); | ||
--s-2: var(--size-spacing-2); | ||
--s-3: var(--size-spacing-3); | ||
--s-4: var(--size-spacing-4); | ||
} |
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 @@ | ||
.u-visually-hidden { | ||
position: absolute !important; | ||
width: 1px !important; | ||
height: 1px !important; | ||
padding: 0 !important; | ||
margin: -1px !important; | ||
overflow: hidden !important; | ||
clip: rect(0, 0, 0, 0) !important; | ||
white-space: nowrap !important; | ||
border: 0 !important; | ||
} |
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,103 @@ | ||
import hello from './modules/hello.js?url'; | ||
import links from './modules/links.js?url'; | ||
import users from './modules/users.js?url'; | ||
|
||
YUI({ | ||
modules: { | ||
hello: { | ||
fullpath: hello, | ||
requires: ['node-base'], | ||
}, | ||
links: { | ||
fullpath: links, | ||
requires: ['node-base', 'node-event-delegate', 'base-build'], | ||
}, | ||
users: { | ||
fullpath: users, | ||
requires: ['io-base', 'json-parse'], | ||
}, | ||
}, | ||
}).use('hello', 'node', 'transition', (Y) => { | ||
Y.Hello.hello(); | ||
|
||
const $list = Y.one('#list'); | ||
|
||
if ($list) { | ||
const $num = Y.Node.create('<b />'); | ||
|
||
$list.all('li').each(($el, i) => { | ||
$el.append($num.cloneNode().set('text', i)); | ||
}); | ||
} | ||
|
||
Y.Transition.fx.fadeSlideIn = { | ||
opacity: 1, | ||
duration: 0.5, | ||
transform: 'translateY(0)', | ||
left: { | ||
value: 0, | ||
duration: 0.5, | ||
delay: 0.5, | ||
}, | ||
}; | ||
|
||
Y.Transition.fx.fadeSlideOut = { | ||
left: { | ||
value: '10px', | ||
delay: 0, | ||
duration: 0.5, | ||
}, | ||
opacity: 0, | ||
delay: 0.5, | ||
transform: 'translateY(100px)', | ||
}; | ||
|
||
Y.Transition.HIDE_TRANSITION = 'fadeSlideOut'; | ||
Y.Transition.SHOW_TRANSITION = 'fadeSlideIn'; | ||
|
||
Y.one('#btn').on('click', () => { | ||
const $box = Y.one('#box'); | ||
if ($box.get('hidden')) { | ||
$box.show(true); | ||
return; | ||
} | ||
$box.hide(true); | ||
}); | ||
|
||
const $p = Y.Node.create('<p />'); | ||
const $container = Y.one('#container'); | ||
|
||
function addNodes(num) { | ||
const $nodes = new Y.NodeList(); | ||
for (let i = 0; i < num; i++) { | ||
$nodes.push($p.cloneNode().set('text', Y.guid())); | ||
} | ||
$container.append($nodes); | ||
} | ||
|
||
addNodes(10); | ||
|
||
$container.on('scroll', () => { | ||
if ($container.one('> p:last-child').inRegion($container)) { | ||
addNodes(10); | ||
} | ||
}); | ||
|
||
Y.use('links', () => { | ||
const clicker = new Y.Links.Clicker(); | ||
|
||
Y.on('clicker:msgChange', ({ newVal }) => { | ||
Y.log(newVal); | ||
}); | ||
|
||
clicker.render('#clicker'); | ||
}); | ||
|
||
Y.use('template', 'users', 'array-extras', () => { | ||
const template = Y.Lang.trim(Y.one('#user-list-tmpl').get('text')); | ||
const micro = new Y.Template(); | ||
Y.Users.fetch((data) => { | ||
Y.one('#user-list').setHTML(micro.render(template, { users: data })); | ||
}); | ||
}); | ||
}); |
Oops, something went wrong.