oolib 2.138.0 → 2.139.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.
@@ -68,9 +68,9 @@ var CardContent = function (_a) {
68
68
  showEmbedSection && (react_1.default.createElement(styled_2.StyledEmbedSection, null,
69
69
  !(0, mediaDataExists_1.imageDataExists)(image) && !(0, mediaDataExists_1.videoDataExists)(video) &&
70
70
  react_1.default.createElement(CardPlaceholder_1.CardPlaceholder, null),
71
- (0, mediaDataExists_1.videoDataExists)(video) && (react_1.default.createElement("div", { style: { width: "100%", position: 'relative' } },
71
+ (0, mediaDataExists_1.imageDataExists)(image) && (react_1.default.createElement("div", { style: { width: "100%" } }, react_1.default.createElement(ImageInput_1.ImageInput, { value: image, aspectRatio: "5/3", readOnly: true, defaultImageSpread: "cover", enableCaptions: false, disableImageBorder: true }))),
72
+ (0, mediaDataExists_1.videoDataExists)(video) && !(0, mediaDataExists_1.imageDataExists)(image) ? (react_1.default.createElement("div", { style: { width: "100%", position: 'relative' } },
72
73
  react_1.default.createElement(VideoInput_1.default, { value: video, readOnly: true, light: true }),
73
- react_1.default.createElement("div", { style: { position: 'absolute', top: 0, left: 0, width: '100%', height: '100%' } }))),
74
- (0, mediaDataExists_1.imageDataExists)(image) && !(0, mediaDataExists_1.videoDataExists)(video) ? (react_1.default.createElement("div", { style: { width: "100%" } }, react_1.default.createElement(ImageInput_1.ImageInput, { value: image, aspectRatio: "5/3", readOnly: true, defaultImageSpread: "cover", enableCaptions: false, disableImageBorder: true }))) : null)))));
74
+ react_1.default.createElement("div", { style: { position: 'absolute', top: 0, left: 0, width: '100%', height: '100%' } }))) : null)))));
75
75
  };
76
76
  exports.CardContent = CardContent;
@@ -80,7 +80,7 @@ var CardEmbed = function (_a) {
80
80
  height: "100%",
81
81
  width: "auto",
82
82
  } }))),
83
- (0, mediaDataExists_1.videoDataExists)(video) && (react_1.default.createElement(styled_2.StyledMediaContainer, null,
83
+ (0, mediaDataExists_1.videoDataExists)(video) && !(0, mediaDataExists_1.imageDataExists)(image) ? (react_1.default.createElement(styled_2.StyledMediaContainer, null,
84
84
  react_1.default.createElement("div", { style: {
85
85
  position: "relative",
86
86
  height: "100%",
@@ -93,8 +93,8 @@ var CardEmbed = function (_a) {
93
93
  left: 0,
94
94
  width: "100%",
95
95
  height: "100%",
96
- } })))),
97
- (0, mediaDataExists_1.imageDataExists)(image) > 0 && !(0, mediaDataExists_1.videoDataExists)(video) && (react_1.default.createElement(styled_2.StyledMediaContainer, null,
96
+ } })))) : null,
97
+ (0, mediaDataExists_1.imageDataExists)(image) && (react_1.default.createElement(styled_2.StyledMediaContainer, null,
98
98
  react_1.default.createElement(ImageInput_1.ImageInput, { stretchToFullHeight: true, value: image, aspectRatio: imageAspectRatio, readOnly: true, enableCaptions: false, disableImageBorder: true, defaultImageSpread: "cover" }))))))));
99
99
  };
100
100
  exports.CardEmbed = CardEmbed;
