oolib 3.2.0 → 3.3.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.
@@ -2,6 +2,17 @@ export const dropdownOptions: ({
2
2
  display: string;
3
3
  value: string;
4
4
  color: string;
5
+ iconAfter?: undefined;
6
+ iconAfterColor?: undefined;
7
+ desc?: undefined;
8
+ icon?: undefined;
9
+ image?: undefined;
10
+ } | {
11
+ display: string;
12
+ value: string;
13
+ color: string;
14
+ iconAfter: string;
15
+ iconAfterColor: string;
5
16
  desc?: undefined;
6
17
  icon?: undefined;
7
18
  image?: undefined;
@@ -10,6 +21,8 @@ export const dropdownOptions: ({
10
21
  value: string;
11
22
  color: string;
12
23
  desc: string;
24
+ iconAfter?: undefined;
25
+ iconAfterColor?: undefined;
13
26
  icon?: undefined;
14
27
  image?: undefined;
15
28
  } | {
@@ -17,6 +30,8 @@ export const dropdownOptions: ({
17
30
  value: string;
18
31
  color: string;
19
32
  icon: string;
33
+ iconAfter?: undefined;
34
+ iconAfterColor?: undefined;
20
35
  desc?: undefined;
21
36
  image?: undefined;
22
37
  } | {
@@ -24,6 +39,8 @@ export const dropdownOptions: ({
24
39
  value: string;
25
40
  color: string;
26
41
  image: string;
42
+ iconAfter?: undefined;
43
+ iconAfterColor?: undefined;
27
44
  desc?: undefined;
28
45
  icon?: undefined;
29
46
  } | {
@@ -33,14 +50,23 @@ export const dropdownOptions: ({
33
50
  image: string;
34
51
  icon: string;
35
52
  desc: string;
53
+ iconAfter?: undefined;
54
+ iconAfterColor?: undefined;
36
55
  })[];
37
56
  export const dropdownOptionsGroup: {
38
57
  display: string;
39
58
  value: string;
40
- options: {
59
+ options: ({
41
60
  display: string;
42
61
  value: string;
43
62
  color: string;
44
63
  desc: string;
45
- }[];
64
+ iconAfter?: undefined;
65
+ } | {
66
+ display: string;
67
+ value: string;
68
+ desc: string;
69
+ color: string;
70
+ iconAfter: string;
71
+ })[];
46
72
  }[];
@@ -17,6 +17,9 @@ exports.dropdownOptions = [
17
17
  color: themes_1.colors.invertRed,
18
18
  // image: "xyz",
19
19
  // icon: "Trash",
20
+ iconAfter: "WarningDiamond",
21
+ // Per-option colour too; omit it and the icon stays the default grey.
22
+ iconAfterColor: themes_1.colors.red,
20
23
  // desc: "This is a story about schnil-tu, a.k.a tubito senpai. Tubito senpai loves to say bhai-god. Lol.",
21
24
  },
22
25
  {
@@ -1889,7 +1892,10 @@ exports.dropdownOptionsGroup = [
1889
1892
  display: "Mumbai",
1890
1893
  value: "mumbai",
1891
1894
  desc: "Mumbai is India's financial center and largest city with a population of over 20 million people.",
1892
- color: themes_1.colors.lightBlue
1895
+ color: themes_1.colors.lightBlue,
1896
+ // Same per-option marker, but inside a GROUP — covers the ListGroup path,
1897
+ // which is what grouped consumers (e.g. the field-type dropdown) hit.
1898
+ iconAfter: "WarningDiamond"
1893
1899
  }
1894
1900
  ],
1895
1901
  },
@@ -46,6 +46,7 @@ var dropdownOptions = [
46
46
  color: themes_1.colors.invertRed,
47
47
  // image: "xyz",
48
48
  icon: "Trash",
49
+ iconAfter: "WarningDiamond",
49
50
  desc: "This is a story about schnil-tu, a.k.a tubito senpai. Tubito senpai loves to say bhai-god. Lol.",
50
51
  },
51
52
  {
@@ -1,4 +1,4 @@
1
- export function ListItem({ id, option, isSelected, isFocussed, scrollFocussedOpIntoView, onChange: parentOnChange, setSearchString, optionsClassName, S, observerRef, isTagsStyle, isMulti, value, index, alignCheckbox, iconAfter }: {
1
+ export function ListItem({ id, option, isSelected, isFocussed, scrollFocussedOpIntoView, onChange: parentOnChange, setSearchString, optionsClassName, S, observerRef, isTagsStyle, isMulti, value, index, alignCheckbox, iconAfter: allOptionsIconAfter }: {
2
2
  id: any;
3
3
  option: any;
4
4
  isSelected: any;
@@ -62,10 +62,12 @@ var styled_1 = require("./styled");
62
62
  var Tooltip_1 = __importDefault(require("../../Tooltip"));
63
63
  var grey40 = themes_1.colors.grey40, grey80 = themes_1.colors.grey80, grey60 = themes_1.colors.grey60;
64
64
  var ListItem = function (_a) {
65
- var id = _a.id, option = _a.option, isSelected = _a.isSelected, isFocussed = _a.isFocussed, scrollFocussedOpIntoView = _a.scrollFocussedOpIntoView, parentOnChange = _a.onChange, setSearchString = _a.setSearchString, optionsClassName = _a.optionsClassName, S = _a.S, observerRef = _a.observerRef, isTagsStyle = _a.isTagsStyle, isMulti = _a.isMulti, value = _a.value, index = _a.index, _b = _a.alignCheckbox, alignCheckbox = _b === void 0 ? "left" : _b, iconAfter = _a.iconAfter;
65
+ var id = _a.id, option = _a.option, isSelected = _a.isSelected, isFocussed = _a.isFocussed, scrollFocussedOpIntoView = _a.scrollFocussedOpIntoView, parentOnChange = _a.onChange, setSearchString = _a.setSearchString, optionsClassName = _a.optionsClassName, S = _a.S, observerRef = _a.observerRef, isTagsStyle = _a.isTagsStyle, isMulti = _a.isMulti, value = _a.value, index = _a.index, _b = _a.alignCheckbox, alignCheckbox = _b === void 0 ? "left" : _b, allOptionsIconAfter = _a.iconAfter // might not be used anywhere keeping it here just in case
66
+ ;
66
67
  var theme = (0, styled_components_1.useTheme)();
67
68
  var TypoComp = S ? Typo2_1.UI_BODY_SM_DF : Typo2_1.UI_BODY_SM_DF;
68
- var image = option.image, display = option.display, icon = option.icon, desc = option.desc, color = option.color, loading = option.loading, disabled = option.disabled, tooltip = option.tooltip;
69
+ var image = option.image, display = option.display, icon = option.icon, desc = option.desc, color = option.color, loading = option.loading, disabled = option.disabled, tooltip = option.tooltip, optionIconAfter = option.iconAfter, iconAfterColor = option.iconAfterColor;
70
+ var iconAfter = allOptionsIconAfter || optionIconAfter;
69
71
  var handleClick = function () {
70
72
  if (!loading) {
71
73
  parentOnChange(id, option);
@@ -117,7 +119,8 @@ var ListItem = function (_a) {
117
119
  icon: iconAfter,
118
120
  S: S,
119
121
  className: "OKE-Dropdown__optionIcon",
120
- disabled: disabled
122
+ disabled: disabled,
123
+ color: iconAfterColor
121
124
  }))));
122
125
  if (tooltip) {
123
126
  var tooltipProps = typeof tooltip === 'string' ? { text: tooltip } : tooltip;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oolib",
3
- "version": "3.2.0",
3
+ "version": "3.3.0",
4
4
  "description": " OKE Component Library",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",