@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.
- package/dist/index.d.mts +434 -0
- package/dist/index.d.ts +434 -27
- package/dist/index.js +1602 -1701
- package/dist/index.mjs +1915 -0
- package/package.json +18 -8
- package/tsup.config.ts +13 -0
- package/vitest.config.ts +11 -0
- package/vitest.setup.ts +1 -0
- package/dist/avatar/avatar.d.ts +0 -10
- package/dist/avatar/index.d.ts +0 -1
- package/dist/breadcrumb/breadcrumb-item.d.ts +0 -2
- package/dist/breadcrumb/breadcrumb.d.ts +0 -5
- package/dist/breadcrumb/index.d.ts +0 -1
- package/dist/button/button.d.ts +0 -22
- package/dist/button/index.d.ts +0 -1
- package/dist/checkbox/checkbox.d.ts +0 -14
- package/dist/checkbox/checked-icon.d.ts +0 -1
- package/dist/checkbox/index.d.ts +0 -1
- package/dist/checkbox/minus-icon.d.ts +0 -1
- package/dist/dropdown/dropdown-context.d.ts +0 -14
- package/dist/dropdown/dropdown-item.d.ts +0 -7
- package/dist/dropdown/dropdown-menu.d.ts +0 -10
- package/dist/dropdown/dropdown.d.ts +0 -26
- package/dist/dropdown/index.d.ts +0 -2
- package/dist/dropdown/type.d.ts +0 -9
- package/dist/evaluation-star/evaluation-star.d.ts +0 -8
- package/dist/evaluation-star/index.d.ts +0 -1
- package/dist/heading/heading.d.ts +0 -10
- package/dist/heading/index.d.ts +0 -1
- package/dist/hooks/index.d.ts +0 -1
- package/dist/hooks/use-outside-click.d.ts +0 -2
- package/dist/icon/icon.d.ts +0 -13
- package/dist/icon/index.d.ts +0 -1
- package/dist/icon-button/icon-button.d.ts +0 -19
- package/dist/icon-button/index.d.ts +0 -1
- package/dist/index.esm.js +0 -2147
- package/dist/index.esm.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/loading/index.d.ts +0 -1
- package/dist/loading/loading.d.ts +0 -7
- package/dist/modal/body-scroll-lock.d.ts +0 -27
- package/dist/modal/index.d.ts +0 -1
- package/dist/modal/modal-body.d.ts +0 -2
- package/dist/modal/modal-context.d.ts +0 -5
- package/dist/modal/modal-footer.d.ts +0 -7
- package/dist/modal/modal-header.d.ts +0 -6
- package/dist/modal/modal.d.ts +0 -18
- package/dist/notification-inline/index.d.ts +0 -1
- package/dist/notification-inline/notification-inline.d.ts +0 -13
- package/dist/pagination/index.d.ts +0 -1
- package/dist/pagination/pagination-button.d.ts +0 -6
- package/dist/pagination/pagination-context.d.ts +0 -6
- package/dist/pagination/pagination.d.ts +0 -12
- package/dist/pagination-select/index.d.ts +0 -1
- package/dist/pagination-select/pagination-select.d.ts +0 -22
- package/dist/radio/index.d.ts +0 -1
- package/dist/radio/radio.d.ts +0 -12
- package/dist/search/index.d.ts +0 -1
- package/dist/search/search.d.ts +0 -12
- package/dist/select/index.d.ts +0 -2
- package/dist/select/select-context.d.ts +0 -11
- package/dist/select/select-item.d.ts +0 -6
- package/dist/select/select-list.d.ts +0 -6
- package/dist/select/select.d.ts +0 -22
- package/dist/select/type.d.ts +0 -7
- package/dist/select-sort/index.d.ts +0 -2
- package/dist/select-sort/select-item.d.ts +0 -7
- package/dist/select-sort/select-list.d.ts +0 -10
- package/dist/select-sort/select-sort.d.ts +0 -15
- package/dist/select-sort/type.d.ts +0 -1
- package/dist/tab/index.d.ts +0 -2
- package/dist/tab/tab-item.d.ts +0 -10
- package/dist/tab/tab.d.ts +0 -15
- package/dist/table/index.d.ts +0 -3
- package/dist/table/table-cell.d.ts +0 -8
- package/dist/table/table-row.d.ts +0 -7
- package/dist/table/table.d.ts +0 -16
- package/dist/tag/delete-icon.d.ts +0 -8
- package/dist/tag/index.d.ts +0 -2
- package/dist/tag/tag.d.ts +0 -17
- package/dist/tag/type.d.ts +0 -3
- package/dist/text-area/index.d.ts +0 -1
- package/dist/text-area/text-area.d.ts +0 -8
- package/dist/text-input/index.d.ts +0 -1
- package/dist/text-input/text-input.d.ts +0 -7
- package/dist/toast/index.d.ts +0 -2
- package/dist/toast/toast-provider.d.ts +0 -13
- package/dist/toast/toast.d.ts +0 -12
- package/dist/toast/type.d.ts +0 -1
- package/dist/toggle/index.d.ts +0 -1
- package/dist/toggle/toggle.d.ts +0 -12
- package/dist/tooltip/index.d.ts +0 -1
- package/dist/tooltip/tail-icon.d.ts +0 -8
- package/dist/tooltip/tooltip-content.d.ts +0 -11
- package/dist/tooltip/tooltip.d.ts +0 -13
- package/dist/tooltip/tooltip.hook.d.ts +0 -11
- package/dist/tooltip/type.d.ts +0 -13
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zenkigen-inc/component-ui",
|
|
3
|
-
"version": "1.15.
|
|
3
|
+
"version": "1.15.2",
|
|
4
4
|
"repository": "https://github.com/zenkigen/zenkigen-component",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
@@ -8,18 +8,28 @@
|
|
|
8
8
|
},
|
|
9
9
|
"source": "./src/index.ts",
|
|
10
10
|
"main": "./dist/index.js",
|
|
11
|
-
"module": "./dist/index.
|
|
11
|
+
"module": "./dist/index.mjs",
|
|
12
12
|
"types": "./dist/index.d.ts",
|
|
13
|
-
"exports":
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"import": "./dist/index.mjs",
|
|
16
|
+
"require": "./dist/index.js"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
14
19
|
"scripts": {
|
|
15
20
|
"type-check": "tsc --noEmit",
|
|
16
21
|
"generate-component": "hygen generator components",
|
|
17
|
-
"build": "rimraf dist &&
|
|
18
|
-
"build-lib": "rimraf dist &&
|
|
22
|
+
"build": "rimraf dist && tsup",
|
|
23
|
+
"build-lib": "rimraf dist && tsup",
|
|
24
|
+
"test": "vitest",
|
|
25
|
+
"test:ci": "vitest run"
|
|
19
26
|
},
|
|
20
27
|
"devDependencies": {
|
|
28
|
+
"@testing-library/jest-dom": "6.4.0",
|
|
29
|
+
"@testing-library/react": "15.0.0",
|
|
30
|
+
"@testing-library/user-event": "14.6.1",
|
|
21
31
|
"hygen": "6.2.11",
|
|
22
|
-
"
|
|
32
|
+
"tsup": "8.5.0",
|
|
23
33
|
"typescript": "5.8.3"
|
|
24
34
|
},
|
|
25
35
|
"peerDependencies": {
|
|
@@ -27,8 +37,8 @@
|
|
|
27
37
|
"react-dom": "^18.0.0 || ^19.0.0"
|
|
28
38
|
},
|
|
29
39
|
"dependencies": {
|
|
30
|
-
"@zenkigen-inc/component-icons": "1.15.
|
|
31
|
-
"@zenkigen-inc/component-theme": "1.15.
|
|
40
|
+
"@zenkigen-inc/component-icons": "1.15.2",
|
|
41
|
+
"@zenkigen-inc/component-theme": "1.15.2",
|
|
32
42
|
"clsx": "2.1.1"
|
|
33
43
|
}
|
|
34
44
|
}
|
package/tsup.config.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineConfig } from 'tsup';
|
|
2
|
+
|
|
3
|
+
export default defineConfig({
|
|
4
|
+
entry: ['src/index.ts'],
|
|
5
|
+
format: ['cjs', 'esm'],
|
|
6
|
+
dts: true,
|
|
7
|
+
external: ['react', 'react-dom', '@zenkigen-inc/component-icons', '@zenkigen-inc/component-theme'],
|
|
8
|
+
clean: true,
|
|
9
|
+
esbuildOptions: (options) => {
|
|
10
|
+
options.jsx = 'automatic';
|
|
11
|
+
options.jsxImportSource = 'react';
|
|
12
|
+
},
|
|
13
|
+
});
|
package/vitest.config.ts
ADDED
package/vitest.setup.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
package/dist/avatar/avatar.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare const isAsciiString: (str: string) => boolean;
|
|
2
|
-
type Props = {
|
|
3
|
-
size?: 'x-small' | 'small' | 'medium' | 'large' | 'x-large';
|
|
4
|
-
userId?: number;
|
|
5
|
-
firstName: string;
|
|
6
|
-
lastName: string;
|
|
7
|
-
isDisabled?: boolean;
|
|
8
|
-
};
|
|
9
|
-
export declare function Avatar({ size, ...props }: Props): import("react").JSX.Element;
|
|
10
|
-
export {};
|
package/dist/avatar/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Avatar } from './avatar';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './breadcrumb';
|
package/dist/button/button.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { ComponentPropsWithoutRef, CSSProperties, ElementType, PropsWithChildren, ReactNode } from 'react';
|
|
2
|
-
type Size = 'small' | 'medium' | 'large';
|
|
3
|
-
type Variant = 'fill' | 'fillDanger' | 'outline' | 'text';
|
|
4
|
-
type JustifyContent = 'start' | 'center';
|
|
5
|
-
export type ElementAs = ElementType;
|
|
6
|
-
export type AsProp<T extends ElementAs> = {
|
|
7
|
-
elementAs?: T;
|
|
8
|
-
};
|
|
9
|
-
export type PolymorphicPropsWithoutRef<T extends ElementAs, P extends object> = PropsWithChildren<P> & ComponentPropsWithoutRef<T> & AsProp<T>;
|
|
10
|
-
type Props<T extends ElementAs> = PolymorphicPropsWithoutRef<T, {
|
|
11
|
-
size?: Size;
|
|
12
|
-
width?: CSSProperties['width'];
|
|
13
|
-
isSelected?: boolean;
|
|
14
|
-
isDisabled?: boolean;
|
|
15
|
-
variant?: Variant;
|
|
16
|
-
before?: ReactNode;
|
|
17
|
-
after?: ReactNode;
|
|
18
|
-
borderRadius?: CSSProperties['borderRadius'];
|
|
19
|
-
justifyContent?: JustifyContent;
|
|
20
|
-
}>;
|
|
21
|
-
export declare const Button: <T extends ElementAs = "button">({ size, variant, isDisabled, isSelected, width, borderRadius, justifyContent, before, after, elementAs, children, ...props }: Props<T>) => import("react").JSX.Element;
|
|
22
|
-
export {};
|
package/dist/button/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Button } from './button';
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { ChangeEvent } from 'react';
|
|
2
|
-
type Props = {
|
|
3
|
-
name?: string;
|
|
4
|
-
value?: string;
|
|
5
|
-
id?: string;
|
|
6
|
-
isChecked?: boolean;
|
|
7
|
-
color?: 'default' | 'gray' | 'error';
|
|
8
|
-
isIndeterminate?: boolean;
|
|
9
|
-
isDisabled?: boolean;
|
|
10
|
-
label?: string;
|
|
11
|
-
onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
12
|
-
};
|
|
13
|
-
export declare function Checkbox({ name, value, id, isChecked, isIndeterminate, isDisabled, onChange, label, color, }: Props): import("react").JSX.Element;
|
|
14
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const CheckedIcon: () => import("react").JSX.Element;
|
package/dist/checkbox/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Checkbox } from './checkbox';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const MinusIcon: () => import("react").JSX.Element;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { MutableRefObject } from 'react';
|
|
2
|
-
type UseDropdownReturnType = {
|
|
3
|
-
isVisible: boolean;
|
|
4
|
-
setIsVisible: React.Dispatch<React.SetStateAction<boolean>>;
|
|
5
|
-
isDisabled: boolean;
|
|
6
|
-
portalTargetRef?: MutableRefObject<HTMLElement | null>;
|
|
7
|
-
targetDimensions: {
|
|
8
|
-
width: number;
|
|
9
|
-
height: number;
|
|
10
|
-
};
|
|
11
|
-
variant: 'text' | 'outline';
|
|
12
|
-
};
|
|
13
|
-
export declare const DropdownContext: import("react").Context<UseDropdownReturnType>;
|
|
14
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { MouseEvent, PropsWithChildren } from 'react';
|
|
2
|
-
type Props = {
|
|
3
|
-
color?: 'gray' | 'red';
|
|
4
|
-
onClick?: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
5
|
-
};
|
|
6
|
-
export declare function DropdownItem({ children, color, onClick }: PropsWithChildren<Props>): import("react").JSX.Element;
|
|
7
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { CSSProperties, PropsWithChildren } from 'react';
|
|
2
|
-
import type { DropdownHorizontalAlign, DropdownVerticalPosition } from './type';
|
|
3
|
-
type Props = {
|
|
4
|
-
maxHeight?: CSSProperties['height'];
|
|
5
|
-
isNoPadding?: boolean;
|
|
6
|
-
verticalPosition?: DropdownVerticalPosition;
|
|
7
|
-
horizontalAlign?: DropdownHorizontalAlign;
|
|
8
|
-
};
|
|
9
|
-
export declare function DropdownMenu({ children, maxHeight, isNoPadding, verticalPosition, horizontalAlign, }: PropsWithChildren<Props>): false | import("react").JSX.Element;
|
|
10
|
-
export {};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { IconName } from '@zenkigen-inc/component-icons';
|
|
2
|
-
import type { MutableRefObject, PropsWithChildren, ReactElement } from 'react';
|
|
3
|
-
import { DropdownItem } from './dropdown-item';
|
|
4
|
-
import { DropdownMenu } from './dropdown-menu';
|
|
5
|
-
type Props = {
|
|
6
|
-
size?: 'x-small' | 'small' | 'medium' | 'large';
|
|
7
|
-
variant?: 'text' | 'outline';
|
|
8
|
-
title?: string;
|
|
9
|
-
isDisabled?: boolean;
|
|
10
|
-
isArrowHidden?: boolean;
|
|
11
|
-
portalTargetRef?: MutableRefObject<HTMLElement | null>;
|
|
12
|
-
} & ({
|
|
13
|
-
target: ReactElement;
|
|
14
|
-
label?: never;
|
|
15
|
-
icon?: never;
|
|
16
|
-
} | {
|
|
17
|
-
target?: undefined;
|
|
18
|
-
label: string;
|
|
19
|
-
icon?: IconName;
|
|
20
|
-
});
|
|
21
|
-
export declare function Dropdown({ children, target, label, icon, size, variant, title, isDisabled, isArrowHidden, portalTargetRef, }: PropsWithChildren<Props>): import("react").JSX.Element;
|
|
22
|
-
export declare namespace Dropdown {
|
|
23
|
-
var Menu: typeof DropdownMenu;
|
|
24
|
-
var Item: typeof DropdownItem;
|
|
25
|
-
}
|
|
26
|
-
export {};
|
package/dist/dropdown/index.d.ts
DELETED
package/dist/dropdown/type.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
|
-
export type DropdownItemType = {
|
|
3
|
-
id: string;
|
|
4
|
-
content: ReactNode;
|
|
5
|
-
color?: 'gray' | 'red';
|
|
6
|
-
onClick?: () => void;
|
|
7
|
-
};
|
|
8
|
-
export type DropdownVerticalPosition = 'top' | 'bottom';
|
|
9
|
-
export type DropdownHorizontalAlign = 'left' | 'center' | 'right';
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
type Props = {
|
|
2
|
-
value: number;
|
|
3
|
-
isEditable?: boolean;
|
|
4
|
-
onChangeRating?: (newRating: number) => void | null;
|
|
5
|
-
size?: 'medium' | 'large';
|
|
6
|
-
};
|
|
7
|
-
export declare function EvaluationStar({ value, isEditable, onChangeRating, size }: Props): import("react").JSX.Element;
|
|
8
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { EvaluationStar } from './evaluation-star';
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
|
-
type Level = 1 | 2 | 3 | 4 | 5;
|
|
3
|
-
type Props = {
|
|
4
|
-
level: Level;
|
|
5
|
-
before?: ReactNode;
|
|
6
|
-
after?: ReactNode;
|
|
7
|
-
children?: ReactNode;
|
|
8
|
-
};
|
|
9
|
-
export declare function Heading(props: Props): import("react").JSX.Element;
|
|
10
|
-
export {};
|
package/dist/heading/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Heading } from './heading';
|
package/dist/hooks/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './use-outside-click';
|
package/dist/icon/icon.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { IconName } from '@zenkigen-inc/component-icons';
|
|
2
|
-
import { iconColors } from '@zenkigen-inc/component-theme';
|
|
3
|
-
type Size = 'x-small' | 'small' | 'medium' | 'large' | 'x-large';
|
|
4
|
-
type Color = keyof typeof iconColors;
|
|
5
|
-
type Props = {
|
|
6
|
-
name: IconName;
|
|
7
|
-
size?: Size;
|
|
8
|
-
color?: Color;
|
|
9
|
-
isDisabled?: boolean;
|
|
10
|
-
className?: string;
|
|
11
|
-
};
|
|
12
|
-
export declare const Icon: ({ size, isDisabled, ...props }: Props) => import("react").JSX.Element;
|
|
13
|
-
export {};
|
package/dist/icon/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './icon';
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { IconName } from '@zenkigen-inc/component-icons';
|
|
2
|
-
type Size = 'small' | 'medium' | 'large';
|
|
3
|
-
type Variant = 'outline' | 'text';
|
|
4
|
-
type Props = {
|
|
5
|
-
icon: IconName;
|
|
6
|
-
size?: Size;
|
|
7
|
-
isDisabled?: boolean;
|
|
8
|
-
isNoPadding?: boolean;
|
|
9
|
-
variant?: Variant;
|
|
10
|
-
} & ({
|
|
11
|
-
isAnchor: true;
|
|
12
|
-
href: string;
|
|
13
|
-
target?: HTMLAnchorElement['target'];
|
|
14
|
-
} | {
|
|
15
|
-
isAnchor?: false;
|
|
16
|
-
onClick?: () => void;
|
|
17
|
-
});
|
|
18
|
-
export declare function IconButton({ size, variant, isNoPadding, isDisabled, ...props }: Props): import("react").JSX.Element;
|
|
19
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { IconButton } from './icon-button';
|