oolib 2.129.10 → 2.131.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.
Files changed (40) hide show
  1. package/dist/components/ActionMenu/index.js +2 -2
  2. package/dist/components/ActionMenu/styled.d.ts +1 -0
  3. package/dist/components/ActionMenu/styled.js +6 -3
  4. package/dist/components/LoadersAndProgress/LoaderCircle/index.d.ts +30 -7
  5. package/dist/components/LoadersAndProgress/LoaderCircle/index.js +26 -1
  6. package/dist/components/LoadersAndProgress/LoaderOverlay/index.d.ts +12 -4
  7. package/dist/components/LoadersAndProgress/LoaderOverlay/index.js +7 -1
  8. package/dist/components/LoadersAndProgress/ProgressBar/index.d.ts +19 -6
  9. package/dist/components/LoadersAndProgress/ProgressBar/index.js +12 -0
  10. package/dist/components/LoadersAndProgress/SkeletonLoader/index.d.ts +12 -4
  11. package/dist/components/LoadersAndProgress/SkeletonLoader/index.js +8 -1
  12. package/dist/components/LoadersAndProgress/SkeletonLoader/styled.d.ts +1 -1
  13. package/dist/components/LoadersAndProgress/SkeletonLoader/styled.js +2 -2
  14. package/dist/components/LoadersAndProgress/TextLoader/index.d.ts +12 -4
  15. package/dist/components/LoadersAndProgress/TextLoader/index.js +8 -1
  16. package/dist/components/LoadersAndProgress/index.d.ts +3 -3
  17. package/dist/components/LoadersAndProgress/styled.d.ts +23 -5
  18. package/dist/components/LoadersAndProgress/styled.js +2 -2
  19. package/dist/components/LoadersAndProgress/utils/index.d.ts +6 -3
  20. package/dist/components/LoadersAndProgress/utils/index.js +1 -1
  21. package/dist/components/OKELink/comps/AvatarDisplay/index.d.ts +26 -7
  22. package/dist/components/OKELink/comps/AvatarDisplay/index.js +16 -6
  23. package/dist/components/OKELink/comps/AvatarDisplay/styled.d.ts +8 -2
  24. package/dist/components/OKELink/comps/AvatarDisplay/styled.js +17 -1
  25. package/dist/components/OKELink/index.d.ts +20 -18
  26. package/dist/components/OKELink/index.js +19 -34
  27. package/dist/components/OKELink/utils/index.d.ts +11 -6
  28. package/dist/components/OKELink/utils/index.js +3 -3
  29. package/dist/components/Tooltip/styled.js +1 -1
  30. package/dist/globalStyles/globalVariables.js +1 -1
  31. package/dist/icons/index.d.ts +0 -2
  32. package/dist/icons/index.js +0 -1
  33. package/dist/interfaces/index.d.ts +6 -0
  34. package/dist/interfaces/index.js +2 -0
  35. package/dist/stories/ActionMenu.stories.d.ts +115 -165
  36. package/dist/stories/ActionMenu.stories.js +4 -3
  37. package/dist/utils/comps/DisplayIcon/index.d.ts +20 -7
  38. package/dist/utils/comps/DisplayIcon/index.js +11 -1
  39. package/dist/utilsOolib/index.js +1 -2
  40. package/package.json +1 -1
