@uniai-fe/uds-primitives 0.2.1 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/styles.css +391 -81
- package/package.json +17 -8
- package/src/components/button/index.tsx +0 -2
- package/src/components/button/markup/Base.tsx +22 -1
- package/src/components/button/styles/button.scss +24 -2
- package/src/components/button/styles/variables.scss +4 -0
- package/src/components/button/types/index.ts +7 -0
- package/src/components/{input/img/calendar → calendar/img}/calendar.svg +5 -0
- package/src/components/calendar/index.tsx +5 -3
- package/src/components/calendar/markup/Core.tsx +67 -0
- package/src/components/calendar/markup/Icon.tsx +20 -0
- package/src/components/calendar/markup/Root.tsx +126 -0
- package/src/components/calendar/markup/index.tsx +24 -2
- package/src/components/calendar/markup/layout/Body.tsx +12 -0
- package/src/components/calendar/markup/layout/Container.tsx +43 -0
- package/src/components/calendar/markup/layout/Footer.tsx +12 -0
- package/src/components/calendar/markup/layout/Header.tsx +12 -0
- package/src/components/calendar/styles/index.scss +2 -0
- package/src/components/calendar/styles/layout.scss +21 -0
- package/src/components/calendar/styles/mantine-calendar.scss +240 -0
- package/src/components/calendar/types/calendar.ts +208 -0
- package/src/components/calendar/types/index.ts +1 -4
- package/src/components/calendar/utils/index.ts +1 -4
- package/src/components/calendar/utils/value-mapper.ts +24 -0
- package/src/components/checkbox/markup/Checkbox.tsx +31 -25
- package/src/components/dropdown/markup/index.tsx +10 -1
- package/src/components/input/hooks/index.ts +1 -0
- package/src/components/input/hooks/useAddress.ts +247 -0
- package/src/components/input/index.scss +5 -1
- package/src/components/input/markup/address/Button.tsx +65 -0
- package/src/components/input/markup/address/Template.tsx +135 -0
- package/src/components/input/markup/address/index.ts +9 -0
- package/src/components/input/markup/date/Template.tsx +181 -0
- package/src/components/input/markup/date/Trigger.tsx +79 -0
- package/src/components/input/markup/date/button/ApplyButton.tsx +38 -0
- package/src/components/input/markup/date/button/ClearButton.tsx +36 -0
- package/src/components/input/markup/date/button/TodayButton.tsx +36 -0
- package/src/components/input/markup/date/footer/Container.tsx +24 -0
- package/src/components/input/markup/date/footer/Template.tsx +36 -0
- package/src/components/input/markup/date/footer/UtilContainer.tsx +23 -0
- package/src/components/input/markup/date/footer/index.ts +3 -0
- package/src/components/input/markup/date/index.tsx +27 -0
- package/src/components/input/markup/foundation/Input.tsx +20 -1
- package/src/components/input/markup/index.tsx +4 -4
- package/src/components/input/styles/address.scss +24 -0
- package/src/components/input/styles/date.scss +45 -0
- package/src/components/input/styles/foundation.scss +28 -2
- package/src/components/input/styles/variables.scss +4 -0
- package/src/components/input/types/address.ts +249 -0
- package/src/components/input/types/date.ts +366 -0
- package/src/components/input/types/foundation.ts +6 -0
- package/src/components/input/types/index.ts +2 -1
- package/src/components/input/utils/address.ts +165 -0
- package/src/components/input/utils/date.ts +61 -0
- package/src/components/input/utils/index.tsx +2 -0
- package/src/components/pop-over/index.scss +1 -0
- package/src/components/pop-over/index.tsx +4 -0
- package/src/components/pop-over/markup/Content.tsx +77 -0
- package/src/components/pop-over/markup/Root.tsx +28 -0
- package/src/components/pop-over/markup/Trigger.tsx +26 -0
- package/src/components/pop-over/markup/index.tsx +17 -0
- package/src/components/pop-over/styles/base.scss +5 -0
- package/src/components/pop-over/styles/content.scss +24 -0
- package/src/components/pop-over/styles/index.scss +2 -0
- package/src/components/pop-over/types/index.ts +1 -0
- package/src/components/pop-over/types/pop-over.ts +86 -0
- package/src/components/radio/markup/Radio.tsx +10 -2
- package/src/components/radio/markup/RadioCard.tsx +6 -1
- package/src/components/radio/markup/RadioCardGroup.tsx +6 -1
- package/src/components/select/markup/Default.tsx +2 -0
- package/src/components/select/markup/foundation/Container.tsx +23 -0
- package/src/components/select/markup/multiple/Multiple.tsx +2 -0
- package/src/components/select/styles/select.scss +25 -2
- package/src/components/select/styles/variables.scss +4 -0
- package/src/components/select/types/props.ts +24 -5
- package/src/index.scss +1 -0
- package/src/index.tsx +3 -1
- package/src/init/mantine.css +5 -0
- package/src/init/mantine.ts +2 -0
- package/src/components/input/markup/calendar/Base.tsx +0 -329
- package/src/components/input/markup/calendar/index.tsx +0 -8
- package/src/components/input/styles/calendar.scss +0 -110
- package/src/components/input/styles/index.scss +0 -4
- package/src/components/input/types/calendar.ts +0 -208
- /package/src/components/{input/img/calendar → calendar/img}/chevron-down.svg +0 -0
- /package/src/components/{input/img/calendar → calendar/img}/chevron-left.svg +0 -0
- /package/src/components/{input/img/calendar → calendar/img}/chevron-right.svg +0 -0
- /package/src/components/{input/img/calendar → calendar/img}/chevron-up.svg +0 -0
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import clsx from "clsx";
|
|
4
|
+
import type { MouseEvent } from "react";
|
|
5
|
+
import { forwardRef } from "react";
|
|
6
|
+
import { Calendar } from "../../../calendar";
|
|
7
|
+
import { InputFoundation } from "../foundation";
|
|
8
|
+
import type { InputCalendarTriggerViewProps } from "../../types";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Input Date trigger field.
|
|
12
|
+
* @component
|
|
13
|
+
* @param {InputCalendarTriggerViewProps} props
|
|
14
|
+
* @param {string} [props.className] trigger className
|
|
15
|
+
* @param {string} [props.placeholder] placeholder
|
|
16
|
+
* @param {string} [props.displayValue] 표시 문자열
|
|
17
|
+
* @param {(event: MouseEvent<Element>) => void} [props.onClick] 클릭 핸들러
|
|
18
|
+
* @param {boolean} [props.disabled] disabled 여부
|
|
19
|
+
* @param {string} [props.id] input id
|
|
20
|
+
* @param {string} [props.name] form name
|
|
21
|
+
* @param {UseFormRegisterReturn} [props.register] RHF register
|
|
22
|
+
*/
|
|
23
|
+
const InputDateTrigger = forwardRef<
|
|
24
|
+
HTMLInputElement,
|
|
25
|
+
InputCalendarTriggerViewProps
|
|
26
|
+
>(
|
|
27
|
+
(
|
|
28
|
+
{
|
|
29
|
+
className,
|
|
30
|
+
placeholder,
|
|
31
|
+
displayValue,
|
|
32
|
+
onClick,
|
|
33
|
+
disabled,
|
|
34
|
+
id,
|
|
35
|
+
name,
|
|
36
|
+
register,
|
|
37
|
+
...restProps
|
|
38
|
+
},
|
|
39
|
+
ref,
|
|
40
|
+
) => {
|
|
41
|
+
/**
|
|
42
|
+
* Radix `asChild`가 주입한 onClick을 보존하기 위해 restProps.onClick을 병합한다.
|
|
43
|
+
* (Input Date 자체 onClick 계약도 함께 실행)
|
|
44
|
+
*/
|
|
45
|
+
const handleInputClick = (event: MouseEvent<HTMLInputElement>) => {
|
|
46
|
+
const rawOnClick = (restProps as Record<string, unknown>).onClick;
|
|
47
|
+
if (typeof rawOnClick === "function") {
|
|
48
|
+
(rawOnClick as (event: MouseEvent<HTMLInputElement>) => void)(event);
|
|
49
|
+
}
|
|
50
|
+
onClick?.(event as never);
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
return (
|
|
54
|
+
<InputFoundation.Base
|
|
55
|
+
{...restProps}
|
|
56
|
+
ref={ref}
|
|
57
|
+
value={displayValue}
|
|
58
|
+
readOnly
|
|
59
|
+
disabled={disabled}
|
|
60
|
+
id={id}
|
|
61
|
+
name={name ?? register?.name}
|
|
62
|
+
register={register}
|
|
63
|
+
placeholder={placeholder}
|
|
64
|
+
className={clsx("input-date-trigger-input", className)}
|
|
65
|
+
onClick={handleInputClick}
|
|
66
|
+
right={
|
|
67
|
+
// 토글 인터랙션은 input 단일 경로로 유지하고, 오른쪽 아이콘은 장식 요소로만 둔다.
|
|
68
|
+
<figure className="input-date-trigger-icon" aria-hidden="true">
|
|
69
|
+
<Calendar.Icon.Calendar />
|
|
70
|
+
</figure>
|
|
71
|
+
}
|
|
72
|
+
/>
|
|
73
|
+
);
|
|
74
|
+
},
|
|
75
|
+
);
|
|
76
|
+
|
|
77
|
+
InputDateTrigger.displayName = "InputDateTrigger";
|
|
78
|
+
|
|
79
|
+
export default InputDateTrigger;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import clsx from "clsx";
|
|
2
|
+
import { Button } from "../../../../button";
|
|
3
|
+
import type { InputCalendarApplyButtonProps } from "../../../types";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Calendar footer apply 버튼.
|
|
7
|
+
* @component
|
|
8
|
+
* @param {InputCalendarApplyButtonProps} props
|
|
9
|
+
* @param {string} [props.className] 추가 className
|
|
10
|
+
* @param {React.ReactNode} [props.children] override 라벨
|
|
11
|
+
* @param {React.ReactNode} [props.label] fallback 라벨
|
|
12
|
+
* @param {boolean} [props.disabled] disabled 여부
|
|
13
|
+
* @param {() => void} [props.onClick] 클릭 핸들러
|
|
14
|
+
*/
|
|
15
|
+
export default function InputDateApplyButton({
|
|
16
|
+
className,
|
|
17
|
+
label,
|
|
18
|
+
disabled,
|
|
19
|
+
onClick,
|
|
20
|
+
children,
|
|
21
|
+
}: InputCalendarApplyButtonProps) {
|
|
22
|
+
return (
|
|
23
|
+
<Button.Default
|
|
24
|
+
className={clsx("input-date-apply-button", className)}
|
|
25
|
+
priority="primary"
|
|
26
|
+
fill="solid"
|
|
27
|
+
size="large"
|
|
28
|
+
disabled={disabled}
|
|
29
|
+
onClick={onClick}
|
|
30
|
+
>
|
|
31
|
+
{
|
|
32
|
+
children ??
|
|
33
|
+
label ??
|
|
34
|
+
"적용하기" /* children 우선, 없으면 label/기본 라벨 */
|
|
35
|
+
}
|
|
36
|
+
</Button.Default>
|
|
37
|
+
);
|
|
38
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import clsx from "clsx";
|
|
2
|
+
import { Button } from "../../../../button";
|
|
3
|
+
import type { InputCalendarInlineButtonProps } from "../../../types";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Calendar footer clear 버튼.
|
|
7
|
+
* @component
|
|
8
|
+
* @param {InputCalendarInlineButtonProps} props
|
|
9
|
+
* @param {React.ReactNode} [props.children] 라벨
|
|
10
|
+
* @param {() => void} [props.onClick] 클릭 핸들러
|
|
11
|
+
* @param {boolean} [props.disabled] disabled 여부
|
|
12
|
+
* @param {string} [props.className] 확장 className
|
|
13
|
+
*/
|
|
14
|
+
export default function InputDateClearButton({
|
|
15
|
+
children,
|
|
16
|
+
onClick,
|
|
17
|
+
disabled,
|
|
18
|
+
className,
|
|
19
|
+
}: InputCalendarInlineButtonProps) {
|
|
20
|
+
return (
|
|
21
|
+
<Button.Default
|
|
22
|
+
className={clsx(
|
|
23
|
+
"input-date-action-button input-date-action-clear",
|
|
24
|
+
className,
|
|
25
|
+
)}
|
|
26
|
+
priority="tertiary"
|
|
27
|
+
fill="outlined"
|
|
28
|
+
size="small"
|
|
29
|
+
onClick={onClick}
|
|
30
|
+
disabled={disabled}
|
|
31
|
+
type="button"
|
|
32
|
+
>
|
|
33
|
+
{children ?? "삭제" /* 텍스트 미지정 시 기본 라벨 */}
|
|
34
|
+
</Button.Default>
|
|
35
|
+
);
|
|
36
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import clsx from "clsx";
|
|
2
|
+
import { Button } from "../../../../button";
|
|
3
|
+
import type { InputCalendarInlineButtonProps } from "../../../types";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Calendar footer today 버튼.
|
|
7
|
+
* @component
|
|
8
|
+
* @param {InputCalendarInlineButtonProps} props
|
|
9
|
+
* @param {React.ReactNode} [props.children] 라벨
|
|
10
|
+
* @param {() => void} [props.onClick] 클릭 핸들러
|
|
11
|
+
* @param {boolean} [props.disabled] disabled 여부
|
|
12
|
+
* @param {string} [props.className] className 확장
|
|
13
|
+
*/
|
|
14
|
+
export default function InputDateTodayButton({
|
|
15
|
+
children,
|
|
16
|
+
onClick,
|
|
17
|
+
disabled,
|
|
18
|
+
className,
|
|
19
|
+
}: InputCalendarInlineButtonProps) {
|
|
20
|
+
return (
|
|
21
|
+
<Button.Default
|
|
22
|
+
className={clsx(
|
|
23
|
+
"input-date-action-button input-date-action-today",
|
|
24
|
+
className,
|
|
25
|
+
)}
|
|
26
|
+
priority="secondary"
|
|
27
|
+
fill="solid"
|
|
28
|
+
size="small"
|
|
29
|
+
onClick={onClick}
|
|
30
|
+
disabled={disabled}
|
|
31
|
+
type="button"
|
|
32
|
+
>
|
|
33
|
+
{children ?? "오늘" /* default 라벨 */}
|
|
34
|
+
</Button.Default>
|
|
35
|
+
);
|
|
36
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import clsx from "clsx";
|
|
2
|
+
import type { InputCalendarFooterTemplateContainerProps } from "../../../types";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* FooterTemplate root container.
|
|
6
|
+
* @component
|
|
7
|
+
* @param {InputCalendarFooterTemplateContainerProps} props
|
|
8
|
+
* @param {React.ReactNode} [props.children] footer 내부 children
|
|
9
|
+
* @param {string} [props.className] container className
|
|
10
|
+
* @example
|
|
11
|
+
* <InputDateFooterTemplateContainer>
|
|
12
|
+
* <div>...</div>
|
|
13
|
+
* </InputDateFooterTemplateContainer>
|
|
14
|
+
*/
|
|
15
|
+
export default function InputDateFooterTemplateContainer({
|
|
16
|
+
children,
|
|
17
|
+
className,
|
|
18
|
+
}: InputCalendarFooterTemplateContainerProps) {
|
|
19
|
+
return (
|
|
20
|
+
<div className={clsx("input-date-footer-template", className)}>
|
|
21
|
+
{children}
|
|
22
|
+
</div>
|
|
23
|
+
);
|
|
24
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { InputCalendarFooterTemplateProps } from "../../../types";
|
|
2
|
+
import InputDateApplyButton from "../button/ApplyButton";
|
|
3
|
+
import InputDateClearButton from "../button/ClearButton";
|
|
4
|
+
import InputDateTodayButton from "../button/TodayButton";
|
|
5
|
+
import InputDateFooterTemplateContainer from "./Container";
|
|
6
|
+
import InputDateFooterUtilContainer from "./UtilContainer";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Calendar footer 기본 템플릿.
|
|
10
|
+
* @component
|
|
11
|
+
* @param {InputCalendarFooterTemplateProps} props
|
|
12
|
+
* @param {string} [props.className] root className
|
|
13
|
+
* @param {() => void} [props.onClear] clear 버튼 클릭 핸들러
|
|
14
|
+
* @param {() => void} [props.onToday] today 버튼 클릭 핸들러
|
|
15
|
+
* @param {() => void} [props.onApply] apply 버튼 클릭 핸들러
|
|
16
|
+
* @param {boolean} [props.disabled] 전체 버튼 disabled 여부
|
|
17
|
+
* @example
|
|
18
|
+
* <InputDateFooterTemplate onClear={onClear} onToday={onToday} onApply={onApply} />
|
|
19
|
+
*/
|
|
20
|
+
export default function InputDateFooterTemplate({
|
|
21
|
+
className,
|
|
22
|
+
onClear,
|
|
23
|
+
onToday,
|
|
24
|
+
onApply,
|
|
25
|
+
disabled,
|
|
26
|
+
}: InputCalendarFooterTemplateProps) {
|
|
27
|
+
return (
|
|
28
|
+
<InputDateFooterTemplateContainer className={className}>
|
|
29
|
+
<InputDateFooterUtilContainer>
|
|
30
|
+
<InputDateClearButton disabled={disabled} onClick={onClear} />
|
|
31
|
+
<InputDateTodayButton disabled={disabled} onClick={onToday} />
|
|
32
|
+
</InputDateFooterUtilContainer>
|
|
33
|
+
<InputDateApplyButton disabled={disabled} onClick={onApply} />
|
|
34
|
+
</InputDateFooterTemplateContainer>
|
|
35
|
+
);
|
|
36
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import clsx from "clsx";
|
|
2
|
+
import type { InputCalendarFooterUtilContainerProps } from "../../../types";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* FooterTemplate utility button container.
|
|
6
|
+
* @component
|
|
7
|
+
* @param {InputCalendarFooterUtilContainerProps} props
|
|
8
|
+
* @param {React.ReactNode} [props.children] util 버튼(children)
|
|
9
|
+
* @param {string} [props.className] container className
|
|
10
|
+
* @example
|
|
11
|
+
* <InputDateFooterUtilContainer>
|
|
12
|
+
* <Input.Date.Button.Clear />
|
|
13
|
+
* <Input.Date.Button.Today />
|
|
14
|
+
* </InputDateFooterUtilContainer>
|
|
15
|
+
*/
|
|
16
|
+
export default function InputDateFooterUtilContainer({
|
|
17
|
+
children,
|
|
18
|
+
className,
|
|
19
|
+
}: InputCalendarFooterUtilContainerProps) {
|
|
20
|
+
return (
|
|
21
|
+
<div className={clsx("input-date-footer-util", className)}>{children}</div>
|
|
22
|
+
);
|
|
23
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import "../../styles/date.scss";
|
|
2
|
+
import InputDateTemplate from "./Template";
|
|
3
|
+
import InputDateTrigger from "./Trigger";
|
|
4
|
+
import InputDateApplyButton from "./button/ApplyButton";
|
|
5
|
+
import InputDateClearButton from "./button/ClearButton";
|
|
6
|
+
import InputDateTodayButton from "./button/TodayButton";
|
|
7
|
+
import {
|
|
8
|
+
InputDateFooterTemplate,
|
|
9
|
+
InputDateFooterTemplateContainer,
|
|
10
|
+
InputDateFooterUtilContainer,
|
|
11
|
+
} from "./footer";
|
|
12
|
+
|
|
13
|
+
// Input.Date 네임스페이스: template/foundation 구성요소 집합
|
|
14
|
+
export const InputDate = {
|
|
15
|
+
Template: InputDateTemplate,
|
|
16
|
+
Trigger: InputDateTrigger,
|
|
17
|
+
Button: {
|
|
18
|
+
Apply: InputDateApplyButton,
|
|
19
|
+
Clear: InputDateClearButton,
|
|
20
|
+
Today: InputDateTodayButton,
|
|
21
|
+
},
|
|
22
|
+
Footer: {
|
|
23
|
+
Template: InputDateFooterTemplate,
|
|
24
|
+
Container: InputDateFooterTemplateContainer,
|
|
25
|
+
UtilContainer: InputDateFooterUtilContainer,
|
|
26
|
+
},
|
|
27
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import clsx from "clsx";
|
|
4
|
-
import type { PointerEvent as ReactPointerEvent } from "react";
|
|
4
|
+
import type { CSSProperties, PointerEvent as ReactPointerEvent } from "react";
|
|
5
5
|
import {
|
|
6
6
|
ChangeEvent,
|
|
7
7
|
FocusEvent,
|
|
@@ -14,6 +14,10 @@ import {
|
|
|
14
14
|
useState,
|
|
15
15
|
} from "react";
|
|
16
16
|
import type { InputProps } from "../../types";
|
|
17
|
+
import {
|
|
18
|
+
getFormFieldWidthAttr,
|
|
19
|
+
getFormFieldWidthValue,
|
|
20
|
+
} from "../../../form/utils/form-field";
|
|
17
21
|
|
|
18
22
|
import InputBaseSideSlot from "./SideSlot";
|
|
19
23
|
import InputBaseUtil from "./Utility";
|
|
@@ -56,6 +60,7 @@ const InputBase = forwardRef<HTMLInputElement, InputProps>(
|
|
|
56
60
|
size = "medium",
|
|
57
61
|
state: stateProp = "default",
|
|
58
62
|
block = false,
|
|
63
|
+
width,
|
|
59
64
|
left,
|
|
60
65
|
right,
|
|
61
66
|
clear,
|
|
@@ -166,6 +171,18 @@ const InputBase = forwardRef<HTMLInputElement, InputProps>(
|
|
|
166
171
|
};
|
|
167
172
|
|
|
168
173
|
const inputName = registerName ?? name;
|
|
174
|
+
const widthAttr =
|
|
175
|
+
width !== undefined
|
|
176
|
+
? getFormFieldWidthAttr(width)
|
|
177
|
+
: block
|
|
178
|
+
? "full"
|
|
179
|
+
: undefined;
|
|
180
|
+
const widthValue =
|
|
181
|
+
width !== undefined ? getFormFieldWidthValue(width) : undefined;
|
|
182
|
+
const containerStyle: CSSProperties | undefined =
|
|
183
|
+
widthValue !== undefined
|
|
184
|
+
? ({ ["--input-width" as const]: widthValue } as CSSProperties)
|
|
185
|
+
: undefined;
|
|
169
186
|
|
|
170
187
|
return (
|
|
171
188
|
<div
|
|
@@ -182,6 +199,8 @@ const InputBase = forwardRef<HTMLInputElement, InputProps>(
|
|
|
182
199
|
data-state={visualState}
|
|
183
200
|
data-block={block ? "true" : undefined}
|
|
184
201
|
{...(simulatedState ? { "data-simulated-state": simulatedState } : {})}
|
|
202
|
+
data-width={widthAttr}
|
|
203
|
+
style={containerStyle}
|
|
185
204
|
>
|
|
186
205
|
<div
|
|
187
206
|
className={clsx(
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
1
|
import { InputFoundation } from "./foundation";
|
|
4
2
|
import { InputText } from "./text";
|
|
5
|
-
import {
|
|
3
|
+
import { InputDate } from "./date";
|
|
4
|
+
import { InputAddress } from "./address";
|
|
6
5
|
|
|
7
6
|
export const Input = {
|
|
8
7
|
...InputFoundation,
|
|
9
8
|
Text: InputText,
|
|
10
|
-
|
|
9
|
+
Date: InputDate,
|
|
10
|
+
Address: InputAddress,
|
|
11
11
|
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
.input-address-container {
|
|
2
|
+
width: 100%;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.input-address-row {
|
|
6
|
+
width: 100%;
|
|
7
|
+
display: flex;
|
|
8
|
+
gap: var(--spacing-gap-5);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.input-address-lower {
|
|
12
|
+
margin-top: var(--spacing-gap-5);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// .input-address-button {
|
|
16
|
+
// }
|
|
17
|
+
|
|
18
|
+
.input-address-upper {
|
|
19
|
+
align-items: center;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.input-address-field {
|
|
23
|
+
width: 100%;
|
|
24
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
.input-date-field {
|
|
2
|
+
// Date 입력 영역은 trigger만 관리하고 캘린더 레이어는 calendar 모듈이 담당한다.
|
|
3
|
+
display: grid;
|
|
4
|
+
gap: var(--spacing-gap-5);
|
|
5
|
+
width: 100%;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.input-date-trigger-input {
|
|
9
|
+
width: 100%;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.input-date-trigger-icon {
|
|
13
|
+
margin: 0;
|
|
14
|
+
display: inline-flex;
|
|
15
|
+
align-items: center;
|
|
16
|
+
justify-content: center;
|
|
17
|
+
width: 28px;
|
|
18
|
+
height: 28px;
|
|
19
|
+
color: var(--color-label-alternative);
|
|
20
|
+
// 아이콘 영역 클릭은 input으로 위임한다.
|
|
21
|
+
pointer-events: none;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.input-date-footer-template {
|
|
25
|
+
// footer 템플릿은 input 스킨에서만 관리한다.
|
|
26
|
+
display: grid;
|
|
27
|
+
gap: var(--spacing-gap-5);
|
|
28
|
+
width: 100%;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.input-date-footer-util {
|
|
32
|
+
display: flex;
|
|
33
|
+
align-items: center;
|
|
34
|
+
justify-content: space-between;
|
|
35
|
+
gap: var(--spacing-gap-3);
|
|
36
|
+
width: 100%;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.input-date-action-button {
|
|
40
|
+
width: auto;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.input-date-apply-button {
|
|
44
|
+
width: 100%;
|
|
45
|
+
}
|
|
@@ -2,9 +2,35 @@
|
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: var(--spacing-gap-3);
|
|
5
|
-
width:
|
|
5
|
+
width: var(--input-width);
|
|
6
|
+
flex: var(--input-flex);
|
|
7
|
+
min-width: 0;
|
|
8
|
+
|
|
9
|
+
&[data-width="auto"] {
|
|
10
|
+
--input-width: auto;
|
|
11
|
+
--input-flex: 0 1 auto;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
&[data-width="fill"] {
|
|
15
|
+
--input-width: auto;
|
|
16
|
+
--input-flex: 1 1 0%;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&[data-width="full"],
|
|
20
|
+
&[data-block="true"] {
|
|
21
|
+
--input-width: 100%;
|
|
22
|
+
--input-flex: 0 0 100%;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&[data-width="fit"] {
|
|
26
|
+
--input-width: fit-content;
|
|
27
|
+
--input-flex: 0 0 auto;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&[data-width="custom"] {
|
|
31
|
+
--input-flex: 0 0 auto;
|
|
32
|
+
}
|
|
6
33
|
|
|
7
|
-
&[data-block="true"],
|
|
8
34
|
&--block {
|
|
9
35
|
width: 100%;
|
|
10
36
|
}
|