@protonradio/proton-ui 0.7.8 → 0.7.10
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.cjs.js +11 -11
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +43 -2
- package/dist/index.es.js +263 -218
- package/dist/index.es.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ import { OverlayTriggerProps } from 'react-stately';
|
|
|
12
12
|
import { OverlayTriggerState } from 'react-stately';
|
|
13
13
|
import { PressEvent } from 'react-aria';
|
|
14
14
|
import { ReactNode } from 'react';
|
|
15
|
-
import {
|
|
15
|
+
import { RowProps } from '@react-stately/table';
|
|
16
16
|
import { Section } from '@react-stately/table';
|
|
17
17
|
import { Selection as Selection_2 } from 'react-stately';
|
|
18
18
|
import { TableBody } from '@react-stately/table';
|
|
@@ -439,6 +439,10 @@ export declare interface ProtonColumnProps<T> extends ColumnProps<T> {
|
|
|
439
439
|
align?: "left" | "center" | "right";
|
|
440
440
|
}
|
|
441
441
|
|
|
442
|
+
export declare interface ProtonRowProps<T = object> extends RowProps<T> {
|
|
443
|
+
backgroundColor?: string;
|
|
444
|
+
}
|
|
445
|
+
|
|
442
446
|
declare interface ResponsiveMenuProps {
|
|
443
447
|
/** The id of the menu */
|
|
444
448
|
menuId?: string;
|
|
@@ -472,7 +476,7 @@ export declare const ResponsiveSelect: {
|
|
|
472
476
|
*/
|
|
473
477
|
declare function ResponsiveSelectMenu<T extends object>({ label, name, isDisabled, disabledKeys, selectedKey, onSelectionChange, onOpen, onClose, items, "data-testid": testId, children, }: SelectProps<T>): JSX_2.Element;
|
|
474
478
|
|
|
475
|
-
export
|
|
479
|
+
export declare const Row: <T = object>(props: ProtonRowProps<T>) => JSX.Element;
|
|
476
480
|
|
|
477
481
|
/**
|
|
478
482
|
* Base Overlay component for creating modal-like backgrounds.
|
|
@@ -604,6 +608,43 @@ export { TableHeader }
|
|
|
604
608
|
|
|
605
609
|
declare type TableProps = AriaTableProps & TableStateProps<object>;
|
|
606
610
|
|
|
611
|
+
/**
|
|
612
|
+
* A component that displays text with an ellipsis when it overflows its container.
|
|
613
|
+
* @interface TextEllipsisProps
|
|
614
|
+
*/
|
|
615
|
+
export declare const TextEllipsis: default_2.FC<TextEllipsisProps>;
|
|
616
|
+
|
|
617
|
+
declare interface TextEllipsisProps extends default_2.HTMLAttributes<HTMLDivElement> {
|
|
618
|
+
/**
|
|
619
|
+
* The content to display within the text ellipsis.
|
|
620
|
+
*/
|
|
621
|
+
children: ReactNode;
|
|
622
|
+
/**
|
|
623
|
+
* The maximum width of the text container in any valid CSS unit (px, rem, em, %, etc.).
|
|
624
|
+
* When the container width is less than this value, text will be truncated with an ellipsis.
|
|
625
|
+
*/
|
|
626
|
+
maxWidth?: string | number;
|
|
627
|
+
/**
|
|
628
|
+
* Whether to truncate the text to a single line. Default is true.
|
|
629
|
+
* If false, the text will wrap to multiple lines.
|
|
630
|
+
*/
|
|
631
|
+
singleLine?: boolean;
|
|
632
|
+
/**
|
|
633
|
+
* The number of lines to show before truncating with an ellipsis.
|
|
634
|
+
* Only applies when singleLine is false.
|
|
635
|
+
*/
|
|
636
|
+
lines?: number;
|
|
637
|
+
/**
|
|
638
|
+
* The title attribute to show on hover. If not provided and singleLine is true,
|
|
639
|
+
* the children will be used as the title (if children is a string).
|
|
640
|
+
*/
|
|
641
|
+
title?: string;
|
|
642
|
+
/**
|
|
643
|
+
* A test ID.
|
|
644
|
+
*/
|
|
645
|
+
"data-testid"?: string;
|
|
646
|
+
}
|
|
647
|
+
|
|
607
648
|
/**
|
|
608
649
|
* A component that displays text with emphasis. Provide tooltipProps to wrap the text in a tooltip trigger.
|
|
609
650
|
* @interface TextEmphasisProps
|