fis-component 0.1.9 → 0.1.11
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 +103 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/src/components/Text/index.d.ts +9 -0
- package/dist/cjs/types/src/components/Text/styles.d.ts +4 -0
- package/dist/cjs/types/src/index.d.ts +1 -0
- package/dist/esm/index.js +103 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/src/components/Text/index.d.ts +9 -0
- package/dist/esm/types/src/components/Text/styles.d.ts +4 -0
- package/dist/esm/types/src/index.d.ts +1 -0
- package/dist/index.d.ts +15 -8
- package/package.json +1 -1
- package/src/styles/design-system/index.ts +2 -2
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ThemeType } from "../../styles/design-system";
|
|
2
|
+
import React from "react";
|
|
3
|
+
export interface FISTextPropsI extends React.HTMLAttributes<HTMLElement> {
|
|
4
|
+
variant?: keyof ThemeType;
|
|
5
|
+
tag?: keyof JSX.IntrinsicElements;
|
|
6
|
+
color?: keyof ThemeType;
|
|
7
|
+
}
|
|
8
|
+
declare const FISText: React.ForwardRefExoticComponent<FISTextPropsI & React.RefAttributes<any>>;
|
|
9
|
+
export default FISText;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const TextSC: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, {
|
|
2
|
+
$variant?: string;
|
|
3
|
+
$color?: string;
|
|
4
|
+
}>> & string;
|
|
@@ -44,3 +44,4 @@ export { default as FISSelectItem } from "./components/SelectItem";
|
|
|
44
44
|
export { default as useNotification } from "./components/Notification/useNotification";
|
|
45
45
|
export { default as useToast } from "./components/Toast/useToast";
|
|
46
46
|
export { default as FISPagination } from "./components/Pagination";
|
|
47
|
+
export { default as FISText } from "./components/Text";
|
package/dist/esm/index.js
CHANGED
|
@@ -61873,6 +61873,11 @@ function SeparatorIcon(props) {
|
|
|
61873
61873
|
return (jsx("svg", { width: width, height: height, viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...rest, children: jsx("path", { d: "M3.5 11L8.5 1", stroke: "currentColor", strokeWidth: "1.3", strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
61874
61874
|
}
|
|
61875
61875
|
|
|
61876
|
+
function HomeIcon(props) {
|
|
61877
|
+
const { width = 16, height = 16, ...rest } = props;
|
|
61878
|
+
return (jsx("svg", { width: width, height: height, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...rest, children: jsx("path", { d: "M5.33333 11.3333H10.6667M7.34513 1.84267L2.82359 5.35942C2.52135 5.5945 2.37022 5.71204 2.26135 5.85925C2.16491 5.98964 2.09307 6.13653 2.04935 6.29271C2 6.46902 2 6.66047 2 7.04338V11.8667C2 12.6134 2 12.9868 2.14532 13.272C2.27316 13.5229 2.47713 13.7268 2.72801 13.8547C3.01323 14 3.3866 14 4.13333 14H11.8667C12.6134 14 12.9868 14 13.272 13.8547C13.5229 13.7268 13.7268 13.5229 13.8547 13.272C14 12.9868 14 12.6134 14 11.8667V7.04338C14 6.66047 14 6.46902 13.9506 6.29271C13.9069 6.13653 13.8351 5.98964 13.7386 5.85925C13.6298 5.71204 13.4787 5.5945 13.1764 5.35942L8.65487 1.84267C8.42065 1.6605 8.30354 1.56942 8.17423 1.53441C8.06013 1.50351 7.93987 1.50351 7.82577 1.53441C7.69646 1.56942 7.57935 1.6605 7.34513 1.84267Z", stroke: "currentColor", "stroke-linecap": "round", "stroke-linejoin": "round" }) }));
|
|
61879
|
+
}
|
|
61880
|
+
|
|
61876
61881
|
function CloseIcon(props) {
|
|
61877
61882
|
const { width = 16, height = 16, ...rest } = props;
|
|
61878
61883
|
return (jsx("svg", { width: width, height: height, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...rest, children: jsx("path", { d: "M12.6671 3.33325L3.33374 12.6666M3.33374 3.33325L12.6671 12.6666", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
@@ -64236,7 +64241,7 @@ const BreadcrumbEllipsis = () => (jsxs(Fragment, { children: [jsx(DivIconDotSC,
|
|
|
64236
64241
|
const FISBreadcrumb = ({ items, className }) => {
|
|
64237
64242
|
if (items.length === 0)
|
|
64238
64243
|
return null;
|
|
64239
|
-
return (jsxs(DivContainerSC$9, { className: className, children: [
|
|
64244
|
+
return (jsxs(DivContainerSC$9, { className: className, children: [jsxs(Fragment, { children: [jsx(FISIconButton, { size: "xs", icon: items?.[0]?.icon ?? jsx(HomeIcon, {}), variant: "tertiary-invisible", onClick: items[0].onClick }), jsx(DivSeparatorIconSC$1, { children: jsx(SeparatorIcon, {}) })] }), items.length > MAX_VISIBLE_ITEMS ? (jsxs(Fragment, { children: [items.slice(1, 2).map((item, index) => (jsxs(React__default.Fragment, { children: [jsx(BreadcrumbItem, { ...item }), jsx(DivSeparatorIconSC$1, { children: jsx(SeparatorIcon, {}) })] }, index))), jsx(BreadcrumbEllipsis, {}), items.slice(-2).map((item, index) => (jsxs(React__default.Fragment, { children: [jsx(BreadcrumbItem, { ...item }), jsx(DivSeparatorIconSC$1, { children: jsx(SeparatorIcon, {}) })] }, `end-${index}`)))] })) : (jsx(Fragment, { children: items.slice(1).map((item, index) => (jsxs(React__default.Fragment, { children: [jsx(BreadcrumbItem, { ...item }), jsx(DivSeparatorIconSC$1, { children: jsx(SeparatorIcon, {}) })] }, index))) }))] }));
|
|
64240
64245
|
};
|
|
64241
64246
|
FISBreadcrumb.displayName = "FISBreadcrumb";
|
|
64242
64247
|
|
|
@@ -75061,5 +75066,101 @@ const FISPagination = ({ pageSize = LIMIT_DEFAULT, current = 1, total = 0, minim
|
|
|
75061
75066
|
} })] })] }));
|
|
75062
75067
|
};
|
|
75063
75068
|
|
|
75064
|
-
|
|
75069
|
+
const TextSC = styled.p `
|
|
75070
|
+
color: ${(props) => props.$color};
|
|
75071
|
+
|
|
75072
|
+
${({ $variant }) => {
|
|
75073
|
+
switch ($variant) {
|
|
75074
|
+
case "Emphasis/Emp-6":
|
|
75075
|
+
return css `
|
|
75076
|
+
${getTheme("Emphasis/Emp-6")}
|
|
75077
|
+
`;
|
|
75078
|
+
case "Emphasis/Emp-5":
|
|
75079
|
+
return css `
|
|
75080
|
+
${getTheme("Emphasis/Emp-5")}
|
|
75081
|
+
`;
|
|
75082
|
+
case "Emphasis/Emp-4":
|
|
75083
|
+
return css `
|
|
75084
|
+
${getTheme("Emphasis/Emp-4")}
|
|
75085
|
+
`;
|
|
75086
|
+
case "Emphasis/Emp-3":
|
|
75087
|
+
return css `
|
|
75088
|
+
${getTheme("Emphasis/Emp-3")}
|
|
75089
|
+
`;
|
|
75090
|
+
case "Emphasis/Emp-2":
|
|
75091
|
+
return css `
|
|
75092
|
+
${getTheme("Emphasis/Emp-2")}
|
|
75093
|
+
`;
|
|
75094
|
+
case "Emphasis/Emp-1":
|
|
75095
|
+
return css `
|
|
75096
|
+
${getTheme("Emphasis/Emp-1")}
|
|
75097
|
+
`;
|
|
75098
|
+
case "Label/XL":
|
|
75099
|
+
return css `
|
|
75100
|
+
${getTheme("Label/XL")}
|
|
75101
|
+
`;
|
|
75102
|
+
case "Label/Lg":
|
|
75103
|
+
return css `
|
|
75104
|
+
${getTheme("Label/Lg")}
|
|
75105
|
+
`;
|
|
75106
|
+
case "Label/Md":
|
|
75107
|
+
return css `
|
|
75108
|
+
${getTheme("Label/Md")}
|
|
75109
|
+
`;
|
|
75110
|
+
case "Label/Sm":
|
|
75111
|
+
return css `
|
|
75112
|
+
${getTheme("Label/Sm")}
|
|
75113
|
+
`;
|
|
75114
|
+
case "Label/XS":
|
|
75115
|
+
return css `
|
|
75116
|
+
${getTheme("Label/XS")}
|
|
75117
|
+
`;
|
|
75118
|
+
case "Subheading/Lg":
|
|
75119
|
+
return css `
|
|
75120
|
+
${getTheme("Subheading/Lg")}
|
|
75121
|
+
`;
|
|
75122
|
+
case "Subheading/Md":
|
|
75123
|
+
return css `
|
|
75124
|
+
${getTheme("Subheading/Md")}
|
|
75125
|
+
`;
|
|
75126
|
+
case "Subheading/Sm":
|
|
75127
|
+
return css `
|
|
75128
|
+
${getTheme("Subheading/Sm")}
|
|
75129
|
+
`;
|
|
75130
|
+
case "Subheading/XS":
|
|
75131
|
+
return css `
|
|
75132
|
+
${getTheme("Subheading/XS")}
|
|
75133
|
+
`;
|
|
75134
|
+
case "Paragraph/XL":
|
|
75135
|
+
return css `
|
|
75136
|
+
${getTheme("Paragraph/XL")}
|
|
75137
|
+
`;
|
|
75138
|
+
case "Paragraph/Lg":
|
|
75139
|
+
return css `
|
|
75140
|
+
${getTheme("Paragraph/Lg")}
|
|
75141
|
+
`;
|
|
75142
|
+
case "Paragraph/Md":
|
|
75143
|
+
return css `
|
|
75144
|
+
${getTheme("Paragraph/Md")}
|
|
75145
|
+
`;
|
|
75146
|
+
case "Paragraph/Sm":
|
|
75147
|
+
return css `
|
|
75148
|
+
${getTheme("Paragraph/Sm")}
|
|
75149
|
+
`;
|
|
75150
|
+
case "Paragraph/XS":
|
|
75151
|
+
return css `
|
|
75152
|
+
${getTheme("Paragraph/XS")}
|
|
75153
|
+
`;
|
|
75154
|
+
case "_Guide/Flow-Line/Label":
|
|
75155
|
+
return css `
|
|
75156
|
+
${getTheme("_Guide/Flow-Line/Label")}
|
|
75157
|
+
`;
|
|
75158
|
+
}
|
|
75159
|
+
}}
|
|
75160
|
+
`;
|
|
75161
|
+
|
|
75162
|
+
const FISText = forwardRef(({ tag, variant, children, color, ...rest }, ref) => (jsx(TextSC, { as: tag, "$variant": variant, "$color": color ? theme[color] : "", ref: ref, ...rest, children: children })));
|
|
75163
|
+
FISText.displayName = "FISText";
|
|
75164
|
+
|
|
75165
|
+
export { FISAlertBanner, FISAvatar, FISBadge, FISBreadcrumb, FISButton, FISButtonGroup, FISCheckbox, FISCheckboxGroup, FISChipButton, FISCollapse, FISCombobox, FISDateRange, FISDivider, FISIconButton, FISInputArea, FISInputDate, FISInputField, FISInputLabel, FISInputStepper, FISInputText, FISInputTime, FISLinkButton, FISMenuItem, FISMenuSection, FISMenuSelect, FISPagination, FISProgressCircular, FISProgressLinear, FISRadio, RadioGroup as FISRadioGroup, FISSegmented, FISSelect, FISSelectItem, FISSorter, FISSplitButton, FISSwitch, FISTab, FISTable, FISTableCell, FISTableHeaderCell, FISText, FISThemeProvider, FISToast, FISTooltip, SegmentedPanelItem, TabPanelItem, useNotification, useToast };
|
|
75065
75166
|
//# sourceMappingURL=index.js.map
|