@team-monolith/cds 1.124.0 → 1.125.1

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.
@@ -145,7 +145,8 @@ const COLOR_TO_BUTTON_STYLE = (theme, color, disabled) => ({
145
145
  const SIZE_TO_BUTTON_STYLE = {
146
146
  large: css `
147
147
  min-width: 100px;
148
- padding: 16px 20px;
148
+ height: 56px;
149
+ padding: 0 20px;
149
150
  gap: 10px;
150
151
  border-radius: 12px;
151
152
 
@@ -156,7 +157,8 @@ const SIZE_TO_BUTTON_STYLE = {
156
157
  `,
157
158
  medium: css `
158
159
  min-width: 82px;
159
- padding: 14px 16px;
160
+ height: 48px;
161
+ padding: 0 16px;
160
162
  gap: 8px;
161
163
  border-radius: 10px;
162
164
 
@@ -167,7 +169,8 @@ const SIZE_TO_BUTTON_STYLE = {
167
169
  `,
168
170
  small: css `
169
171
  min-width: 64px;
170
- padding: 10px 12px;
172
+ height: 36px;
173
+ padding: 0 12px;
171
174
  gap: 8px;
172
175
  border-radius: 8px;
173
176
 
@@ -178,7 +181,8 @@ const SIZE_TO_BUTTON_STYLE = {
178
181
  `,
179
182
  xsmall: css `
180
183
  min-width: 52px;
181
- padding: 6px 8px;
184
+ height: 28px;
185
+ padding: 0 8px;
182
186
  gap: 4px;
183
187
  border-radius: 6px;
184
188
 
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+ export declare const CustomMicrosoftIcon: React.ForwardRefExoticComponent<{
3
+ className?: string;
4
+ } & React.RefAttributes<SVGSVGElement>>;
5
+ export declare const customMicrosoftSvg: string;
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { forwardRef } from "react";
3
+ import svgImport from "./microsoft.svg";
4
+ export const CustomMicrosoftIcon = forwardRef(function CustomMicrosoftIcon(props, ref) {
5
+ return (_jsxs("svg", Object.assign({ width: 24, height: 24, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ref: ref }, props, { children: [_jsx("path", { d: "M0 0H7.54294V7.54294H0V0Z", fill: "#F35325" }), _jsx("path", { d: "M0 8.29039H7.54294V15.8333H0V8.29039Z", fill: "#05A6F0" }), _jsx("path", { d: "M8.29039 0H15.8333V7.54294H8.29039V0Z", fill: "#81BC06" }), _jsx("path", { d: "M8.29039 8.29039H15.8333V15.8333H8.29039V8.29039Z", fill: "#FFBA08" })] })));
6
+ });
7
+ export const customMicrosoftSvg = svgImport;
@@ -47,6 +47,7 @@ export * from "./Material";
47
47
  export * from "./MedalBronze";
48
48
  export * from "./MedalGold";
49
49
  export * from "./MedalSilver";
50
+ export * from "./Microsoft";
50
51
  export * from "./Pro";
51
52
  export * from "./Problem";
52
53
  export * from "./PythonColor";
@@ -47,6 +47,7 @@ export * from "./Material";
47
47
  export * from "./MedalBronze";
48
48
  export * from "./MedalGold";
49
49
  export * from "./MedalSilver";
50
+ export * from "./Microsoft";
50
51
  export * from "./Pro";
51
52
  export * from "./Problem";
52
53
  export * from "./PythonColor";
@@ -0,0 +1,6 @@
1
+ <svg width="24" height="24" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M0 0H7.54294V7.54294H0V0Z" fill="#F35325"/>
3
+ <path d="M0 8.29039H7.54294V15.8333H0V8.29039Z" fill="#05A6F0"/>
4
+ <path d="M8.29039 0H15.8333V7.54294H8.29039V0Z" fill="#81BC06"/>
5
+ <path d="M8.29039 8.29039H15.8333V15.8333H8.29039V8.29039Z" fill="#FFBA08"/>
6
+ </svg>
@@ -19,10 +19,15 @@ import { useContext, useId, useRef } from "react";
19
19
  import { DropdownMenu } from "../DropdownMenu";
20
20
  import { DropdownContext } from "../DropdownContext";
21
21
  import { getSelected, setSelected } from "./selected";
22
- const TYPE_TO_COLOR = (theme, type) => ({
23
- default: theme.color.foreground.neutralBase,
24
- danger: theme.color.foreground.danger,
25
- })[type];
22
+ const TYPE_TO_COLOR = (theme, type, disabled) => disabled
23
+ ? {
24
+ default: theme.color.foreground.neutralBaseDisabled,
25
+ danger: theme.color.foreground.dangerDisabled,
26
+ }[type]
27
+ : {
28
+ default: theme.color.foreground.neutralBase,
29
+ danger: theme.color.foreground.danger,
30
+ }[type];
26
31
  /**
27
32
  * [피그마](https://www.figma.com/file/PnQp3tPxiCjgsPZfLUaUL1/Codle-PD-Kit---Patterns?type=design&node-id=106-1900&t=FwczLZ1IVvskUVbT-0)
28
33
  */
@@ -62,16 +67,16 @@ const DropdownItem = React.forwardRef(function DropdownItem(props, ref) {
62
67
  }
63
68
  : {}), { children: _jsxs(Item, { ref: itemRef, disabled: disabled, selected: isSubMenuShowed || Boolean(active), children: [_jsxs(LeftWrapper, { children: [checkbox && (_jsx(StyledCheckboxInput, Object.assign({}, checkboxProps, { disabled: disabled, onClick: (e) => {
64
69
  e.stopPropagation();
65
- } }))), startIcon && (_jsx(IconDiv, { type: type, preserveIconColor: preserveIconColor, children: startIcon })), _jsx(OverflowTooltip, { childrenCss: css `
70
+ } }))), startIcon && (_jsx(IconDiv, { type: type, preserveIconColor: preserveIconColor, disabled: Boolean(disabled), children: startIcon })), _jsx(OverflowTooltip, { childrenCss: css `
66
71
  flex: 1;
67
72
  min-width: 0;
68
73
  overflow: hidden;
69
74
  font-size: 14px;
70
75
  font-weight: 400;
71
76
  font-family: ${theme.fontFamily.ui};
72
- color: ${TYPE_TO_COLOR(theme, type)};
77
+ color: ${TYPE_TO_COLOR(theme, type, Boolean(disabled))};
73
78
  ${labelCss}
74
- `, text: label })] }), endIcon && (_jsx(IconDiv, { type: type, preserveIconColor: preserveIconColor, children: endIcon })), !endIcon && isSubMenuExist && (_jsx(IconDiv, { type: type, preserveIconColor: preserveIconColor, children: _jsx(ArrowRightSLineIcon, {}) }))] }) })), isSubMenuExist && (_jsx(DropdownContext.Provider, { value: {
79
+ `, text: label })] }), endIcon && (_jsx(IconDiv, { type: type, preserveIconColor: preserveIconColor, disabled: false, children: endIcon })), !endIcon && isSubMenuExist && (_jsx(IconDiv, { type: type, preserveIconColor: preserveIconColor, disabled: false, children: _jsx(ArrowRightSLineIcon, {}) }))] }) })), isSubMenuExist && (_jsx(DropdownContext.Provider, { value: {
75
80
  open,
76
81
  onCloseOnItemClick,
77
82
  nestedIndex: absItemIndex,
@@ -86,8 +91,8 @@ const StyledCheckboxInput = styled(CheckboxInput) `
86
91
  margin: 4px;
87
92
  `;
88
93
  const IconDiv = styled("div", {
89
- shouldForwardProp: (prop) => prop !== "preserveIconColor",
90
- })(({ theme, type, preserveIconColor }) => css `
94
+ shouldForwardProp: (prop) => prop !== "preserveIconColor" && prop !== "disabled",
95
+ })(({ theme, type, preserveIconColor, disabled }) => css `
91
96
  width: 14px;
92
97
  height: 14px;
93
98
  svg {
@@ -97,7 +102,7 @@ const IconDiv = styled("div", {
97
102
  ${!preserveIconColor &&
98
103
  css `
99
104
  path {
100
- fill: ${TYPE_TO_COLOR(theme, type)};
105
+ fill: ${TYPE_TO_COLOR(theme, type, disabled)};
101
106
  }
102
107
  `}
103
108
  }
@@ -133,8 +138,6 @@ const Item = styled.div(({ theme, selected, disabled }) => css `
133
138
  ${disabled &&
134
139
  css `
135
140
  cursor: auto;
136
- // mui MenuItem-disabled의 opacity: 0.38을 참고하여 적용합니다.
137
- opacity: 0.38;
138
141
  background-color: ${theme.color.background.neutralBase};
139
142
  `}
140
143
  `);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@team-monolith/cds",
3
- "version": "1.124.0",
3
+ "version": "1.125.1",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "sideEffects": false,