@team-monolith/cds 1.25.0 → 1.26.0
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/dist/patterns/Dropdown/DropdownContext.d.ts +1 -1
- package/dist/patterns/Dropdown/{DropdownItem/DropdownItem.d.ts → DropdownItemV2/DropdownItemV2.d.ts} +3 -3
- package/dist/patterns/Dropdown/{DropdownItem/DropdownItem.js → DropdownItemV2/DropdownItemV2.js} +3 -5
- package/dist/patterns/Dropdown/DropdownItemV2/index.d.ts +1 -0
- package/dist/patterns/Dropdown/DropdownItemV2/index.js +1 -0
- package/dist/patterns/Dropdown/{DropdownItem → DropdownItemV2}/selected.d.ts +1 -1
- package/dist/patterns/Dropdown/{DropdownMenu/DropdownMenu.d.ts → DropdownMenuV2/DropdownMenuV2.d.ts} +2 -2
- package/dist/patterns/Dropdown/{DropdownMenu/DropdownMenu.js → DropdownMenuV2/DropdownMenuV2.js} +2 -2
- package/dist/patterns/Dropdown/DropdownMenuV2/index.d.ts +1 -0
- package/dist/patterns/Dropdown/DropdownMenuV2/index.js +1 -0
- package/dist/patterns/Dropdown/{DropdownMenu → DropdownMenuV2}/style.js +1 -1
- package/dist/patterns/Dropdown/{Dropdown.d.ts → DropdownV2.d.ts} +5 -3
- package/dist/patterns/Dropdown/{Dropdown.js → DropdownV2.js} +5 -6
- package/dist/patterns/Dropdown/index.d.ts +3 -2
- package/dist/patterns/Dropdown/index.js +3 -2
- package/dist/patterns/LexicalEditor/nodes/ProblemInputNode/SettingForm/TextTypeDropdown.js +1 -2
- package/package.json +1 -1
- package/dist/patterns/Dropdown/DropdownItem/index.d.ts +0 -2
- package/dist/patterns/Dropdown/DropdownItem/index.js +0 -2
- package/dist/patterns/Dropdown/DropdownMenu/index.d.ts +0 -2
- package/dist/patterns/Dropdown/DropdownMenu/index.js +0 -2
- /package/dist/patterns/Dropdown/{DropdownItem → DropdownItemV2}/selected.js +0 -0
- /package/dist/patterns/Dropdown/{DropdownMenu → DropdownMenuV2}/style.d.ts +0 -0
package/dist/patterns/Dropdown/{DropdownItem/DropdownItem.d.ts → DropdownItemV2/DropdownItemV2.d.ts}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/** @jsxImportSource @emotion/react */
|
|
2
2
|
import { SerializedStyles } from "@emotion/react";
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { CheckboxInputProps } from "../../..";
|
|
5
|
+
import { DropdownMenuProps } from "../DropdownMenuV2";
|
|
6
6
|
export type DropdownItemType = "default" | "danger";
|
|
7
7
|
export type ItemState = Map<string, {
|
|
8
8
|
open: boolean;
|
|
@@ -47,4 +47,4 @@ export interface DropdownItemProps {
|
|
|
47
47
|
* [피그마](https://www.figma.com/file/PnQp3tPxiCjgsPZfLUaUL1/Codle-PD-Kit---Patterns?type=design&node-id=106-1900&t=FwczLZ1IVvskUVbT-0)
|
|
48
48
|
*/
|
|
49
49
|
declare const DropdownItem: React.ForwardRefExoticComponent<DropdownItemProps & React.RefAttributes<any>>;
|
|
50
|
-
export
|
|
50
|
+
export { DropdownItem };
|
package/dist/patterns/Dropdown/{DropdownItem/DropdownItem.js → DropdownItemV2/DropdownItemV2.js}
RENAMED
|
@@ -14,13 +14,11 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "@emotion/reac
|
|
|
14
14
|
import { css } from "@emotion/react";
|
|
15
15
|
import * as React from "react";
|
|
16
16
|
import styled from "@emotion/styled";
|
|
17
|
+
import { CheckboxInput, ArrowRightSLineIcon, HOVER, } from "../../..";
|
|
17
18
|
import { useContext, useRef } from "react";
|
|
18
|
-
import DropdownMenu from "../
|
|
19
|
+
import { DropdownMenu } from "../DropdownMenuV2";
|
|
19
20
|
import DropdownContext from "../DropdownContext";
|
|
20
21
|
import { getSelected, setSelected } from "./selected";
|
|
21
|
-
import CheckboxInput from "../../../components/CheckboxInput";
|
|
22
|
-
import { ArrowRightSLineIcon } from "../../../icons";
|
|
23
|
-
import { HOVER } from "../../../utils/hover";
|
|
24
22
|
const TYPE_TO_COLOR = (theme, type) => {
|
|
25
23
|
return {
|
|
26
24
|
default: theme.color.foreground.neutralBase,
|
|
@@ -125,4 +123,4 @@ const Item = styled.div(({ theme, selected, disabled }) => css `
|
|
|
125
123
|
background-color: ${theme.color.background.neutralBase};
|
|
126
124
|
`}
|
|
127
125
|
`);
|
|
128
|
-
export
|
|
126
|
+
export { DropdownItem };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./DropdownItemV2";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./DropdownItemV2";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { ItemState } from "./
|
|
2
|
+
import { ItemState } from "./DropdownItemV2";
|
|
3
3
|
/** index에 해당하는 아이템의 open state를 리턴합니다. */
|
|
4
4
|
export declare function getSelected(state: ItemState, index: string): boolean;
|
|
5
5
|
/** index에 해당하는 아이템의 open state를 true로 업데이트합니다.
|
package/dist/patterns/Dropdown/{DropdownMenu/DropdownMenu.d.ts → DropdownMenuV2/DropdownMenuV2.d.ts}
RENAMED
|
@@ -2,7 +2,7 @@ import { SerializedStyles } from "@emotion/react";
|
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { ModalProps } from "@mui/material";
|
|
4
4
|
import { OriginProps } from "./style";
|
|
5
|
-
import { ItemState } from "../
|
|
5
|
+
import { ItemState } from "../DropdownItemV2";
|
|
6
6
|
export declare const DROPDOWN_MENU_WIDTH = 124;
|
|
7
7
|
export declare const DROPDOWN_MENU_MAX_HEIGHT = 160;
|
|
8
8
|
export interface DropdownMenuProps extends Omit<ModalProps, "open" | "onClose" | "children"> {
|
|
@@ -34,4 +34,4 @@ export interface DropdownMenuProps extends Omit<ModalProps, "open" | "onClose" |
|
|
|
34
34
|
* [피그마](https://www.figma.com/file/PnQp3tPxiCjgsPZfLUaUL1/Codle-PD-Kit---Patterns?type=design&node-id=106-1921&t=FwczLZ1IVvskUVbT-0)
|
|
35
35
|
*/
|
|
36
36
|
declare const DropdownMenu: React.ForwardRefExoticComponent<Omit<DropdownMenuProps, "ref"> & React.RefAttributes<any>>;
|
|
37
|
-
export
|
|
37
|
+
export { DropdownMenu };
|
package/dist/patterns/Dropdown/{DropdownMenu/DropdownMenu.js → DropdownMenuV2/DropdownMenuV2.js}
RENAMED
|
@@ -14,10 +14,10 @@ import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
|
14
14
|
import styled from "@emotion/styled";
|
|
15
15
|
import { css } from "@emotion/react";
|
|
16
16
|
import React, { useContext } from "react";
|
|
17
|
+
import { shadows } from "../../..";
|
|
17
18
|
import { Modal as MuiModal, Grow as MuiGrow, Portal, } from "@mui/material";
|
|
18
19
|
import { ORIGIN_PROPS_TO_POSITION, ORIGIN_PROPS_TO_TRANSFORM, } from "./style";
|
|
19
20
|
import DropdownContext from "../DropdownContext";
|
|
20
|
-
import shadows from "../../../foundation/shadows";
|
|
21
21
|
export const DROPDOWN_MENU_WIDTH = 124;
|
|
22
22
|
export const DROPDOWN_MENU_MAX_HEIGHT = 160;
|
|
23
23
|
/**
|
|
@@ -89,4 +89,4 @@ const Menu = styled.div(({ theme }) => css `
|
|
|
89
89
|
// 최상위 메뉴의 mui modal 백드롭의 z-index는 1300입니다.
|
|
90
90
|
z-index: 1300;
|
|
91
91
|
`);
|
|
92
|
-
export
|
|
92
|
+
export { DropdownMenu };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./DropdownMenuV2";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./DropdownMenuV2";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { css } from "@emotion/react";
|
|
2
|
-
import { DROPDOWN_MENU_WIDTH } from "./
|
|
2
|
+
import { DROPDOWN_MENU_WIDTH } from "./DropdownMenuV2";
|
|
3
3
|
/** anchor를 기준으로 드롭다운 메뉴 원점 위치 스타일을 리턴합니다. */
|
|
4
4
|
export const ORIGIN_PROPS_TO_POSITION = (anchorOrigin, anchorRect, nested) => {
|
|
5
5
|
const { vertical, horizontal } = anchorOrigin;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/** @jsxImportSource @emotion/react */
|
|
2
2
|
import React from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { ButtonColor, ButtonSize } from "../..";
|
|
4
|
+
import { DropdownMenuProps } from "./DropdownMenuV2";
|
|
4
5
|
import { SerializedStyles } from "@emotion/react";
|
|
5
|
-
import { ButtonColor, ButtonSize } from "../../components/Button";
|
|
6
6
|
export interface DropdownProps {
|
|
7
7
|
className?: string;
|
|
8
8
|
component?: React.ElementType;
|
|
@@ -12,6 +12,8 @@ export interface DropdownProps {
|
|
|
12
12
|
color?: ButtonColor;
|
|
13
13
|
/** 버튼 컴포넌트 크기 */
|
|
14
14
|
size?: ButtonSize;
|
|
15
|
+
/** 버튼 컴포넌트 텍스트 굵음 여부 */
|
|
16
|
+
bold?: boolean;
|
|
15
17
|
/** 버튼 컴포넌트 내 좌측에 표기될 아이콘 */
|
|
16
18
|
startIcon?: React.ReactNode;
|
|
17
19
|
/** 버튼 컴포넌트 내 우측에 표기될 아이콘 */
|
|
@@ -33,4 +35,4 @@ export interface DropdownProps {
|
|
|
33
35
|
* [피그마](https://www.figma.com/file/PnQp3tPxiCjgsPZfLUaUL1/Codle-PD-Kit---Patterns?type=design&node-id=203-95329&t=FwczLZ1IVvskUVbT-0)
|
|
34
36
|
*/
|
|
35
37
|
declare const Dropdown: React.ForwardRefExoticComponent<DropdownProps & React.RefAttributes<any>>;
|
|
36
|
-
export
|
|
38
|
+
export { Dropdown };
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
2
2
|
/** @jsxImportSource @emotion/react */
|
|
3
3
|
import { forwardRef, useRef, useState } from "react";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { ArrowDropDownFillIcon } from "../../icons";
|
|
4
|
+
import { Button, ArrowDropDownFillIcon } from "../..";
|
|
5
|
+
import { DropdownMenu } from "./DropdownMenuV2";
|
|
7
6
|
/**
|
|
8
7
|
* [피그마](https://www.figma.com/file/PnQp3tPxiCjgsPZfLUaUL1/Codle-PD-Kit---Patterns?type=design&node-id=203-95329&t=FwczLZ1IVvskUVbT-0)
|
|
9
8
|
*/
|
|
10
9
|
const Dropdown = forwardRef((props, ref) => {
|
|
11
|
-
const { className, component: Component = "div", disabled, color = "primary", size = "medium", startIcon, endIcon = _jsx(ArrowDropDownFillIcon, {}), buttonCss, label, onClick, menuProps = {}, children, closeOnItemClick, } = props;
|
|
10
|
+
const { className, component: Component = "div", disabled, color = "primary", size = "medium", bold, startIcon, endIcon = _jsx(ArrowDropDownFillIcon, {}), buttonCss, label, onClick, menuProps = {}, children, closeOnItemClick, } = props;
|
|
12
11
|
const buttonProps = {
|
|
13
12
|
disabled,
|
|
14
13
|
color,
|
|
@@ -38,6 +37,6 @@ const Dropdown = forwardRef((props, ref) => {
|
|
|
38
37
|
});
|
|
39
38
|
(_a = menuProps === null || menuProps === void 0 ? void 0 : menuProps.onClose) === null || _a === void 0 ? void 0 : _a.call(menuProps, e);
|
|
40
39
|
};
|
|
41
|
-
return (_jsxs(Component, Object.assign({ className: className, ref: ref }, { children: [_jsx(Button, Object.assign({ css: buttonCss, ref: menuRef }, buttonProps, { label: label, onClick: handleClick, fullWidth: true })), _jsx(DropdownMenu, Object.assign({}, menuProps, { open: open, onClose: handleClose, anchorEl: menuRef.current, closeOnItemClick: closeOnItemClick, itemState: itemState, setItemState: setItemState }, { children: children }))] })));
|
|
40
|
+
return (_jsxs(Component, Object.assign({ className: className, ref: ref }, { children: [_jsx(Button, Object.assign({ css: buttonCss, ref: menuRef }, buttonProps, { label: label, bold: bold, onClick: handleClick, fullWidth: true })), _jsx(DropdownMenu, Object.assign({}, menuProps, { open: open, onClose: handleClose, anchorEl: menuRef.current, closeOnItemClick: closeOnItemClick, itemState: itemState, setItemState: setItemState }, { children: children }))] })));
|
|
42
41
|
});
|
|
43
|
-
export
|
|
42
|
+
export { Dropdown };
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export * from "./
|
|
2
|
-
export
|
|
1
|
+
export * from "./DropdownV2";
|
|
2
|
+
export * from "./DropdownItemV2";
|
|
3
|
+
export * from "./DropdownMenuV2";
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export * from "./
|
|
2
|
-
export
|
|
1
|
+
export * from "./DropdownV2";
|
|
2
|
+
export * from "./DropdownItemV2";
|
|
3
|
+
export * from "./DropdownMenuV2";
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Controller } from "react-hook-form";
|
|
3
|
-
import Dropdown from "../../../../Dropdown";
|
|
4
3
|
import { css, useTheme } from "@emotion/react";
|
|
5
|
-
import DropdownItem from "
|
|
4
|
+
import { Dropdown, DropdownItem } from "../../../../..";
|
|
6
5
|
export default function TextTypeDropdown(props) {
|
|
7
6
|
const theme = useTheme();
|
|
8
7
|
const { index, control, disabled } = props;
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|