Compare commits

...

No commits in common. "e14630ab42089c559cb5871bc267678b08c17c21" and "26584d54823331652f2d0f368a3c39575b521be2" have entirely different histories.

69 changed files with 5087 additions and 2850 deletions

View File

@ -1,8 +0,0 @@
root = true
[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
insert_final_newline = true

View File

@ -1 +0,0 @@
build/

95
.eslintrc.js Normal file
View File

@ -0,0 +1,95 @@
const prettierConfig = require('./.prettierrc.js');
module.exports = {
env: {
browser: true,
commonjs: true,
es2021: true,
node: true,
},
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'plugin:prettier/recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'next/core-web-vitals',
],
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 12,
sourceType: 'module',
},
plugins: ['react'],
rules: {
// Possible errors
'no-console': 'warn',
// Best practices
'dot-notation': 'error',
'no-else-return': 'error',
'no-floating-decimal': 'error',
'no-sequences': 'error',
// Stylistic
'array-bracket-spacing': 'error',
'computed-property-spacing': ['error', 'never'],
curly: 'error',
'no-lonely-if': 'error',
'no-unneeded-ternary': 'error',
'one-var-declaration-per-line': 'error',
quotes: [
'error',
'single',
{
allowTemplateLiterals: false,
avoidEscape: true,
},
],
// ES6
'array-callback-return': 'off',
'prefer-const': 'error',
// Imports
'import/prefer-default-export': 'off',
'sort-imports': [
'error',
{
ignoreCase: true,
ignoreDeclarationSort: true,
},
],
'no-unused-expressions': 'off',
'no-prototype-builtins': 'off',
// REACT
'react/jsx-uses-react': 'off',
'react/react-in-jsx-scope': 'off',
'jsx-a11y/href-no-hash': [0],
'react/display-name': 0,
'react/no-deprecated': 'error',
'react/no-unsafe': [
'error',
{
checkAliases: true,
},
],
'react/jsx-sort-props': [
'error',
{
ignoreCase: true,
},
],
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 0,
// Prettier
// eslint looks for the prettier config at the top level of the package/app
// but the config lives in the `config/` directory. Passing the config here
// to get around this.
'prettier/prettier': ['error', prettierConfig],
},
settings: {
react: {
version: 'detect',
},
},
};

View File

@ -1,3 +0,0 @@
{
"extends": "./node_modules/gts/"
}

View File

@ -0,0 +1,5 @@
<component name="ProjectCodeStyleConfiguration">
<state>
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
</state>
</component>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="EslintConfiguration">
<option name="fix-on-save" value="true" />
</component>
</project>

View File

@ -2,7 +2,7 @@
<project version="4"> <project version="4">
<component name="ProjectModuleManager"> <component name="ProjectModuleManager">
<modules> <modules>
<module fileurl="file://$PROJECT_DIR$/.idea/google_m3_ui_kit.iml" filepath="$PROJECT_DIR$/.idea/google_m3_ui_kit.iml" /> <module fileurl="file://$PROJECT_DIR$/.idea/google-material-you-ui.iml" filepath="$PROJECT_DIR$/.idea/google-material-you-ui.iml" />
</modules> </modules>
</component> </component>
</project> </project>

View File

@ -1,3 +1,7 @@
module.exports = { module.exports = {
...require('gts/.prettierrc.json') arrowParens: 'avoid',
} singleQuote: true,
trailingComma: 'all',
tabWidth: 4,
endOfLine: 'auto',
};

View File

@ -1,11 +1,13 @@
# React/Next.js Material You UI kit (pre-alpha) # React/Next.js Material You UI kit (pre-alpha)
This repository is including and will be including components, enumerates in table: This repository is including and will be including components, enumerates in table:
- [x] Buttons - [x] Buttons
- [x] Default - [x] Default
- [x] Icon - [x] Icon
- [x] FAB - [x] FAB
- [x] Radio - [x] Radio
- [ ] Segmented - [ ] Segmented
- [x] Checkbox - [x] Checkbox
- [x] Text fields - [x] Text fields
- [x] Switches - [x] Switches
@ -19,22 +21,29 @@ This repository is including and will be including components, enumerates in tab
- [ ] Cards - [ ] Cards
- [ ] Menus - [ ] Menus
- [ ] Navigation - [ ] Navigation
- [ ] Bars - [ ] Bars
- [ ] Drawer - [ ] Drawer
- [ ] Rail - [ ] Rail
- [ ] Sliders - [ ] Sliders
- [ ] Snackbar - [ ] Snackbar
- [ ] Tabs - [ ] Tabs
- [ ] Bottom sheets - [ ] Bottom sheets
- [ ] Bottom app bars - [ ] Bottom app bars
~~and including preview page for test.~~ ~~and including preview page for test.~~
Preview page on stage WIP. Preview page on stage WIP.
# Status # Status
Nowadays, this UI kit have base kinds of components and you could make everything. For example - general forms (without select field and etc.) Nowadays, this UI kit have base kinds of components and you could make everything. For example - general forms (without select field and etc.)
# Roadmap # Roadmap
1. Full implementation components; 1. Full implementation components;
2. Release NPM package; 2. Release NPM package;
3. Custom theaming. 3. Custom theaming.
## Did you find the bug? Make sure to [leave an issue](https://github.com/doryan04/DSS/issues/new) in case of any problems. ## Did you find the bug? Make sure to [leave an issue](https://github.com/doryan04/DSS/issues/new) in case of any problems.
## If you want help to the project, please, advise your idea in Pull request and don't forget [send issue](https://github.com/doryan04/DSS/issues/new) ## If you want help to the project, please, advise your idea in Pull request and don't forget [send issue](https://github.com/doryan04/DSS/issues/new)
### Check out actual news on Telegram. [https://t.me/doryanProjects](https://t.me/doryanProjects) ### Check out actual news on Telegram. [https://t.me/doryanProjects](https://t.me/doryanProjects)

View File

