@zenkigen-inc/component-ui 1.15.1 → 1.15.2

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.
Files changed (97) hide show
  1. package/dist/index.d.mts +434 -0
  2. package/dist/index.d.ts +434 -27
  3. package/dist/index.js +1602 -1701
  4. package/dist/index.mjs +1915 -0
  5. package/package.json +18 -8
  6. package/tsup.config.ts +13 -0
  7. package/vitest.config.ts +11 -0
  8. package/vitest.setup.ts +1 -0
  9. package/dist/avatar/avatar.d.ts +0 -10
  10. package/dist/avatar/index.d.ts +0 -1
  11. package/dist/breadcrumb/breadcrumb-item.d.ts +0 -2
  12. package/dist/breadcrumb/breadcrumb.d.ts +0 -5
  13. package/dist/breadcrumb/index.d.ts +0 -1
  14. package/dist/button/button.d.ts +0 -22
  15. package/dist/button/index.d.ts +0 -1
  16. package/dist/checkbox/checkbox.d.ts +0 -14
  17. package/dist/checkbox/checked-icon.d.ts +0 -1
  18. package/dist/checkbox/index.d.ts +0 -1
  19. package/dist/checkbox/minus-icon.d.ts +0 -1
  20. package/dist/dropdown/dropdown-context.d.ts +0 -14
  21. package/dist/dropdown/dropdown-item.d.ts +0 -7
  22. package/dist/dropdown/dropdown-menu.d.ts +0 -10
  23. package/dist/dropdown/dropdown.d.ts +0 -26
  24. package/dist/dropdown/index.d.ts +0 -2
  25. package/dist/dropdown/type.d.ts +0 -9
  26. package/dist/evaluation-star/evaluation-star.d.ts +0 -8
  27. package/dist/evaluation-star/index.d.ts +0 -1
  28. package/dist/heading/heading.d.ts +0 -10
  29. package/dist/heading/index.d.ts +0 -1
  30. package/dist/hooks/index.d.ts +0 -1
  31. package/dist/hooks/use-outside-click.d.ts +0 -2
  32. package/dist/icon/icon.d.ts +0 -13
  33. package/dist/icon/index.d.ts +0 -1
  34. package/dist/icon-button/icon-button.d.ts +0 -19
  35. package/dist/icon-button/index.d.ts +0 -1
  36. package/dist/index.esm.js +0 -2147
  37. package/dist/index.esm.js.map +0 -1
  38. package/dist/index.js.map +0 -1
  39. package/dist/loading/index.d.ts +0 -1
  40. package/dist/loading/loading.d.ts +0 -7
  41. package/dist/modal/body-scroll-lock.d.ts +0 -27
  42. package/dist/modal/index.d.ts +0 -1
  43. package/dist/modal/modal-body.d.ts +0 -2
  44. package/dist/modal/modal-context.d.ts +0 -5
  45. package/dist/modal/modal-footer.d.ts +0 -7
  46. package/dist/modal/modal-header.d.ts +0 -6
  47. package/dist/modal/modal.d.ts +0 -18
  48. package/dist/notification-inline/index.d.ts +0 -1
  49. package/dist/notification-inline/notification-inline.d.ts +0 -13
  50. package/dist/pagination/index.d.ts +0 -1
  51. package/dist/pagination/pagination-button.d.ts +0 -6
  52. package/dist/pagination/pagination-context.d.ts +0 -6
  53. package/dist/pagination/pagination.d.ts +0 -12
  54. package/dist/pagination-select/index.d.ts +0 -1
  55. package/dist/pagination-select/pagination-select.d.ts +0 -22
  56. package/dist/radio/index.d.ts +0 -1
  57. package/dist/radio/radio.d.ts +0 -12
  58. package/dist/search/index.d.ts +0 -1
  59. package/dist/search/search.d.ts +0 -12
  60. package/dist/select/index.d.ts +0 -2
  61. package/dist/select/select-context.d.ts +0 -11
  62. package/dist/select/select-item.d.ts +0 -6
  63. package/dist/select/select-list.d.ts +0 -6
  64. package/dist/select/select.d.ts +0 -22
  65. package/dist/select/type.d.ts +0 -7
  66. package/dist/select-sort/index.d.ts +0 -2
  67. package/dist/select-sort/select-item.d.ts +0 -7
  68. package/dist/select-sort/select-list.d.ts +0 -10
  69. package/dist/select-sort/select-sort.d.ts +0 -15
  70. package/dist/select-sort/type.d.ts +0 -1
  71. package/dist/tab/index.d.ts +0 -2
  72. package/dist/tab/tab-item.d.ts +0 -10
  73. package/dist/tab/tab.d.ts +0 -15
  74. package/dist/table/index.d.ts +0 -3
  75. package/dist/table/table-cell.d.ts +0 -8
  76. package/dist/table/table-row.d.ts +0 -7
  77. package/dist/table/table.d.ts +0 -16
  78. package/dist/tag/delete-icon.d.ts +0 -8
  79. package/dist/tag/index.d.ts +0 -2
  80. package/dist/tag/tag.d.ts +0 -17
  81. package/dist/tag/type.d.ts +0 -3
  82. package/dist/text-area/index.d.ts +0 -1
  83. package/dist/text-area/text-area.d.ts +0 -8
  84. package/dist/text-input/index.d.ts +0 -1
  85. package/dist/text-input/text-input.d.ts +0 -7
  86. package/dist/toast/index.d.ts +0 -2
  87. package/dist/toast/toast-provider.d.ts +0 -13
  88. package/dist/toast/toast.d.ts +0 -12
  89. package/dist/toast/type.d.ts +0 -1
  90. package/dist/toggle/index.d.ts +0 -1
  91. package/dist/toggle/toggle.d.ts +0 -12
  92. package/dist/tooltip/index.d.ts +0 -1
  93. package/dist/tooltip/tail-icon.d.ts +0 -8
  94. package/dist/tooltip/tooltip-content.d.ts +0 -11
  95. package/dist/tooltip/tooltip.d.ts +0 -13
  96. package/dist/tooltip/tooltip.hook.d.ts +0 -11
  97. package/dist/tooltip/type.d.ts +0 -13
