@risalabs_frontend_org/oasis-ui-kit 0.23.0 → 0.27.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/dist/index.d.ts +3 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/src/components/icon-action-menu/icon-action-menu-trigger.d.ts +18 -0
- package/dist/src/components/icon-action-menu/icon-action-menu.d.ts +25 -0
- package/dist/src/components/section-header-row/section-header-row.d.ts +26 -0
- package/package.json +1 -1
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { type IconActionMenuItem } from "./icon-action-menu";
|
|
3
|
+
import "./icon-action-menu-trigger.scss";
|
|
4
|
+
export interface IconActionMenuTriggerProps {
|
|
5
|
+
items: IconActionMenuItem[];
|
|
6
|
+
onItemClick?: (item: IconActionMenuItem) => void;
|
|
7
|
+
onOpenChange?: (open: boolean) => void;
|
|
8
|
+
iconSize?: number;
|
|
9
|
+
triggerClassName?: string;
|
|
10
|
+
className?: string;
|
|
11
|
+
menuProps?: Partial<{
|
|
12
|
+
padding: string;
|
|
13
|
+
gap: string;
|
|
14
|
+
iconSize: number;
|
|
15
|
+
}>;
|
|
16
|
+
getPortalContainer?: () => HTMLElement;
|
|
17
|
+
}
|
|
18
|
+
export declare function IconActionMenuTrigger({ items, onItemClick, onOpenChange, iconSize, triggerClassName, className, menuProps, getPortalContainer, }: IconActionMenuTriggerProps): React.JSX.Element;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./icon-action-menu.scss";
|
|
3
|
+
export type IconActionMenuItemVariant = "default" | "danger";
|
|
4
|
+
export interface IconActionMenuItem {
|
|
5
|
+
id: string;
|
|
6
|
+
label: string;
|
|
7
|
+
icon?: React.ReactNode;
|
|
8
|
+
onClick: (item: IconActionMenuItem) => void;
|
|
9
|
+
variant?: IconActionMenuItemVariant;
|
|
10
|
+
iconColor?: string;
|
|
11
|
+
labelColor?: string;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
ariaLabel?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface IconActionMenuProps {
|
|
16
|
+
items: IconActionMenuItem[];
|
|
17
|
+
className?: string;
|
|
18
|
+
padding?: string;
|
|
19
|
+
gap?: string;
|
|
20
|
+
iconSize?: number;
|
|
21
|
+
onItemClick?: (item: IconActionMenuItem) => void;
|
|
22
|
+
role?: "menu" | "list";
|
|
23
|
+
id?: string;
|
|
24
|
+
}
|
|
25
|
+
export declare function IconActionMenu({ items, className, padding, gap, iconSize, onItemClick, role, id, }: IconActionMenuProps): React.JSX.Element;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { IconActionMenuItem } from "../icon-action-menu/icon-action-menu";
|
|
3
|
+
import "./section-header-row.scss";
|
|
4
|
+
export interface SectionHeaderRowProps {
|
|
5
|
+
stepNumber?: number;
|
|
6
|
+
title: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
actionMenuItems: IconActionMenuItem[];
|
|
9
|
+
isExpanded?: boolean;
|
|
10
|
+
onExpandClick?: () => void;
|
|
11
|
+
onReorderClick?: () => void;
|
|
12
|
+
draggable?: boolean;
|
|
13
|
+
dragId?: string | number;
|
|
14
|
+
onDragStart?: (e: React.DragEvent) => void;
|
|
15
|
+
onDragEnd?: (e: React.DragEvent) => void;
|
|
16
|
+
onActionMenuItemClick?: (item: IconActionMenuItem) => void;
|
|
17
|
+
className?: string;
|
|
18
|
+
titleClassName?: string;
|
|
19
|
+
descriptionClassName?: string;
|
|
20
|
+
badgeSize?: number;
|
|
21
|
+
actionIconSize?: number;
|
|
22
|
+
getActionMenuPortalContainer?: () => HTMLElement;
|
|
23
|
+
children?: React.ReactNode;
|
|
24
|
+
expandableBgColor?: string;
|
|
25
|
+
}
|
|
26
|
+
export declare function SectionHeaderRow({ stepNumber, title, description, actionMenuItems, isExpanded, onExpandClick, onReorderClick, onDragStart, onDragEnd, onActionMenuItemClick, className, titleClassName, descriptionClassName, badgeSize, actionIconSize, getActionMenuPortalContainer, children, draggable, dragId, expandableBgColor, }: SectionHeaderRowProps): React.JSX.Element;
|