fis-component 0.0.63 → 0.0.65
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 +17 -8
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/src/components/LinkButton/index.d.ts +4 -0
- package/dist/cjs/types/src/components/LinkButton/styles.d.ts +1 -0
- package/dist/esm/index.js +17 -8
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/src/components/LinkButton/index.d.ts +4 -0
- package/dist/esm/types/src/components/LinkButton/styles.d.ts +1 -0
- package/dist/index.d.ts +4 -0
- package/package.json +1 -1
|
@@ -18,6 +18,10 @@ export interface ButtonProps extends ComponentPropsWithoutRef<"button"> {
|
|
|
18
18
|
* Defines the type of the button.
|
|
19
19
|
*/
|
|
20
20
|
underline?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* If true, text will be truncated with ellipsis on single line
|
|
23
|
+
*/
|
|
24
|
+
singleLine?: boolean;
|
|
21
25
|
}
|
|
22
26
|
declare const FISLinkButton: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
23
27
|
export default FISLinkButton;
|
|
@@ -3,6 +3,7 @@ interface ButtonProps {
|
|
|
3
3
|
$variant?: ButtonVariant;
|
|
4
4
|
$size: ButtonSize;
|
|
5
5
|
$underline?: boolean;
|
|
6
|
+
$singleLine?: boolean;
|
|
6
7
|
}
|
|
7
8
|
export declare const LinkButtonStyled: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, ButtonProps>> & string;
|
|
8
9
|
export declare const IconStyled: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
|
package/dist/esm/index.js
CHANGED
|
@@ -60832,6 +60832,15 @@ const LinkButtonStyled = styled.button `
|
|
|
60832
60832
|
css `
|
|
60833
60833
|
text-decoration: underline;
|
|
60834
60834
|
`}
|
|
60835
|
+
|
|
60836
|
+
${(props) => props.$singleLine &&
|
|
60837
|
+
css `
|
|
60838
|
+
.button-content {
|
|
60839
|
+
white-space: nowrap;
|
|
60840
|
+
overflow: hidden;
|
|
60841
|
+
text-overflow: ellipsis;
|
|
60842
|
+
}
|
|
60843
|
+
`}
|
|
60835
60844
|
`;
|
|
60836
60845
|
const IconStyled$1 = styled.span `
|
|
60837
60846
|
display: inline-flex;
|
|
@@ -60839,10 +60848,10 @@ const IconStyled$1 = styled.span `
|
|
|
60839
60848
|
`;
|
|
60840
60849
|
|
|
60841
60850
|
const FISLinkButton = forwardRef((props, ref) => {
|
|
60842
|
-
const {
|
|
60851
|
+
const { children, size = "sm", variant = "default", underline, startIcon: startIconProp, endIcon: endIconProp, singleLine = false, ...rest } = props;
|
|
60843
60852
|
const startIcon = startIconProp && (jsx(IconStyled$1, { className: "button-icon", children: startIconProp }));
|
|
60844
60853
|
const endIcon = endIconProp && (jsx(IconStyled$1, { className: "button-icon", children: endIconProp }));
|
|
60845
|
-
return (jsxs(LinkButtonStyled, { ...rest, ref: ref, "$variant": variant, "$size": size, "$underline": underline, children: [startIcon, jsx("span", { className: "button-content", children: children }), endIcon] }));
|
|
60854
|
+
return (jsxs(LinkButtonStyled, { ...rest, ref: ref, "$variant": variant, "$size": size, "$underline": underline, "$singleLine": singleLine, children: [startIcon, jsx("span", { className: "button-content", children: children }), endIcon] }));
|
|
60846
60855
|
});
|
|
60847
60856
|
FISLinkButton.displayName = "FISLinkButton";
|
|
60848
60857
|
|
|
@@ -61456,8 +61465,8 @@ function FISProgressCircular({ variant, ...rest }) {
|
|
|
61456
61465
|
FISProgressCircular.displayName = "FISProgressCircular";
|
|
61457
61466
|
|
|
61458
61467
|
const FISIconButton = forwardRef((props, ref) => {
|
|
61459
|
-
const {
|
|
61460
|
-
return (jsx(ButtonStyled, { ...rest, ref: ref, "$variant": variant, "$size": size, "$active": active, "$loading": loading, disabled: disabled || loading, children: loading ? (jsx(FISProgressCircular, { size: size, variant: "indeterminate", invert: variant === "primary-white" ||
|
|
61468
|
+
const { children, active = false, size = "md", variant = "primary", icon: iconProp, loading = false, disabled = false, ...rest } = props;
|
|
61469
|
+
return (jsx(ButtonStyled, { type: "button", ...rest, ref: ref, "$variant": variant, "$size": size, "$active": active, "$loading": loading, disabled: disabled || loading, children: loading ? (jsx(FISProgressCircular, { size: size, variant: "indeterminate", invert: variant === "primary-white" ||
|
|
61461
61470
|
variant === "secondary-white" ||
|
|
61462
61471
|
variant === "secondary-invisible-white" })) : (iconProp) }));
|
|
61463
61472
|
});
|
|
@@ -62377,7 +62386,7 @@ const ProgressCircularSC$1 = styled(FISProgressCircular) `
|
|
|
62377
62386
|
`;
|
|
62378
62387
|
|
|
62379
62388
|
const FISButton = forwardRef((props, ref) => {
|
|
62380
|
-
const { active,
|
|
62389
|
+
const { active, children, size = "md", variant = "primary", loading, disabled = false, startIcon: startIconProp, endIcon: endIconProp, ...rest } = props;
|
|
62381
62390
|
const startIcon = startIconProp && jsx(SpanIconSC$2, { children: startIconProp });
|
|
62382
62391
|
const endIcon = endIconProp && jsx(SpanIconSC$2, { children: endIconProp });
|
|
62383
62392
|
return (jsxs(ButtonSC, { ...rest, ref: ref, "$variant": variant, "$size": size, "$active": active, "$loading": loading, disabled: disabled || loading, children: [loading && (jsx(ProgressCircularSC$1, { size: size, variant: "indeterminate", invert: variant === "primary-white" || variant === "secondary-white" })), startIcon, jsx("span", { className: "button-content", children: children }), endIcon] }));
|
|
@@ -63689,7 +63698,7 @@ const DivIconDotSC = styled.div `
|
|
|
63689
63698
|
|
|
63690
63699
|
const MAX_VISIBLE_ITEMS = 4;
|
|
63691
63700
|
const BreadcrumbItem = forwardRef(({ label, icon, active, onClick, ...rest }, ref) => {
|
|
63692
|
-
return (jsxs(ButtonItemSC, { ...rest, ref: ref, onClick: onClick, "$active": active, children: [icon && jsx(DivIconSC$3, { children: icon }), label && jsx(SpanLabelSC$1, { children: label })] }));
|
|
63701
|
+
return (jsxs(ButtonItemSC, { type: "button", ...rest, ref: ref, onClick: onClick, "$active": active, children: [icon && jsx(DivIconSC$3, { children: icon }), label && jsx(SpanLabelSC$1, { children: label })] }));
|
|
63693
63702
|
});
|
|
63694
63703
|
const BreadcrumbEllipsis = () => (jsxs(Fragment, { children: [jsx(DivIconDotSC, { children: jsx(DotIcon, {}) }), jsx(SeparatorIcon, {})] }));
|
|
63695
63704
|
const FISBreadcrumb = ({ items, className }) => {
|
|
@@ -73023,7 +73032,7 @@ const ProgressCircularSC = styled(FISProgressCircular) `
|
|
|
73023
73032
|
`;
|
|
73024
73033
|
|
|
73025
73034
|
const SplitButtonItem = ({ icon, label, size, variant, onButtonClick, disabled = false, activeButton = false, loading = false, ...props }) => {
|
|
73026
|
-
return (jsxs(ButtonItem, { ...props, onClick: onButtonClick, "$size": size, disabled: disabled, "$variant": variant, "$active": activeButton, "$loading": loading, children: [loading && (jsx(ProgressCircularSC, { size: size, variant: "indeterminate", invert: variant === "primary-white" || variant === "secondary-white", "aria-label": "Loading" })), icon && !(size === "xs") && (jsx(DivIcon, { "$size": size, "$variant": variant, "$loading": loading, children: icon })), label && (jsx(SpanLabel, { "$size": size, "$variant": variant, "$loading": loading, children: label }))] }));
|
|
73035
|
+
return (jsxs(ButtonItem, { type: "button", ...props, onClick: onButtonClick, "$size": size, disabled: disabled, "$variant": variant, "$active": activeButton, "$loading": loading, children: [loading && (jsx(ProgressCircularSC, { size: size, variant: "indeterminate", invert: variant === "primary-white" || variant === "secondary-white", "aria-label": "Loading" })), icon && !(size === "xs") && (jsx(DivIcon, { "$size": size, "$variant": variant, "$loading": loading, children: icon })), label && (jsx(SpanLabel, { "$size": size, "$variant": variant, "$loading": loading, children: label }))] }));
|
|
73027
73036
|
};
|
|
73028
73037
|
var SplitButtonItem$1 = memo(SplitButtonItem);
|
|
73029
73038
|
|
|
@@ -73619,7 +73628,7 @@ const FISPagination = ({ pageSize = LIMIT_DEFAULT, current = 1, total = 0, minim
|
|
|
73619
73628
|
}
|
|
73620
73629
|
return originalElement;
|
|
73621
73630
|
};
|
|
73622
|
-
return (jsxs(DivPaginationContainer, { children: [jsx(SpanTotalSC, { children: showTotal ? showTotal(total, rangeRecords) : defaultShowTotal }), jsxs(DivPaginationContent, { children: [jsx(PaginationAntdSC, { ...mergedProps, "$minimize": Boolean(minimize), showSizeChanger: false, itemRender: itemRender }), jsx(FISSelect, { style: { width: "
|
|
73631
|
+
return (jsxs(DivPaginationContainer, { children: [jsx(SpanTotalSC, { children: showTotal ? showTotal(total, rangeRecords) : defaultShowTotal }), jsxs(DivPaginationContent, { children: [jsx(PaginationAntdSC, { ...mergedProps, "$minimize": Boolean(minimize), showSizeChanger: false, itemRender: itemRender }), jsx(FISSelect, { style: { width: "100px" }, size: "xs", options: [
|
|
73623
73632
|
{
|
|
73624
73633
|
groupLabel: "",
|
|
73625
73634
|
items: (rest.pageSizeOptions || [10, 20, 50, 100]).map((size) => ({
|