esewa-ui-library 1.0.3 → 1.0.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.
- package/README.md +184 -14
- package/dist/@types/index.d.ts +8 -5
- package/dist/components/Radio/eSewaRadio.d.ts +5 -3
- package/dist/index.js +21 -14
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +21 -14
- package/dist/index.modern.js.map +1 -1
- package/dist/services/eSewaService.d.ts +2 -2
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -183,7 +183,7 @@ var StyledAppBar = styled.header.attrs(function (_ref) {
|
|
|
183
183
|
return {
|
|
184
184
|
titleposition: titleposition
|
|
185
185
|
};
|
|
186
|
-
})(_templateObject$3 || (_templateObject$3 = _taggedTemplateLiteralLoose(["\n .e-app-bar {\n display: flex;\n justify-content: space-between;\n flex-direction: row;\n align-items: center;\n background-color: var(--appbar-bg-top);\n padding: 7px 12px;\n position:
|
|
186
|
+
})(_templateObject$3 || (_templateObject$3 = _taggedTemplateLiteralLoose(["\n width: 100%;\n\n .e-app-bar {\n display: flex;\n justify-content: space-between;\n flex-direction: row;\n align-items: center;\n background-color: var(--appbar-bg-top);\n padding: 7px 12px;\n position: relative;\n height: 42px;\n // left: 0;\n // right: 0;\n gap: var(--values-value-8);\n\n &--nav-icon, &--close-icon {\n padding: 7px;\n color: var(--white);\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n /* Title section */\n &--title-wrapper {\n display: flex;\n justify-content: ", ";\n align-items: center;\n width: 100%; // Ensures the title section takes full width to apply the alignment\n }\n\n &--title {\n display: flex;\n align-items: center;\n gap: 12px;\n overflow: hidden;\n // display: -webkit-box;\n // -webkit-line-clamp: 1;\n // line-clamp: 1;\n // -webkit-box-orient: vertical;\n }\n\n &--title-image img {\n width: 32px;\n object-fit: cover;\n // margin-left: -32px;\n background: var(--white);\n border: 1px solid var(--border);\n border-radius: var(--grid-borderradius-border-radius-xs);\n }\n\n &--title-label {\n color: var(--white);\n letter-spacing: 0.4px;\n font-size: var(--values-value-16);\n font-weight: 500;\n }\n }\n"])), function (props) {
|
|
187
187
|
return props.titleposition === 'left' ? 'flex-start' : props.titleposition === 'right' ? 'flex-end' : 'center';
|
|
188
188
|
});
|
|
189
189
|
var ESewaAppBar = function ESewaAppBar(_ref2) {
|
|
@@ -7094,18 +7094,22 @@ var EsewaFullPageLoadingScreen = function EsewaFullPageLoadingScreen(_ref) {
|
|
|
7094
7094
|
};
|
|
7095
7095
|
|
|
7096
7096
|
var _templateObject$l;
|
|
7097
|
-
var StyledRadio = styled.div(_templateObject$l || (_templateObject$l = _taggedTemplateLiteralLoose(["\n .container{\n display:flex;\n align-items: center;\n gap: 8px;\n }\n\n .container input[type=\"radio\" i] {\n margin: 0;\n appearance: none;\n width: 16px;\n height: 16px;\n border: 2px solid var(--secondary);\n border-radius: 50%;\n position: relative;\n cursor: pointer;\n transition: border-color 0.3s ease;\n }\n\n .container input[type=\"radio\"]:checked {\n border-color: var(--primary);\n }\n\n .container input[type=\"radio\"]::before {\n content: '';\n width: 10px;\n height: 10px;\n background-color: transparent;\n border-radius: 50%;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n transition: background-color 0.3s ease;\n }\n\n .container input[type=\"radio\"]:checked::before {\n background-color: var(--primary);\n }\n"])));
|
|
7097
|
+
var StyledRadio = styled.div(_templateObject$l || (_templateObject$l = _taggedTemplateLiteralLoose(["\n .container{\n display:flex;\n align-items: center;\n gap: 8px;\n }\n\n .container input[type=\"radio\" i] {\n margin: 0;\n appearance: none;\n width: 16px;\n height: 16px;\n border: 2px solid var(--secondary);\n border-radius: 50%;\n position: relative;\n cursor: pointer;\n transition: border-color 0.3s ease;\n }\n\n .container input[type=\"radio\"]:checked {\n border-color: var(--primary);\n }\n\n .container input[type=\"radio\"]::before {\n content: '';\n width: 10px;\n height: 10px;\n background-color: transparent;\n border-radius: 50%;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n transition: background-color 0.3s ease;\n }\n\n .container input[type=\"radio\"]:checked::before {\n background-color: var(--primary);\n }\n\n .container input[type=\"radio\"]:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n }\n"])));
|
|
7098
7098
|
var ESewaRadio = function ESewaRadio(_ref) {
|
|
7099
7099
|
var label = _ref.label,
|
|
7100
|
+
value = _ref.value,
|
|
7100
7101
|
name = _ref.name,
|
|
7101
7102
|
className = _ref.className,
|
|
7102
7103
|
_ref$labelClass = _ref.labelClass,
|
|
7103
7104
|
labelClass = _ref$labelClass === void 0 ? '' : _ref$labelClass,
|
|
7104
7105
|
onChange = _ref.onChange,
|
|
7105
|
-
checked = _ref.checked
|
|
7106
|
+
_ref$checked = _ref.checked,
|
|
7107
|
+
checked = _ref$checked === void 0 ? false : _ref$checked,
|
|
7108
|
+
_ref$disabled = _ref.disabled,
|
|
7109
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled;
|
|
7106
7110
|
var handleRadioChange = function handleRadioChange(e) {
|
|
7107
|
-
if (onChange) {
|
|
7108
|
-
onChange(e.target.checked);
|
|
7111
|
+
if (onChange && !disabled) {
|
|
7112
|
+
onChange(value, e.target.checked);
|
|
7109
7113
|
}
|
|
7110
7114
|
};
|
|
7111
7115
|
return React__default.createElement(StyledRadio, null, React__default.createElement("div", {
|
|
@@ -7115,8 +7119,10 @@ var ESewaRadio = function ESewaRadio(_ref) {
|
|
|
7115
7119
|
}, React__default.createElement("input", {
|
|
7116
7120
|
type: 'radio',
|
|
7117
7121
|
name: name,
|
|
7122
|
+
value: value,
|
|
7118
7123
|
checked: checked,
|
|
7119
|
-
onChange: handleRadioChange
|
|
7124
|
+
onChange: handleRadioChange,
|
|
7125
|
+
disabled: disabled
|
|
7120
7126
|
}), React__default.createElement("span", {
|
|
7121
7127
|
className: "" + labelClass
|
|
7122
7128
|
}, label))));
|
|
@@ -7694,7 +7700,7 @@ var CONNECT_APP = function CONNECT_APP(data) {
|
|
|
7694
7700
|
if (isiOS) {
|
|
7695
7701
|
var _window$webkit;
|
|
7696
7702
|
if ((_window$webkit = window.webkit) !== null && _window$webkit !== void 0 && _window$webkit.messageHandlers.iOSNative) {
|
|
7697
|
-
window.webkit.messageHandlers.iOSNative.
|
|
7703
|
+
window.webkit.messageHandlers.iOSNative.postMessage(data);
|
|
7698
7704
|
} else {
|
|
7699
7705
|
console.warn('iOS interface not available');
|
|
7700
7706
|
}
|
|
@@ -7705,8 +7711,7 @@ var requestFromMiniApp = function requestFromMiniApp(data, callbackKey, callback
|
|
|
7705
7711
|
if (window.Android) {
|
|
7706
7712
|
window.Android[callbackKey] = callback;
|
|
7707
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) {
|
|
7708
|
-
window.
|
|
7709
|
-
window.miniAppResponse[callbackKey] = callback;
|
|
7714
|
+
window.webkit.messageHandlers.iOSNative[callbackKey] = callback;
|
|
7710
7715
|
}
|
|
7711
7716
|
CONNECT_APP(JSON.stringify(data));
|
|
7712
7717
|
};
|
|
@@ -7878,11 +7883,13 @@ var useDebounce = function useDebounce(value, delay) {
|
|
|
7878
7883
|
};
|
|
7879
7884
|
|
|
7880
7885
|
var loadGoogleFont = function loadGoogleFont() {
|
|
7881
|
-
if (
|
|
7882
|
-
|
|
7883
|
-
|
|
7884
|
-
|
|
7885
|
-
|
|
7886
|
+
if (typeof window !== 'undefined' && document) {
|
|
7887
|
+
if (!document.querySelector("link[href*='Source+Sans+Pro']")) {
|
|
7888
|
+
var link = document.createElement('link');
|
|
7889
|
+
link.href = 'https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@300;400;600;700&display=swap';
|
|
7890
|
+
link.rel = 'stylesheet';
|
|
7891
|
+
document.head.appendChild(link);
|
|
7892
|
+
}
|
|
7886
7893
|
}
|
|
7887
7894
|
};
|
|
7888
7895
|
loadGoogleFont();
|