@farm-investimentos/front-mfe-components-vue3 1.4.0 → 1.5.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.
- package/dist/front-mfe-components.common.js +435 -422
- package/dist/front-mfe-components.common.js.map +1 -1
- package/dist/front-mfe-components.css +1 -1
- package/dist/front-mfe-components.umd.js +435 -422
- package/dist/front-mfe-components.umd.js.map +1 -1
- package/dist/front-mfe-components.umd.min.js +1 -1
- package/dist/front-mfe-components.umd.min.js.map +1 -1
- package/dist/img/currency-exchange.00d6a787.svg +3 -0
- package/package.json +1 -1
- package/src/assets/icons/README.md +33 -0
- package/src/assets/icons/currency-exchange/currency-exchange.scss +14 -0
- package/src/assets/icons/currency-exchange/currency-exchange.svg +3 -0
- package/src/assets/icons/custom-icons-list.ts +3 -0
- package/src/assets/icons/custom-icons.scss +2 -0
- package/src/assets/icons/index.ts +2 -0
- package/src/components/Icon/Icon.scss +1 -0
- package/src/components/Icon/Icon.stories.js +28 -0
- package/src/components/Icon/Icon.vue +7 -2
- package/src/components/Icon/icons_list.ts +3 -0
- package/src/components/Tooltip/Tooltip.scss +0 -21
- package/src/components/Tooltip/Tooltip.stories.js +38 -38
- package/src/components/Tooltip/Tooltip.vue +7 -12
- package/src/components/Tooltip/docs/Tooltip.md +50 -24
- package/src/components/Tooltip/types.ts +3 -11
- package/src/main.ts +4 -0
|
@@ -2754,9 +2754,11 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
2754
2754
|
TextArea: function() { return /* reexport */ TextArea_TextArea; },
|
|
2755
2755
|
TextFieldV2: function() { return /* reexport */ TextFieldV2_TextFieldV2; },
|
|
2756
2756
|
ToggleButton: function() { return /* reexport */ ToggleButton_ToggleButton; },
|
|
2757
|
-
Tooltip: function() { return /* reexport */
|
|
2757
|
+
Tooltip: function() { return /* reexport */ components_Tooltip; },
|
|
2758
2758
|
Typography: function() { return /* reexport */ Typography_Typography; },
|
|
2759
|
-
ValueCaption: function() { return /* reexport */ ValueCaption_ValueCaption; }
|
|
2759
|
+
ValueCaption: function() { return /* reexport */ ValueCaption_ValueCaption; },
|
|
2760
|
+
customIcons: function() { return /* reexport */ customIconsList; },
|
|
2761
|
+
customIconsList: function() { return /* reexport */ custom_icons_list; }
|
|
2760
2762
|
});
|
|
2761
2763
|
|
|
2762
2764
|
;// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
|
|
@@ -6908,6 +6910,353 @@ const TableContextMenu_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(T
|
|
|
6908
6910
|
;// CONCATENATED MODULE: ./src/components/TableContextMenu/index.ts
|
|
6909
6911
|
|
|
6910
6912
|
/* harmony default export */ var components_TableContextMenu = (TableContextMenu);
|
|
6913
|
+
;// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??clonedRuleSet-89.use[0]!./node_modules/@vue/cli-plugin-typescript/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js!./node_modules/ts-loader/index.js??clonedRuleSet-89.use[3]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/vue-loader/dist/index.js??ruleSet[0].use[1]!./src/components/Tooltip/Tooltip.vue?vue&type=script&setup=true&lang=ts
|
|
6914
|
+
|
|
6915
|
+
|
|
6916
|
+
|
|
6917
|
+
|
|
6918
|
+
const Tooltipvue_type_script_setup_true_lang_ts_withScopeId = n => (_pushScopeId("data-v-46d8db88"), n = n(), _popScopeId(), n);
|
|
6919
|
+
const Tooltipvue_type_script_setup_true_lang_ts_hoisted_1 = {
|
|
6920
|
+
key: 0,
|
|
6921
|
+
class: "tooltip-header"
|
|
6922
|
+
};
|
|
6923
|
+
const Tooltipvue_type_script_setup_true_lang_ts_hoisted_2 = {
|
|
6924
|
+
key: 0,
|
|
6925
|
+
class: "tooltip-title"
|
|
6926
|
+
};
|
|
6927
|
+
const Tooltipvue_type_script_setup_true_lang_ts_hoisted_3 = {
|
|
6928
|
+
class: "tooltip-content"
|
|
6929
|
+
};
|
|
6930
|
+
|
|
6931
|
+
const ARROW_OFFSET = 18;
|
|
6932
|
+
const Z_INDEX_OFFSET = 1000;
|
|
6933
|
+
const DEFAULT_Z_INDEX = 10001;
|
|
6934
|
+
/* harmony default export */ var Tooltipvue_type_script_setup_true_lang_ts = (/*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.defineComponent)({
|
|
6935
|
+
...{
|
|
6936
|
+
name: 'farm-tooltip'
|
|
6937
|
+
},
|
|
6938
|
+
__name: 'Tooltip',
|
|
6939
|
+
props: {
|
|
6940
|
+
modelValue: {
|
|
6941
|
+
type: Boolean,
|
|
6942
|
+
default: undefined
|
|
6943
|
+
},
|
|
6944
|
+
trigger: {
|
|
6945
|
+
default: 'hover'
|
|
6946
|
+
},
|
|
6947
|
+
placement: {
|
|
6948
|
+
default: 'top-center'
|
|
6949
|
+
},
|
|
6950
|
+
offset: {
|
|
6951
|
+
default: 8
|
|
6952
|
+
},
|
|
6953
|
+
variant: {
|
|
6954
|
+
default: 'dark'
|
|
6955
|
+
},
|
|
6956
|
+
size: {
|
|
6957
|
+
default: 'md'
|
|
6958
|
+
},
|
|
6959
|
+
maxWidth: {
|
|
6960
|
+
default: undefined
|
|
6961
|
+
},
|
|
6962
|
+
delay: {
|
|
6963
|
+
default: () => [100, 50]
|
|
6964
|
+
},
|
|
6965
|
+
disabled: {
|
|
6966
|
+
type: Boolean,
|
|
6967
|
+
default: false
|
|
6968
|
+
},
|
|
6969
|
+
fluid: {
|
|
6970
|
+
type: Boolean,
|
|
6971
|
+
default: false
|
|
6972
|
+
}
|
|
6973
|
+
},
|
|
6974
|
+
emits: ["update:modelValue", "show", "hide"],
|
|
6975
|
+
setup(__props, {
|
|
6976
|
+
emit: __emit
|
|
6977
|
+
}) {
|
|
6978
|
+
const props = __props;
|
|
6979
|
+
const emit = __emit;
|
|
6980
|
+
const slots = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.useSlots)();
|
|
6981
|
+
const containerRef = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)(null);
|
|
6982
|
+
const activatorRef = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)(null);
|
|
6983
|
+
const tooltipRef = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)(null);
|
|
6984
|
+
const scrollableElementsRef = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)(null);
|
|
6985
|
+
let modalCache = null;
|
|
6986
|
+
const isVisible = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)(false);
|
|
6987
|
+
const isControlled = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => props.modelValue !== undefined);
|
|
6988
|
+
const hasTitle = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => !!slots.title);
|
|
6989
|
+
const showCloseButton = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => isControlled.value && hasTitle.value);
|
|
6990
|
+
const normalizedMaxWidth = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
6991
|
+
if (props.fluid) {
|
|
6992
|
+
return '300px';
|
|
6993
|
+
}
|
|
6994
|
+
return props.maxWidth;
|
|
6995
|
+
});
|
|
6996
|
+
const tooltipClasses = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => ({
|
|
6997
|
+
'tooltip-popup': true,
|
|
6998
|
+
'tooltip-popup--visible': isVisible.value,
|
|
6999
|
+
[`tooltip-popup--${props.variant}`]: true,
|
|
7000
|
+
[`tooltip-popup--${props.size}`]: true,
|
|
7001
|
+
'tooltip-popup--has-title': hasTitle.value,
|
|
7002
|
+
[`tooltip-popup--${props.placement}`]: true
|
|
7003
|
+
}));
|
|
7004
|
+
const tooltipStyles = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
7005
|
+
const styles = {
|
|
7006
|
+
position: 'fixed',
|
|
7007
|
+
zIndex: String(getTooltipZIndex())
|
|
7008
|
+
};
|
|
7009
|
+
if (normalizedMaxWidth.value) {
|
|
7010
|
+
styles.maxWidth = typeof normalizedMaxWidth.value === 'number' ? `${normalizedMaxWidth.value}px` : normalizedMaxWidth.value;
|
|
7011
|
+
styles.width = 'auto';
|
|
7012
|
+
}
|
|
7013
|
+
return styles;
|
|
7014
|
+
});
|
|
7015
|
+
const arrowStyles = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
7016
|
+
const [verticalPos] = props.placement.split('-');
|
|
7017
|
+
const arrowColor = props.variant === 'light' ? '#ffffff' : '#333333';
|
|
7018
|
+
const styles = {
|
|
7019
|
+
position: 'absolute',
|
|
7020
|
+
width: '0',
|
|
7021
|
+
height: '0',
|
|
7022
|
+
borderStyle: 'solid',
|
|
7023
|
+
zIndex: 'inherit'
|
|
7024
|
+
};
|
|
7025
|
+
if (verticalPos === 'top') {
|
|
7026
|
+
styles.bottom = '-6px';
|
|
7027
|
+
styles.borderWidth = '6px 6px 0 6px';
|
|
7028
|
+
styles.borderColor = `${arrowColor} transparent transparent transparent`;
|
|
7029
|
+
} else {
|
|
7030
|
+
styles.top = '-6px';
|
|
7031
|
+
styles.borderWidth = '0 6px 6px 6px';
|
|
7032
|
+
styles.borderColor = `transparent transparent ${arrowColor} transparent`;
|
|
7033
|
+
}
|
|
7034
|
+
styles.left = '50%';
|
|
7035
|
+
styles.transform = 'translateX(-50%)';
|
|
7036
|
+
return styles;
|
|
7037
|
+
});
|
|
7038
|
+
const getTooltipZIndex = () => {
|
|
7039
|
+
const now = Date.now();
|
|
7040
|
+
let modals;
|
|
7041
|
+
if (modalCache && now - modalCache.timestamp < 500) {
|
|
7042
|
+
modals = modalCache.modals;
|
|
7043
|
+
} else {
|
|
7044
|
+
modals = Array.from(document.querySelectorAll('.farm-modal'));
|
|
7045
|
+
modalCache = {
|
|
7046
|
+
modals,
|
|
7047
|
+
timestamp: now
|
|
7048
|
+
};
|
|
7049
|
+
}
|
|
7050
|
+
let maxModalZIndex = 0;
|
|
7051
|
+
modals.forEach(modal => {
|
|
7052
|
+
const htmlModal = modal;
|
|
7053
|
+
let zIndex = parseInt(htmlModal.style.zIndex, 10);
|
|
7054
|
+
if (Number.isNaN(zIndex)) {
|
|
7055
|
+
const computedZIndex = window.getComputedStyle(htmlModal).zIndex;
|
|
7056
|
+
if (computedZIndex === 'auto') {
|
|
7057
|
+
zIndex = 0;
|
|
7058
|
+
} else {
|
|
7059
|
+
zIndex = parseInt(computedZIndex, 10) || 0;
|
|
7060
|
+
}
|
|
7061
|
+
}
|
|
7062
|
+
if (zIndex > maxModalZIndex) {
|
|
7063
|
+
maxModalZIndex = zIndex;
|
|
7064
|
+
}
|
|
7065
|
+
});
|
|
7066
|
+
return maxModalZIndex > 0 ? maxModalZIndex + Z_INDEX_OFFSET : DEFAULT_Z_INDEX;
|
|
7067
|
+
};
|
|
7068
|
+
const calculateTooltipPosition = (activatorRect, tooltipRect, placement, offset = 8) => {
|
|
7069
|
+
const [verticalPos, horizontalAlign] = placement.split('-');
|
|
7070
|
+
let left = 0;
|
|
7071
|
+
let top = 0;
|
|
7072
|
+
if (verticalPos === 'top') {
|
|
7073
|
+
top = activatorRect.top - tooltipRect.height - offset;
|
|
7074
|
+
} else {
|
|
7075
|
+
top = activatorRect.bottom + offset;
|
|
7076
|
+
}
|
|
7077
|
+
switch (horizontalAlign) {
|
|
7078
|
+
case 'left':
|
|
7079
|
+
left = activatorRect.left + activatorRect.width / 2 - ARROW_OFFSET;
|
|
7080
|
+
break;
|
|
7081
|
+
case 'right':
|
|
7082
|
+
left = activatorRect.left + activatorRect.width / 2 - (tooltipRect.width - ARROW_OFFSET);
|
|
7083
|
+
break;
|
|
7084
|
+
case 'center':
|
|
7085
|
+
default:
|
|
7086
|
+
left = activatorRect.left + activatorRect.width / 2 - tooltipRect.width / 2;
|
|
7087
|
+
break;
|
|
7088
|
+
}
|
|
7089
|
+
if (left < offset) left = offset;
|
|
7090
|
+
if (left + tooltipRect.width > window.innerWidth - offset) {
|
|
7091
|
+
left = window.innerWidth - tooltipRect.width - offset;
|
|
7092
|
+
}
|
|
7093
|
+
return {
|
|
7094
|
+
left,
|
|
7095
|
+
top
|
|
7096
|
+
};
|
|
7097
|
+
};
|
|
7098
|
+
const moveToBody = element => {
|
|
7099
|
+
if (element.parentNode !== document.body) {
|
|
7100
|
+
document.body.appendChild(element);
|
|
7101
|
+
}
|
|
7102
|
+
};
|
|
7103
|
+
const moveToContainer = (element, container) => {
|
|
7104
|
+
if (element.parentNode === document.body) {
|
|
7105
|
+
container.appendChild(element);
|
|
7106
|
+
}
|
|
7107
|
+
};
|
|
7108
|
+
const show = () => {
|
|
7109
|
+
if (props.disabled || isControlled.value) return;
|
|
7110
|
+
isVisible.value = true;
|
|
7111
|
+
emit('show');
|
|
7112
|
+
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)(() => {
|
|
7113
|
+
if (tooltipRef.value && activatorRef.value) {
|
|
7114
|
+
moveToBody(tooltipRef.value);
|
|
7115
|
+
updatePosition();
|
|
7116
|
+
addScrollListener();
|
|
7117
|
+
}
|
|
7118
|
+
});
|
|
7119
|
+
};
|
|
7120
|
+
const hide = () => {
|
|
7121
|
+
if (props.disabled || isControlled.value) return;
|
|
7122
|
+
isVisible.value = false;
|
|
7123
|
+
emit('hide');
|
|
7124
|
+
removeScrollListener();
|
|
7125
|
+
};
|
|
7126
|
+
const close = () => {
|
|
7127
|
+
if (isControlled.value) {
|
|
7128
|
+
emit('update:modelValue', false);
|
|
7129
|
+
} else {
|
|
7130
|
+
hide();
|
|
7131
|
+
}
|
|
7132
|
+
};
|
|
7133
|
+
const updatePosition = () => {
|
|
7134
|
+
if (!activatorRef.value || !tooltipRef.value) return;
|
|
7135
|
+
const activatorRect = activatorRef.value.getBoundingClientRect();
|
|
7136
|
+
const tooltipRect = tooltipRef.value.getBoundingClientRect();
|
|
7137
|
+
const isActivatorVisible = activatorRect.top < window.innerHeight && activatorRect.bottom > 0 && activatorRect.left < window.innerWidth && activatorRect.right > 0;
|
|
7138
|
+
if (!isActivatorVisible && isVisible.value && !isControlled.value) {
|
|
7139
|
+
hide();
|
|
7140
|
+
return;
|
|
7141
|
+
}
|
|
7142
|
+
const position = calculateTooltipPosition(activatorRect, tooltipRect, props.placement, props.offset);
|
|
7143
|
+
tooltipRef.value.style.left = `${position.left}px`;
|
|
7144
|
+
tooltipRef.value.style.top = `${position.top}px`;
|
|
7145
|
+
updateArrowPosition(activatorRect, position);
|
|
7146
|
+
};
|
|
7147
|
+
const updateArrowPosition = (activatorRect, tooltipPosition) => {
|
|
7148
|
+
if (!tooltipRef.value) return;
|
|
7149
|
+
const arrow = tooltipRef.value.querySelector('.tooltip-arrow');
|
|
7150
|
+
if (!arrow) return;
|
|
7151
|
+
const activatorCenterX = activatorRect.left + activatorRect.width / 2;
|
|
7152
|
+
const arrowX = activatorCenterX - tooltipPosition.left;
|
|
7153
|
+
const tooltipWidth = tooltipRef.value.offsetWidth;
|
|
7154
|
+
const minArrowX = 12;
|
|
7155
|
+
const maxArrowX = tooltipWidth - 12;
|
|
7156
|
+
const clampedArrowX = Math.max(minArrowX, Math.min(maxArrowX, arrowX));
|
|
7157
|
+
arrow.style.left = `${clampedArrowX}px`;
|
|
7158
|
+
arrow.style.transform = 'translateX(-50%)';
|
|
7159
|
+
};
|
|
7160
|
+
const getScrollableElements = () => {
|
|
7161
|
+
if (!scrollableElementsRef.value) {
|
|
7162
|
+
const nodeList = document.querySelectorAll('.farm-modal, .modal-content, [style*="overflow-y: auto"], [style*="overflow-y: scroll"]');
|
|
7163
|
+
scrollableElementsRef.value = Array.from(nodeList);
|
|
7164
|
+
}
|
|
7165
|
+
return scrollableElementsRef.value;
|
|
7166
|
+
};
|
|
7167
|
+
const addScrollListener = () => {
|
|
7168
|
+
window.addEventListener('scroll', updatePosition, {
|
|
7169
|
+
passive: true
|
|
7170
|
+
});
|
|
7171
|
+
const scrollableElements = getScrollableElements();
|
|
7172
|
+
scrollableElements.forEach(element => {
|
|
7173
|
+
element.addEventListener('scroll', updatePosition, {
|
|
7174
|
+
passive: true
|
|
7175
|
+
});
|
|
7176
|
+
});
|
|
7177
|
+
};
|
|
7178
|
+
const removeScrollListener = () => {
|
|
7179
|
+
window.removeEventListener('scroll', updatePosition);
|
|
7180
|
+
const scrollableElements = getScrollableElements();
|
|
7181
|
+
scrollableElements.forEach(element => {
|
|
7182
|
+
element.removeEventListener('scroll', updatePosition);
|
|
7183
|
+
});
|
|
7184
|
+
};
|
|
7185
|
+
if (isControlled.value) {
|
|
7186
|
+
isVisible.value = props.modelValue || false;
|
|
7187
|
+
}
|
|
7188
|
+
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(() => props.modelValue, newValue => {
|
|
7189
|
+
if (isControlled.value) {
|
|
7190
|
+
isVisible.value = newValue || false;
|
|
7191
|
+
if (isVisible.value) {
|
|
7192
|
+
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)(() => {
|
|
7193
|
+
if (tooltipRef.value) {
|
|
7194
|
+
moveToBody(tooltipRef.value);
|
|
7195
|
+
updatePosition();
|
|
7196
|
+
addScrollListener();
|
|
7197
|
+
}
|
|
7198
|
+
});
|
|
7199
|
+
} else {
|
|
7200
|
+
removeScrollListener();
|
|
7201
|
+
}
|
|
7202
|
+
}
|
|
7203
|
+
});
|
|
7204
|
+
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.onBeforeUnmount)(() => {
|
|
7205
|
+
if (tooltipRef.value && containerRef.value) {
|
|
7206
|
+
moveToContainer(tooltipRef.value, containerRef.value);
|
|
7207
|
+
}
|
|
7208
|
+
removeScrollListener();
|
|
7209
|
+
});
|
|
7210
|
+
return (_ctx, _cache) => {
|
|
7211
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div", {
|
|
7212
|
+
class: "tooltip-container",
|
|
7213
|
+
ref_key: "containerRef",
|
|
7214
|
+
ref: containerRef
|
|
7215
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
|
|
7216
|
+
ref_key: "activatorRef",
|
|
7217
|
+
ref: activatorRef,
|
|
7218
|
+
class: "tooltip-activator",
|
|
7219
|
+
onMouseover: show,
|
|
7220
|
+
onMouseout: hide,
|
|
7221
|
+
onMouseleave: hide
|
|
7222
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.renderSlot)(_ctx.$slots, "activator")], 544), isVisible.value ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div", {
|
|
7223
|
+
key: 0,
|
|
7224
|
+
ref_key: "tooltipRef",
|
|
7225
|
+
ref: tooltipRef,
|
|
7226
|
+
class: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.normalizeClass)(tooltipClasses.value),
|
|
7227
|
+
style: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.normalizeStyle)(tooltipStyles.value)
|
|
7228
|
+
}, [hasTitle.value || showCloseButton.value ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div", Tooltipvue_type_script_setup_true_lang_ts_hoisted_1, [hasTitle.value ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div", Tooltipvue_type_script_setup_true_lang_ts_hoisted_2, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.renderSlot)(_ctx.$slots, "title")])) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)("", true), showCloseButton.value ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("span", {
|
|
7229
|
+
key: 1,
|
|
7230
|
+
class: "tooltip-close",
|
|
7231
|
+
onClick: close
|
|
7232
|
+
}, "×")) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)("", true)])) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)("", true), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", Tooltipvue_type_script_setup_true_lang_ts_hoisted_3, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.renderSlot)(_ctx.$slots, "default")]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
|
|
7233
|
+
class: "tooltip-arrow",
|
|
7234
|
+
style: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.normalizeStyle)(arrowStyles.value)
|
|
7235
|
+
}, null, 4)], 6)) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)("", true)], 512);
|
|
7236
|
+
};
|
|
7237
|
+
}
|
|
7238
|
+
}));
|
|
7239
|
+
;// CONCATENATED MODULE: ./src/components/Tooltip/Tooltip.vue?vue&type=script&setup=true&lang=ts
|
|
7240
|
+
|
|
7241
|
+
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-69.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-69.use[1]!./node_modules/@vue/cli-service/node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-69.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-69.use[3]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/vue-loader/dist/index.js??ruleSet[0].use[1]!./src/components/Tooltip/Tooltip.vue?vue&type=style&index=0&id=46d8db88&lang=scss&scoped=true
|
|
7242
|
+
// extracted by mini-css-extract-plugin
|
|
7243
|
+
|
|
7244
|
+
;// CONCATENATED MODULE: ./src/components/Tooltip/Tooltip.vue?vue&type=style&index=0&id=46d8db88&lang=scss&scoped=true
|
|
7245
|
+
|
|
7246
|
+
;// CONCATENATED MODULE: ./src/components/Tooltip/Tooltip.vue
|
|
7247
|
+
|
|
7248
|
+
|
|
7249
|
+
|
|
7250
|
+
;
|
|
7251
|
+
|
|
7252
|
+
|
|
7253
|
+
const Tooltip_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(Tooltipvue_type_script_setup_true_lang_ts, [['__scopeId',"data-v-46d8db88"]])
|
|
7254
|
+
|
|
7255
|
+
/* harmony default export */ var Tooltip = (Tooltip_exports_);
|
|
7256
|
+
;// CONCATENATED MODULE: ./src/components/Tooltip/index.ts
|
|
7257
|
+
|
|
7258
|
+
|
|
7259
|
+
/* harmony default export */ var components_Tooltip = (Tooltip);
|
|
6911
7260
|
;// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??clonedRuleSet-89.use[0]!./node_modules/@vue/cli-plugin-typescript/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js!./node_modules/ts-loader/index.js??clonedRuleSet-89.use[3]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/vue-loader/dist/index.js??ruleSet[0].use[1]!./src/components/AlertBox/AlertBox.vue?vue&type=script&lang=ts&setup=true
|
|
6912
7261
|
|
|
6913
7262
|
|
|
@@ -9845,18 +10194,18 @@ const LoggerItem_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(LoggerI
|
|
|
9845
10194
|
|
|
9846
10195
|
|
|
9847
10196
|
/* harmony default export */ var Logger_LoggerItem = ((/* unused pure expression or super */ null && (LoggerItem)));
|
|
9848
|
-
;// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??clonedRuleSet-89.use[0]!./node_modules/@vue/cli-plugin-typescript/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js!./node_modules/ts-loader/index.js??clonedRuleSet-89.use[3]!./node_modules/@vue/cli-service/node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[5]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/vue-loader/dist/index.js??ruleSet[0].use[1]!./src/components/Icon/Icon.vue?vue&type=template&id=
|
|
10197
|
+
;// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??clonedRuleSet-89.use[0]!./node_modules/@vue/cli-plugin-typescript/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js!./node_modules/ts-loader/index.js??clonedRuleSet-89.use[3]!./node_modules/@vue/cli-service/node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[5]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/vue-loader/dist/index.js??ruleSet[0].use[1]!./src/components/Icon/Icon.vue?vue&type=template&id=3a6fccb7&scoped=true&ts=true
|
|
9849
10198
|
|
|
9850
|
-
const
|
|
9851
|
-
const
|
|
9852
|
-
function
|
|
10199
|
+
const Iconvue_type_template_id_3a6fccb7_scoped_true_ts_true_withScopeId = n => (_pushScopeId("data-v-3a6fccb7"), n = n(), _popScopeId(), n);
|
|
10200
|
+
const Iconvue_type_template_id_3a6fccb7_scoped_true_ts_true_hoisted_1 = ["size"];
|
|
10201
|
+
function Iconvue_type_template_id_3a6fccb7_scoped_true_ts_true_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
9853
10202
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("i", (0,external_commonjs_vue_commonjs2_vue_root_Vue_.mergeProps)(_ctx.$attrs, {
|
|
9854
10203
|
class: $setup.classes,
|
|
9855
10204
|
size: _ctx.$props.size,
|
|
9856
10205
|
ref: "el"
|
|
9857
|
-
}), null, 16,
|
|
10206
|
+
}), null, 16, Iconvue_type_template_id_3a6fccb7_scoped_true_ts_true_hoisted_1);
|
|
9858
10207
|
}
|
|
9859
|
-
;// CONCATENATED MODULE: ./src/components/Icon/Icon.vue?vue&type=template&id=
|
|
10208
|
+
;// CONCATENATED MODULE: ./src/components/Icon/Icon.vue?vue&type=template&id=3a6fccb7&scoped=true&ts=true
|
|
9860
10209
|
|
|
9861
10210
|
;// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??clonedRuleSet-89.use[0]!./node_modules/@vue/cli-plugin-typescript/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js!./node_modules/ts-loader/index.js??clonedRuleSet-89.use[3]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/vue-loader/dist/index.js??ruleSet[0].use[1]!./src/components/Icon/Icon.vue?vue&type=script&lang=ts
|
|
9862
10211
|
|
|
@@ -9892,11 +10241,20 @@ const breakPoints = ['xs', 'sm', 'md', 'lg', 'xl'];
|
|
|
9892
10241
|
} = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.toRefs)(props);
|
|
9893
10242
|
const el = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)(null);
|
|
9894
10243
|
const classes = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
10244
|
+
const isCustomIcon = icon.value.startsWith('custom-');
|
|
9895
10245
|
return {
|
|
9896
10246
|
'farm-icon': true,
|
|
9897
10247
|
['farm-icon--' + color.value]: true,
|
|
9898
|
-
|
|
9899
|
-
|
|
10248
|
+
// Classes MDI para ícones padrão
|
|
10249
|
+
...(isCustomIcon ? {} : {
|
|
10250
|
+
mdi: true,
|
|
10251
|
+
['mdi-' + icon.value]: true
|
|
10252
|
+
}),
|
|
10253
|
+
// Classe customizada para ícones personalizados
|
|
10254
|
+
...(isCustomIcon ? {
|
|
10255
|
+
[icon.value]: true
|
|
10256
|
+
} : {}),
|
|
10257
|
+
// Variações de cor
|
|
9900
10258
|
'farm-icon--lighten': variation.value === 'lighten',
|
|
9901
10259
|
'farm-icon--darken': variation.value === 'darken',
|
|
9902
10260
|
['farm-icon--black-' + variation.value]: color.value === 'black'
|
|
@@ -9929,10 +10287,10 @@ const breakPoints = ['xs', 'sm', 'md', 'lg', 'xl'];
|
|
|
9929
10287
|
});
|
|
9930
10288
|
;// CONCATENATED MODULE: ./src/components/Icon/Icon.vue?vue&type=script&lang=ts
|
|
9931
10289
|
|
|
9932
|
-
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-69.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-69.use[1]!./node_modules/@vue/cli-service/node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-69.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-69.use[3]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/vue-loader/dist/index.js??ruleSet[0].use[1]!./src/components/Icon/Icon.vue?vue&type=style&index=0&id=
|
|
10290
|
+
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-69.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-69.use[1]!./node_modules/@vue/cli-service/node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-69.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-69.use[3]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/vue-loader/dist/index.js??ruleSet[0].use[1]!./src/components/Icon/Icon.vue?vue&type=style&index=0&id=3a6fccb7&lang=scss&scoped=true
|
|
9933
10291
|
// extracted by mini-css-extract-plugin
|
|
9934
10292
|
|
|
9935
|
-
;// CONCATENATED MODULE: ./src/components/Icon/Icon.vue?vue&type=style&index=0&id=
|
|
10293
|
+
;// CONCATENATED MODULE: ./src/components/Icon/Icon.vue?vue&type=style&index=0&id=3a6fccb7&lang=scss&scoped=true
|
|
9936
10294
|
|
|
9937
10295
|
;// CONCATENATED MODULE: ./src/components/Icon/Icon.vue
|
|
9938
10296
|
|
|
@@ -9942,7 +10300,7 @@ const breakPoints = ['xs', 'sm', 'md', 'lg', 'xl'];
|
|
|
9942
10300
|
;
|
|
9943
10301
|
|
|
9944
10302
|
|
|
9945
|
-
const Icon_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(Iconvue_type_script_lang_ts, [['render',
|
|
10303
|
+
const Icon_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(Iconvue_type_script_lang_ts, [['render',Iconvue_type_template_id_3a6fccb7_scoped_true_ts_true_render],['__scopeId',"data-v-3a6fccb7"]])
|
|
9946
10304
|
|
|
9947
10305
|
/* harmony default export */ var Icon_Icon = (Icon_exports_);
|
|
9948
10306
|
;// CONCATENATED MODULE: ./src/components/Icon/index.ts
|
|
@@ -12855,436 +13213,83 @@ function InputDecimalFormattervue_type_template_id_98371fda_scoped_true_ts_true_
|
|
|
12855
13213
|
});
|
|
12856
13214
|
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(() => innerValue.value, () => {
|
|
12857
13215
|
emit('update:modelValue', innerValue.value);
|
|
12858
|
-
validate(innerValue.value);
|
|
12859
|
-
});
|
|
12860
|
-
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(() => props.rules, (newVal, oldVal) => {
|
|
12861
|
-
if (composition_deepEqual(newVal, oldVal)) return;
|
|
12862
|
-
fieldValidator = validateFormFieldBuilder(rules.value);
|
|
12863
|
-
validate = validateFormMethodBuilder(errorBucket, valid, fieldValidator);
|
|
12864
|
-
validate(innerValue.value);
|
|
12865
|
-
});
|
|
12866
|
-
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.onBeforeMount)(() => {
|
|
12867
|
-
validate(innerValue.value);
|
|
12868
|
-
});
|
|
12869
|
-
let validate = validateFormMethodBuilder(errorBucket, valid, fieldValidator);
|
|
12870
|
-
const onKeyUp = event => {
|
|
12871
|
-
isTouched.value = true;
|
|
12872
|
-
emit('keyup', event);
|
|
12873
|
-
setTimeout(() => {
|
|
12874
|
-
emit('change', innerValue.value);
|
|
12875
|
-
}, 100);
|
|
12876
|
-
};
|
|
12877
|
-
const onBlur = event => {
|
|
12878
|
-
isBlured.value = true;
|
|
12879
|
-
emit('blur', event);
|
|
12880
|
-
};
|
|
12881
|
-
const onFocus = focus => {
|
|
12882
|
-
isFocus.value = focus;
|
|
12883
|
-
};
|
|
12884
|
-
const reset = () => {
|
|
12885
|
-
innerValue.value = '';
|
|
12886
|
-
isTouched.value = true;
|
|
12887
|
-
emit('update:modelValue', innerValue.value);
|
|
12888
|
-
};
|
|
12889
|
-
const makePristine = () => {
|
|
12890
|
-
isTouched.value = false;
|
|
12891
|
-
isBlured.value = false;
|
|
12892
|
-
};
|
|
12893
|
-
return {
|
|
12894
|
-
innerValue,
|
|
12895
|
-
errorBucket,
|
|
12896
|
-
valid,
|
|
12897
|
-
validatable,
|
|
12898
|
-
hasError,
|
|
12899
|
-
customId,
|
|
12900
|
-
isTouched,
|
|
12901
|
-
isBlured,
|
|
12902
|
-
isFocus,
|
|
12903
|
-
showErrorText,
|
|
12904
|
-
validate,
|
|
12905
|
-
onKeyUp,
|
|
12906
|
-
onBlur,
|
|
12907
|
-
onFocus,
|
|
12908
|
-
reset,
|
|
12909
|
-
makePristine
|
|
12910
|
-
};
|
|
12911
|
-
}
|
|
12912
|
-
});
|
|
12913
|
-
;// CONCATENATED MODULE: ./src/components/InputDecimalFormatter/InputDecimalFormatter.vue?vue&type=script&lang=ts
|
|
12914
|
-
|
|
12915
|
-
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-69.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-69.use[1]!./node_modules/@vue/cli-service/node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-69.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-69.use[3]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/vue-loader/dist/index.js??ruleSet[0].use[1]!./src/components/InputDecimalFormatter/InputDecimalFormatter.vue?vue&type=style&index=0&id=98371fda&lang=scss&scoped=true
|
|
12916
|
-
// extracted by mini-css-extract-plugin
|
|
12917
|
-
|
|
12918
|
-
;// CONCATENATED MODULE: ./src/components/InputDecimalFormatter/InputDecimalFormatter.vue?vue&type=style&index=0&id=98371fda&lang=scss&scoped=true
|
|
12919
|
-
|
|
12920
|
-
;// CONCATENATED MODULE: ./src/components/InputDecimalFormatter/InputDecimalFormatter.vue
|
|
12921
|
-
|
|
12922
|
-
|
|
12923
|
-
|
|
12924
|
-
|
|
12925
|
-
;
|
|
12926
|
-
|
|
12927
|
-
|
|
12928
|
-
const InputDecimalFormatter_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(InputDecimalFormattervue_type_script_lang_ts, [['render',InputDecimalFormattervue_type_template_id_98371fda_scoped_true_ts_true_render],['__scopeId',"data-v-98371fda"]])
|
|
12929
|
-
|
|
12930
|
-
/* harmony default export */ var InputDecimalFormatter_InputDecimalFormatter = (InputDecimalFormatter_exports_);
|
|
12931
|
-
;// CONCATENATED MODULE: ./src/components/InputDecimalFormatter/index.ts
|
|
12932
|
-
|
|
12933
|
-
|
|
12934
|
-
/* harmony default export */ var components_InputDecimalFormatter = ((/* unused pure expression or super */ null && (InputDecimalFormatter)));
|
|
12935
|
-
;// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??clonedRuleSet-89.use[0]!./node_modules/@vue/cli-plugin-typescript/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js!./node_modules/ts-loader/index.js??clonedRuleSet-89.use[3]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/vue-loader/dist/index.js??ruleSet[0].use[1]!./src/components/Tooltip/Tooltip.vue?vue&type=script&setup=true&lang=ts
|
|
12936
|
-
|
|
12937
|
-
|
|
12938
|
-
|
|
12939
|
-
|
|
12940
|
-
const Tooltipvue_type_script_setup_true_lang_ts_withScopeId = n => (_pushScopeId("data-v-0953d2f7"), n = n(), _popScopeId(), n);
|
|
12941
|
-
const Tooltipvue_type_script_setup_true_lang_ts_hoisted_1 = {
|
|
12942
|
-
key: 0,
|
|
12943
|
-
class: "tooltip-header"
|
|
12944
|
-
};
|
|
12945
|
-
const Tooltipvue_type_script_setup_true_lang_ts_hoisted_2 = {
|
|
12946
|
-
key: 0,
|
|
12947
|
-
class: "tooltip-title"
|
|
12948
|
-
};
|
|
12949
|
-
const Tooltipvue_type_script_setup_true_lang_ts_hoisted_3 = {
|
|
12950
|
-
class: "tooltip-content"
|
|
12951
|
-
};
|
|
12952
|
-
|
|
12953
|
-
const ARROW_OFFSET = 18;
|
|
12954
|
-
const Z_INDEX_OFFSET = 1000;
|
|
12955
|
-
const DEFAULT_Z_INDEX = 10001;
|
|
12956
|
-
/* harmony default export */ var Tooltipvue_type_script_setup_true_lang_ts = (/*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.defineComponent)({
|
|
12957
|
-
__name: 'Tooltip',
|
|
12958
|
-
props: {
|
|
12959
|
-
modelValue: {
|
|
12960
|
-
type: Boolean,
|
|
12961
|
-
default: undefined
|
|
12962
|
-
},
|
|
12963
|
-
trigger: {
|
|
12964
|
-
default: 'hover'
|
|
12965
|
-
},
|
|
12966
|
-
placement: {
|
|
12967
|
-
default: 'top-center'
|
|
12968
|
-
},
|
|
12969
|
-
offset: {
|
|
12970
|
-
default: 8
|
|
12971
|
-
},
|
|
12972
|
-
variant: {
|
|
12973
|
-
default: 'dark'
|
|
12974
|
-
},
|
|
12975
|
-
size: {
|
|
12976
|
-
default: 'md'
|
|
12977
|
-
},
|
|
12978
|
-
maxWidth: {
|
|
12979
|
-
default: undefined
|
|
12980
|
-
},
|
|
12981
|
-
delay: {
|
|
12982
|
-
default: () => [100, 50]
|
|
12983
|
-
},
|
|
12984
|
-
disabled: {
|
|
12985
|
-
type: Boolean,
|
|
12986
|
-
default: false
|
|
12987
|
-
},
|
|
12988
|
-
fluid: {
|
|
12989
|
-
type: Boolean,
|
|
12990
|
-
default: false
|
|
12991
|
-
},
|
|
12992
|
-
position: {
|
|
12993
|
-
default: undefined
|
|
12994
|
-
}
|
|
12995
|
-
},
|
|
12996
|
-
emits: ["update:modelValue", "show", "hide"],
|
|
12997
|
-
setup(__props, {
|
|
12998
|
-
emit: __emit
|
|
12999
|
-
}) {
|
|
13000
|
-
const props = __props;
|
|
13001
|
-
const emit = __emit;
|
|
13002
|
-
const slots = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.useSlots)();
|
|
13003
|
-
const containerRef = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)(null);
|
|
13004
|
-
const activatorRef = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)(null);
|
|
13005
|
-
const tooltipRef = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)(null);
|
|
13006
|
-
const scrollableElementsRef = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)(null);
|
|
13007
|
-
let modalCache = null;
|
|
13008
|
-
const isVisible = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)(false);
|
|
13009
|
-
const isControlled = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => props.modelValue !== undefined);
|
|
13010
|
-
const hasTitle = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => !!slots.title);
|
|
13011
|
-
const showCloseButton = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => isControlled.value && hasTitle.value);
|
|
13012
|
-
const normalizedPlacement = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
13013
|
-
if (props.position) {
|
|
13014
|
-
return props.position;
|
|
13015
|
-
}
|
|
13016
|
-
return props.placement;
|
|
13017
|
-
});
|
|
13018
|
-
const normalizedMaxWidth = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
13019
|
-
if (props.fluid) {
|
|
13020
|
-
return '300px';
|
|
13021
|
-
}
|
|
13022
|
-
return props.maxWidth;
|
|
13023
|
-
});
|
|
13024
|
-
const tooltipClasses = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => ({
|
|
13025
|
-
'tooltip-popup': true,
|
|
13026
|
-
'tooltip-popup--visible': isVisible.value,
|
|
13027
|
-
[`tooltip-popup--${props.variant}`]: true,
|
|
13028
|
-
[`tooltip-popup--${props.size}`]: true,
|
|
13029
|
-
'tooltip-popup--has-title': hasTitle.value,
|
|
13030
|
-
[`tooltip-popup--${normalizedPlacement.value}`]: true
|
|
13031
|
-
}));
|
|
13032
|
-
const tooltipStyles = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
13033
|
-
const styles = {
|
|
13034
|
-
position: 'fixed',
|
|
13035
|
-
zIndex: String(getTooltipZIndex())
|
|
13036
|
-
};
|
|
13037
|
-
if (normalizedMaxWidth.value) {
|
|
13038
|
-
styles.maxWidth = typeof normalizedMaxWidth.value === 'number' ? `${normalizedMaxWidth.value}px` : normalizedMaxWidth.value;
|
|
13039
|
-
styles.width = 'auto';
|
|
13040
|
-
}
|
|
13041
|
-
return styles;
|
|
13042
|
-
});
|
|
13043
|
-
const arrowStyles = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
13044
|
-
const [verticalPos] = normalizedPlacement.value.split('-');
|
|
13045
|
-
const arrowColor = props.variant === 'light' ? '#ffffff' : '#333333';
|
|
13046
|
-
const styles = {
|
|
13047
|
-
position: 'absolute',
|
|
13048
|
-
width: '0',
|
|
13049
|
-
height: '0',
|
|
13050
|
-
borderStyle: 'solid',
|
|
13051
|
-
zIndex: 'inherit'
|
|
13052
|
-
};
|
|
13053
|
-
if (verticalPos === 'top') {
|
|
13054
|
-
styles.bottom = '-6px';
|
|
13055
|
-
styles.borderWidth = '6px 6px 0 6px';
|
|
13056
|
-
styles.borderColor = `${arrowColor} transparent transparent transparent`;
|
|
13057
|
-
} else {
|
|
13058
|
-
styles.top = '-6px';
|
|
13059
|
-
styles.borderWidth = '0 6px 6px 6px';
|
|
13060
|
-
styles.borderColor = `transparent transparent ${arrowColor} transparent`;
|
|
13061
|
-
}
|
|
13062
|
-
styles.left = '50%';
|
|
13063
|
-
styles.transform = 'translateX(-50%)';
|
|
13064
|
-
return styles;
|
|
13216
|
+
validate(innerValue.value);
|
|
13065
13217
|
});
|
|
13066
|
-
|
|
13067
|
-
|
|
13068
|
-
|
|
13069
|
-
|
|
13070
|
-
|
|
13071
|
-
|
|
13072
|
-
|
|
13073
|
-
|
|
13074
|
-
|
|
13075
|
-
|
|
13076
|
-
|
|
13077
|
-
|
|
13078
|
-
|
|
13079
|
-
|
|
13080
|
-
|
|
13081
|
-
|
|
13082
|
-
if (Number.isNaN(zIndex)) {
|
|
13083
|
-
const computedZIndex = window.getComputedStyle(htmlModal).zIndex;
|
|
13084
|
-
if (computedZIndex === 'auto') {
|
|
13085
|
-
zIndex = 0;
|
|
13086
|
-
} else {
|
|
13087
|
-
zIndex = parseInt(computedZIndex, 10) || 0;
|
|
13088
|
-
}
|
|
13089
|
-
}
|
|
13090
|
-
if (zIndex > maxModalZIndex) {
|
|
13091
|
-
maxModalZIndex = zIndex;
|
|
13092
|
-
}
|
|
13093
|
-
});
|
|
13094
|
-
return maxModalZIndex > 0 ? maxModalZIndex + Z_INDEX_OFFSET : DEFAULT_Z_INDEX;
|
|
13095
|
-
};
|
|
13096
|
-
const calculateTooltipPosition = (activatorRect, tooltipRect, placement, offset = 8) => {
|
|
13097
|
-
const [verticalPos, horizontalAlign] = placement.split('-');
|
|
13098
|
-
let left = 0;
|
|
13099
|
-
let top = 0;
|
|
13100
|
-
if (verticalPos === 'top') {
|
|
13101
|
-
top = activatorRect.top - tooltipRect.height - offset;
|
|
13102
|
-
} else {
|
|
13103
|
-
top = activatorRect.bottom + offset;
|
|
13104
|
-
}
|
|
13105
|
-
switch (horizontalAlign) {
|
|
13106
|
-
case 'left':
|
|
13107
|
-
left = activatorRect.left + activatorRect.width / 2 - ARROW_OFFSET;
|
|
13108
|
-
break;
|
|
13109
|
-
case 'right':
|
|
13110
|
-
left = activatorRect.left + activatorRect.width / 2 - (tooltipRect.width - ARROW_OFFSET);
|
|
13111
|
-
break;
|
|
13112
|
-
case 'center':
|
|
13113
|
-
default:
|
|
13114
|
-
left = activatorRect.left + activatorRect.width / 2 - tooltipRect.width / 2;
|
|
13115
|
-
break;
|
|
13116
|
-
}
|
|
13117
|
-
if (left < offset) left = offset;
|
|
13118
|
-
if (left + tooltipRect.width > window.innerWidth - offset) {
|
|
13119
|
-
left = window.innerWidth - tooltipRect.width - offset;
|
|
13120
|
-
}
|
|
13121
|
-
return {
|
|
13122
|
-
left,
|
|
13123
|
-
top
|
|
13124
|
-
};
|
|
13125
|
-
};
|
|
13126
|
-
const moveToBody = element => {
|
|
13127
|
-
if (element.parentNode !== document.body) {
|
|
13128
|
-
document.body.appendChild(element);
|
|
13129
|
-
}
|
|
13130
|
-
};
|
|
13131
|
-
const moveToContainer = (element, container) => {
|
|
13132
|
-
if (element.parentNode === document.body) {
|
|
13133
|
-
container.appendChild(element);
|
|
13134
|
-
}
|
|
13135
|
-
};
|
|
13136
|
-
const show = () => {
|
|
13137
|
-
if (props.disabled || isControlled.value) return;
|
|
13138
|
-
isVisible.value = true;
|
|
13139
|
-
emit('show');
|
|
13140
|
-
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)(() => {
|
|
13141
|
-
if (tooltipRef.value && activatorRef.value) {
|
|
13142
|
-
moveToBody(tooltipRef.value);
|
|
13143
|
-
updatePosition();
|
|
13144
|
-
addScrollListener();
|
|
13145
|
-
}
|
|
13146
|
-
});
|
|
13147
|
-
};
|
|
13148
|
-
const hide = () => {
|
|
13149
|
-
if (props.disabled || isControlled.value) return;
|
|
13150
|
-
isVisible.value = false;
|
|
13151
|
-
emit('hide');
|
|
13152
|
-
removeScrollListener();
|
|
13153
|
-
};
|
|
13154
|
-
const close = () => {
|
|
13155
|
-
if (isControlled.value) {
|
|
13156
|
-
emit('update:modelValue', false);
|
|
13157
|
-
} else {
|
|
13158
|
-
hide();
|
|
13159
|
-
}
|
|
13160
|
-
};
|
|
13161
|
-
const updatePosition = () => {
|
|
13162
|
-
if (!activatorRef.value || !tooltipRef.value) return;
|
|
13163
|
-
const activatorRect = activatorRef.value.getBoundingClientRect();
|
|
13164
|
-
const tooltipRect = tooltipRef.value.getBoundingClientRect();
|
|
13165
|
-
const isActivatorVisible = activatorRect.top < window.innerHeight && activatorRect.bottom > 0 && activatorRect.left < window.innerWidth && activatorRect.right > 0;
|
|
13166
|
-
if (!isActivatorVisible && isVisible.value && !isControlled.value) {
|
|
13167
|
-
hide();
|
|
13168
|
-
return;
|
|
13169
|
-
}
|
|
13170
|
-
const position = calculateTooltipPosition(activatorRect, tooltipRect, normalizedPlacement.value, props.offset);
|
|
13171
|
-
tooltipRef.value.style.left = `${position.left}px`;
|
|
13172
|
-
tooltipRef.value.style.top = `${position.top}px`;
|
|
13173
|
-
updateArrowPosition(activatorRect, position);
|
|
13218
|
+
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(() => props.rules, (newVal, oldVal) => {
|
|
13219
|
+
if (composition_deepEqual(newVal, oldVal)) return;
|
|
13220
|
+
fieldValidator = validateFormFieldBuilder(rules.value);
|
|
13221
|
+
validate = validateFormMethodBuilder(errorBucket, valid, fieldValidator);
|
|
13222
|
+
validate(innerValue.value);
|
|
13223
|
+
});
|
|
13224
|
+
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.onBeforeMount)(() => {
|
|
13225
|
+
validate(innerValue.value);
|
|
13226
|
+
});
|
|
13227
|
+
let validate = validateFormMethodBuilder(errorBucket, valid, fieldValidator);
|
|
13228
|
+
const onKeyUp = event => {
|
|
13229
|
+
isTouched.value = true;
|
|
13230
|
+
emit('keyup', event);
|
|
13231
|
+
setTimeout(() => {
|
|
13232
|
+
emit('change', innerValue.value);
|
|
13233
|
+
}, 100);
|
|
13174
13234
|
};
|
|
13175
|
-
const
|
|
13176
|
-
|
|
13177
|
-
|
|
13178
|
-
if (!arrow) return;
|
|
13179
|
-
const activatorCenterX = activatorRect.left + activatorRect.width / 2;
|
|
13180
|
-
const arrowX = activatorCenterX - tooltipPosition.left;
|
|
13181
|
-
const tooltipWidth = tooltipRef.value.offsetWidth;
|
|
13182
|
-
const minArrowX = 12;
|
|
13183
|
-
const maxArrowX = tooltipWidth - 12;
|
|
13184
|
-
const clampedArrowX = Math.max(minArrowX, Math.min(maxArrowX, arrowX));
|
|
13185
|
-
arrow.style.left = `${clampedArrowX}px`;
|
|
13186
|
-
arrow.style.transform = 'translateX(-50%)';
|
|
13235
|
+
const onBlur = event => {
|
|
13236
|
+
isBlured.value = true;
|
|
13237
|
+
emit('blur', event);
|
|
13187
13238
|
};
|
|
13188
|
-
const
|
|
13189
|
-
|
|
13190
|
-
const nodeList = document.querySelectorAll('.farm-modal, .modal-content, [style*="overflow-y: auto"], [style*="overflow-y: scroll"]');
|
|
13191
|
-
scrollableElementsRef.value = Array.from(nodeList);
|
|
13192
|
-
}
|
|
13193
|
-
return scrollableElementsRef.value;
|
|
13239
|
+
const onFocus = focus => {
|
|
13240
|
+
isFocus.value = focus;
|
|
13194
13241
|
};
|
|
13195
|
-
const
|
|
13196
|
-
|
|
13197
|
-
|
|
13198
|
-
|
|
13199
|
-
const scrollableElements = getScrollableElements();
|
|
13200
|
-
scrollableElements.forEach(element => {
|
|
13201
|
-
element.addEventListener('scroll', updatePosition, {
|
|
13202
|
-
passive: true
|
|
13203
|
-
});
|
|
13204
|
-
});
|
|
13242
|
+
const reset = () => {
|
|
13243
|
+
innerValue.value = '';
|
|
13244
|
+
isTouched.value = true;
|
|
13245
|
+
emit('update:modelValue', innerValue.value);
|
|
13205
13246
|
};
|
|
13206
|
-
const
|
|
13207
|
-
|
|
13208
|
-
|
|
13209
|
-
scrollableElements.forEach(element => {
|
|
13210
|
-
element.removeEventListener('scroll', updatePosition);
|
|
13211
|
-
});
|
|
13247
|
+
const makePristine = () => {
|
|
13248
|
+
isTouched.value = false;
|
|
13249
|
+
isBlured.value = false;
|
|
13212
13250
|
};
|
|
13213
|
-
|
|
13214
|
-
|
|
13215
|
-
|
|
13216
|
-
|
|
13217
|
-
|
|
13218
|
-
|
|
13219
|
-
|
|
13220
|
-
|
|
13221
|
-
|
|
13222
|
-
|
|
13223
|
-
|
|
13224
|
-
|
|
13225
|
-
|
|
13226
|
-
|
|
13227
|
-
|
|
13228
|
-
|
|
13229
|
-
|
|
13230
|
-
}
|
|
13231
|
-
});
|
|
13232
|
-
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.onBeforeUnmount)(() => {
|
|
13233
|
-
if (tooltipRef.value && containerRef.value) {
|
|
13234
|
-
moveToContainer(tooltipRef.value, containerRef.value);
|
|
13235
|
-
}
|
|
13236
|
-
removeScrollListener();
|
|
13237
|
-
});
|
|
13238
|
-
return (_ctx, _cache) => {
|
|
13239
|
-
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div", {
|
|
13240
|
-
class: "tooltip-container",
|
|
13241
|
-
ref_key: "containerRef",
|
|
13242
|
-
ref: containerRef
|
|
13243
|
-
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
|
|
13244
|
-
ref_key: "activatorRef",
|
|
13245
|
-
ref: activatorRef,
|
|
13246
|
-
class: "tooltip-activator",
|
|
13247
|
-
onMouseover: show,
|
|
13248
|
-
onMouseout: hide,
|
|
13249
|
-
onMouseleave: hide
|
|
13250
|
-
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.renderSlot)(_ctx.$slots, "activator")], 544), isVisible.value ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div", {
|
|
13251
|
-
key: 0,
|
|
13252
|
-
ref_key: "tooltipRef",
|
|
13253
|
-
ref: tooltipRef,
|
|
13254
|
-
class: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.normalizeClass)(tooltipClasses.value),
|
|
13255
|
-
style: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.normalizeStyle)(tooltipStyles.value)
|
|
13256
|
-
}, [hasTitle.value || showCloseButton.value ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div", Tooltipvue_type_script_setup_true_lang_ts_hoisted_1, [hasTitle.value ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div", Tooltipvue_type_script_setup_true_lang_ts_hoisted_2, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.renderSlot)(_ctx.$slots, "title")])) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)("", true), showCloseButton.value ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("span", {
|
|
13257
|
-
key: 1,
|
|
13258
|
-
class: "tooltip-close",
|
|
13259
|
-
onClick: close
|
|
13260
|
-
}, "×")) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)("", true)])) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)("", true), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", Tooltipvue_type_script_setup_true_lang_ts_hoisted_3, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.renderSlot)(_ctx.$slots, "default")]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
|
|
13261
|
-
class: "tooltip-arrow",
|
|
13262
|
-
style: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.normalizeStyle)(arrowStyles.value)
|
|
13263
|
-
}, null, 4)], 6)) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)("", true)], 512);
|
|
13251
|
+
return {
|
|
13252
|
+
innerValue,
|
|
13253
|
+
errorBucket,
|
|
13254
|
+
valid,
|
|
13255
|
+
validatable,
|
|
13256
|
+
hasError,
|
|
13257
|
+
customId,
|
|
13258
|
+
isTouched,
|
|
13259
|
+
isBlured,
|
|
13260
|
+
isFocus,
|
|
13261
|
+
showErrorText,
|
|
13262
|
+
validate,
|
|
13263
|
+
onKeyUp,
|
|
13264
|
+
onBlur,
|
|
13265
|
+
onFocus,
|
|
13266
|
+
reset,
|
|
13267
|
+
makePristine
|
|
13264
13268
|
};
|
|
13265
13269
|
}
|
|
13266
|
-
})
|
|
13267
|
-
;// CONCATENATED MODULE: ./src/components/
|
|
13270
|
+
});
|
|
13271
|
+
;// CONCATENATED MODULE: ./src/components/InputDecimalFormatter/InputDecimalFormatter.vue?vue&type=script&lang=ts
|
|
13268
13272
|
|
|
13269
|
-
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-69.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-69.use[1]!./node_modules/@vue/cli-service/node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-69.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-69.use[3]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/vue-loader/dist/index.js??ruleSet[0].use[1]!./src/components/
|
|
13273
|
+
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-69.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-69.use[1]!./node_modules/@vue/cli-service/node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-69.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-69.use[3]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/vue-loader/dist/index.js??ruleSet[0].use[1]!./src/components/InputDecimalFormatter/InputDecimalFormatter.vue?vue&type=style&index=0&id=98371fda&lang=scss&scoped=true
|
|
13270
13274
|
// extracted by mini-css-extract-plugin
|
|
13271
13275
|
|
|
13272
|
-
;// CONCATENATED MODULE: ./src/components/
|
|
13276
|
+
;// CONCATENATED MODULE: ./src/components/InputDecimalFormatter/InputDecimalFormatter.vue?vue&type=style&index=0&id=98371fda&lang=scss&scoped=true
|
|
13277
|
+
|
|
13278
|
+
;// CONCATENATED MODULE: ./src/components/InputDecimalFormatter/InputDecimalFormatter.vue
|
|
13273
13279
|
|
|
13274
|
-
;// CONCATENATED MODULE: ./src/components/Tooltip/Tooltip.vue
|
|
13275
13280
|
|
|
13276
13281
|
|
|
13277
13282
|
|
|
13278
13283
|
;
|
|
13279
13284
|
|
|
13280
13285
|
|
|
13281
|
-
const
|
|
13286
|
+
const InputDecimalFormatter_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(InputDecimalFormattervue_type_script_lang_ts, [['render',InputDecimalFormattervue_type_template_id_98371fda_scoped_true_ts_true_render],['__scopeId',"data-v-98371fda"]])
|
|
13282
13287
|
|
|
13283
|
-
/* harmony default export */ var
|
|
13284
|
-
;// CONCATENATED MODULE: ./src/components/
|
|
13288
|
+
/* harmony default export */ var InputDecimalFormatter_InputDecimalFormatter = (InputDecimalFormatter_exports_);
|
|
13289
|
+
;// CONCATENATED MODULE: ./src/components/InputDecimalFormatter/index.ts
|
|
13285
13290
|
|
|
13286
13291
|
|
|
13287
|
-
/* harmony default export */ var
|
|
13292
|
+
/* harmony default export */ var components_InputDecimalFormatter = ((/* unused pure expression or super */ null && (InputDecimalFormatter)));
|
|
13288
13293
|
;// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??clonedRuleSet-89.use[0]!./node_modules/@vue/cli-plugin-typescript/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js!./node_modules/ts-loader/index.js??clonedRuleSet-89.use[3]!./node_modules/@vue/cli-service/node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[5]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/vue-loader/dist/index.js??ruleSet[0].use[1]!./src/components/Typography/Typography.vue?vue&type=template&id=bb5a0afc&scoped=true&ts=true
|
|
13289
13294
|
|
|
13290
13295
|
function Typographyvue_type_template_id_bb5a0afc_scoped_true_ts_true_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
@@ -14483,6 +14488,12 @@ const Line_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(Linevue_type_
|
|
|
14483
14488
|
|
|
14484
14489
|
|
|
14485
14490
|
/* harmony default export */ var layout_Line = ((/* unused pure expression or super */ null && (Line)));
|
|
14491
|
+
;// CONCATENATED MODULE: ./src/assets/icons/custom-icons-list.ts
|
|
14492
|
+
const customIconsList = ['custom-currency-exchange'];
|
|
14493
|
+
/* harmony default export */ var custom_icons_list = (customIconsList);
|
|
14494
|
+
;// CONCATENATED MODULE: ./src/assets/icons/index.ts
|
|
14495
|
+
|
|
14496
|
+
|
|
14486
14497
|
;// CONCATENATED MODULE: ./src/main.ts
|
|
14487
14498
|
|
|
14488
14499
|
|
|
@@ -14549,6 +14560,8 @@ const Line_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(Linevue_type_
|
|
|
14549
14560
|
|
|
14550
14561
|
|
|
14551
14562
|
|
|
14563
|
+
|
|
14564
|
+
|
|
14552
14565
|
|
|
14553
14566
|
|
|
14554
14567
|
|