oolib 1.5.1 → 2.1.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.
File without changes
@@ -33,7 +33,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
33
33
  exports.GoogleLogin = exports.UploadButton = exports.ButtonGhost = exports.ButtonCustom = exports.ButtonSecondary = exports.ButtonPrimary = void 0;
34
34
  var react_1 = __importStar(require("react"));
35
35
  var index_styled_1 = require("./index.styled");
36
- var typo_1 = require("../typo");
36
+ var Typo_1 = require("../Typo");
37
37
  var icons_1 = require("../../icons");
38
38
  var DisplayIcon = function (_a) {
39
39
  var icon = _a.icon, size = _a.size;
@@ -48,13 +48,13 @@ var ButtonStyledWrapper = function (_a) {
48
48
  var composition = icon && displayText ? 'icon+text' : !displayText && 'iconOnly';
49
49
  return (react_1.default.createElement(index_styled_1.ButtonStyled, { id: id, style: style, className: className, variant: variant, size: size, active: active, invert: invert, disabled: disabled, theme: theme, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, type: submit ? 'submit' : 'button', onClick: onClick, composition: composition, width: width, color: color },
50
50
  icon && react_1.default.createElement(DisplayIcon, { icon: icon, size: S ? 15 : 20 }),
51
- displayText && react_1.default.createElement(typo_1.SANS_3, { semibold: true }, displayText)));
51
+ displayText && react_1.default.createElement(Typo_1.SANS_3, { semibold: true }, displayText)));
52
52
  };
