This file contains hidden or 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
module.exports = { | |
root: true, | |
env: { | |
browser: true | |
}, | |
parser: '@typescript-eslint/parser', | |
parserOptions: { | |
tsconfigRootDir: __dirname, | |
project: ['./tsconfig.json'] | |
}, |
This file contains hidden or 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
export type DateParts = { year: string; month: string; day: string }; | |
export function getLocalizedDateParts(locale: string): DateParts { | |
const rtf = new Intl.RelativeTimeFormat(locale), | |
result: DateParts = { year: '', month: '', day: '' }; | |
['year', 'month', 'day'].forEach(part => { | |
const parts = rtf.formatToParts(-1, `${part}s` as Intl.RelativeTimeFormatUnit), | |
index = parts.findIndex(({ unit }) => unit === part), | |
value = parts[index + 1].value; |
This file contains hidden or 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
function managerEntries(entry = []) { | |
return [...entry, require.resolve('./register')]; | |
} | |
module.exports = { managerEntries }; |
This file contains hidden or 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
import type { PropertyValues, ReactiveElement } from 'lit'; | |
import type { Constructor, FormControlInterface } from '@open-wc/form-control'; | |
import { FormControlMixin as OwcFormControlMixin } from '@open-wc/form-control'; | |
export interface FormControl extends FormControlInterface { | |
labels: Set<WeakRef<Node>>; | |
} | |
let nextUniqueId = 0; |
This file contains hidden or 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
❯ yarn start | |
Installing Script Dependencies... | |
Task readiness up to dev | |
🟡 install > 🟡 compile > 🟡 sandbox > 🔊 dev | |
🔄 install > 🟡 compile > 🟡 sandbox > 🔊 dev | |
> yarn install | |
✅ install > 🔄 compile > 🟡 sandbox > 🔊 dev |
This file contains hidden or 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
import type { StoryObj } from '@storybook/web-components'; | |
import type { RouterLocation } from '@vaadin/router'; | |
import { html } from 'lit'; | |
import { rest } from 'msw'; | |
import { absenceNotices } from '../../data-mocks.js'; | |
import './register.js'; | |
export default { | |
title: 'Absence/Pages/Details', | |
render: ({ id }: { id: string }) => |
This file contains hidden or 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
<style> | |
dna-page-header[stuck], | |
dna-tab-bar[stuck] { | |
box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.2); | |
// Make sure the shadow does not bleed at the top | |
clip-path: inset(0 0 -10px 0); | |
} | |
</style> | |
<dna-page-header ${sticky()} heading="Hello world!"></dna-page-header> | |
<dna-tab-bar ${sticky({ stuckTo: 'dna-page-header' })}> |
This file contains hidden or 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
export default { | |
title: 'Foo/Bar', | |
tags: ['preview'], | |
... | |
}; |
This file contains hidden or 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
<nav> | |
<a href="/">Home</a> | |
<a href="/about">About</a> | |
<a href="/users/1">User 1</a> | |
<a href="/users/2">User 2</a> | |
<a href="/users/1/posts/1">User 1 Post 1</a> | |
<a href="/users/2/posts/2">User 2 Post 2</a> | |
</nav> | |
<div id="app" class="content"></div> |
OlderNewer