@zenkigen-inc/component-ui 1.2.0 → 1.3.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.
@@ -0,0 +1 @@
1
+ export { Pagination } from './pagination';
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ type Props = {
3
+ page: number;
4
+ onClick: (value: number) => void;
5
+ };
6
+ export declare function PaginationButton({ page, onClick }: Props): import("react").JSX.Element;
7
+ export {};
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ type PaginationContextType = {
3
+ /** 現在のページ番号 */
4
+ currentPage: number;
5
+ };
6
+ export declare const PaginationContext: import("react").Context<PaginationContextType>;
7
+ export {};
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ type Props = {
3
+ /** 現在のページ番号 */
4
+ currentPage: number;
5
+ /** トータルのページ数 */
6
+ totalPage: number;
7
+ /** 現在のページ番号を中心としたときの、左右のページボタン数 */
8
+ sideNumPagesToShow?: number;
9
+ /** ボタンが押されたときのイベントハンドラ */
10
+ onClick: (value: number) => void;
11
+ };
12
+ export declare function Pagination({ currentPage, totalPage, sideNumPagesToShow, onClick }: Props): import("react").JSX.Element;
13
+ export {};
@@ -1,7 +1,6 @@
1
- import { CSSProperties, ReactNode } from 'react';
1
+ import { CSSProperties, PropsWithChildren } from 'react';
2
2
  type Props = {
3
- children: ReactNode;
4
3
  maxHeight?: CSSProperties['height'];
5
4
  };
6
- export declare function SelectList({ children, maxHeight }: Props): import("react").JSX.Element;
5
+ export declare function SelectList({ children, maxHeight }: PropsWithChildren<Props>): import("react").JSX.Element;
7
6
  export {};
@@ -1,9 +1,8 @@
1
- import { CSSProperties, ReactNode } from 'react';
2
1
  import { IconName } from '@zenkigen-inc/component-icons';
2
+ import { CSSProperties, PropsWithChildren } from 'react';
3
3
  import { SelectItem } from './select-item';
4
4
  import type { SelectOption } from './type';
5
5
  type Props = {
6
- children: ReactNode;
7
6
  size?: 'x-small' | 'small' | 'medium' | 'large';
8
7
  variant?: 'outline' | 'text';
9
8
  width?: CSSProperties['width'];
@@ -14,7 +13,7 @@ type Props = {
14
13
  isDisabled?: boolean;
15
14
  onChange?: (option: SelectOption | null) => void;
16
15
  };
17
- export declare function Select({ children, size, variant, width, placeholder, placeholderIcon, selectedOption, isDisabled, onChange, optionListMaxHeight, }: Props): import("react").JSX.Element;
16
+ export declare function Select({ children, size, variant, width, placeholder, placeholderIcon, selectedOption, isDisabled, onChange, optionListMaxHeight, }: PropsWithChildren<Props>): import("react").JSX.Element;
18
17
  export declare namespace Select {
19
18
  var Option: typeof SelectItem;
20
19
  }
@@ -1,8 +1,7 @@
1
- import { ReactNode } from 'react';
1
+ import { PropsWithChildren } from 'react';
2
2
  type Props = {
3
- children: ReactNode;
4
3
  isSortKey: boolean;
5
4
  onClickItem: () => void;
6
5
  };
7
- export declare function SelectItem({ children, isSortKey, onClickItem }: Props): import("react").JSX.Element;
6
+ export declare function SelectItem({ children, isSortKey, onClickItem }: PropsWithChildren<Props>): import("react").JSX.Element;
8
7
  export {};
@@ -1,3 +1,3 @@
1
1
  export { Table } from './table';
2
- export { TableRow } from './table-row';
3
2
  export { TableCell } from './table-cell';
3
+ export { TableRow } from './table-row';
@@ -0,0 +1 @@
1
+ export { TextInput } from './text-input';
@@ -0,0 +1,9 @@
1
+ import { InputHTMLAttributes } from 'react';
2
+ interface Props extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'> {
3
+ size?: 'medium' | 'large';
4
+ value: string;
5
+ isError?: boolean;
6
+ onClickClearButton?: () => void;
7
+ }
8
+ export declare const TextInput: import("react").ForwardRefExoticComponent<Props & import("react").RefAttributes<HTMLInputElement>>;
9
+ export {};
@@ -1,7 +1,6 @@
1
- import { CSSProperties, ReactNode } from 'react';
1
+ import { CSSProperties, PropsWithChildren } from 'react';
2
2
  import { TooltipHorizontalAlign, TooltipSize, TooltipVerticalPosition } from './type';
3
3
  type Props = {
4
- children: ReactNode;
5
4
  content: string;
6
5
  size?: TooltipSize;
7
6
  maxWidth?: CSSProperties['width'];
@@ -9,5 +8,5 @@ type Props = {
9
8
  horizontalAlign?: TooltipHorizontalAlign;
10
9
  isDisabledHover?: boolean;
11
10
  };
12
- export declare function Tooltip({ children, content, size, maxWidth, verticalPosition, horizontalAlign, isDisabledHover, }: Props): import("react").JSX.Element;
11
+ export declare function Tooltip({ children, content, size, maxWidth, verticalPosition, horizontalAlign, isDisabledHover, }: PropsWithChildren<Props>): import("react").JSX.Element;
13
12
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zenkigen-inc/component-ui",
3
- "version": "1.2.0",
3
+ "version": "1.3.1",
4
4
  "repository": "https://github.com/zenkigen/zenkigen-component",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -26,8 +26,8 @@
26
26
  "react": "^18.0.0"
27
27
  },
28
28
  "dependencies": {
29
- "@zenkigen-inc/component-icons": "1.2.0",
30
- "@zenkigen-inc/component-theme": "1.2.0",
29
+ "@zenkigen-inc/component-icons": "1.3.1",
30
+ "@zenkigen-inc/component-theme": "1.3.1",
31
31
  "clsx": "2.0.0"
32
32
  }
33
33
  }