oolib 2.198.5 → 2.199.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/dist/index.d.ts +1 -0
  2. package/dist/index.js +3 -1
  3. package/dist/stories/Oolib/components/Dropdowns.stories.js +1 -1
  4. package/dist/stories/v2/components/Dropdown/Dropdowns.stories.js +5 -7
  5. package/dist/stories/v2/components/Dropdown/dropdownOptions.js +1 -1
  6. package/dist/stories/v2/components/List.stories.js +13 -13
  7. package/dist/stories/v2/components/TabBar.stories.d.ts +2 -0
  8. package/dist/stories/v2/components/TabBar.stories.js +40 -10
  9. package/dist/v2/components/Dropdowns/comps/OptionsMulti/index.js +7 -2
  10. package/dist/v2/components/Dropdowns/comps/OptionsShell/comps/OptionsAnimateWrapper/index.d.ts +5 -1
  11. package/dist/v2/components/Dropdowns/comps/OptionsShell/comps/OptionsAnimateWrapper/index.js +13 -2
  12. package/dist/v2/components/Dropdowns/comps/OptionsShell/comps/OptionsAnimateWrapper/styled.js +4 -1
  13. package/dist/v2/components/Dropdowns/comps/OptionsShell/index.js +5 -5
  14. package/dist/v2/components/Dropdowns/comps/OptionsShell/styled.js +2 -2
  15. package/dist/v2/components/Dropdowns/comps/OptionsSingle/index.js +1 -1
  16. package/dist/v2/components/Dropdowns/utils/genIcon.js +5 -1
  17. package/dist/v2/components/List/comps/ListGroup.d.ts +3 -2
  18. package/dist/v2/components/List/comps/ListGroup.js +3 -3
  19. package/dist/v2/components/List/comps/ListItem.d.ts +3 -2
  20. package/dist/v2/components/List/comps/ListItem.js +3 -3
  21. package/dist/v2/components/List/index.d.ts +3 -2
  22. package/dist/v2/components/List/index.js +4 -4
  23. package/dist/v2/components/TabBar/index.js +7 -5
  24. package/dist/v2/components/TabBar/index.styled.js +8 -2
  25. package/dist/v2/components/dataviz/BarChart/comps/CustomTooltip/index.js +5 -44
  26. package/dist/v2/components/dataviz/PieChart/index.js +3 -4
  27. package/dist/v2/themes/colors.js +4 -4
  28. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -73,6 +73,7 @@ export { default as MetaBlockV2 } from "./v2/components/MetaBlock";
73
73
  export { DateRangePicker as DateRangePickerV2 } from "./v2/components/DateRangePicker";
74
74
  export { HomeCover as HomeCoverV2 } from "./v2/components/HomeCover";
75
75
  export { BarChart } from "./v2/components/dataviz/BarChart";
76
+ export { PieChart } from "./v2/components/dataviz/PieChart";
76
77
  export { HeatMapGrid } from "./v2/components/dataviz/HeatMapGrid";
77
78
  export { BarGraphCollection } from "./v2/components/dataviz/BarGraphCollection";
78
79
  export { DataVizAccordion } from "./v2/components/DataVizAccordion";
package/dist/index.js CHANGED
@@ -40,7 +40,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
40
40
  };
41
41
  Object.defineProperty(exports, "__esModule", { value: true });
42
42
  exports.PDFInput = exports.AudioInput = exports.VideoInput = exports.ProfileImageInput = exports.ImageInput = exports.MetaBlock = exports.genTagComp = exports.generateOptions = exports.OptionsSingle = exports.DropdownMulti = exports.DropdownSingle = exports.parseCardConfig = exports.ListProfile = exports.CardProfile = exports.CardEmbed = exports.DateTimeRangePicker = exports.DateTimePicker = exports.TimeRangePicker = exports.TimePicker = exports.DateRangePicker = exports.DatePicker = exports.TextLoader = exports.PageScrollIndicator = exports.HomeCover = exports.EmptyStates = exports.ModalSmall = exports.Modal = exports.ModalForms = exports.ModalConfirm = exports.SkeletonLoader = exports.Divider = exports.PercentCompletedPie = exports.Accordion = exports.ActionMenu = exports.Tooltip = exports.OKELink = exports.UserRoleBadge = exports.Section = exports.SwitchDouble = exports.TagDisplay = exports.TagSelect = exports.TagLink = exports.TagClear = exports.LoaderOverlay = exports.Loader = exports.ProgressBar = exports.LoaderCircle = exports.icons = exports.colors = exports.GlobalStyles = void 0;
43
- exports.baseStyling = exports.CustomTooltip = exports.ListItem = exports.List = exports.SwitchSingle = exports.RadioButton = exports.RadioInput = exports.RadioList = exports.CheckboxButton = exports.CheckboxInput = exports.CheckboxList = exports.AccordionV2 = exports.DataVizAccordion = exports.BarGraphCollection = exports.HeatMapGrid = exports.BarChart = exports.HomeCoverV2 = exports.DateRangePickerV2 = exports.MetaBlockV2 = exports.typoV2_CSS = exports.colors2 = exports.TabBarV2 = exports.ButtonGhostCompact = exports.ButtonTertiaryCompact = exports.ButtonSecondaryCompact = exports.ButtonPrimaryCompact = exports.ButtonGhostV2 = exports.ButtonTertiaryV2 = exports.ButtonSecondaryV2 = exports.ButtonPrimaryV2 = exports.TagClearV2 = exports.TagLinkV2 = exports.TagDisplayV2 = exports.DropdownMultiV2 = exports.DropdownSingleV2 = exports.HintsProvider = 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;
43
+ exports.baseStyling = exports.CustomTooltip = exports.ListItem = exports.List = exports.SwitchSingle = exports.RadioButton = exports.RadioInput = exports.RadioList = exports.CheckboxButton = exports.CheckboxInput = exports.CheckboxList = exports.AccordionV2 = exports.DataVizAccordion = exports.BarGraphCollection = exports.HeatMapGrid = exports.PieChart = exports.BarChart = exports.HomeCoverV2 = exports.DateRangePickerV2 = exports.MetaBlockV2 = exports.typoV2_CSS = exports.colors2 = exports.TabBarV2 = exports.ButtonGhostCompact = exports.ButtonTertiaryCompact = exports.ButtonSecondaryCompact = exports.ButtonPrimaryCompact = exports.ButtonGhostV2 = exports.ButtonTertiaryV2 = exports.ButtonSecondaryV2 = exports.ButtonPrimaryV2 = exports.TagClearV2 = exports.TagLinkV2 = exports.TagDisplayV2 = exports.DropdownMultiV2 = exports.DropdownSingleV2 = exports.HintsProvider = 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;
44
44
  //css and styling related ( styled-components )
45
45
  var globalStyles_1 = require("./globalStyles");
46
46
  Object.defineProperty(exports, "GlobalStyles", { enumerable: true, get: function () { return globalStyles_1.GlobalStyles; } });
