@sproutsocial/seeds-react-menu 0.2.0 → 0.2.1

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/index.d.mts CHANGED
@@ -144,7 +144,7 @@ interface TypeMenuGroupProps extends TypeMenuGroupStyledProps, Omit<React.Compon
144
144
  declare const MenuGroup: ({ titleAs, children, title, color, ...rest }: TypeMenuGroupProps) => react_jsx_runtime.JSX.Element;
145
145
 
146
146
  declare const StyledMenuGroup: styled_components.StyledComponent<"li", styled_components.DefaultTheme, TypeMenuGroupProps, never>;
147
- declare const StyledTitle: styled_components.StyledComponent<"span", styled_components.DefaultTheme, _sproutsocial_seeds_react_text.TypeTextProps, never>;
147
+ declare const StyledTitle: styled_components.StyledComponent<React$1.FC<_sproutsocial_seeds_react_text.TypeTextProps>, styled_components.DefaultTheme, {}, never>;
148
148
  declare const StyledMenuGroupUl: styled_components.StyledComponent<"ul", styled_components.DefaultTheme, {}, never>;
149
149
 
150
150
  interface TypeDownshiftMultiSelectProps extends Partial<UseSelectProps<TypeDefaultItemProps>>, Partial<Omit<UseMultipleSelectionProps<TypeDefaultItemProps>, "stateReducer" | "onStateChange" | "getA11yStatusMessage">> {
package/dist/index.d.ts CHANGED
@@ -144,7 +144,7 @@ interface TypeMenuGroupProps extends TypeMenuGroupStyledProps, Omit<React.Compon
144
144
  declare const MenuGroup: ({ titleAs, children, title, color, ...rest }: TypeMenuGroupProps) => react_jsx_runtime.JSX.Element;
145
145
 
146
146
  declare const StyledMenuGroup: styled_components.StyledComponent<"li", styled_components.DefaultTheme, TypeMenuGroupProps, never>;
147
- declare const StyledTitle: styled_components.StyledComponent<"span", styled_components.DefaultTheme, _sproutsocial_seeds_react_text.TypeTextProps, never>;
147
+ declare const StyledTitle: styled_components.StyledComponent<React$1.FC<_sproutsocial_seeds_react_text.TypeTextProps>, styled_components.DefaultTheme, {}, never>;
148
148
  declare const StyledMenuGroupUl: styled_components.StyledComponent<"ul", styled_components.DefaultTheme, {}, never>;
149
149
 
150
150
  interface TypeDownshiftMultiSelectProps extends Partial<UseSelectProps<TypeDefaultItemProps>>, Partial<Omit<UseMultipleSelectionProps<TypeDefaultItemProps>, "stateReducer" | "onStateChange" | "getA11yStatusMessage">> {
package/dist/index.js CHANGED
@@ -1729,6 +1729,8 @@ var highlightedStyles = import_styled_components2.css`
1729
1729
  cursor: pointer;
1730
1730
  border: 1px solid ${({ theme: theme2 }) => theme2.colors.listItem.border.base};
1731
1731
  background-color: ${({ theme: theme2 }) => theme2.colors.listItem.background.hover};
1732
+ color: ${({ theme: theme2 }) => theme2.colors.text.body};
1733
+ text-decoration: none;
1732
1734
  `;
1733
1735
  var MenuItemContainer = import_styled_components2.default.li`
1734
1736
  box-sizing: border-box;
@@ -1890,6 +1892,7 @@ var useOptionProps = ({
1890
1892
  const { selectedItem, selectedItems, isListbox } = (0, import_react2.useContext)(MenuContext);
1891
1893
  const selected = (0, import_react2.useMemo)(
1892
1894
  () => selectedItem?.id === id || !!selectedItems?.find((item) => item?.id === id),
1895
+ // eslint-disable-next-line react-hooks/exhaustive-deps
1893
1896
  [selectedItem, selectedItems]
1894
1897
  );
1895
1898
  const label = inputLabelId || `menu-item-child-${id}`;
@@ -1919,9 +1922,12 @@ var MenuItem = ({
1919
1922
  children,
1920
1923
  onClick,
1921
1924
  onKeyDown,
1925
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
1922
1926
  disabled: disabled2 = false,
1927
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
1923
1928
  ref,
1924
1929
  href,
1930
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
1925
1931
  color: color2,
1926
1932
  ...props
1927
1933
  }) => {
@@ -2182,20 +2188,33 @@ var Text = ({ fontSize: fontSize2, children, qa, color: color2, ...rest }) => {
2182
2188
  }
2183
2189
  );
2184
2190
  };
2185
- Headline.displayName = "Text.Headline";
2186
- SubHeadline.displayName = "Text.SubHeadline";
2187
- SmallSubHeadline.displayName = "Text.SmallSubHeadline";
2188
- Byline.displayName = "Text.Byline";
2189
- SmallByline.displayName = "Text.SmallByline";
2190
- BodyCopy.displayName = "Text.BodyCopy";
2191
- SmallBodyCopy.displayName = "Text.SmallBodyCopy";
2192
- Text.Headline = Headline;
2193
- Text.SubHeadline = SubHeadline;
2194
- Text.SmallSubHeadline = SmallSubHeadline;
2195
- Text.Byline = Byline;
2196
- Text.SmallByline = SmallByline;
2197
- Text.BodyCopy = BodyCopy;
2198
- Text.SmallBodyCopy = SmallBodyCopy;
2191
+ var withTextLogic = (Component) => {
2192
+ return ({ children, ...props }) => {
2193
+ const qaText = typeof children === "string" ? children : void 0;
2194
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Component, { "data-qa-text": qaText, ...props, children });
2195
+ };
2196
+ };
2197
+ var HeadlineWithLogic = withTextLogic(Headline);
2198
+ HeadlineWithLogic.displayName = "Text.Headline";
2199
+ Text.Headline = HeadlineWithLogic;
2200
+ var SubHeadlineWithLogic = withTextLogic(SubHeadline);
2201
+ SubHeadlineWithLogic.displayName = "Text.SubHeadline";
2202
+ Text.SubHeadline = SubHeadlineWithLogic;
2203
+ var SmallSubHeadlineWithLogic = withTextLogic(SmallSubHeadline);
2204
+ SmallSubHeadlineWithLogic.displayName = "Text.SmallSubHeadline";
2205
+ Text.SmallSubHeadline = SmallSubHeadlineWithLogic;
2206
+ var BylineWithLogic = withTextLogic(Byline);
2207
+ BylineWithLogic.displayName = "Text.Byline";
2208
+ Text.Byline = BylineWithLogic;
2209
+ var SmallBylineWithLogic = withTextLogic(SmallByline);
2210
+ SmallBylineWithLogic.displayName = "Text.SmallByline";
2211
+ Text.SmallByline = SmallBylineWithLogic;
2212
+ var BodyCopyWithLogic = withTextLogic(BodyCopy);
2213
+ BodyCopyWithLogic.displayName = "Text.BodyCopy";
2214
+ Text.BodyCopy = BodyCopyWithLogic;
2215
+ var SmallBodyCopyWithLogic = withTextLogic(SmallBodyCopy);
2216
+ SmallBodyCopyWithLogic.displayName = "Text.SmallBodyCopy";
2217
+ Text.SmallBodyCopy = SmallBodyCopyWithLogic;
2199
2218
  var Text_default = Text;
2200
2219
  var src_default = Text_default;
2201
2220