@cleen/ui 0.1.292 → 0.1.294
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 +16 -0
- package/dist/index.js +2 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -3319,6 +3319,8 @@ interface MenuItemProps {
|
|
|
3319
3319
|
isLast?: boolean;
|
|
3320
3320
|
handleClick?: (item: MenuItemButton) => void;
|
|
3321
3321
|
onEnterSubmenu?: (items: IMenuItem[], title?: React.ReactNode) => void;
|
|
3322
|
+
/** Draws an item's three-dots menu: its `actions` in a menu of their own, opened by `trigger`. */
|
|
3323
|
+
renderActionsMenu?: (actions: IMenuItem[], trigger: ReactNode) => ReactNode;
|
|
3322
3324
|
classNames?: {
|
|
3323
3325
|
container?: string;
|
|
3324
3326
|
label?: string;
|
|
@@ -3344,6 +3346,14 @@ interface MenuItemButton extends MenuItemSharedProps {
|
|
|
3344
3346
|
type: 'button';
|
|
3345
3347
|
onClick?: () => void;
|
|
3346
3348
|
submenu?: IMenuItem[];
|
|
3349
|
+
/**
|
|
3350
|
+
* The item's own actions (edit, remove, ...), behind a three-dots button at its right end that opens them in a
|
|
3351
|
+
* menu beside it. Clicking one closes the whole menu unless `keepOpenOnClick` is set; the item itself still does
|
|
3352
|
+
* `onClick` or opens `submenu`.
|
|
3353
|
+
*/
|
|
3354
|
+
actions?: IMenuItem[];
|
|
3355
|
+
/** Accessible name and tooltip of the three-dots button. Default `'More actions'`. */
|
|
3356
|
+
actionsLabel?: string;
|
|
3347
3357
|
}
|
|
3348
3358
|
interface MenuItemLink extends MenuItemSharedProps {
|
|
3349
3359
|
type: 'link';
|
|
@@ -4373,6 +4383,12 @@ declare const DrawerContentTitle: react.ForwardRefExoticComponent<DrawerContentT
|
|
|
4373
4383
|
* Highly customizable through props, allowing for different menu structures,
|
|
4374
4384
|
* drawer content, and styling.
|
|
4375
4385
|
*
|
|
4386
|
+
* On short viewports the rail tightens its padding, gaps and item heights
|
|
4387
|
+
* before it has to scroll: full size from 900px of height, smallest at 650px.
|
|
4388
|
+
* When something else takes viewport height above or below the sidebar (a
|
|
4389
|
+
* banner, say), set `--cleen-sidebar-offset` to its height on the sidebar or an
|
|
4390
|
+
* ancestor, so the rail tightens by the height it really has.
|
|
4391
|
+
*
|
|
4376
4392
|
* @example
|
|
4377
4393
|
* ```tsx
|
|
4378
4394
|
* const navigationItems = [
|