@dhua5922/react-kit 1.0.0 → 2.0.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/README.md CHANGED
@@ -4,8 +4,7 @@ A React component library workspace built with TypeScript, Vite, Storybook, and
4
4
 
5
5
  ## Documentation Site
6
6
 
7
- - [https://huadylan.com/react-kit/storybook/](https://huadylan.com/react-kit/storybook/)
8
- - Getting started guide: [`documentation/GETTING_STARTED.md`](/Users/dylanhua/Desktop/Coding/Personal/react-kit/documentation/GETTING_STARTED.md)
7
+ [https://huadylan.com/react-kit/storybook/](https://huadylan.com/react-kit/storybook/)
9
8
 
10
9
  ## Development
11
10
 
@@ -27,19 +26,6 @@ yarn storybook
27
26
  yarn docs:dev
28
27
  ```
29
28
 
30
- ## Scripts
31
-
32
- - `npm run dev` - start the Vite dev server
33
- - `npm run build` - build the package
34
- - `npm run build:docs` - build Storybook into `documentation/storybook`
35
- - `npm run storybook` - start Storybook locally
36
- - `npm run build-storybook` - build Storybook into `storybook-static`
37
- - `npm run docs:dev` - serve the `documentation/` folder locally
38
- - `npm run typecheck` - run TypeScript without emitting files
39
- - `npm run lint` - run ESLint on `src`
40
- - `npm run test` - run Vitest
41
- - `npm run validate` - run typecheck, lint, and tests
42
-
43
29
  ## Contribution
44
30
 
45
31
  See [CONTRIBUTING.md](/Users/dylanhua/Desktop/Coding/Personal/react-kit/CONTRIBUTING.md)
@@ -0,0 +1,14 @@
1
+ import { default as React } from 'react';
2
+
3
+ interface Props {
4
+ children?: React.ReactNode;
5
+ showMenu?: boolean;
6
+ defaultShowMenu?: boolean;
7
+ onShowMenu?: () => void;
8
+ onHideMenu?: () => void;
9
+ offsetMenuPosVertical?: number;
10
+ offsetMenuPosHorizontal?: number;
11
+ }
12
+ declare function Menu({ children, showMenu, defaultShowMenu, onShowMenu, onHideMenu, offsetMenuPosVertical, offsetMenuPosHorizontal, ...props }: Props): import("react/jsx-runtime").JSX.Element;
13
+ export default Menu;
14
+ //# sourceMappingURL=Menu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/Menu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAKjD,UAAU,KAAK;IACb,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,uBAAuB,CAAC,EAAE,MAAM,CAAC;CAClC;AAUD,iBAAS,IAAI,CAAC,EACZ,QAAQ,EACR,QAAQ,EACR,eAAuB,EACvB,UAAU,EACV,UAAU,EACV,qBAAyB,EACzB,uBAA2B,EAC3B,GAAG,KAAK,EACT,EAAE,KAAK,2CAmDP;AAED,eAAe,IAAI,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+
3
+ interface Props extends React.HTMLAttributes<HTMLDivElement> {
4
+ children?: React.ReactNode;
5
+ }
6
+ declare function MenuContent({ children, ...props }: Props): import("react/jsx-runtime").JSX.Element;
7
+ export default MenuContent;
8
+ //# sourceMappingURL=MenuContent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MenuContent.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/MenuContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAKzC,UAAU,KAAM,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC1D,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC3B;AA6BD,iBAAS,WAAW,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,2CAmBjD;AAED,eAAe,WAAW,CAAA"}
@@ -0,0 +1,18 @@
1
+ interface DefaultValue {
2
+ showMenu: boolean;
3
+ onShowMenu: () => void;
4
+ onHideMenu: () => void;
5
+ offsetMenuPosVertical: number;
6
+ offsetMenuPosHorizontal: number;
7
+ menuPos: {
8
+ top: string;
9
+ left: string;
10
+ };
11
+ setMenuPos: (position: {
12
+ top: string;
13
+ left: string;
14
+ }) => void;
15
+ }
16
+ declare const MenuContext: import('react').Context<DefaultValue | null>;
17
+ export default MenuContext;
18
+ //# sourceMappingURL=MenuContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MenuContext.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/MenuContext.tsx"],"names":[],"mappings":"AAEA,UAAU,YAAY;IACpB,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,uBAAuB,EAAE,MAAM,CAAC;IAChC,OAAO,EAAE;QACP,GAAG,EAAE,MAAM,CAAC;QACZ,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IACF,UAAU,EAAE,CAAC,QAAQ,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;CAC/D;AAED,QAAA,MAAM,WAAW,8CAA2C,CAAC;AAE7D,eAAe,WAAW,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const MenuItem: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
2
+ export default MenuItem;
3
+ //# sourceMappingURL=MenuItem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MenuItem.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/MenuItem.tsx"],"names":[],"mappings":"AAEA,QAAA,MAAM,QAAQ,6NAEb,CAAA;AAED,eAAe,QAAQ,CAAA"}
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+
3
+ interface Props extends React.ButtonHTMLAttributes<HTMLButtonElement> {
4
+ children?: React.ReactNode;
5
+ }
6
+ declare function MenuToggle({ children, onClick, type, ...props }: Props): import("react/jsx-runtime").JSX.Element | null;
7
+ export default MenuToggle;
8
+ //# sourceMappingURL=MenuToggle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MenuToggle.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/MenuToggle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAGlD,UAAU,KAAM,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IACnE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,iBAAS,UAAU,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,kDAyD/D;AAED,eAAe,UAAU,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { default as MenuParent } from './Menu';
2
+ import { default as MenuContent } from './MenuContent';
3
+ import { default as MenuToggle } from './MenuToggle';
4
+
5
+ declare const Menu: typeof MenuParent & {
6
+ Content: typeof MenuContent;
7
+ Item: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
8
+ Toggle: typeof MenuToggle;
9
+ };
10
+ export default Menu;
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/index.tsx"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,QAAQ,CAAA;AAE/B,OAAO,WAAW,MAAM,eAAe,CAAA;AACvC,OAAO,UAAU,MAAM,cAAc,CAAA;AAErC,QAAA,MAAM,IAAI;;;;CAIR,CAAA;AAEF,eAAe,IAAI,CAAA"}
@@ -0,0 +1,12 @@
1
+ import { default as React } from 'react';
2
+
3
+ interface Props {
4
+ left?: string;
5
+ top?: string;
6
+ children?: React.ReactNode;
7
+ show?: boolean;
8
+ onHide: () => void;
9
+ }
10
+ declare function Popup({ children, left, top, show, onHide }: Props): React.ReactPortal | null;
11
+ export default Popup;
12
+ //# sourceMappingURL=Popup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Popup.d.ts","sourceRoot":"","sources":["../../../src/components/Popup/Popup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAA;AAIxC,UAAU,KAAK;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,MAAM,EAAE,MAAM,IAAI,CAAA;CACnB;AAmBD,iBAAS,KAAK,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,IAAY,EAAE,MAAM,EAAE,EAAE,KAAK,4BAgClE;AAED,eAAe,KAAK,CAAA"}
@@ -0,0 +1,4 @@
1
+ import { default as Popup } from './Popup';
2
+
3
+ export default Popup;
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Popup/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,SAAS,CAAA;AAE3B,eAAe,KAAK,CAAA"}
@@ -1,3 +1,5 @@
1
1
  export { default as Calendar } from './Calendar';
2
2
  export { default as Center } from './Center';
3
+ export { default as Menu } from './Menu';
4
+ export { default as Popup } from './Popup/Popup';
3
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAA;AAChD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAA;AAChD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAA;AAC5C,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAA;AACxC,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,eAAe,CAAA"}
package/dist/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export { Calendar, Center } from './components';
1
+ export { Calendar, Center, Menu, Popup } from './components';
2
2
  export type { ComponentSize, ComponentVariant } from './types/common';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAG/C,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,cAAc,CAAA;AAG5D,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA"}