-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3006 from mozilla/room-ui-redesign
Room UI Redesign
- Loading branch information
Showing
499 changed files
with
48,176 additions
and
24,722 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 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 |
---|---|---|
|
@@ -65,3 +65,5 @@ dist/ | |
certs/ | ||
results/ | ||
.ret.credentials | ||
src/assets/locales/en.json | ||
src/assets/locales/extracted-messages.json |
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,52 @@ | ||
const path = require("path"); | ||
|
||
module.exports = { | ||
stories: ["../src/react-components/**/*.stories.mdx", "../src/react-components/**/*.stories.js"], | ||
addons: ["@storybook/addon-links", "@storybook/addon-essentials", "storybook-addon-designs"], | ||
webpackFinal: async config => { | ||
config.module.rules.push({ | ||
test: /\.scss$/, | ||
use: [ | ||
"style-loader", | ||
{ | ||
loader: "css-loader", | ||
options: { | ||
importLoaders: "1", | ||
localIdentName: "[name]__[local]___[hash:base64:5]", | ||
modules: true, | ||
camelCase: true | ||
} | ||
}, | ||
"sass-loader" | ||
], | ||
include: path.resolve(__dirname, "..", "src") | ||
}); | ||
|
||
const fileLoaderRule = config.module.rules.find(rule => rule.test.test(".svg")); | ||
fileLoaderRule.exclude = /\.svg$/; | ||
config.module.rules.push({ | ||
test: /\.svg$/, | ||
use: [ | ||
{ | ||
loader: "@svgr/webpack", | ||
options: { | ||
titleProp: true, | ||
replaceAttrValues: { "#000": "{props.color}" }, | ||
template: require("../src/react-components/icons/IconTemplate"), | ||
svgoConfig: { | ||
plugins: { | ||
removeViewBox: false, | ||
mergePaths: false, | ||
convertShapeToPath: false, | ||
removeHiddenElems: false | ||
} | ||
} | ||
} | ||
}, | ||
"url-loader" | ||
] | ||
}); | ||
|
||
return config; | ||
} | ||
}; |
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,7 @@ | ||
<!-- Add extra elements to the head of the preview iframe here. --> | ||
<link href="https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,400;0,500;0,700;1,400&display=swap" rel="stylesheet"> | ||
<style> | ||
.sb-show-main { | ||
padding: 0 !important; | ||
} | ||
</style> |
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,58 @@ | ||
import React, { useEffect } from "react"; | ||
import { useAccessibleOutlineStyle } from "../src/react-components/input/useAccessibleOutlineStyle"; | ||
import "../src/react-components/styles/global.scss"; | ||
import { WrappedIntlProvider } from "../src/react-components/wrapped-intl-provider"; | ||
import { MINIMAL_VIEWPORTS } from "@storybook/addon-viewport"; | ||
import { AVAILABLE_LOCALES } from "../src/assets/locales/locale_config"; | ||
import { setLocale } from "../src/utils/i18n"; | ||
|
||
const Layout = ({ children, locale }) => { | ||
useAccessibleOutlineStyle(); | ||
|
||
useEffect( | ||
() => { | ||
setLocale(locale); | ||
}, | ||
[locale] | ||
); | ||
|
||
return <WrappedIntlProvider>{children}</WrappedIntlProvider>; | ||
}; | ||
|
||
export const decorators = [ | ||
(Story, context) => ( | ||
<Layout locale={context.globals.locale}> | ||
<Story /> | ||
</Layout> | ||
) | ||
]; | ||
|
||
export const parameters = { | ||
viewport: { | ||
viewports: { | ||
...MINIMAL_VIEWPORTS, | ||
oculusQuest: { | ||
name: "Oculus Quest", | ||
styles: { | ||
width: "800px", | ||
height: "450px" | ||
} | ||
} | ||
} | ||
} | ||
}; | ||
|
||
const locales = Object.entries(AVAILABLE_LOCALES).map(([value, title]) => ({ title, value })); | ||
locales.unshift({ title: "Browser Default", value: "browser" }); | ||
|
||
export const globalTypes = { | ||
locale: { | ||
name: "Locale", | ||
description: "Active locale", | ||
defaultValue: "browser", | ||
toolbar: { | ||
icon: "globe", | ||
items: locales | ||
} | ||
} | ||
}; |
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.