esewa-ui-library 1.10.1 → 1.10.3
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/dist/index.js +13 -3
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +13 -3
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -346,7 +346,7 @@ var ESewaDatePicker = function ESewaDatePicker(_ref) {
|
|
|
346
346
|
};
|
|
347
347
|
|
|
348
348
|
var _templateObject$6;
|
|
349
|
-
var StyledDailog = styled__default.div(_templateObject$6 || (_templateObject$6 = _taggedTemplateLiteralLoose(["\n .dialog-overlay {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: rgba(0, 0, 0, 0.5);\n display: flex;\n justify-content: center;\n align-items: center;\n z-index: 1000;\n transition: opacity 400ms cubic-bezier(0.4, 0, 0.2, 1);\n animation: fadeIn 0.3s ease-out;\n }\n\n .dialog {\n &-box {\n background: var(--card-bg);\n border-top-left-radius: var(--values-value-16);\n border-top-right-radius: var(--values-value-16);\n width: 100%;\n max-width: 100%;\n padding: 16px;\n box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);\n transition: transform 0.3s ease-in-out;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n &.slide-down {\n animation: slideDown 0.2s ease-out forwards;\n }\n &.slide-up {\n animation: slideUp 0.3s ease-out forwards;\n }\n }\n &-center {\n align-self: center;\n }\n &-top {\n align-self: flex-start;\n }\n &-bottom {\n align-self: flex-end;\n }\n &-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding-bottom: 8px;\n border-bottom: 1px solid var(--border);\n &-left-icon {\n color: var(--secondary);\n [class^='icon-'],\n [class*=' icon-'] {\n font-weight: 600;\n }\n }\n &-title {\n margin: 0;\n font-weight: bold;\n text-align: center;\n color: var(--text-dark);\n }\n &-close-icon {\n color: var(--secondary);\n [class^='icon-'],\n [class*=' icon-'] {\n font-weight: 600;\n }\n }\n }\n\n &-body {\n margin: 16px 0;\n color: var(--text-tertiary);\n }\n &-footer {\n
|
|
349
|
+
var StyledDailog = styled__default.div(_templateObject$6 || (_templateObject$6 = _taggedTemplateLiteralLoose(["\n .dialog-overlay {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: rgba(0, 0, 0, 0.5);\n display: flex;\n justify-content: center;\n align-items: center;\n z-index: 1000;\n transition: opacity 400ms cubic-bezier(0.4, 0, 0.2, 1);\n animation: fadeIn 0.3s ease-out;\n }\n\n .dialog {\n &-box {\n background: var(--card-bg);\n border-top-left-radius: var(--values-value-16);\n border-top-right-radius: var(--values-value-16);\n width: 100%;\n max-width: 100%;\n padding: 16px;\n box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);\n transition: transform 0.3s ease-in-out;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n &.slide-down {\n animation: slideDown 0.2s ease-out forwards;\n }\n &.slide-up {\n animation: slideUp 0.3s ease-out forwards;\n }\n }\n &-center {\n align-self: center;\n }\n &-top {\n align-self: flex-start;\n }\n &-bottom {\n align-self: flex-end;\n }\n &-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding-bottom: 8px;\n border-bottom: 1px solid var(--border);\n &-left-icon {\n color: var(--secondary);\n [class^='icon-'],\n [class*=' icon-'] {\n font-weight: 600;\n }\n }\n &-title {\n margin: 0;\n font-weight: bold;\n text-align: center;\n color: var(--text-dark);\n }\n &-close-icon {\n color: var(--secondary);\n [class^='icon-'],\n [class*=' icon-'] {\n font-weight: 600;\n }\n }\n }\n\n &-body {\n margin: 16px 0;\n color: var(--text-tertiary);\n }\n &-footer {\n width: 100%;\n }\n }\n @keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n\n @keyframes slideUp {\n from {\n transform: translateY(100px);\n opacity: 0;\n }\n to {\n transform: translateY(0);\n opacity: 1;\n }\n }\n @keyframes slideDown {\n from {\n transform: translateY(0);\n opacity: 1;\n }\n to {\n transform: translateY(100px);\n opacity: 0;\n }\n }\n"])));
|
|
350
350
|
var ESewaDialog = function ESewaDialog(_ref) {
|
|
351
351
|
var isOpen = _ref.isOpen,
|
|
352
352
|
_ref$showLeftIcon = _ref.showLeftIcon,
|
|
@@ -6994,7 +6994,7 @@ var ESewaCarousel = function ESewaCarousel(_ref) {
|
|
|
6994
6994
|
|
|
6995
6995
|
var _templateObject$k, _templateObject2;
|
|
6996
6996
|
var ChipContainer = styled__default.div(_templateObject$k || (_templateObject$k = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n padding: 8px;\n"])));
|
|
6997
|
-
var Chip = styled__default.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 .chip__icon {\n display: flex;\n align-items: center;\n font-size: var(--values-value-12);\n }\n"])), function (_ref) {
|
|
6997
|
+
var Chip = styled__default.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 .chip__icon {\n display: flex;\n align-items: center;\n font-size: var(--values-value-12);\n }\n"])), function (_ref) {
|
|
6998
6998
|
var selected = _ref.selected;
|
|
6999
6999
|
return selected ? 'var(--primary-500)' : 'var(--secondary-bg-light)';
|
|
7000
7000
|
}, function (_ref2) {
|
|
@@ -7018,6 +7018,16 @@ var ESewaChipGroup = function ESewaChipGroup(_ref3) {
|
|
|
7018
7018
|
var _useState = React.useState(initialSelectedChips),
|
|
7019
7019
|
selectedChips = _useState[0],
|
|
7020
7020
|
setSelectedChips = _useState[1];
|
|
7021
|
+
React.useEffect(function () {
|
|
7022
|
+
var newSelected = function () {
|
|
7023
|
+
if (defaultValue === undefined) return [];
|
|
7024
|
+
if (selection === 'single') {
|
|
7025
|
+
return typeof defaultValue === 'number' ? [defaultValue] : [];
|
|
7026
|
+
}
|
|
7027
|
+
return Array.isArray(defaultValue) ? defaultValue : [];
|
|
7028
|
+
}();
|
|
7029
|
+
setSelectedChips(newSelected);
|
|
7030
|
+
}, [defaultValue, selection]);
|
|
7021
7031
|
var handleSelectChip = function handleSelectChip(id) {
|
|
7022
7032
|
if (selection === 'single') {
|
|
7023
7033
|
setSelectedChips([id]);
|
|
@@ -7050,7 +7060,7 @@ var ESewaChipGroup = function ESewaChipGroup(_ref3) {
|
|
|
7050
7060
|
return handleSelectChip(chip.id);
|
|
7051
7061
|
}
|
|
7052
7062
|
}, chip.showIcon && chip.icon && React__default.createElement("span", {
|
|
7053
|
-
className:
|
|
7063
|
+
className: 'chip__icon'
|
|
7054
7064
|
}, typeof chip.icon === 'string' ? React__default.createElement("i", {
|
|
7055
7065
|
className: chip.icon
|
|
7056
7066
|
}) : chip.icon), chip.text);
|