@@ -238,6 +238,8 @@ Object.defineProperty(exports, "HomeCoverV2", { enumerable: true, get: function
238
238
  //V2 data viz comps
239
239
  var BarChart_1 = require("./v2/components/dataviz/BarChart");
240
240
  Object.defineProperty(exports, "BarChart", { enumerable: true, get: function () { return BarChart_1.BarChart; } });
241
+ var PieChart_1 = require("./v2/components/dataviz/PieChart");
242
+ Object.defineProperty(exports, "PieChart", { enumerable: true, get: function () { return PieChart_1.PieChart; } });
241
243
  var HeatMapGrid_1 = require("./v2/components/dataviz/HeatMapGrid");
242
244
  Object.defineProperty(exports, "HeatMapGrid", { enumerable: true, get: function () { return HeatMapGrid_1.HeatMapGrid; } });
243
245
  var BarGraphCollection_1 = require("./v2/components/dataviz/BarGraphCollection");
@@ -173,7 +173,7 @@ exports.default = {
173
173
  };
174
174
  var dropdownOptions = [
175
175
  {
176
- display: "Option with a slightly longer name",
176
+ display: "Option ",
177
177
  value: "india",
178
178
  color: themes_1.colors.lightRed,
179
179
  // image: "xyz",
@@ -187,13 +187,11 @@ var Dropdowns = function (args) {
187
187
  react_1.default.createElement(Comp, __assign({ key: args.selection }, args, { S: args.size == "S",
188
188
  // options={dropdownOptionsGroup}
189
189
  options: args.dataOptions === "simple"
190
- ?
191
- dropdownOptions_1.dropdownOptions.map(function (op) { return (__assign(__assign({}, op), { desc: args.optionDescription, icon: !args.optionImage && args.optionIcon,
192
- // image: args.optionImage && [{ publicUrl: args.optionImage }],
193
- color: args.colors && op.color, loading: args.loading })); })
194
- : dropdownOptions_1.dropdownOptionsGroup.map(function (op) { return (__assign(__assign({}, op), { options: op.options.map(function (option) { return (__assign(__assign({}, option), { desc: args.optionDescription, icon: !args.optionImage && args.optionIcon,
195
- // image: args.optionImage && [{ publicUrl: args.optionImage }],
196
- color: args.colors && option.color, loading: args.loading })); }) })); }), value: val[args.selection], onChange: function (k, v) {
190
+ ? __spreadArray([], dropdownOptions_1.dropdownOptions.map(function (op) { return (__assign(__assign({}, op), { desc: args.optionDescription, icon: !args.optionImage && args.optionIcon,
191
+ // image: args.optionImage && [{ publicUrl: args.optionImage }],
192
+ color: args.colors && op.color, loading: args.loading })); }), true) : dropdownOptions_1.dropdownOptionsGroup.map(function (op) { return (__assign(__assign({}, op), { options: op.options.map(function (option) { return (__assign(__assign({}, option), { desc: args.optionDescription, icon: !args.optionImage && args.optionIcon,
193
+ // image: args.optionImage && [{ publicUrl: args.optionImage }],
194
+ color: args.colors && option.color, loading: args.loading })); }) })); }), value: val[args.selection], onChange: function (k, v) {
197
195
  return setVal(function (prev) {
198
196
  var _a;
199
197
  return (__assign(__assign({}, prev), (_a = {}, _a[args.selection] = v, _a)));
@@ -4,7 +4,7 @@ exports.dropdownOptionsGroup = exports.dropdownOptions = void 0;
4
4
  var themes_1 = require("../../../../themes");
5
5
  exports.dropdownOptions = [
6
6
  {
7
- display: "Option with a slightly longer name",
7
+ display: "Option",
8
8
  value: "india",
9
9
  color: themes_1.colors.lightRed,
10
10
  // image: "xyz",
@@ -35,7 +35,7 @@ var dropdownOptions = [
35
35
  value: "india",
36
36
  color: themes_1.colors.lightRed,
37
37
  // image: "xyz",
38
- // icon: "CirclesFour",
38
+ icon: "CirclesFour",
39
39
  // desc: "This is a story about schnil-tu, a.k.a tubito senpai. Tubito senpai loves to say bhai-god. Lol.",
40
40
  },
41
41
  {
@@ -43,31 +43,31 @@ var dropdownOptions = [
43
43
  value: "sriLanka",
44
44
  color: themes_1.colors.invertRed,
45
45
  // image: "xyz",
46
- // icon: "Trash",
46
+ icon: "Trash",
47
47
  desc: "This is a story about schnil-tu, a.k.a tubito senpai. Tubito senpai loves to say bhai-god. Lol.",
48
48
  },
49
49
  {
50
50
  display: "Japan",
51
51
  value: "japan",
52
- color: themes_1.colors.lightBlue
52
+ color: themes_1.colors.lightBlue,
53
53
  // image: "xyz",
54
- // icon: "Trash",
54
+ icon: "Trash",
55
55
  // desc: "This is a story about schnil-tu, a.k.a tubito senpai. Tubito senpai loves to say bhai-god. Lol.",
56
56
  },
57
57
  {
58
58
  display: "Germany",
59
59
  value: "germany",
60
- color: themes_1.colors.primaryColor100
60
+ color: themes_1.colors.primaryColor100,
61
61
  // image: "xyz",
62
- // icon: "Trash",
62
+ icon: "Trash",
63
63
  // desc: "This is a story about schnil-tu, a.k.a tubito senpai. Tubito senpai loves to say bhai-god. Lol.",
64
64
  },
65
65
  {
66
66
  display: "USA",
67
67
  value: "usa",
68
- color: themes_1.colors.greyColor100
68
+ color: themes_1.colors.greyColor100,
69
69
  // image: "xyz",
70
- // icon: "Trash",
70
+ icon: "Trash",
71
71
  // desc: "This is a story about schnil-tu, a.k.a tubito senpai. Tubito senpai loves to say bhai-god. Lol.",
72
72
  },
73
73
  {
@@ -75,7 +75,7 @@ var dropdownOptions = [
75
75
  value: "columbia",
76
76
  color: themes_1.colors.lightRed,
77
77
  // image: "xyz",
78
- // icon: "Trash",
78
+ icon: "Trash",
79
79
  // desc: "This is a story about schnil-tu, a.k.a tubito senpai. Tubito senpai loves to say bhai-god. Lol.",
80
80
  },
81
81
  {
@@ -83,7 +83,7 @@ var dropdownOptions = [
83
83
  value: "brazil",
84
84
  color: themes_1.colors.invertRed,
85
85
  // image: "xyz",
86
- // icon: "Trash",
86
+ icon: "Trash",
87
87
  // desc: "This is a story about schnil-tu, a.k.a tubito senpai. Tubito senpai loves to say bhai-god. Lol.",
88
88
  },
89
89
  {
@@ -92,7 +92,7 @@ var dropdownOptions = [
92
92
  color: themes_1.colors.lightBlue,
93
93
  disabled: true,
94
94
  // image: "xyz",
95
- // icon: "Trash",
95
+ icon: "Trash",
96
96
  // desc: "This is a story about schnil-tu, a.k.a tubito senpai. Tubito senpai loves to say bhai-god. Lol.",
97
97
  },
98
98
  ];
@@ -174,7 +174,7 @@ var List_ = function (args) {
174
174
  (0, react_1.useEffect)(function () {
175
175
  setFilteredOptions(args.grouped ? dropdownOptions_1.dropdownOptionsGroup : dropdownOptions);
176
176
  }, [args.grouped]);
177
- var handleSelect = function (option) {
177
+ var handleSelect = function (id, option) {
178
178
  setSelectedValue(option);
179
179
  if (args.onSelect) {
180
180
  args.onSelect(option);
@@ -185,7 +185,7 @@ var List_ = function (args) {
185
185
  };
186
186
  return (React.createElement(__1.Container, { style: { background: "#eff" } },
187
187
  React.createElement(__1.PaddingTop40, null),
188
- React.createElement(List_1.List, { options: filteredOptions, value: selectedValue, focussedOp: focussedOption, scrollFocussedOpIntoView: scrollFocussedOpIntoView, handleSelect: handleSelect, grouped: args.grouped, isMulti: args.isMulti, isTagsStyle: args.isTagsStyle, invert: args.invert, disableShadow: args.disableShadow, enableBorder: args.enableBorder, isSearchable: args.isSearchable, searchbarPlaceholder: args.searchbarPlaceholder, searchBarFocus: searchBarFocus, searchString: searchString, setSearchString: setSearchString, setSearchBarFocus: setSearchBarFocus }),
188
+ React.createElement(List_1.List, { options: filteredOptions, value: selectedValue, focussedOp: focussedOption, scrollFocussedOpIntoView: scrollFocussedOpIntoView, onChange: handleSelect, grouped: args.grouped, isMulti: args.isMulti, isTagsStyle: args.isTagsStyle, invert: args.invert, disableShadow: args.disableShadow, enableBorder: args.enableBorder, isSearchable: args.isSearchable, searchbarPlaceholder: args.searchbarPlaceholder, searchBarFocus: searchBarFocus, searchString: searchString, setSearchString: setSearchString, setSearchBarFocus: setSearchBarFocus }),
189
189
  React.createElement(__1.PaddingBottom40, null)));
190
190
  };
191
191
  exports.List_ = List_;
@@ -64,6 +64,8 @@ declare namespace _default {
64
64
  export let responsive: boolean;
65
65
  let title_1: string;
66
66
  export { title_1 as title };
67
+ export let onlyIcons: boolean;
68
+ export let onlyText: boolean;
67
69
  }
68
70
  }
69
71
  export default _default;
@@ -85,26 +85,56 @@ exports.default = {
85
85
  errorTabs: "",
86
86
  disabledTabs: "",
87
87
  responsive: false,
88
- title: "Page"
88
+ title: "Page",
89
+ onlyIcons: false,
90
+ onlyText: false,
89
91
  }
90
92
  };
91
93
  var TabBar_ = function (args) {
92
94
  var options = [
93
- { display: "display 1", value: "value1", icon: 'Funnel', message: "new" },
95
+ { display: "display 1", value: "value1", icon: 'Funnel' },
94
96
  { display: "display 2", value: "value2", icon: 'ListDashes' },
95
- { display: "Lorem ipsum dolor sit amet, consectetur adipiscing elit.", value: "value3" },
96
- { display: "display 3", value: "value4" },
97
- { display: "display 4", value: "value5" },
98
- { display: "display 5", value: "value6" },
99
- { display: "display 6", value: "value7" },
97
+ { display: "Lorem ipsum dolor sit amet, consectetur adipiscing elit.", value: "value3", icon: "GearSix" },
98
+ { display: "display 3", value: "value4", icon: "Cube" },
99
+ { display: "display 4", value: "value5", icon: "XCircle" },
100
+ { display: "display 5", value: "value6", icon: "Lightbulb" },
101
+ { display: "display 6", value: "value7", icon: "Cards" },
100
102
  ];
101
103
  var errorTabs = args.errorTabs && options.filter(function (op) { return args.errorTabs.includes(op.value); });
102
104
  var disabledTabs = args.disabledTabs && options.filter(function (op) { return args.disabledTabs.includes(op.value); });
103
105
  var _a = (0, react_1.useState)(options[0]), active = _a[0], setActive = _a[1];
104
- args.options = options;
106
+ var filterOptions = function (options, args) {
107
+ return options.map(function (option) {
108
+ var newOption = { value: option.value };
109
+ if (args.onlyText) {
110
+ if (option.display)
111
+ newOption.display = option.display;
112
+ }
113
+ else if (args.onlyIcons) {
114
+ if (option.icon)
115
+ newOption.icon = option.icon;
116
+ }
117
+ else {
118
+ // keep both display and icon if they exist
119
+ if (option.display)
120
+ newOption.display = option.display;
121
+ if (option.icon)
122
+ newOption.icon = option.icon;
123
+ }
124
+ // Preserve other properties like message if present
125
+ Object.keys(option).forEach(function (key) {
126
+ if (!['display', 'icon', 'value'].includes(key)) {
127
+ newOption[key] = option[key];
128
+ }
129
+ });
130
+ return newOption;
131
+ });
132
+ };
133
+ args.options = filterOptions(options, args);
105
134
  args.value = active;
106
135
  args.onChange = function (id, value) { return setActive(value); };
107
- return (react_1.default.createElement("div", { style: { width: !args.changeWidth ? '' : '400px' } },
108
- react_1.default.createElement(TabBars.TabBarStyle1, __assign({}, args, { errorTabs: errorTabs, disabledTabs: disabledTabs, black: args.color === "black" ? true : false }))));
136
+ return (react_1.default.createElement("div", { style: { width: !args.changeWidth ? '' : '400px', padding: "4rem", display: "flex", gap: "10rem", flexDirection: "column" } },
137
+ react_1.default.createElement(TabBars.TabBarStyle1, __assign({}, args, { errorTabs: errorTabs, disabledTabs: disabledTabs, black: args.color === "black" ? true : false })),
138
+ react_1.default.createElement(TabBars.TabBarStyle1, __assign({}, args, { options: args.options.map(function (item, i) { return !i ? (__assign(__assign({}, item), { message: "New" })) : item; }), errorTabs: errorTabs, disabledTabs: disabledTabs, black: args.color === "black" ? true : false }))));
109
139
  };
110
140
  exports.TabBar_ = TabBar_;
@@ -89,12 +89,17 @@ var OptionsMulti = function (_a) {
89
89
  return (selectedOptions === null || selectedOptions === void 0 ? void 0 : selectedOptions.length) > 0 && (react_1.default.createElement("div", null,
90
90
  react_1.default.createElement("div", { style: { padding: "0.4rem 0.8rem" } },
91
91
  react_1.default.createElement(__1.UI_TAG, null, "Selected")),
92
- react_1.default.createElement(List_1.List, { key: value, options: selectedOptions, value: value, focussedOp: focussedOp, scrollFocussedOpIntoView: scrollFocussedOpIntoView, handleSelect: handleSelect, setSearchString: setSearchString, optionsClassName: optionsClassName, setFocusSelectTagsInput: setFocusSelectTagsInput, S: S, isMulti: true, style: { padding: "0" }, disableShadow: true }),
92
+ react_1.default.createElement(List_1.List, { key: value, options: selectedOptions, value: value, focussedOp: focussedOp, scrollFocussedOpIntoView: scrollFocussedOpIntoView, onChange: function (id, v) {
93
+ return handleSelect(v);
94
+ }, setSearchString: setSearchString, optionsClassName: optionsClassName, setFocusSelectTagsInput: setFocusSelectTagsInput, S: S, isMulti: true, style: { padding: "0" }, disableShadow: true }),
93
95
  react_1.default.createElement("div", { style: { margin: "0.4rem 0rem" } },
94
96
  react_1.default.createElement(__1.Divider, { style: { borderBottom: "0.1rem solid ".concat(__1.colors2.grey20) } }))));
95
97
  };
96
98
  return (react_1.default.createElement(OptionsShell_1.OptionsShell, { ref: optionsRef, yOrientation: yOrientation, lightboxHeight: lightboxHeight, lightboxStyle: lightboxStyle, options: options, optionsAnchor: optionsAnchor, showOptions: showOptions, handleHideOptions: handleHideOptions, SelectComp: SelectComp, label: label, optionsModalLabel: optionsModalLabel, showDoneButton: true, popOutOfOverflowHiddenParent: popOutOfOverflowHiddenParent, relativeToRef: relativeToRef, S: S, alignDropdown: alignDropdown, matchSelectInputWidth: matchSelectInputWidth },
97
- react_1.default.createElement(List_1.List, { options: options, value: value, focussedOp: focussedOp, scrollFocussedOpIntoView: scrollFocussedOpIntoView, handleSelect: handleSelect, optionsClassName: optionsClassName, S: S, grouped: (0, getValue_1.isGroupedData)(options), isMulti: true, disableShadow: true, isSearchable: isSearchable, searchbarPlaceholder: searchbarPlaceholder, searchBarFocus: searchBarFocus, searchString: searchString, setSearchString: setSearchString, setSearchBarFocus: setSearchBarFocus, children: !isTagsStyle && createSelectedOptions() }),
99
+ react_1.default.createElement(List_1.List, { options: options, value: value, focussedOp: focussedOp, scrollFocussedOpIntoView: scrollFocussedOpIntoView, onChange: function (id, v) {
100
+ console.log({ id: id, v: v });
101
+ handleSelect(v);
102
+ }, optionsClassName: optionsClassName, S: S, grouped: (0, getValue_1.isGroupedData)(options), isMulti: true, disableShadow: true, isSearchable: isSearchable, searchbarPlaceholder: searchbarPlaceholder, searchBarFocus: searchBarFocus, searchString: searchString, setSearchString: setSearchString, setSearchBarFocus: setSearchBarFocus, children: !isTagsStyle && createSelectedOptions() }),
98
103
  genCreateTagButton && genCreateTagButton(options)));
99
104
  };
100
105
  exports.OptionsMulti = OptionsMulti;
@@ -1,4 +1,4 @@
1
- export function OptionsAnimateWrapper({ relativeToRef, showOptions, yOrientation, fixPos, optionsAnchor, children, lightboxStyle, alignDropdown, optionsToggleAnimationDuration }: {
1
+ export function OptionsAnimateWrapper({ relativeToRef, showOptions, yOrientation, fixPos, optionsAnchor, children, lightboxStyle, alignDropdown, optionsRef, options, selectRefwidth, matchSelectInputWidth, optionsToggleAnimationDuration }: {
2
2
  relativeToRef: any;
3
3
  showOptions: any;
4
4
  yOrientation: any;
@@ -7,6 +7,10 @@ export function OptionsAnimateWrapper({ relativeToRef, showOptions, yOrientation
7
7
  children: any;
8
8
  lightboxStyle: any;
9
9
  alignDropdown: any;
10
+ optionsRef: any;
11
+ options: any;
12
+ selectRefwidth: any;
13
+ matchSelectInputWidth: any;
10
14
  optionsToggleAnimationDuration: any;
11
15
  }): React.JSX.Element;
12
16
  import React from "react";
@@ -51,7 +51,7 @@ var useStyleUpdateAfterToggleTransition_1 = require("../../../../../../../utils/
51
51
  var OptionsAnimateWrapper = function (_a) {
52
52
  var _b;
53
53
  var _c;
54
- var relativeToRef = _a.relativeToRef, showOptions = _a.showOptions, yOrientation = _a.yOrientation, fixPos = _a.fixPos, optionsAnchor = _a.optionsAnchor, children = _a.children, lightboxStyle = _a.lightboxStyle, alignDropdown = _a.alignDropdown, optionsToggleAnimationDuration = _a.optionsToggleAnimationDuration;
54
+ var relativeToRef = _a.relativeToRef, showOptions = _a.showOptions, yOrientation = _a.yOrientation, fixPos = _a.fixPos, optionsAnchor = _a.optionsAnchor, children = _a.children, lightboxStyle = _a.lightboxStyle, alignDropdown = _a.alignDropdown, optionsRef = _a.optionsRef, options = _a.options, selectRefwidth = _a.selectRefwidth, matchSelectInputWidth = _a.matchSelectInputWidth, optionsToggleAnimationDuration = _a.optionsToggleAnimationDuration;
55
55
  var selectCompRect = (_c = relativeToRef === null || relativeToRef === void 0 ? void 0 : relativeToRef.current) === null || _c === void 0 ? void 0 : _c.getBoundingClientRect();
56
56
  var viewportWidth = document.documentElement.clientWidth; // excludes scrollbar
57
57
  var optionsDisplay = (0, useStyleUpdateAfterToggleTransition_1.useStyleUpdateAfterToggleTransition)({
@@ -61,7 +61,18 @@ var OptionsAnimateWrapper = function (_a) {
61
61
  transitionDuration: optionsToggleAnimationDuration
62
62
  }).style;
63
63
  var lightboxOffsetFromSelect = 4;
64
- return (react_1.default.createElement(styled_1.StyledOptionsAnimateWrapper, { showOptions: showOptions, optionsToggleAnimationDuration: optionsToggleAnimationDuration, style: __assign(__assign(__assign({}, (lightboxStyle || {})), { display: optionsDisplay, zIndex: 100000 }), (fixPos
64
+ var _d = (0, react_1.useState)({
65
+ width: undefined,
66
+ openHeight: undefined,
67
+ }), _e = _d[0], width = _e.width, openHeight = _e.openHeight, setWidthAndOpenHeight = _d[1];
68
+ (0, react_1.useEffect)(function () {
69
+ var _a, _b, _c, _d;
70
+ setWidthAndOpenHeight({
71
+ width: (_b = (_a = optionsRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect()) === null || _b === void 0 ? void 0 : _b.width,
72
+ openHeight: (_d = (_c = optionsRef.current) === null || _c === void 0 ? void 0 : _c.getBoundingClientRect()) === null || _d === void 0 ? void 0 : _d.height,
73
+ });
74
+ }, [options.length, options]);
75
+ return (react_1.default.createElement(styled_1.StyledOptionsAnimateWrapper, { showOptions: showOptions, optionsToggleAnimationDuration: optionsToggleAnimationDuration, width: matchSelectInputWidth ? selectRefwidth : width, style: __assign(__assign(__assign({}, (lightboxStyle || {})), { display: optionsDisplay, zIndex: 100000 }), (fixPos
65
76
  ? __assign(__assign({ position: "fixed", top: "".concat(fixPos.y - (yOrientation === "top" ? ((selectCompRect === null || selectCompRect === void 0 ? void 0 : selectCompRect.height) + lightboxOffsetFromSelect) || -(lightboxOffsetFromSelect) : -(lightboxOffsetFromSelect)), "px") }, (alignDropdown === "right"
66
77
  ? {
67
78
  right: "".concat(viewportWidth - fixPos.right, "px")
@@ -12,7 +12,10 @@ var styled_components_1 = __importDefault(require("styled-components"));
12
12
  var mixins_1 = require("../../../../../../../themes/mixins");
13
13
  var themes_1 = require("../../../../../../themes");
14
14
  /** for lightbox shell */
15
- exports.StyledOptionsAnimateWrapper = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n height: auto;\n /**\n 'else 100%' is very important. \n what this does is, on first render, it allows the optionsWrapper within to take whatever width \n its supposed to i.e max-content / 100% width of select / 36rem.\n Then on the next render (after the ref has already been attached to optionsWrapper), the proper width\n gets calculated and passed to this component.\n\n Without this 100%, this will not work > scenarios where there is enough space for the dropdown to \n stretch to the width of the select OR 36rem. Instead it will always stick to its min-width which is \n max-content\n */\n /* width:100%; */\n overflow: hidden;\n ", ";\n opacity: ", ";\n pointer-events: ", ";\n\n\n background-color: ", ";\n border-radius: 0.6rem;\n box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.15);\n"], ["\n height: auto;\n /**\n 'else 100%' is very important. \n what this does is, on first render, it allows the optionsWrapper within to take whatever width \n its supposed to i.e max-content / 100% width of select / 36rem.\n Then on the next render (after the ref has already been attached to optionsWrapper), the proper width\n gets calculated and passed to this component.\n\n Without this 100%, this will not work > scenarios where there is enough space for the dropdown to \n stretch to the width of the select OR 36rem. Instead it will always stick to its min-width which is \n max-content\n */\n /* width:100%; */\n overflow: hidden;\n ", ";\n opacity: ", ";\n pointer-events: ", ";\n\n\n background-color: ", ";\n border-radius: 0.6rem;\n box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.15);\n"])), function (_a) {
15
+ exports.StyledOptionsAnimateWrapper = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n height: auto;\n /**\n 'else 100%' is very important. \n what this does is, on first render, it allows the optionsWrapper within to take whatever width \n its supposed to i.e max-content / 100% width of select / 36rem.\n Then on the next render (after the ref has already been attached to optionsWrapper), the proper width\n gets calculated and passed to this component.\n\n Without this 100%, this will not work > scenarios where there is enough space for the dropdown to \n stretch to the width of the select OR 36rem. Instead it will always stick to its min-width which is \n max-content\n */\n width: ", ";\n overflow: hidden;\n ", ";\n opacity: ", ";\n pointer-events: ", ";\n\n\n background-color: ", ";\n border-radius: 0.6rem;\n box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.15);\n"], ["\n height: auto;\n /**\n 'else 100%' is very important. \n what this does is, on first render, it allows the optionsWrapper within to take whatever width \n its supposed to i.e max-content / 100% width of select / 36rem.\n Then on the next render (after the ref has already been attached to optionsWrapper), the proper width\n gets calculated and passed to this component.\n\n Without this 100%, this will not work > scenarios where there is enough space for the dropdown to \n stretch to the width of the select OR 36rem. Instead it will always stick to its min-width which is \n max-content\n */\n width: ", ";\n overflow: hidden;\n ", ";\n opacity: ", ";\n pointer-events: ", ";\n\n\n background-color: ", ";\n border-radius: 0.6rem;\n box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.15);\n"])), function (_a) {
16
+ var width = _a.width;
17
+ return width ? "".concat(width, "px") : "100%";
18
+ }, function (_a) {
16
19
  var optionsToggleAnimationDuration = _a.optionsToggleAnimationDuration;
17
20
  return (0, mixins_1.transition)("opacity ".concat(optionsToggleAnimationDuration / 2000, "s ease-out"));
18
21
  }, function (_a) {
@@ -48,13 +48,13 @@ var DefaultMobileShell = function (_a) {
48
48
  return (react_1.default.createElement("div", { style: { top: 0, left: 0, height: '100dvh', width: '100dvw', position: 'fixed', zIndex: '100000000', background: 'rgba(0,0,0,0.5)', display: 'flex', flexDirection: 'column', justifyContent: 'flex-end' } }, children));
49
49
  };
50
50
  exports.OptionsShell = react_1.default.forwardRef(function (_a, ref) {
51
- var _b;
52
- var yOrientation = _a.yOrientation, lightboxHeight = _a.lightboxHeight, lightboxStyle = _a.lightboxStyle, options = _a.options, optionsAnchor = _a.optionsAnchor, showOptions = _a.showOptions, handleHideOptions = _a.handleHideOptions, children = _a.children, SelectComp = _a.SelectComp, label = _a.label, optionsModalLabel = _a.optionsModalLabel, showDoneButton = _a.showDoneButton, _c = _a.popOutOfOverflowHiddenParent, popOutOfOverflowHiddenParent = _c === void 0 ? false : _c, relativeToRef = _a.relativeToRef, S = _a.S, alignDropdown = _a.alignDropdown, matchSelectInputWidth = _a.matchSelectInputWidth;
51
+ var _b, _c;
52
+ var yOrientation = _a.yOrientation, lightboxHeight = _a.lightboxHeight, lightboxStyle = _a.lightboxStyle, options = _a.options, optionsAnchor = _a.optionsAnchor, showOptions = _a.showOptions, handleHideOptions = _a.handleHideOptions, children = _a.children, SelectComp = _a.SelectComp, label = _a.label, optionsModalLabel = _a.optionsModalLabel, showDoneButton = _a.showDoneButton, _d = _a.popOutOfOverflowHiddenParent, popOutOfOverflowHiddenParent = _d === void 0 ? false : _d, relativeToRef = _a.relativeToRef, S = _a.S, alignDropdown = _a.alignDropdown, matchSelectInputWidth = _a.matchSelectInputWidth;
53
53
  var screenWidth = (0, _EXPORTS_1.useScreenWidth)();
54
54
  var isDesktop = screenWidth >= (0, mixins_1.getBreakPoint)("sm");
55
55
  var currentTheme = (0, styled_components_1.useTheme)();
56
56
  var MobileShell = (currentTheme === null || currentTheme === void 0 ? void 0 : currentTheme.MobileShell) || DefaultMobileShell;
57
- var _d = (0, usePopOutOfOverflowHiddenParent_1.usePopOutOfOverflowHiddenParent)(popOutOfOverflowHiddenParent), fixPos = _d.fixPos, applyFixedPos = _d.applyFixedPos, removeFixedPos = _d.removeFixedPos, trackerRef = _d.trackerRef;
57
+ var _e = (0, usePopOutOfOverflowHiddenParent_1.usePopOutOfOverflowHiddenParent)(popOutOfOverflowHiddenParent), fixPos = _e.fixPos, applyFixedPos = _e.applyFixedPos, removeFixedPos = _e.removeFixedPos, trackerRef = _e.trackerRef;
58
58
  (0, react_1.useEffect)(function () {
59
59
  if (popOutOfOverflowHiddenParent) {
60
60
  if (showOptions)
@@ -66,8 +66,8 @@ exports.OptionsShell = react_1.default.forwardRef(function (_a, ref) {
66
66
  var optionsToggleAnimationDuration = 300;
67
67
  return isDesktop ? (react_1.default.createElement(react_1.Fragment, null,
68
68
  popOutOfOverflowHiddenParent && react_1.default.createElement("div", { ref: trackerRef }),
69
- react_1.default.createElement(OptionsAnimateWrapper_1.OptionsAnimateWrapper, { options: options, optionsRef: ref, relativeToRef: relativeToRef, showOptions: showOptions, yOrientation: yOrientation, fixPos: fixPos, optionsAnchor: optionsAnchor, children: children, lightboxStyle: lightboxStyle, alignDropdown: alignDropdown, optionsToggleAnimationDuration: optionsToggleAnimationDuration },
70
- react_1.default.createElement(styled_1.StyledOptionsWrapper, { id: "StyledOptionsWrapper", showOptions: showOptions, optionsToggleAnimationDuration: optionsToggleAnimationDuration, ref: ref, lightboxHeight: lightboxHeight, matchSelectInputWidth: matchSelectInputWidth, selectRefwidth: (_b = relativeToRef === null || relativeToRef === void 0 ? void 0 : relativeToRef.current) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect().width,
69
+ react_1.default.createElement(OptionsAnimateWrapper_1.OptionsAnimateWrapper, { options: options, optionsRef: ref, relativeToRef: relativeToRef, showOptions: showOptions, yOrientation: yOrientation, fixPos: fixPos, optionsAnchor: optionsAnchor, children: children, lightboxStyle: lightboxStyle, alignDropdown: alignDropdown, options: options, matchSelectInputWidth: matchSelectInputWidth, selectRefwidth: (_b = relativeToRef === null || relativeToRef === void 0 ? void 0 : relativeToRef.current) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect().width, optionsToggleAnimationDuration: optionsToggleAnimationDuration },
70
+ react_1.default.createElement(styled_1.StyledOptionsWrapper, { id: "StyledOptionsWrapper", showOptions: showOptions, optionsToggleAnimationDuration: optionsToggleAnimationDuration, ref: ref, lightboxHeight: lightboxHeight, matchSelectInputWidth: matchSelectInputWidth, selectRefwidth: (_c = relativeToRef === null || relativeToRef === void 0 ? void 0 : relativeToRef.current) === null || _c === void 0 ? void 0 : _c.getBoundingClientRect().width,
71
71
  // className={className}
72
72
  style: {
73
73
  // position: "absolute",
@@ -13,7 +13,7 @@ var themes_1 = require("../../../../themes");
13
13
  var mixins_1 = require("../../../../../themes/mixins");
14
14
  var globalVariables_1 = require("../../../../../globalStyles/globalVariables");
15
15
  /** for lightbox shell */
16
- exports.StyledOptionsAnimateWrapper = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n height: ", ";\n /**\n 'else 100%' is very important. \n what this does is, on first render, it allows the optionsWrapper within to take whatever width \n its supposed to i.e max-content / 100% width of select / 36rem.\n Then on the next render (after the ref has already been attached to optionsWrapper), the proper width\n gets calculated and passed to this component.\n\n Without this 100%, this will not work > scenarios where there is enough space for the dropdown to \n stretch to the width of the select OR 36rem. Instead it will always stick to its min-width which is \n max-content\n */\n width: ", ";\n overflow: hidden;\n ", ";\n ", ";\n border-width: ", "; //hack, otherwsie this shit line shows when options are closed\n"], ["\n height: ", ";\n /**\n 'else 100%' is very important. \n what this does is, on first render, it allows the optionsWrapper within to take whatever width \n its supposed to i.e max-content / 100% width of select / 36rem.\n Then on the next render (after the ref has already been attached to optionsWrapper), the proper width\n gets calculated and passed to this component.\n\n Without this 100%, this will not work > scenarios where there is enough space for the dropdown to \n stretch to the width of the select OR 36rem. Instead it will always stick to its min-width which is \n max-content\n */\n width: ", ";\n overflow: hidden;\n ", ";\n ", ";\n border-width: ", "; //hack, otherwsie this shit line shows when options are closed\n"])), function (_a) {
16
+ exports.StyledOptionsAnimateWrapper = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n height: ", ";\n /**\n 'else 100%' is very important. \n what this does is, on first render, it allows the optionsWrapper within to take whatever width \n its supposed to i.e max-content / 100% width of select / 36rem.\n Then on the next render (after the ref has already been attached to optionsWrapper), the proper width\n gets calculated and passed to this component.\n\n Without this 100%, this will not work > scenarios where there is enough space for the dropdown to \n stretch to the width of the select OR 36rem. Instead it will always stick to its min-width which is \n max-content\n */\n width: 100%;\n width: ", ";\n overflow: hidden;\n ", ";\n ", ";\n border-width: ", "; //hack, otherwsie this shit line shows when options are closed\n"], ["\n height: ", ";\n /**\n 'else 100%' is very important. \n what this does is, on first render, it allows the optionsWrapper within to take whatever width \n its supposed to i.e max-content / 100% width of select / 36rem.\n Then on the next render (after the ref has already been attached to optionsWrapper), the proper width\n gets calculated and passed to this component.\n\n Without this 100%, this will not work > scenarios where there is enough space for the dropdown to \n stretch to the width of the select OR 36rem. Instead it will always stick to its min-width which is \n max-content\n */\n width: 100%;\n width: ", ";\n overflow: hidden;\n ", ";\n ", ";\n border-width: ", "; //hack, otherwsie this shit line shows when options are closed\n"])), function (_a) {
17
17
  var isOpen = _a.isOpen, openHeight = _a.openHeight;
18
18
  return isOpen ? (openHeight ? openHeight + 'px' : 'auto') : 0;
19
19
  }, function (_a) {
@@ -45,7 +45,7 @@ exports.StyledOptionsWrapper = styled_components_1.default.ul(templateObject_2 |
45
45
  default:
46
46
  return '30rem';
47
47
  }
48
- }, themes_1.colors.grey5, themes_1.colors.grey40, themes_1.colors.grey80, (0, mixins_1.mediaQuery)('md'));
48
+ }, themes_1.colors.grey5, themes_1.colors.grey20, themes_1.colors.grey50, (0, mixins_1.mediaQuery)('md'));
49
49
  /** for modal shell */
50
50
  exports.StyledModalOptionsWrapper = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n position: relative;\n padding-left: 0;\n cursor: pointer;\n background-color: ", ";\n width: 100%;\n min-width: max-content;\n min-width: -moz-max-content;\n /* overflow: auto; */\n"], ["\n position: relative;\n padding-left: 0;\n cursor: pointer;\n background-color: ", ";\n width: 100%;\n min-width: max-content;\n min-width: -moz-max-content;\n /* overflow: auto; */\n"])), themes_1.colors.white);
51
51
  var templateObject_1, templateObject_2, templateObject_3;
@@ -75,7 +75,7 @@ var OptionsSingle = function (_a) {
75
75
  }, [showOptions]);
76
76
  return (react_1.default.createElement(react_1.default.Fragment, null,
77
77
  react_1.default.createElement(OptionsShell_1.OptionsShell, { ref: optionsRef, yOrientation: yOrientation, lightboxHeight: lightboxHeight, lightboxStyle: lightboxStyle, options: options, optionsAnchor: optionsAnchor, showOptions: showOptions, SelectComp: SelectComp, handleHideOptions: handleHideOptions, label: label, optionsModalLabel: optionsModalLabel, relativeToRef: relativeToRef, popOutOfOverflowHiddenParent: popOutOfOverflowHiddenParent, alignDropdown: alignDropdown, matchSelectInputWidth: matchSelectInputWidth, S: S },
78
- react_1.default.createElement(List_1.List, { options: options, value: value, focussedOp: focussedOp, scrollFocussedOpIntoView: scrollFocussedOpIntoView, handleSelect: handleSelect, optionsClassName: optionsClassName, S: S, observerRef: observerRef, grouped: (0, getValue_1.isGroupedData)(options), isSearchable: isSearchable, searchbarPlaceholder: searchbarPlaceholder, searchBarFocus: searchBarFocus, searchString: searchString, setSearchString: setSearchString, setSearchBarFocus: setSearchBarFocus }),
78
+ react_1.default.createElement(List_1.List, { options: options, value: value, focussedOp: focussedOp, scrollFocussedOpIntoView: scrollFocussedOpIntoView, onChange: function (id, v) { return handleSelect(v); }, optionsClassName: optionsClassName, S: S, observerRef: observerRef, grouped: (0, getValue_1.isGroupedData)(options), isSearchable: isSearchable, searchbarPlaceholder: searchbarPlaceholder, searchBarFocus: searchBarFocus, searchString: searchString, setSearchString: setSearchString, setSearchBarFocus: setSearchBarFocus }),
79
79
  genCreateTagButton && genCreateTagButton(options))));
80
80
  };
81
81
  exports.OptionsSingle = OptionsSingle;
@@ -7,6 +7,8 @@ exports.genIcon = void 0;
7
7
  var react_1 = __importDefault(require("react"));
8
8
  var icons_1 = require("../../../../icons");
9
9
  var themes_1 = require("../../../themes");
10
+ var _EXPORTS_1 = require("../../../../utils/_EXPORTS");
11
+ var mixins_1 = require("../../../../themes/mixins");
10
12
  var grey40 = themes_1.colors.grey40;
11
13
  var genIcon = function (_a) {
12
14
  var icon = _a.icon, _b = _a.weight, weight = _b === void 0 ? "bold" : _b, disabled = _a.disabled, S = _a.S, color = _a.color, _c = _a.className, className = _c === void 0 ? '' : _c;
@@ -15,6 +17,8 @@ var genIcon = function (_a) {
15
17
  var IconComp = icons_1.icons[icon];
16
18
  if (!IconComp)
17
19
  return null;
18
- return react_1.default.createElement(IconComp, { className: className, size: S ? 16 : 20, style: { color: disabled ? grey40 : (color || undefined) }, weight: weight });
20
+ var screenWidth = (0, _EXPORTS_1.useScreenWidth)();
21
+ var isMobile = screenWidth <= (0, mixins_1.getBreakPoint)("sm");
22
+ return react_1.default.createElement(IconComp, { className: className, size: isMobile ? 18 : 16, style: { color: disabled ? grey40 : (color || undefined) }, weight: weight });
19
23
  };
20
24
  exports.genIcon = genIcon;
@@ -1,12 +1,13 @@
1
1
  export const GroupHeader: import("styled-components").StyledComponent<"div", any, {}, never>;
2
2
  export const GroupDivider: import("styled-components").StyledComponent<"div", any, {}, never>;
3
- export function ListGroup({ group, index, value, focussedOp, scrollFocussedOpIntoView, handleSelect, optionsClassName, invert, S, observerRef, isMulti, isTagsStyle, setFocusSelectTagsInput, setSearchString, setSearchBarFocus, }: {
3
+ export function ListGroup({ id, group, index, value, focussedOp, scrollFocussedOpIntoView, onChange: parentOnChange, optionsClassName, invert, S, observerRef, isMulti, isTagsStyle, setFocusSelectTagsInput, setSearchString, setSearchBarFocus, }: {
4
+ id: any;
4
5
  group: any;
5
6
  index: any;
6
7
  value: any;
7
8
  focussedOp: any;
8
9
  scrollFocussedOpIntoView: any;
9
- handleSelect: any;
10
+ onChange: any;
10
11
  optionsClassName: any;
11
12
  invert: any;
12
13
  S: any;
@@ -17,15 +17,15 @@ var ListItem_1 = require("./ListItem");
17
17
  exports.GroupHeader = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n padding: 0.4rem 0.8rem;\n color: ", ";\n"], ["\n padding: 0.4rem 0.8rem;\n color: ", ";\n"])), themes_1.colors.grey50);
18
18
  exports.GroupDivider = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n margin: 0.4rem 0 0.8rem 0;\n"], ["\n margin: 0.4rem 0 0.8rem 0;\n"])));
19
19
  var ListGroup = function (_a) {
20
- var group = _a.group, index = _a.index, value = _a.value, focussedOp = _a.focussedOp, scrollFocussedOpIntoView = _a.scrollFocussedOpIntoView, handleSelect = _a.handleSelect, optionsClassName = _a.optionsClassName, invert = _a.invert, S = _a.S, observerRef = _a.observerRef, isMulti = _a.isMulti, isTagsStyle = _a.isTagsStyle, setFocusSelectTagsInput = _a.setFocusSelectTagsInput, setSearchString = _a.setSearchString, setSearchBarFocus = _a.setSearchBarFocus;
20
+ var id = _a.id, group = _a.group, index = _a.index, value = _a.value, focussedOp = _a.focussedOp, scrollFocussedOpIntoView = _a.scrollFocussedOpIntoView, parentOnChange = _a.onChange, optionsClassName = _a.optionsClassName, invert = _a.invert, S = _a.S, observerRef = _a.observerRef, isMulti = _a.isMulti, isTagsStyle = _a.isTagsStyle, setFocusSelectTagsInput = _a.setFocusSelectTagsInput, setSearchString = _a.setSearchString, setSearchBarFocus = _a.setSearchBarFocus;
21
21
  return (react_1.default.createElement("div", null,
22
22
  index > 0 && (react_1.default.createElement(exports.GroupDivider, null,
23
23
  react_1.default.createElement(Divider_1.Divider, null))),
24
24
  react_1.default.createElement(exports.GroupHeader, null,
25
25
  react_1.default.createElement(Typo2_1.UI_TAG, null, group.display)),
26
- group.options.map(function (option, idx) { return (react_1.default.createElement(ListItem_1.ListItem, { key: option.value, option: option, isSelected: (!option.loading && (value === null || value === void 0 ? void 0 : value.value) === option.value), isFocussed: focussedOp === idx, index: idx, scrollFocussedOpIntoView: scrollFocussedOpIntoView, handleSelect: function () {
26
+ group.options.map(function (option, idx) { return (react_1.default.createElement(ListItem_1.ListItem, { key: option.value, option: option, isSelected: (!option.loading && (value === null || value === void 0 ? void 0 : value.value) === option.value), isFocussed: focussedOp === idx, index: idx, scrollFocussedOpIntoView: scrollFocussedOpIntoView, onChange: function () {
27
27
  if (!option.loading) {
28
- handleSelect(option);
28
+ parentOnChange(id, option);
29
29
  if (setSearchString)
30
30
  setSearchString("");
31
31
  if (setSearchBarFocus)
@@ -1,9 +1,10 @@
1
- export function ListItem({ option, isSelected, isFocussed, scrollFocussedOpIntoView, handleSelect, setSearchString, optionsClassName, S, observerRef, isTagsStyle, isMulti, value, index, }: {
1
+ export function ListItem({ id, option, isSelected, isFocussed, scrollFocussedOpIntoView, onChange: parentOnChange, setSearchString, optionsClassName, S, observerRef, isTagsStyle, isMulti, value, index, }: {
2
+ id: any;
2
3
  option: any;
3
4
  isSelected: any;
4
5
  isFocussed: any;
5
6
  scrollFocussedOpIntoView: any;
6
- handleSelect: any;
7
+ onChange: any;
7
8
  setSearchString: any;
8
9
  optionsClassName: any;
9
10
  S: any;
@@ -17,13 +17,13 @@ var RadioAndCheckbox_1 = require("../../RadioAndCheckbox");
17
17
  var styled_1 = require("./styled");
18
18
  var grey40 = themes_1.colors.grey40, grey80 = themes_1.colors.grey80, grey60 = themes_1.colors.grey60;
19
19
  var ListItem = function (_a) {
20
- var option = _a.option, isSelected = _a.isSelected, isFocussed = _a.isFocussed, scrollFocussedOpIntoView = _a.scrollFocussedOpIntoView, handleSelect = _a.handleSelect, setSearchString = _a.setSearchString, optionsClassName = _a.optionsClassName, S = _a.S, observerRef = _a.observerRef, isTagsStyle = _a.isTagsStyle, isMulti = _a.isMulti, value = _a.value, index = _a.index;
20
+ 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;
21
21
  var theme = (0, styled_components_1.useTheme)();
22
22
  var TypoComp = S ? Typo2_1.UI_BODY_SM_DF : Typo2_1.UI_BODY_SM_DF;
23
23
  var image = option.image, display = option.display, icon = option.icon, desc = option.desc, color = option.color, loading = option.loading, disabled = option.disabled;
24
24
  var handleClick = function () {
25
25
  if (!loading) {
26
- handleSelect(option);
26
+ parentOnChange(id, option);
27
27
  setSearchString && setSearchString("");
28
28
  }
29
29
  };
@@ -37,7 +37,7 @@ var ListItem = function (_a) {
37
37
  return (react_1.default.createElement(styled_1.StyledListItemWrapper, { index: index, isSelected: isSelected, isFocussed: isFocussed, className: "OKE-Dropdown__option", ref: function (el) { return isFocussed && el && scrollFocussedOpIntoView(el); }, onClick: handleClick, S: S, style: { pointerEvents: disabled && "none", cursor: !disabled && "pointer" } },
38
38
  react_1.default.createElement("div", { ref: observerRef, style: {
39
39
  display: "flex",
40
- alignItems: "flex-start",
40
+ alignItems: desc ? "flex-start" : "center",
41
41
  maxWidth: "36rem",
42
42
  gap: icon ? "0.6rem" : "0.8rem",
43
43
  } },
@@ -1,10 +1,11 @@
1
1
  export const StyledListWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
2
- export function List({ options, value, focussedOp, scrollFocussedOpIntoView, handleSelect, optionsClassName, invert, S, observerRef, isMulti, isTagsStyle, setFocusSelectTagsInput, grouped, disableShadow, isSearchable, searchbarPlaceholder, searchBarFocus, searchString, setSearchString, setSearchBarFocus, children, enableBorder, style }: {
2
+ export function List({ id, options, value, focussedOp, scrollFocussedOpIntoView, onChange: parentOnChange, optionsClassName, invert, S, observerRef, isMulti, isTagsStyle, setFocusSelectTagsInput, grouped, disableShadow, isSearchable, searchbarPlaceholder, searchBarFocus, searchString, setSearchString, setSearchBarFocus, children, enableBorder, style }: {
3
+ id: any;
3
4
  options?: any[];
4
5
  value: any;
5
6
  focussedOp: any;
6
7
  scrollFocussedOpIntoView: any;
7
- handleSelect: any;
8
+ onChange: any;
8
9
  optionsClassName: any;
9
10
  invert: any;
10
11
  S: any;
@@ -57,17 +57,17 @@ exports.StyledListWrapper = styled_components_1.default.div(templateObject_3 ||
57
57
  });
58
58
  var List = function (_a) {
59
59
  // const theme = useTheme();
60
- var _b = _a.options, options = _b === void 0 ? [] : _b, value = _a.value, focussedOp = _a.focussedOp, scrollFocussedOpIntoView = _a.scrollFocussedOpIntoView, handleSelect = _a.handleSelect, optionsClassName = _a.optionsClassName, invert = _a.invert, S = _a.S, observerRef = _a.observerRef, _c = _a.isMulti, isMulti = _c === void 0 ? false : _c, isTagsStyle = _a.isTagsStyle, setFocusSelectTagsInput = _a.setFocusSelectTagsInput, _d = _a.grouped, grouped = _d === void 0 ? false : _d, disableShadow = _a.disableShadow, isSearchable = _a.isSearchable, searchbarPlaceholder = _a.searchbarPlaceholder, searchBarFocus = _a.searchBarFocus, searchString = _a.searchString, setSearchString = _a.setSearchString, setSearchBarFocus = _a.setSearchBarFocus, children = _a.children, enableBorder = _a.enableBorder, style = _a.style;
60
+ var id = _a.id, _b = _a.options, options = _b === void 0 ? [] : _b, value = _a.value, focussedOp = _a.focussedOp, scrollFocussedOpIntoView = _a.scrollFocussedOpIntoView, parentOnChange = _a.onChange, optionsClassName = _a.optionsClassName, invert = _a.invert, S = _a.S, observerRef = _a.observerRef, _c = _a.isMulti, isMulti = _c === void 0 ? false : _c, isTagsStyle = _a.isTagsStyle, setFocusSelectTagsInput = _a.setFocusSelectTagsInput, _d = _a.grouped, grouped = _d === void 0 ? false : _d, disableShadow = _a.disableShadow, isSearchable = _a.isSearchable, searchbarPlaceholder = _a.searchbarPlaceholder, searchBarFocus = _a.searchBarFocus, searchString = _a.searchString, setSearchString = _a.setSearchString, setSearchBarFocus = _a.setSearchBarFocus, children = _a.children, enableBorder = _a.enableBorder, style = _a.style;
61
61
  var renderListItems = function () {
62
62
  if (options.length === 0) {
63
63
  return react_1.default.createElement(NoOptionResultsComp_1.NoOptionResultsComp, { S: S });
64
64
  }
65
65
  if (grouped) {
66
- return (react_1.default.createElement(react_1.Fragment, null, options.map(function (group, index) { return (react_1.default.createElement(ListGroup_1.ListGroup, { key: "group-".concat(index), group: group, index: index, value: value, focussedOp: focussedOp, scrollFocussedOpIntoView: scrollFocussedOpIntoView, handleSelect: handleSelect, optionsClassName: optionsClassName, invert: invert, S: S, observerRef: observerRef, isMulti: isMulti, isTagsStyle: isTagsStyle, setFocusSelectTagsInput: setFocusSelectTagsInput, setSearchString: setSearchString, setSearchBarFocus: setSearchBarFocus, disableShadow: disableShadow })); })));
66
+ return (react_1.default.createElement(react_1.Fragment, null, options.map(function (group, index) { return (react_1.default.createElement(ListGroup_1.ListGroup, { id: id, key: "group-".concat(index), group: group, index: index, value: value, focussedOp: focussedOp, scrollFocussedOpIntoView: scrollFocussedOpIntoView, onChange: parentOnChange, optionsClassName: optionsClassName, invert: invert, S: S, observerRef: observerRef, isMulti: isMulti, isTagsStyle: isTagsStyle, setFocusSelectTagsInput: setFocusSelectTagsInput, setSearchString: setSearchString, setSearchBarFocus: setSearchBarFocus, disableShadow: disableShadow })); })));
67
67
  }
68
- return options.map(function (option, index) { return (react_1.default.createElement(ListItem_1.ListItem, { key: option.value, option: option, isSelected: (!option.loading && (value === null || value === void 0 ? void 0 : value.value) === option.value), isFocussed: focussedOp === index, index: index, scrollFocussedOpIntoView: scrollFocussedOpIntoView, handleSelect: function () {
68
+ return options.map(function (option, index) { return (react_1.default.createElement(ListItem_1.ListItem, { key: option.value, option: option, isSelected: (!option.loading && (value === null || value === void 0 ? void 0 : value.value) === option.value), isFocussed: focussedOp === index, index: index, scrollFocussedOpIntoView: scrollFocussedOpIntoView, onChange: function () {
69
69
  if (!option.loading) {
70
- handleSelect(option);
70
+ parentOnChange(id, option);
71
71
  if (setSearchString)
72
72
  setSearchString("");
73
73
  if (setSearchBarFocus)
@@ -36,8 +36,10 @@ var Base = function (_a) {
36
36
  var handleClick = function (v) {
37
37
  onChange && onChange(id, saveValueAsString ? v.value : v);
38
38
  };
39
- var genIconInTab = function (iconName) {
40
- var IconComp = icons_1.icons[iconName];
39
+ var tabsHasText = options.some(function (tab) { return tab === null || tab === void 0 ? void 0 : tab.display; }); // if false, all tabs have only icons no display text
40
+ var genIconInTab = function (_a) {
41
+ var icon = _a.icon;
42
+ var IconComp = icons_1.icons[icon];
41
43
  if (!IconComp)
42
44
  return null;
43
45
  //else
@@ -48,14 +50,14 @@ var Base = function (_a) {
48
50
  !scrollIsAtStart && (react_1.default.createElement(index_styled_1.StyledDirectionButtons, { left: true },
49
51
  react_1.default.createElement(Buttons_1.ButtonGhost, { S: true, icon: 'CaretLeft', style: { height: '100%' }, onClick: function () { return slide("left"); } }))),
50
52
  react_1.default.createElement("div", { ref: scrollContainerRef, style: { maxWidth: '100%', height: '100%', overflow: 'hidden' } },
51
- react_1.default.createElement(index_styled_1.TabBarRowStyled, { id: id, translateX: scrollX }, options.map(function (op) {
53
+ react_1.default.createElement(index_styled_1.TabBarRowStyled, { id: id, translateX: scrollX, tabsHasText: tabsHasText }, options.map(function (op) {
52
54
  var tabHasError = errorTabs && errorTabs.some(function (tab) { return tab.value === op.value; });
53
55
  var tabIsDisabled = disabledTabs && disabledTabs.some(function (tab) { return tab.value === op.value; });
54
56
  var tabIsActive = value && op.value === value.value;
55
57
  return (react_1.default.createElement(index_styled_1.TabBarTabWrapper, { tabBarStyle: tabBarStyle, key: op.value, active: tabIsActive, error: tabHasError, disabled: tabIsDisabled, black: black },
56
- react_1.default.createElement(index_styled_1.TabBarTabStyled, { size: size, active: tabIsActive, error: tabHasError, disabled: tabIsDisabled, tabBarStyle: tabBarStyle, onClick: function () { return handleClick(op); }, black: black },
58
+ react_1.default.createElement(index_styled_1.TabBarTabStyled, { tabsHasText: tabsHasText, size: size, active: tabIsActive, error: tabHasError, disabled: tabIsDisabled, tabBarStyle: tabBarStyle, onClick: function () { return handleClick(op); }, black: black },
57
59
  react_1.default.createElement("div", { style: { display: 'flex', alignItems: 'center', gap: '0.4rem' } },
58
- op.icon && genIconInTab(op.icon),
60
+ op.icon && genIconInTab({ icon: op.icon, display: op.display }),
59
61
  op.display &&
60
62
  react_1.default.createElement(index_styled_1.STYLED_TYPO, { capitalize: true }, op.display),
61
63
  op.message &&
@@ -88,7 +88,10 @@ exports.TabBarStyled = styled_components_1.default.div(templateObject_7 || (temp
88
88
  return size === 'S' ? '2.5rem' : 'auto';
89
89
  });
90
90
  exports.TabBarContainerStyled = styled_components_1.default.div(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n height: 100%;\n display: flex;\n align-items: center;\n position: relative;\n"], ["\n height: 100%;\n display: flex;\n align-items: center;\n position: relative;\n"])));
91
- exports.TabBarRowStyled = styled_components_1.default.div(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n display: flex;\n height: 100%;\n white-space: nowrap;\n width: fit-content;\n gap: 0.4rem;\n ", ";\n transform: ", ";\n"], ["\n display: flex;\n height: 100%;\n white-space: nowrap;\n width: fit-content;\n gap: 0.4rem;\n ", ";\n transform: ", ";\n"])), (0, mixins_1.transition)('transform'), function (_a) {
91
+ exports.TabBarRowStyled = styled_components_1.default.div(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n display: flex;\n height: 100%;\n white-space: nowrap;\n width: fit-content;\n gap: ", ";\n ", ";\n transform: ", ";\n"], ["\n display: flex;\n height: 100%;\n white-space: nowrap;\n width: fit-content;\n gap: ", ";\n ", ";\n transform: ", ";\n"])), function (_a) {
92
+ var tabsHasText = _a.tabsHasText;
93
+ return tabsHasText ? "0.4rem" : 0;
94
+ }, (0, mixins_1.transition)('transform'), function (_a) {
92
95
  var translateX = _a.translateX;
93
96
  return "translateX(".concat(translateX, "px)");
94
97
  });
@@ -99,7 +102,10 @@ exports.TabBarTabWrapper = styled_components_1.default.div(templateObject_10 ||
99
102
  return exports.wrapperStyles.style1;
100
103
  }
101
104
  });
102
- exports.TabBarTabStyled = styled_components_1.default.button(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n padding: 0.45rem 0.8rem;\n height: 100%;\n cursor: pointer;\n border: none;\n display: flex;\n justify-content: center;\n align-items: center;\n\n\n ", " \n"], ["\n padding: 0.45rem 0.8rem;\n height: 100%;\n cursor: pointer;\n border: none;\n display: flex;\n justify-content: center;\n align-items: center;\n\n\n ", " \n"])), function (_a) {
105
+ exports.TabBarTabStyled = styled_components_1.default.button(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n padding: ", ";\n height: 100%;\n cursor: pointer;\n border: none;\n display: flex;\n justify-content: center;\n align-items: center;\n\n\n ", " \n"], ["\n padding: ", ";\n height: 100%;\n cursor: pointer;\n border: none;\n display: flex;\n justify-content: center;\n align-items: center;\n\n\n ", " \n"])), function (_a) {
106
+ var tabsHasText = _a.tabsHasText;
107
+ return tabsHasText ? "0.45rem 0.8rem" : "1rem 1rem";
108
+ }, function (_a) {
103
109
  var tabBarStyle = _a.tabBarStyle;
104
110
  switch (tabBarStyle) {
105
111
  case "1":
@@ -36,15 +36,6 @@ var __importStar = (this && this.__importStar) || (function () {
36
36
  return result;
37
37
  };
38
38
  })();
39
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
40
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
41
- if (ar || !(i in from)) {
42
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
43
- ar[i] = from[i];
44
- }
45
- }
46
- return to.concat(ar || Array.prototype.slice.call(from));
47
- };
48
39
  var __importDefault = (this && this.__importDefault) || function (mod) {
49
40
  return (mod && mod.__esModule) ? mod : { "default": mod };
50
41
  };
@@ -54,7 +45,7 @@ var styled_components_1 = __importDefault(require("styled-components"));
54
45
  var __1 = require("../../../../../..");
55
46
  var Typo2_1 = require("../../../../Typo2");
56
47
  var LegendTooltipGlyph_1 = require("../LegendTooltipGlyph");
57
- var UI_CAPTION_DF_WITH_LINE_CLAMP = (0, styled_components_1.default)(Typo2_1.UI_CAPTION_DF)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n \n ", "\n"], ["\n \n ", "\n"])), function (_a) {
48
+ var UI_CAPTION_DF_WITH_LINE_CLAMP = (0, styled_components_1.default)(Typo2_1.UI_CAPTION_DF)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n \n /* ", " */\n"], ["\n \n /* ", " */\n"])), function (_a) {
58
49
  var clampT = _a.clampT;
59
50
  return clampT ? (0, __1.clampText)(3) : '';
60
51
  });
@@ -97,24 +88,6 @@ var CustomTooltip = function (props) {
97
88
  gap: "1rem",
98
89
  // pointerEvents: "none", // Add this to prevent tooltip from interfering with mouse events
99
90
  };
100
- var tooltipLabelLengthRefs = (0, react_1.useRef)([]);
101
- var _a = (0, react_1.useState)([]), rowHeights = _a[0], setRowHeights = _a[1];
102
- var _b = (0, react_1.useState)((value === null || value === void 0 ? void 0 : value.map(function (v) { return true; })) || []), tooltipTextClampStates = _b[0], setTooltipTextClampStates = _b[1];
103
- (0, react_1.useEffect)(function () {
104
- if (!tooltipTextClampStates) {
105
- setTooltipTextClampStates(value === null || value === void 0 ? void 0 : value.map(function (v) { return true; }));
106
- }
107
- }, [value]);
108
- (0, react_1.useEffect)(function () {
109
- // console.log({ tooltipLabelLengthRefs });
110
- var rowHeightsToSet = tooltipLabelLengthRefs.current.map(function (ref) {
111
- var _a;
112
- var heightOfLabelText = (_a = ref === null || ref === void 0 ? void 0 : ref.getBoundingClientRect()) === null || _a === void 0 ? void 0 : _a.height;
113
- // console.log({heightOfLabelText})
114
- return heightOfLabelText || null;
115
- });
116
- setRowHeights(rowHeightsToSet);
117
- }, [tooltipTextClampStates.join()]);
118
91
  if (!isActive)
119
92
  return null;
120
93
  return (react_1.default.createElement(react_1.Fragment, null,
@@ -125,7 +98,7 @@ var CustomTooltip = function (props) {
125
98
  gridTemplateColumns: showPercent ? "auto auto auto" : "auto auto",
126
99
  gap: "0.6rem",
127
100
  } },
128
- react_1.default.createElement("div", { style: { display: "flex", flexDirection: "column", gap: "1rem" } }, value.map(function (entry, index) { return (react_1.default.createElement("div", { key: index, style: { height: rowHeights[index] ? rowHeights[index] + "px" : "auto" } },
101
+ react_1.default.createElement("div", { style: { display: "flex", flexDirection: "column", gap: "1rem" } }, value.map(function (entry, index) { return (react_1.default.createElement("div", { key: index },
129
102
  react_1.default.createElement("div", { style: {
130
103
  display: "flex",
131
104
  alignItems: "center",
@@ -133,27 +106,15 @@ var CustomTooltip = function (props) {
133
106
  } },
134
107
  react_1.default.createElement(LegendTooltipGlyph_1.LegendTooltipGlyph, { color: entry.barColor }),
135
108
  react_1.default.createElement(Typo2_1.UI_CAPTION_BOLD_DF, null, showPercent ? entry.percentage + "%" : entry.count || "0")))); })),
136
- showPercent && (react_1.default.createElement("div", { style: { display: "flex", flexDirection: "column", gap: "1rem" } }, value.map(function (entry, index) { return (react_1.default.createElement("div", { key: index, style: {
137
- height: rowHeights[index]
138
- ? rowHeights[index] + "px"
139
- : "auto",
140
- } },
109
+ showPercent && (react_1.default.createElement("div", { style: { display: "flex", flexDirection: "column", gap: "1rem" } }, value.map(function (entry, index) { return (react_1.default.createElement("div", { key: index },
141
110
  react_1.default.createElement(Typo2_1.UI_CAPTION_DF, { key: index }, entry.count || "0"))); }))),
142
111
  react_1.default.createElement("div", { style: {
143
112
  paddingLeft: "0.8rem",
144
113
  display: "flex",
145
114
  flexDirection: "column",
146
115
  gap: "1rem",
147
- } }, value.map(function (entry, index) { return (react_1.default.createElement("div", { key: index, onMouseOver: function () { return setTooltipTextClampStates(function (prev) {
148
- var newState = __spreadArray([], prev, true);
149
- newState[index] = false;
150
- return newState;
151
- }); }, onMouseOut: function () { return setTooltipTextClampStates(function (prev) {
152
- var newState = __spreadArray([], prev, true);
153
- newState[index] = true;
154
- return newState;
155
- }); }, ref: function (el) { return (tooltipLabelLengthRefs.current[index] = el); } },
156
- react_1.default.createElement(UI_CAPTION_DF_WITH_LINE_CLAMP, { clampT: tooltipTextClampStates[index] }, entry.tooltipLabel))); }))))));
116
+ } }, value.map(function (entry, index) { return (react_1.default.createElement("div", { key: index },
117
+ react_1.default.createElement(UI_CAPTION_DF_WITH_LINE_CLAMP, null, entry.tooltipLabel))); }))))));
157
118
  };
158
119
  exports.default = CustomTooltip;
159
120
  var templateObject_1;
@@ -127,9 +127,9 @@ var renderCustomizedLabel = function (_a) {
127
127
  };
128
128
  var renderActiveShape = function (props) {
129
129
  var cx = props.cx, cy = props.cy, innerRadius = props.innerRadius, outerRadius = props.outerRadius, startAngle = props.startAngle, endAngle = props.endAngle, fill = props.fill, payload = props.payload, midAngle = props.midAngle;
130
- var radius = innerRadius + (outerRadius - innerRadius) * 0.45; // Moved closer to center
131
- var x = cx + radius * Math.cos(-midAngle * RADIAN);
132
- var y = cy + radius * Math.sin(-midAngle * RADIAN);
130
+ // const radius = innerRadius + (outerRadius - innerRadius) * 0.45; // Moved closer to center
131
+ // const x = cx + radius * Math.cos(-midAngle * RADIAN);
132
+ // const y = cy + radius * Math.sin(-midAngle * RADIAN);
133
133
  return (react_1.default.createElement("g", null,
134
134
  react_1.default.createElement(recharts_1.Sector, { cx: cx, cy: cy, innerRadius: innerRadius, outerRadius: outerRadius + 6, startAngle: startAngle, endAngle: endAngle, fill: fill })));
135
135
  };
@@ -173,7 +173,6 @@ var PieChart = function (_a) {
173
173
  };
174
174
  if (data.length === 0)
175
175
  return react_1.default.createElement("div", null, "No data available");
176
- console.log({ mousePosition: mousePosition });
177
176
  return (react_1.default.createElement("div", { ref: vizWrapperRef, style: __assign(__assign({}, style), { width: "100%", display: 'flex', gap: '8px', flexDirection: orientation === 'vertical' ? 'row' : 'column', position: 'relative' }) },
178
177
  showTooltip && tooltipData && (react_1.default.createElement(CustomTooltip_1.default, { active: true, value: [tooltipData.labels], showPercent: showPercent, mousePosition: mousePosition })),
179
178
  react_1.default.createElement("div", { style: { flexGrow: 1, position: 'relative' } },
@@ -4,10 +4,10 @@ exports.colors = exports.dataVizColorsText = exports.dataVizColors = void 0;
4
4
  var primary = "#00223D";
5
5
  var secondary = "#526070";
6
6
  var tertiary = "#30133E";
7
- var primaryContainer = "#184469";
8
- var onPrimary = "#BBDAFF";
9
- var secondaryContainer = "#D9E8FC";
10
- var onSecondary = "#3E4C5B";
7
+ var primaryContainer = "#0776ED";
8
+ var onPrimary = "#FFFFFF";
9
+ var secondaryContainer = "#C9E2FC";
10
+ var onSecondary = "#0F3257";
11
11
  var tertiaryContainer = "#533461";
12
12
  var onTertiary = "#F0C8FF";
13
13
  var surfaceContainer = "#EEEDF1";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oolib",
3
- "version": "2.198.5",
3
+ "version": "2.199.0",
4
4
  "description": " OKE Component Library",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",