HOTFIXES: я забыл

This commit is contained in:
doryan04 2024-02-09 00:18:34 +04:00
parent acb9112c95
commit 6ee10e0fa2
8 changed files with 1112 additions and 853 deletions

View File

@ -2,6 +2,5 @@
<profile version="1.0"> <profile version="1.0">
<option name="myName" value="Project Default" /> <option name="myName" value="Project Default" />
<inspection_tool class="ES6PreferShortImport" enabled="false" level="WARNING" enabled_by_default="false" /> <inspection_tool class="ES6PreferShortImport" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
</profile> </profile>
</component> </component>

View File

@ -13,7 +13,7 @@ This repository is including and will be including components, enumerates in tab
- [X] Switches - [X] Switches
- [ ] Chips - [ ] Chips
- [x] Icon - [x] Icon
- [x] Ripple Effect - [x] Ripples Effect
- [ ] Dividers (WIP) - [ ] Dividers (WIP)
- [x] Badges - [x] Badges
- [ ] Select field - [ ] Select field

View File

@ -4,7 +4,7 @@ export { Badge } from './badge/badge';
export { Divider } from './divider/divider'; export { Divider } from './divider/divider';
export { Container } from './container/container'; export { Container } from './container/container';
export { RippleArea } from './ripple/ripple-area'; export { RippleArea } from './ripple/ripple-area';
export { Ripples, Ripple } from './ripple/ripple'; export { Ripples, Ripples } from './ripple/ripples';
export { FAB } from './button-components/fab/fab'; export { FAB } from './button-components/fab/fab';
export { Radio } from './input-components/radio/radio'; export { Radio } from './input-components/radio/radio';
export { Switch } from './input-components/switch/switch'; export { Switch } from './input-components/switch/switch';

View File

@ -8,8 +8,7 @@ import React, {
useRef, useRef,
useState, useState,
} from 'react'; } from 'react';
import { Ripple } from './ripple'; import { Ripples, Ripple } from './ripples';
import { Ripples } from './ripple';
import { RippleAreaProps } from './ripple.types'; import { RippleAreaProps } from './ripple.types';
import { InteractionEventsType } from './hooks/useRippleEffect'; import { InteractionEventsType } from './hooks/useRippleEffect';
@ -24,11 +23,10 @@ const RippleArea = forwardRef(
uniqueKey = useRef<number>(0), uniqueKey = useRef<number>(0),
uniqueId = useId(); uniqueId = useId();
const extraClassStyles = props.className const extraClassStyles =
? `m3 m3-ripple-domain ${props.className}`.trimEnd() `m3 m3-ripple-domain ${props.className ?? ''}`.trimEnd();
: 'm3 m3-ripple-domain';
const start = ( const createRipple = (
event: InteractionEventsType, event: InteractionEventsType,
cb: (state: boolean) => void, cb: (state: boolean) => void,
): void => { ): void => {
@ -94,7 +92,7 @@ const RippleArea = forwardRef(
uniqueKey.current += 1; uniqueKey.current += 1;
}; };
const stop = ( const removeRipple = (
_event: InteractionEventsType, _event: InteractionEventsType,
cb: (state: boolean) => void, cb: (state: boolean) => void,
) => { ) => {
@ -114,10 +112,10 @@ const RippleArea = forwardRef(
useImperativeHandle( useImperativeHandle(
ref, ref,
() => ({ () => ({
start, start: createRipple,
stop, stop: removeRipple,
}), }),
[start, stop], [createRipple, removeRipple],
); );
return ( return (

View File

@ -78,4 +78,4 @@ const Ripple = ({
); );
}; };
export { Ripple, Ripples }; export { Ripples, Ripple };

View File

@ -10,29 +10,14 @@ div.m3.m3-segmented-buttons
border-radius: 0 border-radius: 0
box-sizing: border-box box-sizing: border-box
height: 40px height: 40px
min-width: 108px
&
border: 1px solid var(--md-sys-color-outline) border: 1px solid var(--md-sys-color-outline)
border-right: 0.5px
border-left: 0.5px &:not(:first-child)
border-left-style: solid margin-left: -1px
border-right-style: solid
border-left-color: var(--md-sys-color-outline)
border-right-color: var(--md-sys-color-outline)
min-width: 107px
&:first-child &:first-child
border: 1px solid var(--md-sys-color-outline)
border-right: 0.5px
border-right-style: solid
border-right-color: var(--md-sys-color-outline)
min-width: 108px - 0.5px
border-radius: 20px 0 0 20px border-radius: 20px 0 0 20px
&:last-child &:last-child
border: 1px solid var(--md-sys-color-outline)
border-left: 0.5px
border-left-style: solid
border-left-color: var(--md-sys-color-outline)
min-width: 108px - 0.5px
border-radius: 0 20px 20px 0 border-radius: 0 20px 20px 0

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long