@obosbbl/grunnmuren-react 1.10.0 → 1.11.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/Hero/Hero.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export declare const HeroContext: import("react").Context<{
|
|
|
6
6
|
}>;
|
|
7
7
|
export type HeroColor = 'green' | 'blue' | 'white';
|
|
8
8
|
export type HeroContentPosition = 'below-center' | 'below-left' | 'top-left' | 'bottom-left' | 'top-right' | 'bottom-right' | 'center' | 'vertical-split';
|
|
9
|
-
export interface HeroProps {
|
|
9
|
+
export interface HeroProps extends React.ComponentPropsWithoutRef<'div'> {
|
|
10
10
|
/** @default white */
|
|
11
11
|
bgColor?: HeroColor;
|
|
12
12
|
className?: string;
|
|
@@ -18,4 +18,4 @@ export interface HeroProps {
|
|
|
18
18
|
/** Instance of HeroImage */
|
|
19
19
|
image?: React.ReactNode;
|
|
20
20
|
}
|
|
21
|
-
export declare const Hero: (
|
|
21
|
+
export declare const Hero: import("react").ForwardRefExoticComponent<HeroProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
interface HeroActionsProps {
|
|
2
|
+
interface HeroActionsProps extends React.ComponentPropsWithoutRef<'div'> {
|
|
3
3
|
className?: string;
|
|
4
4
|
children?: React.ReactNode;
|
|
5
5
|
}
|
|
6
|
-
export declare const HeroActions: (
|
|
6
|
+
export declare const HeroActions: import("react").ForwardRefExoticComponent<HeroActionsProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
7
7
|
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
interface HeroContentProps {
|
|
2
|
+
interface HeroContentProps extends React.ComponentPropsWithoutRef<'div'> {
|
|
3
3
|
children?: React.ReactNode;
|
|
4
4
|
className?: string;
|
|
5
5
|
heading: string;
|
|
6
6
|
description?: string;
|
|
7
7
|
}
|
|
8
|
-
export declare const HeroContent: (
|
|
8
|
+
export declare const HeroContent: import("react").ForwardRefExoticComponent<HeroContentProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
9
9
|
export {};
|
package/dist/Hero/HeroImage.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ interface HeroImageProps {
|
|
|
3
3
|
src: string;
|
|
4
4
|
mdSrc: string;
|
|
5
5
|
alt?: string;
|
|
6
|
+
className?: string;
|
|
6
7
|
}
|
|
7
|
-
export declare const HeroImage: (
|
|
8
|
+
export declare const HeroImage: import("react").ForwardRefExoticComponent<HeroImageProps & import("react").RefAttributes<HTMLPictureElement>>;
|
|
8
9
|
export {};
|
package/dist/grunnmuren.es.js
CHANGED
|
@@ -856,7 +856,7 @@ const HeroContext = createContext({
|
|
|
856
856
|
contentPosition: "below-center",
|
|
857
857
|
hasImage: false
|
|
858
858
|
});
|
|
859
|
-
const Hero = (props) => {
|
|
859
|
+
const Hero = forwardRef((props, ref) => {
|
|
860
860
|
const _a = props, {
|
|
861
861
|
bgColor = "white",
|
|
862
862
|
children,
|
|
@@ -889,23 +889,25 @@ const Hero = (props) => {
|
|
|
889
889
|
gridTemplateAreas: '"hero"'
|
|
890
890
|
} : void 0
|
|
891
891
|
}, rest), {
|
|
892
|
+
ref,
|
|
892
893
|
children: [image, children]
|
|
893
894
|
}))
|
|
894
895
|
})
|
|
895
896
|
});
|
|
896
|
-
};
|
|
897
|
-
const HeroImage = (props) => {
|
|
897
|
+
});
|
|
898
|
+
const HeroImage = forwardRef((props, ref) => {
|
|
898
899
|
const {
|
|
899
900
|
contentPosition
|
|
900
901
|
} = useContext(HeroContext);
|
|
901
902
|
return /* @__PURE__ */ jsxs("picture", {
|
|
902
|
-
className: cx("aspect-w-6 aspect-h-7 block", {
|
|
903
|
+
className: cx(props.className, "aspect-w-6 aspect-h-7 block", {
|
|
903
904
|
"sm:aspect-w-8 sm:aspect-h-4": contentPosition !== "vertical-split",
|
|
904
905
|
"sm:aspect-w-8 sm:aspect-h-8": contentPosition === "vertical-split"
|
|
905
906
|
}),
|
|
906
907
|
style: contentPosition !== "vertical-split" && contentPosition !== "below-center" && contentPosition !== "below-left" ? {
|
|
907
908
|
gridArea: "hero"
|
|
908
909
|
} : void 0,
|
|
910
|
+
ref,
|
|
909
911
|
children: [/* @__PURE__ */ jsx("source", {
|
|
910
912
|
media: "(min-width: 768px)",
|
|
911
913
|
srcSet: props.mdSrc
|
|
@@ -916,8 +918,8 @@ const HeroImage = (props) => {
|
|
|
916
918
|
alt: props.alt
|
|
917
919
|
})]
|
|
918
920
|
});
|
|
919
|
-
};
|
|
920
|
-
const HeroContent = (props) => {
|
|
921
|
+
});
|
|
922
|
+
const HeroContent = forwardRef((props, ref) => {
|
|
921
923
|
const {
|
|
922
924
|
bgColor,
|
|
923
925
|
contentPosition,
|
|
@@ -957,15 +959,16 @@ const HeroContent = (props) => {
|
|
|
957
959
|
style: usesGridArea ? {
|
|
958
960
|
gridArea: "hero"
|
|
959
961
|
} : void 0,
|
|
962
|
+
ref,
|
|
960
963
|
children: [/* @__PURE__ */ jsx("h1", {
|
|
961
964
|
children: heading
|
|
962
965
|
}), description && /* @__PURE__ */ jsx("p", {
|
|
963
|
-
className: "text-lg md:text-xl",
|
|
966
|
+
className: "text-lg font-semibold md:text-xl",
|
|
964
967
|
children: description
|
|
965
968
|
}), children]
|
|
966
969
|
}));
|
|
967
|
-
};
|
|
968
|
-
const HeroActions = (props) => {
|
|
970
|
+
});
|
|
971
|
+
const HeroActions = forwardRef((props, ref) => {
|
|
969
972
|
const _a = props, {
|
|
970
973
|
className
|
|
971
974
|
} = _a, rest = __objRest(_a, [
|
|
@@ -974,12 +977,14 @@ const HeroActions = (props) => {
|
|
|
974
977
|
const {
|
|
975
978
|
contentPosition
|
|
976
979
|
} = useContext(HeroContext);
|
|
977
|
-
return /* @__PURE__ */ jsx("div", __spreadValues({
|
|
980
|
+
return /* @__PURE__ */ jsx("div", __spreadProps(__spreadValues({
|
|
978
981
|
className: cx(className, "grid items-center justify-center justify-items-center gap-4 md:grid-flow-col", {
|
|
979
982
|
"md:justify-start": contentPosition === "vertical-split" || contentPosition === "below-left"
|
|
980
983
|
})
|
|
981
|
-
}, rest)
|
|
982
|
-
|
|
984
|
+
}, rest), {
|
|
985
|
+
ref
|
|
986
|
+
}));
|
|
987
|
+
});
|
|
983
988
|
const Input = forwardRef((props, ref) => {
|
|
984
989
|
const _a = props, {
|
|
985
990
|
className,
|
|
@@ -1521,11 +1526,11 @@ const Snackbar = (props) => {
|
|
|
1521
1526
|
return /* @__PURE__ */ jsx("div", {
|
|
1522
1527
|
className: "container max-w-[59rem]",
|
|
1523
1528
|
children: /* @__PURE__ */ jsx("div", {
|
|
1524
|
-
className: "bg-orange-light
|
|
1529
|
+
className: "bg-orange-light px-8 py-4 max-md:p-4",
|
|
1525
1530
|
children: /* @__PURE__ */ jsxs("div", {
|
|
1526
1531
|
className: "snackbar grid items-center",
|
|
1527
1532
|
children: [/* @__PURE__ */ jsx(InfoCircle, {
|
|
1528
|
-
className: "text-orange snackbar-icon mr-4 md:mr-8 md:text-2xl"
|
|
1533
|
+
className: "text-orange snackbar-icon mr-4 self-start md:mr-8 md:text-2xl"
|
|
1529
1534
|
}), /* @__PURE__ */ jsx("h3", {
|
|
1530
1535
|
className: cx("snackbar-header min-w-0 max-w-prose text-base font-medium", {
|
|
1531
1536
|
"overflow-hidden overflow-ellipsis whitespace-nowrap": !isExpanded
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@obosbbl/grunnmuren-react",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.11.1",
|
|
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.20.12",
|
|
21
|
-
"@storybook/addon-controls": "6.5.
|
|
22
|
-
"@storybook/addon-docs": "6.5.
|
|
21
|
+
"@storybook/addon-controls": "6.5.16",
|
|
22
|
+
"@storybook/addon-docs": "6.5.16",
|
|
23
23
|
"@storybook/addon-postcss": "2.0.0",
|
|
24
|
-
"@storybook/builder-webpack5": "6.5.
|
|
25
|
-
"@storybook/manager-webpack5": "6.5.
|
|
26
|
-
"@storybook/react": "6.5.
|
|
27
|
-
"@types/react": "18.0.
|
|
24
|
+
"@storybook/builder-webpack5": "6.5.16",
|
|
25
|
+
"@storybook/manager-webpack5": "6.5.16",
|
|
26
|
+
"@storybook/react": "6.5.16",
|
|
27
|
+
"@types/react": "18.0.27",
|
|
28
28
|
"@types/react-dom": "18.0.10",
|
|
29
29
|
"@vitejs/plugin-react": "1.3.2",
|
|
30
30
|
"postcss": "8.4.21",
|
|
31
31
|
"react": "18.2.0",
|
|
32
32
|
"react-dom": "18.2.0",
|
|
33
33
|
"require-from-string": "2.0.2",
|
|
34
|
-
"rimraf": "4.
|
|
34
|
+
"rimraf": "4.1.2",
|
|
35
35
|
"tailwindcss": "3.2.4",
|
|
36
|
-
"type-fest": "3.5.
|
|
36
|
+
"type-fest": "3.5.6",
|
|
37
37
|
"vite": "2.9.15",
|
|
38
38
|
"webpack": "5.75.0",
|
|
39
39
|
"@obosbbl/grunnmuren-tailwind": "0.8.4"
|