@wishket/design-system 1.12.2 → 1.13.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.
@@ -56,6 +56,6 @@ declare const GNBList: {
56
56
  SubList: ({ children }: {
57
57
  children?: import("react").ReactNode;
58
58
  }) => import("react/jsx-runtime").JSX.Element;
59
- Item: ({ hasNew, children, className, ...rest }: import("./GNBList.types").GNBListItemProps) => import("react/jsx-runtime").JSX.Element;
59
+ Item: ({ hasNew, children, className, textClassName, ...rest }: import("./GNBList.types").GNBListItemProps) => import("react/jsx-runtime").JSX.Element;
60
60
  };
61
61
  export default GNBList;
@@ -37,5 +37,5 @@ declare const SubList: ({ children }: PropsWithChildren) => import("react/jsx-ru
37
37
  * @param {() => void} [props.onClick] - 클릭 핸들러
38
38
  * @param {boolean} [props.isSelected] - 선택 상태 여부
39
39
  */
40
- declare const Item: ({ hasNew, children, className, ...rest }: GNBListItemProps) => import("react/jsx-runtime").JSX.Element;
40
+ declare const Item: ({ hasNew, children, className, textClassName, ...rest }: GNBListItemProps) => import("react/jsx-runtime").JSX.Element;
41
41
  export { Root, UserInfo, List, SubList, Item };
@@ -128,12 +128,12 @@ const GNBListContext = /*#__PURE__*/ createContext({
128
128
  ]
129
129
  }),
130
130
  type === 'sub' && /*#__PURE__*/ jsx(Box, {
131
- className: twMerge('absolute flex h-auto w-[200px] flex-col overflow-hidden rounded-xl bg-w-white py-[13px] shadow-graymedium ', className),
131
+ className: twMerge('absolute flex h-auto w-[200px] flex-col overflow-hidden rounded-xl bg-w-white py-3 shadow-graymedium ', className),
132
132
  "data-testid": "design-system-gnb-list--root-sub",
133
133
  children: childrenWithDivider
134
134
  }),
135
135
  type === 'user' && /*#__PURE__*/ jsx(Box, {
136
- className: twMerge('absolute flex w-full flex-col bg-w-white pb-[14px] pt-[22px] desktop:w-[280px] desktop:rounded-xl desktop:shadow-graymedium', className),
136
+ className: twMerge('absolute flex w-full flex-col bg-w-white pb-3 pt-5 desktop:w-[280px] desktop:rounded-xl desktop:shadow-graymedium', className),
137
137
  "data-testid": "design-system-gnb-list--root-user",
138
138
  children: childrenWithDivider
139
139
  })
@@ -214,10 +214,11 @@ const GNBListContext = /*#__PURE__*/ createContext({
214
214
  * @param {() => void} [props.onClick] - 클릭 핸들러
215
215
  * @param {boolean} [props.isSelected] - 선택 상태 여부
216
216
  */ const Item = (_param)=>{
217
- var { hasNew = false, children, className } = _param, rest = _object_without_properties(_param, [
217
+ var { hasNew = false, children, className, textClassName } = _param, rest = _object_without_properties(_param, [
218
218
  "hasNew",
219
219
  "children",
220
- "className"
220
+ "className",
221
+ "textClassName"
221
222
  ]);
222
223
  const { type } = useContext(GNBListContext);
223
224
  return /*#__PURE__*/ jsxs(Box, _object_spread_props(_object_spread({
@@ -227,6 +228,8 @@ const GNBListContext = /*#__PURE__*/ createContext({
227
228
  children: [
228
229
  /*#__PURE__*/ jsx(Typography, {
229
230
  variant: "body1",
231
+ className: textClassName,
232
+ "data-testid": `design-system-gnb-list--${type}-item-text-${children}`,
230
233
  children: children
231
234
  }),
232
235
  hasNew && /*#__PURE__*/ jsx(NewBadge, {
@@ -12,4 +12,5 @@ export interface UserInfoProps extends PropsWithChildren {
12
12
  }
13
13
  export interface GNBListItemProps extends ComponentPropsWithoutRef<'div'> {
14
14
  hasNew?: boolean;
15
+ textClassName?: string;
15
16
  }
@@ -130,12 +130,12 @@ const GNBListContext = /*#__PURE__*/ react.createContext({
130
130
  ]
131
131
  }),
132
132
  type === 'sub' && /*#__PURE__*/ jsxRuntime.jsx(Box.default, {
133
- className: tailwindMerge.twMerge('absolute flex h-auto w-[200px] flex-col overflow-hidden rounded-xl bg-w-white py-[13px] shadow-graymedium ', className),
133
+ className: tailwindMerge.twMerge('absolute flex h-auto w-[200px] flex-col overflow-hidden rounded-xl bg-w-white py-3 shadow-graymedium ', className),
134
134
  "data-testid": "design-system-gnb-list--root-sub",
135
135
  children: childrenWithDivider
136
136
  }),
137
137
  type === 'user' && /*#__PURE__*/ jsxRuntime.jsx(Box.default, {
138
- className: tailwindMerge.twMerge('absolute flex w-full flex-col bg-w-white pb-[14px] pt-[22px] desktop:w-[280px] desktop:rounded-xl desktop:shadow-graymedium', className),
138
+ className: tailwindMerge.twMerge('absolute flex w-full flex-col bg-w-white pb-3 pt-5 desktop:w-[280px] desktop:rounded-xl desktop:shadow-graymedium', className),
139
139
  "data-testid": "design-system-gnb-list--root-user",
140
140
  children: childrenWithDivider
141
141
  })
@@ -216,10 +216,11 @@ const GNBListContext = /*#__PURE__*/ react.createContext({
216
216
  * @param {() => void} [props.onClick] - 클릭 핸들러
217
217
  * @param {boolean} [props.isSelected] - 선택 상태 여부
218
218
  */ const Item = (_param)=>{
219
- var { hasNew = false, children, className } = _param, rest = _object_without_properties(_param, [
219
+ var { hasNew = false, children, className, textClassName } = _param, rest = _object_without_properties(_param, [
220
220
  "hasNew",
221
221
  "children",
222
- "className"
222
+ "className",
223
+ "textClassName"
223
224
  ]);
224
225
  const { type } = react.useContext(GNBListContext);
225
226
  return /*#__PURE__*/ jsxRuntime.jsxs(Box.default, _object_spread_props(_object_spread({
@@ -229,6 +230,8 @@ const GNBListContext = /*#__PURE__*/ react.createContext({
229
230
  children: [
230
231
  /*#__PURE__*/ jsxRuntime.jsx(Typography.default, {
231
232
  variant: "body1",
233
+ className: textClassName,
234
+ "data-testid": `design-system-gnb-list--${type}-item-text-${children}`,
232
235
  children: children
233
236
  }),
234
237
  hasNew && /*#__PURE__*/ jsxRuntime.jsx(NewBadge.default, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wishket/design-system",
3
- "version": "1.12.2",
3
+ "version": "1.13.1",
4
4
  "type": "module",
5
5
  "description": "Wishket Design System",
6
6
  "main": "dist/index.js",