@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/lib/index.js CHANGED
@@ -187,6 +187,7 @@ const allColors = {
187
187
  flamingo: '#f861b6',
188
188
  flirt: '#910870',
189
189
  forestGreen: '#1f7f1f',
190
+ frostedOver: '#DCEAFD',
190
191
  geraldine: '#fe9486',
191
192
  grannysmith: '#92e959',
192
193
  green: '#4caf50',
@@ -13681,10 +13682,10 @@ function RadioGroup$1(props) {
13681
13682
  isReadOnly: isReadOnly || false,
13682
13683
  lastFocusedValue,
13683
13684
  name: name || '',
13684
- selectedValue: value,
13685
- setLastFocusedValue,
13686
- setSelectedValue: onChange,
13687
13685
  defaultValue,
13686
+ value,
13687
+ setLastFocusedValue,
13688
+ onChange: onChange ? (value) => onChange(value) : undefined,
13688
13689
  };
13689
13690
  const state = $a54cdc5c1942b639$export$bca9d026f8e704eb(radioGroupState);
13690
13691
  const { radioGroupProps, labelProps } = $430f30ed08ec25fa$export$62b9571f283ff5c2(props, state);
@@ -13706,8 +13707,7 @@ function Radio$1(props) {
13706
13707
  isSelected = isVisuallySelected(state.selectedValue);
13707
13708
  }
13708
13709
  else {
13709
- // @ts-ignore
13710
- isSelected = state.selectedValue === props.value || (state === null || state === void 0 ? void 0 : state.defaultValue) === props.value;
13710
+ isSelected = state.selectedValue === props.value;
13711
13711
  }
13712
13712
  return (jsxRuntime.jsxs("label", { className: classNames(className, {
13713
13713
  disabled: isDisabled || state.isDisabled,
@@ -13795,8 +13795,8 @@ const StyledRadioGroup = styled__default.default(RadioGroup$1) `
13795
13795
  */
13796
13796
  function RadioGroup(_a) {
13797
13797
  var { children } = _a, props = __rest(_a, ["children"]);
13798
- const { color, hideFocusRing, labelColor, hoverAndSelectedColor, focusRingColor } = props;
13799
- return (jsxRuntime.jsx(StyledRadioGroup, Object.assign({}, props, { hideFocusRing: true, "data-cy": props['data-cy'], color: color, labelColor: labelColor, hoverAndSelectedColor: hoverAndSelectedColor, focusRingColor: focusRingColor, children: children })));
13798
+ const { value, color, hideFocusRing, labelColor, hoverAndSelectedColor, focusRingColor } = props;
13799
+ return (jsxRuntime.jsx(StyledRadioGroup, Object.assign({}, props, { hideFocusRing: hideFocusRing, "data-cy": props['data-cy'], color: color, labelColor: labelColor, hoverAndSelectedColor: hoverAndSelectedColor, focusRingColor: focusRingColor, value: value, children: children })));
13800
13800
  }
13801
13801
  /**
13802
13802
  * A single radio button and its label.
@@ -17336,13 +17336,13 @@ const StyledWizardWithSidebar = styled__default.default.div `
17336
17336
  .wizard-sidebar {
17337
17337
  width: 245px;
17338
17338
  padding: 30px;
17339
- border-right: 1px solid #aaaaaa;
17339
+ border-right: 1px solid ${allColors.silverChalice};
17340
17340
 
17341
17341
  .sidebar-step {
17342
17342
  margin-bottom: ${spacings.sm};
17343
17343
  display: flex;
17344
17344
  align-items: center;
17345
- color: #aaaaaa;
17345
+ color: ${allColors.silverChalice};
17346
17346
  &.current-step,
17347
17347
  &.prior-step {
17348
17348
  color: ${allColors.black};
@@ -17649,6 +17649,12 @@ const Drawer = (props) => {
17649
17649
  return (jsxRuntime.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: jsxRuntime.jsxs("div", { className: "drawer__wrapper", children: [jsxRuntime.jsx("div", { className: "drawer__header", children: headerComponent ? (headerComponent) : (jsxRuntime.jsxs("span", { children: [logoIcon ? jsxRuntime.jsx(Icon, { name: logoIcon, size: [24], "data-testid": "logo-icon" }) : null, jsxRuntime.jsx("p", { "data-testid": "logo-text", "aria-hidden": !isOpen, children: logoText })] })) }), jsxRuntime.jsxs("div", { className: "drawer__content", children: [(navigationItems === null || navigationItems === void 0 ? void 0 : navigationItems.length) ? (jsxRuntime.jsx("div", { className: "drawer__navigation", "data-testid": "drawer-navigation", children: jsxRuntime.jsx(DrawerLinkList, { isOpen: isOpen, listItems: navigationItems }) })) : null, (footerItems === null || footerItems === void 0 ? void 0 : footerItems.length) ? (jsxRuntime.jsx("div", { className: "drawer__footer", "data-testid": "drawer-footer", children: jsxRuntime.jsx(DrawerLinkList, { isOpen: isOpen, listItems: footerItems }) })) : null] })] }) })));
17650
17650
  };
17651
17651
 
17652
+ const StyledTextTruncate = styled__default.default.span ``;
17653
+
17654
+ function TextTruncate({ string, maxChars, children }) {
17655
+ return string.length > maxChars ? (jsxRuntime.jsxs(StyledTextTruncate, { title: string, children: [`${string.substring(0, maxChars)}...`, children] })) : (jsxRuntime.jsxs(StyledTextTruncate, { children: [string, " ", children] }));
17656
+ }
17657
+
17652
17658
  exports.ANIMATION = animation;
17653
17659
  exports.AbstractRadio = Radio$1;
17654
17660
  exports.AbstractRadioGroup = RadioGroup$1;
@@ -17694,6 +17700,7 @@ exports.SingleCombobox = SingleCombobox;
17694
17700
  exports.StyledWizard = StyledWizard;
17695
17701
  exports.TYPOGRAPHY = typography;
17696
17702
  exports.TextInput = TextInput;
17703
+ exports.TextTruncate = TextTruncate;
17697
17704
  exports.Wizard = Wizard;
17698
17705
  exports.WizardCard = WizardCard;
17699
17706
  exports.WizardSection = WizardSection;