@indico-data/design-system 1.0.51 → 1.0.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.
- package/.eslintrc.js +5 -0
- package/lib/components/dropdowns/types.d.ts +0 -1
- package/lib/components/index.d.ts +1 -0
- package/lib/components/inputs/RadioButtons/RadioButtons.d.ts +1 -0
- package/lib/index.d.ts +10 -1
- package/lib/index.esm.js +16 -10
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +16 -9
- package/lib/index.js.map +1 -1
- package/lib/tokens/colors.d.ts +1 -0
- package/package.json +27 -27
- package/src/components/inputs/RadioButtons/RadioButtons.tsx +4 -2
- package/src/components/inputs/RadioGroup/RadioGroup.tsx +4 -5
- package/src/tokens/colors.ts +1 -0
- package/lib/components/Navigation/Drawer/constants.d.ts +0 -3
package/.eslintrc.js
CHANGED
|
@@ -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';
|
package/lib/index.d.ts
CHANGED
|
@@ -365,6 +365,7 @@ declare const allColors: {
|
|
|
365
365
|
readonly flamingo: "#f861b6";
|
|
366
366
|
readonly flirt: "#910870";
|
|
367
367
|
readonly forestGreen: "#1f7f1f";
|
|
368
|
+
readonly frostedOver: "#DCEAFD";
|
|
368
369
|
readonly geraldine: "#fe9486";
|
|
369
370
|
readonly grannysmith: "#92e959";
|
|
370
371
|
readonly green: "#4caf50";
|
|
@@ -748,6 +749,7 @@ type Props$c = {
|
|
|
748
749
|
labelColor: string;
|
|
749
750
|
hoverAndSelectedColor: string;
|
|
750
751
|
focusRingColor: string;
|
|
752
|
+
value: string;
|
|
751
753
|
} & RadioGroupProps$1 & PermafrostComponent;
|
|
752
754
|
/**
|
|
753
755
|
* Renders a group of radio buttons.
|
|
@@ -1069,4 +1071,11 @@ type Props = PermafrostComponent & {
|
|
|
1069
1071
|
};
|
|
1070
1072
|
declare const Drawer: (props: Props) => react_jsx_runtime.JSX.Element;
|
|
1071
1073
|
|
|
1072
|
-
|
|
1074
|
+
interface TextTruncateProps {
|
|
1075
|
+
string: string;
|
|
1076
|
+
maxChars: number;
|
|
1077
|
+
children: any;
|
|
1078
|
+
}
|
|
1079
|
+
declare function TextTruncate({ string, maxChars, children }: TextTruncateProps): react_jsx_runtime.JSX.Element;
|
|
1080
|
+
|
|
1081
|
+
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
|
@@ -178,6 +178,7 @@ const allColors = {
|
|
|
178
178
|
flamingo: '#f861b6',
|
|
179
179
|
flirt: '#910870',
|
|
180
180
|
forestGreen: '#1f7f1f',
|
|
181
|
+
frostedOver: '#DCEAFD',
|
|
181
182
|
geraldine: '#fe9486',
|
|
182
183
|
grannysmith: '#92e959',
|
|
183
184
|
green: '#4caf50',
|
|
@@ -13672,10 +13673,10 @@ function RadioGroup$1(props) {
|
|
|
13672
13673
|
isReadOnly: isReadOnly || false,
|
|
13673
13674
|
lastFocusedValue,
|
|
13674
13675
|
name: name || '',
|
|
13675
|
-
selectedValue: value,
|
|
13676
|
-
setLastFocusedValue,
|
|
13677
|
-
setSelectedValue: onChange,
|
|
13678
13676
|
defaultValue,
|
|
13677
|
+
value,
|
|
13678
|
+
setLastFocusedValue,
|
|
13679
|
+
onChange: onChange ? (value) => onChange(value) : undefined,
|
|
13679
13680
|
};
|
|
13680
13681
|
const state = $a54cdc5c1942b639$export$bca9d026f8e704eb(radioGroupState);
|
|
13681
13682
|
const { radioGroupProps, labelProps } = $430f30ed08ec25fa$export$62b9571f283ff5c2(props, state);
|
|
@@ -13697,8 +13698,7 @@ function Radio$1(props) {
|
|
|
13697
13698
|
isSelected = isVisuallySelected(state.selectedValue);
|
|
13698
13699
|
}
|
|
13699
13700
|
else {
|
|
13700
|
-
|
|
13701
|
-
isSelected = state.selectedValue === props.value || (state === null || state === void 0 ? void 0 : state.defaultValue) === props.value;
|
|
13701
|
+
isSelected = state.selectedValue === props.value;
|
|
13702
13702
|
}
|
|
13703
13703
|
return (jsxs("label", { className: classNames(className, {
|
|
13704
13704
|
disabled: isDisabled || state.isDisabled,
|
|
@@ -13786,8 +13786,8 @@ const StyledRadioGroup = styled(RadioGroup$1) `
|
|
|
13786
13786
|
*/
|
|
13787
13787
|
function RadioGroup(_a) {
|
|
13788
13788
|
var { children } = _a, props = __rest(_a, ["children"]);
|
|
13789
|
-
const { color, hideFocusRing, labelColor, hoverAndSelectedColor, focusRingColor } = props;
|
|
13790
|
-
return (jsx(StyledRadioGroup, Object.assign({}, props, { hideFocusRing:
|
|
13789
|
+
const { value, color, hideFocusRing, labelColor, hoverAndSelectedColor, focusRingColor } = props;
|
|
13790
|
+
return (jsx(StyledRadioGroup, Object.assign({}, props, { hideFocusRing: hideFocusRing, "data-cy": props['data-cy'], color: color, labelColor: labelColor, hoverAndSelectedColor: hoverAndSelectedColor, focusRingColor: focusRingColor, value: value, children: children })));
|
|
13791
13791
|
}
|
|
13792
13792
|
/**
|
|
13793
13793
|
* A single radio button and its label.
|
|
@@ -17327,13 +17327,13 @@ const StyledWizardWithSidebar = styled.div `
|
|
|
17327
17327
|
.wizard-sidebar {
|
|
17328
17328
|
width: 245px;
|
|
17329
17329
|
padding: 30px;
|
|
17330
|
-
border-right: 1px solid
|
|
17330
|
+
border-right: 1px solid ${allColors.silverChalice};
|
|
17331
17331
|
|
|
17332
17332
|
.sidebar-step {
|
|
17333
17333
|
margin-bottom: ${spacings.sm};
|
|
17334
17334
|
display: flex;
|
|
17335
17335
|
align-items: center;
|
|
17336
|
-
color:
|
|
17336
|
+
color: ${allColors.silverChalice};
|
|
17337
17337
|
&.current-step,
|
|
17338
17338
|
&.prior-step {
|
|
17339
17339
|
color: ${allColors.black};
|
|
@@ -17640,5 +17640,11 @@ const Drawer = (props) => {
|
|
|
17640
17640
|
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] })] }) })));
|
|
17641
17641
|
};
|
|
17642
17642
|
|
|
17643
|
-
|
|
17643
|
+
const StyledTextTruncate = styled.span ``;
|
|
17644
|
+
|
|
17645
|
+
function TextTruncate({ string, maxChars, children }) {
|
|
17646
|
+
return string.length > maxChars ? (jsxs(StyledTextTruncate, { title: string, children: [`${string.substring(0, maxChars)}...`, children] })) : (jsxs(StyledTextTruncate, { children: [string, " ", children] }));
|
|
17647
|
+
}
|
|
17648
|
+
|
|
17649
|
+
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 };
|
|
17644
17650
|
//# sourceMappingURL=index.esm.js.map
|