oolib 2.178.4 → 2.179.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.
@@ -30,8 +30,8 @@ exports.default = {
30
30
  weight: true
31
31
  },
32
32
  add: {
33
- variant: {
34
- name: "Variant",
33
+ colorPreset: {
34
+ name: "Color Preset",
35
35
  description: "Select an icon from the available set.",
36
36
  options: [
37
37
  "Postive",
@@ -46,7 +46,7 @@ exports.default = {
46
46
  "In Progress": "inProgress",
47
47
  "Warning": "warning",
48
48
  "Negative": "negative",
49
- "Special": "speical",
49
+ "Special": "special",
50
50
  "Default": "default"
51
51
  },
52
52
  control: { type: "select" },
@@ -33,7 +33,7 @@ var HomeCover = function (_a) {
33
33
  react_1.default.createElement("div", { style: { position: "relative", height: '100%', borderRadius: '1rem', display: 'flex', alignItems: 'center', padding: '1.6rem' } },
34
34
  react_1.default.createElement("div", null,
35
35
  react_1.default.createElement(Typo2_1.UI_DISPLAY_SM, null, title),
36
- react_1.default.createElement(Typo2_1.UI_TITLE, { style: { color: themes_1.colors.grey80, marginTop: "0.8rem" } }, desc)),
36
+ react_1.default.createElement(Typo2_1.UI_BODY_SEMIBOLD_DF, { style: { color: themes_1.colors.grey80, marginTop: "0.8rem" } }, desc)),
37
37
  CTALink && react_1.default.createElement(Buttons_1.ButtonTertiary, { style: { position: "absolute", bottom: "1.6rem", left: "1.6rem" }, iconSize: "S", icon: (CTALink === null || CTALink === void 0 ? void 0 : CTALink.icon) || "ArrowRight", onClick: function () { return navigate((CTALink === null || CTALink === void 0 ? void 0 : CTALink.url) || CTALink); } }, CTALink === null || CTALink === void 0 ? void 0 : CTALink.text))),
38
38
  react_1.default.createElement(ImageSwitcher_1.ImageSwitcher, { images: _CoverImages, theme: theme }));
39
39
  var mobile = react_1.default.createElement(styled_1.StyledMobileHomeCover, { id: "StyledMobileHomeCover", theme: theme, variant: variant },
@@ -7,7 +7,7 @@ export interface TagInterface {
7
7
  icon?: string;
8
8
  onClick?: React.MouseEventHandler<HTMLElement>;
9
9
  weight?: "bold" | "light" | "default";
10
- variant?: "clear" | "link";
10
+ variant?: "clear" | "link" | "default";
11
11
  typo?: any;
12
12
  style?: any;
13
13
  }
@@ -12,11 +12,11 @@ var styled_components_1 = require("styled-components");
12
12
  var themes_1 = require("../../../../themes");
13
13
  var grey40 = themes_1.colors.grey40;
14
14
  var Tag = function (_a) {
15
- var id = _a.id, fill = _a.fill, size = _a.size, display = _a.display, icon = _a.icon, weight = _a.weight, onClick = _a.onClick, variant = _a.variant, typo = _a.typo, style = _a.style;
15
+ var id = _a.id, _b = _a.fill, fill = _b === void 0 ? "solid" : _b, _c = _a.size, size = _c === void 0 ? "S" : _c, display = _a.display, icon = _a.icon, weight = _a.weight, onClick = _a.onClick, variant = _a.variant, typo = _a.typo, style = _a.style;
16
16
  var Icon = icons_1.icons[icon];
17
17
  var theme = (0, styled_components_1.useTheme)();
18
18
  var Typo = typo || styled_2.Styled_UI_CAPTION_DF;
19
- return (react_1.default.createElement(styled_1.StyledTag, { id: id, fill: fill || "solid", size: size || "S", icon: icon, onClick: onClick, variant: variant, colors: theme === null || theme === void 0 ? void 0 : theme.colors, style: style },
19
+ return (react_1.default.createElement(styled_1.StyledTag, { id: id, fill: fill, size: size, icon: icon, onClick: onClick, variant: variant, colors: theme === null || theme === void 0 ? void 0 : theme.colors, style: style },
20
20
  react_1.default.createElement(Typo, { weight: weight },
21
21
  " ",
22
22
  display,
@@ -59,7 +59,7 @@ var commonTagStyles = function (_a) {
59
59
  "\n padding: 0.1rem 0.5rem;\n border-radius: 4px;\n gap: 0.1rem;\n padding-right: ".concat(icon ? "0.4rem" : "0.5rem", ";\n ")
60
60
  : size === "S" ?
61
61
  "\n padding: 0.4rem 1rem;\n border-radius: 1.2rem;\n gap: 0.2rem;\n padding-right: ".concat(icon ? "0.8rem" : "1rem", ";\n\n ")
62
- :
62
+ : // M Not in the design yet, might need in the future
63
63
  " \n padding: 0.1rem 0.5rem;\n border-radius: 4px;\n gap: 0.1rem;\n padding-right: ".concat(icon ? "0.4rem" : "0.5rem", ";\n\n "), "\n\n background-color: ").concat(fill === "solid" ? grey5 : white, ";\n outline: ").concat(fill === "outline" ? "1px solid ".concat(grey10) : "none", ";\n\n");
64
64
  };
65
65
  var variants = function (_a) {
@@ -1,5 +1,5 @@
1
- export function getTagDisplayStyles({ variant }: {
2
- variant: any;
1
+ export function getTagDisplayStyles({ colorPreset }: {
2
+ colorPreset: any;
3
3
  }): {
4
4
  backgroundColor: string;
5
5
  backdropFilter?: undefined;
@@ -4,8 +4,8 @@ exports.getTagDisplayStyles = void 0;
4
4
  var themes_1 = require("../../../../themes");
5
5
  var grey40 = themes_1.colors.grey40, green = themes_1.colors.green, yellow = themes_1.colors.yellow, blue = themes_1.colors.blue, error = themes_1.colors.error, purple = themes_1.colors.purple;
6
6
  var getTagDisplayStyles = function (_a) {
7
- var variant = _a.variant;
8
- switch (variant) {
7
+ var colorPreset = _a.colorPreset;
8
+ switch (colorPreset) {
9
9
  case "positive":
10
10
  return {
11
11
  backgroundColor: green,
@@ -9,6 +9,6 @@ export interface TagDisplayInterface extends Omit<TagInterface, 'variant'> {
9
9
  fill?: string;
10
10
  icon?: string;
11
11
  weight?: "bold" | "light" | "default";
12
- variant: 'positive' | 'inProgress' | 'warning' | 'negative' | 'special' | "default";
12
+ colorPreset: 'positive' | 'inProgress' | 'warning' | 'negative' | 'special' | "default";
13
13
  }
14
14
  export declare const TagDisplay: React.FunctionComponent<TagDisplayInterface>;
@@ -25,7 +25,7 @@ var TagDisplay = function (_a) {
25
25
  var id = _a.id, display = _a.display, size = _a.size,
26
26
  // tagColor,
27
27
  // textColor,
28
- fill = _a.fill, icon = _a.icon, _b = _a.variant, variant = _b === void 0 ? 'default' : _b, weight = _a.weight;
29
- return (react_1.default.createElement(Tag_1.Tag, { weight: weight, id: id, display: display, icon: icon, size: size, fill: fill, style: __assign({ padding: "0.25rem 0.5rem", borderRadius: "4px", color: white }, (0, getTagDisplayStyles_1.getTagDisplayStyles)({ variant: variant })), typo: Typo2_1.UI_TAG_DF }));
28
+ fill = _a.fill, icon = _a.icon, _b = _a.colorPreset, colorPreset = _b === void 0 ? 'default' : _b, weight = _a.weight;
29
+ return (react_1.default.createElement(Tag_1.Tag, { weight: weight, id: id, display: display, icon: icon, size: size, fill: fill, style: __assign({ padding: "0.25rem 0.5rem", borderRadius: "4px", color: white }, (0, getTagDisplayStyles_1.getTagDisplayStyles)({ colorPreset: colorPreset })), typo: Typo2_1.UI_TAG_DF }));
30
30
  };
31
31
  exports.TagDisplay = TagDisplay;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oolib",
3
- "version": "2.178.4",
3
+ "version": "2.179.0",
4
4
  "description": " OKE Component Library",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",