oolib 2.168.3 → 2.168.5

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.
@@ -34,10 +34,17 @@ var Buttons_1 = require("../../../Buttons");
34
34
  var Modal_1 = require("../../../Modals/Modal");
35
35
  var styled_1 = require("./styled");
36
36
  var OptionsAnimateWrapper_1 = require("./comps/OptionsAnimateWrapper");
37
+ var styled_components_1 = require("styled-components");
38
+ var DefaultMobileShell = function (_a) {
39
+ var children = _a.children;
40
+ 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' } }));
41
+ };
37
42
  exports.OptionsShell = react_1.default.forwardRef(function (_a, ref) {
38
43
  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, invert = _a.invert, showDoneButton = _a.showDoneButton, _b = _a.popOutOfOverflowHiddenParent, popOutOfOverflowHiddenParent = _b === void 0 ? false : _b, relativeToRef = _a.relativeToRef, S = _a.S, alignDropdown = _a.alignDropdown;
39
44
  var screenWidth = (0, useScreenWidth_1.useScreenWidth)();
40
45
  var isDesktop = screenWidth >= (0, mixins_1.getBreakPoint)("sm");
46
+ var currentTheme = (0, styled_components_1.useTheme)();
47
+ var MobileShell = (currentTheme === null || currentTheme === void 0 ? void 0 : currentTheme.MobileShell) || DefaultMobileShell;
41
48
  var _c = (0, usePopOutOfOverflowHiddenParent_1.usePopOutOfOverflowHiddenParent)(popOutOfOverflowHiddenParent), fixPos = _c.fixPos, applyFixedPos = _c.applyFixedPos, removeFixedPos = _c.removeFixedPos, trackerRef = _c.trackerRef;
42
49
  (0, react_1.useEffect)(function () {
43
50
  if (popOutOfOverflowHiddenParent) {
@@ -56,7 +63,18 @@ exports.OptionsShell = react_1.default.forwardRef(function (_a, ref) {
56
63
  position: "absolute",
57
64
  bottom: yOrientation === "top" ? undefined : 0,
58
65
  top: yOrientation === "top" ? 0 : undefined,
59
- } }, children)))) : (react_1.default.createElement(framer_motion_1.AnimatePresence, null, showOptions ? (react_1.default.createElement(Modal_1.Modal, { fitToContentHeight: true, title: optionsModalLabel || label, onClose: handleHideOptions, invert: invert, S: S, dynamicHeaderHeight: true },
66
+ } }, children)))) : (
67
+ // <AnimatePresence>
68
+ // {showOptions ? (
69
+ // <Modal
70
+ // fitToContentHeight
71
+ // title={optionsModalLabel || label}
72
+ // onClose={handleHideOptions}
73
+ // invert={invert}
74
+ // S={S}
75
+ // dynamicHeaderHeight
76
+ // >
77
+ react_1.default.createElement(react_1.Fragment, null, showOptions ? (react_1.default.createElement(MobileShell, null,
60
78
  SelectComp && SelectComp,
61
79
  react_1.default.createElement(styled_1.StyledModalOptionsWrapper, { invert: invert, ref: ref }, children),
62
80
  showDoneButton && (react_1.default.createElement("div", { style: {
@@ -65,5 +83,9 @@ exports.OptionsShell = react_1.default.forwardRef(function (_a, ref) {
65
83
  position: "sticky",
66
84
  bottom: "0",
67
85
  } },
68
- react_1.default.createElement(Buttons_1.ButtonPrimary, { children: "Done", width: "100%", onClick: handleHideOptions, S: S }))))) : null));
86
+ react_1.default.createElement(Buttons_1.ButtonPrimary, { children: "Done", width: "100%", onClick: handleHideOptions, S: S }))))) : null)
87
+ // </Modal>
88
+ // ) : null}
89
+ // </AnimatePresence>
90
+ );
69
91
  });
@@ -250,7 +250,8 @@ var Dropdowns = function (args) {
250
250
  var _a;
251
251
  return (__assign(__assign({}, prev), (_a = {}, _a[args.selection] = v, _a)));
252
252
  });
253
- }, selectConfig: args.showIconInSelectArea ? ["display", "icon"] : args.showColorInSelectArea ? ["display", "color"] : ["display"], label: "Dropdown Component", sublabel: "Select single or multiple options in dropdown based on Selection Type", popOutOfOverflowHiddenParent: args.popOutOfOverflowHiddenParent }))))));
253
+ }, selectConfig: args.showIconInSelectArea ? ["display", "icon"] : args.showColorInSelectArea ? ["display", "color"] : ["display"], label: "Dropdown Component", sublabel: "Select single or multiple options in dropdown based on Selection Type", popOutOfOverflowHiddenParent: args.popOutOfOverflowHiddenParent }))),
254
+ react_1.default.createElement("div", { style: { height: '1000px', background: 'red' } }))));
254
255
  };
255
256
  exports.Dropdowns = Dropdowns;
256
257
  // export const Button_Primary = (args) => (
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oolib",
3
- "version": "2.168.3",
3
+ "version": "2.168.5",
4
4
  "description": " OKE Component Library",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",