@shoplflow/base 0.7.2 → 0.10.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.
@@ -5,11 +5,8 @@ import type { BorderRadiusTokens, ColorTokens } from '../../styles';
5
5
  * HTML 태그에 대한 타입
6
6
  */
7
7
  export type StringElementType = ElementType & string;
8
- /**
9
- * Ref를 제외한 HTMLProps를 반환합니다.
10
- * Generic으로 HTML 태그를 받습니다.
11
- */
12
- export type HTMLPropsWithOutRef<T extends StringElementType> = ComponentPropsWithoutRef<T>;
8
+ export type HTMLPropsWithoutRef<T extends StringElementType> = ComponentPropsWithoutRef<T>;
9
+ export type PolymorphicRef<T extends React.ElementType> = React.ComponentPropsWithRef<T>['ref'];
13
10
  export interface DisableProps {
14
11
  /**
15
12
  * 비활성화 여부를 설정합니다.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shoplflow/base",
3
- "version": "0.7.2",
3
+ "version": "0.10.0",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "module": "dist/index.mjs",
@@ -32,7 +32,6 @@
32
32
  "@babel/core": "^7.22.19",
33
33
  "@babel/preset-env": "^7.22.15",
34
34
  "@babel/preset-typescript": "^7.22.15",
35
- "@emotion/babel-plugin": "^11.11.0",
36
35
  "@emotion/react": "^11.11.1",
37
36
  "@emotion/styled": "^11.11.0",
38
37
  "@storybook/addon-actions": "^7.4.1",
@@ -65,7 +64,8 @@
65
64
  "react-dom": "^18.2.0",
66
65
  "storybook": "^7.4.1",
67
66
  "ts-node": "^10.9.1",
68
- "typescript": "^4.6.3"
67
+ "typescript": "^4.6.3",
68
+ "@shoplflow/utils": "^0.2.0"
69
69
  },
70
70
  "eslintConfig": {
71
71
  "extends": [
@@ -77,7 +77,7 @@
77
77
  "framer-motion": "^9.1.7",
78
78
  "react-custom-scrollbars-2": "^4.5.0",
79
79
  "zustand": "^4.4.1",
80
- "@shoplflow/utils": "^0.1.0"
80
+ "@shoplflow/utils": "^0.2.0"
81
81
  },
82
82
  "scripts": {
83
83
  "type-check": "tsc --noEmit || true",
@@ -1,14 +0,0 @@
1
- import type React from 'react';
2
- /**
3
- * @description
4
- * outsideClick 이벤트를 감지하는 hook
5
- * return되는 ref를 컴포넌트에 적용하거나 외부에서 생성한 ref를 기준으로 부모 요소를 클릭하는 경우 outsideClick 함수를 실행합니다.
6
- * 외부에서 생성한 ref를 사용할 경우 initialRef를 통해 ref를 전달해야 합니다.
7
- *
8
- * @param onClickOutside
9
- * @param initialRef
10
- */
11
- export declare const useOutsideClick: <T extends HTMLElement>(onClickOutside: (target: EventTarget | null) => void, initialRef?: React.RefObject<T> | undefined) => {
12
- ref: React.RefObject<T>;
13
- };
14
- export default useOutsideClick;
@@ -1,9 +0,0 @@
1
- type ResizeOptions = {
2
- trackWidth?: boolean;
3
- trackHeight?: boolean;
4
- };
5
- export declare const useResizeObserver: <T extends HTMLElement>(element: T, options?: ResizeOptions) => {
6
- width: number;
7
- height: number;
8
- };
9
- export {};
@@ -1 +0,0 @@
1
- export declare const noop: () => void;
@@ -1 +0,0 @@
1
- export type $Values<T extends object> = T[keyof T];