53
53
  var Button = function (_a) {
54
54
  var props = _a.props, variant = _a.variant;
55
55
  var link = props.link, onClick = props.onClick;
56
56
  var handleOpenLink = function () {
57
- window.open(link.val);
57
+ window.open(link === null || link === void 0 ? void 0 : link.val);
58
58
  };
59
59
  var buttonAction = onClick || handleOpenLink;
60
60
  return (react_1.default.createElement(ButtonStyledWrapper, { props: __assign(__assign({}, props), { onClick: buttonAction }), variant: variant }));
@@ -79,11 +79,11 @@ var UploadButton = function (props) {
79
79
  };
80
80
  exports.UploadButton = UploadButton;
81
81
  var GoogleLogin = function (props) {
82
- var theme = props.theme, S = props.S, disabled = props.disabled, width = props.width;
83
- var displayText = 'Sign up with Google';
82
+ var theme = props.theme, S = props.S, disabled = props.disabled, width = props.width, className = props.className, style = props.style, value = props.value, children = props.children;
83
+ var displayText = value || children || "Sign up with Google";
84
84
  var size = (S && "S") || 'M';
85
- return (react_1.default.createElement(index_styled_1.ButtonStyled, { size: size, disabled: disabled, width: width, onClick: function () { return window.open('/api/OAuth/google', '_self'); }, variant: "googleAuth", theme: theme },
85
+ return (react_1.default.createElement(index_styled_1.ButtonStyled, { size: size, disabled: disabled, width: width, onClick: function () { return window.open('/api/OAuth/google', '_self'); }, variant: "googleAuth", theme: theme, style: style, className: className },
86
86
  react_1.default.createElement(DisplayIcon, { icon: 'OkeGoogleIcon', size: 24 }),
87
- displayText && react_1.default.createElement(typo_1.SANS_3, { semibold: true }, displayText)));
87
+ displayText && react_1.default.createElement(Typo_1.SANS_3, { semibold: true }, displayText)));
88
88
  };
89
89
  exports.GoogleLogin = GoogleLogin;
File without changes
@@ -16,12 +16,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  exports.Loader = void 0;
18
18
  var react_1 = __importDefault(require("react"));
19
- var typo_1 = require("../typo");
19
+ var Typo_1 = require("../Typo");
20
20
  var colors_1 = require("../../themes/colors");
21
21
  var greyColor100 = colors_1.colors.greyColor100;
22
22
  var index_styled_1 = require("./index.styled");
23
23
  var LoaderDiv = function (props) {
24
- var SuitableTypo = props.L ? typo_1.SANS_5_6 : props.M ? typo_1.SANS_4 : typo_1.SANS_3;
24
+ var SuitableTypo = props.L ? Typo_1.SANS_5_6 : props.M ? Typo_1.SANS_4 : Typo_1.SANS_3;
25
25
  return (!props.children ?
26
26
  react_1.default.createElement(index_styled_1.StyledLoader, __assign({}, props)) :
27
27
  react_1.default.createElement(index_styled_1.StyledLoaderWrapper, __assign({}, props),
@@ -0,0 +1,35 @@
1
+ export function TagDisplay({ display, invert, M, theme, variantSecondary }: {
2
+ display: any;
3
+ invert: any;
4
+ M: any;
5
+ theme: any;
6
+ variantSecondary: any;
7
+ }): JSX.Element;
8
+ export function TagClear({ id, display, value, M, invert, onClick, theme, variantSecondary, variantGhost, grey, }: {
9
+ id: any;
10
+ display: any;
11
+ value: any;
12
+ M: any;
13
+ invert: any;
14
+ onClick?: () => void;
15
+ theme: any;
16
+ variantSecondary: any;
17
+ variantGhost: any;
18
+ grey: any;
19
+ }): JSX.Element;
20
+ export function TagSelect({ onClick, isSelected, display, value, M, theme, }: {
21
+ onClick: any;
22
+ isSelected?: boolean;
23
+ display: any;
24
+ value: any;
25
+ M: any;
26
+ theme: any;
27
+ }): JSX.Element;
28
+ export function TagLink({ display, to, invert, M, theme, variantSecondary }: {
29
+ display: any;
30
+ to: any;
31
+ invert: any;
32
+ M: any;
33
+ theme: any;
34
+ variantSecondary: any;
35
+ }): JSX.Element;
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
11
+ }) : function(o, v) {
12
+ o["default"] = v;
13
+ });
14
+ var __importStar = (this && this.__importStar) || function (mod) {
15
+ if (mod && mod.__esModule) return mod;
16
+ var result = {};
17
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
+ __setModuleDefault(result, mod);
19
+ return result;
20
+ };
21
+ Object.defineProperty(exports, "__esModule", { value: true });
22
+ exports.TagLink = exports.TagSelect = exports.TagClear = exports.TagDisplay = void 0;
23
+ var react_1 = __importStar(require("react"));
24
+ var index_styled_1 = require("./index.styled");
25
+ var Typo_1 = require("../Typo");
26
+ var icons_1 = require("../../icons");
27
+ function TagDisplay(_a) {
28
+ var display = _a.display, invert = _a.invert, M = _a.M, theme = _a.theme, variantSecondary = _a.variantSecondary;
29
+ var size = M ? 'M' : 'S';
30
+ return (react_1.default.createElement(index_styled_1.StyledTagDisplay, { variantSecondary: variantSecondary, invert: invert, theme: theme, size: size },
31
+ react_1.default.createElement(Typo_1.SANS_3, { semibold: true }, display)));
32
+ }
33
+ exports.TagDisplay = TagDisplay;
34
+ function TagClear(_a) {
35
+ var id = _a.id, display = _a.display, value = _a.value, M = _a.M, invert = _a.invert, _b = _a.onClick, onClick = _b === void 0 ? function () { } : _b, theme = _a.theme, variantSecondary = _a.variantSecondary, variantGhost = _a.variantGhost, grey = _a.grey;
36
+ var XIconCom = icons_1.phosphorIcons['X'];
37
+ var size = M ? 'M' : 'S';
38
+ return (react_1.default.createElement(index_styled_1.StyledTagClear, { invert: invert, theme: theme, size: size, grey: grey, variantGhost: variantGhost, variantSecondary: variantSecondary, onClick: function () {
39
+ return !variantSecondary && !variantGhost && onClick(id, { display: display, value: value });
40
+ } },
41
+ react_1.default.createElement(Typo_1.SANS_3, { semibold: true }, display),
42
+ react_1.default.createElement(index_styled_1.StyledIconWrapper, { theme: theme, invert: invert, grey: grey, variantSecondary: variantSecondary, onClick: function () {
43
+ return (variantSecondary || variantGhost) && onClick(id, { display: display, value: value });
44
+ } },
45
+ react_1.default.createElement(XIconCom, { size: '15', weight: 'bold' }))));
46
+ }
47
+ exports.TagClear = TagClear;
48
+ function TagSelect(_a) {
49
+ var onClick = _a.onClick, _b = _a.isSelected, isSelected = _b === void 0 ? false : _b, display = _a.display, value = _a.value, M = _a.M, theme = _a.theme;
50
+ var _c = (0, react_1.useState)(isSelected), selected = _c[0], setSelected = _c[1];
51
+ var handleOnClick = function () {
52
+ setSelected(!selected);
53
+ onClick({ display: display, value: value });
54
+ };
55
+ (0, react_1.useLayoutEffect)(function () {
56
+ if (selected && !isSelected) {
57
+ setSelected(isSelected);
58
+ }
59
+ }, [isSelected]);
60
+ var size = M ? 'M' : 'S';
61
+ return (react_1.default.createElement(index_styled_1.StyledTagSelect, { theme: theme, onClick: handleOnClick, selected: selected, size: size },
62
+ react_1.default.createElement(Typo_1.SANS_3, { semibold: true }, display)));
63
+ }
64
+ exports.TagSelect = TagSelect;
65
+ function TagLink(_a) {
66
+ var display = _a.display, to = _a.to, invert = _a.invert, M = _a.M, theme = _a.theme, variantSecondary = _a.variantSecondary;
67
+ var size = M ? 'M' : 'S';
68
+ return (react_1.default.createElement(index_styled_1.StyledLink, { to: to },
69
+ react_1.default.createElement(index_styled_1.StyledTagLink, { theme: theme, variantSecondary: variantSecondary, invert: invert, size: size },
70
+ react_1.default.createElement(Typo_1.SANS_3, { semibold: true }, display))));
71
+ }
72
+ exports.TagLink = TagLink;
@@ -0,0 +1,6 @@
1
+ export const StyledIconWrapper: any;
2
+ export const StyledLink: any;
3
+ export const StyledTagDisplay: any;
4
+ export const StyledTagClear: any;
5
+ export const StyledTagSelect: any;
6
+ export const StyledTagLink: any;
@@ -0,0 +1,99 @@
1
+ "use strict";
2
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
3
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
4
+ return cooked;
5
+ };
6
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
+ if (k2 === undefined) k2 = k;
8
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.StyledTagLink = exports.StyledTagSelect = exports.StyledTagClear = exports.StyledTagDisplay = exports.StyledLink = exports.StyledIconWrapper = void 0;
27
+ var styled_components_1 = __importStar(require("styled-components"));
28
+ var colors_1 = require("../../themes/colors");
29
+ var react_router_dom_1 = require("react-router-dom");
30
+ var greyColor100 = colors_1.colors.greyColor100, greyColor80 = colors_1.colors.greyColor80, greyColor70 = colors_1.colors.greyColor70, greyColor15 = colors_1.colors.greyColor15, greyColor40 = colors_1.colors.greyColor40, white = colors_1.colors.white, greyColor10 = colors_1.colors.greyColor10;
31
+ var SIZES = {
32
+ S: "3rem",
33
+ M: "4rem",
34
+ };
35
+ var commonStyle = function (_a) {
36
+ var size = _a.size;
37
+ return "\n padding: 0 1rem;\n position: relative;\n display: inline-flex;\n column-gap: 1rem;\n align-items: center;\n border-radius:0.2rem;\n white-space: nowrap;\n\theight: ".concat(SIZES[size], ";\n");
38
+ };
39
+ var StyledTagDisplay = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n ", "\n \n\t", "\n\t", "\n\n"], ["\n ", "\n \n\t", "\n\t", "\n\n"])), function (_a) {
40
+ var size = _a.size;
41
+ return commonStyle({ size: size });
42
+ }, function (_a) {
43
+ var invert = _a.invert;
44
+ return (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\t\tbackground-color: ", ";\n\t\tcolor: ", ";\n\t"], ["\n\t\tbackground-color: ", ";\n\t\tcolor: ", ";\n\t"])), !invert ? greyColor15 : greyColor80, !invert ? greyColor80 : greyColor40);
45
+ }, function (_a) {
46
+ var variantSecondary = _a.variantSecondary, invert = _a.invert;
47
+ return variantSecondary && (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n\t\t\tbackground: none;\n\t\t\tborder: 2px solid ", ";\n\t\t\tcolor: ", ";\n\t\t"], ["\n\t\t\tbackground: none;\n\t\t\tborder: 2px solid ", ";\n\t\t\tcolor: ", ";\n\t\t"])), !invert ? greyColor15 : greyColor80, !invert ? greyColor80 : greyColor15);
48
+ });
49
+ exports.StyledTagDisplay = StyledTagDisplay;
50
+ var StyledTagClear = styled_components_1.default.div(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n ", "\n \n\t", "\n\n\t", "\n\t", "\n"], ["\n ", "\n \n\t", "\n\n\t", "\n\t", "\n"])), function (_a) {
51
+ var size = _a.size;
52
+ return commonStyle({ size: size });
53
+ }, function (_a) {
54
+ var variantSecondary = _a.variantSecondary, variantGhost = _a.variantGhost, invert = _a.invert, grey = _a.grey, colors = _a.theme.colors;
55
+ return !variantSecondary &&
56
+ !variantGhost &&
57
+ (!grey
58
+ ? (0, styled_components_1.css)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n\t\t\t\t\tcursor: pointer;\n\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t\tcolor: ", ";\n\t\t\t "], ["\n\t\t\t\t\tcursor: pointer;\n\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t\tcolor: ", ";\n\t\t\t "])), !invert
59
+ ? colors === null || colors === void 0 ? void 0 : colors.primaryColor100
60
+ : colors === null || colors === void 0 ? void 0 : colors.primaryColor40, !invert ? white : greyColor100) : (0, styled_components_1.css)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n\t\t\t\t\tcursor: pointer;\n\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t\tcolor: ", ";\n\t\t\t "], ["\n\t\t\t\t\tcursor: pointer;\n\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t\tcolor: ", ";\n\t\t\t "])), !invert ? greyColor15 : greyColor80, !invert ? greyColor80 : greyColor40));
61
+ }, function (_a) {
62
+ var variantSecondary = _a.variantSecondary, invert = _a.invert, grey = _a.grey, colors = _a.theme.colors;
63
+ return variantSecondary &&
64
+ (!grey
65
+ ? (0, styled_components_1.css)(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n\t\t\t\t\tbackground: none;\n\t\t\t\t\tborder: 2px solid\n\t\t\t\t\t\t", ";\n\t\t\t\t\tcolor: ", ";\n\t\t\t "], ["\n\t\t\t\t\tbackground: none;\n\t\t\t\t\tborder: 2px solid\n\t\t\t\t\t\t", ";\n\t\t\t\t\tcolor: ", ";\n\t\t\t "])), !invert ? colors === null || colors === void 0 ? void 0 : colors.primaryColor100 : colors === null || colors === void 0 ? void 0 : colors.primaryColor40, !invert ? colors === null || colors === void 0 ? void 0 : colors.primaryColorText : colors === null || colors === void 0 ? void 0 : colors.primaryColor40) : (0, styled_components_1.css)(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n\t\t\t\t\tbackground: none;\n\t\t\t\t\tborder: 2px solid ", ";\n\t\t\t\t\tcolor: ", ";\n\t\t\t "], ["\n\t\t\t\t\tbackground: none;\n\t\t\t\t\tborder: 2px solid ", ";\n\t\t\t\t\tcolor: ", ";\n\t\t\t "])), !invert ? greyColor15 : greyColor80, !invert ? greyColor80 : greyColor15));
66
+ }, function (_a) {
67
+ var variantGhost = _a.variantGhost;
68
+ return variantGhost && (0, styled_components_1.css)(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n\t\t\tbackground: none;\n\t\t"], ["\n\t\t\tbackground: none;\n\t\t"])));
69
+ });
70
+ exports.StyledTagClear = StyledTagClear;
71
+ var StyledTagSelect = styled_components_1.default.div(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n ", "\n\t", "\n"], ["\n ", "\n\t", "\n"])), function (_a) {
72
+ var size = _a.size;
73
+ return commonStyle({ size: size });
74
+ }, function (_a) {
75
+ var selected = _a.selected, colors = _a.theme.colors;
76
+ return "\n border: 2px solid ".concat(colors === null || colors === void 0 ? void 0 : colors.primaryColor100, ";\n cursor: pointer;\n background-color: ").concat(selected ? colors === null || colors === void 0 ? void 0 : colors.primaryColor100 : null, ";\n\t\tcolor: ").concat(!selected ? colors === null || colors === void 0 ? void 0 : colors.primaryColorText : white, "\n ");
77
+ });
78
+ exports.StyledTagSelect = StyledTagSelect;
79
+ var StyledTagLink = styled_components_1.default.div(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n ", "\n\t", "\n\n\t", "\n\t\n"], ["\n ", "\n\t", "\n\n\t", "\n\t\n"])), function (_a) {
80
+ var size = _a.size;
81
+ return commonStyle({ size: size });
82
+ }, function (_a) {
83
+ var variantSecondary = _a.variantSecondary, invert = _a.invert, colors = _a.theme.colors;
84
+ return !variantSecondary && (0, styled_components_1.css)(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n\t\t\tbackground-color: ", ";\n\t\t\tcolor: ", ";\n\t\t"], ["\n\t\t\tbackground-color: ", ";\n\t\t\tcolor: ", ";\n\t\t"])), !invert
85
+ ? colors === null || colors === void 0 ? void 0 : colors.primaryColor100
86
+ : colors === null || colors === void 0 ? void 0 : colors.primaryColor40, !invert ? white : greyColor100);
87
+ }, function (_a) {
88
+ var variantSecondary = _a.variantSecondary, invert = _a.invert, colors = _a.theme.colors;
89
+ return variantSecondary && (0, styled_components_1.css)(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n\t\t\tbackground: none;\n\t\t\tborder: 2px solid\n\t\t\t\t", ";\n\t\t\tcolor: ", ";\n\t\t"], ["\n\t\t\tbackground: none;\n\t\t\tborder: 2px solid\n\t\t\t\t", ";\n\t\t\tcolor: ", ";\n\t\t"])), !invert ? colors === null || colors === void 0 ? void 0 : colors.primaryColor100 : colors === null || colors === void 0 ? void 0 : colors.primaryColor40, !invert ? colors === null || colors === void 0 ? void 0 : colors.primaryColorText : colors === null || colors === void 0 ? void 0 : colors.primaryColor40);
90
+ });
91
+ exports.StyledTagLink = StyledTagLink;
92
+ var StyledIconWrapper = styled_components_1.default.div(templateObject_15 || (templateObject_15 = __makeTemplateObject(["\n display: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tcursor: pointer;\n\n\t", "\n"], ["\n display: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tcursor: pointer;\n\n\t", "\n"])), function (_a) {
93
+ var invert = _a.invert, grey = _a.grey;
94
+ return grey && (0, styled_components_1.css)(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n\t\t\tcolor: ", ";\n\t\t"], ["\n\t\t\tcolor: ", ";\n\t\t"])), !invert ? greyColor100 : white);
95
+ });
96
+ exports.StyledIconWrapper = StyledIconWrapper;
97
+ var StyledLink = (0, styled_components_1.default)(react_router_dom_1.NavLink)(templateObject_16 || (templateObject_16 = __makeTemplateObject(["\n text-decoration: none;\n"], ["\n text-decoration: none;\n"])));
98
+ exports.StyledLink = StyledLink;
99
+ 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;
File without changes
File without changes
File without changes
File without changes
@@ -8,5 +8,5 @@ exports.GlobalStyles = void 0;
8
8
  var styled_components_1 = require("styled-components");
9
9
  var themes_1 = require("../themes");
10
10
  require("../assets/fonts/style.css");
11
- exports.GlobalStyles = (0, styled_components_1.createGlobalStyle)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\n\nhtml{\n font-size:10px;\n color: ", ";\n}\n\nh1, h2, h3, h4, h5, h6,\n.h1, .h2, .h3, .h4, .h5, .h6, .p,\np, ul, li, input, label, button {\n font-family: 'noto_sans', 'noto_sans_devanagari', 'noto_sans_gu', 'noto_sans_te', 'noto_sans_kn', 'noto_sans_or', sans-serif ;\n font-weight: normal;\n font-style: normal;\n margin: 0;\n padding: 0;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n\n\n\n .bold{\n font-weight:bold;\n }\n\n .italic{\n font-style: italic;\n }\n\n \n"], ["\n\n\nhtml{\n font-size:10px;\n color: ", ";\n}\n\nh1, h2, h3, h4, h5, h6,\n.h1, .h2, .h3, .h4, .h5, .h6, .p,\np, ul, li, input, label, button {\n font-family: 'noto_sans', 'noto_sans_devanagari', 'noto_sans_gu', 'noto_sans_te', 'noto_sans_kn', 'noto_sans_or', sans-serif ;\n font-weight: normal;\n font-style: normal;\n margin: 0;\n padding: 0;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n\n\n\n .bold{\n font-weight:bold;\n }\n\n .italic{\n font-style: italic;\n }\n\n \n"])), themes_1.colors.greyColor100);
11
+ exports.GlobalStyles = (0, styled_components_1.createGlobalStyle)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\n\nhtml{\n font-size:10px;\n color: ", ";\n}\n\nh1, h2, h3, h4, h5, h6,\n.h1, .h2, .h3, .h4, .h5, .h6, .p,\np, ul, li, input, label, button {\n font-family: 'noto_sans', 'noto_sans_devanagari', 'noto_sans_gu', 'noto_sans_te', 'noto_sans_kn', 'noto_sans_or', sans-serif ;\n font-weight: normal;\n font-style: normal;\n margin: 0;\n padding: 0;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\nul, ol { padding-left: 2rem;}\n\n\n\n\n .bold{\n font-weight:bold;\n }\n\n .italic{\n font-style: italic;\n }\n\n \n"], ["\n\n\nhtml{\n font-size:10px;\n color: ", ";\n}\n\nh1, h2, h3, h4, h5, h6,\n.h1, .h2, .h3, .h4, .h5, .h6, .p,\np, ul, li, input, label, button {\n font-family: 'noto_sans', 'noto_sans_devanagari', 'noto_sans_gu', 'noto_sans_te', 'noto_sans_kn', 'noto_sans_or', sans-serif ;\n font-weight: normal;\n font-style: normal;\n margin: 0;\n padding: 0;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\nul, ol { padding-left: 2rem;}\n\n\n\n\n .bold{\n font-weight:bold;\n }\n\n .italic{\n font-style: italic;\n }\n\n \n"])), themes_1.colors.greyColor100);
12
12
  var templateObject_1;
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export { GlobalStyles } from "./globalStyles";
2
- export * from "./components/typo";
3
- export * from "./components/loader";
4
- export * from "./components/buttons";
5
- export * from "./components/tags";
2
+ export * from "./components/Typo";
3
+ export * from "./components/Loader";
4
+ export * from "./components/Buttons";
5
+ export * from "./components/Tags";
6
6
  export { colors } from "./themes";
package/dist/index.js CHANGED
@@ -13,9 +13,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
13
13
  exports.colors = exports.GlobalStyles = void 0;
14
14
  var globalStyles_1 = require("./globalStyles");
15
15
  Object.defineProperty(exports, "GlobalStyles", { enumerable: true, get: function () { return globalStyles_1.GlobalStyles; } });
16
- __exportStar(require("./components/typo"), exports);
17
- __exportStar(require("./components/loader"), exports);
16
+ __exportStar(require("./components/Typo"), exports);
17
+ __exportStar(require("./components/Loader"), exports);
18
18
  var themes_1 = require("./themes");
19
19
  Object.defineProperty(exports, "colors", { enumerable: true, get: function () { return themes_1.colors; } });
20
- __exportStar(require("./components/buttons"), exports);
21
- __exportStar(require("./components/tags"), exports);
20
+ __exportStar(require("./components/Buttons"), exports);
21
+ __exportStar(require("./components/Tags"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oolib",
3
- "version": "1.5.1",
3
+ "version": "2.1.1",
4
4
  "description": " OKE Component Library",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -64,12 +64,12 @@
64
64
  "access": "public"
65
65
  },
66
66
  "dependencies": {
67
- "modularscale-js": "^3.0.1",
68
- "phosphor-react": "^1.3.1",
69
67
  "babel-polyfill": "^6.26.0",
70
68
  "draft-js": "^0.11.7",
71
69
  "draftjs-conductor": "^2.2.0",
72
70
  "immutable": "^3.7.6",
71
+ "modularscale-js": "^3.0.1",
72
+ "phosphor-react": "^1.3.1",
73
73
  "react-router-dom": "^6.1.1"
74
74
  }
75
75
  }
@@ -1,60 +0,0 @@
1
- export function TagPrimary({ data, invert, onRemove, id, small, readOnly, theme, }: {
2
- data: any;
3
- invert: any;
4
- onRemove?: () => void;
5
- id: any;
6
- small: any;
7
- readOnly: any;
8
- theme: any;
9
- }): JSX.Element;
10
- export function TagSecondary({ data, invert, onRemove, id, small, readOnly, theme, }: {
11
- data: any;
12
- invert: any;
13
- onRemove?: () => void;
14
- id: any;
15
- small: any;
16
- readOnly: any;
17
- theme: any;
18
- }): JSX.Element;
19
- export function TagOutlinePrimary({ data, invert, onRemove, id, small, readOnly, theme, }: {
20
- data: any;
21
- invert: any;
22
- onRemove?: () => void;
23
- id: any;
24
- small: any;
25
- readOnly: any;
26
- theme: any;
27
- }): JSX.Element;
28
- export function TagOutlineSecondary({ data, invert, onRemove, id, small, readOnly, theme, }: {
29
- data: any;
30
- invert: any;
31
- onRemove?: () => void;
32
- id: any;
33
- small: any;
34
- readOnly: any;
35
- theme: any;
36
- }): JSX.Element;
37
- export function TagClear({ onRemove, id, data, small, theme }: {
38
- onRemove?: () => void;
39
- id: any;
40
- data: any;
41
- small: any;
42
- theme: any;
43
- }): JSX.Element;
44
- export function TagSelect({ id, data, onSelect, handleSelectedOptionTag, selectedOptionTags, paramId, small, theme, }: {
45
- id: any;
46
- data: any;
47
- onSelect?: () => void;
48
- handleSelectedOptionTag?: () => void;
49
- selectedOptionTags?: any[];
50
- paramId: any;
51
- small: any;
52
- theme: any;
53
- }): JSX.Element;
54
- export function TagLink({ data, to, invert, small, theme }: {
55
- data: any;
56
- to: any;
57
- invert: any;
58
- small: any;
59
- theme: any;
60
- }): JSX.Element;
@@ -1,99 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
- Object.defineProperty(o, "default", { enumerable: true, value: v });
11
- }) : function(o, v) {
12
- o["default"] = v;
13
- });
14
- var __importStar = (this && this.__importStar) || function (mod) {
15
- if (mod && mod.__esModule) return mod;
16
- var result = {};
17
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
- __setModuleDefault(result, mod);
19
- return result;
20
- };
21
- Object.defineProperty(exports, "__esModule", { value: true });
22
- exports.TagLink = exports.TagSelect = exports.TagClear = exports.TagOutlineSecondary = exports.TagOutlinePrimary = exports.TagSecondary = exports.TagPrimary = void 0;
23
- var react_1 = __importStar(require("react"));
24
- var colors_1 = require("../../themes/colors");
25
- var index_styled_1 = require("./index.styled");
26
- var typo_1 = require("../typo");
27
- var icons_1 = require("../../icons");
28
- var greyColor80 = colors_1.colors.greyColor80, greyColor100 = colors_1.colors.greyColor100, primaryColor40 = colors_1.colors.primaryColor40, greyColor15 = colors_1.colors.greyColor15, white = colors_1.colors.white, greyColor40 = colors_1.colors.greyColor40, primaryColor100 = colors_1.colors.primaryColor100;
29
- function TagPrimary(_a) {
30
- var data = _a.data, invert = _a.invert, _b = _a.onRemove, onRemove = _b === void 0 ? function () { } : _b, id = _a.id, small = _a.small, readOnly = _a.readOnly, theme = _a.theme;
31
- var IconComp = icons_1.phosphorIcons['X'];
32
- return (react_1.default.createElement(index_styled_1.StyledTag, { theme: theme, variantPrimary: true, invert: invert, small: small, readOnly: readOnly, onClick: function () { return !readOnly && onRemove(id, data); } },
33
- react_1.default.createElement(typo_1.SANS_3, { color: !invert ? white : greyColor100, semibold: true }, data.display),
34
- !readOnly && (react_1.default.createElement(index_styled_1.StyledIconWrapper, null,
35
- react_1.default.createElement(IconComp, { size: '15', weight: 'bold', color: !invert ? white : greyColor100 })))));
36
- }
37
- exports.TagPrimary = TagPrimary;
38
- function TagSecondary(_a) {
39
- var data = _a.data, invert = _a.invert, _b = _a.onRemove, onRemove = _b === void 0 ? function () { } : _b, id = _a.id, small = _a.small, readOnly = _a.readOnly, theme = _a.theme;
40
- var IconComp = icons_1.phosphorIcons['X'];
41
- return (react_1.default.createElement(index_styled_1.StyledTag, { variantSecondary: true, invert: invert, small: small, theme: theme, readOnly: readOnly },
42
- react_1.default.createElement(typo_1.SANS_3, { color: !invert ? greyColor80 : greyColor40, semibold: true }, data.display),
43
- !readOnly && (react_1.default.createElement(index_styled_1.StyledIconWrapper, { onClick: function () { return onRemove(id, data); } },
44
- react_1.default.createElement(IconComp, { size: '15', weight: 'bold', color: !invert ? greyColor100 : white })))));
45
- }
46
- exports.TagSecondary = TagSecondary;
47
- function TagOutlinePrimary(_a) {
48
- var data = _a.data, invert = _a.invert, _b = _a.onRemove, onRemove = _b === void 0 ? function () { } : _b, id = _a.id, small = _a.small, readOnly = _a.readOnly, theme = _a.theme;
49
- var IconComp = icons_1.phosphorIcons['X'];
50
- return (react_1.default.createElement(index_styled_1.StyledTag, { theme: theme, variantOutinePrimary: true, invert: invert, small: small, readOnly: readOnly, onClick: function () { return !readOnly && onRemove(id, data); } },
51
- react_1.default.createElement(typo_1.SANS_3, { color: !invert ? primaryColor100 : primaryColor40, semibold: true }, data.display),
52
- !readOnly && (react_1.default.createElement(index_styled_1.StyledIconWrapper, null,
53
- react_1.default.createElement(IconComp, { size: '15', weight: 'bold', color: !invert ? primaryColor100 : primaryColor40 })))));
54
- }
55
- exports.TagOutlinePrimary = TagOutlinePrimary;
56
- function TagOutlineSecondary(_a) {
57
- var data = _a.data, invert = _a.invert, _b = _a.onRemove, onRemove = _b === void 0 ? function () { } : _b, id = _a.id, small = _a.small, readOnly = _a.readOnly, theme = _a.theme;
58
- var IconComp = icons_1.phosphorIcons['X'];
59
- return (react_1.default.createElement(index_styled_1.StyledTag, { theme: theme, variantOutineSecondary: true, invert: invert, small: small, readOnly: readOnly },
60
- react_1.default.createElement(typo_1.SANS_3, { color: !invert ? greyColor80 : greyColor15, semibold: true }, data.display),
61
- !readOnly && (react_1.default.createElement(index_styled_1.StyledIconWrapper, { onClick: function () { return onRemove(id, data); } },
62
- react_1.default.createElement(IconComp, { size: '15', weight: 'bold', color: !invert ? greyColor100 : white })))));
63
- }
64
- exports.TagOutlineSecondary = TagOutlineSecondary;
65
- function TagClear(_a) {
66
- var _b = _a.onRemove, onRemove = _b === void 0 ? function () { } : _b, id = _a.id, data = _a.data, small = _a.small, theme = _a.theme;
67
- var IconComp = icons_1.phosphorIcons['X'];
68
- return (react_1.default.createElement(index_styled_1.StyledTag, { small: small, theme: theme },
69
- react_1.default.createElement(typo_1.SANS_3, null, data.display),
70
- react_1.default.createElement(index_styled_1.StyledIconWrapper, { onClick: function () { return onRemove(id, data); } },
71
- react_1.default.createElement(IconComp, { size: '15', weight: 'bold' }))));
72
- }
73
- exports.TagClear = TagClear;
74
- function TagSelect(_a) {
75
- var id = _a.id, data = _a.data, _b = _a.onSelect, onSelect = _b === void 0 ? function () { } : _b, _c = _a.handleSelectedOptionTag, handleSelectedOptionTag = _c === void 0 ? function () { } : _c, _d = _a.selectedOptionTags, selectedOptionTags = _d === void 0 ? [] : _d, paramId = _a.paramId, small = _a.small, theme = _a.theme;
76
- var _e = (0, react_1.useState)(selectedOptionTags.some(function (el) { return el === data.value; })), selected = _e[0], setSelected = _e[1];
77
- var handleSelection = function () {
78
- if (!selected) {
79
- setSelected(true);
80
- onSelect(id, [data]);
81
- handleSelectedOptionTag({ paramId: paramId, value: data.value, add: true });
82
- }
83
- else {
84
- setSelected(false);
85
- onSelect(id, []);
86
- handleSelectedOptionTag({ paramId: paramId, value: data.value, remove: true });
87
- }
88
- };
89
- return (react_1.default.createElement(index_styled_1.StyledTag, { theme: theme, onClick: handleSelection, variantSelect: true, selected: selected, small: small },
90
- react_1.default.createElement(typo_1.SANS_3, { semibold: true, color: selected ? greyColor100 : greyColor80 }, data.display)));
91
- }
92
- exports.TagSelect = TagSelect;
93
- function TagLink(_a) {
94
- var data = _a.data, to = _a.to, invert = _a.invert, small = _a.small, theme = _a.theme;
95
- return (react_1.default.createElement(index_styled_1.StyledLink, { to: to },
96
- react_1.default.createElement(index_styled_1.StyledTag, { theme: theme, variantLink: true, invert: invert, small: small },
97
- react_1.default.createElement(typo_1.SANS_3, { color: !invert ? white : greyColor40, semibold: true }, data.display))));
98
- }
99
- exports.TagLink = TagLink;
@@ -1,3 +0,0 @@
1
- export const StyledTag: any;
2
- export const StyledIconWrapper: any;
3
- export const StyledLink: any;
@@ -1,82 +0,0 @@
1
- "use strict";
2
- var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
3
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
4
- return cooked;
5
- };
6
- var __importDefault = (this && this.__importDefault) || function (mod) {
7
- return (mod && mod.__esModule) ? mod : { "default": mod };
8
- };
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.StyledLink = exports.StyledIconWrapper = exports.StyledTag = void 0;
11
- var styled_components_1 = __importDefault(require("styled-components"));
12
- var colors_1 = require("../../themes/colors");
13
- var react_router_dom_1 = require("react-router-dom");
14
- var greyColor100 = colors_1.colors.greyColor100, greyColor80 = colors_1.colors.greyColor80, greyColor70 = colors_1.colors.greyColor70, greyColor15 = colors_1.colors.greyColor15, greyColor40 = colors_1.colors.greyColor40, white = colors_1.colors.white, greyColor10 = colors_1.colors.greyColor10;
15
- var TagModifiers = {
16
- small: function () { return "\n\t height: 3rem;\n\t"; },
17
- variantSelect: function (_a) {
18
- var selected = _a.selected, colors = _a.theme.colors;
19
- return "\n border: 2px solid ".concat(!selected ? greyColor10 : colors.primaryColor40, ";\n cursor: pointer;\n background-color: ").concat(selected ? colors.primaryColor40 : null, "\n ");
20
- },
21
- variantDisplay: function (_a) {
22
- var invert = _a.invert, colors = _a.theme.colors;
23
- return "\n\t border: 2px solid ".concat(!invert ? greyColor10 : greyColor80, ";\n\t\tbackground-color: inherit;\n\t");
24
- },
25
- variantLink: function (_a) {
26
- var invert = _a.invert, colors = _a.theme.colors;
27
- return "\n\t background-color: ".concat(!invert ? colors.primaryColor100 : greyColor80, ";\n\t");
28
- },
29
- variantPrimary: function (_a) {
30
- var invert = _a.invert, colors = _a.theme.colors;
31
- return "\n\t background-color: ".concat(!invert ? colors.primaryColor100 : colors.primaryColor40, ";\n\t cursor: pointer;\n\t");
32
- },
33
- variantSecondary: function (_a) {
34
- var invert = _a.invert, colors = _a.theme.colors;
35
- return "\n\t background-color: ".concat(!invert ? greyColor15 : greyColor80, ";\n\t");
36
- },
37
- variantOutinePrimary: function (_a) {
38
- var invert = _a.invert, colors = _a.theme.colors;
39
- return "\n\tborder: 2px solid ".concat(!invert ? colors.primaryColor100 : colors.primaryColor40, ";\n\tcursor: pointer;\n\t");
40
- },
41
- variantOutineSecondary: function (_a) {
42
- var invert = _a.invert, colors = _a.theme.colors;
43
- return "\n\tborder: 2px solid ".concat(!invert ? greyColor15 : greyColor80, ";\n\t");
44
- },
45
- };
46
- var StyledTag = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\tpadding: 0 1rem;\n\tposition: relative;\n display: inline-flex;\n column-gap: 1rem;\n align-items: center;\n border-radius:0.2rem;\n\twhite-space: nowrap;\n height:4rem;\n \n\t", "\n\t", "\n\t", "\n\t", "\n\t", "\n\t", "\n\t", "\n\t", "\n\t", "\n"], ["\n\tpadding: 0 1rem;\n\tposition: relative;\n display: inline-flex;\n column-gap: 1rem;\n align-items: center;\n border-radius:0.2rem;\n\twhite-space: nowrap;\n height:4rem;\n \n\t", "\n\t", "\n\t", "\n\t", "\n\t", "\n\t", "\n\t", "\n\t", "\n\t", "\n"])), function (_a) {
47
- var small = _a.small;
48
- return small && TagModifiers['small']();
49
- }, function (_a) {
50
- var variantSelect = _a.variantSelect, selected = _a.selected, theme = _a.theme;
51
- return variantSelect && TagModifiers['variantSelect']({ selected: selected, theme: theme });
52
- }, function (_a) {
53
- var variantDisplay = _a.variantDisplay, invert = _a.invert, theme = _a.theme;
54
- return variantDisplay && TagModifiers['variantDisplay']({ invert: invert, theme: theme });
55
- }, function (_a) {
56
- var variantLink = _a.variantLink, invert = _a.invert, theme = _a.theme;
57
- return variantLink && TagModifiers['variantLink']({ invert: invert, theme: theme });
58
- }, function (_a) {
59
- var variantPrimary = _a.variantPrimary, invert = _a.invert, theme = _a.theme;
60
- return variantPrimary && TagModifiers['variantPrimary']({ invert: invert, theme: theme });
61
- }, function (_a) {
62
- var variantSecondary = _a.variantSecondary, invert = _a.invert, theme = _a.theme;
63
- return variantSecondary && TagModifiers['variantSecondary']({ invert: invert, theme: theme });
64
- }, function (_a) {
65
- var variantOutinePrimary = _a.variantOutinePrimary, invert = _a.invert, theme = _a.theme;
66
- return variantOutinePrimary &&
67
- TagModifiers['variantOutinePrimary']({ invert: invert, theme: theme });
68
- }, function (_a) {
69
- var variantOutineSecondary = _a.variantOutineSecondary, invert = _a.invert, theme = _a.theme;
70
- return variantOutineSecondary &&
71
- TagModifiers['variantOutineSecondary']({ invert: invert, theme: theme });
72
- }, function (_a) {
73
- var readOnly = _a.readOnly;
74
- return readOnly &&
75
- "\n\t cursor: auto;\n\t";
76
- });
77
- exports.StyledTag = StyledTag;
78
- var StyledIconWrapper = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tcursor: pointer;\n"], ["\n display: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tcursor: pointer;\n"])));
79
- exports.StyledIconWrapper = StyledIconWrapper;
80
- var StyledLink = (0, styled_components_1.default)(react_router_dom_1.NavLink)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n text-decoration: none;\n"], ["\n text-decoration: none;\n"])));
81
- exports.StyledLink = StyledLink;
82
- var templateObject_1, templateObject_2, templateObject_3;