@obosbbl/grunnmuren-react 1.5.1 → 1.6.0

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.
@@ -10,4 +10,4 @@ export interface CheckboxProps extends React.ComponentPropsWithRef<'input'> {
10
10
  /** Disables the built in HTML5 validation. If using custom validation for an entire form, consider setting `noValidate` on the form element instead. @default false */
11
11
  disableValidation?: boolean;
12
12
  }
13
- export declare const Checkbox: import("react").ForwardRefExoticComponent<Pick<CheckboxProps, "form" | "error" | "slot" | "style" | "title" | "pattern" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "value" | "list" | "step" | "autoComplete" | "accept" | "alt" | "autoFocus" | "capture" | "checked" | "disabled" | "multiple" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "maxLength" | "minLength" | "src" | "crossOrigin" | "height" | "width" | "name" | "type" | "enterKeyHint" | "max" | "min" | "readOnly" | "required" | "size" | "disableValidation"> & import("react").RefAttributes<HTMLInputElement>>;
13
+ export declare const Checkbox: import("react").ForwardRefExoticComponent<Pick<CheckboxProps, "form" | "error" | "slot" | "style" | "title" | "pattern" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "value" | "list" | "step" | "autoComplete" | "accept" | "alt" | "autoFocus" | "capture" | "checked" | "disabled" | "multiple" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "maxLength" | "minLength" | "src" | "crossOrigin" | "height" | "width" | "name" | "type" | "enterKeyHint" | "max" | "min" | "readOnly" | "required" | "size" | "disableValidation"> & import("react").RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ declare const metadata: {
3
+ title: string;
4
+ };
5
+ export default metadata;
6
+ export declare const Pagelayout: () => JSX.Element;
@@ -243,7 +243,7 @@ const AccordionItem = (props) => {
243
243
  onChange
244
244
  }, collapseContext),
245
245
  children: /* @__PURE__ */ jsx("div", __spreadValues({
246
- className: cx(className, "border-b-gray-concrete rounded-sm border-b-2 border-l-4 border-solid", collapseContext.isExpanded ? "border-l-green-dark" : "border-l-green")
246
+ className: cx(className, "rounded-sm border-b-2 border-l-4 border-solid", collapseContext.isExpanded ? "border-l-green-dark" : "border-l-green")
247
247
  }, rest))
248
248
  });
249
249
  };
@@ -267,11 +267,11 @@ const AccordionHeader = (props) => {
267
267
  });
268
268
  return /* @__PURE__ */ jsx(Heading, {
269
269
  children: /* @__PURE__ */ jsxs("button", __spreadProps(__spreadValues(__spreadValues({
270
- className: cx(className, "focus-visible:outline-blue-dark flex min-h-[4rem] w-full items-center justify-between px-5 py-4 text-left text-lg font-semibold focus:outline-none focus-visible:outline-4 focus-visible:outline-offset-0", isExpanded ? "bg-green-dark text-white" : void 0)
270
+ className: cx(className, "focus-visible:outline-blue-dark aria-expanded:bg-green-dark group flex min-h-[4rem] w-full items-center justify-between px-5 py-4 text-left text-lg font-semibold focus:outline-none focus-visible:outline-4 focus-visible:outline-offset-0 aria-expanded:text-white")
271
271
  }, rest), toggleProps), {
272
272
  id: getToggleId(toggleProps["aria-controls"]),
273
273
  children: [children, /* @__PURE__ */ jsx(ChevronDown, {
274
- className: cx("shrink-0 text-sm", DURATION_TW, isExpanded ? "rotate-180" : void 0)
274
+ className: `shrink-0 text-sm ${DURATION_TW} group-aria-expanded:rotate-180`
275
275
  })]
276
276
  }))
277
277
  });
