@ceed/ads 0.0.19 → 0.0.20

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.
@@ -1,8 +1,25 @@
1
1
  import React from "react";
2
- import { ButtonProps } from "@mui/joy";
3
2
  import { MotionProps } from "framer-motion";
4
- declare const Button: {
5
- (props: ButtonProps & MotionProps): React.JSX.Element;
6
- displayName: string;
7
- };
3
+ declare const Button: React.ForwardRefExoticComponent<Omit<{
4
+ component?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
5
+ } & import("@mui/joy").ButtonSlotsAndSlotProps & {
6
+ action?: React.Ref<{
7
+ focusVisible(): void;
8
+ }> | undefined;
9
+ color?: import("@mui/types").OverridableStringUnion<import("@mui/joy").ColorPaletteProp, import("@mui/joy").ButtonPropsColorOverrides> | undefined;
10
+ disabled?: boolean | undefined;
11
+ endDecorator?: React.ReactNode;
12
+ focusVisibleClassName?: string | undefined;
13
+ fullWidth?: boolean | undefined;
14
+ size?: import("@mui/types").OverridableStringUnion<"sm" | "md" | "lg", import("@mui/joy").ButtonPropsSizeOverrides> | undefined;
15
+ startDecorator?: React.ReactNode;
16
+ sx?: import("@mui/joy/styles/types").SxProps | undefined;
17
+ tabIndex?: number | undefined;
18
+ variant?: import("@mui/types").OverridableStringUnion<import("@mui/joy").VariantProp, import("@mui/joy").ButtonPropsVariantOverrides> | undefined;
19
+ loading?: boolean | undefined;
20
+ loadingIndicator?: React.ReactNode;
21
+ loadingPosition?: "center" | "end" | "start" | undefined;
22
+ } & Omit<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
23
+ ref?: ((instance: HTMLButtonElement | null) => void) | React.RefObject<HTMLButtonElement> | null | undefined;
24
+ }, "color" | "tabIndex" | "variant" | "sx" | "disabled" | "size" | "component" | keyof import("@mui/joy").ButtonSlotsAndSlotProps | "action" | "endDecorator" | "focusVisibleClassName" | "fullWidth" | "startDecorator" | "loading" | "loadingIndicator" | "loadingPosition"> & MotionProps, "ref"> & React.RefAttributes<unknown>>;
8
25
  export { Button };
@@ -9,11 +9,11 @@ var __assign = (this && this.__assign) || function () {
9
9
  };
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
- import React from "react";
12
+ import React, { forwardRef } from "react";
13
13
  import { Button as JoyButton } from "@mui/joy";
14
14
  import { motion } from "framer-motion";
15
15
  var MotionButton = motion(JoyButton);
16
- var Button = function (props) {
16
+ var Button = forwardRef(function (props) {
17
17
  // prop destruction
18
18
  // lib hooks
19
19
  // state, ref, querystring hooks
@@ -23,6 +23,6 @@ var Button = function (props) {
23
23
  // effects
24
24
  // handlers
25
25
  return (React.createElement(MotionButton, __assign({}, props)));
26
- };
26
+ });
27
27
  export { Button };
28
28
  Button.displayName = "Button";
@@ -20,7 +20,10 @@ type DataTableProps<T extends Record<string, unknown>> = {
20
20
  page: number;
21
21
  pageSize: number;
22
22
  };
23
- onPaginationModelChange?: (newPage: number) => void;
23
+ onPaginationModelChange?: (model: {
24
+ page: number;
25
+ pageSize: number;
26
+ }) => void;
24
27
  /**
25
28
  * Rows의 총 갯수를 직접 지정 할 수 있다.
26
29
  * 기본적으로는 rows.length를 사용하지만, 이 값을 지정하면 rows.length를 사용하지 않는다.
@@ -87,7 +87,7 @@ function useDataTableRenderer(_a) {
87
87
  var isTotalSelected = useMemo(function () { return rowCount > 0 && selectionModel.length === rowCount; }, [selectionModel, rowCount]);
88
88
  var handlePageChange = useCallback(function (newPage) {
89
89
  setPage(newPage);
90
- onPaginationModelChange === null || onPaginationModelChange === void 0 ? void 0 : onPaginationModelChange(newPage);
90
+ onPaginationModelChange === null || onPaginationModelChange === void 0 ? void 0 : onPaginationModelChange({ page: newPage, pageSize: pageSize });
91
91
  }, [onPaginationModelChange]);
92
92
  useEffect(function () {
93
93
  handlePageChange(1);
package/framer/index.js CHANGED
@@ -31912,16 +31912,17 @@ Box2.displayName = "Box";
31912
31912
  var Box_default2 = Box2;
31913
31913
 
31914
31914
  // src/components/Button/Button.tsx
31915
+ import { forwardRef as forwardRef75 } from "react";
31915
31916
  import { motion as motion3 } from "framer-motion";
31916
31917
  var MotionButton = motion3(Button_default);
31917
- var Button3 = (props) => {
31918
+ var Button3 = forwardRef75((props) => {
31918
31919
  return /* @__PURE__ */ jsx2(
31919
31920
  MotionButton,
31920
31921
  {
31921
31922
  ...props
31922
31923
  }
31923
31924
  );
31924
- };
31925
+ });
31925
31926
  Button3.displayName = "Button";
31926
31927
 
31927
31928
  // src/components/Button/index.ts
@@ -31939,7 +31940,7 @@ Checkbox3.displayName = "Checkbox";
31939
31940
  var Checkbox_default2 = Checkbox3;
31940
31941
 
31941
31942
  // src/components/Container/Container.tsx
31942
- import { forwardRef as forwardRef75 } from "react";
31943
+ import { forwardRef as forwardRef76 } from "react";
31943
31944
  var ContainerRoot = styled_default2("div", {
31944
31945
  name: "Container",
31945
31946
  slot: "root",
@@ -31971,7 +31972,7 @@ var ContainerRoot = styled_default2("div", {
31971
31972
  }
31972
31973
  })
31973
31974
  );
31974
- var Container = forwardRef75(function Container2(props, ref) {
31975
+ var Container = forwardRef76(function Container2(props, ref) {
31975
31976
  return /* @__PURE__ */ jsx2(ContainerRoot, { ref, ...props });
31976
31977
  });
31977
31978
  Container.displayName = "Container";
@@ -32244,7 +32245,7 @@ function useDataTableRenderer({
32244
32245
  const handlePageChange = useCallback23(
32245
32246
  (newPage) => {
32246
32247
  setPage(newPage);
32247
- onPaginationModelChange?.(newPage);
32248
+ onPaginationModelChange?.({ page: newPage, pageSize });
32248
32249
  },
32249
32250
  [onPaginationModelChange]
32250
32251
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ceed/ads",
3
- "version": "0.0.19",
3
+ "version": "0.0.20",
4
4
  "main": "dist/index.js",
5
5
  "type": "module",
6
6
  "description": "UI tool for Ecube Labs front-end developers",