@indico-data/design-system 1.0.49 → 1.0.50

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.
@@ -13,3 +13,4 @@ export { LoadingAwareContainer } from './LoadingAwareContainer';
13
13
  export { Wizard, WizardCard, WizardSection, StyledWizard } from './Wizard';
14
14
  export { WizardWithSidebar } from './WizardWithSidebar';
15
15
  export { Drawer } from './Navigation/Drawer';
16
+ export { TextTruncate } from './text-truncate';
@@ -0,0 +1,7 @@
1
+ interface TextTruncateProps {
2
+ string: string;
3
+ maxChars: number;
4
+ children: any;
5
+ }
6
+ export declare function TextTruncate({ string, maxChars, children }: TextTruncateProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const StyledTextTruncate: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>>;
@@ -0,0 +1 @@
1
+ export { TextTruncate } from './TextTruncate';
package/lib/index.d.ts CHANGED
@@ -1068,4 +1068,11 @@ type Props = PermafrostComponent & {
1068
1068
  };
1069
1069
  declare const Drawer: (props: Props) => react_jsx_runtime.JSX.Element;
1070
1070
 
1071
- export { animation as ANIMATION, Radio as AbstractRadio, RadioGroup as AbstractRadioGroup, Accordion, breakpoints as BREAKPOINT, BarSpinner, BorderSelect, Button, allColors as COLORS, CirclePulse, CircleSpinner, ConfirmModal, Drawer, EditableInput, GlobalStyles, Icon, IconButton, ListTable, LoadingAwareContainer, LoadingList, margin as MARGINS, MATH, mediaQueries as MEDIA_QUERIES, ModalBase, MultiCombobox, NumberInput, padding as PADDINGS, Pagination, PercentageRing, Radio$1 as Radio, RadioGroup$1 as RadioGroup, RandomLoadingMessage, spacings as SPACING, SearchInput, Section, SectionBlock, SectionBody, SectionHeader, SectionTable, Select, Shrug, SingleCombobox, StyledWizard, typography as TYPOGRAPHY, TextInput, Wizard, WizardCard, WizardSection, WizardWithSidebar, faIcons, indicons };
1071
+ interface TextTruncateProps {
1072
+ string: string;
1073
+ maxChars: number;
1074
+ children: any;
1075
+ }
1076
+ declare function TextTruncate({ string, maxChars, children }: TextTruncateProps): react_jsx_runtime.JSX.Element;
1077
+
1078
+ export { animation as ANIMATION, Radio as AbstractRadio, RadioGroup as AbstractRadioGroup, Accordion, breakpoints as BREAKPOINT, BarSpinner, BorderSelect, Button, allColors as COLORS, CirclePulse, CircleSpinner, ConfirmModal, Drawer, EditableInput, GlobalStyles, Icon, IconButton, ListTable, LoadingAwareContainer, LoadingList, margin as MARGINS, MATH, mediaQueries as MEDIA_QUERIES, ModalBase, MultiCombobox, NumberInput, padding as PADDINGS, Pagination, PercentageRing, Radio$1 as Radio, RadioGroup$1 as RadioGroup, RandomLoadingMessage, spacings as SPACING, SearchInput, Section, SectionBlock, SectionBody, SectionHeader, SectionTable, Select, Shrug, SingleCombobox, StyledWizard, typography as TYPOGRAPHY, TextInput, TextTruncate, Wizard, WizardCard, WizardSection, WizardWithSidebar, faIcons, indicons };
package/lib/index.esm.js CHANGED
@@ -17326,13 +17326,13 @@ const StyledWizardWithSidebar = styled.div `
17326
17326
  .wizard-sidebar {
17327
17327
  width: 245px;
17328
17328
  padding: 30px;
17329
- border-right: 1px solid #aaaaaa;
17329
+ border-right: 1px solid ${allColors.silverChalice};
17330
17330
 
17331
17331
  .sidebar-step {
17332
17332
  margin-bottom: ${spacings.sm};
17333
17333
  display: flex;
17334
17334
  align-items: center;
17335
- color: #aaaaaa;
17335
+ color: ${allColors.silverChalice};
17336
17336
  &.current-step,
17337
17337
  &.prior-step {
17338
17338
  color: ${allColors.black};
@@ -17639,5 +17639,11 @@ const Drawer = (props) => {
17639
17639
  return (jsx(StyledDrawer, Object.assign({ id: id, "data-cy": props['data-cy'], "data-testid": props['data-testid'], style: style }, restOfProps, { className: drawerClasses, onMouseOver: handleMouseOver, onMouseOut: handleMouseOut, "aria-expanded": isOpen, "$expandedWidth": $expandedWidth, "$collapsedWidth": $collapsedWidth, children: jsxs("div", { className: "drawer__wrapper", children: [jsx("div", { className: "drawer__header", children: headerComponent ? (headerComponent) : (jsxs("span", { children: [logoIcon ? jsx(Icon, { name: logoIcon, size: [24], "data-testid": "logo-icon" }) : null, jsx("p", { "data-testid": "logo-text", "aria-hidden": !isOpen, children: logoText })] })) }), jsxs("div", { className: "drawer__content", children: [(navigationItems === null || navigationItems === void 0 ? void 0 : navigationItems.length) ? (jsx("div", { className: "drawer__navigation", "data-testid": "drawer-navigation", children: jsx(DrawerLinkList, { isOpen: isOpen, listItems: navigationItems }) })) : null, (footerItems === null || footerItems === void 0 ? void 0 : footerItems.length) ? (jsx("div", { className: "drawer__footer", "data-testid": "drawer-footer", children: jsx(DrawerLinkList, { isOpen: isOpen, listItems: footerItems }) })) : null] })] }) })));
17640
17640
  };
17641
17641
 
17642
- export { animation as ANIMATION, Radio$1 as AbstractRadio, RadioGroup$1 as AbstractRadioGroup, Accordion, breakpoints as BREAKPOINT, BarSpinner, BorderSelect, Button, allColors as COLORS, CirclePulse, CircleSpinner, ConfirmModal, Drawer, EditableInput, GlobalStyles, Icon, IconButton, ListTable, LoadingAwareContainer, LoadingList, margin as MARGINS, MATH, mediaQueries as MEDIA_QUERIES, ModalBase, MultiCombobox, NumberInput, padding as PADDINGS, Pagination, PercentageRing, Radio, RadioGroup, RandomLoadingMessage, spacings as SPACING, SearchInput, Section, SectionBlock, SectionBody, SectionHeader, SectionTable, Select, Shrug, SingleCombobox, StyledWizard, typography as TYPOGRAPHY, TextInput, Wizard, WizardCard, WizardSection, WizardWithSidebar, faIcons, indicons };
17642
+ const StyledTextTruncate = styled.span ``;
17643
+
17644
+ function TextTruncate({ string, maxChars, children }) {
17645
+ return string.length > maxChars ? (jsxs(StyledTextTruncate, { title: string, children: [`${string.substring(0, maxChars)}...`, children] })) : (jsxs(StyledTextTruncate, { children: [string, " ", children] }));
17646
+ }
17647
+
17648
+ export { animation as ANIMATION, Radio$1 as AbstractRadio, RadioGroup$1 as AbstractRadioGroup, Accordion, breakpoints as BREAKPOINT, BarSpinner, BorderSelect, Button, allColors as COLORS, CirclePulse, CircleSpinner, ConfirmModal, Drawer, EditableInput, GlobalStyles, Icon, IconButton, ListTable, LoadingAwareContainer, LoadingList, margin as MARGINS, MATH, mediaQueries as MEDIA_QUERIES, ModalBase, MultiCombobox, NumberInput, padding as PADDINGS, Pagination, PercentageRing, Radio, RadioGroup, RandomLoadingMessage, spacings as SPACING, SearchInput, Section, SectionBlock, SectionBody, SectionHeader, SectionTable, Select, Shrug, SingleCombobox, StyledWizard, typography as TYPOGRAPHY, TextInput, TextTruncate, Wizard, WizardCard, WizardSection, WizardWithSidebar, faIcons, indicons };
17643
17649
  //# sourceMappingURL=index.esm.js.map