esewa-ui-library 1.0.5 → 1.0.7

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.
@@ -6999,7 +6999,7 @@ var ESewaCarousel = function ESewaCarousel(_ref) {
6999
6999
 
7000
7000
  var _templateObject$k, _templateObject2;
7001
7001
  var ChipContainer = styled.div(_templateObject$k || (_templateObject$k = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n padding: 8px;\n"])));
7002
- var Chip = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 8px 12px;\n border-radius: 16px;\n cursor: pointer;\n font-size: 14px;\n background-color: ", ";\n color: ", ";\n &.border-radius-0 {\n border-radius: var(--values-value-0);\n }\n &.border-radius-2 {\n border-radius: var(--values-value-2);\n }\n &.border-radius-4 {\n border-radius: var(--values-value-4);\n }\n &.border-radius-8 {\n border-radius: var(--values-value-8);\n }\n &.border-radius-16 {\n border-radius: var(--values-value-16);\n }\n"])), function (_ref) {
7002
+ var Chip = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 8px 12px;\n border-radius: 16px;\n cursor: pointer;\n font-size: 14px;\n background-color: ", ";\n color: ", ";\n &.border-radius-0 {\n border-radius: var(--values-value-0);\n }\n &.border-radius-2 {\n border-radius: var(--values-value-2);\n }\n &.border-radius-4 {\n border-radius: var(--values-value-4);\n }\n &.border-radius-8 {\n border-radius: var(--values-value-8);\n }\n &.border-radius-16 {\n border-radius: var(--values-value-16);\n }\n i{\n font-size: var(--values-value-12);\n }\n"])), function (_ref) {
7003
7003
  var selected = _ref.selected;
7004
7004
  return selected ? 'var(--primary-500)' : 'var(--secondary-bg-light)';
7005
7005
  }, function (_ref2) {
@@ -7033,7 +7033,9 @@ var ESewaChipGroup = function ESewaChipGroup(_ref3) {
7033
7033
  onClick: function onClick() {
7034
7034
  return handleSelectChip(chip.id);
7035
7035
  }
7036
- }, chip.showIcon && chip.icon && React__default.createElement("span", null, chip.icon), chip.text);
7036
+ }, chip.showIcon && chip.icon && React__default.createElement("i", {
7037
+ className: chip.icon
7038
+ }), chip.text);
7037
7039
  }));
7038
7040
  };
7039
7041
 
@@ -7702,16 +7704,21 @@ var CONNECT_APP = function CONNECT_APP(data) {
7702
7704
  if ((_window$webkit = window.webkit) !== null && _window$webkit !== void 0 && _window$webkit.messageHandlers.iOSNative) {
7703
7705
  window.webkit.messageHandlers.iOSNative.postMessage(data);
7704
7706
  } else {
7705
- console.warn('iOS interface not available');
7707
+ console.warn('IOS interface not available');
7706
7708
  }
7707
7709
  }
7708
7710
  };
7709
- var requestFromMiniApp = function requestFromMiniApp(data, callbackKey, callback) {
7710
- var _window$webkit2, _window$webkit2$messa;
7711
- if (window.Android) {
7712
- window.Android[callbackKey] = callback;
7713
- } else if ((_window$webkit2 = window.webkit) !== null && _window$webkit2 !== void 0 && (_window$webkit2$messa = _window$webkit2.messageHandlers) !== null && _window$webkit2$messa !== void 0 && _window$webkit2$messa.iOSNative) {
7714
- window.webkit.messageHandlers.iOSNative[callbackKey] = callback;
7711
+ var requestFromMiniApp = function requestFromMiniApp(data, callbackFn) {
7712
+ var callbackKey = data.callbackKey;
7713
+ if (!callbackKey) {
7714
+ throw new Error('Callback key is missing in request data');
7715
+ }
7716
+ if (isAndroid) {
7717
+ window.Android = window.Android || {};
7718
+ window.Android[callbackKey] = callbackFn;
7719
+ } else if (isiOS) {
7720
+ window.iOSNative = window.iOSNative || {};
7721
+ window.iOSNative[callbackKey] = callbackFn;
7715
7722
  }
7716
7723
  CONNECT_APP(JSON.stringify(data));
7717
7724
  };