From 2c4d9b1ab5e53c9d63b3d9f294660f3c13911035 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Mon, 3 Jul 2023 19:22:45 -0700 Subject: [PATCH] Make things that should be bound, bound --- components/common/Select/index.module.scss | 4 ++++ components/common/SelectWithInput/index.tsx | 2 ++ components/mastery/AwakeningSelectWithInput/index.tsx | 2 ++ components/mastery/AxSelect/index.tsx | 4 ++++ components/mastery/ExtendedMasterySelect/index.tsx | 2 ++ components/weapon/WeaponKeySelect/index.tsx | 3 +++ components/weapon/WeaponModal/index.module.scss | 1 + 7 files changed, 18 insertions(+) diff --git a/components/common/Select/index.module.scss b/components/common/Select/index.module.scss index 543cf822..93b8eaa1 100644 --- a/components/common/Select/index.module.scss +++ b/components/common/Select/index.module.scss @@ -50,6 +50,10 @@ &:hover { background-color: var(--select-contained-bg-hover); + + &.disabled { + background-color: var(--select-contained-bg); + } } } diff --git a/components/common/SelectWithInput/index.tsx b/components/common/SelectWithInput/index.tsx index dbecfb07..d6caaa41 100644 --- a/components/common/SelectWithInput/index.tsx +++ b/components/common/SelectWithInput/index.tsx @@ -181,6 +181,7 @@ const SelectWithInput = ({ value={`${currentItemSkill ? currentItemSkill.id : 0}`} open={open} trigger={{ + bound: true, className: 'grow', }} disabled={selectDisabled} @@ -200,6 +201,7 @@ const SelectWithInput = ({ })} wrapperClassName="fullHeight" type="number" + bound={true} placeholder={rangeString()} min={currentItemSkill?.minValue} max={currentItemSkill?.maxValue} diff --git a/components/mastery/AwakeningSelectWithInput/index.tsx b/components/mastery/AwakeningSelectWithInput/index.tsx index 7ce1956c..9a312fa0 100644 --- a/components/mastery/AwakeningSelectWithInput/index.tsx +++ b/components/mastery/AwakeningSelectWithInput/index.tsx @@ -189,6 +189,7 @@ const AwakeningSelectWithInput = ({ onOpenChange={changeOpen} onClose={onClose} trigger={{ + bound: true, className: 'grow', }} overlayVisible={false} @@ -204,6 +205,7 @@ const AwakeningSelectWithInput = ({ currentAwakening === undefined || currentAwakening.id === '0', })} wrapperClassName="fullHeight" + bound={true} type="number" placeholder={rangeString()} min={1} diff --git a/components/mastery/AxSelect/index.tsx b/components/mastery/AxSelect/index.tsx index a1284363..7e6e78af 100644 --- a/components/mastery/AxSelect/index.tsx +++ b/components/mastery/AxSelect/index.tsx @@ -413,6 +413,7 @@ const AXSelect = (props: Props) => { value={`${primaryAxModifier}`} open={openAX1} trigger={{ + bound: true, className: 'grow', }} onClose={() => onClose(1)} @@ -429,6 +430,7 @@ const AXSelect = (props: Props) => { fieldsetClassName={classNames({ hidden: primaryAxModifier < 0, })} + bound={true} value={ props.currentSkills && props.currentSkills[0] ? props.currentSkills[0].strength @@ -449,6 +451,7 @@ const AXSelect = (props: Props) => { value={`${secondaryAxModifier}`} open={openAX2} trigger={{ + bound: true, className: 'grow', }} onClose={() => onClose(2)} @@ -465,6 +468,7 @@ const AXSelect = (props: Props) => { fieldsetClassName={classNames({ hidden: secondaryAxModifier < 0, })} + bound={true} value={ props.currentSkills && props.currentSkills[1] ? props.currentSkills[1].strength diff --git a/components/mastery/ExtendedMasterySelect/index.tsx b/components/mastery/ExtendedMasterySelect/index.tsx index 3d0d5aab..724fa624 100644 --- a/components/mastery/ExtendedMasterySelect/index.tsx +++ b/components/mastery/ExtendedMasterySelect/index.tsx @@ -135,6 +135,7 @@ const ExtendedMasterySelect = ({ onOpenChange={() => changeOpen('left')} onClose={onClose} trigger={{ + bound: true, className: classNames({ left: true, modal: true, @@ -154,6 +155,7 @@ const ExtendedMasterySelect = ({ onClose={onClose} overlayVisible={false} trigger={{ + bound: true, className: classNames({ right: true, modal: true, diff --git a/components/weapon/WeaponKeySelect/index.tsx b/components/weapon/WeaponKeySelect/index.tsx index ab8ba831..f5e26b80 100644 --- a/components/weapon/WeaponKeySelect/index.tsx +++ b/components/weapon/WeaponKeySelect/index.tsx @@ -154,6 +154,9 @@ const WeaponKeySelect = React.forwardRef( onClose={onClose} onOpenChange={onOpenChange} onValueChange={handleChange} + trigger={{ + bound: true, + }} ref={ref} overlayVisible={false} > diff --git a/components/weapon/WeaponModal/index.module.scss b/components/weapon/WeaponModal/index.module.scss index e050b603..73fd4099 100644 --- a/components/weapon/WeaponModal/index.module.scss +++ b/components/weapon/WeaponModal/index.module.scss @@ -3,6 +3,7 @@ flex-direction: column; gap: $unit * 4; padding: 0 $unit-4x; + margin-bottom: $unit-fourth; section { display: flex;