@@ -1,12 +0,0 @@
1
- import type { ChangeEvent } from 'react';
2
- type Props = {
3
- name?: string;
4
- value?: string;
5
- id?: string;
6
- label?: string;
7
- isChecked?: boolean;
8
- isDisabled?: boolean;
9
- onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
10
- };
11
- export declare function Radio({ name, value, id, label, isChecked, isDisabled, onChange }: Props): import("react").JSX.Element;
12
- export {};
@@ -1 +0,0 @@
1
- export { Search } from './search';
@@ -1,12 +0,0 @@
1
- import type { ChangeEvent, FormEvent } from 'react';
2
- type Props = {
3
- size?: 'medium' | 'large';
4
- placeholder?: string;
5
- width?: string;
6
- value: string;
7
- onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
8
- onSubmit?: (e: FormEvent<HTMLFormElement>) => void;
9
- onClickClearButton?: () => void;
10
- };
11
- export declare const Search: import("react").ForwardRefExoticComponent<Props & import("react").RefAttributes<HTMLDivElement>>;
12
- export {};
@@ -1,2 +0,0 @@
1
- export { Select } from './select';
2
- export type * from './type';
@@ -1,11 +0,0 @@
1
- import type { SelectOption } from './type';
2
- type UseSelectReturnType = {
3
- size?: 'x-small' | 'small' | 'medium' | 'large';
4
- placeholder?: string;
5
- selectedOption?: SelectOption | null;
6
- setIsOptionListOpen: React.Dispatch<React.SetStateAction<boolean>>;
7
- onChange?: (option: SelectOption | null) => void;
8
- variant?: 'text' | 'outline';
9
- };
10
- export declare const SelectContext: import("react").Context<UseSelectReturnType>;
11
- export {};
@@ -1,6 +0,0 @@
1
- import type { SelectOption } from './type';
2
- type Props = {
3
- option: SelectOption;
4
- };
5
- export declare function SelectItem({ option }: Props): import("react").JSX.Element;
6
- export {};
@@ -1,6 +0,0 @@
1
- import type { CSSProperties, PropsWithChildren } from 'react';
2
- type Props = {
3
- maxHeight?: CSSProperties['height'];
4
- };
5
- export declare function SelectList({ children, maxHeight }: PropsWithChildren<Props>): import("react").JSX.Element;
6
- export {};
@@ -1,22 +0,0 @@
1
- import type { IconName } from '@zenkigen-inc/component-icons';
2
- import type { CSSProperties, PropsWithChildren } from 'react';
3
- import { SelectItem } from './select-item';
4
- import type { SelectOption } from './type';
5
- type Props = {
6
- size?: 'x-small' | 'small' | 'medium' | 'large';
7
- variant?: 'outline' | 'text';
8
- width?: CSSProperties['width'];
9
- maxWidth?: CSSProperties['maxWidth'];
10
- placeholder?: string;
11
- placeholderIcon?: IconName;
12
- selectedOption?: SelectOption | null;
13
- optionListMaxHeight?: CSSProperties['height'];
14
- isDisabled?: boolean;
15
- isOptionSelected?: boolean;
16
- onChange?: (option: SelectOption | null) => void;
17
- };
18
- export declare function Select({ children, size, variant, width, maxWidth, placeholder, placeholderIcon, selectedOption, isDisabled, isOptionSelected, onChange, optionListMaxHeight, }: PropsWithChildren<Props>): import("react").JSX.Element;
19
- export declare namespace Select {
20
- var Option: typeof SelectItem;
21
- }
22
- export {};
@@ -1,7 +0,0 @@
1
- import type { IconName } from '@zenkigen-inc/component-icons';
2
- export type SelectOption = {
3
- id: string;
4
- value: string;
5
- label: string;
6
- icon?: IconName;
7
- };
@@ -1,2 +0,0 @@
1
- export { SelectSort } from './select-sort';
2
- export type * from './type';
@@ -1,7 +0,0 @@
1
- import type { PropsWithChildren } from 'react';
2
- type Props = {
3
- isSortKey: boolean;
4
- onClickItem: () => void;
5
- };
6
- export declare function SelectItem({ children, isSortKey, onClickItem }: PropsWithChildren<Props>): import("react").JSX.Element;
7
- export {};
@@ -1,10 +0,0 @@
1
- import type { SortOrder } from './type';
2
- type Props = {
3
- size: 'x-small' | 'small' | 'medium' | 'large';
4
- variant: 'text' | 'outline';
5
- sortOrder: SortOrder;
6
- onClickItem: (value: SortOrder) => void;
7
- onClickDeselect?: () => void;
8
- };
9
- export declare function SelectList({ size, variant, sortOrder, onClickItem, onClickDeselect }: Props): import("react").JSX.Element;
10
- export {};
@@ -1,15 +0,0 @@
1
- import type { CSSProperties } from 'react';
2
- import type { SortOrder } from './type';
3
- type Props = {
4
- size?: 'x-small' | 'small' | 'medium' | 'large';
5
- variant?: 'outline' | 'text';
6
- width?: CSSProperties['width'];
7
- label: string;
8
- sortOrder: SortOrder;
9
- isDisabled?: boolean;
10
- isSortKey?: boolean;
11
- onChange?: (value: SortOrder) => void;
12
- onClickDeselect?: () => void;
13
- };
14
- export declare function SelectSort({ size, variant, width, label, sortOrder, isDisabled, isSortKey, onChange, onClickDeselect, }: Props): import("react").JSX.Element;
15
- export {};
@@ -1 +0,0 @@
1
- export type SortOrder = 'ascend' | 'descend' | null;
@@ -1,2 +0,0 @@
1
- export { Tab } from './tab';
2
- export { TabItem } from './tab-item';
@@ -1,10 +0,0 @@
1
- import type { ReactNode } from 'react';
2
- type Props = {
3
- id: string;
4
- isSelected?: boolean;
5
- isDisabled?: boolean;
6
- children?: ReactNode;
7
- onClick: (id: string) => void;
8
- };
9
- export declare const TabItem: ({ isSelected, ...props }: Props) => import("react").JSX.Element;
10
- export {};
package/dist/tab/tab.d.ts DELETED
@@ -1,15 +0,0 @@
1
- import type { ReactNode } from 'react';
2
- type Props = {
3
- children?: ReactNode;
4
- };
5
- export declare function Tab({ children }: Props): import("react").JSX.Element;
6
- export declare namespace Tab {
7
- var Item: ({ isSelected, ...props }: {
8
- id: string;
9
- isSelected?: boolean;
10
- isDisabled?: boolean;
11
- children?: ReactNode;
12
- onClick: (id: string) => void;
13
- }) => import("react").JSX.Element;
14
- }
15
- export {};
@@ -1,3 +0,0 @@
1
- export { Table } from './table';
2
- export { TableCell } from './table-cell';
3
- export { TableRow } from './table-row';
@@ -1,8 +0,0 @@
1
- import type { ReactNode } from 'react';
2
- type Props = {
3
- children?: ReactNode;
4
- className?: string;
5
- isHeader?: boolean;
6
- };
7
- export declare function TableCell({ children, className, isHeader }: Props): import("react").JSX.Element;
8
- export {};
@@ -1,7 +0,0 @@
1
- import type { ReactNode } from 'react';
2
- type Props = {
3
- children?: ReactNode;
4
- isHoverBackgroundVisible?: boolean;
5
- };
6
- export declare function TableRow({ children, isHoverBackgroundVisible }: Props): import("react").JSX.Element;
7
- export {};
@@ -1,16 +0,0 @@
1
- import type { CSSProperties, PropsWithChildren } from 'react';
2
- import { TableCell } from './table-cell';
3
- import { TableRow } from './table-row';
4
- type Props = {
5
- width?: CSSProperties['width'];
6
- templateRows?: CSSProperties['gridTemplateRows'];
7
- templateColumns?: CSSProperties['gridTemplateColumns'];
8
- autoColumns?: CSSProperties['gridAutoColumns'];
9
- autoRows?: CSSProperties['gridAutoRows'];
10
- };
11
- export declare function Table({ width, templateRows, templateColumns, autoColumns, autoRows, children, }: PropsWithChildren<Props>): import("react").JSX.Element;
12
- export declare namespace Table {
13
- var Row: typeof TableRow;
14
- var Cell: typeof TableCell;
15
- }
16
- export {};
@@ -1,8 +0,0 @@
1
- import type { ColorVariant, TagColor } from './type';
2
- type Props = {
3
- color?: TagColor;
4
- variant?: ColorVariant;
5
- onClick?: () => void;
6
- };
7
- export declare const DeleteIcon: ({ color, variant, onClick }: Props) => import("react").JSX.Element;
8
- export {};
@@ -1,2 +0,0 @@
1
- export { Tag } from './tag';
2
- export type * from './type';
package/dist/tag/tag.d.ts DELETED
@@ -1,17 +0,0 @@
1
- import type { ColorVariant, TagColor } from './type';
2
- type Props = {
3
- id: string;
4
- children: string;
5
- color: TagColor;
6
- variant?: ColorVariant;
7
- } & ({
8
- isEditable: true;
9
- onDelete: (id: string) => void;
10
- size?: 'medium';
11
- } | {
12
- isEditable?: undefined;
13
- onDelete?: never;
14
- size?: 'x-small' | 'small' | 'medium';
15
- });
16
- export declare function Tag({ id, children, color, variant, size, isEditable, onDelete }: Props): import("react").JSX.Element;
17
- export {};
@@ -1,3 +0,0 @@
1
- import type { tagLightColors } from '@zenkigen-inc/component-theme';
2
- export type TagColor = keyof typeof tagLightColors;
3
- export type ColorVariant = 'normal' | 'light';
@@ -1 +0,0 @@
1
- export { TextArea } from './text-area';
@@ -1,8 +0,0 @@
1
- import type { CSSProperties, TextareaHTMLAttributes } from 'react';
2
- export declare const TextArea: import("react").ForwardRefExoticComponent<TextareaHTMLAttributes<HTMLTextAreaElement> & {
3
- size?: "medium" | "large";
4
- value: string;
5
- height?: CSSProperties["height"];
6
- isResizable?: boolean;
7
- isError?: boolean;
8
- } & import("react").RefAttributes<HTMLTextAreaElement>>;
@@ -1 +0,0 @@
1
- export { TextInput } from './text-input';
@@ -1,7 +0,0 @@
1
- import type { InputHTMLAttributes } from 'react';
2
- export declare const TextInput: import("react").ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "size"> & {
3
- size?: "medium" | "large";
4
- value: string;
5
- isError?: boolean;
6
- onClickClearButton?: () => void;
7
- } & import("react").RefAttributes<HTMLInputElement>>;
@@ -1,2 +0,0 @@
1
- export * from './toast';
2
- export * from './toast-provider';
@@ -1,13 +0,0 @@
1
- import type { PropsWithChildren } from 'react';
2
- import type { ToastState } from './type';
3
- type AddToastArgs = {
4
- message: string;
5
- state: ToastState;
6
- };
7
- type ToastProviderProps = {
8
- addToast: (args: AddToastArgs) => void;
9
- removeToast: (id: number) => void;
10
- };
11
- export declare const ToastProvider: ({ children }: PropsWithChildren) => import("react").JSX.Element;
12
- export declare const useToast: () => ToastProviderProps;
13
- export {};
@@ -1,12 +0,0 @@
1
- import type { CSSProperties, ReactNode } from 'react';
2
- import type { ToastState } from './type';
3
- type Props = {
4
- state?: ToastState;
5
- width?: CSSProperties['width'];
6
- isAutoClose?: boolean;
7
- isAnimation?: boolean;
8
- children?: ReactNode;
9
- onClickClose: () => void;
10
- };
11
- export declare function Toast({ state, width, isAutoClose, isAnimation, children, onClickClose, }: Props): import("react").JSX.Element;
12
- export {};
@@ -1 +0,0 @@
1
- export type ToastState = 'success' | 'error' | 'warning' | 'information';
@@ -1 +0,0 @@
1
- export { Toggle } from './toggle';
@@ -1,12 +0,0 @@
1
- import type { ReactNode } from 'react';
2
- type Props = {
3
- id: string;
4
- size: 'small' | 'medium' | 'large';
5
- isChecked: boolean;
6
- onChange: () => void;
7
- label?: ReactNode;
8
- labelPosition?: 'left' | 'right';
9
- isDisabled?: boolean;
10
- };
11
- export declare function Toggle({ id, size, isChecked, onChange, label, labelPosition, isDisabled, }: Props): import("react").JSX.Element;
12
- export {};
@@ -1 +0,0 @@
1
- export { Tooltip } from './tooltip';
@@ -1,8 +0,0 @@
1
- import type { TooltipHorizontalAlign, TooltipSize, TooltipVerticalPosition } from './type';
2
- type Props = {
3
- size: TooltipSize;
4
- verticalPosition: TooltipVerticalPosition;
5
- horizontalAlign: TooltipHorizontalAlign;
6
- };
7
- export declare const TailIcon: (props: Props) => import("react").JSX.Element;
8
- export {};
@@ -1,11 +0,0 @@
1
- import type { CSSProperties, ReactNode } from 'react';
2
- import type { TooltipHorizontalAlign, TooltipPosition, TooltipSize, TooltipVerticalPosition } from './type';
3
- export declare const TooltipContent: ({ content, horizontalAlign, verticalPosition, size, tooltipPosition, maxWidth, isPortal, }: {
4
- content: ReactNode;
5
- size: TooltipSize;
6
- maxWidth: CSSProperties["maxWidth"];
7
- verticalPosition: TooltipVerticalPosition;
8
- horizontalAlign: TooltipHorizontalAlign;
9
- tooltipPosition: TooltipPosition;
10
- isPortal?: boolean;
11
- }) => import("react").JSX.Element;
@@ -1,13 +0,0 @@
1
- import type { CSSProperties, PropsWithChildren, ReactNode } from 'react';
2
- import type { TooltipHorizontalAlign, TooltipSize, TooltipVerticalPosition } from './type';
3
- type Props = {
4
- content: ReactNode;
5
- size?: TooltipSize;
6
- maxWidth?: CSSProperties['maxWidth'];
7
- verticalPosition?: TooltipVerticalPosition;
8
- horizontalAlign?: TooltipHorizontalAlign;
9
- isDisabledHover?: boolean;
10
- portalTarget?: HTMLElement;
11
- };
12
- export declare function Tooltip({ children, content, size, maxWidth, verticalPosition, horizontalAlign, isDisabledHover, portalTarget, }: PropsWithChildren<Props>): import("react").JSX.Element;
13
- export {};
@@ -1,11 +0,0 @@
1
- import type { CSSProperties } from 'react';
2
- import type { TooltipHorizontalAlign, TooltipPosition, TooltipSize, TooltipVerticalPosition } from './type';
3
- export declare const useTooltip: () => {
4
- calculatePosition: (args: {
5
- dimensions: DOMRect;
6
- maxWidth?: CSSProperties["width"];
7
- verticalPosition: TooltipVerticalPosition;
8
- horizontalAlign: TooltipHorizontalAlign;
9
- tooltipSize: TooltipSize;
10
- }) => TooltipPosition;
11
- };
@@ -1,13 +0,0 @@
1
- import type { CSSProperties } from 'react';
2
- export type TooltipSize = 'small' | 'medium';
3
- export type TooltipVerticalPosition = 'top' | 'bottom';
4
- export type TooltipHorizontalAlign = 'left' | 'center' | 'right';
5
- export type TooltipPosition = {
6
- maxWidth: CSSProperties['width'];
7
- width: string;
8
- left: string;
9
- top: string;
10
- bottom: string;
11
- translateX: string;
12
- translateY: string;
13
- };