@@ -99,7 +99,7 @@ var ActionMenu = function (_a) {
99
99
  return (react_1.default.createElement(styled_1.StyledActionsDropMenu, { id: "dropmenu", align: align, invert: invert, optionsHeight: (_a = getOpsRect()) === null || _a === void 0 ? void 0 : _a.height, optionsWidth: (_b = getOpsRect()) === null || _b === void 0 ? void 0 : _b.width, showActions: showActions, fixPos: fixPos },
100
100
  react_1.default.createElement(styled_1.StyledActionMenuOpsWrapper, { invert: invert, align: align, ref: optionsWrapperRef }, actions.map(function (action) {
101
101
  var _a, _b, _c;
102
- var optionContent = (react_1.default.createElement(styled_1.StyledOption, __assign({}, action, { onClick: function (e) {
102
+ var optionContent = (react_1.default.createElement(styled_1.StyledOption, __assign({ disabled: action.disabled }, action, { onClick: function (e) {
103
103
  var _a;
104
104
  e.preventDefault();
105
105
  e.stopPropagation();
@@ -108,7 +108,7 @@ var ActionMenu = function (_a) {
108
108
  }, key: action.display, invert: invert }),
109
109
  action.icon && genOptionIcon(action.icon),
110
110
  react_1.default.createElement(Typo_1.SANS_2, null, action.display)));
111
- return (react_1.default.createElement(ModalConfirmAction_1.ModalConfirmAction, __assign({}, action.confirmAction, { key: action.display }), action.infoTooltip ? (react_1.default.createElement(Tooltip_1.Tooltip, { text: ((_a = action.infoTooltip) === null || _a === void 0 ? void 0 : _a.text) || undefined, popOutOfOverflowHiddenParent: ((_b = action.infoTooltip) === null || _b === void 0 ? void 0 : _b.popOutOfOverflowHiddenParent) || false, position: ((_c = action.infoTooltip) === null || _c === void 0 ? void 0 : _c.position) || "left" }, optionContent)) : (optionContent)));
111
+ return (react_1.default.createElement(ModalConfirmAction_1.ModalConfirmAction, __assign({}, action.confirmAction, { key: action.display }), action.infoTooltip ? (react_1.default.createElement(Tooltip_1.Tooltip, { text: ((_a = action.infoTooltip) === null || _a === void 0 ? void 0 : _a.text) || undefined, popOutOfOverflowHiddenParent: ((_b = action.infoTooltip) === null || _b === void 0 ? void 0 : _b.popOutOfOverflowHiddenParent) || false, position: ((_c = action.infoTooltip) === null || _c === void 0 ? void 0 : _c.position) || "left", invert: invert }, optionContent)) : (optionContent)));
112
112
  }))));
113
113
  };
114
114
  return (react_1.default.createElement(styled_1.StyledActionMenu, { ref: actionMenuRef },
@@ -21,5 +21,6 @@ export declare const StyledActionMenuOpsWrapper: import("styled-components").Sty
21
21
  }, never>;
22
22
  export declare const StyledOption: import("styled-components").StyledComponent<"button", any, {
23
23
  invert?: boolean;
24
+ disabled?: boolean;
24
25
  }, never>;
25
26
  export {};
@@ -94,8 +94,11 @@ exports.StyledActionMenuOpsWrapper = styled_components_1.default.div(templateObj
94
94
  var invert = _a.invert;
95
95
  return (invert ? greyColor80 : white);
96
96
  });
97
- exports.StyledOption = styled_components_1.default.button(templateObject_22 || (templateObject_22 = __makeTemplateObject(["\n white-space: nowrap;\n border: none;\n cursor: pointer;\n width: 100%;\n display: flex;\n align-items: center;\n gap: 0.5rem;\n text-align: left;\n padding: 0.25rem 1.2rem;\n background-color: transparent;\n color: ", ";\n ", ";\n ", "\n"], ["\n white-space: nowrap;\n border: none;\n cursor: pointer;\n width: 100%;\n display: flex;\n align-items: center;\n gap: 0.5rem;\n text-align: left;\n padding: 0.25rem 1.2rem;\n background-color: transparent;\n color: ", ";\n ", ";\n ", "\n"])), function (_a) {
97
+ exports.StyledOption = styled_components_1.default.button(templateObject_24 || (templateObject_24 = __makeTemplateObject(["\n white-space: nowrap;\n border: none;\n \n width: 100%;\n display: flex;\n align-items: center;\n gap: 0.5rem;\n text-align: left;\n padding: 0.25rem 1.2rem;\n background-color: transparent; \n color: ", ";\n ", ";\n\n ", "\n\n"], ["\n white-space: nowrap;\n border: none;\n \n width: 100%;\n display: flex;\n align-items: center;\n gap: 0.5rem;\n text-align: left;\n padding: 0.25rem 1.2rem;\n background-color: transparent; \n color: ", ";\n ", ";\n\n ", "\n\n"])), function (_a) {
98
98
  var invert = _a.invert;
99
99
  return (invert ? white : greyColor100);
100
- }, (0, mixins_1.transition)("background-color"), globalVariables_1.globalHoverOnWhiteBG);
101
- var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11, templateObject_12, templateObject_13, templateObject_14, templateObject_15, templateObject_16, templateObject_17, templateObject_18, templateObject_19, templateObject_20, templateObject_21, templateObject_22;
100
+ }, (0, mixins_1.transition)("background-color"), function (_a) {
101
+ var disabled = _a.disabled, invert = _a.invert;
102
+ return disabled ? (0, styled_components_1.css)(templateObject_22 || (templateObject_22 = __makeTemplateObject([" \n pointer-events: none;\n color: ", "\n "], [" \n pointer-events: none;\n color: ", "\n "])), themes_1.colors.greyColor40) : (0, styled_components_1.css)(templateObject_23 || (templateObject_23 = __makeTemplateObject([" \n cursor: pointer;\n ", ""], [" \n cursor: pointer;\n ", ""])), globalVariables_1.globalHoverOnWhiteBG);
103
+ });
104
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11, templateObject_12, templateObject_13, templateObject_14, templateObject_15, templateObject_16, templateObject_17, templateObject_18, templateObject_19, templateObject_20, templateObject_21, templateObject_22, templateObject_23, templateObject_24;
@@ -1,9 +1,32 @@
1
- export function LoaderCircle({ isBlock, blockHeight, L, S, M, ...props }: {
2
- [x: string]: any;
1
+ import React from "react";
2
+ import { LoaderSize } from '../utils';
3
+ export interface LoaderCircleProps {
3
4
  isBlock?: boolean;
4
5
  blockHeight?: string;
5
- L: any;
6
- S: any;
7
- M: any;
8
- }): React.JSX.Element;
9
- import React from "react";
6
+ L?: boolean;
7
+ S?: boolean;
8
+ M?: boolean;
9
+ [key: string]: any;
10
+ }
11
+ export interface LoaderDivProps {
12
+ size: LoaderSize;
13
+ children?: React.ReactNode;
14
+ text?: string;
15
+ debug?: string;
16
+ invert?: boolean;
17
+ isBlock?: boolean;
18
+ }
19
+ /**
20
+ * @component Renders a loader circle component with customizable text and styling.
21
+ *
22
+ * - The props object containing the following properties:
23
+ * @prop {string} size: The size of the loader circle.
24
+ * @prop {React.ReactNode} children: The content to be rendered inside the loader circle.
25
+ * @prop {string} text: The text to be displayed in the loader circle.
26
+ * @prop {string} debug: A boolean indicating whether to enable debug mode for the loader circle. Defaults to false. only for dev use
27
+ * @prop {boolean} invert: A boolean indicating whether to invert the loader circle colors. Defaults to false.
28
+ * @prop {boolean} isBlock: A boolean indicating whether the loader circle should be displayed as a block element. Defaults to true.
29
+ * @prop {string} blockHeight: The height of the block element. Defaults to "100%".
30
+ * @return {ReactElement} The rendered loader circle component.
31
+ */
32
+ export declare function LoaderCircle({ isBlock, blockHeight, L, S, M, ...props }: LoaderCircleProps): React.JSX.Element;
@@ -30,13 +30,38 @@ var react_1 = __importDefault(require("react"));
30
30
  var styled_components_1 = require("styled-components");
31
31
  var utils_1 = require("../utils");
32
32
  var styled_1 = require("../styled");
33
+ /**
34
+ * @component Renders a loader circle component with customizable text and styling.
35
+ *
36
+ * - The props object containing the following properties:
37
+ * @prop {string} size: The size of the loader circle.
38
+ * @prop {React.ReactNode} children: The content to be rendered inside the loader circle.
39
+ * @prop {string} text: The text to be displayed in the loader circle.
40
+ * @prop {string} debug: A boolean indicating whether to enable debug mode for the loader circle. Defaults to false. only for dev use
41
+ * @prop {boolean} invert: A boolean indicating whether to invert the loader circle colors. Defaults to false.
42
+ * @prop {boolean} isBlock: A boolean indicating whether the loader circle should be displayed as a block element. Defaults to true.
43
+ * @prop {string} blockHeight: The height of the block element. Defaults to "100%".
44
+ * @return {ReactElement} The rendered loader circle component.
45
+ */
33
46
  function LoaderCircle(_a) {
34
47
  var _b = _a.isBlock, isBlock = _b === void 0 ? true : _b, _c = _a.blockHeight, blockHeight = _c === void 0 ? '100%' : _c, L = _a.L, S = _a.S, M = _a.M, props = __rest(_a, ["isBlock", "blockHeight", "L", "S", "M"]);
35
- var size = L ? 'L' : S ? 'S' : 'M'; //defaults to M if no L or S, so techinically, the M prop isnt really required..
48
+ var size = L ? 'L' : S ? 'S' : 'M';
36
49
  var renderLoaderDiv = function () { return react_1.default.createElement(LoaderDiv, __assign({}, props, { isBlock: isBlock, size: size })); };
37
50
  return !isBlock ? (renderLoaderDiv()) : (react_1.default.createElement(styled_1.StyledLoaderOverlay, { blockHeight: blockHeight }, renderLoaderDiv()));
38
51
  }
39
52
  exports.LoaderCircle = LoaderCircle;
53
+ /**
54
+ * @component Renders a loader Div component with customizable text and styling.
55
+ *
56
+ * - The props object containing the following properties:
57
+ * @prop {string} size: The size of the loader div.
58
+ * @prop {React.ReactNode} children: The content to be rendered inside the loader div.
59
+ * @prop {string} text: The text to be displayed in the loader div.
60
+ * @prop {string} debug: A boolean indicating whether to enable debug mode for the loader div. Defaults to false. only for dev use
61
+ * @prop {boolean} invert: A boolean indicating whether to invert the loader div colors. Defaults to false.
62
+ * @prop {boolean} isBlock: A boolean indicating whether the loader div should be displayed as a block element. Defaults to true.
63
+ * @return {ReactElement} The rendered loader div component.
64
+ */
40
65
  var LoaderDiv = function (_a) {
41
66
  var size = _a.size, children = _a.children, _text = _a.text, debug = _a.debug, invert = _a.invert, isBlock = _a.isBlock;
42
67
  var theme = (0, styled_components_1.useTheme)();
@@ -1,4 +1,12 @@
1
- export function LoaderOverlay({ loaderText }: {
2
- loaderText: any;
3
- }): React.JSX.Element;
4
- import React from "react";
1
+ import { FunctionComponent } from "react";
2
+ export interface LoaderOverlayProps {
3
+ loaderText?: string;
4
+ }
5
+ /**
6
+ * @component Renders a loader overlay component with customizable text and styling.
7
+ *
8
+ * - The props object containing the following properties:
9
+ * @prop {string} loaderText: The text to be displayed in the loader overlay.
10
+ * @return {ReactElement} The rendered loader overlay component.
11
+ */
12
+ export declare const LoaderOverlay: FunctionComponent<LoaderOverlayProps>;
@@ -27,7 +27,13 @@ exports.LoaderOverlay = void 0;
27
27
  var react_1 = __importStar(require("react"));
28
28
  var themes_1 = require("../../../themes");
29
29
  var LoaderCircle_1 = require("../LoaderCircle");
30
- // creates overlay effect loading screen
30
+ /**
31
+ * @component Renders a loader overlay component with customizable text and styling.
32
+ *
33
+ * - The props object containing the following properties:
34
+ * @prop {string} loaderText: The text to be displayed in the loader overlay.
35
+ * @return {ReactElement} The rendered loader overlay component.
36
+ */
31
37
  var LoaderOverlay = function (_a) {
32
38
  var loaderText = _a.loaderText;
33
39
  return (react_1.default.createElement(react_1.Fragment, null,
@@ -1,9 +1,22 @@
1
- export function ProgressBar({ progress, text, children, isBlock, blockHeight, barWidth }: {
2
- progress: any;
3
- text: any;
4
- children: any;
1
+ import React, { FunctionComponent } from "react";
2
+ export interface ProgressBarProps {
3
+ progress: number;
4
+ text?: string;
5
+ children?: React.ReactNode;
5
6
  isBlock?: boolean;
6
7
  blockHeight?: string;
7
8
  barWidth?: number;
8
- }): React.JSX.Element;
9
- import React from "react";
9
+ }
10
+ /**
11
+ * @component Renders a progress bar component with customizable text and styling.
12
+ *
13
+ * - The props object containing the following properties:
14
+ * @prop {number} progress: The progress of the bar.
15
+ * @prop {string} text: The text to be displayed next to the progress bar.
16
+ * @prop {React.ReactNode} children: The content to be rendered inside the progress bar.
17
+ * @prop {boolean} isBlock: A boolean indicating whether the progress bar should be displayed as a block element. Defaults to true.
18
+ * @prop {string} blockHeight: The height of the block element. Defaults to "100%".
19
+ * @prop {number} barWidth: The width of the progress bar. Defaults to 100.
20
+ * @return {ReactElement} The rendered progress bar component.
21
+ */
22
+ export declare const ProgressBar: FunctionComponent<ProgressBarProps>;
@@ -7,6 +7,18 @@ exports.ProgressBar = void 0;
7
7
  var react_1 = __importDefault(require("react"));
8
8
  var Typo_1 = require("../../Typo");
9
9
  var styled_1 = require("../styled");
10
+ /**
11
+ * @component Renders a progress bar component with customizable text and styling.
12
+ *
13
+ * - The props object containing the following properties:
14
+ * @prop {number} progress: The progress of the bar.
15
+ * @prop {string} text: The text to be displayed next to the progress bar.
16
+ * @prop {React.ReactNode} children: The content to be rendered inside the progress bar.
17
+ * @prop {boolean} isBlock: A boolean indicating whether the progress bar should be displayed as a block element. Defaults to true.
18
+ * @prop {string} blockHeight: The height of the block element. Defaults to "100%".
19
+ * @prop {number} barWidth: The width of the progress bar. Defaults to 100.
20
+ * @return {ReactElement} The rendered progress bar component.
21
+ */
10
22
  var ProgressBar = function (_a) {
11
23
  var progress = _a.progress, text = _a.text, children = _a.children, _b = _a.isBlock, isBlock = _b === void 0 ? true : _b, _c = _a.blockHeight, blockHeight = _c === void 0 ? '100%' : _c, _d = _a.barWidth, barWidth = _d === void 0 ? 100 : _d;
12
24
  var genLoader = function () { return (react_1.default.createElement(styled_1.StyledLoaderWrapper, { isBlock: isBlock },
@@ -1,4 +1,12 @@
1
- export function SkeletonLoader({ style }: {
2
- style: any;
3
- }): React.JSX.Element;
4
- import React from 'react';
1
+ import React, { FunctionComponent } from 'react';
2
+ export interface SkeletonLoaderProps {
3
+ style?: React.CSSProperties;
4
+ }
5
+ /**
6
+ * @component Renders a skeleton loader component with customizable styling.
7
+ *
8
+ * - The props object containing the following properties:
9
+ * @prop {React.CSSProperties} style: Additional CSS styles to apply to the skeleton loader.
10
+ * @return {ReactElement} The rendered skeleton loader component.
11
+ */
12
+ export declare const SkeletonLoader: FunctionComponent<SkeletonLoaderProps>;
@@ -6,8 +6,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.SkeletonLoader = void 0;
7
7
  var react_1 = __importDefault(require("react"));
8
8
  var styled_1 = require("./styled");
9
+ /**
10
+ * @component Renders a skeleton loader component with customizable styling.
11
+ *
12
+ * - The props object containing the following properties:
13
+ * @prop {React.CSSProperties} style: Additional CSS styles to apply to the skeleton loader.
14
+ * @return {ReactElement} The rendered skeleton loader component.
15
+ */
9
16
  var SkeletonLoader = function (_a) {
10
17
  var style = _a.style;
11
- return react_1.default.createElement(styled_1.StyledSkeletonLoader, { style: style });
18
+ return (react_1.default.createElement(styled_1.StyledSkeletonLoader, { style: style }));
12
19
  };
13
20
  exports.SkeletonLoader = SkeletonLoader;
@@ -1 +1 @@
1
- export const StyledSkeletonLoader: import("styled-components").StyledComponent<"div", any, {}, never>;
1
+ export declare const StyledSkeletonLoader: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -31,8 +31,8 @@ exports.StyledSkeletonLoader = void 0;
31
31
  var styled_components_1 = __importStar(require("styled-components"));
32
32
  var themes_1 = require("../../../themes");
33
33
  var utilsOolib_1 = require("../../../utilsOolib");
34
- var load = (0, styled_components_1.keyframes)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n from { left: -100%; }\n to { left: 100%; }\n"], ["\n from { left: -100%; }\n to { left: 100%; }\n"])));
35
- exports.StyledSkeletonLoader = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n overflow: hidden;\n position: relative;\n background-color: ", ";\n \n &::before{\n content: '';\n display: block;\n position: absolute;\n left: -100%;\n top: 0;\n width: 100%;\n height: 100%;\n background: linear-gradient(to right, transparent 0%, ", " 50%, transparent 100%);\n animation: ", " 1s cubic-bezier(0.4, 0.0, 0.2, 1);\n animation-iteration-count:infinite;\n }\n"], ["\n overflow: hidden;\n position: relative;\n background-color: ", ";\n \n &::before{\n content: '';\n display: block;\n position: absolute;\n left: -100%;\n top: 0;\n width: 100%;\n height: 100%;\n background: linear-gradient(to right, transparent 0%, ", " 50%, transparent 100%);\n animation: ", " 1s cubic-bezier(0.4, 0.0, 0.2, 1);\n animation-iteration-count:infinite;\n }\n"])), function (_a) {
34
+ var load = (0, styled_components_1.keyframes)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n from { left: -100%; }\n to { left: 100%; }\n"], ["\n from { left: -100%; }\n to { left: 100%; }\n"])));
35
+ exports.StyledSkeletonLoader = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n overflow: hidden;\n position: relative;\n background-color: ", ";\n\n &::before {\n content: '';\n display: block;\n position: absolute;\n left: -100%;\n top: 0;\n width: 100%;\n height: 100%;\n background: linear-gradient(to right, transparent 0%, ", " 50%, transparent 100%);\n animation: ", " 1s cubic-bezier(0.4, 0.0, 0.2, 1);\n animation-iteration-count: infinite;\n }\n"], ["\n overflow: hidden;\n position: relative;\n background-color: ", ";\n\n &::before {\n content: '';\n display: block;\n position: absolute;\n left: -100%;\n top: 0;\n width: 100%;\n height: 100%;\n background: linear-gradient(to right, transparent 0%, ", " 50%, transparent 100%);\n animation: ", " 1s cubic-bezier(0.4, 0.0, 0.2, 1);\n animation-iteration-count: infinite;\n }\n"])), function (_a) {
36
36
  var theme = _a.theme;
37
37
  return (0, utilsOolib_1.getPrimaryColor10)(theme === null || theme === void 0 ? void 0 : theme.colors);
38
38
  }, themes_1.colors.black_opacity05, load);
@@ -1,4 +1,12 @@
1
- export function TextLoader({ style }: {
2
- style: any;
3
- }): React.JSX.Element;
4
- import React from "react";
1
+ import React, { FunctionComponent } from "react";
2
+ export interface TextLoaderProps {
3
+ style?: React.CSSProperties;
4
+ }
5
+ /**
6
+ * @component Renders a text loader component with customizable styling.
7
+ *
8
+ * - The props object containing the following properties:
9
+ * @prop {React.CSSProperties} style: Additional CSS styles to apply to the text loader.
10
+ * @return {ReactElement} The rendered text loader component.
11
+ */
12
+ export declare const TextLoader: FunctionComponent<TextLoaderProps>;
@@ -19,9 +19,16 @@ var react_1 = __importDefault(require("react"));
19
19
  var styled_1 = require("../SkeletonLoader/styled");
20
20
  var styled_components_1 = require("styled-components");
21
21
  var utilsOolib_1 = require("../../../utilsOolib");
22
+ /**
23
+ * @component Renders a text loader component with customizable styling.
24
+ *
25
+ * - The props object containing the following properties:
26
+ * @prop {React.CSSProperties} style: Additional CSS styles to apply to the text loader.
27
+ * @return {ReactElement} The rendered text loader component.
28
+ */
22
29
  var TextLoader = function (_a) {
23
30
  var style = _a.style;
24
31
  var theme = (0, styled_components_1.useTheme)();
25
- return react_1.default.createElement(styled_1.StyledSkeletonLoader, { style: __assign(__assign({ backgroundColor: (0, utilsOolib_1.getPrimaryColor10)(theme === null || theme === void 0 ? void 0 : theme.colors) }, (style || {})), { width: (style === null || style === void 0 ? void 0 : style.width) || "8rem", height: (style === null || style === void 0 ? void 0 : style.height) || "1.5rem" }) });
32
+ return (react_1.default.createElement(styled_1.StyledSkeletonLoader, { style: __assign(__assign({ backgroundColor: (0, utilsOolib_1.getPrimaryColor10)(theme === null || theme === void 0 ? void 0 : theme.colors) }, (style || {})), { width: (style === null || style === void 0 ? void 0 : style.width) || "8rem", height: (style === null || style === void 0 ? void 0 : style.height) || "1.5rem" }) }));
26
33
  };
27
34
  exports.TextLoader = TextLoader;
@@ -1,3 +1,3 @@
1
- export { ProgressBar } from "./ProgressBar";
2
- export { LoaderCircle } from "./LoaderCircle";
3
- export { LoaderOverlay } from "./LoaderOverlay";
1
+ export { ProgressBar } from './ProgressBar';
2
+ export { LoaderCircle } from './LoaderCircle';
3
+ export { LoaderOverlay } from './LoaderOverlay';
@@ -1,5 +1,23 @@
1
- export const StyledCircLoader: import("styled-components").StyledComponent<"div", any, {}, never>;
2
- export const StyledLoaderWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
3
- export const StyledLoaderOverlay: import("styled-components").StyledComponent<"div", any, {}, never>;
4
- export const StyledHorLoader: import("styled-components").StyledComponent<"div", any, {}, never>;
5
- export const StyledHorLoadingBar: import("styled-components").StyledComponent<"div", any, {}, never>;
1
+ export interface StyledCircLoaderProps {
2
+ diameter: number;
3
+ trackThickness: number;
4
+ invert?: boolean;
5
+ }
6
+ export interface StyledLoaderWrapperProps {
7
+ isBlock?: boolean;
8
+ }
9
+ export interface StyledLoaderOverlayProps {
10
+ blockHeight: string;
11
+ }
12
+ export interface StyledHorLoaderProps {
13
+ barWidth: number;
14
+ }
15
+ export interface StyledHorLoadingBarProps {
16
+ progress: number;
17
+ barWidth: number;
18
+ }
19
+ export declare const StyledCircLoader: import("styled-components").StyledComponent<"div", any, StyledCircLoaderProps, never>;
20
+ export declare const StyledLoaderWrapper: import("styled-components").StyledComponent<"div", any, StyledLoaderWrapperProps, never>;
21
+ export declare const StyledLoaderOverlay: import("styled-components").StyledComponent<"div", any, StyledLoaderOverlayProps, never>;
22
+ export declare const StyledHorLoader: import("styled-components").StyledComponent<"div", any, StyledHorLoaderProps, never>;
23
+ export declare const StyledHorLoadingBar: import("styled-components").StyledComponent<"div", any, StyledHorLoadingBarProps, never>;
@@ -34,8 +34,8 @@ var utilsOolib_1 = require("../../utilsOolib");
34
34
  var greyColor10 = colors_1.colors.greyColor10, greyColor70 = colors_1.colors.greyColor70, white = colors_1.colors.white;
35
35
  var spin = (0, styled_components_1.keyframes)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n from { transform: rotate(0deg); }\n to { transform: rotate(360deg); }\n"], ["\n from { transform: rotate(0deg); }\n to { transform: rotate(360deg); }\n"])));
36
36
  exports.StyledCircLoader = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n flex-shrink: 0;\n display: inline-block;\n animation: ", " 1.2s linear infinite;\n border-radius: 50%;\n ", "\n"], ["\n flex-shrink: 0;\n display: inline-block;\n animation: ", " 1.2s linear infinite;\n border-radius: 50%;\n ", "\n"])), spin, function (_a) {
37
- var diameter = _a.diameter, trackThickness = _a.trackThickness, invert = _a.invert, colors = _a.theme.colors;
38
- return (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n width: ", "px;\n height: ", "px;\n border-style: solid;\n border-width: ", "px;\n border-color: ", ";\n border-top-color: ", ";\n "], ["\n width: ", "px;\n height: ", "px;\n border-style: solid;\n border-width: ", "px;\n border-color: ", ";\n border-top-color: ", ";\n "])), diameter, diameter, trackThickness, invert ? greyColor70 : greyColor10, invert ? white : (0, utilsOolib_1.getPrimaryColor100)(colors));
37
+ var diameter = _a.diameter, trackThickness = _a.trackThickness, invert = _a.invert, theme = _a.theme;
38
+ return (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n width: ", "px;\n height: ", "px;\n border-style: solid;\n border-width: ", "px;\n border-color: ", ";\n border-top-color: ", ";\n "], ["\n width: ", "px;\n height: ", "px;\n border-style: solid;\n border-width: ", "px;\n border-color: ", ";\n border-top-color: ", ";\n "])), diameter, diameter, trackThickness, invert ? greyColor70 : greyColor10, invert ? white : (0, utilsOolib_1.getPrimaryColor100)(theme.colors));
39
39
  });
40
40
  exports.StyledLoaderWrapper = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 1rem;\n\n ", ";\n"], ["\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 1rem;\n\n ", ";\n"])), function (_a) {
41
41
  var isBlock = _a.isBlock;
@@ -1,5 +1,8 @@
1
- export function getTypoAndLoaderDimensions(size: any): {
2
- TypoComp: import("react").FunctionComponent<import("../../Typo").TypoCompProps>;
1
+ import { SANS_3, SANS_4_5, SANS_2 } from "../../Typo";
2
+ export type LoaderSize = 'L' | 'S' | 'M';
3
+ export interface DimensionResult {
4
+ TypoComp: typeof SANS_3 | typeof SANS_4_5 | typeof SANS_2;
3
5
  trackThickness: number;
4
6
  diameter: number;
5
- };
7
+ }
8
+ export declare const getTypoAndLoaderDimensions: (size?: LoaderSize) => DimensionResult;
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getTypoAndLoaderDimensions = void 0;
4
4
  var Typo_1 = require("../../Typo");
5
- //defaults to M if neither are specified
6
5
  var getTypoAndLoaderDimensions = function (size) {
6
+ if (size === void 0) { size = 'M'; }
7
7
  switch (size) {
8
8
  case 'L':
9
9
  return { TypoComp: Typo_1.SANS_4_5, trackThickness: 10, diameter: 70 };
@@ -1,8 +1,27 @@
1
- export function AvatarDisplay({ value, title: titleProp, style, size, invert }: {
2
- value: any;
3
- title: any;
4
- style: any;
1
+ import React, { FunctionComponent } from 'react';
2
+ export interface AvatarDisplayProps {
3
+ value: {
4
+ title?: string;
5
+ userUploaded?: {
6
+ publicUrl: string;
7
+ }[];
8
+ };
9
+ title?: string;
10
+ style?: React.CSSProperties;
5
11
  size?: number;
6
- invert: any;
7
- }): React.JSX.Element;
8
- import React from 'react';
12
+ invert?: boolean;
13
+ }
14
+ /**
15
+ * @component Renders an AvatarDisplay component with customizable text, style and user uploaded image.
16
+ *
17
+ * - The props object containing the following properties:
18
+ * @prop {Object} value: An object containing the title and user uploaded images.
19
+ * @prop {string} value.title: The title to be displayed in the AvatarDisplay.
20
+ * @prop {Array} value.userUploaded: An array of objects containing the public URL of the user uploaded images.
21
+ * @prop {string} title: The title to be displayed in the AvatarDisplay.
22
+ * @prop {React.CSSProperties} style: Additional CSS styles to apply to the AvatarDisplay.
23
+ * @prop {number} size: The size of the AvatarDisplay. Defaults to 2.5.
24
+ * @prop {boolean} invert: A boolean indicating whether to invert the AvatarDisplay colors. Defaults to false.
25
+ * @return {ReactElement} The rendered AvatarDisplay component.
26
+ */
27
+ export declare const AvatarDisplay: FunctionComponent<AvatarDisplayProps>;
@@ -5,15 +5,25 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.AvatarDisplay = void 0;
7
7
  var react_1 = __importDefault(require("react"));
8
- var styled_js_1 = require("./styled.js");
8
+ var styled_1 = require("./styled");
9
+ /**
10
+ * @component Renders an AvatarDisplay component with customizable text, style and user uploaded image.
11
+ *
12
+ * - The props object containing the following properties:
13
+ * @prop {Object} value: An object containing the title and user uploaded images.
14
+ * @prop {string} value.title: The title to be displayed in the AvatarDisplay.
15
+ * @prop {Array} value.userUploaded: An array of objects containing the public URL of the user uploaded images.
16
+ * @prop {string} title: The title to be displayed in the AvatarDisplay.
17
+ * @prop {React.CSSProperties} style: Additional CSS styles to apply to the AvatarDisplay.
18
+ * @prop {number} size: The size of the AvatarDisplay. Defaults to 2.5.
19
+ * @prop {boolean} invert: A boolean indicating whether to invert the AvatarDisplay colors. Defaults to false.
20
+ * @return {ReactElement} The rendered AvatarDisplay component.
21
+ */
9
22
  var AvatarDisplay = function (_a) {
10
23
  var value = _a.value, titleProp = _a.title, style = _a.style, _b = _a.size, size = _b === void 0 ? 2.5 : _b, invert = _a.invert;
11
24
  var title = titleProp || value.title;
12
- var titleInitial = title && title[0].toUpperCase();
25
+ var titleInitial = title ? title[0].toUpperCase() : '';
13
26
  var imageURL = (value === null || value === void 0 ? void 0 : value.userUploaded) && (value === null || value === void 0 ? void 0 : value.userUploaded[0].publicUrl);
14
- return (imageURL ?
15
- react_1.default.createElement(styled_js_1.StyledAvatarImg, { invert: invert, size: size, style: style, src: imageURL, alt: "profile picture" })
16
- :
17
- react_1.default.createElement(styled_js_1.StyledAvatarTXT, { invert: invert, size: size, style: style }, titleInitial));
27
+ return imageURL ? (react_1.default.createElement(styled_1.StyledAvatarImg, { invert: invert, size: size, style: style, src: imageURL, alt: "profile picture" })) : (react_1.default.createElement(styled_1.StyledAvatarTXT, { invert: invert, size: size, style: style }, titleInitial));
18
28
  };
19
29
  exports.AvatarDisplay = AvatarDisplay;
@@ -1,2 +1,8 @@
1
- export const StyledAvatarImg: import("styled-components").StyledComponent<"img", any, {}, never>;
2
- export const StyledAvatarTXT: import("styled-components").StyledComponent<"h4", any, {}, never>;
1
+ export declare const StyledAvatarImg: import("styled-components").StyledComponent<"img", any, {
2
+ invert?: boolean;
3
+ size: number | string;
4
+ }, never>;
5
+ export declare const StyledAvatarTXT: import("styled-components").StyledComponent<"h4", any, {
6
+ invert?: boolean;
7
+ size: number | string;
8
+ }, never>;
@@ -35,7 +35,7 @@ var index_styled_1 = require("../../../Typo/index.styled");
35
35
  var greyColor80 = themes_1.colors.greyColor80, white = themes_1.colors.white;
36
36
  var commonStyle = function (_a) {
37
37
  var size = _a.size, invert = _a.invert, theme = _a.theme;
38
- return (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: ", ";\n height: ", ";\n border-radius: 50%;\n background-color: ", ";\n color: ", ";\n \n"], ["\n width: ", ";\n height: ", ";\n border-radius: 50%;\n background-color: ", ";\n color: ", ";\n \n"])), isNaN(size) ? size : size + 'rem', isNaN(size) ? size : size + 'rem', invert ? greyColor80 : (0, utilsOolib_1.getPrimaryColor10)(theme.colors), white);
38
+ return (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: ", ";\n height: ", ";\n border-radius: 50%;\n background-color: ", ";\n color: ", ";\n"], ["\n width: ", ";\n height: ", ";\n border-radius: 50%;\n background-color: ", ";\n color: ", ";\n"])), isNaN(size) ? size : "".concat(size, "rem"), isNaN(size) ? size : "".concat(size, "rem"), invert ? greyColor80 : (0, utilsOolib_1.getPrimaryColor10)(theme.colors), white);
39
39
  };
40
40
  exports.StyledAvatarImg = styled_components_1.default.img(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n ", "\n font-size: 8px;\n"], ["\n ", "\n font-size: 8px;\n"])), function (_a) {
41
41
  var theme = _a.theme, invert = _a.invert, size = _a.size;
@@ -46,3 +46,19 @@ exports.StyledAvatarTXT = (0, styled_components_1.default)(index_styled_1.SANS_3
46
46
  return commonStyle({ theme: theme, invert: invert, size: size });
47
47
  });
48
48
  var templateObject_1, templateObject_2, templateObject_3;
49
+ // const commonStyle =({size, invert, theme})=> css`
50
+ // width: ${isNaN(size)? size : size + 'rem'};
51
+ // height: ${isNaN(size)? size : size + 'rem'};
52
+ // border-radius: 50%;
53
+ // background-color: ${invert? greyColor80 : getPrimaryColor10(theme.colors)};
54
+ // color: ${white};
55
+ // `;
56
+ // export const StyledAvatarImg = styled.img`
57
+ // ${({theme, invert, size})=> commonStyle({theme, invert, size})}
58
+ // font-size: 8px;
59
+ // `;
60
+ // export const StyledAvatarTXT = styled(SANS_3_STYLED)`
61
+ // ${({theme, invert, size})=> commonStyle({theme, invert, size})}
62
+ // display: inline-grid;
63
+ // place-items: center;
64
+ // `;
@@ -1,19 +1,21 @@
1
- export function OKELink({ to: _to, link, onClick, icon, iconWeight, iconAfter, text, children, invertUnderline, color, invert, disabled, className, style, avatar, iconSize, }: {
2
- to: any;
3
- link: any;
4
- onClick: any;
5
- icon: any;
6
- iconWeight: any;
7
- iconAfter: any;
8
- text: any;
9
- children: any;
10
- invertUnderline: any;
11
- color: any;
12
- invert: any;
13
- disabled: any;
14
- className: any;
15
- style: any;
16
- avatar: any;
17
- iconSize: any;
18
- }): React.JSX.Element;
19
1
  import React from 'react';
2
+ import { DisplayIconProps } from '../../utils/comps/DisplayIcon';
3
+ import { icons } from '../../icons';
4
+ export interface OKELinkProps {
5
+ to?: string;
6
+ link?: string;
7
+ onClick?: (e: React.MouseEvent<HTMLSpanElement | HTMLAnchorElement>) => void;
8
+ icon?: keyof typeof icons;
9
+ iconWeight?: DisplayIconProps['weight'];
10
+ iconAfter?: keyof typeof icons;
11
+ text?: string;
12
+ children?: React.ReactNode;
13
+ invertUnderline?: boolean;
14
+ color?: string;
15
+ invert?: boolean;
16
+ disabled?: boolean;
17
+ className?: string;
18
+ style?: React.CSSProperties;
19
+ avatar?: any;
20
+ }
21
+ export declare const OKELink: React.FC<OKELinkProps>;
@@ -44,73 +44,58 @@ var utilsOolib_1 = require("../../utilsOolib");
44
44
  var styled_1 = require("./styled");
45
45
  var ProfileImageInput_1 = require("../ImageInput/derivedComps/ProfileImageInput");
46
46
  var OKELink = function (_a) {
47
- var _to = _a.to, link = _a.link, //link is deprecated. use to instead
48
- onClick = _a.onClick, icon = _a.icon, iconWeight = _a.iconWeight, iconAfter = _a.iconAfter, text = _a.text, children = _a.children, invertUnderline = _a.invertUnderline, color = _a.color, invert = _a.invert, disabled = _a.disabled, className = _a.className, style = _a.style, avatar = _a.avatar, // imageData // [ {...} ] OR {...}
49
- //imageSize ??
50
- iconSize = _a.iconSize;
47
+ var _to = _a.to, link = _a.link, onClick = _a.onClick, icon = _a.icon, iconWeight = _a.iconWeight, iconAfter = _a.iconAfter, text = _a.text, children = _a.children, invertUnderline = _a.invertUnderline, color = _a.color, invert = _a.invert, disabled = _a.disabled, className = _a.className, style = _a.style, avatar = _a.avatar;
51
48
  var to = link || _to;
52
49
  var theme = (0, styled_components_1.useTheme)();
53
50
  var localize = (0, utilsOolib_1.useLocale)();
54
- /**
55
- * if location object is passed through then its internal
56
- * if string then if first character is '/' then internal. else external
57
- * all other cases, return external
58
- */
59
51
  var getLinkType = function (_a) {
60
52
  var to = _a.to, onClick = _a.onClick;
61
53
  if (onClick)
62
54
  return 'action';
63
55
  if (!to)
64
- return 'external'; //this shouldnt exist at all. but for now, if we dont handle this we get a blank screen from footer.
65
- if (to.pathname)
66
- return 'internal'; //means its a route;
67
- if (to instanceof Function)
56
+ return 'external';
57
+ if (typeof to === 'object' && 'pathname' in to)
58
+ return 'internal';
59
+ if (typeof to === 'function')
68
60
  return 'internal';
69
61
  if (typeof to === 'string')
70
62
  return to.substring(0, 1) === '/' ? 'internal' : 'external';
71
- //else
72
63
  return 'external';
73
64
  };
74
65
  var linkType = getLinkType({ to: to, onClick: onClick });
75
- var textComp = (react_1.default.createElement(styled_1.StyledLinkText, { id: 'StyledLinkText' }, localize(children || text)));
76
- var genIcon = function (icon) {
77
- return react_1.default.createElement(DisplayIcon_1.DisplayIcon, { icon: icon, weight: iconWeight || "regular",
78
- size: iconSize || 15,
79
- color: (0, styled_1.genColor)({ color: color, theme: theme, invert: invert, disabled: disabled }) });
66
+ var textComp = (react_1.default.createElement(styled_1.StyledLinkText, { id: "StyledLinkText" }, localize(children || text)));
67
+ var genIcon = function (icon, position) {
68
+ return (react_1.default.createElement(DisplayIcon_1.DisplayIcon, { icon: icon, weight: iconWeight || 'regular', size: 15, color: (0, styled_1.genColor)({ color: color, theme: theme, invert: invert, disabled: disabled }) }));
80
69
  };
81
70
  var genAvatar = function (avatar) {
82
71
  if (!avatar)
83
72
  return;
84
- //else
85
73
  return (react_1.default.createElement("div", { style: { marginRight: '1rem', flex: '0 0 auto' } },
74
+ " ",
86
75
  react_1.default.createElement(ProfileImageInput_1.ProfileImageInput, { readOnly: true, value: avatar === null || avatar === void 0 ? void 0 : avatar.userUploaded, imageTitle: children || text, size: 20, invert: invert })));
87
76
  };
88
- var linkContents = react_1.default.createElement(react_1.Fragment, null,
77
+ var linkContents = (react_1.default.createElement(react_1.Fragment, null,
89
78
  genAvatar(avatar),
90
79
  icon && genIcon(icon, 'before'),
91
80
  textComp,
92
- iconAfter && genIcon(iconAfter, 'after'));
93
- var commonProps = {
94
- color: color,
95
- invert: invert,
96
- disabled: disabled,
97
- className: className || '',
98
- invertUnderline: invertUnderline,
99
- style: style
100
- };
81
+ iconAfter && genIcon(iconAfter, 'after')));
82
+ var commonProps = { color: color, invert: invert, disabled: disabled, className: className || '', invertUnderline: invertUnderline, style: style };
101
83
  var genLink = function () {
102
84
  switch (linkType) {
103
85
  case 'external':
104
- return (react_1.default.createElement(styled_1.StyledLink, __assign({ as: 'a', href: !disabled ? (0, injectHttps_1.injectHttps)(to) : undefined, target: "_blank", onClick: function (e) { e.stopPropagation(); } }, commonProps), linkContents));
86
+ return (react_1.default.createElement(styled_1.StyledLink, __assign({ as: 'a', href: !disabled ? (0, injectHttps_1.injectHttps)(to) : undefined, target: "_blank", onClick: function (e) {
87
+ e.stopPropagation();
88
+ } }, commonProps), linkContents));
105
89
  case 'action':
106
90
  return (react_1.default.createElement(styled_1.StyledLink, __assign({ as: 'span', onClick: function (e) {
107
91
  e.stopPropagation();
108
- !disabled && onClick(e);
92
+ !disabled && (onClick === null || onClick === void 0 ? void 0 : onClick(e));
109
93
  } }, commonProps), linkContents));
110
94
  case 'internal':
111
95
  default:
112
- //internal
113
- return (react_1.default.createElement(styled_1.StyledLink, __assign({ as: react_router_dom_1.Link, to: !disabled ? to : undefined, onClick: function (e) { e.stopPropagation(); } }, commonProps), linkContents));
96
+ return (react_1.default.createElement(styled_1.StyledLink, __assign({ as: react_router_dom_1.Link, to: !disabled ? to : undefined, onClick: function (e) {
97
+ e.stopPropagation();
98
+ } }, commonProps), linkContents));
114
99
  }
115
100
  };
116
101
  return react_1.default.createElement(react_1.Fragment, null, genLink());
@@ -1,6 +1,11 @@
1
- export function setLinkColor({ disabled, color, invert, theme }: {
2
- disabled: any;
3
- color: any;
4
- invert: any;
5
- theme: any;
6
- }): any;
1
+ import { DefaultTheme } from "styled-components";
2
+ import { ColorsType } from "../../../themes/colors";
3
+ export interface SetLinkColorProps {
4
+ disabled?: boolean;
5
+ color?: string;
6
+ invert?: boolean;
7
+ theme: DefaultTheme & {
8
+ colors: ColorsType;
9
+ };
10
+ }
11
+ export declare const setLinkColor: ({ disabled, color, invert, theme, }: SetLinkColorProps) => string;
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.setLinkColor = void 0;
4
- var themes_1 = require("../../../themes");
5
4
  var utilsOolib_1 = require("../../../utilsOolib");
5
+ var themes_1 = require("../../../themes");
6
6
  var greyColor40 = themes_1.colors.greyColor40;
7
7
  var setLinkColor = function (_a) {
8
8
  var disabled = _a.disabled, color = _a.color, invert = _a.invert, theme = _a.theme;
@@ -12,9 +12,9 @@ var setLinkColor = function (_a) {
12
12
  case !!color:
13
13
  return color;
14
14
  case invert:
15
- return (0, utilsOolib_1.getPrimaryColor40)(theme.colors);
15
+ return (0, utilsOolib_1.getPrimaryColor40)(theme === null || theme === void 0 ? void 0 : theme.colors);
16
16
  default:
17
- return (0, utilsOolib_1.getPrimaryColorText)(theme.colors);
17
+ return (0, utilsOolib_1.getPrimaryColorText)(theme === null || theme === void 0 ? void 0 : theme.colors);
18
18
  }
19
19
  };
20
20
  exports.setLinkColor = setLinkColor;
@@ -19,7 +19,7 @@ var clipPaths = {
19
19
  right: '100% 0%, 50% 47%, 50% 52%, 100% 100%',
20
20
  left: '0% 0%, 50% 47%, 50% 52%, 0% 100%',
21
21
  };
22
- exports.StyledWrapper = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n width: fit-content;\n text-align: left;\n cursor: pointer;\n width: 100%;\n"], ["\n position: relative;\n width: fit-content;\n text-align: left;\n cursor: pointer;\n width: 100%;\n"])));
22
+ exports.StyledWrapper = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n width: fit-content;\n text-align: left;\n cursor: pointer;\n width: inherit;\n"], ["\n position: relative;\n width: fit-content;\n text-align: left;\n cursor: pointer;\n width: inherit;\n"])));
23
23
  exports.StyledTooltipBox = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: ", ";\n z-index: ", ";\n ", "\n\n padding: 1rem;\n background-color: ", ";\n color: ", ";\n border: 1px solid ", ";\n border-radius: 5px;\n z-index: 50000000;\n ", "\n width: max-content;\n max-width: 20rem;\n word-wrap: break-word;\n"], ["\n display: ", ";\n z-index: ", ";\n ", "\n\n padding: 1rem;\n background-color: ", ";\n color: ", ";\n border: 1px solid ", ";\n border-radius: 5px;\n z-index: 50000000;\n ", "\n width: max-content;\n max-width: 20rem;\n word-wrap: break-word;\n"])), function (props) { return (props.show ? "block" : "none"); }, function (props) { return (props.show ? 5000000 : -5); }, (0, mixins_1.transition)("opacity 0.1s"), function (props) { return (props.invert ? greyColor10 : greyColor100); }, function (props) { return (props.invert ? greyColor100 : white); }, greyColor15, function (_a) {
24
24
  var position = _a.position, fixPos = _a.fixPos;
25
25
  return (0, util_1.positionTooltip)({ position: position, fixPos: fixPos });
@@ -31,6 +31,6 @@ exports.globalLightboxStyle = (0, styled_components_1.css)(templateObject_4 || (
31
31
  }, mixins_1.boxShadow1);
32
32
  exports.globalHoverOnWhiteBG = (0, styled_components_1.css)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n ", ";\n &:hover {\n background-color: ", ";\n }\n"], ["\n ", ";\n &:hover {\n background-color: ", ";\n }\n"])), (0, mixins_1.transition)('background-color'), function (_a) {
33
33
  var invert = _a.invert;
34
- return invert ? themes_1.colors.greyColor80 : themes_1.colors.greyColor5;
34
+ return invert ? themes_1.colors.greyColor70 : themes_1.colors.greyColor5;
35
35
  });
36
36
  var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
@@ -109,7 +109,6 @@ export namespace icons {
109
109
  export { SquareHalf };
110
110
  export { SquareHalfBottom };
111
111
  export { MagicWand };
112
- export { CrownSimple };
113
112
  export { OkeGoogleIcon };
114
113
  export { LetterH };
115
114
  export { IndexIcon };
@@ -281,7 +280,6 @@ import { SlackLogo } from 'phosphor-react';
281
280
  import { SquareHalf } from 'phosphor-react';
282
281
  import { SquareHalfBottom } from 'phosphor-react';
283
282
  import { MagicWand } from 'phosphor-react';
284
- import { CrownSimple } from 'phosphor-react';
285
283
  import { OkeGoogleIcon } from "./custom";
286
284
  import { LetterH } from "./custom";
287
285
  import { IndexIcon } from "./custom";
@@ -114,7 +114,6 @@ exports.icons = {
114
114
  SquareHalf: phosphor_react_1.SquareHalf,
115
115
  SquareHalfBottom: phosphor_react_1.SquareHalfBottom,
116
116
  MagicWand: phosphor_react_1.MagicWand,
117
- CrownSimple: phosphor_react_1.CrownSimple,
118
117
  //custom
119
118
  OkeGoogleIcon: custom_1.OkeGoogleIcon,
120
119
  LetterH: custom_1.LetterH,
@@ -0,0 +1,6 @@
1
+ import { ReactNode } from "react";
2
+ import { DefaultTheme } from "styled-components";
3
+ export interface OKFTheme extends DefaultTheme {
4
+ ENV?: string;
5
+ localize?: (text: ReactNode) => ReactNode;
6
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,167 +1,117 @@
1
1
  /// <reference types="mdx" />
2
- declare namespace _default {
3
- let title: string;
4
- namespace argTypes {
5
- namespace ButtonComp {
6
- let name: string;
7
- let options: string[];
8
- namespace mapping {
9
- let Primary: string;
10
- let Secondary: string;
11
- let Ghost: string;
12
- }
13
- namespace control {
14
- let type: string;
15
- }
16
- let defaultValue: string;
17
- }
18
- namespace buttonSize {
19
- let name_1: string;
20
- export { name_1 as name };
21
- let options_1: string[];
22
- export { options_1 as options };
23
- export namespace mapping_1 {
24
- let Small: string;
25
- let Medium: string;
26
- }
27
- export { mapping_1 as mapping };
28
- export namespace control_1 {
29
- let type_1: string;
30
- export { type_1 as type };
31
- }
32
- export { control_1 as control };
33
- let defaultValue_1: string;
34
- export { defaultValue_1 as defaultValue };
35
- }
36
- namespace icon {
37
- let name_2: string;
38
- export { name_2 as name };
39
- export { availableIcons as options };
40
- export namespace control_2 {
41
- let type_2: string;
42
- export { type_2 as type };
43
- }
44
- export { control_2 as control };
45
- let defaultValue_2: string;
46
- export { defaultValue_2 as defaultValue };
47
- }
48
- namespace iconSize {
49
- let name_3: string;
50
- export { name_3 as name };
51
- let options_2: string[];
52
- export { options_2 as options };
53
- export namespace mapping_2 {
54
- let Small_1: string;
55
- export { Small_1 as Small };
56
- let Medium_1: string;
57
- export { Medium_1 as Medium };
58
- }
59
- export { mapping_2 as mapping };
60
- export namespace control_3 {
61
- let type_3: string;
62
- export { type_3 as type };
63
- }
64
- export { control_3 as control };
65
- let defaultValue_3: string;
66
- export { defaultValue_3 as defaultValue };
67
- }
68
- namespace align {
69
- let name_4: string;
70
- export { name_4 as name };
71
- let options_3: string[];
72
- export { options_3 as options };
73
- export namespace control_4 {
74
- let type_4: string;
75
- export { type_4 as type };
76
- }
77
- export { control_4 as control };
78
- let defaultValue_4: string;
79
- export { defaultValue_4 as defaultValue };
80
- }
81
- namespace optionIcon1 {
82
- let name_5: string;
83
- export { name_5 as name };
84
- export { availableIcons as options };
85
- export namespace control_5 {
86
- let type_5: string;
87
- export { type_5 as type };
88
- }
89
- export { control_5 as control };
90
- let defaultValue_5: string;
91
- export { defaultValue_5 as defaultValue };
92
- }
93
- namespace optionIcon2 {
94
- let name_6: string;
95
- export { name_6 as name };
96
- export { availableIcons as options };
97
- export namespace control_6 {
98
- let type_6: string;
99
- export { type_6 as type };
100
- }
101
- export { control_6 as control };
102
- let defaultValue_6: string;
103
- export { defaultValue_6 as defaultValue };
104
- }
105
- namespace optionIcon3 {
106
- let name_7: string;
107
- export { name_7 as name };
108
- export { availableIcons as options };
109
- export namespace control_7 {
110
- let type_7: string;
111
- export { type_7 as type };
112
- }
113
- export { control_7 as control };
114
- let defaultValue_7: string;
115
- export { defaultValue_7 as defaultValue };
116
- }
117
- namespace action1 {
118
- let name_8: string;
119
- export { name_8 as name };
120
- }
121
- namespace action2 {
122
- let name_9: string;
123
- export { name_9 as name };
124
- }
125
- namespace action3 {
126
- let name_10: string;
127
- export { name_10 as name };
128
- }
129
- }
130
- namespace args {
131
- let ButtonComp_1: string;
132
- export { ButtonComp_1 as ButtonComp };
133
- let buttonSize_1: string;
134
- export { buttonSize_1 as buttonSize };
135
- let icon_1: string;
136
- export { icon_1 as icon };
137
- let iconSize_1: string;
138
- export { iconSize_1 as iconSize };
139
- let action1_1: string;
140
- export { action1_1 as action1 };
141
- let optionIcon1_1: string;
142
- export { optionIcon1_1 as optionIcon1 };
143
- let action2_1: string;
144
- export { action2_1 as action2 };
145
- let optionIcon2_1: string;
146
- export { optionIcon2_1 as optionIcon2 };
147
- let action3_1: string;
148
- export { action3_1 as action3 };
149
- let optionIcon3_1: string;
150
- export { optionIcon3_1 as optionIcon3 };
151
- export let invert: boolean;
152
- let align_1: string;
153
- export { align_1 as align };
154
- export let popOutOfOverflowHiddenParent: boolean;
155
- export let tooltip: boolean;
156
- }
157
- namespace parameters {
158
- namespace docs {
159
- export { ActionMenuDocs as page };
160
- }
161
- }
162
- }
163
- export default _default;
164
- export function ActionMenu(args: any): React.JSX.Element;
165
- declare const availableIcons: string[];
166
- import ActionMenuDocs from './ActionMenu.mdx';
167
2
  import React from "react";
3
+ import ActionMenuDocs from './ActionMenu.mdx';
4
+ declare const _default: {
5
+ title: string;
6
+ argTypes: {
7
+ ButtonComp: {
8
+ name: string;
9
+ options: string[];
10
+ mapping: {
11
+ Primary: string;
12
+ Secondary: string;
13
+ Ghost: string;
14
+ };
15
+ control: {
16
+ type: string;
17
+ };
18
+ defaultValue: string;
19
+ };
20
+ buttonSize: {
21
+ name: string;
22
+ options: string[];
23
+ mapping: {
24
+ Small: string;
25
+ Medium: string;
26
+ };
27
+ control: {
28
+ type: string;
29
+ };
30
+ defaultValue: string;
31
+ };
32
+ icon: {
33
+ name: string;
34
+ options: string[];
35
+ control: {
36
+ type: string;
37
+ };
38
+ defaultValue: string;
39
+ };
40
+ iconSize: {
41
+ name: string;
42
+ options: string[];
43
+ mapping: {
44
+ Small: string;
45
+ Medium: string;
46
+ };
47
+ control: {
48
+ type: string;
49
+ };
50
+ defaultValue: string;
51
+ };
52
+ align: {
53
+ name: string;
54
+ options: string[];
55
+ control: {
56
+ type: string;
57
+ };
58
+ defaultValue: string;
59
+ };
60
+ optionIcon1: {
61
+ name: string;
62
+ options: string[];
63
+ control: {
64
+ type: string;
65
+ };
66
+ defaultValue: string;
67
+ };
68
+ optionIcon2: {
69
+ name: string;
70
+ options: string[];
71
+ control: {
72
+ type: string;
73
+ };
74
+ defaultValue: string;
75
+ };
76
+ optionIcon3: {
77
+ name: string;
78
+ options: string[];
79
+ control: {
80
+ type: string;
81
+ };
82
+ defaultValue: string;
83
+ };
84
+ action1: {
85
+ name: string;
86
+ };
87
+ action2: {
88
+ name: string;
89
+ };
90
+ action3: {
91
+ name: string;
92
+ };
93
+ };
94
+ args: {
95
+ ButtonComp: string;
96
+ buttonSize: string;
97
+ icon: string;
98
+ iconSize: string;
99
+ action1: string;
100
+ optionIcon1: string;
101
+ action2: string;
102
+ optionIcon2: string;
103
+ action3: string;
104
+ optionIcon3: string;
105
+ invert: boolean;
106
+ align: string;
107
+ popOutOfOverflowHiddenParent: boolean;
108
+ tooltip: boolean;
109
+ };
110
+ parameters: {
111
+ docs: {
112
+ page: typeof ActionMenuDocs;
113
+ };
114
+ };
115
+ };
116
+ export default _default;
117
+ export declare const ActionMenu: (args: any) => React.JSX.Element;
@@ -120,15 +120,16 @@ exports.default = {
120
120
  var ActionMenu = function (args) {
121
121
  args.actions = [
122
122
  __assign({ display: args.action1 }, (args.optionIcon1 ? { icon: args.optionIcon1, infoTooltip: args.tooltip && { text: "Tooltip Text" } } : {})),
123
- __assign({ display: args.action2 }, (args.optionIcon2 ? { icon: args.optionIcon2, infoTooltip: args.tooltip && { text: "Tooltip Text" } } : {})),
123
+ __assign({ display: args.action2 }, (args.optionIcon2 ? { icon: args.optionIcon2, disabled: true, infoTooltip: args.tooltip && { text: "Tooltip Text" } } : {})),
124
124
  __assign({ display: args.action3 }, (args.optionIcon3 ? { icon: args.optionIcon3, infoTooltip: args.tooltip && { text: "Tooltip Text" } } : {})),
125
125
  ];
126
126
  args.M = args.buttonSize === 'M';
127
+ console.log({ nfaknjfasfs: args.invert });
127
128
  return (react_1.default.createElement("div", { style: args.popOutOfOverflowHiddenParent
128
129
  ? { border: '2px solid lightgrey', height: '90vh', overflow: 'scroll' }
129
130
  : {} },
130
131
  react_1.default.createElement("div", { style: { height: '1000px' } },
131
- react_1.default.createElement("div", { style: __assign({ padding: '4rem 40rem', background: args.invert ? themes_1.colors.greyColor100 : themes_1.colors.white }, (args.popOutOfOverflowHiddenParent
132
+ react_1.default.createElement("div", { style: __assign({ padding: '10rem 40rem', background: args.invert ? themes_1.colors.greyColor100 : themes_1.colors.white }, (args.popOutOfOverflowHiddenParent
132
133
  ? {
133
134
  background: args.invert ? themes_1.colors.greyColor100 : themes_1.colors.greyColor5,
134
135
  height: '50px',
@@ -136,6 +137,6 @@ var ActionMenu = function (args) {
136
137
  overflow: "hidden"
137
138
  }
138
139
  : {})) },
139
- react_1.default.createElement(ActionMenu_1.ActionMenu, __assign({}, args, { storybookPreview: true }))))));
140
+ react_1.default.createElement(ActionMenu_1.ActionMenu, __assign({ actions: args.actions }, args))))));
140
141
  };
141
142
  exports.ActionMenu = ActionMenu;
@@ -1,7 +1,20 @@
1
- export function DisplayIcon({ icon, size, color, weight }: {
2
- icon: any;
3
- size: any;
4
- color: any;
5
- weight?: string;
6
- }): React.JSX.Element;
7
- import React from 'react';
1
+ import { FunctionComponent } from 'react';
2
+ import { icons } from '../../../icons';
3
+ export interface DisplayIconProps {
4
+ icon: keyof typeof icons;
5
+ size: number;
6
+ color: string;
7
+ weight?: 'bold' | 'regular';
8
+ }
9
+ /**
10
+ * @component Renders an icon component with customizable size, color, and weight.
11
+ *
12
+ * - The props object containing the following properties:
13
+ * @prop {keyof typeof icons} icon: The name of the icon to be rendered.
14
+ * @prop {number} size: The size of the icon in pixels.
15
+ * @prop {string} color: The color of the icon.
16
+ * @prop {'bold' | 'regular'} weight: The weight of the icon font. Defaults to "bold".
17
+ * @return {ReactElement} The rendered icon component.
18
+ */
19
+ declare const DisplayIcon: FunctionComponent<DisplayIconProps>;
20
+ export { DisplayIcon };
@@ -6,8 +6,18 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.DisplayIcon = void 0;
7
7
  var react_1 = __importDefault(require("react"));
8
8
  var icons_1 = require("../../../icons");
9
+ /**
10
+ * @component Renders an icon component with customizable size, color, and weight.
11
+ *
12
+ * - The props object containing the following properties:
13
+ * @prop {keyof typeof icons} icon: The name of the icon to be rendered.
14
+ * @prop {number} size: The size of the icon in pixels.
15
+ * @prop {string} color: The color of the icon.
16
+ * @prop {'bold' | 'regular'} weight: The weight of the icon font. Defaults to "bold".
17
+ * @return {ReactElement} The rendered icon component.
18
+ */
9
19
  var DisplayIcon = function (_a) {
10
- var icon = _a.icon, size = _a.size, color = _a.color, _b = _a.weight, weight = _b === void 0 ? "bold" : _b;
20
+ var icon = _a.icon, size = _a.size, color = _a.color, _b = _a.weight, weight = _b === void 0 ? 'bold' : _b;
11
21
  var IconComp = icons_1.icons[icon];
12
22
  return react_1.default.createElement(react_1.default.Fragment, null, IconComp && react_1.default.createElement(IconComp, { size: size, color: color, weight: weight }));
13
23
  };
@@ -11,8 +11,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.getPrimaryColorText = exports.getPrimaryColor100 = exports.getPrimaryColor40 = exports.getPrimaryColor10 = exports.useLocale = void 0;
13
13
  var react_1 = __importDefault(require("react"));
14
- var styled_components_1 = require("styled-components");
15
14
  var colors_1 = require("../themes/colors");
15
+ var styled_components_1 = require("styled-components");
16
16
  var primaryColor10 = colors_1.colors.primaryColor10, primaryColor40 = colors_1.colors.primaryColor40, primaryColor100 = colors_1.colors.primaryColor100, primaryColorText = colors_1.colors.primaryColorText;
17
17
  /**
18
18
  * Generates a function that localizes a value based on the current theme.
@@ -22,7 +22,6 @@ var primaryColor10 = colors_1.colors.primaryColor10, primaryColor40 = colors_1.c
22
22
  */
23
23
  var useLocale = function () {
24
24
  var currentTheme = (0, styled_components_1.useTheme)();
25
- ;
26
25
  var localize = function (value) {
27
26
  // Check if the value is a React component or a JavaScript object
28
27
  if (react_1.default.isValidElement(value) || typeof value === 'object') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oolib",
3
- "version": "2.129.10",
3
+ "version": "2.131.0",
4
4
  "description": " OKE Component Library",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",