@ -1,12 +1,12 @@
import React from 'react'; import React from 'react';
import {Badge} from '../../src/primitive-components/badge/badge'; import { Badge } from '../../src/primitive-components/badge/badge';
import {Divider} from '../../src/primitive-components/divider/divider'; import { Divider } from '../../src/primitive-components/divider/divider';
export default function Badges() { export default function Badges() {
return ( return (
<div <div
className={'m3 m3-wrapper'} className={'m3 m3-wrapper'}
style={{display: 'flex', flexDirection: 'row'}} style={{ display: 'flex', flexDirection: 'row' }}
> >
<div> <div>
<div <div

View File

@ -1,20 +1,20 @@
'use client'; 'use client';
import React, {useCallback, useState} from 'react'; import React, { useCallback, useState } from 'react';
import {Button} from '../../src/primitive-components/material-you-components'; import { Button } from '../../src/primitive-components/material-you-components';
export default function Buttons() { export default function Buttons() {
const [state, setState] = useState(1); const [state, setState] = useState(1);
const callback = useCallback( const callback = useCallback(
() => setState(prevState => prevState + 1), () => setState(prevState => prevState + 1),
[state] [state],
); );
return ( return (
<div className={'m3 m3-wrapper'}> <div className={'m3 m3-wrapper'}>
<h1> Buttons </h1> <h1> Buttons </h1>
<div style={{display: 'flex', flexDirection: 'row', gap: '2em'}}> <div style={{ display: 'flex', flexDirection: 'row', gap: '2em' }}>
<div> <div>
<h2> Default buttons </h2> <h2> Default buttons </h2>
<div <div
@ -26,13 +26,13 @@ export default function Buttons() {
}} }}
> >
<Button <Button
variant={'filled'}
onClick={callback}
centralRipple centralRipple
onClick={callback}
variant={'filled'}
> >
Label + {state} Label + {state}
</Button> </Button>
<Button variant={'elevated'} /> <Button variant={'outlined'}>Label</Button>
<Button variant={'tonal'}>Label</Button> <Button variant={'tonal'}>Label</Button>
<Button variant={'elevated'}>Label</Button> <Button variant={'elevated'}>Label</Button>
<Button variant={'text'}>Label</Button> <Button variant={'text'}>Label</Button>
@ -48,19 +48,19 @@ export default function Buttons() {
gap: '0.5em', gap: '0.5em',
}} }}
> >
<Button variant={'filled'} icon={'add'}> <Button icon={'add'} variant={'filled'}>
Label Label
</Button> </Button>
<Button variant={'outlined'} icon={'add'}> <Button icon={'add'} variant={'outlined'}>
Label Label
</Button> </Button>
<Button variant={'tonal'} icon={'add'}> <Button icon={'add'} variant={'tonal'}>
Label Label
</Button> </Button>
<Button variant={'elevated'} icon={'add'}> <Button icon={'add'} variant={'elevated'}>
Label Label
</Button> </Button>
<Button variant={'text'} icon={'add'}> <Button icon={'add'} variant={'text'}>
Label Label
</Button> </Button>
</div> </div>

View File

@ -28,7 +28,7 @@ export default function Checkboxes() {
> >
<div> <div>
<h2> Default </h2> <h2> Default </h2>
<div style={{display: 'flex', gap: '2em'}}> <div style={{ display: 'flex', gap: '2em' }}>
<Checkbox centralRipple /> <Checkbox centralRipple />
<Checkbox defaultChecked /> <Checkbox defaultChecked />
<Checkbox indeterminate={true} /> <Checkbox indeterminate={true} />
@ -36,9 +36,9 @@ export default function Checkboxes() {
</div> </div>
<div> <div>
<h2> Disabled </h2> <h2> Disabled </h2>
<div style={{display: 'flex', gap: '2em'}}> <div style={{ display: 'flex', gap: '2em' }}>
<Checkbox disabled /> <Checkbox disabled />
<Checkbox disabled defaultChecked /> <Checkbox defaultChecked disabled />
</div> </div>
</div> </div>
</div> </div>
@ -59,8 +59,8 @@ export default function Checkboxes() {
}} }}
> >
<Checkbox required /> <Checkbox required />
<Checkbox required defaultChecked /> <Checkbox defaultChecked required />
<Checkbox required indeterminate={true} /> <Checkbox indeterminate={true} required />
</div> </div>
<div <div
style={{ style={{
@ -69,16 +69,16 @@ export default function Checkboxes() {
flexDirection: 'row', flexDirection: 'row',
}} }}
> >
<Checkbox required className={'m3-error'} /> <Checkbox className={'m3-error'} required />
<Checkbox <Checkbox
required
defaultChecked
className={'m3-error'} className={'m3-error'}
defaultChecked
required
/> />
<Checkbox <Checkbox
required
indeterminate={true}
className={'m3-error'} className={'m3-error'}
indeterminate={true}
required
/> />
</div> </div>
<Button type={'submit'}>Send</Button> <Button type={'submit'}>Send</Button>

View File

@ -1,10 +1,10 @@
import React from 'react'; import React from 'react';
import {FAB} from '../../src/primitive-components/material-you-components'; import { FAB } from '../../src/primitive-components/material-you-components';
export default function Fabs() { export default function Fabs() {
return ( return (
<div className={'m3 m3-wrapper'}> <div className={'m3 m3-wrapper'}>
<div style={{display: 'flex', flexDirection: 'row', gap: '2em'}}> <div style={{ display: 'flex', flexDirection: 'row', gap: '2em' }}>
<div> <div>
<h1> FABs with elevation</h1> <h1> FABs with elevation</h1>
<div <div
@ -17,105 +17,105 @@ export default function Fabs() {
> >
<div> <div>
<h2> Small </h2> <h2> Small </h2>
<div style={{display: 'flex', gap: '2em'}}> <div style={{ display: 'flex', gap: '2em' }}>
<FAB <FAB
size={'small'}
icon={'edit'}
elevated
centralRipple centralRipple
elevated
icon={'edit'}
size={'small'}
/> />
<FAB <FAB
elevated
icon={'edit'}
size={'small'}
variant={'primary'} variant={'primary'}
size={'small'}
icon={'edit'}
elevated
/> />
<FAB <FAB
elevated
icon={'edit'}
size={'small'}
variant={'secondary'} variant={'secondary'}
size={'small'}
icon={'edit'}
elevated
/> />
<FAB <FAB
variant={'tertiary'}
size={'small'}
icon={'edit'}
elevated elevated
icon={'edit'}
size={'small'}
variant={'tertiary'}
/> />
</div> </div>
</div> </div>
<div> <div>
<h2> Default </h2> <h2> Default </h2>
<div style={{display: 'flex', gap: '2em'}}> <div style={{ display: 'flex', gap: '2em' }}>
<FAB icon={'edit'} elevated /> <FAB elevated icon={'edit'} />
<FAB <FAB
elevated
icon={'edit'}
variant={'primary'} variant={'primary'}
icon={'edit'}
elevated
/> />
<FAB <FAB
elevated
icon={'edit'}
variant={'secondary'} variant={'secondary'}
icon={'edit'}
elevated
/> />
<FAB <FAB
variant={'tertiary'}
icon={'edit'}
elevated elevated
icon={'edit'}
variant={'tertiary'}
/> />
</div> </div>
</div> </div>
<div> <div>
<h2> Large </h2> <h2> Large </h2>
<div style={{display: 'flex', gap: '2em'}}> <div style={{ display: 'flex', gap: '2em' }}>
<FAB size={'large'} icon={'edit'} /> <FAB elevated icon={'edit'} size={'large'} />
<FAB <FAB
elevated
icon={'edit'}
size={'large'}
variant={'primary'} variant={'primary'}
size={'large'}
icon={'edit'}
elevated
/> />
<FAB <FAB
elevated
icon={'edit'}
size={'large'}
variant={'secondary'} variant={'secondary'}
size={'large'}
icon={'edit'}
elevated
/> />
<FAB <FAB
variant={'tertiary'}
size={'large'}
icon={'edit'}
elevated elevated
icon={'edit'}
size={'large'}
variant={'tertiary'}
/> />
</div> </div>
</div> </div>
<div> <div>
<h2> Extended </h2> <h2> Extended </h2>
<div style={{display: 'flex', gap: '2em'}}> <div style={{ display: 'flex', gap: '2em' }}>
<FAB size={'extended'} icon={'edit'} elevated> <FAB elevated icon={'edit'} size={'extended'}>
<span className={'label-large'}>Label</span> <span className={'label-large'}>Label</span>
</FAB> </FAB>
<FAB <FAB
elevated
icon={'edit'}
size={'extended'}
variant={'primary'} variant={'primary'}
size={'extended'}
icon={'edit'}
elevated
> >
<span className={'label-large'}>Label</span> <span className={'label-large'}>Label</span>
</FAB> </FAB>
<FAB <FAB
elevated
icon={'edit'}
size={'extended'}
variant={'secondary'} variant={'secondary'}
size={'extended'}
icon={'edit'}
elevated
> >
<span className={'label-large'}>Label</span> <span className={'label-large'}>Label</span>
</FAB> </FAB>
<FAB <FAB
variant={'tertiary'}
size={'extended'}
icon={'edit'}
elevated elevated
icon={'edit'}
size={'extended'}
variant={'tertiary'}
> >
<span className={'label-large'}>Label</span> <span className={'label-large'}>Label</span>
</FAB> </FAB>
@ -135,78 +135,79 @@ export default function Fabs() {
> >
<div> <div>
<h2> Small </h2> <h2> Small </h2>
<div style={{display: 'flex', gap: '2em'}}> <div style={{ display: 'flex', gap: '2em' }}>
<FAB icon={'edit'} size={'small'} />
<FAB <FAB
size={'small'}
icon={'edit'} icon={'edit'}
size={'small'}
variant={'primary'} variant={'primary'}
/> />
<FAB <FAB
variant={'secondary'}
size={'small'}
icon={'edit'} icon={'edit'}
size={'small'}
variant={'secondary'}
/> />
<FAB <FAB
variant={'tertiary'}
size={'small'}
icon={'edit'} icon={'edit'}
size={'small'}
variant={'tertiary'}
/> />
</div> </div>
</div> </div>
<div> <div>
<h2> Default </h2> <h2> Default </h2>
<div style={{display: 'flex', gap: '2em'}}> <div style={{ display: 'flex', gap: '2em' }}>
<FAB icon={'edit'} /> <FAB icon={'edit'} />
<FAB variant={'primary'} icon={'edit'} /> <FAB icon={'edit'} variant={'primary'} />
<FAB variant={'secondary'} icon={'edit'} /> <FAB icon={'edit'} variant={'secondary'} />
<FAB variant={'tertiary'} icon={'edit'} /> <FAB icon={'edit'} variant={'tertiary'} />
</div> </div>
</div> </div>
<div> <div>
<h2> Large </h2> <h2> Large </h2>
<div style={{display: 'flex', gap: '2em'}}> <div style={{ display: 'flex', gap: '2em' }}>
<FAB size={'large'} icon={'edit'} /> <FAB icon={'edit'} size={'large'} />
<FAB <FAB
icon={'edit'}
size={'large'}
variant={'primary'} variant={'primary'}
size={'large'}
icon={'edit'}
/> />
<FAB <FAB
icon={'edit'}
size={'large'}
variant={'secondary'} variant={'secondary'}
size={'large'}
icon={'edit'}
/> />
<FAB <FAB
variant={'tertiary'}
size={'large'}
icon={'edit'} icon={'edit'}
size={'large'}
variant={'tertiary'}
/> />
</div> </div>
</div> </div>
<div> <div>
<h2> Extended </h2> <h2> Extended </h2>
<div style={{display: 'flex', gap: '2em'}}> <div style={{ display: 'flex', gap: '2em' }}>
<FAB size={'extended'} icon={'edit'}> <FAB icon={'edit'} size={'extended'}>
<span className={'label-large'}>Label</span> <span className={'label-large'}>Label</span>
</FAB> </FAB>
<FAB <FAB
icon={'edit'}
size={'extended'}
variant={'primary'} variant={'primary'}
size={'extended'}
icon={'edit'}
> >
<span className={'label-large'}>Label</span> <span className={'label-large'}>Label</span>
</FAB> </FAB>
<FAB <FAB
icon={'edit'}
size={'extended'}
variant={'secondary'} variant={'secondary'}
size={'extended'}
icon={'edit'}
> >
<span className={'label-large'}>Label</span> <span className={'label-large'}>Label</span>
</FAB> </FAB>
<FAB <FAB
variant={'tertiary'}
size={'extended'}
icon={'edit'} icon={'edit'}
size={'extended'}
variant={'tertiary'}
> >
<span className={'label-large'}>Label</span> <span className={'label-large'}>Label</span>
</FAB> </FAB>

View File

@ -1,13 +1,13 @@
'use client'; 'use client';
import React from 'react'; import React from 'react';
import {IconButton} from '../../src/primitive-components/material-you-components'; import { IconButton } from '../../src/primitive-components/material-you-components';
function IconButtons() { function IconButtons() {
return ( return (
<div className={'m3 m3-wrapper'}> <div className={'m3 m3-wrapper'}>
<h1> Icon buttons </h1> <h1> Icon buttons </h1>
<div style={{display: 'flex', flexDirection: 'row', gap: '2em'}}> <div style={{ display: 'flex', flexDirection: 'row', gap: '2em' }}>
<div> <div>
<h2> Default buttons </h2> <h2> Default buttons </h2>
<div <div
@ -17,7 +17,7 @@ function IconButtons() {
gap: '0.5em', gap: '0.5em',
}} }}
> >
<IconButton icon={'settings'} centralRipple /> <IconButton centralRipple icon={'settings'} />
<IconButton icon={'settings'} variant={'filled'} /> <IconButton icon={'settings'} variant={'filled'} />
<IconButton icon={'settings'} variant={'tonal'} /> <IconButton icon={'settings'} variant={'tonal'} />
<IconButton icon={'settings'} variant={'outlined'} /> <IconButton icon={'settings'} variant={'outlined'} />
@ -30,21 +30,21 @@ function IconButtons() {
gap: '0.5em', gap: '0.5em',
}} }}
> >
<IconButton icon={'settings'} disabled /> <IconButton disabled icon={'settings'} />
<IconButton <IconButton
disabled
icon={'settings'} icon={'settings'}
variant={'filled'} variant={'filled'}
disabled
/> />
<IconButton <IconButton
disabled
icon={'settings'} icon={'settings'}
variant={'tonal'} variant={'tonal'}
disabled
/> />
<IconButton <IconButton
disabled
icon={'settings'} icon={'settings'}
variant={'outlined'} variant={'outlined'}
disabled
/> />
</div> </div>
</div> </div>
@ -66,27 +66,27 @@ function IconButtons() {
/> />
<IconButton <IconButton
icon={'settings'} icon={'settings'}
toggled={{
selected: 'settings',
unselected: 'settings',
}}
variant={'filled'} variant={'filled'}
/>
<IconButton
icon={'settings'}
toggled={{ toggled={{
selected: 'settings', selected: 'settings',
unselected: 'settings', unselected: 'settings',
}} }}
/>
<IconButton
icon={'settings'}
variant={'tonal'} variant={'tonal'}
toggled={{
selected: 'settings',
unselected: 'settings',
}}
/> />
<IconButton <IconButton
icon={'settings'} icon={'settings'}
variant={'outlined'}
toggled={{ toggled={{
selected: 'settings', selected: 'settings',
unselected: 'settings', unselected: 'settings',
}} }}
variant={'outlined'}
/> />
</div> </div>
<h2> Disabled toggle buttons </h2> <h2> Disabled toggle buttons </h2>
@ -98,39 +98,39 @@ function IconButtons() {
}} }}
> >
<IconButton <IconButton
disabled
icon={'settings'} icon={'settings'}
toggled={{ toggled={{
selected: 'settings', selected: 'settings',
unselected: 'settings', unselected: 'settings',
}} }}
disabled
/> />
<IconButton <IconButton
disabled
icon={'settings'} icon={'settings'}
toggled={{
selected: 'settings',
unselected: 'settings',
}}
variant={'filled'} variant={'filled'}
/>
<IconButton
disabled
icon={'settings'}
toggled={{ toggled={{
selected: 'settings', selected: 'settings',
unselected: 'settings', unselected: 'settings',
}} }}
disabled
/>
<IconButton
icon={'settings'}
variant={'tonal'} variant={'tonal'}
toggled={{
selected: 'settings',
unselected: 'settings',
}}
disabled
/> />
<IconButton <IconButton
disabled
icon={'settings'} icon={'settings'}
variant={'outlined'}
toggled={{ toggled={{
selected: 'settings', selected: 'settings',
unselected: 'settings', unselected: 'settings',
}} }}
disabled variant={'outlined'}
/> />
</div> </div>
<h2> Disabled selected toggle buttons </h2> <h2> Disabled selected toggle buttons </h2>
@ -142,43 +142,43 @@ function IconButtons() {
}} }}
> >
<IconButton <IconButton
disabled
icon={'settings'} icon={'settings'}
selected
toggled={{ toggled={{
selected: 'settings', selected: 'settings',
unselected: 'settings', unselected: 'settings',
}} }}
disabled
selected
/> />
<IconButton <IconButton
disabled
icon={'settings'} icon={'settings'}
selected
toggled={{
selected: 'settings',
unselected: 'settings',
}}
variant={'filled'} variant={'filled'}
/>
<IconButton
disabled
icon={'settings'}
selected
toggled={{ toggled={{
selected: 'settings', selected: 'settings',
unselected: 'settings', unselected: 'settings',
}} }}
disabled
selected
/>
<IconButton
icon={'settings'}
variant={'tonal'} variant={'tonal'}
toggled={{
selected: 'settings',
unselected: 'settings',
}}
disabled
selected
/> />
<IconButton <IconButton
disabled
icon={'settings'} icon={'settings'}
variant={'outlined'} selected
toggled={{ toggled={{
selected: 'settings', selected: 'settings',
unselected: 'settings', unselected: 'settings',
}} }}
disabled variant={'outlined'}
selected
/> />
</div> </div>
</div> </div>

View File

@ -1,5 +1,5 @@
import React from 'react'; import React from 'react';
import {Radio} from '../../src/primitive-components/material-you-components'; import { Radio } from '../../src/primitive-components/material-you-components';
export default function Radios() { export default function Radios() {
return ( return (
@ -16,16 +16,16 @@ export default function Radios() {
> >
<div> <div>
<h2> Default </h2> <h2> Default </h2>
<div style={{display: 'flex', gap: '2em'}}> <div style={{ display: 'flex', gap: '2em' }}>
<Radio centralRipple /> <Radio centralRipple />
<Radio defaultChecked /> <Radio defaultChecked />
</div> </div>
</div> </div>
<div> <div>
<h2> Disabled </h2> <h2> Disabled </h2>
<div style={{display: 'flex', gap: '2em'}}> <div style={{ display: 'flex', gap: '2em' }}>
<Radio disabled /> <Radio disabled />
<Radio disabled defaultChecked /> <Radio defaultChecked disabled />
</div> </div>
</div> </div>
</div> </div>

View File

@ -1,16 +1,18 @@
'use client';
import React from 'react'; import React from 'react';
import {Switch} from '../../src/primitive-components/material-you-components'; import { Switch } from '../../src/primitive-components/material-you-components';
export default function Switches() { export default function Switches() {
return ( return (
<div <div
className={'m3 m3-wrapper'} className={'m3 m3-wrapper'}
style={{display: 'flex', flexDirection: 'column', gap: '1.5em'}} style={{ display: 'flex', flexDirection: 'column', gap: '1.5em' }}
> >
<h1> Switches </h1> <h1> Switches </h1>
<div style={{display: 'flex', flexDirection: 'row', gap: '2em'}}> <div style={{ display: 'flex', flexDirection: 'row', gap: '2em' }}>
<div style={{display: 'flex', flexDirection: 'column'}}> <div style={{ display: 'flex', flexDirection: 'column' }}>
<h2 style={{margin: 0}}> Without icon </h2> <h2 style={{ margin: 0 }}> Without icon </h2>
<div <div
style={{ style={{
display: 'flex', display: 'flex',
@ -27,12 +29,12 @@ export default function Switches() {
<div> <div>
<h2> Disabled </h2> <h2> Disabled </h2>
<Switch disabled /> <Switch disabled />
<Switch disabled defaultChecked /> <Switch defaultChecked disabled />
</div> </div>
</div> </div>
</div> </div>
<div style={{display: 'flex', flexDirection: 'column'}}> <div style={{ display: 'flex', flexDirection: 'column' }}>
<h2 style={{margin: 0}}> With icon (both)</h2> <h2 style={{ margin: 0 }}> With icon (both)</h2>
<div <div
style={{ style={{
display: 'flex', display: 'flex',
@ -49,12 +51,12 @@ export default function Switches() {
<div> <div>
<h2> Disabled </h2> <h2> Disabled </h2>
<Switch disabled icon /> <Switch disabled icon />
<Switch disabled defaultChecked icon /> <Switch defaultChecked disabled icon />
</div> </div>
</div> </div>
</div> </div>
<div style={{display: 'flex', flexDirection: 'column'}}> <div style={{ display: 'flex', flexDirection: 'column' }}>
<h2 style={{margin: 0}}> With icon (selected)</h2> <h2 style={{ margin: 0 }}> With icon (selected)</h2>
<div <div
style={{ style={{
display: 'flex', display: 'flex',
@ -65,13 +67,13 @@ export default function Switches() {
> >
<div> <div>
<h2> Default </h2> <h2> Default </h2>
<Switch selected icon /> <Switch icon selected />
<Switch selected defaultChecked icon /> <Switch defaultChecked icon selected />
</div> </div>
<div> <div>
<h2> Disabled </h2> <h2> Disabled </h2>
<Switch selected disabled icon /> <Switch disabled icon selected />
<Switch selected disabled defaultChecked icon /> <Switch defaultChecked disabled icon selected />
</div> </div>
</div> </div>
</div> </div>

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,5 @@
import '../src/styles/generics.css'; import '../src/styles/generics.css';
import '../src/styles/button.css'; import { Metadata, Viewport } from 'next';
import '../src/styles/ripple.css';
import {Metadata, Viewport} from 'next';
export const metadata: Metadata = { export const metadata: Metadata = {
title: 'Create Next App', title: 'Create Next App',
@ -15,7 +13,11 @@ export const viewport: Viewport = {
userScalable: false, userScalable: false,
}; };
export default function RootLayout({children}: {children: React.ReactNode}) { export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
return ( return (
<html lang="en"> <html lang="en">
<body>{children}</body> <body>{children}</body>

View File

@ -1,4 +1,4 @@
import {Fragment} from 'react'; import { Fragment } from 'react';
import Fabs from './components/fabs'; import Fabs from './components/fabs';
import Badges from './components/badges'; import Badges from './components/badges';
import IconButtons from './components/icon-buttons'; import IconButtons from './components/icon-buttons';
@ -6,7 +6,7 @@ import Buttons from './components/buttons';
import Switches from './components/switches'; import Switches from './components/switches';
import Checkboxes from './components/checkboxes'; import Checkboxes from './components/checkboxes';
import Radios from './components/radios'; import Radios from './components/radios';
import {TextFields} from './components/text-fields'; import { TextFields } from './components/text-fields';
export default function Page() { export default function Page() {
return ( return (

3705
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -4,27 +4,38 @@
"dev": "next dev --turbo", "dev": "next dev --turbo",
"build": "next build", "build": "next build",
"start": "next start", "start": "next start",
"lint": "gts lint", "lint": "lint",
"clean": "gts clean",
"compile": "tsc", "compile": "tsc",
"fix": "gts fix",
"prepare": "npm run compile", "prepare": "npm run compile",
"pretest": "npm run compile", "pretest": "npm run compile",
"posttest": "npm run lint" "posttest": "npm run lint"
}, },
"dependencies": { "dependencies": {
"eslint-plugin-prettier": "^5.1.3",
"install": "^0.13.0", "install": "^0.13.0",
"next": "latest", "next": "latest",
"npm": "^10.4.0",
"prop-types": "^15.8.1", "prop-types": "^15.8.1",
"react": "^18.2.0", "react": "^18.2.0",
"react-dom": "^18.2.0" "react-dom": "^18.2.0"
}, },
"devDependencies": { "devDependencies": {
"@next/eslint-plugin-next": "^14.1.0",
"@types/node": "20.8.2", "@types/node": "20.8.2",
"@types/react": "18.2.33", "@types/react": "18.2.33",
"@types/react-dom": "18.2.14", "@types/react-dom": "18.2.14",
"gts": "^5.2.0", "@typescript-eslint/eslint-plugin": "^6.20.0",
"eslint": "^8.56.0",
"eslint-config-next": "^14.1.0",
"eslint-config-prettier": "^9.1.0",
"eslint-config-standard-with-typescript": "^43.0.1",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-n": "^16.6.2",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"i": "^0.3.7",
"npm": "^10.4.0",
"prettier": "3.2.4",
"typescript": "~5.2.0" "typescript": "~5.2.0"
} }
} }

View File

@ -1,33 +0,0 @@
console.log('Try npm run lint/fix!');
const longString =
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer ut aliquet diam.';
const trailing = 'Semicolon';
const why = {am: 'I tabbed?'};
const iWish = "I didn't have a trailing space...";
const sicilian = true;
const vizzini = sicilian ? !sicilian : sicilian;
const re = /foo {3}bar/;
export function doSomeStuff(
withThis: string,
andThat: string,
andThose: string[]
) {
//function on one line
if (!andThose.length) {
return false;
}
console.log(withThis);
console.log(andThat);
console.dir(andThose);
console.log(longString, trailing, why, iWish, vizzini, re);
return;
}
// TODO: more examples

View File

@ -1,38 +1,32 @@
import React, {ForwardedRef, forwardRef, PropsWithChildren} from 'react'; import { BadgeProps } from './badges.types';
import {bool, number, string} from 'prop-types'; import { bool, number, string } from 'prop-types';
import React, { forwardRef } from 'react';
interface BadgeProps extends PropsWithChildren<any> { const Badge = forwardRef<SVGSVGElement, BadgeProps>(function Badge(
disableValue?: boolean; { disableValue = false, ...props },
} ref,
) {
const digitLength = props.children
? 16 + (props.children.length - 1) * 6
: 6,
disableValueClassName =
disableValue || (!props.children ?? true) ? 'disable-value' : '';
const Badge = forwardRef( return (
({disableValue = false, ...props}: BadgeProps, ref: ForwardedRef<any>) => { <svg
const digitLength = props.children {...props}
? 16 + (props.children.length - 1) * 6 className={`m3 m3-badge ${'' ?? props.className}${disableValueClassName}`.trimEnd()}
: 6, ref={ref}
disableValueClassName = width={`${digitLength}px`}
disableValue || (!props.children ?? true) >
? 'disable-value' {props.children && (
: ''; <text x={'50%'} y={'50%'}>
{props.children}
return ( </text>
<svg )}
{...props} </svg>
ref={ref} );
width={`${digitLength}px`} });
className={`m3 m3-badge ${
'' ?? props.className
}${disableValueClassName}`.trimEnd()}
>
{props.children && (
<text x={'50%'} y={'50%'}>
{props.children}
</text>
)}
</svg>
);
}
);
Badge.propTypes = { Badge.propTypes = {
children: number, children: number,
@ -40,4 +34,4 @@ Badge.propTypes = {
disableValue: bool, disableValue: bool,
}; };
export {Badge}; export { Badge };

View File

@ -0,0 +1,5 @@
import { PropsWithChildren } from 'react';
export interface BadgeProps extends PropsWithChildren<any> {
disableValue?: boolean;
}

View File

@ -1,6 +1,8 @@
'use client'; 'use client';
import {RippleArea} from '../ripple/ripple-area'; import { RippleArea } from '../ripple/ripple-area';
import { IRippleProps } from '../ripple/ripple.types';
import useRippleEffect from '../ripple/hooks/useRippleEffect';
import React, { import React, {
forwardRef, forwardRef,
PropsWithChildren, PropsWithChildren,
@ -8,46 +10,39 @@ import React, {
useRef, useRef,
useState, useState,
} from 'react'; } from 'react';
import useRippleEffect from '../ripple/hooks/useRippleEffect';
import {IRippleProps} from '../ripple/ripple.types';
const ButtonLayout = forwardRef( const ButtonLayout = forwardRef<
( HTMLButtonElement,
{ PropsWithChildren<any> & IRippleProps
centralRipple = false, >(function ButtonBase({ centralRipple = false, ...props }, ref) {
...props const [isActive, setIsActive] = useState<boolean>(false),
}: PropsWithChildren<any> & IRippleProps, ripplesRef = useRef(null),
ref buttonId = useId(),
) => { events = useRippleEffect(ripplesRef, setIsActive);
const [isActive, setIsActive] = useState<boolean>(false),
ripplesRef = useRef(null),
buttonId = useId(),
events = useRippleEffect(ripplesRef, setIsActive);
const {variant, disabled, className} = props; const { variant, disabled, className } = props;
const classes = className const classes = className
? `m3 ${className} ${variant}${isActive ? ' is-active' : ''}` ? `m3 ${className} ${variant}${isActive ? ' is-active' : ''}`
: `m3 ${variant}${isActive ? ' is-active' : ''}`; : `m3 ${variant}${isActive ? ' is-active' : ''}`;
return ( return (
<button <button
{...props} {...props}
{...events} {...events}
ref={ref} className={classes}
id={buttonId} disabled={disabled}
className={classes} id={buttonId}
disabled={disabled} ref={ref}
> >
{props.children} {props.children}
<RippleArea <RippleArea
ref={ripplesRef} callback={setIsActive}
central={centralRipple} central={centralRipple}
callback={setIsActive} ref={ripplesRef}
/> />
</button> </button>
); );
} });
);
export {ButtonLayout}; export { ButtonLayout };

View File

@ -1,11 +1,11 @@
import {PropsWithChildren} from 'react'; import { PropsWithChildren } from 'react';
type toggleButtonType = { type ToggleButtonType = {
selected: string; selected: string;
unselected: string; unselected: string;
}; };
export interface buttonMainProps extends PropsWithChildren<any> { export interface ButtonMainProps extends PropsWithChildren<any> {
disabled?: boolean; disabled?: boolean;
variant?: 'filled' | 'outlined' | 'elevated' | 'tonal' | 'text'; variant?: 'filled' | 'outlined' | 'elevated' | 'tonal' | 'text';
} }
@ -17,9 +17,9 @@ export interface FABMainProps extends PropsWithChildren<any> {
variant?: 'surface' | 'primary' | 'secondary' | 'tertiary'; variant?: 'surface' | 'primary' | 'secondary' | 'tertiary';
} }
export interface iconButtonMainProps extends PropsWithChildren<any> { export interface IconButtonMainProps extends PropsWithChildren<any> {
icon: string; icon: string;
toggled?: false | toggleButtonType; toggled?: false | ToggleButtonType;
disabled?: boolean; disabled?: boolean;
variant?: 'default' | 'filled' | 'tonal' | 'outlined'; variant?: 'default' | 'filled' | 'tonal' | 'outlined';
} }

View File

@ -1,34 +1,33 @@
import {forwardRef} from 'react'; 'use client';
import {Icon} from '../material-you-components';
import {IRippleProps} from '../ripple/ripple.types'; import { forwardRef } from 'react';
import {ButtonLayout} from '../button-layout/button-layout'; import { Icon } from '../material-you-components';
import {buttonMainProps} from '../button-layout/button.types'; import { IRippleProps } from '../ripple/ripple.types';
import { ButtonLayout } from '../button-layout/button-layout';
import { ButtonMainProps } from '../button-layout/button.types';
/** /**
* Button component * Button component
** description ** description
*/ */
export const Button = forwardRef( export const Button = forwardRef<
HTMLButtonElement,
ButtonMainProps & IRippleProps
>(
( (
{ { centralRipple = false, variant, disabled = false, icon, ...props },
centralRipple = false, ref,
variant,
disabled,
icon,
...props
}: buttonMainProps & IRippleProps,
ref
) => ( ) => (
<ButtonLayout <ButtonLayout
{...props} {...props}
ref={ref}
disabled={disabled}
centralRipple={centralRipple} centralRipple={centralRipple}
disabled={disabled}
ref={ref}
variant={variant ? variant : 'filled'} variant={variant ? variant : 'filled'}
> >
{icon ? <Icon iconSize={20}>{icon}</Icon> : <></>} {icon ? <Icon iconSize={20}>{icon}</Icon> : <></>}
<span className={'label-large'}>{props.children}</span> <span className={'label-large'}>{props.children}</span>
</ButtonLayout> </ButtonLayout>
) ),
); );

View File

@ -1,35 +1,38 @@
'use client'; 'use client';
import React, {forwardRef, useEffect, useImperativeHandle, useRef} from 'react'; import React, {
import {CheckboxLayoutProps} from './checkbox-layout.types'; forwardRef,
useEffect,
useImperativeHandle,
useRef,
} from 'react';
import { CheckboxLayoutProps } from './checkbox-layout.types';
export const CheckBoxLayout = forwardRef( export const CheckBoxLayout = forwardRef(function CheckBoxBase(
( { indeterminate, typeInput, type, ...props }: CheckboxLayoutProps,
{indeterminate, typeInput, type, ...props}: CheckboxLayoutProps, ref,
ref ): JSX.Element {
): JSX.Element => { const checkboxRef = useRef<any>(null);
const checkboxRef = useRef<any>(null);
useEffect(() => { useEffect(() => {
checkboxRef.current.indeterminate = indeterminate === true; checkboxRef.current.indeterminate = indeterminate === true;
}, []); }, []);
useImperativeHandle(ref, () => checkboxRef.current); useImperativeHandle(ref, () => checkboxRef.current);
const classesType = typeInput || type; const classesType = typeInput || type;
const classes = const classes =
props.className !== undefined props.className !== undefined
? `m3 m3-${type} ${props.className}` ? `m3 m3-${type} ${props.className}`
: `m3 m3-${classesType}`; : `m3 m3-${classesType}`;
return ( return (
<input <input
ref={checkboxRef} ref={checkboxRef}
{...props} {...props}
type={type} className={classes.trimEnd()}
className={classes.trimEnd()} type={type}
/> />
); );
} });
);

View File

@ -1,4 +1,4 @@
import {PropsWithChildren} from 'react'; import { PropsWithChildren } from 'react';
export interface CheckboxLayoutProps extends PropsWithChildren<any> { export interface CheckboxLayoutProps extends PropsWithChildren<any> {
indeterminate?: boolean; indeterminate?: boolean;

View File

@ -1,9 +1,12 @@
import {RippleArea} from '../ripple/ripple-area'; 'use client';
import {IRippleProps} from '../ripple/ripple.types';
import { RippleArea } from '../ripple/ripple-area';
import { IRippleProps } from '../ripple/ripple.types';
import useRippleEffect from '../ripple/hooks/useRippleEffect'; import useRippleEffect from '../ripple/hooks/useRippleEffect';
import {CheckBoxLayout} from '../checkbox-layout/check-box-layout'; import { CheckBoxLayout } from '../checkbox-layout/check-box-layout';
import { import {
forwardRef, forwardRef,
PropsWithChildren,
useEffect, useEffect,
useImperativeHandle, useImperativeHandle,
useRef, useRef,
@ -15,42 +18,42 @@ import {
** description ** description
*/ */
export const Checkbox = forwardRef( export const Checkbox = forwardRef<
({centralRipple, ...props}: any & IRippleProps, ref) => { HTMLInputElement,
const [isActive, setIsActive] = useState<boolean>(false), PropsWithChildren<any> & IRippleProps
[checked, setChecked] = useState<boolean>(props.checked ?? false), >(({ centralRipple, ...props }, ref) => {
ripplesRef = useRef(null), const [isActive, setIsActive] = useState<boolean>(false),
checkboxRef = useRef(null), [checked, setChecked] = useState<boolean>(props.checked ?? false),
events = useRippleEffect(ripplesRef, setIsActive); ripplesRef = useRef(null),
checkboxRef = useRef(null),
events = useRippleEffect(ripplesRef, setIsActive);
const classes = `m3 m3-checkbox-label ${ const classes =
isActive === true ? 'visible' : '' `m3 m3-checkbox-label ${isActive === true ? 'visible' : ''}`.trimEnd();
}`.trimEnd(); const indeterminate = (props.indeterminate === true).toString();
const indeterminate = (props.indeterminate === true).toString();
useImperativeHandle(ref, () => checkboxRef.current); useImperativeHandle(ref, () => checkboxRef.current);
useEffect(() => { useEffect(() => {
setChecked(!checked); setChecked(!checked);
}, [checkboxRef.current?.checked]); }, [checkboxRef.current?.checked]);
return ( return (
<label {...events} className={classes}> <label {...events} className={classes}>
<CheckBoxLayout <CheckBoxLayout
{...props} {...props}
ref={checkboxRef} indeterminate={indeterminate}
indeterminate={indeterminate} ref={checkboxRef}
type={'checkbox'} type={'checkbox'}
/> />
<span className={'m3 m3-checkbox-state-layer'} /> <span className={'m3 m3-checkbox-state-layer'} />
<RippleArea <RippleArea
className={'m3-checkbox-ripple-layer'} callback={setIsActive}
ref={ripplesRef} central={centralRipple}
central={centralRipple} className={'m3-checkbox-ripple-layer'}
callback={setIsActive} ref={ripplesRef}
/> />
{props.children} {props.children}
</label> </label>
); );
} });
);

View File

@ -1,25 +1,18 @@
import React, {ForwardedRef, forwardRef, PropsWithChildren} from 'react'; import React, { forwardRef, PropsWithChildren } from 'react';
interface DividerProps extends PropsWithChildren<any> { interface DividerProps extends PropsWithChildren<any> {
orientation?: 'vertical' | 'horizontal'; orientation?: 'vertical' | 'horizontal';
variant?: 'full-width' | 'inset' | 'middle-inset'; variant?: 'full-width' | 'inset' | 'middle-inset';
} }
const Divider = forwardRef( const Divider = forwardRef<HTMLHRElement, DividerProps>(
( ({ orientation, variant, ...props }, ref) => (
{orientation, variant, ...props}: DividerProps, <hr
ref: ForwardedRef<any> {...props}
) => { className={`m3 m3-divider ${orientation ?? 'horizontal'} ${variant ?? 'full-width'}`.trimEnd()}
return ( ref={ref}
<hr />
{...props} ),
ref={ref}
className={`m3 m3-divider ${orientation ?? 'horizontal'} ${
variant ?? 'full-width'
}`.trimEnd()}
/>
);
}
); );
export {Divider}; export { Divider };

View File

@ -1,8 +1,10 @@
import {forwardRef} from 'react'; 'use client';
import {FABMainProps} from '../button-layout/button.types';
import {ButtonLayout} from '../button-layout/button-layout'; import { forwardRef } from 'react';
import {IRippleProps} from '../ripple/ripple.types'; import { Icon } from '../material-you-components';
import {Icon} from '../material-you-components'; import { IRippleProps } from '../ripple/ripple.types';
import { FABMainProps } from '../button-layout/button.types';
import { ButtonLayout } from '../button-layout/button-layout';
/** /**
* FABs component * FABs component
@ -16,7 +18,7 @@ const sizes = {
extended: 24, extended: 24,
}; };
export const FAB = forwardRef( export const FAB = forwardRef<HTMLButtonElement, FABMainProps & IRippleProps>(
( (
{ {
variant, variant,
@ -26,17 +28,16 @@ export const FAB = forwardRef(
size = 'default', size = 'default',
elevated, elevated,
...props ...props
}: FABMainProps & IRippleProps, },
ref ref,
) => ( ) => (
<ButtonLayout <ButtonLayout
{...props} {...props}
ref={ref}
centralRipple={centralRipple} centralRipple={centralRipple}
className={`m3-fab m3-${size}-fab ${!(elevated ?? false) && 'without-elevation'}`}
disabled={disabled}
ref={ref}
variant={variant ? variant : 'surface'} variant={variant ? variant : 'surface'}
className={`m3-fab m3-${size}-fab ${
!(elevated ?? false) && 'without-elevation'
}`}
> >
<Icon iconSize={sizes[size]} svgSize={sizes[size]}> <Icon iconSize={sizes[size]} svgSize={sizes[size]}>
{icon} {icon}
@ -47,5 +48,5 @@ export const FAB = forwardRef(
<></> <></>
)} )}
</ButtonLayout> </ButtonLayout>
) ),
); );

View File

@ -1,5 +1,10 @@
import {ButtonLayout} from '../button-layout/button-layout'; 'use client';
import {iconButtonMainProps} from '../button-layout/button.types';
import { Icon } from '../material-you-components';
import { toggleIconType } from './icon-button.types';
import { IRippleProps } from '../ripple/ripple.types';
import { ButtonLayout } from '../button-layout/button-layout';
import { IconButtonMainProps } from '../button-layout/button.types';
import { import {
forwardRef, forwardRef,
useCallback, useCallback,
@ -7,15 +12,16 @@ import {
useRef, useRef,
useState, useState,
} from 'react'; } from 'react';
import {IRippleProps} from '../ripple/ripple.types';
import {Icon} from '../material-you-components';
/** /**
* Icon button-layout component * Icon button-layout component
** description ** description
*/ */
export const IconButton = forwardRef( export const IconButton = forwardRef<
HTMLButtonElement,
IconButtonMainProps & IRippleProps
>(
( (
{ {
icon, icon,
@ -25,11 +31,11 @@ export const IconButton = forwardRef(
toggled = false, toggled = false,
centralRipple, centralRipple,
...props ...props
}: iconButtonMainProps & IRippleProps, },
ref ref,
) => { ) => {
const [toggleIcon, setToggleIcon] = useState<any>({ const [toggleIcon, setToggleIcon] = useState<toggleIconType>({
state: selected === true ? 'selected' : 'unselected', state: selected == true ? 'selected' : 'unselected',
icon: toggled ? toggled.unselected ?? 'add_circle' : 'add_circle', icon: toggled ? toggled.unselected ?? 'add_circle' : 'add_circle',
}); });
@ -44,35 +50,37 @@ export const IconButton = forwardRef(
const callback = useCallback(() => { const callback = useCallback(() => {
if (toggled) { if (toggled) {
if (toggleIcon.state === 'selected') if (toggleIcon.state === 'selected') {
toggle('', toggled.unselected ?? 'add_circle'); toggle('', toggled.unselected ?? 'add_circle');
else toggle('selected', toggled.selected ?? 'add_circle'); } else {
toggle('selected', toggled.selected ?? 'add_circle');
}
}
if (props.onClick) {
props.onClick();
} }
if (props.onClick) props.onClick();
}, [toggleIcon]); }, [toggleIcon]);
useImperativeHandle(ref, () => buttonRef); useImperativeHandle(ref, () => buttonRef.current);
return ( return (
<ButtonLayout <ButtonLayout
{...props} {...props}
ref={buttonRef}
onClick={callback}
centralRipple={centralRipple} centralRipple={centralRipple}
className={`m3-icon-button ${toggleIcon.state} ${toggled ? 'toggled' : ''}`.trimEnd()}
disabled={disabled} disabled={disabled}
className={`m3-icon-button ${toggleIcon.state} ${ onClick={callback}
toggled ? 'toggled' : '' ref={buttonRef}
}`.trimEnd()}
variant={variant ? variant : 'default'} variant={variant ? variant : 'default'}
> >
<Icon <Icon
svgSize={40}
iconSize={28}
fill={toggleIcon.state === 'selected' ? 1 : 0} fill={toggleIcon.state === 'selected' ? 1 : 0}
iconSize={28}
svgSize={40}
> >
{toggled ? toggleIcon.icon : icon ? icon : undefined} {toggled ? toggleIcon.icon : icon ? icon : undefined}
</Icon> </Icon>
</ButtonLayout> </ButtonLayout>
); );
} },
); );

View File

@ -0,0 +1,4 @@
export type toggleIconType = {
state: string;
icon: string;
};

View File

@ -1,49 +1,43 @@
import React, {ForwardedRef, forwardRef} from 'react'; import { IconProps } from './icon.types';
import {IconProps} from './icon.types'; import { bool, number, string } from 'prop-types';
import {bool, number, string} from 'prop-types'; import React, { ForwardedRef, forwardRef } from 'react';
const Icon = forwardRef( const Icon = forwardRef(function Icon(
( {
{ grade = 0,
grade = 0, weight = 500,
weight = 500, svgSize = 20,
svgSize = 20, fill = false,
fill = false, iconSize = 20,
iconSize = 20, opticalSize = 24,
opticalSize = 24, type = 'outlined',
type = 'outlined', ...props
...props }: IconProps,
}: IconProps, ref: ForwardedRef<any>,
ref: ForwardedRef<any> ) {
) => { const fontVariation = {
const fontVariation = { fontVariationSettings: `'FILL' ${fill ? 1 : 0}, 'wght' ${weight}, 'GRAD' ${grade}, 'optz' ${opticalSize}`,
fontVariationSettings: `'FILL' ${ };
fill ? 1 : 0
}, 'wght' ${weight}, 'GRAD' ${grade}, 'optz' ${opticalSize}`,
};
return ( return (
<svg <svg
{...props} {...props}
ref={ref} className={`m3 m3-svg-icon ${props.className ?? ''}`.trim()}
className={`m3 m3-svg-icon ${props.className ?? ''}`.trim()} height={svgSize}
width={svgSize} ref={ref}
height={svgSize} width={svgSize}
>
<text
className={`m3-${type[0].toUpperCase() + type.slice(1)} m3-size-${iconSize}px`}
style={fontVariation}
x={'50%'}
y={'50%'}
> >
<text {props.children ?? 'add_circle'}
className={`m3-${ </text>
type[0].toUpperCase() + type.slice(1) </svg>
} m3-size-${iconSize}px`} );
style={fontVariation} });
x={'50%'}
y={'50%'}
>
{props.children ?? 'add_circle'}
</text>
</svg>
);
}
);
Icon.propTypes = { Icon.propTypes = {
fill: bool, fill: bool,
@ -56,4 +50,4 @@ Icon.propTypes = {
opticalSize: number, opticalSize: number,
}; };
export {Icon}; export { Icon };

View File

@ -1,4 +1,4 @@
import {PropsWithChildren} from 'react'; import { PropsWithChildren } from 'react';
export interface IconProps extends PropsWithChildren<any> { export interface IconProps extends PropsWithChildren<any> {
fill?: boolean; fill?: boolean;

View File

@ -1,13 +1,13 @@
export {FAB} from './fab/fab'; export { FAB } from './fab/fab';
export {Icon} from './icon/icon'; export { Icon } from './icon/icon';
export {Radio} from './radio/radio'; export { Radio } from './radio/radio';
export {Badge} from './badge/badge'; export { Badge } from './badge/badge';
export {Switch} from './switch/switch'; export { Switch } from './switch/switch';
export {Button} from './button/button'; export { Button } from './button/button';
export {Divider} from './divider/divider'; export { Divider } from './divider/divider';
export {Checkbox} from './checkbox/checkbox'; export { Checkbox } from './checkbox/checkbox';
export {RippleArea} from './ripple/ripple-area'; export { RippleArea } from './ripple/ripple-area';
export {Ripples, Ripple} from './ripple/ripple'; export { Ripples, Ripple } from './ripple/ripple';
export {TextField} from './text-field/text-field'; export { TextField } from './text-field/text-field';
export {IconButton} from './icon-button/icon-button'; export { IconButton } from './icon-button/icon-button';
export {ButtonLayout} from './button-layout/button-layout'; export { ButtonLayout } from './button-layout/button-layout';

View File

@ -1,36 +1,38 @@
import {RippleArea} from '../ripple/ripple-area'; 'use client';
import {forwardRef, useRef, useState} from 'react';
import { RippleArea } from '../ripple/ripple-area';
import { IRippleProps } from '../ripple/ripple.types';
import useRippleEffect from '../ripple/hooks/useRippleEffect'; import useRippleEffect from '../ripple/hooks/useRippleEffect';
import {CheckBoxLayout} from '../checkbox-layout/check-box-layout'; import { CheckBoxLayout } from '../checkbox-layout/check-box-layout';
import {IRippleProps} from '../ripple/ripple.types'; import { forwardRef, PropsWithChildren, useRef, useState } from 'react';
/** /**
* Radio component * Radio component
** description ** description
*/ */
export const Radio = forwardRef( export const Radio = forwardRef<
({centralRipple, ...props}: any & IRippleProps, ref) => { HTMLInputElement,
const [isActive, setIsActive] = useState<boolean>(false), PropsWithChildren<HTMLElement> & IRippleProps
ripplesRef = useRef(null), >(({ centralRipple, ...props }, ref) => {
events = useRippleEffect(ripplesRef, setIsActive); const [isActive, setIsActive] = useState<boolean>(false),
ripplesRef = useRef(null),
events = useRippleEffect(ripplesRef, setIsActive);
const classes = `m3 m3-radio-label ${ const classes =
isActive === true ? 'visible' : '' `m3 m3-radio-label ${isActive === true ? 'visible' : ''}`.trimEnd();
}`.trimEnd();
return ( return (
<label {...events} className={classes}> <label {...events} className={classes}>
<CheckBoxLayout {...props} ref={ref} type={'radio'} /> <CheckBoxLayout {...props} ref={ref} type={'radio'} />
<span className={'m3 m3-radio-state-layer'} /> <span className={'m3 m3-radio-state-layer'} />
<RippleArea <RippleArea
className={'m3-checkbox-ripple-layer'} callback={setIsActive}
ref={ripplesRef} central={centralRipple}
central={centralRipple} className={'m3-checkbox-ripple-layer'}
callback={setIsActive} ref={ripplesRef}
/> />
{props.children} {props.children}
</label> </label>
); );
} });
);

View File

@ -1,4 +1,4 @@
import React, {useEffect, useState} from 'react'; import React, { useEffect, useState } from 'react';
interface RippleEventHandlers { interface RippleEventHandlers {
onBlur: React.FocusEventHandler; onBlur: React.FocusEventHandler;
@ -12,32 +12,20 @@ interface RippleEventHandlers {
onTouchStart: React.TouchEventHandler; onTouchStart: React.TouchEventHandler;
} }
export type EventHandlerType<T> = const UseRippleEffect = (ref, callback): undefined | RippleEventHandlers => {
| React.FocusEvent<T>
| React.DragEvent<T>
| React.MouseEvent<T>
| React.TouchEvent<T>;
interface RefImperativeType {
current: {
start: (event: EventHandlerType<Element>, callback: () => void) => void;
stop: (event: EventHandlerType<Element>, callback: () => void) => void;
};
}
const UseRippleEffect = (
ref: RefImperativeType,
callback: () => void
): undefined | RippleEventHandlers => {
const [mounted, setMounted] = useState<boolean>(false); const [mounted, setMounted] = useState<boolean>(false);
useEffect(() => { useEffect(() => {
if (!mounted) setMounted(true); if (!mounted) {
setMounted(true);
}
}); });
if (!mounted) return; if (!mounted) {
return;
}
const {start, stop} = ref.current; const { start, stop } = ref.current;
return { return {
onBlur: event => stop(event, callback), onBlur: event => stop(event, callback),

View File

@ -1,133 +1,130 @@
'use client'; 'use client';
import React, { import React, {
useId,
useRef,
useState,
forwardRef, forwardRef,
useCallback, useCallback,
useId,
useImperativeHandle, useImperativeHandle,
useRef,
useState,
} from 'react'; } from 'react';
import {Ripple} from './ripple'; import { Ripple } from './ripple';
import {Ripples} from './ripple'; import { Ripples } from './ripple';
import {RippleAreaProps} from './ripple.types'; import { RippleAreaProps } from './ripple.types';
const TIMEOUT = 550; const TIMEOUT: number = 550;
const rippleAreaContext = React.createContext(false); const rippleAreaContext = React.createContext(false);
const RippleArea = forwardRef( const RippleArea = forwardRef(function RippleArea(
({central = false, callback, ...props}: RippleAreaProps, ref) => { { central = false, callback, ...props }: RippleAreaProps,
const [ripples, setRipples] = useState<Array<JSX.Element>>([]), ref,
rippleDomain = useRef<any>(null), ) {
clicked = useRef<boolean>(false), const [ripples, setRipples] = useState<Array<JSX.Element>>([]),
uniqueKey = useRef<number>(0), rippleDomain = useRef<any>(null),
uniqueId = useId(); clicked = useRef<boolean>(false),
uniqueKey = useRef<number>(0),
uniqueId = useId();
const classes = props.className const classes = props.className
? `m3 m3-ripple-domain ${props.className}`.trimEnd() ? `m3 m3-ripple-domain ${props.className}`.trimEnd()
: 'm3 m3-ripple-domain'; : 'm3 m3-ripple-domain';
const start = useCallback( const start = useCallback(
(event: any, cb: (state: boolean) => void): void => { (event: any, cb: (state: boolean) => void): void => {
clicked.current = true; clicked.current = true;
cb(clicked.current); cb(clicked.current);
const rippleDomainChar = rippleDomain.current const rippleDomainChar = rippleDomain.current
? rippleDomain.current.getBoundingClientRect() ? rippleDomain.current.getBoundingClientRect()
: { : {
width: 0, width: 0,
height: 0, height: 0,
left: 0, left: 0,
top: 0, top: 0,
}; };
const rippleX: number = !central const rippleX: number = !central
? event.clientX - rippleDomainChar.left ? event.clientX - rippleDomainChar.left
: rippleDomainChar.width / 2, : rippleDomainChar.width / 2,
rippleY: number = !central rippleY: number = !central
? event.clientY - rippleDomainChar.top ? event.clientY - rippleDomainChar.top
: rippleDomainChar.height / 2, : rippleDomainChar.height / 2,
rippleSizeX: number = rippleSizeX: number =
Math.max( Math.max(
Math.abs(rippleDomainChar.width - rippleX), Math.abs(rippleDomainChar.width - rippleX),
rippleX rippleX,
) * ) *
2 + 2 +
2, 2,
rippleSizeY: number = rippleSizeY: number =
Math.max( Math.max(
Math.abs(rippleDomainChar.height - rippleY), Math.abs(rippleDomainChar.height - rippleY),
rippleY rippleY,
) * ) *
2 + 2 +
2, 2,
rippleS: number = rippleS: number = (rippleSizeX ** 2 + rippleSizeY ** 2) ** 0.5;
(rippleSizeX ** 2 + rippleSizeY ** 2) ** 0.5;
setRipples((prevRipples: Array<JSX.Element>) => { setRipples((prevRipples: Array<JSX.Element>) => {
if (prevRipples.length === 0) { if (prevRipples.length === 0) {
return [ return [
<Ripple <Ripple
rippleX={rippleX} key={uniqueKey.current}
rippleY={rippleY} lifetime={TIMEOUT}
rippleS={rippleS} rippleS={rippleS}
key={uniqueKey.current} rippleX={rippleX}
lifetime={TIMEOUT} rippleY={rippleY}
/>, />,
]; ];
} else { }
const old = [...prevRipples]; const old = [...prevRipples];
old.push( old.push(
<Ripple <Ripple
rippleX={rippleX} key={uniqueKey.current}
rippleY={rippleY} lifetime={TIMEOUT}
rippleS={rippleS} rippleS={rippleS}
key={uniqueKey.current} rippleX={rippleX}
lifetime={TIMEOUT} rippleY={rippleY}
/> />,
); );
return old; return old;
} });
});
uniqueKey.current += 1; uniqueKey.current += 1;
}, },
[] [],
); );
const stop = useCallback( const stop = useCallback((_event: any, cb: (state: boolean) => void) => {
(_event: any, cb: (state: boolean) => void) => { clicked.current = false;
clicked.current = false; cb(clicked.current);
cb(clicked.current);
setRipples((prevRipples: Array<JSX.Element>) => { setRipples((prevRipples: Array<JSX.Element>) => {
if (prevRipples.length > 0) { if (prevRipples.length > 0) {
const old = [...prevRipples]; const old = [...prevRipples];
old.shift(); old.shift();
return old; return old;
} }
return prevRipples; return prevRipples;
}); });
}, }, []);
[]
);
useImperativeHandle( useImperativeHandle(
ref, ref,
() => ({ () => ({
start, start,
stop, stop,
}), }),
[start, stop] [start, stop],
); );
return (
<span className={classes} id={uniqueId} ref={rippleDomain}>
<rippleAreaContext.Provider value={clicked.current}>
<Ripples>{ripples}</Ripples>
</rippleAreaContext.Provider>
</span>
);
}
);
export {rippleAreaContext, RippleArea}; return (
<span className={classes} id={uniqueId} ref={rippleDomain}>
<rippleAreaContext.Provider value={clicked.current}>
<Ripples>{ripples}</Ripples>
</rippleAreaContext.Provider>
</span>
);
});
export { rippleAreaContext, RippleArea };

View File

@ -1,22 +1,25 @@
'use client'; 'use client';
import isEmpty from './utils/utils'; import isEmpty from './utils/utils';
import {rippleProps} from './ripple.types'; import { rippleProps } from './ripple.types';
import {rippleAreaContext} from './ripple-area'; import { rippleAreaContext } from './ripple-area';
import RippleEffectBuild from './utils/ripple-effect-builder'; import RippleEffectBuild from './utils/ripple-effect-builder';
import React, { import React, {
ForwardedRef,
forwardRef,
JSX,
useCallback,
useContext,
useEffect,
useRef, useRef,
useState, useState,
useEffect,
forwardRef,
useContext,
useCallback,
ForwardedRef,
useTransition, useTransition,
JSX,
} from 'react'; } from 'react';
const Ripples = forwardRef((props: any, ref: ForwardedRef<any>) => { const Ripples = forwardRef(function Ripples(
props: any,
ref: ForwardedRef<any>,
) {
const [ripples, setRipples] = useState({}); const [ripples, setRipples] = useState({});
const firstRender = useRef<boolean>(true); const firstRender = useRef<boolean>(true);
const [pending, startTransition] = useTransition(); const [pending, startTransition] = useTransition();
@ -27,7 +30,7 @@ const Ripples = forwardRef((props: any, ref: ForwardedRef<any>) => {
} }
setRipples(state => { setRipples(state => {
const children = {...state}; const children = { ...state };
delete children[child.key]; delete children[child.key];
return children; return children;
}); });
@ -41,7 +44,7 @@ const Ripples = forwardRef((props: any, ref: ForwardedRef<any>) => {
firstRender.current = false; firstRender.current = false;
} else { } else {
setRipples( setRipples(
RippleEffectBuild(props.children, LifetimeEnd, ripples) RippleEffectBuild(props.children, LifetimeEnd, ripples),
); );
} }
}); });
@ -51,8 +54,11 @@ const Ripples = forwardRef((props: any, ref: ForwardedRef<any>) => {
return <>{Object.values(ripples)}</>; return <>{Object.values(ripples)}</>;
}); });
const Ripple = forwardRef((props: rippleProps, ref: ForwardedRef<any>) => { const Ripple = forwardRef(function Ripple(
const {rippleX, rippleY, rippleS, endLifetime, lifetime} = props; props: rippleProps,
ref: ForwardedRef<any>,
) {
const { rippleX, rippleY, rippleS, endLifetime, lifetime } = props;
const clicked = useContext<boolean>(rippleAreaContext); const clicked = useContext<boolean>(rippleAreaContext);
const [classes, setClasses] = useState<string>('m3 ripple visible'); const [classes, setClasses] = useState<string>('m3 ripple visible');
@ -77,4 +83,4 @@ const Ripple = forwardRef((props: rippleProps, ref: ForwardedRef<any>) => {
); );
}); });
export {Ripple, Ripples}; export { Ripple, Ripples };

View File

@ -1,6 +1,6 @@
import {Dispatch, SetStateAction, PropsWithChildren} from 'react'; import { Dispatch, SetStateAction } from 'react';
export interface IRippleProps { export interface IRippleProps extends PropsWithChildren<any> {
centralRipple?: boolean; centralRipple?: boolean;
} }
@ -13,7 +13,9 @@ export type rippleProps = {
rippleX: number; rippleX: number;
rippleY: number; rippleY: number;
rippleS: number; rippleS: number;
endLifetime?: any; endLifetime?: () => void;
lifetime: number; lifetime: number;
key?: number; key?: number;
}; };
import { PropsWithChildren } from 'react';

View File

@ -1,15 +1,15 @@
import {cloneElement, ReactElement} from 'react'; import { cloneElement, ReactElement } from 'react';
export default function ArrayConvertToObj( export default function ArrayConvertToObj(
obj: Object, obj: Object,
nextChildren: ReactElement[], nextChildren: ReactElement[],
callback: (child: any) => void callback: (child: any) => void,
): void { ): void {
Object.values(nextChildren).forEach( Object.values(nextChildren).forEach(
(child: JSX.Element) => (child: JSX.Element) =>
(obj[child.key] = cloneElement(child, { (obj[child.key] = cloneElement(child, {
...child.props, ...child.props,
endLifetime: callback.bind(null, child), endLifetime: callback.bind(null, child),
})) })),
); );
} }

View File

@ -1,27 +1,26 @@
import isEmpty from './utils';
import {cloneElement, ReactElement} from 'react';
import ArrayConvertToObj from './array-convert-to-obj'; import ArrayConvertToObj from './array-convert-to-obj';
import { cloneElement, ReactElement } from 'react';
import isEmpty from './utils';
export default function RippleEffectBuild( export default function RippleEffectBuild(
nextRipples: ReactElement[], nextRipples: ReactElement[],
callback: (child: any) => void, callback: (child: any) => void,
prevRipples?: any | null prevRipples?: any | null,
) { ) {
const next: object = {};
const empty: boolean = isEmpty(prevRipples); const empty: boolean = isEmpty(prevRipples);
const preparedRipples: object = empty ? {} : prevRipples; const preparedRipples: object = empty ? {} : prevRipples;
console.log(preparedRipples);
switch (empty) { switch (empty) {
case true: case true:
ArrayConvertToObj(preparedRipples, nextRipples, callback); ArrayConvertToObj(preparedRipples, nextRipples, callback);
break; break;
case false: case false:
// eslint-disable-next-line no-case-declarations
const next: object = {};
ArrayConvertToObj(next, nextRipples, callback); ArrayConvertToObj(next, nextRipples, callback);
for (const rippleKey of Object.keys(next)) { for (const rippleKey of Object.keys(next)) {
if (preparedRipples[rippleKey] === undefined) { if (preparedRipples[rippleKey] == undefined) {
preparedRipples[rippleKey] = cloneElement(next[rippleKey], { preparedRipples[rippleKey] = cloneElement(next[rippleKey], {
...next[rippleKey].props, ...next[rippleKey].props,
endLifetime: callback.bind(null, next[rippleKey]), endLifetime: callback.bind(null, next[rippleKey]),
@ -30,5 +29,6 @@ export default function RippleEffectBuild(
} }
break; break;
} }
return preparedRipples; return preparedRipples;
} }

View File

@ -1,4 +1,6 @@
export default function isEmpty(obj: Object): boolean { export default function isEmpty(obj: Object): boolean {
for (const _i in obj) return false; for (const _i in obj) {
return false;
}
return true; return true;
} }

View File

@ -1,24 +1,22 @@
import React, {ForwardedRef, forwardRef} from 'react'; 'use client';
import {switchMainProps} from './switch.types';
import {CheckBoxLayout} from '../checkbox-layout/check-box-layout'; import React, { forwardRef } from 'react';
import { SwitchMainProps } from './switch.types';
import { CheckBoxLayout } from '../checkbox-layout/check-box-layout';
/** /**
* Switch component * Switch component
** description ** description
*/ */
export const Switch = forwardRef( export const Switch = forwardRef<HTMLInputElement, SwitchMainProps>(
( ({ icon, disabled, selected = false, ...props }, ref) => (
{icon, disabled, selected = false, ...props}: switchMainProps, <div className={'m3 m3-switch-exp'} ref={ref}>
ref: ForwardedRef<HTMLInputElement>
) => (
<div className={'m3 m3-switch-exp'}>
<CheckBoxLayout <CheckBoxLayout
{...props} {...props}
ref={ref}
type={'checkbox'}
disabled={disabled}
className={`m3 ${props.className ?? ''}`.trimEnd()} className={`m3 ${props.className ?? ''}`.trimEnd()}
disabled={disabled}
type={'checkbox'}
/> />
<svg> <svg>
<rect className={'m3 m3-switch-track'} /> <rect className={'m3 m3-switch-track'} />
@ -34,5 +32,5 @@ export const Switch = forwardRef(
</g> </g>
</svg> </svg>
</div> </div>
) ),
); );

View File

@ -1,6 +1,6 @@
import {PropsWithChildren} from 'react'; import { PropsWithChildren } from 'react';
export interface switchMainProps extends PropsWithChildren<any> { export interface SwitchMainProps extends PropsWithChildren<any> {
disabled?: boolean; disabled?: boolean;
icon?: boolean; icon?: boolean;
selected?: boolean; selected?: boolean;

View File

@ -1,82 +1,96 @@
'use client'; 'use client';
import React, {useState} from 'react'; import React, { forwardRef, useState } from 'react';
import {bool, string} from 'prop-types'; import { bool, string } from 'prop-types';
import {type TextFieldInterface} from './text-field.types'; import { type TextFieldInterface } from './text-field.types';
export function TextField({ export const TextField = forwardRef<HTMLInputElement, TextFieldInterface>(
variant = 'filled', (
withAfterIcon, {
withBeforeIcon, variant = 'filled',
supportingText, withAfterIcon,
...props withBeforeIcon,
}: TextFieldInterface) { supportingText,
const [raised, setRaised] = useState<boolean>(props.placeholder ?? false); ...props
},
ref,
) => {
const [raised, setRaised] = useState<boolean>(
props.placeholder ?? false,
);
const callback = (e: any) => { const callback = (e: any): void => {
if ( if (
e.type === 'blur' && e.type === 'blur' &&
e.target.value.length === 0 && e.target.value.length === 0 &&
!props.placeholder !props.placeholder
) ) {
setRaised(false); setRaised(false);
else if (e.type === 'focus') setRaised(true); } else if (e.type === 'focus') {
}; setRaised(true);
}
};
const iconStyles = const iconStyles =
withBeforeIcon && withAfterIcon withBeforeIcon && withAfterIcon
? 'with-before-icon with-after-icon' ? 'with-before-icon with-after-icon'
: withBeforeIcon : withBeforeIcon
? 'with-before-icon' ? 'with-before-icon'
: withAfterIcon : withAfterIcon
? 'with-after-icon' ? 'with-after-icon'
: ''; : '';
return ( return (
<span> <span>
<div className={`m3 m3-text-field ${variant}`.trimEnd()}> <div className={`m3 m3-text-field ${variant}`.trimEnd()}>
{variant === 'outlined' && ( {variant === 'outlined' && (
<fieldset> <fieldset>
<legend className={raised && 'raised'}> <legend className={raised && 'raised'}>
<span>Label</span> <span>Label</span>
</legend> </legend>
</fieldset> </fieldset>
)} )}
{withBeforeIcon && ( {withBeforeIcon && (
<span className={'m3-icon icon-before'}> <span className={'m3-icon icon-before'}>
{withBeforeIcon && 'search'} {withBeforeIcon && 'search'}
</span>
)}
<input
ref={ref}
{...props}
className={`${props.className ?? ''} ${iconStyles}`.trim()}
onBlur={event => {
callback(event);
if (props.onBlur) {
props.onBlur(event);
}
}}
onFocus={event => {
callback(event);
if (props.onFocus) {
props.onFocus(event);
}
}}
/>
<label className={raised ? 'raised' : ''}>
{props.children ?? 'Label'}
</label>
<span className={'m3-text-field-state-layer'} />
{withAfterIcon && (
<span className={'m3-icon'}>
{withAfterIcon && 'cancel'}
</span>
)}
</div>
{supportingText !== '' && (
<span className={'m3-text-field-supporting-text'}>
{supportingText}
</span> </span>
)} )}
<input </span>
{...props} );
className={`${props.className ?? ''} ${iconStyles}`.trim()} },
onFocus={event => { );
callback(event);
if (props.onFocus) props.onFocus(event);
}}
onBlur={event => {
callback(event);
if (props.onBlur) props.onBlur(event);
}}
/>
<label className={raised ? 'raised' : ''}>
{props.children ?? 'Label'}
</label>
<span className={'m3-text-field-state-layer'} />
{withAfterIcon && (
<span className={'m3-icon'}>
{withAfterIcon && 'cancel'}
</span>
)}
</div>
{supportingText && (
<span className={'m3-text-field-supporting-text'}>
{supportingText}
</span>
)}
</span>
);
}
TextField.propTypes = { TextField.propTypes = {
children: string, children: string,

View File

@ -1,4 +1,4 @@
import {PropsWithChildren} from 'react'; import { PropsWithChildren } from 'react';
export interface TextFieldInterface extends PropsWithChildren<any> { export interface TextFieldInterface extends PropsWithChildren<any> {
variant: 'filled' | 'outlined'; variant: 'filled' | 'outlined';

View File

@ -1,5 +1,8 @@
button:not(.m3-fab, .m3-icon-button) { button:not(.m3-fab, .m3-icon-button) {
transition: background-color, box-shadow, 0.2s cubic-bezier(0.2, 0, 0, 1) !important; transition:
background-color,
box-shadow,
0.2s cubic-bezier(0.2, 0, 0, 1) !important;
font-family: var(--md-sys-typescale-label-large-font-family-name); font-family: var(--md-sys-typescale-label-large-font-family-name);
font-size: var(--md-sys-typescale-label-large-font-size); font-size: var(--md-sys-typescale-label-large-font-size);
font-weight: var(--md-sys-typescale-label-large-font-weight); font-weight: var(--md-sys-typescale-label-large-font-weight);
@ -22,7 +25,8 @@ button:not(.m3-fab, .m3-icon-button).m3 {
button:not(.m3-fab, .m3-icon-button).filled { button:not(.m3-fab, .m3-icon-button).filled {
background-color: var(--md-sys-color-primary); background-color: var(--md-sys-color-primary);
} }
button:not(.m3-fab, .m3-icon-button).filled, button:not(.m3-fab, .m3-icon-button).filled > svg.m3-svg-icon { button:not(.m3-fab, .m3-icon-button).filled,
button:not(.m3-fab, .m3-icon-button).filled > svg.m3-svg-icon {
color: var(--md-sys-color-on-primary); color: var(--md-sys-color-on-primary);
fill: var(--md-sys-color-on-primary); fill: var(--md-sys-color-on-primary);
} }
@ -44,7 +48,9 @@ button:not(.m3-fab, .m3-icon-button).text > svg.m3-svg-icon {
fill: var(--md-sys-color-primary); fill: var(--md-sys-color-primary);
} }
button:not(.m3-fab, .m3-icon-button).elevated { button:not(.m3-fab, .m3-icon-button).elevated {
box-shadow: 0 1px 3px 1px rgba(0, 0, 0, 0.15), 0 1px 2px 0 rgba(0, 0, 0, 0.3); box-shadow:
0 1px 3px 1px rgba(0, 0, 0, 0.15),
0 1px 2px 0 rgba(0, 0, 0, 0.3);
background-color: var(--md-sys-color-surface-container-low); background-color: var(--md-sys-color-surface-container-low);
color: var(--md-sys-color-primary); color: var(--md-sys-color-primary);
} }
@ -59,7 +65,10 @@ button:not(.m3-fab, .m3-icon-button).tonal > svg.m3-svg-icon {
fill: var(--md-sys-color-on-secondary-container); fill: var(--md-sys-color-on-secondary-container);
} }
button:not(.m3-fab, .m3-icon-button)::before { button:not(.m3-fab, .m3-icon-button)::before {
transition: background-color, box-shadow, 0.2s cubic-bezier(0.2, 0, 0, 1) !important; transition:
background-color,
box-shadow,
0.2s cubic-bezier(0.2, 0, 0, 1) !important;
content: ""; content: "";
top: 0; top: 0;
bottom: 0; bottom: 0;
@ -68,65 +77,130 @@ button:not(.m3-fab, .m3-icon-button)::before {
position: absolute; position: absolute;
background: rgba(0, 0, 0, 0); background: rgba(0, 0, 0, 0);
} }
button:not(.m3-fab, .m3-icon-button).filled > .m3.m3-ripple-domain > .m3.ripple { button:not(.m3-fab, .m3-icon-button).filled
background: color-mix(in srgb, var(--md-sys-color-on-primary) 12%, transparent); > .m3.m3-ripple-domain
> .m3.ripple {
background: color-mix(
in srgb,
var(--md-sys-color-on-primary) 12%,
transparent
);
} }
button:not(.m3-fab, .m3-icon-button):is(.outlined, .text, .elevated) > .m3.m3-ripple-domain > .m3.ripple { button:not(.m3-fab, .m3-icon-button):is(.outlined, .text, .elevated)
> .m3.m3-ripple-domain
> .m3.ripple {
background: color-mix(in srgb, var(--md-sys-color-primary) 12%, transparent); background: color-mix(in srgb, var(--md-sys-color-primary) 12%, transparent);
} }
button:not(.m3-fab, .m3-icon-button).tonal > .m3.m3-ripple-domain > .m3.ripple { button:not(.m3-fab, .m3-icon-button).tonal > .m3.m3-ripple-domain > .m3.ripple {
background: color-mix(in srgb, var(--md-sys-color-on-secondary-container) 12%, transparent); background: color-mix(
in srgb,
var(--md-sys-color-on-secondary-container) 12%,
transparent
);
} }
button:not(.m3-fab, .m3-icon-button):active:is(.filled, .tonal) { button:not(.m3-fab, .m3-icon-button):active:is(.filled, .tonal) {
box-shadow: none !important; box-shadow: none !important;
} }
button:not(.m3-fab, .m3-icon-button):active.elevated { button:not(.m3-fab, .m3-icon-button):active.elevated {
box-shadow: 0 1px 3px 1px rgba(0, 0, 0, 0.15), 0 1px 2px 0 rgba(0, 0, 0, 0.3) !important; box-shadow:
0 1px 3px 1px rgba(0, 0, 0, 0.15),
0 1px 2px 0 rgba(0, 0, 0, 0.3) !important;
} }
button:not(.m3-fab, .m3-icon-button):active.tonal::before { button:not(.m3-fab, .m3-icon-button):active.tonal::before {
background-color: color-mix(in srgb, var(--md-sys-color-on-secondary-container) 12%, transparent); background-color: color-mix(
in srgb,
var(--md-sys-color-on-secondary-container) 12%,
transparent
);
} }
button:not(.m3-fab, .m3-icon-button):focus-visible.outlined { button:not(.m3-fab, .m3-icon-button):focus-visible.outlined {
border-color: var(--md-sys-color-primary) !important; border-color: var(--md-sys-color-primary) !important;
} }
button:not(.m3-fab, .m3-icon-button):focus-visible.filled::before { button:not(.m3-fab, .m3-icon-button):focus-visible.filled::before {
background-color: color-mix(in srgb, var(--md-sys-color-on-primary) 12%, transparent); background-color: color-mix(
in srgb,
var(--md-sys-color-on-primary) 12%,
transparent
);
} }
button:not(.m3-fab, .m3-icon-button):focus-visible:is(.outlined, .text, .elevated)::before { button:not(.m3-fab, .m3-icon-button):focus-visible:is(
background-color: color-mix(in srgb, var(--md-sys-color-primary) 12%, transparent); .outlined,
.text,
.elevated
)::before {
background-color: color-mix(
in srgb,
var(--md-sys-color-primary) 12%,
transparent
);
} }
button:not(.m3-fab, .m3-icon-button):focus-visible.tonal::before { button:not(.m3-fab, .m3-icon-button):focus-visible.tonal::before {
background-color: color-mix(in srgb, var(--md-sys-color-on-secondary-container) 12%, transparent); background-color: color-mix(
in srgb,
var(--md-sys-color-on-secondary-container) 12%,
transparent
);
} }
button:not(.m3-fab, .m3-icon-button):hover:is(.filled, .tonal) { button:not(.m3-fab, .m3-icon-button):hover:is(.filled, .tonal) {
box-shadow: 0 1px 3px 1px rgba(0, 0, 0, 0.15), 0 1px 2px 0 rgba(0, 0, 0, 0.3); box-shadow:
0 1px 3px 1px rgba(0, 0, 0, 0.15),
0 1px 2px 0 rgba(0, 0, 0, 0.3);
} }
button:not(.m3-fab, .m3-icon-button):hover.elevated { button:not(.m3-fab, .m3-icon-button):hover.elevated {
box-shadow: 0 2px 6px 2px rgba(0, 0, 0, 0.15), 0 1px 2px 0 rgba(0, 0, 0, 0.3); box-shadow:
0 2px 6px 2px rgba(0, 0, 0, 0.15),
0 1px 2px 0 rgba(0, 0, 0, 0.3);
} }
button:not(.m3-fab, .m3-icon-button):hover.filled::before { button:not(.m3-fab, .m3-icon-button):hover.filled::before {
background-color: color-mix(in srgb, var(--md-sys-color-on-primary) 8%, transparent); background-color: color-mix(
in srgb,
var(--md-sys-color-on-primary) 8%,
transparent
);
} }
button:not(.m3-fab, .m3-icon-button):hover:is(.outlined, .text, .elevated)::before { button:not(.m3-fab, .m3-icon-button):hover:is(
background-color: color-mix(in srgb, var(--md-sys-color-primary) 8%, transparent); .outlined,
.text,
.elevated
)::before {
background-color: color-mix(
in srgb,
var(--md-sys-color-primary) 8%,
transparent
);
} }
button:not(.m3-fab, .m3-icon-button):hover.tonal::before { button:not(.m3-fab, .m3-icon-button):hover.tonal::before {
background-color: color-mix(in srgb, var(--md-sys-color-on-secondary-container) 8%, transparent); background-color: color-mix(
in srgb,
var(--md-sys-color-on-secondary-container) 8%,
transparent
);
} }
button:not(.m3-fab, .m3-icon-button):disabled { button:not(.m3-fab, .m3-icon-button):disabled {
pointer-events: none; pointer-events: none;
} }
button:not(.m3-fab, .m3-icon-button):disabled:is(.filled, .elevated, .tonal, .outlined, .text) { button:not(.m3-fab, .m3-icon-button):disabled:is(
.filled,
.elevated,
.tonal,
.outlined,
.text
) {
color: color-mix(in srgb, var(--md-sys-color-on-surface) 38%, transparent); color: color-mix(in srgb, var(--md-sys-color-on-surface) 38%, transparent);
} }
button:not(.m3-fab, .m3-icon-button):disabled:is(.filled, .elevated, .tonal) { button:not(.m3-fab, .m3-icon-button):disabled:is(.filled, .elevated, .tonal) {
background: color-mix(in srgb, var(--md-sys-color-on-surface) 12%, transparent); background: color-mix(
in srgb,
var(--md-sys-color-on-surface) 12%,
transparent
);
} }
button:not(.m3-fab, .m3-icon-button):disabled.elevated { button:not(.m3-fab, .m3-icon-button):disabled.elevated {
box-shadow: none; box-shadow: none;
} }
button:not(.m3-fab, .m3-icon-button):disabled.outlined { button:not(.m3-fab, .m3-icon-button):disabled.outlined {
outline: 1px solid color-mix(in srgb, var(--md-sys-color-on-surface) 12%, transparent) !important; outline: 1px solid
color-mix(in srgb, var(--md-sys-color-on-surface) 12%, transparent) !important;
} }
/*# sourceMappingURL=button.css.map */ /*# sourceMappingURL=button.css.map */

View File

@ -22,7 +22,7 @@ span.m3.m3-checkbox-ripple-layer {
height: 2.5rem; height: 2.5rem;
} }
input[type=checkbox].m3.m3-checkbox { input[type="checkbox"].m3.m3-checkbox {
appearance: none; appearance: none;
display: flex; display: flex;
align-items: center; align-items: center;
@ -37,67 +37,154 @@ input[type=checkbox].m3.m3-checkbox {
outline: 0.14rem solid var(--md-sys-color-on-surface-variant); outline: 0.14rem solid var(--md-sys-color-on-surface-variant);
transition: background-color 0.2s cubic-bezier(0.2, 0, 0, 1); transition: background-color 0.2s cubic-bezier(0.2, 0, 0, 1);
} }
input[type=checkbox].m3.m3-checkbox:is(:user-invalid:is(:checked, :indeterminate), .m3.m3-error:is(:checked, :indeterminate)) { input[type="checkbox"].m3.m3-checkbox:is(
:user-invalid:is(:checked, :indeterminate),
.m3.m3-error:is(:checked, :indeterminate)
) {
outline-color: var(--md-sys-color-error); outline-color: var(--md-sys-color-error);
background-color: var(--md-sys-color-error); background-color: var(--md-sys-color-error);
} }
input[type=checkbox].m3.m3-checkbox:is(.m3.m3-error, :user-invalid) { input[type="checkbox"].m3.m3-checkbox:is(.m3.m3-error, :user-invalid) {
outline-color: var(--md-sys-color-error); outline-color: var(--md-sys-color-error);
} }
input[type=checkbox].m3.m3-checkbox:is(:checked:is(:hover, input[type=checkbox].m3.m3-checkbox):not(.m3.m3-error, :disabled), :indeterminate:is(:hover, input[type=checkbox].m3.m3-checkbox):not(.m3.m3-error, :disabled)) { input[type="checkbox"].m3.m3-checkbox:is(
:checked:is(:hover, input[type="checkbox"].m3.m3-checkbox):not(
.m3.m3-error,
:disabled
),
:indeterminate:is(:hover, input[type="checkbox"].m3.m3-checkbox):not(
.m3.m3-error,
:disabled
)
) {
outline-color: var(--md-sys-color-primary); outline-color: var(--md-sys-color-primary);
background-color: var(--md-sys-color-primary); background-color: var(--md-sys-color-primary);
} }
input[type=checkbox].m3.m3-checkbox:disabled:is(:hover, input[type=checkbox].m3.m3-checkbox:disabled) { input[type="checkbox"].m3.m3-checkbox:disabled:is(
:hover,
input[type="checkbox"].m3.m3-checkbox:disabled
) {
opacity: 38%; opacity: 38%;
border: 2px solid var(--md-sys-color-on-surface); border: 2px solid var(--md-sys-color-on-surface);
} }
input[type=checkbox].m3.m3-checkbox:disabled:checked:is(:hover, input[type=checkbox].m3.m3-checkbox:disabled) { input[type="checkbox"].m3.m3-checkbox:disabled:checked:is(
:hover,
input[type="checkbox"].m3.m3-checkbox:disabled
) {
opacity: 38%; opacity: 38%;
background-color: var(--md-sys-color-on-surface); background-color: var(--md-sys-color-on-surface);
} }
input[type=checkbox].m3.m3-checkbox::after { input[type="checkbox"].m3.m3-checkbox::after {
line-height: 1.125rem; line-height: 1.125rem;
font-family: Material-Symbols-Outlined-Regular, sans-serif; font-family: Material-Symbols-Outlined-Regular, sans-serif;
font-weight: 700; font-weight: 700;
font-size: 1.125rem; font-size: 1.125rem;
color: var(--md-sys-color-on-primary); color: var(--md-sys-color-on-primary);
} }
input[type=checkbox].m3.m3-checkbox:checked::after { input[type="checkbox"].m3.m3-checkbox:checked::after {
content: "done"; content: "done";
} }
input[type=checkbox].m3.m3-checkbox:indeterminate::after { input[type="checkbox"].m3.m3-checkbox:indeterminate::after {
content: "check_indeterminate_small"; content: "check_indeterminate_small";
} }
input[type=checkbox].m3.m3-checkbox:hover { input[type="checkbox"].m3.m3-checkbox:hover {
outline-color: var(--md-sys-color-on-surface); outline-color: var(--md-sys-color-on-surface);
} }
input[type=checkbox].m3.m3-checkbox:not(:disabled):is(:user-invalid:is(:hover, :indeterminate:hover), .m3.m3-error:hover) + span.m3.m3-checkbox-state-layer { input[type="checkbox"].m3.m3-checkbox:not(:disabled):is(
background-color: color-mix(in srgb, var(--md-sys-color-error) 8%, transparent); :user-invalid:is(:hover, :indeterminate:hover),
.m3.m3-error:hover
)
+ span.m3.m3-checkbox-state-layer {
background-color: color-mix(
in srgb,
var(--md-sys-color-error) 8%,
transparent
);
} }
input[type=checkbox].m3.m3-checkbox:not(:disabled):is(:user-invalid:is(:active, :indeterminate:active), .m3.m3-error:active) + span.m3.m3-checkbox-state-layer { input[type="checkbox"].m3.m3-checkbox:not(:disabled):is(
background-color: color-mix(in srgb, var(--md-sys-color-error) 12%, transparent); :user-invalid:is(:active, :indeterminate:active),
.m3.m3-error:active
)
+ span.m3.m3-checkbox-state-layer {
background-color: color-mix(
in srgb,
var(--md-sys-color-error) 12%,
transparent
);
} }
input[type=checkbox].m3.m3-checkbox:not(:disabled):is(:user-invalid:is(:active, :indeterminate:active), .m3.m3-error:active) + span.m3.m3-checkbox-state-layer + span.m3-ripple-domain > .m3.ripple { input[type="checkbox"].m3.m3-checkbox:not(:disabled):is(
background-color: color-mix(in srgb, var(--md-sys-color-error) 20%, transparent); :user-invalid:is(:active, :indeterminate:active),
.m3.m3-error:active
)
+ span.m3.m3-checkbox-state-layer
+ span.m3-ripple-domain
> .m3.ripple {
background-color: color-mix(
in srgb,
var(--md-sys-color-error) 20%,
transparent
);
} }
input[type=checkbox].m3.m3-checkbox:not(:disabled):is(:checked:hover, :indeterminate:hover) + span.m3.m3-checkbox-state-layer { input[type="checkbox"].m3.m3-checkbox:not(:disabled):is(
background-color: color-mix(in srgb, var(--md-sys-color-primary) 8%, transparent); :checked:hover,
:indeterminate:hover
)
+ span.m3.m3-checkbox-state-layer {
background-color: color-mix(
in srgb,
var(--md-sys-color-primary) 8%,
transparent
);
} }
input[type=checkbox].m3.m3-checkbox:not(:disabled):is(:checked:active, :indeterminate:active) + span.m3.m3-checkbox-state-layer { input[type="checkbox"].m3.m3-checkbox:not(:disabled):is(
background-color: color-mix(in srgb, var(--md-sys-color-primary) 12%, transparent); :checked:active,
:indeterminate:active
)
+ span.m3.m3-checkbox-state-layer {
background-color: color-mix(
in srgb,
var(--md-sys-color-primary) 12%,
transparent
);
} }
input[type=checkbox].m3.m3-checkbox:not(:disabled):is(:checked:active, :indeterminate:active) + span.m3.m3-checkbox-state-layer + span.m3-ripple-domain > .m3.ripple { input[type="checkbox"].m3.m3-checkbox:not(:disabled):is(
background-color: color-mix(in srgb, var(--md-sys-color-on-surface) 20%, transparent); :checked:active,
:indeterminate:active
)
+ span.m3.m3-checkbox-state-layer
+ span.m3-ripple-domain
> .m3.ripple {
background-color: color-mix(
in srgb,
var(--md-sys-color-on-surface) 20%,
transparent
);
} }
input[type=checkbox].m3.m3-checkbox:not(:disabled):hover + span.m3-checkbox-state-layer { input[type="checkbox"].m3.m3-checkbox:not(:disabled):hover
background-color: color-mix(in srgb, var(--md-sys-color-on-surface) 8%, transparent); + span.m3-checkbox-state-layer {
background-color: color-mix(
in srgb,
var(--md-sys-color-on-surface) 8%,
transparent
);
} }
input[type=checkbox].m3.m3-checkbox:not(:disabled):active + span.m3.m3-checkbox-state-layer { input[type="checkbox"].m3.m3-checkbox:not(:disabled):active
background-color: color-mix(in srgb, var(--md-sys-color-on-surface) 12%, transparent); + span.m3.m3-checkbox-state-layer {
background-color: color-mix(
in srgb,
var(--md-sys-color-on-surface) 12%,
transparent
);
} }
input[type=checkbox].m3.m3-checkbox:not(:disabled):active + span.m3.m3-checkbox-state-layer + span.m3-ripple-domain > .m3.ripple { input[type="checkbox"].m3.m3-checkbox:not(:disabled):active
background-color: color-mix(in srgb, var(--md-sys-color-primary) 20%, transparent); + span.m3.m3-checkbox-state-layer
+ span.m3-ripple-domain
> .m3.ripple {
background-color: color-mix(
in srgb,
var(--md-sys-color-primary) 20%,
transparent
);
} }
/*# sourceMappingURL=checkbox.css.map */ /*# sourceMappingURL=checkbox.css.map */

View File

@ -9,7 +9,8 @@ hr.m3.m3-divider {
hr.m3.m3-divider.vertical { hr.m3.m3-divider.vertical {
writing-mode: tb-rl; writing-mode: tb-rl;
} }
hr.m3.m3-divider.vertical, hr.m3.m3-divider.vertical.full-width { hr.m3.m3-divider.vertical,
hr.m3.m3-divider.vertical.full-width {
height: 100%; height: 100%;
} }
hr.m3.m3-divider.vertical.inset { hr.m3.m3-divider.vertical.inset {
@ -19,7 +20,8 @@ hr.m3.m3-divider.vertical.inset {
hr.m3.m3-divider.vertical.middle-inset { hr.m3.m3-divider.vertical.middle-inset {
height: calc(100% - 32px); height: calc(100% - 32px);
} }
hr.m3.m3-divider.horizontal, hr.m3.m3-divider.horizontal.full-width { hr.m3.m3-divider.horizontal,
hr.m3.m3-divider.horizontal.full-width {
width: 100%; width: 100%;
} }
hr.m3.m3-divider.horizontal.inset { hr.m3.m3-divider.horizontal.inset {

View File

@ -1,21 +1,31 @@
.elevation-1 { .elevation-1 {
box-shadow: 0 1px 3px 1px rgba(0, 0, 0, 0.15), 0 1px 2px 0 rgba(0, 0, 0, 0.3); box-shadow:
0 1px 3px 1px rgba(0, 0, 0, 0.15),
0 1px 2px 0 rgba(0, 0, 0, 0.3);
} }
.elevation-2 { .elevation-2 {
box-shadow: 0 2px 6px 2px rgba(0, 0, 0, 0.15), 0 1px 2px 0 rgba(0, 0, 0, 0.3); box-shadow:
0 2px 6px 2px rgba(0, 0, 0, 0.15),
0 1px 2px 0 rgba(0, 0, 0, 0.3);
} }
.elevation-3 { .elevation-3 {
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 4px 8px 3px rgba(0, 0, 0, 0.15); box-shadow:
0 1px 3px 0 rgba(0, 0, 0, 0.3),
0 4px 8px 3px rgba(0, 0, 0, 0.15);
} }
.elevation-4 { .elevation-4 {
box-shadow: 0 2px 3px 0 rgba(0, 0, 0, 0.3), 0 6px 10px 4px rgba(0, 0, 0, 0.15); box-shadow:
0 2px 3px 0 rgba(0, 0, 0, 0.3),
0 6px 10px 4px rgba(0, 0, 0, 0.15);
} }
.elevation-5 { .elevation-5 {
box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.3), 0 8px 12px 6px rgba(0, 0, 0, 0.15); box-shadow:
0 4px 4px 0 rgba(0, 0, 0, 0.3),
0 8px 12px 6px rgba(0, 0, 0, 0.15);
} }
/*# sourceMappingURL=elevation.css.map */ /*# sourceMappingURL=elevation.css.map */

View File

@ -1,5 +1,8 @@
button.m3.m3-fab { button.m3.m3-fab {
transition: background-color, box-shadow, 0.2s cubic-bezier(0.2, 0, 0, 1) !important; transition:
background-color,
box-shadow,
0.2s cubic-bezier(0.2, 0, 0, 1) !important;
} }
button.m3.m3-fab > span.m3-icon { button.m3.m3-fab > span.m3-icon {
font-family: Material-Symbols-Outlined-Regular, sans-serif; font-family: Material-Symbols-Outlined-Regular, sans-serif;
@ -16,7 +19,10 @@ button.m3.m3-fab.m3 {
gap: 12px; gap: 12px;
} }
button.m3.m3-fab::before { button.m3.m3-fab::before {
transition: background-color, box-shadow, 0.2s cubic-bezier(0.2, 0, 0, 1) !important; transition:
background-color,
box-shadow,
0.2s cubic-bezier(0.2, 0, 0, 1) !important;
content: ""; content: "";
top: 0; top: 0;
bottom: 0; bottom: 0;
@ -30,7 +36,9 @@ button.m3.m3-fab.surface {
color: var(--md-sys-color-primary); color: var(--md-sys-color-primary);
} }
button.m3.m3-fab.surface:not(.without-elevation) { button.m3.m3-fab.surface:not(.without-elevation) {
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 4px 8px 3px rgba(0, 0, 0, 0.15); box-shadow:
0 1px 3px 0 rgba(0, 0, 0, 0.3),
0 4px 8px 3px rgba(0, 0, 0, 0.15);
} }
button.m3.m3-fab.surface > svg.m3-svg-icon { button.m3.m3-fab.surface > svg.m3-svg-icon {
fill: var(--md-sys-color-primary); fill: var(--md-sys-color-primary);
@ -43,39 +51,57 @@ button.m3.m3-fab.primary {
color: var(--md-sys-color-on-primary-container); color: var(--md-sys-color-on-primary-container);
} }
button.m3.m3-fab.primary:not(.without-elevation) { button.m3.m3-fab.primary:not(.without-elevation) {
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 4px 8px 3px rgba(0, 0, 0, 0.15); box-shadow:
0 1px 3px 0 rgba(0, 0, 0, 0.3),
0 4px 8px 3px rgba(0, 0, 0, 0.15);
} }
button.m3.m3-fab.primary > svg.m3-svg-icon { button.m3.m3-fab.primary > svg.m3-svg-icon {
fill: var(--md-sys-color-on-primary-container); fill: var(--md-sys-color-on-primary-container);
} }
button.m3.m3-fab.primary > .m3.m3-ripple-domain > .m3.ripple { button.m3.m3-fab.primary > .m3.m3-ripple-domain > .m3.ripple {
background: color-mix(in srgb, var(--md-sys-color-on-primary-container) 12%, transparent); background: color-mix(
in srgb,
var(--md-sys-color-on-primary-container) 12%,
transparent
);
} }
button.m3.m3-fab.secondary { button.m3.m3-fab.secondary {
background-color: var(--md-sys-color-secondary-container); background-color: var(--md-sys-color-secondary-container);
color: var(--md-sys-color-on-secondary-container); color: var(--md-sys-color-on-secondary-container);
} }
button.m3.m3-fab.secondary:not(.without-elevation) { button.m3.m3-fab.secondary:not(.without-elevation) {
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 4px 8px 3px rgba(0, 0, 0, 0.15); box-shadow:
0 1px 3px 0 rgba(0, 0, 0, 0.3),
0 4px 8px 3px rgba(0, 0, 0, 0.15);
} }
button.m3.m3-fab.secondary > svg.m3-svg-icon { button.m3.m3-fab.secondary > svg.m3-svg-icon {
fill: var(--md-sys-color-on-secondary-container); fill: var(--md-sys-color-on-secondary-container);
} }
button.m3.m3-fab.secondary > .m3.m3-ripple-domain > .m3.ripple { button.m3.m3-fab.secondary > .m3.m3-ripple-domain > .m3.ripple {
background: color-mix(in srgb, var(--md-sys-color-on-secondary-container) 12%, transparent); background: color-mix(
in srgb,
var(--md-sys-color-on-secondary-container) 12%,
transparent
);
} }
button.m3.m3-fab.tertiary { button.m3.m3-fab.tertiary {
background-color: var(--md-sys-color-tertiary-container); background-color: var(--md-sys-color-tertiary-container);
color: var(--md-sys-color-on-tertiary-container); color: var(--md-sys-color-on-tertiary-container);
} }
button.m3.m3-fab.tertiary:not(.without-elevation) { button.m3.m3-fab.tertiary:not(.without-elevation) {
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 4px 8px 3px rgba(0, 0, 0, 0.15); box-shadow:
0 1px 3px 0 rgba(0, 0, 0, 0.3),
0 4px 8px 3px rgba(0, 0, 0, 0.15);
} }
button.m3.m3-fab.tertiary > svg.m3-svg-icon { button.m3.m3-fab.tertiary > svg.m3-svg-icon {
fill: var(--md-sys-color-on-tertiary-container); fill: var(--md-sys-color-on-tertiary-container);
} }
button.m3.m3-fab.tertiary > .m3.m3-ripple-domain > .m3.ripple { button.m3.m3-fab.tertiary > .m3.m3-ripple-domain > .m3.ripple {
background: color-mix(in srgb, var(--md-sys-color-on-tertiary-container) 12%, transparent); background: color-mix(
in srgb,
var(--md-sys-color-on-tertiary-container) 12%,
transparent
);
} }
button.m3.m3-fab.m3-small-fab { button.m3.m3-fab.m3-small-fab {
width: 40px; width: 40px;
@ -105,35 +131,81 @@ button.m3.m3-fab.m3-extended-fab {
padding: 19px; padding: 19px;
font-size: 24px; font-size: 24px;
} }
button.m3.m3-fab:not(.without-elevation):is(.surface, .primary, .secondary, .tertiary):hover { button.m3.m3-fab:not(.without-elevation):is(
box-shadow: 0 2px 3px 0 rgba(0, 0, 0, 0.3), 0 6px 10px 4px rgba(0, 0, 0, 0.15); .surface,
.primary,
.secondary,
.tertiary
):hover {
box-shadow:
0 2px 3px 0 rgba(0, 0, 0, 0.3),
0 6px 10px 4px rgba(0, 0, 0, 0.15);
} }
button.m3.m3-fab:not(.without-elevation):is(.surface, .primary, .secondary, .tertiary):active { button.m3.m3-fab:not(.without-elevation):is(
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 4px 8px 3px rgba(0, 0, 0, 0.15) !important; .surface,
.primary,
.secondary,
.tertiary
):active {
box-shadow:
0 1px 3px 0 rgba(0, 0, 0, 0.3),
0 4px 8px 3px rgba(0, 0, 0, 0.15) !important;
} }
button.m3.m3-fab:hover.surface::before { button.m3.m3-fab:hover.surface::before {
background-color: color-mix(in srgb, var(--md-sys-color-primary) 8%, transparent); background-color: color-mix(
in srgb,
var(--md-sys-color-primary) 8%,
transparent
);
} }
button.m3.m3-fab:hover.primary::before { button.m3.m3-fab:hover.primary::before {
background-color: color-mix(in srgb, var(--md-sys-color-on-primary-container) 8%, transparent); background-color: color-mix(
in srgb,
var(--md-sys-color-on-primary-container) 8%,
transparent
);
} }
button.m3.m3-fab:hover.secondary::before { button.m3.m3-fab:hover.secondary::before {
background-color: color-mix(in srgb, var(--md-sys-color-on-secondary-container) 8%, transparent); background-color: color-mix(
in srgb,
var(--md-sys-color-on-secondary-container) 8%,
transparent
);
} }
button.m3.m3-fab:hover.tertiary::before { button.m3.m3-fab:hover.tertiary::before {
background-color: color-mix(in srgb, var(--md-sys-color-on-tertiary-container) 8%, transparent); background-color: color-mix(
in srgb,
var(--md-sys-color-on-tertiary-container) 8%,
transparent
);
} }
button.m3.m3-fab:focus-visible.surface::before { button.m3.m3-fab:focus-visible.surface::before {
background-color: color-mix(in srgb, var(--md-sys-color-primary) 12%, transparent); background-color: color-mix(
in srgb,
var(--md-sys-color-primary) 12%,
transparent
);
} }
button.m3.m3-fab:focus-visible.primary::before { button.m3.m3-fab:focus-visible.primary::before {
background-color: color-mix(in srgb, var(--md-sys-color-on-primary-container) 12%, transparent); background-color: color-mix(
in srgb,
var(--md-sys-color-on-primary-container) 12%,
transparent
);
} }
button.m3.m3-fab:focus-visible.secondary::before { button.m3.m3-fab:focus-visible.secondary::before {
background-color: color-mix(in srgb, var(--md-sys-color-on-secondary-container) 12%, transparent); background-color: color-mix(
in srgb,
var(--md-sys-color-on-secondary-container) 12%,
transparent
);
} }
button.m3.m3-fab:focus-visible.tertiary::before { button.m3.m3-fab:focus-visible.tertiary::before {
background-color: color-mix(in srgb, var(--md-sys-color-on-tertiary-container) 12%, transparent); background-color: color-mix(
in srgb,
var(--md-sys-color-on-tertiary-container) 12%,
transparent
);
} }
/*# sourceMappingURL=fabs.css.map */ /*# sourceMappingURL=fabs.css.map */

View File

@ -6,23 +6,32 @@ The recommended way to use the Material Icons font is by linking to the web font
```html ```html
<!-- https://material.io/resources/icons/?style=baseline --> <!-- https://material.io/resources/icons/?style=baseline -->
<link href="https://fonts.googleapis.com/css2?family=Material+Icons" <link
rel="stylesheet"> href="https://fonts.googleapis.com/css2?family=Material+Icons"
rel="stylesheet"
/>
<!-- https://material.io/resources/icons/?style=outline --> <!-- https://material.io/resources/icons/?style=outline -->
<link href="https://fonts.googleapis.com/css2?family=Material+Icons+Outlined" <link
rel="stylesheet"> href="https://fonts.googleapis.com/css2?family=Material+Icons+Outlined"
rel="stylesheet"
/>
<!-- https://material.io/resources/icons/?style=round --> <!-- https://material.io/resources/icons/?style=round -->
<link href="https://fonts.googleapis.com/css2?family=Material+Icons+Round" <link
rel="stylesheet"> href="https://fonts.googleapis.com/css2?family=Material+Icons+Round"
rel="stylesheet"
/>
<!-- https://material.io/resources/icons/?style=sharp --> <!-- https://material.io/resources/icons/?style=sharp -->
<link href="https://fonts.googleapis.com/css2?family=Material+Icons+Sharp" <link
rel="stylesheet"> href="https://fonts.googleapis.com/css2?family=Material+Icons+Sharp"
rel="stylesheet"
/>
<!-- https://material.io/resources/icons/?style=twotone --> <!-- https://material.io/resources/icons/?style=twotone -->
<link href="https://fonts.googleapis.com/css2?family=Material+Icons+Two+Tone" <link
rel="stylesheet"> href="https://fonts.googleapis.com/css2?family=Material+Icons+Two+Tone"
rel="stylesheet"
/>
``` ```

View File

@ -1,17 +1,20 @@
@font-face { @font-face {
font-family: Material-Symbols-Rounded-Regular; font-family: Material-Symbols-Rounded-Regular;
src: url("./font/MaterialSymbolsRounded[FILL,GRAD,opsz,wght].ttf"); src: url("./font/MaterialSymbolsRounded[FILL,GRAD,opsz,wght].ttf");
src: url("./font/MaterialSymbolsRounded[FILL,GRAD,opsz,wght].woff2") format("woff2"); src: url("./font/MaterialSymbolsRounded[FILL,GRAD,opsz,wght].woff2")
format("woff2");
} }
@font-face { @font-face {
font-family: Material-Symbols-Outlined-Regular; font-family: Material-Symbols-Outlined-Regular;
src: url("./font/MaterialSymbolsOutlined[FILL,GRAD,opsz,wght].ttf"); src: url("./font/MaterialSymbolsOutlined[FILL,GRAD,opsz,wght].ttf");
src: url("./font/MaterialSymbolsOutlined[FILL,GRAD,opsz,wght].woff2") format("woff2"); src: url("./font/MaterialSymbolsOutlined[FILL,GRAD,opsz,wght].woff2")
format("woff2");
} }
@font-face { @font-face {
font-family: Material-Symbols-Sharp-Regular; font-family: Material-Symbols-Sharp-Regular;
src: url("./font/MaterialSymbolsSharp[FILL,GRAD,opsz,wght].ttf"); src: url("./font/MaterialSymbolsSharp[FILL,GRAD,opsz,wght].ttf");
src: url("./font/MaterialSymbolsSharp[FILL,GRAD,opsz,wght].woff2") format("woff2"); src: url("./font/MaterialSymbolsSharp[FILL,GRAD,opsz,wght].woff2")
format("woff2");
} }
@font-face { @font-face {
font-family: Roboto; font-family: Roboto;

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,8 @@
button.m3.m3-icon-button { button.m3.m3-icon-button {
transition: background-color, box-shadow, 0.2s cubic-bezier(0.2, 0, 0, 1) !important; transition:
background-color,
box-shadow,
0.2s cubic-bezier(0.2, 0, 0, 1) !important;
contain: content; contain: content;
border-radius: 50%; border-radius: 50%;
position: relative; position: relative;
@ -13,7 +16,10 @@ button.m3.m3-icon-button {
padding: 0; padding: 0;
} }
button.m3.m3-icon-button::before { button.m3.m3-icon-button::before {
transition: background-color, box-shadow, 0.2s cubic-bezier(0.2, 0, 0, 1) !important; transition:
background-color,
box-shadow,
0.2s cubic-bezier(0.2, 0, 0, 1) !important;
content: ""; content: "";
width: 100%; width: 100%;
height: 100%; height: 100%;
@ -22,14 +28,24 @@ button.m3.m3-icon-button::before {
button.m3.m3-icon-button > span.m3-icon { button.m3.m3-icon-button > span.m3-icon {
z-index: 25; z-index: 25;
font-size: 2em; font-size: 2em;
font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 48; font-variation-settings:
"FILL" 0,
"wght" 500,
"GRAD" 0,
"opsz" 48;
} }
button.m3.m3-icon-button.default { button.m3.m3-icon-button.default {
fill: var(--md-sys-color-on-surface-variant); fill: var(--md-sys-color-on-surface-variant);
background-color: rgba(0, 0, 0, 0); background-color: rgba(0, 0, 0, 0);
} }
button.m3.m3-icon-button.default:disabled, button.m3.m3-icon-button.default.selected:disabled, button.m3.m3-icon-button.default.selected.toggled:disabled { button.m3.m3-icon-button.default:disabled,
fill: color-mix(in srgb, var(--md-sys-color-on-surface-variant) 38%, transparent); button.m3.m3-icon-button.default.selected:disabled,
button.m3.m3-icon-button.default.selected.toggled:disabled {
fill: color-mix(
in srgb,
var(--md-sys-color-on-surface-variant) 38%,
transparent
);
background-color: rgba(0, 0, 0, 0); background-color: rgba(0, 0, 0, 0);
} }
button.m3.m3-icon-button.default.selected.toggled { button.m3.m3-icon-button.default.selected.toggled {
@ -51,13 +67,18 @@ button.m3.m3-icon-button.tonal.toggled {
fill: var(--md-sys-color-on-surface-variant); fill: var(--md-sys-color-on-surface-variant);
background-color: var(--md-sys-color-surface-container-highest); background-color: var(--md-sys-color-surface-container-highest);
} }
button.m3.m3-icon-button.tonal.selected.toggled, button.m3.m3-icon-button.tonal { button.m3.m3-icon-button.tonal.selected.toggled,
button.m3.m3-icon-button.tonal {
fill: var(--md-sys-color-on-secondary-container); fill: var(--md-sys-color-on-secondary-container);
background-color: var(--md-sys-color-secondary-container); background-color: var(--md-sys-color-secondary-container);
} }
button.m3.m3-icon-button:is(.tonal, .filled, .toggled.selected):disabled { button.m3.m3-icon-button:is(.tonal, .filled, .toggled.selected):disabled {
fill: color-mix(in srgb, var(--md-sys-color-on-surface) 38%, transparent); fill: color-mix(in srgb, var(--md-sys-color-on-surface) 38%, transparent);
background-color: color-mix(in srgb, var(--md-sys-color-on-surface) 12%, transparent); background-color: color-mix(
in srgb,
var(--md-sys-color-on-surface) 12%,
transparent
);
} }
button.m3.m3-icon-button.outlined { button.m3.m3-icon-button.outlined {
border: 1px solid var(--md-sys-color-outline); border: 1px solid var(--md-sys-color-outline);
@ -65,70 +86,183 @@ button.m3.m3-icon-button.outlined {
background-color: rgba(0, 0, 0, 0); background-color: rgba(0, 0, 0, 0);
} }
button.m3.m3-icon-button.outlined:disabled { button.m3.m3-icon-button.outlined:disabled {
border: 1px solid color-mix(in srgb, var(--md-sys-color-outline) 12%, transparent); border: 1px solid
fill: color-mix(in srgb, var(--md-sys-color-on-surface-variant) 38%, transparent); color-mix(in srgb, var(--md-sys-color-outline) 12%, transparent);
fill: color-mix(
in srgb,
var(--md-sys-color-on-surface-variant) 38%,
transparent
);
background-color: rgba(0, 0, 0, 0); background-color: rgba(0, 0, 0, 0);
} }
button.m3.m3-icon-button.outlined.toggled.selected:disabled { button.m3.m3-icon-button.outlined.toggled.selected:disabled {
border: 1px solid color-mix(in srgb, var(--md-sys-color-outline) 0%, transparent); border: 1px solid
color-mix(in srgb, var(--md-sys-color-outline) 0%, transparent);
fill: color-mix(in srgb, var(--md-sys-color-on-surface) 38%, transparent); fill: color-mix(in srgb, var(--md-sys-color-on-surface) 38%, transparent);
background-color: color-mix(in srgb, var(--md-sys-color-on-surface) 12%, transparent); background-color: color-mix(
in srgb,
var(--md-sys-color-on-surface) 12%,
transparent
);
} }
button.m3.m3-icon-button.outlined.selected.toggled { button.m3.m3-icon-button.outlined.selected.toggled {
border: 1px solid rgba(0, 0, 0, 0); border: 1px solid rgba(0, 0, 0, 0);
background-color: var(--md-sys-color-inverse-surface); background-color: var(--md-sys-color-inverse-surface);
fill: var(--md-sys-color-inverse-on-surface); fill: var(--md-sys-color-inverse-on-surface);
} }
button.m3.m3-icon-button.filled:not(:disabled) > .m3.m3-ripple-domain > .m3.ripple, button.m3.m3-icon-button.filled:not(:disabled).selected.toggled > .m3.m3-ripple-domain > .m3.ripple { button.m3.m3-icon-button.filled:not(:disabled)
background-color: color-mix(in srgb, var(--md-sys-color-on-primary) 12%, transparent); > .m3.m3-ripple-domain
> .m3.ripple,
button.m3.m3-icon-button.filled:not(:disabled).selected.toggled
> .m3.m3-ripple-domain
> .m3.ripple {
background-color: color-mix(
in srgb,
var(--md-sys-color-on-primary) 12%,
transparent
);
} }
button.m3.m3-icon-button.filled:not(:disabled).toggled > .m3.m3-ripple-domain > .m3.ripple { button.m3.m3-icon-button.filled:not(:disabled).toggled
background-color: color-mix(in srgb, var(--md-sys-color-primary) 12%, transparent); > .m3.m3-ripple-domain
> .m3.ripple {
background-color: color-mix(
in srgb,
var(--md-sys-color-primary) 12%,
transparent
);
} }
button.m3.m3-icon-button:is(.outlined, .default):not(:disabled) > .m3.m3-ripple-domain > .m3.ripple { button.m3.m3-icon-button:is(.outlined, .default):not(:disabled)
background-color: color-mix(in srgb, var(--md-sys-color-on-surface-variant) 12%, transparent); > .m3.m3-ripple-domain
> .m3.ripple {
background-color: color-mix(
in srgb,
var(--md-sys-color-on-surface-variant) 12%,
transparent
);
} }
button.m3.m3-icon-button:is(.outlined, .default):not(:disabled):not(.outlined).toggled.selected > .m3.m3-ripple-domain > .m3.ripple { button.m3.m3-icon-button:is(.outlined, .default):not(:disabled):not(
background-color: color-mix(in srgb, var(--md-sys-color-primary) 12%, transparent); .outlined
).toggled.selected
> .m3.m3-ripple-domain
> .m3.ripple {
background-color: color-mix(
in srgb,
var(--md-sys-color-primary) 12%,
transparent
);
} }
button.m3.m3-icon-button:is(.outlined, .default):not(:disabled):not(.default).toggled.selected > .m3.m3-ripple-domain > .m3.ripple { button.m3.m3-icon-button:is(.outlined, .default):not(:disabled):not(
background-color: color-mix(in srgb, var(--md-sys-color-inverse-on-surface) 12%, transparent); .default
).toggled.selected
> .m3.m3-ripple-domain
> .m3.ripple {
background-color: color-mix(
in srgb,
var(--md-sys-color-inverse-on-surface) 12%,
transparent
);
} }
button.m3.m3-icon-button.tonal:not(:disabled) > .m3.m3-ripple-domain > .m3.ripple, button.m3.m3-icon-button.tonal:not(:disabled).selected.toggled > .m3.m3-ripple-domain > .m3.ripple { button.m3.m3-icon-button.tonal:not(:disabled)
background-color: color-mix(in srgb, var(--md-sys-color-on-secondary-container) 12%, transparent); > .m3.m3-ripple-domain
> .m3.ripple,
button.m3.m3-icon-button.tonal:not(:disabled).selected.toggled
> .m3.m3-ripple-domain
> .m3.ripple {
background-color: color-mix(
in srgb,
var(--md-sys-color-on-secondary-container) 12%,
transparent
);
} }
button.m3.m3-icon-button.tonal:not(:disabled).toggled > .m3.m3-ripple-domain > .m3.ripple { button.m3.m3-icon-button.tonal:not(:disabled).toggled
background-color: color-mix(in srgb, var(--md-sys-color-on-surface-variant) 12%, transparent); > .m3.m3-ripple-domain
> .m3.ripple {
background-color: color-mix(
in srgb,
var(--md-sys-color-on-surface-variant) 12%,
transparent
);
} }
button.m3.m3-icon-button:hover:not(:disabled):is(.default, .outlined)::before { button.m3.m3-icon-button:hover:not(:disabled):is(.default, .outlined)::before {
background-color: color-mix(in srgb, var(--md-sys-color-on-surface-variant) 8%, transparent); background-color: color-mix(
in srgb,
var(--md-sys-color-on-surface-variant) 8%,
transparent
);
} }
button.m3.m3-icon-button:hover:not(:disabled).filled::before, button.m3.m3-icon-button:hover:not(:disabled).filled.toggled.selected::before { button.m3.m3-icon-button:hover:not(:disabled).filled::before,
background-color: color-mix(in srgb, var(--md-sys-color-on-primary) 8%, transparent); button.m3.m3-icon-button:hover:not(:disabled).filled.toggled.selected::before {
background-color: color-mix(
in srgb,
var(--md-sys-color-on-primary) 8%,
transparent
);
} }
button.m3.m3-icon-button:hover:not(:disabled).filled.toggled::before { button.m3.m3-icon-button:hover:not(:disabled).filled.toggled::before {
background-color: color-mix(in srgb, var(--md-sys-color-primary) 8%, transparent); background-color: color-mix(
in srgb,
var(--md-sys-color-primary) 8%,
transparent
);
} }
button.m3.m3-icon-button:hover:not(:disabled).tonal::before, button.m3.m3-icon-button:hover:not(:disabled).tonal.toggled.selected::before { button.m3.m3-icon-button:hover:not(:disabled).tonal::before,
background-color: color-mix(in srgb, var(--md-sys-color-on-secondary-container) 8%, transparent); button.m3.m3-icon-button:hover:not(:disabled).tonal.toggled.selected::before {
background-color: color-mix(
in srgb,
var(--md-sys-color-on-secondary-container) 8%,
transparent
);
} }
button.m3.m3-icon-button:hover:not(:disabled).tonal.toggled::before { button.m3.m3-icon-button:hover:not(:disabled).tonal.toggled::before {
background-color: color-mix(in srgb, var(--md-sys-color-on-surface-variant) 8%, transparent); background-color: color-mix(
in srgb,
var(--md-sys-color-on-surface-variant) 8%,
transparent
);
} }
button.m3.m3-icon-button:focus-visible:not(:disabled):is(.default, .outlined)::before { button.m3.m3-icon-button:focus-visible:not(:disabled):is(
background-color: color-mix(in srgb, var(--md-sys-color-on-surface-variant) 12%, transparent); .default,
.outlined
)::before {
background-color: color-mix(
in srgb,
var(--md-sys-color-on-surface-variant) 12%,
transparent
);
} }
button.m3.m3-icon-button:focus-visible:not(:disabled).filled::before, button.m3.m3-icon-button:focus-visible:not(:disabled).filled.toggled.selected::before { button.m3.m3-icon-button:focus-visible:not(:disabled).filled::before,
background-color: color-mix(in srgb, var(--md-sys-color-on-primary) 12%, transparent); button.m3.m3-icon-button:focus-visible:not(
:disabled
).filled.toggled.selected::before {
background-color: color-mix(
in srgb,
var(--md-sys-color-on-primary) 12%,
transparent
);
} }
button.m3.m3-icon-button:focus-visible:not(:disabled).filled.toggled::before { button.m3.m3-icon-button:focus-visible:not(:disabled).filled.toggled::before {
background-color: color-mix(in srgb, var(--md-sys-color-primary) 12%, transparent); background-color: color-mix(
in srgb,
var(--md-sys-color-primary) 12%,
transparent
);
} }
button.m3.m3-icon-button:focus-visible:not(:disabled).tonal::before, button.m3.m3-icon-button:focus-visible:not(:disabled).tonal.toggled.selected::before { button.m3.m3-icon-button:focus-visible:not(:disabled).tonal::before,
background-color: color-mix(in srgb, var(--md-sys-color-on-secondary-container) 12%, transparent); button.m3.m3-icon-button:focus-visible:not(
:disabled
).tonal.toggled.selected::before {
background-color: color-mix(
in srgb,
var(--md-sys-color-on-secondary-container) 12%,
transparent
);
} }
button.m3.m3-icon-button:focus-visible:not(:disabled).tonal.toggled::before { button.m3.m3-icon-button:focus-visible:not(:disabled).tonal.toggled::before {
background-color: color-mix(in srgb, var(--md-sys-color-on-surface-variant) 12%, transparent); background-color: color-mix(
in srgb,
var(--md-sys-color-on-surface-variant) 12%,
transparent
);
} }
/*# sourceMappingURL=icon-button.css.map */ /*# sourceMappingURL=icon-button.css.map */

View File

@ -1,3 +1 @@
/*# sourceMappingURL=m3-mixins.css.map */ /*# sourceMappingURL=m3-mixins.css.map */

View File

@ -13,7 +13,7 @@ label.m3.m3-radio-label > span.m3.m3-radio-state-layer {
transition: background-color 0.2s cubic-bezier(0.2, 0, 0, 1); transition: background-color 0.2s cubic-bezier(0.2, 0, 0, 1);
} }
input[type=radio].m3.m3-radio { input[type="radio"].m3.m3-radio {
appearance: none; appearance: none;
display: flex; display: flex;
align-items: center; align-items: center;
@ -26,44 +26,90 @@ input[type=radio].m3.m3-radio {
border: 2px solid var(--md-sys-color-on-surface-variant); border: 2px solid var(--md-sys-color-on-surface-variant);
transition: background-color 0.2s cubic-bezier(0.2, 0, 0, 1); transition: background-color 0.2s cubic-bezier(0.2, 0, 0, 1);
} }
input[type=radio].m3.m3-radio::after { input[type="radio"].m3.m3-radio::after {
content: ""; content: "";
width: 10px; width: 10px;
aspect-ratio: 1; aspect-ratio: 1;
border-radius: 50%; border-radius: 50%;
} }
input[type=radio].m3.m3-radio:disabled { input[type="radio"].m3.m3-radio:disabled {
border: 2px solid color-mix(in srgb, var(--md-sys-color-on-surface) 38%, transparent); border: 2px solid
color-mix(in srgb, var(--md-sys-color-on-surface) 38%, transparent);
} }
input[type=radio].m3.m3-radio:checked { input[type="radio"].m3.m3-radio:checked {
border: 2px solid var(--md-sys-color-primary); border: 2px solid var(--md-sys-color-primary);
} }
input[type=radio].m3.m3-radio:checked::after { input[type="radio"].m3.m3-radio:checked::after {
background-color: var(--md-sys-color-primary); background-color: var(--md-sys-color-primary);
} }
input[type=radio].m3.m3-radio:checked:disabled { input[type="radio"].m3.m3-radio:checked:disabled {
border: 2px solid color-mix(in srgb, var(--md-sys-color-on-surface) 38%, transparent); border: 2px solid
color-mix(in srgb, var(--md-sys-color-on-surface) 38%, transparent);
} }
input[type=radio].m3.m3-radio:checked:disabled::after { input[type="radio"].m3.m3-radio:checked:disabled::after {
background-color: color-mix(in srgb, var(--md-sys-color-on-surface) 38%, transparent); background-color: color-mix(
in srgb,
var(--md-sys-color-on-surface) 38%,
transparent
);
} }
input[type=radio].m3.m3-radio:not(:disabled):checked:hover + span.m3.m3-radio-state-layer { input[type="radio"].m3.m3-radio:not(:disabled):checked:hover
background-color: color-mix(in srgb, var(--md-sys-color-primary) 8%, transparent); + span.m3.m3-radio-state-layer {
background-color: color-mix(
in srgb,
var(--md-sys-color-primary) 8%,
transparent
);
} }
input[type=radio].m3.m3-radio:not(:disabled):is(:checked:active, :indeterminate:active) + span.m3.m3-radio-state-layer { input[type="radio"].m3.m3-radio:not(:disabled):is(
background-color: color-mix(in srgb, var(--md-sys-color-primary) 12%, transparent); :checked:active,
:indeterminate:active
)
+ span.m3.m3-radio-state-layer {
background-color: color-mix(
in srgb,
var(--md-sys-color-primary) 12%,
transparent
);
} }
input[type=radio].m3.m3-radio:not(:disabled):is(:checked:active, :indeterminate:active) + span.m3.m3-radio-state-layer + span.m3-ripple-domain > .m3.ripple { input[type="radio"].m3.m3-radio:not(:disabled):is(
background-color: color-mix(in srgb, var(--md-sys-color-on-surface) 20%, transparent); :checked:active,
:indeterminate:active
)
+ span.m3.m3-radio-state-layer
+ span.m3-ripple-domain
> .m3.ripple {
background-color: color-mix(
in srgb,
var(--md-sys-color-on-surface) 20%,
transparent
);
} }
input[type=radio].m3.m3-radio:not(:disabled):hover + span.m3.m3-radio-state-layer { input[type="radio"].m3.m3-radio:not(:disabled):hover
background-color: color-mix(in srgb, var(--md-sys-color-on-surface) 8%, transparent); + span.m3.m3-radio-state-layer {
background-color: color-mix(
in srgb,
var(--md-sys-color-on-surface) 8%,
transparent
);
} }
input[type=radio].m3.m3-radio:not(:disabled):active + span.m3.m3-radio-state-layer { input[type="radio"].m3.m3-radio:not(:disabled):active
background-color: color-mix(in srgb, var(--md-sys-color-on-surface) 12%, transparent); + span.m3.m3-radio-state-layer {
background-color: color-mix(
in srgb,
var(--md-sys-color-on-surface) 12%,
transparent
);
} }
input[type=radio].m3.m3-radio:not(:disabled):active + span.m3.m3-radio-state-layer + span.m3-ripple-domain > .m3.ripple { input[type="radio"].m3.m3-radio:not(:disabled):active
background-color: color-mix(in srgb, var(--md-sys-color-primary) 20%, transparent); + span.m3.m3-radio-state-layer
+ span.m3-ripple-domain
> .m3.ripple {
background-color: color-mix(
in srgb,
var(--md-sys-color-primary) 20%,
transparent
);
} }
/*# sourceMappingURL=radio.css.map */ /*# sourceMappingURL=radio.css.map */

View File

@ -18,7 +18,11 @@
animation-name: rippleAppearanceAnimation; animation-name: rippleAppearanceAnimation;
animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1); animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
animation-duration: 0.55s; animation-duration: 0.55s;
transition: opacity, background, background-color, 0.55s cubic-bezier(0.4, 0, 0.2, 1); transition:
opacity,
background,
background-color,
0.55s cubic-bezier(0.4, 0, 0.2, 1);
} }
.m3.ripple.visible { .m3.ripple.visible {
opacity: 1 !important; opacity: 1 !important;

View File

@ -21,7 +21,8 @@ div.m3.m3-switch-exp > svg > g > text {
font-family: Material-Symbols-Outlined-Regular; font-family: Material-Symbols-Outlined-Regular;
font-size: 20px; font-size: 20px;
} }
div.m3.m3-switch-exp > svg > circle.m3.m3-switch-handler-state-layer, div.m3.m3-switch-exp > svg > circle.m3.m3-switch-handler { div.m3.m3-switch-exp > svg > circle.m3.m3-switch-handler-state-layer,
div.m3.m3-switch-exp > svg > circle.m3.m3-switch-handler {
transition: 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275); transition: 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
cy: 50%; cy: 50%;
cx: 16px; cx: 16px;
@ -53,72 +54,136 @@ div.m3.m3-switch-exp > input.m3 {
div.m3.m3-switch-exp > input.m3:disabled { div.m3.m3-switch-exp > input.m3:disabled {
cursor: not-allowed; cursor: not-allowed;
} }
div.m3.m3-switch-exp > input.m3:not(:checked, :disabled) + svg > circle.m3.m3-switch-handler { div.m3.m3-switch-exp
> input.m3:not(:checked, :disabled)
+ svg
> circle.m3.m3-switch-handler {
fill: var(--md-sys-color-outline); fill: var(--md-sys-color-outline);
} }
div.m3.m3-switch-exp > input.m3:checked:not(:disabled) + svg > g { div.m3.m3-switch-exp > input.m3:checked:not(:disabled) + svg > g {
transform: translate(50%, 81%); transform: translate(50%, 81%);
} }
div.m3.m3-switch-exp > input.m3:checked:not(:disabled) + svg > circle.m3.m3-switch-handler { div.m3.m3-switch-exp
> input.m3:checked:not(:disabled)
+ svg
> circle.m3.m3-switch-handler {
fill: var(--md-sys-color-on-primary); fill: var(--md-sys-color-on-primary);
} }
div.m3.m3-switch-exp > input.m3:not(:disabled) + svg > g > text.m3.m3-icon-unchecked { div.m3.m3-switch-exp
> input.m3:not(:disabled)
+ svg
> g
> text.m3.m3-icon-unchecked {
fill: var(--md-sys-color-on-primary); fill: var(--md-sys-color-on-primary);
} }
div.m3.m3-switch-exp > input.m3:not(:disabled) + svg > g > text.m3.m3-icon-checked { div.m3.m3-switch-exp
> input.m3:not(:disabled)
+ svg
> g
> text.m3.m3-icon-checked {
fill: var(--md-sys-color-on-primary-container); fill: var(--md-sys-color-on-primary-container);
} }
div.m3.m3-switch-exp > input.m3:checked:disabled + svg > circle.m3.m3-switch-handler { div.m3.m3-switch-exp
> input.m3:checked:disabled
+ svg
> circle.m3.m3-switch-handler {
fill: var(--md-sys-color-surface); fill: var(--md-sys-color-surface);
} }
div.m3.m3-switch-exp > input.m3:checked + svg > circle.m3.m3-switch-handler, div.m3.m3-switch-exp > input.m3 + svg:has(text.m3.m3-icon-unchecked) > circle.m3.m3-switch-handler { div.m3.m3-switch-exp > input.m3:checked + svg > circle.m3.m3-switch-handler,
div.m3.m3-switch-exp
> input.m3
+ svg:has(text.m3.m3-icon-unchecked)
> circle.m3.m3-switch-handler {
r: 12px; r: 12px;
} }
div.m3.m3-switch-exp > input.m3:checked + svg > g > text.m3.m3-icon-unchecked { div.m3.m3-switch-exp > input.m3:checked + svg > g > text.m3.m3-icon-unchecked {
opacity: 0; opacity: 0;
} }
div.m3.m3-switch-exp > input.m3:checked + svg > circle.m3:is(.m3-switch-handler, .m3-switch-handler-state-layer) { div.m3.m3-switch-exp
> input.m3:checked
+ svg
> circle.m3:is(.m3-switch-handler, .m3-switch-handler-state-layer) {
cx: calc(100% - 16px); cx: calc(100% - 16px);
} }
div.m3.m3-switch-exp > input.m3:not(:checked) + svg > g > text.m3.m3-icon-checked { div.m3.m3-switch-exp
> input.m3:not(:checked)
+ svg
> g
> text.m3.m3-icon-checked {
opacity: 0; opacity: 0;
} }
div.m3.m3-switch-exp > input.m3:is(div.m3.m3-switch-exp > input.m3:checked, div.m3.m3-switch-exp > input.m3):not(:disabled):active + svg > circle.m3.m3-switch-handler { div.m3.m3-switch-exp
> input.m3:is(
div.m3.m3-switch-exp > input.m3:checked,
div.m3.m3-switch-exp > input.m3
):not(:disabled):active
+ svg
> circle.m3.m3-switch-handler {
r: 14px; r: 14px;
} }
div.m3.m3-switch-exp > input.m3:not(:checked):disabled + svg > circle.m3.m3-switch-handler { div.m3.m3-switch-exp
> input.m3:not(:checked):disabled
+ svg
> circle.m3.m3-switch-handler {
fill: var(--md-sys-color-on-surface); fill: var(--md-sys-color-on-surface);
fill-opacity: 38%; fill-opacity: 38%;
} }
div.m3.m3-switch-exp > input.m3:hover:not(:disabled):checked + svg > circle.m3.m3-switch-handler { div.m3.m3-switch-exp
> input.m3:hover:not(:disabled):checked
+ svg
> circle.m3.m3-switch-handler {
fill: var(--md-sys-color-primary-container); fill: var(--md-sys-color-primary-container);
} }
div.m3.m3-switch-exp > input.m3:hover:not(:disabled):checked + svg > circle.m3.m3-switch-handler-state-layer { div.m3.m3-switch-exp
> input.m3:hover:not(:disabled):checked
+ svg
> circle.m3.m3-switch-handler-state-layer {
fill: var(--md-sys-color-primary); fill: var(--md-sys-color-primary);
fill-opacity: 8%; fill-opacity: 8%;
} }
div.m3.m3-switch-exp > input.m3:hover:not(:disabled):not(:checked) + svg > circle.m3.m3-switch-handler { div.m3.m3-switch-exp
> input.m3:hover:not(:disabled):not(:checked)
+ svg
> circle.m3.m3-switch-handler {
fill: var(--md-sys-color-on-surface-variant); fill: var(--md-sys-color-on-surface-variant);
} }
div.m3.m3-switch-exp > input.m3:hover:not(:disabled):not(:checked) + svg > circle.m3.m3-switch-handler-state-layer { div.m3.m3-switch-exp
> input.m3:hover:not(:disabled):not(:checked)
+ svg
> circle.m3.m3-switch-handler-state-layer {
fill: var(--md-sys-color-on-surface); fill: var(--md-sys-color-on-surface);
fill-opacity: 8%; fill-opacity: 8%;
} }
div.m3.m3-switch-exp > input.m3:active:not(:disabled):checked + svg > circle.m3.m3-switch-handler-state-layer { div.m3.m3-switch-exp
> input.m3:active:not(:disabled):checked
+ svg
> circle.m3.m3-switch-handler-state-layer {
fill: var(--md-sys-color-primary); fill: var(--md-sys-color-primary);
fill-opacity: 12%; fill-opacity: 12%;
} }
div.m3.m3-switch-exp > input.m3:active:not(:disabled):not(:checked) + svg > circle.m3.m3-switch-handler-state-layer { div.m3.m3-switch-exp
> input.m3:active:not(:disabled):not(:checked)
+ svg
> circle.m3.m3-switch-handler-state-layer {
fill: var(--md-sys-color-on-surface); fill: var(--md-sys-color-on-surface);
fill-opacity: 12%; fill-opacity: 12%;
} }
div.m3.m3-switch-exp > input.m3:is(:checked, :checked:disabled) + svg > rect.m3.m3-switch-track { div.m3.m3-switch-exp
> input.m3:is(:checked, :checked:disabled)
+ svg
> rect.m3.m3-switch-track {
rx: 16px; rx: 16px;
width: 52px; width: 52px;
height: 32px; height: 32px;
stroke-width: 0; stroke-width: 0;
} }
div.m3.m3-switch-exp > input.m3:is(div.m3.m3-switch-exp > input.m3:not(:checked), div.m3.m3-switch-exp > input.m3:not(:checked):disabled) + svg > rect.m3.m3-switch-track { div.m3.m3-switch-exp
> input.m3:is(
div.m3.m3-switch-exp > input.m3:not(:checked),
div.m3.m3-switch-exp > input.m3:not(:checked):disabled
)
+ svg
> rect.m3.m3-switch-track {
x: 1px; x: 1px;
y: 1px; y: 1px;
} }
@ -131,17 +196,28 @@ div.m3.m3-switch-exp > input.m3:checked + svg > rect.m3.m3-switch-track {
fill: var(--md-sys-color-primary); fill: var(--md-sys-color-primary);
} }
div.m3.m3-switch-exp > input.m3:disabled + svg > g > text.m3 { div.m3.m3-switch-exp > input.m3:disabled + svg > g > text.m3 {
fill: color-mix(in srgb, var(--md-sys-color-surface-container-highest) 38%, transparent); fill: color-mix(
in srgb,
var(--md-sys-color-surface-container-highest) 38%,
transparent
);
} }
div.m3.m3-switch-exp > input.m3:disabled + svg > rect.m3.m3-switch-track { div.m3.m3-switch-exp > input.m3:disabled + svg > rect.m3.m3-switch-track {
stroke: color-mix(in srgb, var(--md-sys-color-on-surface) 12%, transparent); stroke: color-mix(in srgb, var(--md-sys-color-on-surface) 12%, transparent);
fill: color-mix(in srgb, var(--md-sys-color-surface-variant) 12%, transparent); fill: color-mix(
in srgb,
var(--md-sys-color-surface-variant) 12%,
transparent
);
} }
div.m3.m3-switch-exp > input.m3:checked:disabled + svg > g > text.m3 { div.m3.m3-switch-exp > input.m3:checked:disabled + svg > g > text.m3 {
transform: translateX(38.5%); transform: translateX(38.5%);
fill: color-mix(in srgb, var(--md-sys-color-on-surface) 38%, transparent); fill: color-mix(in srgb, var(--md-sys-color-on-surface) 38%, transparent);
} }
div.m3.m3-switch-exp > input.m3:checked:disabled + svg > rect.m3.m3-switch-track { div.m3.m3-switch-exp
> input.m3:checked:disabled
+ svg
> rect.m3.m3-switch-track {
stroke: color-mix(in srgb, var(--md-sys-color-on-surface) 0%, transparent); stroke: color-mix(in srgb, var(--md-sys-color-on-surface) 0%, transparent);
fill: color-mix(in srgb, var(--md-sys-color-on-surface) 12%, transparent); fill: color-mix(in srgb, var(--md-sys-color-on-surface) 12%, transparent);
} }

View File

@ -9,7 +9,9 @@ div.m3.m3-text-field {
div.m3.m3-text-field span.m3-icon.icon-before { div.m3.m3-text-field span.m3-icon.icon-before {
align-self: start; align-self: start;
} }
div.m3.m3-text-field:is(.filled, .outlined) > input::placeholder, div.m3.m3-text-field > input, div.m3.m3-text-field > label { div.m3.m3-text-field:is(.filled, .outlined) > input::placeholder,
div.m3.m3-text-field > input,
div.m3.m3-text-field > label {
line-height: var(--md-sys-typescale-body-large-line-height); line-height: var(--md-sys-typescale-body-large-line-height);
font-size: var(--md-sys-typescale-body-large-font-size); font-size: var(--md-sys-typescale-body-large-font-size);
} }
@ -52,7 +54,8 @@ div.m3.m3-text-field > span.m3-text-field-state-layer {
pointer-events: none; pointer-events: none;
position: absolute; position: absolute;
} }
div.m3.m3-text-field > input, div.m3.m3-text-field > label { div.m3.m3-text-field > input,
div.m3.m3-text-field > label {
color: var(--md-sys-color-on-surface); color: var(--md-sys-color-on-surface);
} }
div.m3.m3-text-field:is(.filled, .outlined) > input::placeholder { div.m3.m3-text-field:is(.filled, .outlined) > input::placeholder {
@ -62,7 +65,9 @@ div.m3.m3-text-field:is(.filled, .outlined) > input:focus-visible {
outline: none; outline: none;
caret-color: var(--md-sys-color-primary); caret-color: var(--md-sys-color-primary);
} }
div.m3.m3-text-field:is(.filled, .outlined):has(input:disabled) > *, div.m3.m3-text-field:is(.filled, .outlined):has(input:disabled) + span.m3-text-field-supporting-text { div.m3.m3-text-field:is(.filled, .outlined):has(input:disabled) > *,
div.m3.m3-text-field:is(.filled, .outlined):has(input:disabled)
+ span.m3-text-field-supporting-text {
opacity: 38%; opacity: 38%;
} }
div.m3.m3-text-field.filled { div.m3.m3-text-field.filled {
@ -106,7 +111,10 @@ div.m3.m3-text-field.filled > input:required:user-invalid:focus-visible {
div.m3.m3-text-field.filled > input:required:user-invalid { div.m3.m3-text-field.filled > input:required:user-invalid {
box-shadow: inset 0 -1px 0 var(--md-sys-color-error); box-shadow: inset 0 -1px 0 var(--md-sys-color-error);
} }
div.m3.m3-text-field.filled:has(input:required:user-invalid) > *:not(input):nth-last-child(-n+3), div.m3.m3-text-field.filled:has(input:required:user-invalid) + span.m3-text-field-supporting-text { div.m3.m3-text-field.filled:has(input:required:user-invalid)
> *:not(input):nth-last-child(-n + 3),
div.m3.m3-text-field.filled:has(input:required:user-invalid)
+ span.m3-text-field-supporting-text {
color: var(--md-sys-color-error); color: var(--md-sys-color-error);
} }
div.m3.m3-text-field.filled > input:focus-visible { div.m3.m3-text-field.filled > input:focus-visible {
@ -116,9 +124,15 @@ div.m3.m3-text-field.filled > input:focus-visible {
div.m3.m3-text-field.filled > input:focus-visible + label { div.m3.m3-text-field.filled > input:focus-visible + label {
color: var(--md-sys-color-primary); color: var(--md-sys-color-primary);
} }
div.m3.m3-text-field.filled:hover > input:not(:disabled) ~ span.m3-text-field-state-layer { div.m3.m3-text-field.filled:hover
> input:not(:disabled)
~ span.m3-text-field-state-layer {
transition: 0.2s cubic-bezier(0.2, 0, 0, 1); transition: 0.2s cubic-bezier(0.2, 0, 0, 1);
background-color: color-mix(in srgb, var(--md-sys-color-on-surface) 8%, transparent); background-color: color-mix(
in srgb,
var(--md-sys-color-on-surface) 8%,
transparent
);
} }
div.m3.m3-text-field.outlined > fieldset { div.m3.m3-text-field.outlined > fieldset {
margin: 0; margin: 0;
@ -170,14 +184,22 @@ div.m3.m3-text-field.outlined > input.with-after-icon.with-before-icon {
div.m3.m3-text-field.outlined:has(input:focus-visible) > fieldset { div.m3.m3-text-field.outlined:has(input:focus-visible) > fieldset {
border: 3px solid var(--md-sys-color-primary); border: 3px solid var(--md-sys-color-primary);
} }
div.m3.m3-text-field.outlined:not(div.m3.m3-text-field.outlined:has(label.raised)):has(input:focus-visible) > fieldset > legend { div.m3.m3-text-field.outlined:not(
div.m3.m3-text-field.outlined:has(label.raised)
):has(input:focus-visible)
> fieldset
> legend {
border-top-width: 0; border-top-width: 0;
border-bottom-width: 0; border-bottom-width: 0;
border-inline-width: 5.5px; border-inline-width: 5.5px;
border-style: solid; border-style: solid;
border-color: transparent; border-color: transparent;
} }
div.m3.m3-text-field.outlined:not(div.m3.m3-text-field.outlined:has(input:focus-visible)):has(label.raised) > fieldset > legend { div.m3.m3-text-field.outlined:not(
div.m3.m3-text-field.outlined:has(input:focus-visible)
):has(label.raised)
> fieldset
> legend {
border-top-width: 0; border-top-width: 0;
border-bottom-width: 0; border-bottom-width: 0;
border-inline-width: 7.5px; border-inline-width: 7.5px;
@ -187,7 +209,8 @@ div.m3.m3-text-field.outlined:not(div.m3.m3-text-field.outlined:has(input:focus-
div.m3.m3-text-field.outlined > input:focus-visible + label { div.m3.m3-text-field.outlined > input:focus-visible + label {
color: var(--md-sys-color-primary); color: var(--md-sys-color-primary);
} }
div.m3.m3-text-field.outlined > label.raised, div.m3.m3-text-field.outlined > fieldset > * { div.m3.m3-text-field.outlined > label.raised,
div.m3.m3-text-field.outlined > fieldset > * {
line-height: var(--md-sys-typescale-body-small-line-height); line-height: var(--md-sys-typescale-body-small-line-height);
font-size: var(--md-sys-typescale-body-small-font-size); font-size: var(--md-sys-typescale-body-small-font-size);
} }
@ -197,16 +220,30 @@ div.m3.m3-text-field.outlined > label.raised {
div.m3.m3-text-field.outlined > input:required:user-invalid { div.m3.m3-text-field.outlined > input:required:user-invalid {
caret-color: var(--md-sys-color-error); caret-color: var(--md-sys-color-error);
} }
div.m3.m3-text-field.outlined:has(input:required:user-invalid) > *:not(input):nth-last-child(-n+3), div.m3.m3-text-field.outlined:has(input:required:user-invalid) + span.m3-text-field-supporting-text { div.m3.m3-text-field.outlined:has(input:required:user-invalid)
> *:not(input):nth-last-child(-n + 3),
div.m3.m3-text-field.outlined:has(input:required:user-invalid)
+ span.m3-text-field-supporting-text {
color: var(--md-sys-color-error); color: var(--md-sys-color-error);
} }
div.m3.m3-text-field.outlined:has(input:required:user-invalid) > fieldset { div.m3.m3-text-field.outlined:has(input:required:user-invalid) > fieldset {
border: 3px solid var(--md-sys-color-error); border: 3px solid var(--md-sys-color-error);
} }
div.m3.m3-text-field.outlined:has(input:required:user-invalid:not(:focus-visible)) > fieldset { div.m3.m3-text-field.outlined:has(
input:required:user-invalid:not(:focus-visible)
)
> fieldset {
border: 1px solid var(--md-sys-color-error); border: 1px solid var(--md-sys-color-error);
} }
div.m3.m3-text-field.outlined:hover:not(div.m3.m3-text-field.outlined:hover:has(input:disabled, input:focus-visible, label.raised, input:required:user-invalid)) > fieldset { div.m3.m3-text-field.outlined:hover:not(
div.m3.m3-text-field.outlined:hover:has(
input:disabled,
input:focus-visible,
label.raised,
input:required:user-invalid
)
)
> fieldset {
transition: 0.2s cubic-bezier(0.2, 0, 0, 1); transition: 0.2s cubic-bezier(0.2, 0, 0, 1);
border-color: var(--md-sys-color-on-surface); border-color: var(--md-sys-color-on-surface);
} }

View File

@ -1,51 +1,51 @@
:root { :root {
--md-sys-color-primary: rgb(227 183 244); --md-sys-color-primary: rgb(227 183 244);
--md-sys-color-surface-tint: rgb(227 183 244); --md-sys-color-surface-tint: rgb(227 183 244);
--md-sys-color-on-primary: rgb(67 34 84); --md-sys-color-on-primary: rgb(67 34 84);
--md-sys-color-primary-container: rgb(92 57 108); --md-sys-color-primary-container: rgb(92 57 108);
--md-sys-color-on-primary-container: rgb(246 217 255); --md-sys-color-on-primary-container: rgb(246 217 255);
--md-sys-color-secondary: rgb(212 192 216); --md-sys-color-secondary: rgb(212 192 216);
--md-sys-color-on-secondary: rgb(57 44 62); --md-sys-color-on-secondary: rgb(57 44 62);
--md-sys-color-secondary-container: rgb(80 66 85); --md-sys-color-secondary-container: rgb(80 66 85);
--md-sys-color-on-secondary-container: rgb(240 220 244); --md-sys-color-on-secondary-container: rgb(240 220 244);
--md-sys-color-tertiary: rgb(245 183 182); --md-sys-color-tertiary: rgb(245 183 182);
--md-sys-color-on-tertiary: rgb(76 37 37); --md-sys-color-on-tertiary: rgb(76 37 37);
--md-sys-color-tertiary-container: rgb(102 59 59); --md-sys-color-tertiary-container: rgb(102 59 59);
--md-sys-color-on-tertiary-container: rgb(255 218 217); --md-sys-color-on-tertiary-container: rgb(255 218 217);
--md-sys-color-error: rgb(255 180 171); --md-sys-color-error: rgb(255 180 171);
--md-sys-color-on-error: rgb(105 0 5); --md-sys-color-on-error: rgb(105 0 5);
--md-sys-color-error-container: rgb(147 0 10); --md-sys-color-error-container: rgb(147 0 10);
--md-sys-color-on-error-container: rgb(255 218 214); --md-sys-color-on-error-container: rgb(255 218 214);
--md-sys-color-background: rgb(22 18 23); --md-sys-color-background: rgb(22 18 23);
--md-sys-color-on-background: rgb(233 224 231); --md-sys-color-on-background: rgb(233 224 231);
--md-sys-color-surface: rgb(22 18 23); --md-sys-color-surface: rgb(22 18 23);
--md-sys-color-on-surface: rgb(233 224 231); --md-sys-color-on-surface: rgb(233 224 231);
--md-sys-color-surface-variant: rgb(76 68 77); --md-sys-color-surface-variant: rgb(76 68 77);
--md-sys-color-on-surface-variant: rgb(206 195 206); --md-sys-color-on-surface-variant: rgb(206 195 206);
--md-sys-color-outline: rgb(151 142 151); --md-sys-color-outline: rgb(151 142 151);
--md-sys-color-outline-variant: rgb(76 68 77); --md-sys-color-outline-variant: rgb(76 68 77);
--md-sys-color-shadow: rgb(0 0 0); --md-sys-color-shadow: rgb(0 0 0);
--md-sys-color-scrim: rgb(0 0 0); --md-sys-color-scrim: rgb(0 0 0);
--md-sys-color-inverse-surface: rgb(233 224 231); --md-sys-color-inverse-surface: rgb(233 224 231);
--md-sys-color-inverse-on-surface: rgb(52 47 52); --md-sys-color-inverse-on-surface: rgb(52 47 52);
--md-sys-color-inverse-primary: rgb(117 80 134); --md-sys-color-inverse-primary: rgb(117 80 134);
--md-sys-color-primary-fixed: rgb(246 217 255); --md-sys-color-primary-fixed: rgb(246 217 255);
--md-sys-color-on-primary-fixed: rgb(45 11 62); --md-sys-color-on-primary-fixed: rgb(45 11 62);
--md-sys-color-primary-fixed-dim: rgb(227 183 244); --md-sys-color-primary-fixed-dim: rgb(227 183 244);
--md-sys-color-on-primary-fixed-variant: rgb(92 57 108); --md-sys-color-on-primary-fixed-variant: rgb(92 57 108);
--md-sys-color-secondary-fixed: rgb(240 220 244); --md-sys-color-secondary-fixed: rgb(240 220 244);
--md-sys-color-on-secondary-fixed: rgb(35 23 40); --md-sys-color-on-secondary-fixed: rgb(35 23 40);
--md-sys-color-secondary-fixed-dim: rgb(212 192 216); --md-sys-color-secondary-fixed-dim: rgb(212 192 216);
--md-sys-color-on-secondary-fixed-variant: rgb(80 66 85); --md-sys-color-on-secondary-fixed-variant: rgb(80 66 85);
--md-sys-color-tertiary-fixed: rgb(255 218 217); --md-sys-color-tertiary-fixed: rgb(255 218 217);
--md-sys-color-on-tertiary-fixed: rgb(51 17 18); --md-sys-color-on-tertiary-fixed: rgb(51 17 18);
--md-sys-color-tertiary-fixed-dim: rgb(245 183 182); --md-sys-color-tertiary-fixed-dim: rgb(245 183 182);
--md-sys-color-on-tertiary-fixed-variant: rgb(102 59 59); --md-sys-color-on-tertiary-fixed-variant: rgb(102 59 59);
--md-sys-color-surface-dim: rgb(22 18 23); --md-sys-color-surface-dim: rgb(22 18 23);
--md-sys-color-surface-bright: rgb(61 55 61); --md-sys-color-surface-bright: rgb(61 55 61);
--md-sys-color-surface-container-lowest: rgb(17 13 18); --md-sys-color-surface-container-lowest: rgb(17 13 18);
--md-sys-color-surface-container-low: rgb(30 26 31); --md-sys-color-surface-container-low: rgb(30 26 31);
--md-sys-color-surface-container: rgb(35 30 35); --md-sys-color-surface-container: rgb(35 30 35);
--md-sys-color-surface-container-high: rgb(45 40 46); --md-sys-color-surface-container-high: rgb(45 40 46);
--md-sys-color-surface-container-highest: rgb(56 51 57); --md-sys-color-surface-container-highest: rgb(56 51 57);
} }

View File

@ -1,51 +1,51 @@
:root { :root {
--md-sys-color-primary: rgb(117 80 134); --md-sys-color-primary: rgb(117 80 134);
--md-sys-color-surface-tint: rgb(117 80 134); --md-sys-color-surface-tint: rgb(117 80 134);
--md-sys-color-on-primary: rgb(255 255 255); --md-sys-color-on-primary: rgb(255 255 255);
--md-sys-color-primary-container: rgb(246 217 255); --md-sys-color-primary-container: rgb(246 217 255);
--md-sys-color-on-primary-container: rgb(45 11 62); --md-sys-color-on-primary-container: rgb(45 11 62);
--md-sys-color-secondary: rgb(104 89 109); --md-sys-color-secondary: rgb(104 89 109);
--md-sys-color-on-secondary: rgb(255 255 255); --md-sys-color-on-secondary: rgb(255 255 255);
--md-sys-color-secondary-container: rgb(240 220 244); --md-sys-color-secondary-container: rgb(240 220 244);
--md-sys-color-on-secondary-container: rgb(35 23 40); --md-sys-color-on-secondary-container: rgb(35 23 40);
--md-sys-color-tertiary: rgb(129 82 81); --md-sys-color-tertiary: rgb(129 82 81);
--md-sys-color-on-tertiary: rgb(255 255 255); --md-sys-color-on-tertiary: rgb(255 255 255);
--md-sys-color-tertiary-container: rgb(255 218 217); --md-sys-color-tertiary-container: rgb(255 218 217);
--md-sys-color-on-tertiary-container: rgb(51 17 18); --md-sys-color-on-tertiary-container: rgb(51 17 18);
--md-sys-color-error: rgb(186 26 26); --md-sys-color-error: rgb(186 26 26);
--md-sys-color-on-error: rgb(255 255 255); --md-sys-color-on-error: rgb(255 255 255);
--md-sys-color-error-container: rgb(255 218 214); --md-sys-color-error-container: rgb(255 218 214);
--md-sys-color-on-error-container: rgb(65 0 2); --md-sys-color-on-error-container: rgb(65 0 2);
--md-sys-color-background: rgb(255 247 252); --md-sys-color-background: rgb(255 247 252);
--md-sys-color-on-background: rgb(30 26 31); --md-sys-color-on-background: rgb(30 26 31);
--md-sys-color-surface: rgb(255 247 252); --md-sys-color-surface: rgb(255 247 252);
--md-sys-color-on-surface: rgb(30 26 31); --md-sys-color-on-surface: rgb(30 26 31);
--md-sys-color-surface-variant: rgb(235 223 234); --md-sys-color-surface-variant: rgb(235 223 234);
--md-sys-color-on-surface-variant: rgb(76 68 77); --md-sys-color-on-surface-variant: rgb(76 68 77);
--md-sys-color-outline: rgb(125 116 126); --md-sys-color-outline: rgb(125 116 126);
--md-sys-color-outline-variant: rgb(206 195 206); --md-sys-color-outline-variant: rgb(206 195 206);
--md-sys-color-shadow: rgb(0 0 0); --md-sys-color-shadow: rgb(0 0 0);
--md-sys-color-scrim: rgb(0 0 0); --md-sys-color-scrim: rgb(0 0 0);
--md-sys-color-inverse-surface: rgb(52 47 52); --md-sys-color-inverse-surface: rgb(52 47 52);
--md-sys-color-inverse-on-surface: rgb(248 238 246); --md-sys-color-inverse-on-surface: rgb(248 238 246);
--md-sys-color-inverse-primary: rgb(227 183 244); --md-sys-color-inverse-primary: rgb(227 183 244);
--md-sys-color-primary-fixed: rgb(246 217 255); --md-sys-color-primary-fixed: rgb(246 217 255);
--md-sys-color-on-primary-fixed: rgb(45 11 62); --md-sys-color-on-primary-fixed: rgb(45 11 62);
--md-sys-color-primary-fixed-dim: rgb(227 183 244); --md-sys-color-primary-fixed-dim: rgb(227 183 244);
--md-sys-color-on-primary-fixed-variant: rgb(92 57 108); --md-sys-color-on-primary-fixed-variant: rgb(92 57 108);
--md-sys-color-secondary-fixed: rgb(240 220 244); --md-sys-color-secondary-fixed: rgb(240 220 244);
--md-sys-color-on-secondary-fixed: rgb(35 23 40); --md-sys-color-on-secondary-fixed: rgb(35 23 40);
--md-sys-color-secondary-fixed-dim: rgb(212 192 216); --md-sys-color-secondary-fixed-dim: rgb(212 192 216);
--md-sys-color-on-secondary-fixed-variant: rgb(80 66 85); --md-sys-color-on-secondary-fixed-variant: rgb(80 66 85);
--md-sys-color-tertiary-fixed: rgb(255 218 217); --md-sys-color-tertiary-fixed: rgb(255 218 217);
--md-sys-color-on-tertiary-fixed: rgb(51 17 18); --md-sys-color-on-tertiary-fixed: rgb(51 17 18);
--md-sys-color-tertiary-fixed-dim: rgb(245 183 182); --md-sys-color-tertiary-fixed-dim: rgb(245 183 182);
--md-sys-color-on-tertiary-fixed-variant: rgb(102 59 59); --md-sys-color-on-tertiary-fixed-variant: rgb(102 59 59);
--md-sys-color-surface-dim: rgb(225 215 223); --md-sys-color-surface-dim: rgb(225 215 223);
--md-sys-color-surface-bright: rgb(255 247 252); --md-sys-color-surface-bright: rgb(255 247 252);
--md-sys-color-surface-container-lowest: rgb(255 255 255); --md-sys-color-surface-container-lowest: rgb(255 255 255);
--md-sys-color-surface-container-low: rgb(251 241 248); --md-sys-color-surface-container-low: rgb(251 241 248);
--md-sys-color-surface-container: rgb(245 235 243); --md-sys-color-surface-container: rgb(245 235 243);
--md-sys-color-surface-container-high: rgb(239 229 237); --md-sys-color-surface-container-high: rgb(239 229 237);
--md-sys-color-surface-container-highest: rgb(233 224 231); --md-sys-color-surface-container-highest: rgb(233 224 231);
} }

View File

@ -47,7 +47,7 @@
--md-sys-typescale-body-large-font-weight: 400; --md-sys-typescale-body-large-font-weight: 400;
--md-sys-typescale-body-large-font-size: 16px; --md-sys-typescale-body-large-font-size: 16px;
--md-sys-typescale-body-large-line-height: 24px; --md-sys-typescale-body-large-line-height: 24px;
--md-sys-typescale-body-large-letter-spacing: 0.50px; --md-sys-typescale-body-large-letter-spacing: 0.5px;
/* body - medium */ /* body - medium */
--md-sys-typescale-body-medium-font-family-name: Roboto; --md-sys-typescale-body-medium-font-family-name: Roboto;
--md-sys-typescale-body-medium-font-family-style: Regular; --md-sys-typescale-body-medium-font-family-style: Regular;
@ -61,28 +61,28 @@
--md-sys-typescale-body-small-font-weight: 400; --md-sys-typescale-body-small-font-weight: 400;
--md-sys-typescale-body-small-font-size: 12px; --md-sys-typescale-body-small-font-size: 12px;
--md-sys-typescale-body-small-line-height: 16px; --md-sys-typescale-body-small-line-height: 16px;
--md-sys-typescale-body-small-letter-spacing: 0.40px; --md-sys-typescale-body-small-letter-spacing: 0.4px;
/* label - large */ /* label - large */
--md-sys-typescale-label-large-font-family-name: Roboto; --md-sys-typescale-label-large-font-family-name: Roboto;
--md-sys-typescale-label-large-font-family-style: Medium; --md-sys-typescale-label-large-font-family-style: Medium;
--md-sys-typescale-label-large-font-weight: 500; --md-sys-typescale-label-large-font-weight: 500;
--md-sys-typescale-label-large-font-size: 14px; --md-sys-typescale-label-large-font-size: 14px;
--md-sys-typescale-label-large-line-height: 20px; --md-sys-typescale-label-large-line-height: 20px;
--md-sys-typescale-label-large-letter-spacing: 0.10px; --md-sys-typescale-label-large-letter-spacing: 0.1px;
/* label - medium */ /* label - medium */
--md-sys-typescale-label-medium-font-family-name: Roboto; --md-sys-typescale-label-medium-font-family-name: Roboto;
--md-sys-typescale-label-medium-font-family-style: Medium; --md-sys-typescale-label-medium-font-family-style: Medium;
--md-sys-typescale-label-medium-font-weight: 500; --md-sys-typescale-label-medium-font-weight: 500;
--md-sys-typescale-label-medium-font-size: 12px; --md-sys-typescale-label-medium-font-size: 12px;
--md-sys-typescale-label-medium-line-height: 16px; --md-sys-typescale-label-medium-line-height: 16px;
--md-sys-typescale-label-medium-letter-spacing: 0.50px; --md-sys-typescale-label-medium-letter-spacing: 0.5px;
/* label - small */ /* label - small */
--md-sys-typescale-label-small-font-family-name: Roboto; --md-sys-typescale-label-small-font-family-name: Roboto;
--md-sys-typescale-label-small-font-family-style: Medium; --md-sys-typescale-label-small-font-family-style: Medium;
--md-sys-typescale-label-small-font-weight: 500; --md-sys-typescale-label-small-font-weight: 500;
--md-sys-typescale-label-small-font-size: 11px; --md-sys-typescale-label-small-font-size: 11px;
--md-sys-typescale-label-small-line-height: 16px; --md-sys-typescale-label-small-line-height: 16px;
--md-sys-typescale-label-small-letter-spacing: 0.50px; --md-sys-typescale-label-small-letter-spacing: 0.5px;
/* title - large */ /* title - large */
--md-sys-typescale-title-large-font-family-name: Roboto; --md-sys-typescale-title-large-font-family-name: Roboto;
--md-sys-typescale-title-large-font-family-style: Regular; --md-sys-typescale-title-large-font-family-style: Regular;
@ -103,5 +103,5 @@
--md-sys-typescale-title-small-font-weight: 500; --md-sys-typescale-title-small-font-weight: 500;
--md-sys-typescale-title-small-font-size: 14px; --md-sys-typescale-title-small-font-size: 14px;
--md-sys-typescale-title-small-line-height: 20px; --md-sys-typescale-title-small-line-height: 20px;
--md-sys-typescale-title-small-letter-spacing: 0.10px; --md-sys-typescale-title-small-letter-spacing: 0.1px;
} }

View File

@ -1,4 +1,4 @@
.display-large{ .display-large {
font-family: var(--md-sys-typescale-display-large-font-family-name); font-family: var(--md-sys-typescale-display-large-font-family-name);
font-style: var(--md-sys-typescale-display-large-font-family-style); font-style: var(--md-sys-typescale-display-large-font-family-style);
font-weight: var(--md-sys-typescale-display-large-font-weight); font-weight: var(--md-sys-typescale-display-large-font-weight);
@ -8,7 +8,7 @@
text-transform: var(--md-sys-typescale-display-large-text-transform); text-transform: var(--md-sys-typescale-display-large-text-transform);
text-decoration: var(--md-sys-typescale-display-large-text-decoration); text-decoration: var(--md-sys-typescale-display-large-text-decoration);
} }
.display-medium{ .display-medium {
font-family: var(--md-sys-typescale-display-medium-font-family-name); font-family: var(--md-sys-typescale-display-medium-font-family-name);
font-style: var(--md-sys-typescale-display-medium-font-family-style); font-style: var(--md-sys-typescale-display-medium-font-family-style);
font-weight: var(--md-sys-typescale-display-medium-font-weight); font-weight: var(--md-sys-typescale-display-medium-font-weight);
@ -18,7 +18,7 @@
text-transform: var(--md-sys-typescale-display-medium-text-transform); text-transform: var(--md-sys-typescale-display-medium-text-transform);
text-decoration: var(--md-sys-typescale-display-medium-text-decoration); text-decoration: var(--md-sys-typescale-display-medium-text-decoration);
} }
.display-small{ .display-small {
font-family: var(--md-sys-typescale-display-small-font-family-name); font-family: var(--md-sys-typescale-display-small-font-family-name);
font-style: var(--md-sys-typescale-display-small-font-family-style); font-style: var(--md-sys-typescale-display-small-font-family-style);
font-weight: var(--md-sys-typescale-display-small-font-weight); font-weight: var(--md-sys-typescale-display-small-font-weight);
@ -28,7 +28,7 @@
text-transform: var(--md-sys-typescale-display-small-text-transform); text-transform: var(--md-sys-typescale-display-small-text-transform);
text-decoration: var(--md-sys-typescale-display-small-text-decoration); text-decoration: var(--md-sys-typescale-display-small-text-decoration);
} }
.headline-large{ .headline-large {
font-family: var(--md-sys-typescale-headline-large-font-family-name); font-family: var(--md-sys-typescale-headline-large-font-family-name);
font-style: var(--md-sys-typescale-headline-large-font-family-style); font-style: var(--md-sys-typescale-headline-large-font-family-style);
font-weight: var(--md-sys-typescale-headline-large-font-weight); font-weight: var(--md-sys-typescale-headline-large-font-weight);
@ -38,7 +38,7 @@
text-transform: var(--md-sys-typescale-headline-large-text-transform); text-transform: var(--md-sys-typescale-headline-large-text-transform);
text-decoration: var(--md-sys-typescale-headline-large-text-decoration); text-decoration: var(--md-sys-typescale-headline-large-text-decoration);
} }
.headline-medium{ .headline-medium {
font-family: var(--md-sys-typescale-headline-medium-font-family-name); font-family: var(--md-sys-typescale-headline-medium-font-family-name);
font-style: var(--md-sys-typescale-headline-medium-font-family-style); font-style: var(--md-sys-typescale-headline-medium-font-family-style);
font-weight: var(--md-sys-typescale-headline-medium-font-weight); font-weight: var(--md-sys-typescale-headline-medium-font-weight);
@ -48,7 +48,7 @@
text-transform: var(--md-sys-typescale-headline-medium-text-transform); text-transform: var(--md-sys-typescale-headline-medium-text-transform);
text-decoration: var(--md-sys-typescale-headline-medium-text-decoration); text-decoration: var(--md-sys-typescale-headline-medium-text-decoration);
} }
.headline-small{ .headline-small {
font-family: var(--md-sys-typescale-headline-small-font-family-name); font-family: var(--md-sys-typescale-headline-small-font-family-name);
font-style: var(--md-sys-typescale-headline-small-font-family-style); font-style: var(--md-sys-typescale-headline-small-font-family-style);
font-weight: var(--md-sys-typescale-headline-small-font-weight); font-weight: var(--md-sys-typescale-headline-small-font-weight);
@ -58,7 +58,7 @@
text-transform: var(--md-sys-typescale-headline-small-text-transform); text-transform: var(--md-sys-typescale-headline-small-text-transform);
text-decoration: var(--md-sys-typescale-headline-small-text-decoration); text-decoration: var(--md-sys-typescale-headline-small-text-decoration);
} }
.body-large{ .body-large {
font-family: var(--md-sys-typescale-body-large-font-family-name); font-family: var(--md-sys-typescale-body-large-font-family-name);
font-style: var(--md-sys-typescale-body-large-font-family-style); font-style: var(--md-sys-typescale-body-large-font-family-style);
font-weight: var(--md-sys-typescale-body-large-font-weight); font-weight: var(--md-sys-typescale-body-large-font-weight);
@ -68,7 +68,7 @@
text-transform: var(--md-sys-typescale-body-large-text-transform); text-transform: var(--md-sys-typescale-body-large-text-transform);
text-decoration: var(--md-sys-typescale-body-large-text-decoration); text-decoration: var(--md-sys-typescale-body-large-text-decoration);
} }
.body-medium{ .body-medium {
font-family: var(--md-sys-typescale-body-medium-font-family-name); font-family: var(--md-sys-typescale-body-medium-font-family-name);
font-style: var(--md-sys-typescale-body-medium-font-family-style); font-style: var(--md-sys-typescale-body-medium-font-family-style);
font-weight: var(--md-sys-typescale-body-medium-font-weight); font-weight: var(--md-sys-typescale-body-medium-font-weight);
@ -78,7 +78,7 @@
text-transform: var(--md-sys-typescale-body-medium-text-transform); text-transform: var(--md-sys-typescale-body-medium-text-transform);
text-decoration: var(--md-sys-typescale-body-medium-text-decoration); text-decoration: var(--md-sys-typescale-body-medium-text-decoration);
} }
.body-small{ .body-small {
font-family: var(--md-sys-typescale-body-small-font-family-name); font-family: var(--md-sys-typescale-body-small-font-family-name);
font-style: var(--md-sys-typescale-body-small-font-family-style); font-style: var(--md-sys-typescale-body-small-font-family-style);
font-weight: var(--md-sys-typescale-body-small-font-weight); font-weight: var(--md-sys-typescale-body-small-font-weight);
@ -88,7 +88,7 @@
text-transform: var(--md-sys-typescale-body-small-text-transform); text-transform: var(--md-sys-typescale-body-small-text-transform);
text-decoration: var(--md-sys-typescale-body-small-text-decoration); text-decoration: var(--md-sys-typescale-body-small-text-decoration);
} }
.label-large{ .label-large {
font-family: var(--md-sys-typescale-label-large-font-family-name); font-family: var(--md-sys-typescale-label-large-font-family-name);
font-style: var(--md-sys-typescale-label-large-font-family-style); font-style: var(--md-sys-typescale-label-large-font-family-style);
font-weight: var(--md-sys-typescale-label-large-font-weight); font-weight: var(--md-sys-typescale-label-large-font-weight);
@ -98,7 +98,7 @@
text-transform: var(--md-sys-typescale-label-large-text-transform); text-transform: var(--md-sys-typescale-label-large-text-transform);
text-decoration: var(--md-sys-typescale-label-large-text-decoration); text-decoration: var(--md-sys-typescale-label-large-text-decoration);
} }
.label-medium{ .label-medium {
font-family: var(--md-sys-typescale-label-medium-font-family-name); font-family: var(--md-sys-typescale-label-medium-font-family-name);
font-style: var(--md-sys-typescale-label-medium-font-family-style); font-style: var(--md-sys-typescale-label-medium-font-family-style);
font-weight: var(--md-sys-typescale-label-medium-font-weight); font-weight: var(--md-sys-typescale-label-medium-font-weight);
@ -108,7 +108,7 @@
text-transform: var(--md-sys-typescale-label-medium-text-transform); text-transform: var(--md-sys-typescale-label-medium-text-transform);
text-decoration: var(--md-sys-typescale-label-medium-text-decoration); text-decoration: var(--md-sys-typescale-label-medium-text-decoration);
} }
.label-small{ .label-small {
font-family: var(--md-sys-typescale-label-small-font-family-name); font-family: var(--md-sys-typescale-label-small-font-family-name);
font-style: var(--md-sys-typescale-label-small-font-family-style); font-style: var(--md-sys-typescale-label-small-font-family-style);
font-weight: var(--md-sys-typescale-label-small-font-weight); font-weight: var(--md-sys-typescale-label-small-font-weight);
@ -118,7 +118,7 @@
text-transform: var(--md-sys-typescale-label-small-text-transform); text-transform: var(--md-sys-typescale-label-small-text-transform);
text-decoration: var(--md-sys-typescale-label-small-text-decoration); text-decoration: var(--md-sys-typescale-label-small-text-decoration);
} }
.title-large{ .title-large {
font-family: var(--md-sys-typescale-title-large-font-family-name); font-family: var(--md-sys-typescale-title-large-font-family-name);
font-style: var(--md-sys-typescale-title-large-font-family-style); font-style: var(--md-sys-typescale-title-large-font-family-style);
font-weight: var(--md-sys-typescale-title-large-font-weight); font-weight: var(--md-sys-typescale-title-large-font-weight);
@ -128,7 +128,7 @@
text-transform: var(--md-sys-typescale-title-large-text-transform); text-transform: var(--md-sys-typescale-title-large-text-transform);
text-decoration: var(--md-sys-typescale-title-large-text-decoration); text-decoration: var(--md-sys-typescale-title-large-text-decoration);
} }
.title-medium{ .title-medium {
font-family: var(--md-sys-typescale-title-medium-font-family-name); font-family: var(--md-sys-typescale-title-medium-font-family-name);
font-style: var(--md-sys-typescale-title-medium-font-family-style); font-style: var(--md-sys-typescale-title-medium-font-family-style);
font-weight: var(--md-sys-typescale-title-medium-font-weight); font-weight: var(--md-sys-typescale-title-medium-font-weight);
@ -138,7 +138,7 @@
text-transform: var(--md-sys-typescale-title-medium-text-transform); text-transform: var(--md-sys-typescale-title-medium-text-transform);
text-decoration: var(--md-sys-typescale-title-medium-text-decoration); text-decoration: var(--md-sys-typescale-title-medium-text-decoration);
} }
.title-small{ .title-small {
font-family: var(--md-sys-typescale-title-small-font-family-name); font-family: var(--md-sys-typescale-title-small-font-family-name);
font-style: var(--md-sys-typescale-title-small-font-family-style); font-style: var(--md-sys-typescale-title-small-font-family-style);
font-weight: var(--md-sys-typescale-title-small-font-weight); font-weight: var(--md-sys-typescale-title-small-font-weight);

View File

@ -1,18 +1,23 @@
{ {
"extends": "./node_modules/gts/tsconfig-google.json",
"compilerOptions": { "compilerOptions": {
"rootDir": ".", "target": "es5",
"outDir": "build", "lib": [
"allowSyntheticDefaultImports": true, "dom",
"dom.iterable",
"esnext"
],
"allowJs": true, "allowJs": true,
"skipLibCheck": true, "skipLibCheck": true,
"strict": false,
"forceConsistentCasingInFileNames": true,
"noEmit": true, "noEmit": true,
"incremental": true,
"esModuleInterop": true, "esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node", "moduleResolution": "node",
"resolveJsonModule": true, "resolveJsonModule": true,
"isolatedModules": true, "isolatedModules": true,
"jsx": "preserve", "jsx": "preserve",
"incremental": true,
"plugins": [ "plugins": [
{ {
"name": "next" "name": "next"
@ -20,8 +25,12 @@
] ]
}, },
"include": [ "include": [
"src/**/*.ts", "next-env.d.ts",
"test/**/*.ts", "**/*.ts",
"**/*.tsx",
".next/types/**/*.ts" ".next/types/**/*.ts"
],
"exclude": [
"node_modules"
] ]
} }