forked from opentripplanner/otp-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'wide-mode-buttons' into callback-disable-all-submodes
- Loading branch information
Showing
183 changed files
with
103,009 additions
and
313,430 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
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import { setupWorker } from "msw/browser"; | ||
|
||
import locationFieldHandlers from "../packages/location-field/src/mocks/handlers"; | ||
import itineraryBodyHandlers from "../packages/itinerary-body/src/__mocks__/handlers"; | ||
import geocoderHandlers from "../packages/geocoder/src/test-fixtures/handlers"; | ||
import tileLayerHandlers from '../packages/otp2-tile-overlay/src/mocks/handlers' | ||
import baseMapHandlers from '../packages/base-map/src/mocks/handlers'; | ||
import parameters from './previewParameters' | ||
|
||
import { reactIntl } from './react-intl.ts'; | ||
import { Preview } from "@storybook/react"; | ||
import { mockDateDecorator } from "storybook-mock-date-decorator"; | ||
|
||
// Only install worker when running in browser | ||
if (typeof global.process === "undefined") { | ||
const worker = setupWorker( | ||
...locationFieldHandlers, | ||
...itineraryBodyHandlers, | ||
...geocoderHandlers, | ||
...tileLayerHandlers, | ||
...baseMapHandlers | ||
); | ||
worker.start({ onUnhandledRequest: "bypass" }); | ||
} | ||
|
||
const preview: Preview = { | ||
decorators: [mockDateDecorator], | ||
globals: { | ||
locale: reactIntl.defaultLocale, | ||
locales: { | ||
"en-US": { title: "English (US)" }, | ||
fr: { title: "Français" }, | ||
es: { title: "Español" }, | ||
vi: { title: "Tiếng Việt" }, | ||
ko: { title: "한국어" }, | ||
zh: { title: "中文" }, | ||
unknown: { title: "Unsupported locale" } | ||
} | ||
}, | ||
parameters | ||
} | ||
|
||
export default preview |
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,40 @@ | ||
import { reactIntl } from './react-intl.ts'; | ||
|
||
const parameters = { | ||
a11y: { | ||
config: { | ||
rules: [ | ||
{ | ||
// moved to technical backlog | ||
id: "aria-required-parent", | ||
reviewOnFail: true, | ||
}, | ||
{ | ||
// Appears to be a story bug | ||
id: "duplicate-id", | ||
reviewOnFail: true | ||
}, | ||
{ | ||
// Appears to be a story bug | ||
id: "duplicate-id-aria", | ||
reviewOnFail: true | ||
}, | ||
{ | ||
// Not really applicable to stories and causes problems with the WithMap decorator | ||
id: "landmark-unique", | ||
enabled: false | ||
} | ||
], | ||
}, | ||
}, | ||
actions: { argTypesRegex: "^on[A-Z].*" }, | ||
controls: { | ||
matchers: { | ||
color: /(background|color)$/i, | ||
date: /Date$/, | ||
}, | ||
}, | ||
reactIntl | ||
}; | ||
|
||
export default parameters; |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.