Merge branch 'dev' into dev-yj

This commit is contained in:
yjnoh 2024-10-30 13:20:02 +09:00
commit b81bef6506
9 changed files with 10901 additions and 559 deletions

10656
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
'use client'
import { useEffect, useState } from 'react'
export default function QSelectBox({ title = '', options, onChange, value }) {
export default function QSelectBox({ title = '', options, onChange, value, disabled = false }) {
const [openSelect, setOpenSelect] = useState(false)
const [selected, setSelected] = useState(title === '' ? options[0].name : title)
@ -15,7 +15,7 @@ export default function QSelectBox({ title = '', options, onChange, value }) {
}, [value])
return (
<div className={`sort-select ${openSelect ? 'active' : ''}`} onClick={() => setOpenSelect(!openSelect)}>
<div className={`sort-select ${openSelect ? 'active' : ''}`} onClick={disabled ? () => {} : () => setOpenSelect(!openSelect)}>
<p>{selected}</p>
<ul className="select-item-wrap">
{options?.map((option) => (

View File

@ -19,6 +19,7 @@ export default function Angle({ props }) {
className="input-origin block"
value={angle1}
ref={angle1Ref}
onFocus={(e) => (angle1Ref.current.value = '')}
onChange={(e) => onlyNumberWithDotInputChange(e, setAngle1)}
placeholder="45"
/>
@ -38,6 +39,7 @@ export default function Angle({ props }) {
className="input-origin block"
value={length1}
ref={length1Ref}
onFocus={(e) => (length1Ref.current.value = '')}
onChange={(e) => onlyNumberInputChange(e, setLength1)}
placeholder="3000"
/>

View File

@ -35,6 +35,7 @@ export default function Diagonal({ props }) {
className="input-origin block"
value={outerLineDiagonalLength}
ref={outerLineDiagonalLengthRef}
onFocus={(e) => (outerLineDiagonalLengthRef.current.value = '')}
onChange={(e) => onlyNumberInputChange(e, setOuterLineDiagonalLength)}
placeholder="3000"
/>
@ -56,6 +57,7 @@ export default function Diagonal({ props }) {
className="input-origin block"
value={length1}
ref={length1Ref}
onFocus={(e) => (length1Ref.current.value = '')}
onChange={(e) => onlyNumberInputChange(e, setLength1)}
placeholder="3000"
/>

View File

@ -55,6 +55,7 @@ export default function DoublePitch({ props }) {
className="input-origin block"
value={angle1}
ref={angle1Ref}
onFocus={(e) => (angle1Ref.current.value = '')}
onChange={(e) => onlyNumberWithDotInputChange(e, setAngle1)}
placeholder="45"
/>
@ -71,6 +72,7 @@ export default function DoublePitch({ props }) {
className="input-origin block"
value={length1}
ref={length1Ref}
onFocus={(e) => (length1Ref.current.value = '')}
onChange={(e) => onlyNumberInputChange(e, setLength1)}
placeholder="3000"
/>
@ -128,9 +130,9 @@ export default function DoublePitch({ props }) {
className="input-origin block"
value={angle2}
ref={angle2Ref}
onFocus={(e) => (angle2Ref.current.value = '')}
onChange={(e) => {
onlyNumberWithDotInputChange(e, setAngle2)
console.log(getLength2())
setLength2(getLength2())
}}
placeholder="45"
@ -153,6 +155,7 @@ export default function DoublePitch({ props }) {
className="input-origin block"
value={length2}
ref={length2Ref}
onFocus={(e) => (length2Ref.current.value = '')}
onChange={(e) => onlyNumberInputChange(e, setLength2)}
readOnly={true}
placeholder="3000"

View File

@ -18,6 +18,7 @@ export default function OuterLineWall({ props }) {
className="input-origin block"
value={length1}
ref={length1Ref}
onFocus={(e) => (length1Ref.current.value = '')}
onChange={(e) => onlyNumberInputChange(e, setLength1)}
placeholder="3000"
/>

View File

@ -15,6 +15,7 @@ export default function RightAngle({ props }) {
className="input-origin block"
value={length1}
ref={length1Ref}
onFocus={(e) => (length1Ref.current.value = '')}
onChange={(e) => onlyNumberInputChange(e, setLength1)}
placeholder="3000"
/>
@ -70,6 +71,7 @@ export default function RightAngle({ props }) {
className="input-origin block"
value={length2}
ref={length2Ref}
onFocus={(e) => (length2Ref.current.value = '')}
onChange={(e) => onlyNumberInputChange(e, setLength2)}
placeholder="3000"
/>

View File

@ -115,6 +115,12 @@ export function useOuterLineWall(id, propertiesId) {
setAngle2(0)
setOuterLineDiagonalLength(0)
const activeElem = document.activeElement
if (activeElem) {
activeElem.blur()
}
}
const mouseDown = (e) => {

782
yarn.lock

File diff suppressed because it is too large Load Diff