@@ -62,7 +62,7 @@ var ListContent = function (_a) {
62
62
  mediaConfigExists && react_1.default.createElement(react_1.default.Fragment, null,
63
63
  !(0, mediaDataExists_1.imageDataExists)(image) && !(0, mediaDataExists_1.videoDataExists)(video) && (react_1.default.createElement(styled_js_1.StyledMediaMask, null,
64
64
  react_1.default.createElement(CardPlaceholder_1.CardPlaceholder, { style: { height: "100%", width: "auto" } }))),
65
- (0, mediaDataExists_1.videoDataExists)(video) && (react_1.default.createElement(styled_js_1.StyledMediaMask, null,
65
+ (0, mediaDataExists_1.videoDataExists)(video) && !(0, mediaDataExists_1.imageDataExists)(image) ? (react_1.default.createElement(styled_js_1.StyledMediaMask, null,
66
66
  react_1.default.createElement(styled_js_1.StyledVideoWrapper, null,
67
67
  react_1.default.createElement(VideoInput_1.default, { value: video, readOnly: true, light: true, height: "100%" }),
68
68
  react_1.default.createElement("div", { style: {
@@ -71,8 +71,8 @@ var ListContent = function (_a) {
71
71
  left: 0,
72
72
  width: "100%",
73
73
  height: "100%",
74
- } })))),
75
- (0, mediaDataExists_1.imageDataExists)(image) > 0 && !(0, mediaDataExists_1.videoDataExists)(video) && (react_1.default.createElement(styled_js_1.StyledMediaMask, null,
74
+ } })))) : null,
75
+ (0, mediaDataExists_1.imageDataExists)(image) && (react_1.default.createElement(styled_js_1.StyledMediaMask, null,
76
76
  // <div
77
77
  // // style={{
78
78
  // // width: "14rem",
package/dist/index.d.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  export { GlobalStyles } from "./globalStyles";
2
2
  export * from "./themes/mixins";
3
3
  export * from "./components/Typo";
4
- export * from "./v2/components/Typo2";
5
4
  export * from "./globalStyles/globalVariables";
6
5
  export * from "./components/Buttons";
7
6
  export * from "./components/Tags";
@@ -17,8 +16,9 @@ export * from "./components/RadioAndCheckbox";
17
16
  export * from "./components/Margins";
18
17
  export * from "./components/Paddings";
19
18
  export * from "./utils/_EXPORTS";
19
+ export * from "./v2/components/Buttons";
20
+ export * from "./v2/components/Typo2";
20
21
  export { colors } from "./themes";
21
- export { colors as colors2 } from "./v2/themes";
22
22
  export { icons } from "./icons";
23
23
  export { Section } from "./components/Section";
24
24
  export { UserRoleBadge } from "./components/UserRoleBadge";
@@ -70,6 +70,7 @@ export { ModalConfirmAction } from "./components/Modals/derivedComps/ModalConfir
70
70
  export { SimpleTable } from "./components/SimpleTable";
71
71
  export { styledOKELinkCSS } from "./components/OKELink/styled";
72
72
  export { default as TableCellResizerPlugin } from "./components/Lexical/Plugins/TableCellResizer";
73
+ export { colors as colors2 } from "./v2/themes";
73
74
  export { LoaderCircle, ProgressBar, LoaderCircle as Loader, LoaderOverlay } from "./components/LoadersAndProgress";
74
75
  export { BannerAlert, BannerInfo } from "./components/Banners";
75
76
  export { BannerContext, useBannerContext, BannerProvider } from "./components/Banners/bannerContext";
package/dist/index.js CHANGED
@@ -17,8 +17,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
17
17
  return (mod && mod.__esModule) ? mod : { "default": mod };
18
18
  };
19
19
  Object.defineProperty(exports, "__esModule", { value: true });
20
- exports.AudioInput = exports.VideoInput = exports.ProfileImageInput = exports.ImageInput = exports.MetaBlock = exports.HintsProvider = exports.genTagComp = exports.generateOptions = exports.OptionsSingle = exports.DropdownMulti = exports.DropdownSingle = exports.parseCardConfig = exports.ListProfile = exports.CardProfile = exports.CardEmbed = exports.ListContent = exports.CardContent = exports.DateTimeRangePicker = exports.DateTimePicker = exports.TimeRangePicker = exports.TimePicker = exports.DateRangePicker = exports.DatePicker = exports.TextLoader = exports.BarChart = exports.PageScrollIndicator = exports.HomeCover = exports.EmptyStates = exports.ModalSmall = exports.Modal = exports.ModalForms = exports.ModalConfirm = exports.SkeletonLoader = exports.Divider = exports.PercentBarChart = exports.PercentCompletedPie = exports.Accordion = exports.ActionMenu = exports.Tooltip = exports.OKELink = exports.UserRoleBadge = exports.Section = exports.LoaderOverlay = exports.Loader = exports.ProgressBar = exports.LoaderCircle = exports.icons = exports.colors2 = exports.colors = exports.GlobalStyles = void 0;
21
- exports.TableCellResizerPlugin = exports.styledOKELinkCSS = exports.SimpleTable = exports.ModalConfirmAction = exports.BannerProvider = exports.useBannerContext = exports.BannerContext = exports.BannerInfo = exports.BannerAlert = exports.GroupQuestionsInputSingle = exports.ResourceInput = exports.IFrameInput = exports.PDFInput = void 0;
20
+ exports.PDFInput = exports.AudioInput = exports.VideoInput = exports.ProfileImageInput = exports.ImageInput = exports.MetaBlock = exports.HintsProvider = exports.genTagComp = exports.generateOptions = exports.OptionsSingle = exports.DropdownMulti = exports.DropdownSingle = exports.parseCardConfig = exports.ListProfile = exports.CardProfile = exports.CardEmbed = exports.ListContent = exports.CardContent = exports.DateTimeRangePicker = exports.DateTimePicker = exports.TimeRangePicker = exports.TimePicker = exports.DateRangePicker = exports.DatePicker = exports.TextLoader = exports.BarChart = exports.PageScrollIndicator = exports.HomeCover = exports.EmptyStates = exports.ModalSmall = exports.Modal = exports.ModalForms = exports.ModalConfirm = exports.SkeletonLoader = exports.Divider = exports.PercentBarChart = exports.PercentCompletedPie = exports.Accordion = exports.ActionMenu = exports.Tooltip = exports.OKELink = exports.UserRoleBadge = exports.Section = exports.LoaderOverlay = exports.Loader = exports.ProgressBar = exports.LoaderCircle = exports.icons = exports.colors = exports.GlobalStyles = void 0;
21
+ exports.colors2 = exports.TableCellResizerPlugin = exports.styledOKELinkCSS = exports.SimpleTable = exports.ModalConfirmAction = exports.BannerProvider = exports.useBannerContext = exports.BannerContext = exports.BannerInfo = exports.BannerAlert = exports.GroupQuestionsInputSingle = exports.ResourceInput = exports.IFrameInput = void 0;
22
22
  //css and styling related ( styled-components )
23
23
  var globalStyles_1 = require("./globalStyles");
24
24
  Object.defineProperty(exports, "GlobalStyles", { enumerable: true, get: function () { return globalStyles_1.GlobalStyles; } });
@@ -26,12 +26,9 @@ __exportStar(require("./themes/mixins"), exports);
26
26
  //base style guide : i.e colors, icons, typo
27
27
  var themes_1 = require("./themes");
28
28
  Object.defineProperty(exports, "colors", { enumerable: true, get: function () { return themes_1.colors; } });
29
- var themes_2 = require("./v2/themes");
30
- Object.defineProperty(exports, "colors2", { enumerable: true, get: function () { return themes_2.colors; } });
31
29
  var icons_1 = require("./icons");
32
30
  Object.defineProperty(exports, "icons", { enumerable: true, get: function () { return icons_1.icons; } });
33
31
  __exportStar(require("./components/Typo"), exports);
34
- __exportStar(require("./v2/components/Typo2"), exports);
35
32
  __exportStar(require("./globalStyles/globalVariables"), exports);
36
33
  ////components
37
34
  var LoadersAndProgress_1 = require("./components/LoadersAndProgress");
@@ -176,3 +173,8 @@ Object.defineProperty(exports, "styledOKELinkCSS", { enumerable: true, get: func
176
173
  // lexical
177
174
  var TableCellResizer_1 = require("./components/Lexical/Plugins/TableCellResizer");
178
175
  Object.defineProperty(exports, "TableCellResizerPlugin", { enumerable: true, get: function () { return __importDefault(TableCellResizer_1).default; } });
176
+ /////// V2 components /themes
177
+ __exportStar(require("./v2/components/Buttons"), exports);
178
+ __exportStar(require("./v2/components/Typo2"), exports);
179
+ var themes_2 = require("./v2/themes");
180
+ Object.defineProperty(exports, "colors2", { enumerable: true, get: function () { return themes_2.colors; } });
@@ -0,0 +1,185 @@
1
+ /// <reference types="mdx" />
2
+ declare namespace _default {
3
+ let title: string;
4
+ namespace argTypes {
5
+ namespace size {
6
+ let name: string;
7
+ let options: string[];
8
+ namespace mapping {
9
+ let Small: string;
10
+ let Medium: string;
11
+ }
12
+ namespace control {
13
+ let type: string;
14
+ }
15
+ }
16
+ namespace icon {
17
+ let name_1: string;
18
+ export { name_1 as name };
19
+ export { availableIcons as options };
20
+ export namespace control_1 {
21
+ let type_1: string;
22
+ export { type_1 as type };
23
+ }
24
+ export { control_1 as control };
25
+ export let defaultValue: string;
26
+ }
27
+ namespace iconAfter {
28
+ let name_2: string;
29
+ export { name_2 as name };
30
+ export { availableIcons as options };
31
+ export namespace control_2 {
32
+ let type_2: string;
33
+ export { type_2 as type };
34
+ }
35
+ export { control_2 as control };
36
+ }
37
+ namespace iconSize {
38
+ let name_3: string;
39
+ export { name_3 as name };
40
+ let options_1: string[];
41
+ export { options_1 as options };
42
+ export namespace mapping_1 {
43
+ let Small_1: string;
44
+ export { Small_1 as Small };
45
+ let Medium_1: string;
46
+ export { Medium_1 as Medium };
47
+ }
48
+ export { mapping_1 as mapping };
49
+ export namespace control_3 {
50
+ let type_3: string;
51
+ export { type_3 as type };
52
+ }
53
+ export { control_3 as control };
54
+ }
55
+ namespace iconColor {
56
+ let name_4: string;
57
+ export { name_4 as name };
58
+ export { availableColors as options };
59
+ export namespace control_4 {
60
+ let type_4: string;
61
+ export { type_4 as type };
62
+ }
63
+ export { control_4 as control };
64
+ }
65
+ namespace composition {
66
+ let name_5: string;
67
+ export { name_5 as name };
68
+ let options_2: string[];
69
+ export { options_2 as options };
70
+ export namespace control_5 {
71
+ let type_5: string;
72
+ export { type_5 as type };
73
+ }
74
+ export { control_5 as control };
75
+ let defaultValue_1: string;
76
+ export { defaultValue_1 as defaultValue };
77
+ }
78
+ namespace width {
79
+ let name_6: string;
80
+ export { name_6 as name };
81
+ export namespace control_6 {
82
+ let type_6: string;
83
+ export { type_6 as type };
84
+ }
85
+ export { control_6 as control };
86
+ }
87
+ namespace variant {
88
+ let name_7: string;
89
+ export { name_7 as name };
90
+ export namespace control_7 {
91
+ let type_7: string;
92
+ export { type_7 as type };
93
+ }
94
+ export { control_7 as control };
95
+ let options_3: string[];
96
+ export { options_3 as options };
97
+ let defaultValue_2: string;
98
+ export { defaultValue_2 as defaultValue };
99
+ }
100
+ namespace children {
101
+ let name_8: string;
102
+ export { name_8 as name };
103
+ }
104
+ namespace invert {
105
+ let name_9: string;
106
+ export { name_9 as name };
107
+ }
108
+ namespace disabled {
109
+ let name_10: string;
110
+ export { name_10 as name };
111
+ }
112
+ }
113
+ namespace args {
114
+ let size_1: string;
115
+ export { size_1 as size };
116
+ let variant_1: string;
117
+ export { variant_1 as variant };
118
+ let composition_1: string;
119
+ export { composition_1 as composition };
120
+ let children_1: string;
121
+ export { children_1 as children };
122
+ let icon_1: string;
123
+ export { icon_1 as icon };
124
+ let iconAfter_1: any;
125
+ export { iconAfter_1 as iconAfter };
126
+ let iconSize_1: string;
127
+ export { iconSize_1 as iconSize };
128
+ let iconColor_1: any;
129
+ export { iconColor_1 as iconColor };
130
+ let disabled_1: boolean;
131
+ export { disabled_1 as disabled };
132
+ let invert_1: boolean;
133
+ export { invert_1 as invert };
134
+ }
135
+ namespace parameters {
136
+ namespace docs {
137
+ export { ButtonDocs as page };
138
+ }
139
+ }
140
+ }
141
+ export default _default;
142
+ export function Button_Primary(args: any): React.JSX.Element;
143
+ export namespace Button_Primary {
144
+ export namespace parameters_1 {
145
+ namespace controls {
146
+ let exclude: string[];
147
+ }
148
+ }
149
+ export { parameters_1 as parameters };
150
+ }
151
+ export function Button_Secondary(args: any): React.JSX.Element;
152
+ export namespace Button_Secondary {
153
+ export namespace parameters_2 {
154
+ export namespace controls_1 {
155
+ let exclude_1: string[];
156
+ export { exclude_1 as exclude };
157
+ }
158
+ export { controls_1 as controls };
159
+ }
160
+ export { parameters_2 as parameters };
161
+ export namespace args_1 {
162
+ let active: boolean;
163
+ }
164
+ export { args_1 as args };
165
+ }
166
+ export function Button_Ghost(args: any): React.JSX.Element;
167
+ export namespace Button_Ghost {
168
+ export namespace args_2 {
169
+ let active_1: boolean;
170
+ export { active_1 as active };
171
+ }
172
+ export { args_2 as args };
173
+ export namespace parameters_3 {
174
+ export namespace controls_2 {
175
+ let exclude_2: string[];
176
+ export { exclude_2 as exclude };
177
+ }
178
+ export { controls_2 as controls };
179
+ }
180
+ export { parameters_3 as parameters };
181
+ }
182
+ declare const availableIcons: string[];
183
+ declare const availableColors: string[];
184
+ import ButtonDocs from "../../Oolib/components/Buttons.mdx";
185
+ import React from "react";
@@ -0,0 +1,171 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
14
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
15
+ if (ar || !(i in from)) {
16
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
17
+ ar[i] = from[i];
18
+ }
19
+ }
20
+ return to.concat(ar || Array.prototype.slice.call(from));
21
+ };
22
+ var __importDefault = (this && this.__importDefault) || function (mod) {
23
+ return (mod && mod.__esModule) ? mod : { "default": mod };
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.Button_Ghost = exports.Button_Secondary = exports.Button_Primary = void 0;
27
+ var react_1 = __importDefault(require("react"));
28
+ var Buttons_1 = require("../../../v2/components/Buttons");
29
+ var Buttons_mdx_1 = __importDefault(require("../../Oolib/components/Buttons.mdx"));
30
+ var icons_1 = require("../../../icons");
31
+ var themes_1 = require("../../../themes");
32
+ var availableIcons = __spreadArray([undefined], Object.keys(icons_1.icons).sort(), true);
33
+ var availableColors = __spreadArray([undefined], Object.keys(themes_1.colors).sort(), true);
34
+ exports.default = {
35
+ title: "Oolib V 2.0/components/Buttons",
36
+ argTypes: {
37
+ size: {
38
+ name: "Button Size",
39
+ options: ["Small", "Medium"],
40
+ mapping: {
41
+ Small: "S",
42
+ Medium: "M",
43
+ },
44
+ control: { type: "inline-radio" },
45
+ },
46
+ icon: {
47
+ name: "Icon Before",
48
+ options: availableIcons,
49
+ control: { type: "select" },
50
+ defaultValue: "PencilSimple",
51
+ },
52
+ iconAfter: {
53
+ name: "Icon After",
54
+ options: availableIcons,
55
+ control: { type: "select" },
56
+ },
57
+ iconSize: {
58
+ name: "Icon Size",
59
+ options: ["Small", "Medium"],
60
+ mapping: {
61
+ Small: "S",
62
+ Medium: "M",
63
+ },
64
+ control: { type: "inline-radio" },
65
+ },
66
+ iconColor: {
67
+ name: "Icon Color",
68
+ options: availableColors,
69
+ control: { type: "select" },
70
+ },
71
+ composition: {
72
+ name: "Button Compostion",
73
+ options: ["Default", "Text-only", "Icon-only"],
74
+ control: { type: "select" },
75
+ defaultValue: "Default",
76
+ },
77
+ width: {
78
+ name: "Width",
79
+ control: { type: "text" }
80
+ },
81
+ variant: {
82
+ name: "Button Type",
83
+ control: { type: "select" },
84
+ options: ["secondary", "primary", "ghost", "custom"],
85
+ defaultValue: "secondary",
86
+ },
87
+ children: {
88
+ name: "Text",
89
+ },
90
+ invert: {
91
+ name: "Invert",
92
+ },
93
+ disabled: {
94
+ name: "Disabled",
95
+ },
96
+ },
97
+ args: {
98
+ size: "Small",
99
+ variant: "secondary",
100
+ composition: "Default",
101
+ children: "Text",
102
+ icon: "PencilSimple",
103
+ iconAfter: undefined,
104
+ iconSize: "Small",
105
+ iconColor: undefined,
106
+ disabled: false,
107
+ invert: false,
108
+ },
109
+ parameters: {
110
+ docs: {
111
+ page: Buttons_mdx_1.default,
112
+ },
113
+ },
114
+ };
115
+ var GenButtonStory = function (_a) {
116
+ var args = _a.args, Comp = _a.Comp;
117
+ console.log(args.composition);
118
+ args[args["size"]] = true;
119
+ args[args["state"]] = true;
120
+ args.iconColor = themes_1.colors[args.iconColor];
121
+ args["onClick"] = function () { return console.log("clicked"); };
122
+ if (args.composition === "Text-only") {
123
+ delete args.icon;
124
+ delete args.iconAfter;
125
+ }
126
+ if (args.composition === "Icon-only") {
127
+ delete args["children"];
128
+ }
129
+ args["theme"] = {
130
+ colors: {
131
+ primaryColor40: "#addbff",
132
+ primaryColor100: "#33a4ff",
133
+ primaryColor10: "#EBF6FF",
134
+ primaryColorText: "#0071CC",
135
+ },
136
+ };
137
+ return (react_1.default.createElement("div", { style: {
138
+ backgroundColor: args.invert ? "#383838" : "",
139
+ padding: "20px",
140
+ } },
141
+ react_1.default.createElement(Comp, __assign({}, args))));
142
+ };
143
+ var Button_Primary = function (args) { return (react_1.default.createElement(GenButtonStory, { args: args, Comp: Buttons_1.ButtonPrimary })); };
144
+ exports.Button_Primary = Button_Primary;
145
+ exports.Button_Primary.parameters = { controls: { exclude: ["variant", "color"] } };
146
+ var Button_Secondary = function (args) { return (react_1.default.createElement(GenButtonStory, { args: args, Comp: Buttons_1.ButtonSecondary })); };
147
+ exports.Button_Secondary = Button_Secondary;
148
+ exports.Button_Secondary.parameters = { controls: { exclude: ["variant", "color"] } };
149
+ exports.Button_Secondary.args = {
150
+ active: false,
151
+ };
152
+ var Button_Ghost = function (args) { return (react_1.default.createElement(GenButtonStory, { args: args, Comp: Buttons_1.ButtonGhost })); };
153
+ exports.Button_Ghost = Button_Ghost;
154
+ exports.Button_Ghost.args = {
155
+ active: false,
156
+ };
157
+ exports.Button_Ghost.parameters = { controls: { exclude: ["variant"] } };
158
+ // export const Button_Custom = (args) => (
159
+ // <GenButtonStory args={args} Comp={ButtonCustom} />
160
+ // );
161
+ // Button_Custom.parameters = { controls: { exclude: ["variant", "color"] } };
162
+ // export const Google_Login = (args) => (
163
+ // <GenButtonStory args={args} Comp={GoogleLogin} />
164
+ // );
165
+ // Google_Login.parameters = {
166
+ // controls: { exclude: ["variant", "color", "iconOnly", "icon + text"] },
167
+ // };
168
+ // export const Upload_Button = (args) => (
169
+ // <GenButtonStory args={{ ...args, children: "Upload" }} Comp={UploadButton} />
170
+ // );
171
+ // Upload_Button.parameters = { controls: { exclude: ["color"] } };
@@ -0,0 +1,45 @@
1
+ import React from "react";
2
+ export interface DisplayIconProps {
3
+ icon: string;
4
+ size: number;
5
+ color?: string;
6
+ iconWeight?: string;
7
+ }
8
+ export interface ButtonProps {
9
+ id?: string;
10
+ link?: {
11
+ val: string;
12
+ displayText?: string;
13
+ };
14
+ children?: React.ReactNode;
15
+ value?: string;
16
+ submit?: boolean;
17
+ icon?: string;
18
+ iconAfter?: string;
19
+ onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
20
+ onMouseDown?: (e: React.MouseEvent<HTMLButtonElement>) => void;
21
+ active?: boolean;
22
+ disabled?: boolean;
23
+ theme?: string;
24
+ width?: string;
25
+ onMouseEnter?: (e: React.MouseEvent<HTMLButtonElement>) => void;
26
+ onMouseLeave?: (e: React.MouseEvent<HTMLButtonElement>) => void;
27
+ color?: string;
28
+ style?: React.CSSProperties;
29
+ className?: string;
30
+ S?: boolean;
31
+ M?: boolean;
32
+ iconSize?: number | "S" | "M";
33
+ iconColor?: string;
34
+ iconWeight?: string;
35
+ stopPropagation?: boolean;
36
+ preventDefault?: boolean;
37
+ forceHover?: boolean;
38
+ }
39
+ export interface ButtonStyledWrapperProps {
40
+ props: ButtonProps;
41
+ variant?: string;
42
+ }
43
+ export declare const ButtonPrimary: React.FunctionComponent<ButtonProps>;
44
+ export declare const ButtonSecondary: React.FunctionComponent<ButtonProps>;
45
+ export declare const ButtonGhost: React.FunctionComponent<ButtonProps>;
@@ -0,0 +1,80 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ var __importDefault = (this && this.__importDefault) || function (mod) {
14
+ return (mod && mod.__esModule) ? mod : { "default": mod };
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.ButtonGhost = exports.ButtonSecondary = exports.ButtonPrimary = void 0;
18
+ var react_1 = __importDefault(require("react"));
19
+ var styled_1 = require("./styled");
20
+ var react_router_dom_1 = require("react-router-dom");
21
+ var lodash_1 = require("lodash");
22
+ var icons_1 = require("../../../icons");
23
+ var themes_1 = require("../../../themes");
24
+ var DisplayIcon = function (_a) {
25
+ var icon = _a.icon, size = _a.size, color = _a.color, iconWeight = _a.iconWeight;
26
+ var IconComp = icons_1.icons[icon];
27
+ return react_1.default.createElement("div", { style: { minWidth: 'max-content', display: "flex", justifyContent: "center", alignItems: "center" } }, IconComp && react_1.default.createElement(IconComp, { size: size, color: color, weight: iconWeight || 'bold' }));
28
+ };
29
+ var ButtonStyledWrapper = function (_a) {
30
+ var props = _a.props, variant = _a.variant;
31
+ var id = props.id, link = props.link, children = props.children, value = props.value, submit = props.submit, icon = props.icon, iconAfter = props.iconAfter, onClick = props.onClick, onMouseDown = props.onMouseDown, active = props.active, disabled = props.disabled, theme = props.theme, width = props.width, onMouseEnter = props.onMouseEnter, onMouseLeave = props.onMouseLeave, color = props.color, style = props.style, className = props.className, S = props.S, M = props.M, iconSize = props.iconSize, _iconColor = props.iconColor, iconWeight = props.iconWeight, stopPropagation = props.stopPropagation, preventDefault = props.preventDefault, forceHover = props.forceHover;
32
+ var displayText = (link === null || link === void 0 ? void 0 : link.displayText) || children || value;
33
+ var debouncedOnClick = onClick && (0, lodash_1.debounce)(onClick, 200);
34
+ var debouncedMouseDown = onMouseDown && (0, lodash_1.debounce)(onMouseDown, 150);
35
+ var composition = (icon || iconAfter) && displayText
36
+ ? "icon+text"
37
+ : !displayText
38
+ ? "iconOnly"
39
+ : "textOnly";
40
+ var size = ['icon+text', 'textOnly'].indexOf(composition) !== -1
41
+ ? (S && 'S') || 'M'
42
+ : (M && 'M') || 'S';
43
+ var calcIconSize = function () {
44
+ var thisSize = iconSize || size;
45
+ return thisSize === 'S' ? 14 : 20;
46
+ };
47
+ var iconColor = !disabled ? _iconColor : themes_1.colors.greyColor40;
48
+ return (react_1.default.createElement(styled_1.ButtonStyled, { id: id, style: style, className: className, variant: variant, size: size, active: active, disabled: disabled, theme: theme, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, type: submit ? "submit" : "button", onClick: function (e) {
49
+ stopPropagation && e.stopPropagation();
50
+ preventDefault && e.preventDefault();
51
+ debouncedOnClick && debouncedOnClick(e);
52
+ }, onMouseDown: function (e) {
53
+ stopPropagation && e.stopPropagation();
54
+ preventDefault && e.preventDefault();
55
+ debouncedMouseDown && debouncedMouseDown(e);
56
+ }, composition: composition, width: width, color: color, forceHover: forceHover },
57
+ icon && react_1.default.createElement(DisplayIcon, { icon: icon, color: iconColor, size: calcIconSize(), iconWeight: iconWeight || '' }),
58
+ displayText && react_1.default.createElement(styled_1.Styled_UI_BODY_BOLD_SM, { semibold: true }, displayText),
59
+ iconAfter && react_1.default.createElement(DisplayIcon, { icon: iconAfter, color: iconColor, size: calcIconSize(), iconWeight: iconWeight || '' })));
60
+ };
61
+ /**
62
+ * Generates a Button component based on the provided props and variant.
63
+ *
64
+ * @prop { ButtonProps } props - The properties for the Button component
65
+ * @prop { string } variant - The variant of the Button component
66
+ * @return { ReactNode } The Button component to be rendered
67
+ */
68
+ var Button = function (_a) {
69
+ var props = _a.props, variant = _a.variant;
70
+ var link = props.link, onClick = props.onClick;
71
+ var buttonAction = link ? function () { return null; } : onClick;
72
+ return link ? (react_1.default.createElement(react_router_dom_1.Link, { to: link.val },
73
+ react_1.default.createElement(ButtonStyledWrapper, { props: __assign(__assign({}, props), { onClick: buttonAction }), variant: variant }))) : (react_1.default.createElement(ButtonStyledWrapper, { props: __assign(__assign({}, props), { onClick: buttonAction }), variant: variant }));
74
+ };
75
+ var ButtonPrimary = function (props) { return (react_1.default.createElement(Button, { props: props, variant: "primary" })); };
76
+ exports.ButtonPrimary = ButtonPrimary;
77
+ var ButtonSecondary = function (props) { return (react_1.default.createElement(Button, { props: props, variant: "secondary" })); };
78
+ exports.ButtonSecondary = ButtonSecondary;
79
+ var ButtonGhost = function (props) { return (react_1.default.createElement(Button, { props: props, variant: "ghost" })); };
80
+ exports.ButtonGhost = ButtonGhost;
@@ -0,0 +1,29 @@
1
+ /// <reference types="react" />
2
+ export interface HoverStylingProps {
3
+ active?: boolean;
4
+ theme: {
5
+ colors: any;
6
+ };
7
+ }
8
+ export interface ButtonVariantProps {
9
+ disabled?: boolean;
10
+ color?: string;
11
+ forceHover?: boolean;
12
+ theme: {
13
+ colors: string[];
14
+ };
15
+ active?: boolean;
16
+ }
17
+ export interface ButtonGhostProps extends ButtonVariantProps {
18
+ composition?: string;
19
+ }
20
+ export interface ButtonStyledProps {
21
+ size: string;
22
+ width?: string;
23
+ variant: string;
24
+ active?: boolean;
25
+ composition?: string;
26
+ forceHover?: boolean;
27
+ }
28
+ export declare const ButtonStyled: import("styled-components").StyledComponent<"button", any, ButtonStyledProps, never>;
29
+ export declare const Styled_UI_BODY_BOLD_SM: import("styled-components").StyledComponent<import("react").FunctionComponent<import("../Typo2").TypoCompProps>, any, {}, never>;
@@ -0,0 +1,104 @@
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
+ var desc = Object.getOwnPropertyDescriptor(m, k);
9
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
10
+ desc = { enumerable: true, get: function() { return m[k]; } };
11
+ }
12
+ Object.defineProperty(o, k2, desc);
13
+ }) : (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ o[k2] = m[k];
16
+ }));
17
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
18
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
19
+ }) : function(o, v) {
20
+ o["default"] = v;
21
+ });
22
+ var __importStar = (this && this.__importStar) || function (mod) {
23
+ if (mod && mod.__esModule) return mod;
24
+ var result = {};
25
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
26
+ __setModuleDefault(result, mod);
27
+ return result;
28
+ };
29
+ Object.defineProperty(exports, "__esModule", { value: true });
30
+ exports.Styled_UI_BODY_BOLD_SM = exports.ButtonStyled = void 0;
31
+ var styled_components_1 = __importStar(require("styled-components"));
32
+ var colors_1 = require("../../../v2/themes/colors");
33
+ var mixins_1 = require("../../../themes/mixins");
34
+ var utils_1 = require("../../themes/utils");
35
+ var Typo2_1 = require("../Typo2");
36
+ var primaryContainer = colors_1.colors.primaryContainer, onPrimary = colors_1.colors.onPrimary, secondaryContainer = colors_1.colors.secondaryContainer, onSecondary = colors_1.colors.onSecondary, grey80 = colors_1.colors.grey80, grey40 = colors_1.colors.grey40, grey10 = colors_1.colors.grey10;
37
+ //sizes
38
+ var SIZES = {
39
+ S: "3rem",
40
+ M: "3.2rem",
41
+ };
42
+ var hoverBeforeElement = (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n &::before {\n content: '';\n background-color: transparent;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 1;\n ", "\n }\n\n &:hover::before {\n background-color: rgba(0, 0, 0, 0.1);\n }\n"], ["\n &::before {\n content: '';\n background-color: transparent;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 1;\n ", "\n }\n\n &:hover::before {\n background-color: rgba(0, 0, 0, 0.1);\n }\n"])), (0, mixins_1.transition)("background-color"));
43
+ var hoverStylingPrimary = (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), hoverBeforeElement);
44
+ var hoverStylingSecondary = (0, styled_components_1.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), hoverBeforeElement);
45
+ var hoverStylingGhost = (0, styled_components_1.css)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), hoverBeforeElement);
46
+ var ButtonPrimary = (0, styled_components_1.css)(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n background-color: ", ";\n color: ", ";\n\n ", "\n\n ", " \n \n @media (hover: hover) {\n &:hover {\n ", "\n }\n }\n\n\n"], ["\n background-color: ", ";\n color: ", ";\n\n ", "\n\n ", " \n \n @media (hover: hover) {\n &:hover {\n ", "\n }\n }\n\n\n"])), function (_a) {
47
+ var colors = _a.theme.colors;
48
+ return colors ? (0, utils_1.getPrimaryContainer)(colors) : primaryContainer;
49
+ }, function (_a) {
50
+ var colors = _a.theme.colors;
51
+ return colors ? (0, utils_1.getOnPrimary)(colors) : onPrimary;
52
+ }, function (_a) {
53
+ var disabled = _a.disabled;
54
+ return disabled && (0, styled_components_1.css)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n background-color: ", ";\n color: ", ";\n pointer-events: none;\n "], ["\n background-color: ", ";\n color: ", ";\n pointer-events: none;\n "])), grey10, grey40);
55
+ }, function (_a) {
56
+ var forceHover = _a.forceHover;
57
+ return forceHover && hoverStylingPrimary;
58
+ }, hoverStylingPrimary);
59
+ var ButtonSecondary = (0, styled_components_1.css)(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n background-color: ", ";\n color: ", ";\n\n ", "\n\n ", " \n\n @media (hover: hover) {\n &:hover {\n ", "\n }\n }\n"], ["\n background-color: ", ";\n color: ", ";\n\n ", "\n\n ", " \n\n @media (hover: hover) {\n &:hover {\n ", "\n }\n }\n"])), function (_a) {
60
+ var colors = _a.theme.colors;
61
+ return colors ? (0, utils_1.getSecondaryContainer)(colors) : secondaryContainer;
62
+ }, function (_a) {
63
+ var colors = _a.theme.colors;
64
+ return colors ? (0, utils_1.getOnSecondary)(colors) : onSecondary;
65
+ }, function (_a) {
66
+ var disabled = _a.disabled;
67
+ return disabled && (0, styled_components_1.css)(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n background-color: ", ";\n\n color: ", ";\n pointer-events: none;\n "], ["\n background-color: ", ";\n\n color: ", ";\n pointer-events: none;\n "])), grey10, grey40);
68
+ }, function (_a) {
69
+ var forceHover = _a.forceHover;
70
+ return forceHover && hoverStylingSecondary;
71
+ }, hoverStylingSecondary);
72
+ var ButtonGhost = (0, styled_components_1.css)(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n background-color: transparent;\n color: ", ";\n\n ", "\n\n ", " \n \n @media (hover: hover) {\n &:hover {\n ", "\n }\n }\n"], ["\n background-color: transparent;\n color: ", ";\n\n ", "\n\n ", " \n \n @media (hover: hover) {\n &:hover {\n ", "\n }\n }\n"])), grey80, function (_a) {
73
+ var disabled = _a.disabled;
74
+ return disabled && (0, styled_components_1.css)(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n color: ", ";\n pointer-events: none;\n "], ["\n color: ", ";\n pointer-events: none;\n "])), grey80);
75
+ }, function (_a) {
76
+ var forceHover = _a.forceHover;
77
+ return forceHover && hoverStylingGhost;
78
+ }, hoverStylingGhost);
79
+ var buttonVariantSetting = {
80
+ primary: ButtonPrimary,
81
+ secondary: ButtonSecondary,
82
+ ghost: ButtonGhost,
83
+ // custom: ButtonCustom,
84
+ // googleAuth: GoogleButton,
85
+ };
86
+ exports.ButtonStyled = styled_components_1.default.button(templateObject_16 || (templateObject_16 = __makeTemplateObject(["\n ", "\n \n \n white-space: nowrap;\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 0.6rem;\n cursor: pointer;\n border: none;\n border-radius: 6px;\n position: relative;\n overflow: hidden;\n\n ", "\n\n &:disabled {\n cursor: not-allowed;\n }\n\n ", "\n\n ", "\n\n > * {\n position: relative;\n z-index: 2; // important for text color to have same color when overlay hover is \n }\n\n"], ["\n ", "\n \n \n white-space: nowrap;\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 0.6rem;\n cursor: pointer;\n border: none;\n border-radius: 6px;\n position: relative;\n overflow: hidden;\n\n ", "\n\n &:disabled {\n cursor: not-allowed;\n }\n\n ", "\n\n ", "\n\n > * {\n position: relative;\n z-index: 2; // important for text color to have same color when overlay hover is \n }\n\n"])), function (_a) {
87
+ var composition = _a.composition, size = _a.size;
88
+ switch (composition) {
89
+ case "iconOnly":
90
+ return (0, styled_components_1.css)(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n padding: 0;\n height: ", ";\n width: ", ";\n flex-shrink: 0; // if button is a flex item then by default it's width shrinks when the viewport width shrinks\n "], ["\n padding: 0;\n height: ", ";\n width: ", ";\n flex-shrink: 0; // if button is a flex item then by default it's width shrinks when the viewport width shrinks\n "])), SIZES[size], SIZES[size]);
91
+ case "icon+text":
92
+ return (0, styled_components_1.css)(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n padding: 0 1.2rem 0 1rem; \n height: ", ";\n "], ["\n padding: 0 1.2rem 0 1rem; \n height: ", ";\n "])), SIZES[size]);
93
+ default:
94
+ return (0, styled_components_1.css)(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n padding: 0 1.2rem;\n height: ", ";\n "], ["\n padding: 0 1.2rem;\n height: ", ";\n "])), SIZES[size]);
95
+ }
96
+ }, function (_a) {
97
+ var width = _a.width, composition = _a.composition, size = _a.size;
98
+ return width ? (0, styled_components_1.css)(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n width: ", ";\n "], ["\n width: ", ";\n "])), width) : (0, styled_components_1.css)(templateObject_15 || (templateObject_15 = __makeTemplateObject(["\n min-width: ", ";\n max-width: 400px;\n "], ["\n min-width: ", ";\n max-width: 400px;\n "])), composition === "iconOnly" ? SIZES[size] : "60px");
99
+ }, (0, mixins_1.transition)("background-color"), function (_a) {
100
+ var variant = _a.variant;
101
+ return buttonVariantSetting[variant];
102
+ });
103
+ exports.Styled_UI_BODY_BOLD_SM = (0, styled_components_1.default)(Typo2_1.UI_BODY_BOLD_SM)(templateObject_17 || (templateObject_17 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), mixins_1.ellipsis);
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;
@@ -0,0 +1,43 @@
1
+ import { Colors2Type } from "./colors";
2
+ /**
3
+ * Get the primary Container color.
4
+ *
5
+ * @param {ColorsType} colors - Optional colors object
6
+ * @return {string} The primary color text
7
+ */
8
+ export declare const getPrimaryContainer: (colors?: Colors2Type) => string;
9
+ /**
10
+ * Get the secondary Container color.
11
+ *
12
+ * @param {ColorsType} colors - Optional colors object
13
+ * @return {string} The primary color text
14
+ */
15
+ export declare const getSecondaryContainer: (colors?: Colors2Type) => string;
16
+ /**
17
+ * get the tertiary Container color..
18
+ *
19
+ * @param {ColorsType} colors - Optional colors object
20
+ * @return {string} The primary color text
21
+ */
22
+ export declare const getTertiaryContainer: (colors?: Colors2Type) => string;
23
+ /**
24
+ * Get the onPrimary color.
25
+ *
26
+ * @param {ColorsType} colors - Optional colors object
27
+ * @return {string} The primary color text
28
+ */
29
+ export declare const getOnPrimary: (colors?: Colors2Type) => string;
30
+ /**
31
+ * Get the onSecondary color.
32
+ *
33
+ * @param {ColorsType} colors - Optional colors object
34
+ * @return {string} The primary color text
35
+ */
36
+ export declare const getOnSecondary: (colors?: Colors2Type) => string;
37
+ /**
38
+ * Get the onTertiary color.
39
+ *
40
+ * @param {ColorsType} colors - Optional colors object
41
+ * @return {string} The primary color text
42
+ */
43
+ export declare const getOnTertiary: (colors?: Colors2Type) => string;
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getOnTertiary = exports.getOnSecondary = exports.getOnPrimary = exports.getTertiaryContainer = exports.getSecondaryContainer = exports.getPrimaryContainer = void 0;
4
+ var colors_1 = require("./colors");
5
+ var primaryContainer = colors_1.colors.primaryContainer, secondaryContainer = colors_1.colors.secondaryContainer, tertiaryContainer = colors_1.colors.tertiaryContainer, onPrimary = colors_1.colors.onPrimary, onSecondary = colors_1.colors.onSecondary, onTertiary = colors_1.colors.onTertiary;
6
+ /**
7
+ * Get the primary Container color.
8
+ *
9
+ * @param {ColorsType} colors - Optional colors object
10
+ * @return {string} The primary color text
11
+ */
12
+ var getPrimaryContainer = function (colors) {
13
+ return (colors === null || colors === void 0 ? void 0 : colors.primaryContainer) || primaryContainer;
14
+ };
15
+ exports.getPrimaryContainer = getPrimaryContainer;
16
+ /**
17
+ * Get the secondary Container color.
18
+ *
19
+ * @param {ColorsType} colors - Optional colors object
20
+ * @return {string} The primary color text
21
+ */
22
+ var getSecondaryContainer = function (colors) {
23
+ return (colors === null || colors === void 0 ? void 0 : colors.secondaryContainer) || secondaryContainer;
24
+ };
25
+ exports.getSecondaryContainer = getSecondaryContainer;
26
+ /**
27
+ * get the tertiary Container color..
28
+ *
29
+ * @param {ColorsType} colors - Optional colors object
30
+ * @return {string} The primary color text
31
+ */
32
+ var getTertiaryContainer = function (colors) {
33
+ return (colors === null || colors === void 0 ? void 0 : colors.tertiaryContainer) || tertiaryContainer;
34
+ };
35
+ exports.getTertiaryContainer = getTertiaryContainer;
36
+ /**
37
+ * Get the onPrimary color.
38
+ *
39
+ * @param {ColorsType} colors - Optional colors object
40
+ * @return {string} The primary color text
41
+ */
42
+ var getOnPrimary = function (colors) {
43
+ return (colors === null || colors === void 0 ? void 0 : colors.onPrimary) || onPrimary;
44
+ };
45
+ exports.getOnPrimary = getOnPrimary;
46
+ /**
47
+ * Get the onSecondary color.
48
+ *
49
+ * @param {ColorsType} colors - Optional colors object
50
+ * @return {string} The primary color text
51
+ */
52
+ var getOnSecondary = function (colors) {
53
+ return (colors === null || colors === void 0 ? void 0 : colors.onSecondary) || onSecondary;
54
+ };
55
+ exports.getOnSecondary = getOnSecondary;
56
+ /**
57
+ * Get the onTertiary color.
58
+ *
59
+ * @param {ColorsType} colors - Optional colors object
60
+ * @return {string} The primary color text
61
+ */
62
+ var getOnTertiary = function (colors) {
63
+ return (colors === null || colors === void 0 ? void 0 : colors.onTertiary) || onTertiary;
64
+ };
65
+ exports.getOnTertiary = getOnTertiary;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oolib",
3
- "version": "2.138.0",
3
+ "version": "2.139.1",
4
4
  "description": " OKE Component Library",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",