oolib 2.152.1 → 2.153.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.
- package/dist/components/Banners/index.d.ts +2 -1
- package/dist/components/Banners/index.js +12 -1
- package/dist/components/Breadcrumbs/index.styled.d.ts +4 -1
- package/dist/components/Buttons/index.d.ts +2 -1
- package/dist/components/HomeCover/index.js +2 -3
- package/dist/components/OKELink/index.d.ts +2 -1
- package/dist/components/Tags/Comps/TagLink/styled.d.ts +2 -1
- package/dist/components/cards/utils/decideLinkCompAndTarget.d.ts +3 -1
- package/dist/v2/components/Buttons/index.d.ts +2 -1
- package/dist/v2/components/OKELink/index.d.ts +2 -1
- package/dist/v2/components/cards/utils/decideLinkCompAndTarget.d.ts +3 -1
- package/package.json +3 -3
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import { To } from 'react-router-dom';
|
|
2
3
|
export type IconColor = 'red' | 'green' | 'yellow' | 'dark' | 'grey';
|
|
3
4
|
export interface DisplayIconProps {
|
|
4
5
|
color: IconColor;
|
|
5
6
|
}
|
|
6
7
|
export interface BannerCTA {
|
|
7
|
-
to?:
|
|
8
|
+
to?: To;
|
|
8
9
|
action?: () => void;
|
|
9
10
|
text: string;
|
|
10
11
|
}
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
2
13
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
14
|
if (k2 === undefined) k2 = k;
|
|
4
15
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -85,7 +96,7 @@ var Banner = function (_a) {
|
|
|
85
96
|
};
|
|
86
97
|
var genCTA = function (cta) {
|
|
87
98
|
var LinkWrapper = cta.to ? react_router_dom_1.Link : react_1.Fragment;
|
|
88
|
-
return (react_1.default.createElement(LinkWrapper, { to: cta.to },
|
|
99
|
+
return (react_1.default.createElement(LinkWrapper, __assign({}, (cta.to ? { to: cta.to } : {})),
|
|
89
100
|
react_1.default.createElement(Buttons_1.ButtonSecondary, { style: { marginTop: "0.5rem", marginBottom: "0.5rem" }, S: true, onClick: !cta.to && cta.action, invert: color === "dark" }, cta === null || cta === void 0 ? void 0 : cta.text)));
|
|
90
101
|
};
|
|
91
102
|
return (react_1.default.createElement(styled_1.BannerAnimateStyled, { key: id, ref: ContainerRef, height: height },
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
declare const StyledBreadcrumbs: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
|
-
declare const StyledLinkCrumb: import("styled-components").StyledComponent<
|
|
3
|
+
declare const StyledLinkCrumb: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("react-router-dom").LinkProps & import("react").RefAttributes<HTMLAnchorElement>>, any, {
|
|
4
|
+
invert: boolean;
|
|
5
|
+
}, never>;
|
|
3
6
|
export { StyledBreadcrumbs, StyledLinkCrumb };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import { To } from "react-router-dom";
|
|
2
3
|
export interface DisplayIconProps {
|
|
3
4
|
icon: string;
|
|
4
5
|
size: number;
|
|
@@ -8,7 +9,7 @@ export interface DisplayIconProps {
|
|
|
8
9
|
export interface ButtonProps {
|
|
9
10
|
id?: string;
|
|
10
11
|
link?: {
|
|
11
|
-
val:
|
|
12
|
+
val: To;
|
|
12
13
|
displayText?: string;
|
|
13
14
|
};
|
|
14
15
|
children?: React.ReactNode;
|
|
@@ -48,8 +48,7 @@ var HomeCover = function (_a) {
|
|
|
48
48
|
var title = _a.title, subtitle = _a.subtitle, desc = _a.desc, CTALink = _a.CTALink, customComp = _a.customComp, coverImagesConfig = _a.coverImagesConfig, _b = _a.variant, variant = _b === void 0 ? "default" : _b;
|
|
49
49
|
var screenWidth = (0, useScreenWidth_1.useScreenWidth)();
|
|
50
50
|
var isDesktop = screenWidth > (0, mixins_1.getBreakPoint)("md");
|
|
51
|
-
var
|
|
52
|
-
var navigate = react_router_dom_1.useNavigate ? (0, react_router_dom_1.useNavigate)() : undefined;
|
|
51
|
+
var navigate = (0, react_router_dom_1.useNavigate)();
|
|
53
52
|
// const {deployment: {_CoverImages : coverImagesConfig}} = useGetQueryData('platformConfigs');
|
|
54
53
|
//backwards compat
|
|
55
54
|
var _CoverImages = coverImagesConfig.every(function (c) { return typeof c === "string"; })
|
|
@@ -133,7 +132,7 @@ var HomeCover = function (_a) {
|
|
|
133
132
|
var genCTALink = function (_a) {
|
|
134
133
|
var CTALink = _a.CTALink, variant = _a.variant, isDesktop = _a.isDesktop;
|
|
135
134
|
return CTALink && (react_1.default.createElement(Buttons_1.ButtonPrimary, { className: "HomeCover__cta", icon: "CaretRight", M: variant === "small" && !isDesktop && true, style: __assign({ position: "absolute", bottom: 0, borderRadius: 0, right: variant === "small" && !isDesktop ? "2rem" : 0 }, (variant === "small" && !isDesktop ? { zIndex: 100 } : {})), onClick: function () {
|
|
136
|
-
|
|
135
|
+
navigate(CTALink);
|
|
137
136
|
} }));
|
|
138
137
|
};
|
|
139
138
|
var TitleTypoComp = variant === "small" ? Typo_1.SERIF_8_9 : Typo_1.SERIF_9_10;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React, { FunctionComponent } from 'react';
|
|
2
|
+
import { To } from 'react-router-dom';
|
|
2
3
|
import { DisplayIconProps } from '../../utils/comps/DisplayIcon';
|
|
3
4
|
import { icons } from '../../icons';
|
|
4
5
|
export interface OKELinkProps {
|
|
5
|
-
to?:
|
|
6
|
+
to?: To;
|
|
6
7
|
link?: string;
|
|
7
8
|
onClick?: (e: React.MouseEvent<HTMLSpanElement | HTMLAnchorElement>) => void;
|
|
8
9
|
icon?: keyof typeof icons;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { SIZES } from "../styled";
|
|
2
|
-
export declare const StyledLink: import("styled-components").StyledComponent<
|
|
3
|
+
export declare const StyledLink: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("react-router-dom").NavLinkProps & import("react").RefAttributes<HTMLAnchorElement>>, any, {}, never>;
|
|
3
4
|
export interface TagLinkStyleProps {
|
|
4
5
|
variant: 'primary' | 'secondary';
|
|
5
6
|
invert?: boolean;
|
|
@@ -2,7 +2,9 @@ export function decideLinkCompAndTarget({ to, openInNewTab }: {
|
|
|
2
2
|
to: any;
|
|
3
3
|
openInNewTab: any;
|
|
4
4
|
}): {
|
|
5
|
-
LinkComp:
|
|
5
|
+
LinkComp: string | import("react").ExoticComponent<{
|
|
6
|
+
children?: import("react").ReactNode;
|
|
7
|
+
}>;
|
|
6
8
|
target: string;
|
|
7
9
|
externalUrl: boolean;
|
|
8
10
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import { To } from "react-router-dom";
|
|
2
3
|
export interface DisplayIconProps {
|
|
3
4
|
icon: string;
|
|
4
5
|
size: number;
|
|
@@ -8,7 +9,7 @@ export interface DisplayIconProps {
|
|
|
8
9
|
export interface ButtonProps {
|
|
9
10
|
id?: string;
|
|
10
11
|
link?: {
|
|
11
|
-
val:
|
|
12
|
+
val: To;
|
|
12
13
|
displayText?: string;
|
|
13
14
|
};
|
|
14
15
|
children?: React.ReactNode;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React, { FunctionComponent } from 'react';
|
|
2
|
+
import { To } from 'react-router-dom';
|
|
2
3
|
import { DisplayIconProps } from '../../../utils/comps/DisplayIcon';
|
|
3
4
|
import { icons } from '../../../icons';
|
|
4
5
|
export interface OKELinkProps {
|
|
5
|
-
to?:
|
|
6
|
+
to?: To;
|
|
6
7
|
link?: string;
|
|
7
8
|
onClick?: (e: React.MouseEvent<HTMLSpanElement | HTMLAnchorElement>) => void;
|
|
8
9
|
icon?: keyof typeof icons;
|
|
@@ -2,7 +2,9 @@ export function decideLinkCompAndTarget({ to, openInNewTab }: {
|
|
|
2
2
|
to: any;
|
|
3
3
|
openInNewTab: any;
|
|
4
4
|
}): {
|
|
5
|
-
LinkComp:
|
|
5
|
+
LinkComp: string | import("react").ExoticComponent<{
|
|
6
|
+
children?: import("react").ReactNode;
|
|
7
|
+
}>;
|
|
6
8
|
target: string;
|
|
7
9
|
externalUrl: boolean;
|
|
8
10
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oolib",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.153.0",
|
|
4
4
|
"description": " OKE Component Library",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"react": "^17.0.2",
|
|
66
66
|
"react-dom": "^17.0.2",
|
|
67
67
|
"react-json-view": "^1.21.3",
|
|
68
|
-
"react-router-dom": "^
|
|
68
|
+
"react-router-dom": "^6.28.0",
|
|
69
69
|
"semantic-release": "^18.0.0",
|
|
70
70
|
"storybook": "^7.2.1",
|
|
71
71
|
"typescript": "^5.4.3"
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"peerDependencies": {
|
|
74
74
|
"react": "^17.0.2",
|
|
75
75
|
"react-dom": "^17.0.2",
|
|
76
|
-
"react-router-dom": "^
|
|
76
|
+
"react-router-dom": "^6.28.0",
|
|
77
77
|
"styled-components": "^5.3.3"
|
|
78
78
|
},
|
|
79
79
|
"config": {
|