@@ -364,7 +364,7 @@ const Banner = (props) => {
364
364
  className: cx(className, bgColor, "py-8 px-4 md:py-14")
365
365
  }, rest), {
366
366
  children: /* @__PURE__ */ jsxs("div", {
367
- className: "<md:flex-wrap container flex gap-4 md:flex-row md:gap-12",
367
+ className: "container flex gap-4 max-md:flex-wrap md:gap-12",
368
368
  children: [image, /* @__PURE__ */ jsxs("div", {
369
369
  className: "w-prose",
370
370
  children: [heading && /* @__PURE__ */ jsx("h2", {
@@ -504,7 +504,7 @@ const CampaignImage = (props) => {
504
504
  "children"
505
505
  ]);
506
506
  const bodyIsRightAligned = useContext(CampaignContext);
507
- const className = cx(classNameProp, "<md:rounded-b-3xl w-full", bodyIsRightAligned ? "md:rounded-r-3xl" : "md:rounded-l-3xl md:order-1");
507
+ const className = cx(classNameProp, "max-md:rounded-b-3xl w-full", bodyIsRightAligned ? "md:rounded-r-3xl" : "md:rounded-l-3xl md:order-1");
508
508
  if (isValidElement(children)) {
509
509
  const child = Children.only(children);
510
510
  return cloneElement(child, __spreadValues({
@@ -529,7 +529,7 @@ const Card = (props) => {
529
529
  ]);
530
530
  return /* @__PURE__ */ jsx(Component, __spreadValues({
531
531
  className: cx(className, "relative overflow-hidden rounded-3xl", {
532
- "border-gray-concrete border-2 border-solid bg-white": bgColor === "white",
532
+ "border-2 border-solid bg-white": bgColor === "white",
533
533
  "bg-gray-light": bgColor === "gray"
534
534
  })
535
535
  }, rest));
@@ -840,7 +840,7 @@ const Hero = (props) => {
840
840
  children: /* @__PURE__ */ jsx(HeroContext.Provider, {
841
841
  value: context,
842
842
  children: /* @__PURE__ */ jsxs("div", __spreadProps(__spreadValues({
843
- className: cx(className, "<md:px-0 container md:grid", {
843
+ className: cx(className, "container max-md:px-0 md:grid", {
844
844
  "md:grid-cols-[50%,50%]": contentPosition === "vertical-split"
845
845
  }),
846
846
  style: usesGridAreaPlacement(contentPosition) ? {
@@ -894,8 +894,8 @@ const HeroContent = (props) => {
894
894
  ]);
895
895
  const usesGridArea = usesGridAreaPlacement(contentPosition);
896
896
  return /* @__PURE__ */ jsxs("div", __spreadProps(__spreadValues({
897
- className: cx(className, "<md:mx-4 relative grid grid-flow-row grid-cols-[minmax(auto,_37rem)] content-center gap-6 rounded-3xl py-10 px-6 text-center md:p-12", {
898
- "<md:-mt-18": hasImage,
897
+ className: cx(className, "relative grid grid-flow-row grid-cols-[minmax(auto,_37rem)] content-center gap-6 rounded-3xl py-10 px-6 text-center max-md:mx-4 md:p-12", {
898
+ "max-md:-mt-18": hasImage,
899
899
  "text-white": bgColor !== "white",
900
900
  "bg-green-dark": bgColor === "green",
901
901
  "bg-blue-dark": bgColor === "blue",
@@ -1274,7 +1274,7 @@ const Snackbar = (props) => {
1274
1274
  }),
1275
1275
  children: heading
1276
1276
  }), /* @__PURE__ */ jsxs("div", {
1277
- className: "snackbar-actions <md:mt-3 flex justify-end gap-4 md:ml-4",
1277
+ className: "snackbar-actions flex justify-end gap-4 max-md:mt-3 md:ml-4",
1278
1278
  children: [/* @__PURE__ */ jsx(SnackbarButton, {
1279
1279
  "aria-expanded": isExpanded,
1280
1280
  onClick: () => setIsExpanded(!isExpanded),
@@ -1324,7 +1324,7 @@ const StepListItem = (props) => {
1324
1324
  const StepListBullet = (props) => {
1325
1325
  return /* @__PURE__ */ jsx("span", __spreadValues({
1326
1326
  "aria-hidden": true,
1327
- className: "text-green border-gray-light after:bg-gray-light grid h-10 w-10 flex-none place-content-center justify-items-center rounded-full border-2 text-sm font-bold after:absolute after:left-5 after:top-10 after:bottom-0 after:w-0.5 group-last:after:hidden md:h-20 md:w-20 md:text-xl md:after:left-10 md:after:top-20"
1327
+ className: "text-green after:bg-gray-light grid h-10 w-10 flex-none place-content-center justify-items-center rounded-full border-2 text-sm font-bold after:absolute after:left-5 after:top-10 after:bottom-0 after:w-0.5 group-last:after:hidden md:h-20 md:w-20 md:text-xl md:after:left-10 md:after:top-20"
1328
1328
  }, props));
1329
1329
  };
1330
1330
  StepList.Item = StepListItem;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@obosbbl/grunnmuren-react",
3
- "version": "1.5.1",
3
+ "version": "1.6.0",
4
4
  "description": "OBOS Grunnmuren design system React components",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -18,22 +18,22 @@
18
18
  "types": "./dist/index.d.ts",
19
19
  "devDependencies": {
20
20
  "@babel/core": "7.19.6",
21
- "@obosbbl/grunnmuren-tailwind": "0.7.3",
22
- "@storybook/addon-controls": "6.5.12",
23
- "@storybook/addon-docs": "6.5.12",
21
+ "@obosbbl/grunnmuren-tailwind": "0.8.0",
22
+ "@storybook/addon-controls": "6.5.13",
23
+ "@storybook/addon-docs": "6.5.13",
24
24
  "@storybook/addon-postcss": "2.0.0",
25
- "@storybook/builder-webpack5": "6.5.12",
26
- "@storybook/manager-webpack5": "6.5.12",
27
- "@storybook/react": "6.5.12",
28
- "@types/react": "18.0.21",
29
- "@types/react-dom": "18.0.6",
25
+ "@storybook/builder-webpack5": "6.5.13",
26
+ "@storybook/manager-webpack5": "6.5.13",
27
+ "@storybook/react": "6.5.13",
28
+ "@types/react": "18.0.24",
29
+ "@types/react-dom": "18.0.8",
30
30
  "@vitejs/plugin-react": "1.3.2",
31
31
  "postcss": "8.4.18",
32
32
  "react": "18.2.0",
33
33
  "react-dom": "18.2.0",
34
34
  "require-from-string": "2.0.2",
35
35
  "rimraf": "3.0.2",
36
- "tailwindcss": "3.1.8",
36
+ "tailwindcss": "3.2.1",
37
37
  "vite": "2.9.15",
38
38
  "webpack": "5.74.0"
39
39
  },
@@ -41,11 +41,11 @@
41
41
  "@obosbbl/grunnmuren-icons": "^0.5.0",
42
42
  "@seznam/compose-react-refs": "1.0.6",
43
43
  "clsx": "1.2.1",
44
- "react-collapsed": "3.4.0",
44
+ "react-collapsed": "3.5.0",
45
45
  "react-use": "17.4.0"
46
46
  },
47
47
  "peerDependencies": {
48
- "@obosbbl/grunnmuren-tailwind": "^0.7.3",
48
+ "@obosbbl/grunnmuren-tailwind": "^0.8",
49
49
  "react": "^18"
50
50
  },
51
51
  "peerDependenciesMeta": {