@obosbbl/grunnmuren-react 1.4.1 → 1.4.2

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.
@@ -1,6 +1,8 @@
1
1
  import React from 'react';
2
+ interface AccordionProps extends React.ComponentPropsWithoutRef<'div'> {
3
+ }
2
4
  export declare const Accordion: {
3
- (): void;
5
+ (props: AccordionProps): JSX.Element;
4
6
  Item: (props: AccordionItemProps) => JSX.Element;
5
7
  Header: <T extends React.ElementType<any> = "h3">(props: AccordionHeaderProps<T> & Omit<React.PropsWithoutRef<React.ComponentProps<T>>, "as">) => JSX.Element;
6
8
  Content: (props: AccordionContentProps) => JSX.Element;
@@ -234,7 +234,7 @@ function useBlockBackgroundColor(blockBgColor) {
234
234
  return "bg-blue-lightest";
235
235
  }
236
236
  }
237
- const useScreenMaxWidthMd = () => useMedia("(max-width: 767.9px)");
237
+ const useScreenMaxWidthMd = (defaultState) => useMedia("(max-width: 767.9px)", defaultState);
238
238
  function useFormControlValidity(ref, enabled = true) {
239
239
  const [validity, setValidity] = useState("indeterminate");
240
240
  const [validationMessage, setValidationMessage] = useState();
@@ -1024,7 +1024,7 @@ const NavbarExpandedMobileContent = (props) => {
1024
1024
  const {
1025
1025
  isExpanded
1026
1026
  } = useContext(NavbarContext);
1027
- const isMobileScreen = useScreenMaxWidthMd();
1027
+ const isMobileScreen = useScreenMaxWidthMd(false);
1028
1028
  if (!isExpanded || !isMobileScreen)
1029
1029
  return null;
1030
1030
  return /* @__PURE__ */ jsx(Fragment, {
@@ -1 +1 @@
1
- export declare const useScreenMaxWidthMd: () => boolean;
1
+ export declare const useScreenMaxWidthMd: (defaultState: boolean) => boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@obosbbl/grunnmuren-react",
3
- "version": "1.4.1",
3
+ "version": "1.4.2",
4
4
  "description": "OBOS Grunnmuren design system React components",
5
5
  "license": "MIT",
6
6
  "repository": {