@phreshos/react-ui 0.1.51 → 0.1.52
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.
|
@@ -30,7 +30,11 @@ type ItemState = Readonly<{
|
|
|
30
30
|
}>;
|
|
31
31
|
/** One item of a SelectionTrack; its label reads against the selection when selected. */
|
|
32
32
|
export declare function selectionItemStyle(metrics: ControlMetrics, color: Color, orientation: Orientation, state: ItemState): CSSProperties;
|
|
33
|
-
/**
|
|
33
|
+
/**
|
|
34
|
+
* An item's label: an optional leading icon and text, a gap apart. It fills its item and follows the
|
|
35
|
+
* item's alignment, so a label stays centered in a centered item, and content given the item's whole
|
|
36
|
+
* width, such as a tab's title with its close button at the end, can take it.
|
|
37
|
+
*/
|
|
34
38
|
export declare function SelectionItemLabel({ metrics, emphasized, children }: Readonly<{
|
|
35
39
|
metrics: ControlMetrics;
|
|
36
40
|
emphasized: boolean;
|
|
@@ -63,11 +63,17 @@ export function selectionItemStyle(metrics, color, orientation, state) {
|
|
|
63
63
|
color: state.isSelected ? readableColor(resolveColor(color, colors), colors) : colors.foreground
|
|
64
64
|
};
|
|
65
65
|
}
|
|
66
|
-
/**
|
|
66
|
+
/**
|
|
67
|
+
* An item's label: an optional leading icon and text, a gap apart. It fills its item and follows the
|
|
68
|
+
* item's alignment, so a label stays centered in a centered item, and content given the item's whole
|
|
69
|
+
* width, such as a tab's title with its close button at the end, can take it.
|
|
70
|
+
*/
|
|
67
71
|
export function SelectionItemLabel({ metrics, emphasized, children }) {
|
|
68
72
|
return _jsx("span", { style: {
|
|
69
73
|
...transition(metrics.visual, "opacity"),
|
|
70
74
|
display: "flex",
|
|
75
|
+
flex: "1 1 auto",
|
|
76
|
+
justifyContent: "inherit",
|
|
71
77
|
alignItems: "center",
|
|
72
78
|
gap: metrics.gap,
|
|
73
79
|
minWidth: 0,
|