fis-component 0.0.39 → 0.0.41
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/cjs/index.js +4 -4
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/src/components/Table/ColumnCell/ColumnCell.stories.d.ts +0 -1
- package/dist/cjs/types/src/components/Table/ColumnCell/index.d.ts +1 -1
- package/dist/cjs/types/src/components/Table/HeaderCell/HeaderCell.stories.d.ts +1 -1
- package/dist/cjs/types/src/components/Table/HeaderCell/index.d.ts +1 -2
- package/dist/cjs/types/src/components/Table/HeaderCell/styles.d.ts +1 -2
- package/dist/esm/index.js +4 -4
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/src/components/Table/ColumnCell/ColumnCell.stories.d.ts +0 -1
- package/dist/esm/types/src/components/Table/ColumnCell/index.d.ts +1 -1
- package/dist/esm/types/src/components/Table/HeaderCell/HeaderCell.stories.d.ts +1 -1
- package/dist/esm/types/src/components/Table/HeaderCell/index.d.ts +1 -2
- package/dist/esm/types/src/components/Table/HeaderCell/styles.d.ts +1 -2
- package/dist/index.d.ts +2 -3
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DetailedHTMLProps, HTMLAttributes, ReactElement } from "react";
|
|
2
2
|
interface ColumnCellProps extends Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> {
|
|
3
3
|
className?: string;
|
|
4
|
-
textAlign?:
|
|
4
|
+
textAlign?: "left" | "right";
|
|
5
5
|
contentWrapText?: boolean;
|
|
6
6
|
variant?: string;
|
|
7
7
|
content?: string;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { DetailedHTMLProps, HTMLAttributes, ReactNode } from "react";
|
|
2
2
|
interface HeaderCellProps extends Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> {
|
|
3
3
|
className?: string;
|
|
4
|
-
|
|
5
|
-
textAlign?: string;
|
|
4
|
+
textAlign?: "left" | "right";
|
|
6
5
|
label: string | null | undefined;
|
|
7
6
|
description?: string;
|
|
8
7
|
rightComponent?: ReactNode;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
interface HeaderCellStyleProps {
|
|
2
|
-
$textAlign?: string;
|
|
3
2
|
$disabled?: boolean;
|
|
4
3
|
$hasRightDivider?: boolean;
|
|
5
4
|
$hasTruncateLabel?: boolean;
|
|
6
|
-
$
|
|
5
|
+
$textAlign?: "left" | "right";
|
|
7
6
|
$onlyIcon?: boolean;
|
|
8
7
|
}
|
|
9
8
|
export declare const DivHeaderCellContainerSC: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, HeaderCellStyleProps>> & string;
|
package/dist/esm/index.js
CHANGED
|
@@ -71197,7 +71197,7 @@ const DivHeaderCellContainerSC = styled.div `
|
|
|
71197
71197
|
|
|
71198
71198
|
.cell-content {
|
|
71199
71199
|
display: flex;
|
|
71200
|
-
justify-content: ${(props) => props.$
|
|
71200
|
+
justify-content: ${(props) => props.$textAlign === "right" ? "flex-end" : "space-between"};
|
|
71201
71201
|
min-height: ${getTheme("com/segmented/item/active-surface/size-sm/height")};
|
|
71202
71202
|
width: 100%;
|
|
71203
71203
|
gap: ${getTheme("com/table/title-cell/default/label/vertical-gap")};
|
|
@@ -71206,7 +71206,7 @@ const DivHeaderCellContainerSC = styled.div `
|
|
|
71206
71206
|
${getTheme("Label/XS")};
|
|
71207
71207
|
width: 100%;
|
|
71208
71208
|
display: inline-block;
|
|
71209
|
-
${(props) => (props.$
|
|
71209
|
+
${(props) => (props.$textAlign === "right" ? "text-align: end" : "")};
|
|
71210
71210
|
color: ${(props) => getTheme(`com/table/title-cell/${props?.$disabled ? "disable" : "default"}/label/color-text`)};
|
|
71211
71211
|
|
|
71212
71212
|
${(props) => {
|
|
@@ -71259,8 +71259,8 @@ const DivHeaderCellContainerSC = styled.div `
|
|
|
71259
71259
|
}
|
|
71260
71260
|
`;
|
|
71261
71261
|
|
|
71262
|
-
const FISTableHeaderCell = forwardRef(({ className,
|
|
71263
|
-
return (jsx(DivHeaderCellContainerSC, { ref: ref, className: classNames("header-cell-container", className), "$textAlign": textAlign, "$disabled": disabled, "$hasTruncateLabel": hasTruncateLabel, "$hasRightDivider": hasRightDivider, "$
|
|
71262
|
+
const FISTableHeaderCell = forwardRef(({ className, label, description, rightComponent, disabled, hasRightDivider = true, hasTruncateLabel = false, onlyIcon = false, textAlign = "left", ...rest }, ref) => {
|
|
71263
|
+
return (jsx(DivHeaderCellContainerSC, { ref: ref, className: classNames("header-cell-container", className), "$textAlign": textAlign, "$disabled": disabled, "$hasTruncateLabel": hasTruncateLabel, "$hasRightDivider": hasRightDivider, "$onlyIcon": onlyIcon, ...rest, children: jsxs("div", { className: "header-cell-content", children: [jsxs("div", { className: "cell-content", children: [label && jsx("div", { className: "label", children: label }), jsx("div", { className: "right-component-father", children: jsx("div", { className: "right-component-child", children: rightComponent }) })] }), jsx("div", { className: "cell-content", children: description && jsx("div", { className: "description", children: description }) })] }) }));
|
|
71264
71264
|
});
|
|
71265
71265
|
FISTableHeaderCell.displayName = "FISTableHeaderCell";
|
|
71266
71266
|
|