funda-ui 4.5.12 → 4.5.35
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/Date/index.js +33 -29
- package/Input/index.js +6 -2
- package/MultipleCheckboxes/index.js +34 -10
- package/Radio/index.js +4 -4
- package/RangeSlider/index.js +33 -29
- package/Select/index.js +6 -2
- package/Tabs/index.js +14 -10
- package/Textarea/index.js +6 -2
- package/Tooltip/index.js +253 -1
- package/Utils/inputsCalculation.d.ts +2 -1
- package/Utils/inputsCalculation.js +1 -0
- package/lib/cjs/Date/index.js +33 -29
- package/lib/cjs/Input/index.js +6 -2
- package/lib/cjs/MultipleCheckboxes/index.js +34 -10
- package/lib/cjs/Radio/index.js +4 -4
- package/lib/cjs/RangeSlider/index.js +33 -29
- package/lib/cjs/Select/index.js +6 -2
- package/lib/cjs/Tabs/index.js +14 -10
- package/lib/cjs/Textarea/index.js +6 -2
- package/lib/cjs/Tooltip/index.js +253 -1
- package/lib/cjs/Utils/inputsCalculation.d.ts +2 -1
- package/lib/cjs/Utils/inputsCalculation.js +1 -0
- package/lib/esm/MultipleCheckboxes/index.tsx +35 -7
- package/lib/esm/Radio/index.tsx +15 -7
- package/lib/esm/Tabs/Tabs.tsx +15 -12
- package/lib/esm/Tooltip/index.scss +0 -1
- package/lib/esm/Tooltip/index.tsx +23 -1
- package/lib/esm/Utils/libs/inputsCalculation.ts +1 -0
- package/package.json +1 -1
package/Textarea/index.js
CHANGED
|
@@ -304,6 +304,10 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
304
304
|
return (/* binding */_actualPropertyValue
|
|
305
305
|
);
|
|
306
306
|
},
|
|
307
|
+
/* harmony export */"getElCSS": function getElCSS() {
|
|
308
|
+
return (/* binding */_getElCSS
|
|
309
|
+
);
|
|
310
|
+
},
|
|
307
311
|
/* harmony export */"getTextTop": function getTextTop() {
|
|
308
312
|
return (/* binding */_getTextTop
|
|
309
313
|
);
|
|
@@ -406,7 +410,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
406
410
|
el.style.visibility = visibility;
|
|
407
411
|
return actualVal;
|
|
408
412
|
}
|
|
409
|
-
function
|
|
413
|
+
function _getElCSS(input, prop, isNumber) {
|
|
410
414
|
var _document$defaultView;
|
|
411
415
|
var val = (_document$defaultView = document.defaultView) === null || _document$defaultView === void 0 ? void 0 : _document$defaultView.getComputedStyle(input, null).getPropertyValue(prop);
|
|
412
416
|
return isNumber ? isNaN(parseFloat(val)) ? 0 : parseFloat(val) : val;
|
|
@@ -437,7 +441,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
437
441
|
_faux.style.setProperty('margin', '0');
|
|
438
442
|
_faux.style.setProperty('display', 'none');
|
|
439
443
|
for (var i = 0; i < listOfModifiers.length; i++) {
|
|
440
|
-
var propertyValue =
|
|
444
|
+
var propertyValue = _getElCSS(_fauxContainer, listOfModifiers[i], false);
|
|
441
445
|
_faux.style.setProperty(listOfModifiers[i], propertyValue);
|
|
442
446
|
}
|
|
443
447
|
_faux.textContent = input.value.substring(0, _off).replace(/\s/g, "\xA0");
|
package/Tooltip/index.js
CHANGED
|
@@ -665,6 +665,239 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
665
665
|
|
|
666
666
|
/***/ }),
|
|
667
667
|
|
|
668
|
+
/***/ 954:
|
|
669
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
670
|
+
|
|
671
|
+
/* module decorator */ module = __webpack_require__.nmd(module);
|
|
672
|
+
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
673
|
+
(function webpackUniversalModuleDefinition(root, factory) {
|
|
674
|
+
if (( false ? 0 : _typeof(exports)) === 'object' && ( false ? 0 : _typeof(module)) === 'object') module.exports = factory();else if (true) !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
|
|
675
|
+
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
|
|
676
|
+
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
|
|
677
|
+
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}
|
|
678
|
+
})(this, function () {
|
|
679
|
+
return (/******/function () {
|
|
680
|
+
// webpackBootstrap
|
|
681
|
+
/******/
|
|
682
|
+
"use strict";
|
|
683
|
+
|
|
684
|
+
/******/ // The require scope
|
|
685
|
+
/******/
|
|
686
|
+
var __nested_webpack_require_987__ = {};
|
|
687
|
+
/******/
|
|
688
|
+
/************************************************************************/
|
|
689
|
+
/******/ /* webpack/runtime/define property getters */
|
|
690
|
+
/******/
|
|
691
|
+
(function () {
|
|
692
|
+
/******/ // define getter functions for harmony exports
|
|
693
|
+
/******/__nested_webpack_require_987__.d = function (exports, definition) {
|
|
694
|
+
/******/for (var key in definition) {
|
|
695
|
+
/******/if (__nested_webpack_require_987__.o(definition, key) && !__nested_webpack_require_987__.o(exports, key)) {
|
|
696
|
+
/******/Object.defineProperty(exports, key, {
|
|
697
|
+
enumerable: true,
|
|
698
|
+
get: definition[key]
|
|
699
|
+
});
|
|
700
|
+
/******/
|
|
701
|
+
}
|
|
702
|
+
/******/
|
|
703
|
+
}
|
|
704
|
+
/******/
|
|
705
|
+
};
|
|
706
|
+
/******/
|
|
707
|
+
})();
|
|
708
|
+
/******/
|
|
709
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
710
|
+
/******/
|
|
711
|
+
(function () {
|
|
712
|
+
/******/__nested_webpack_require_987__.o = function (obj, prop) {
|
|
713
|
+
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
714
|
+
};
|
|
715
|
+
/******/
|
|
716
|
+
})();
|
|
717
|
+
/******/
|
|
718
|
+
/******/ /* webpack/runtime/make namespace object */
|
|
719
|
+
/******/
|
|
720
|
+
(function () {
|
|
721
|
+
/******/ // define __esModule on exports
|
|
722
|
+
/******/__nested_webpack_require_987__.r = function (exports) {
|
|
723
|
+
/******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
724
|
+
/******/Object.defineProperty(exports, Symbol.toStringTag, {
|
|
725
|
+
value: 'Module'
|
|
726
|
+
});
|
|
727
|
+
/******/
|
|
728
|
+
}
|
|
729
|
+
/******/
|
|
730
|
+
Object.defineProperty(exports, '__esModule', {
|
|
731
|
+
value: true
|
|
732
|
+
});
|
|
733
|
+
/******/
|
|
734
|
+
};
|
|
735
|
+
/******/
|
|
736
|
+
})();
|
|
737
|
+
/******/
|
|
738
|
+
/************************************************************************/
|
|
739
|
+
var __webpack_exports__ = {};
|
|
740
|
+
__nested_webpack_require_987__.r(__webpack_exports__);
|
|
741
|
+
/* harmony export */
|
|
742
|
+
__nested_webpack_require_987__.d(__webpack_exports__, {
|
|
743
|
+
/* harmony export */"actualPropertyValue": function actualPropertyValue() {
|
|
744
|
+
return (/* binding */_actualPropertyValue
|
|
745
|
+
);
|
|
746
|
+
},
|
|
747
|
+
/* harmony export */"getElCSS": function getElCSS() {
|
|
748
|
+
return (/* binding */_getElCSS
|
|
749
|
+
);
|
|
750
|
+
},
|
|
751
|
+
/* harmony export */"getTextTop": function getTextTop() {
|
|
752
|
+
return (/* binding */_getTextTop
|
|
753
|
+
);
|
|
754
|
+
},
|
|
755
|
+
/* harmony export */"getTextWidth": function getTextWidth() {
|
|
756
|
+
return (/* binding */_getTextWidth
|
|
757
|
+
);
|
|
758
|
+
}
|
|
759
|
+
/* harmony export */
|
|
760
|
+
});
|
|
761
|
+
/**
|
|
762
|
+
* Gets the relative upside of the text
|
|
763
|
+
* @param {Element} el - A DOM node containing one selector to match against.
|
|
764
|
+
* @returns {Number} - Returns a pure number.
|
|
765
|
+
*/
|
|
766
|
+
function _getTextTop(el) {
|
|
767
|
+
var styles = window.getComputedStyle(el);
|
|
768
|
+
var fontSize = parseFloat(styles.fontSize);
|
|
769
|
+
var lineHeight = parseFloat(styles.lineHeight) || fontSize;
|
|
770
|
+
var paddingTop = parseFloat(styles.paddingTop);
|
|
771
|
+
var borderWidth = parseFloat(styles.borderWidth);
|
|
772
|
+
var textTop = paddingTop + (lineHeight - fontSize) / 2 - borderWidth * 2;
|
|
773
|
+
return textTop;
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
/**
|
|
777
|
+
* Get the actual value with user specific methed
|
|
778
|
+
* it can be 'width', 'height', 'outerWidth', 'outerHeight'
|
|
779
|
+
* @private
|
|
780
|
+
* @param {Element} el - A DOM node containing one selector to match against.
|
|
781
|
+
* @param {String} prop - A string naming the property of style.
|
|
782
|
+
* @param {?Json} config - Whether or not margin is included. The key `includeMargin`
|
|
783
|
+
takes effect when set to true
|
|
784
|
+
* @return {Number} - Returns a pure number.
|
|
785
|
+
*/
|
|
786
|
+
function _actualPropertyValue(el, prop) {
|
|
787
|
+
var config = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
|
|
788
|
+
if (el === null) return 0;
|
|
789
|
+
var style = window.getComputedStyle ? window.getComputedStyle(el) : el.currentStyle,
|
|
790
|
+
display = style.display,
|
|
791
|
+
position = style.position,
|
|
792
|
+
visibility = style.visibility;
|
|
793
|
+
var marginWidth = 0;
|
|
794
|
+
var marginHeight = 0;
|
|
795
|
+
var maxVal;
|
|
796
|
+
var actualVal;
|
|
797
|
+
if (config && config.includeMargin === true) {
|
|
798
|
+
marginWidth = parseFloat(style.marginLeft) + parseFloat(style.marginRight);
|
|
799
|
+
marginHeight = parseFloat(style.marginTop) + parseFloat(style.marginBottom);
|
|
800
|
+
}
|
|
801
|
+
if (prop === 'fontSize') {
|
|
802
|
+
actualVal = parseFloat(style.fontSize);
|
|
803
|
+
}
|
|
804
|
+
if (prop === 'fontFamily') {
|
|
805
|
+
actualVal = style.fontFamily;
|
|
806
|
+
}
|
|
807
|
+
if (prop === 'letterSpacing') {
|
|
808
|
+
actualVal = style.letterSpacing;
|
|
809
|
+
}
|
|
810
|
+
if (prop === 'width') {
|
|
811
|
+
maxVal = parseFloat(style.maxWidth);
|
|
812
|
+
|
|
813
|
+
// if its not hidden we just return normal height
|
|
814
|
+
if (display !== 'none' && maxVal !== 0) {
|
|
815
|
+
return el.clientWidth;
|
|
816
|
+
}
|
|
817
|
+
}
|
|
818
|
+
if (prop === 'height') {
|
|
819
|
+
maxVal = parseFloat(style.maxHeight);
|
|
820
|
+
if (display !== 'none' && maxVal !== 0) {
|
|
821
|
+
return el.clientHeight;
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
if (prop === 'outerWidth') {
|
|
825
|
+
maxVal = parseFloat(style.maxWidth);
|
|
826
|
+
if (display !== 'none' && maxVal !== 0) {
|
|
827
|
+
return el.offsetWidth + marginWidth;
|
|
828
|
+
}
|
|
829
|
+
}
|
|
830
|
+
if (prop === 'outerHeight') {
|
|
831
|
+
maxVal = parseFloat(style.maxHeight);
|
|
832
|
+
if (display !== 'none' && maxVal !== 0) {
|
|
833
|
+
return el.offsetHeight + marginHeight;
|
|
834
|
+
}
|
|
835
|
+
}
|
|
836
|
+
|
|
837
|
+
// the element is hidden so:
|
|
838
|
+
// making the el block so we can meassure its height but still be hidden
|
|
839
|
+
el.style.position = 'absolute';
|
|
840
|
+
el.style.visibility = 'hidden';
|
|
841
|
+
el.style.display = 'block';
|
|
842
|
+
if (prop === 'width') actualVal = el.clientWidth;
|
|
843
|
+
if (prop === 'height') actualVal = el.clientHeight;
|
|
844
|
+
if (prop === 'outerWidth') actualVal = el.offsetWidth + marginWidth;
|
|
845
|
+
if (prop === 'outerHeight') actualVal = el.offsetHeight + marginHeight;
|
|
846
|
+
|
|
847
|
+
// reverting to the original values
|
|
848
|
+
el.style.display = display;
|
|
849
|
+
el.style.position = position;
|
|
850
|
+
el.style.visibility = visibility;
|
|
851
|
+
return actualVal;
|
|
852
|
+
}
|
|
853
|
+
function _getElCSS(input, prop, isNumber) {
|
|
854
|
+
var _document$defaultView;
|
|
855
|
+
var val = (_document$defaultView = document.defaultView) === null || _document$defaultView === void 0 ? void 0 : _document$defaultView.getComputedStyle(input, null).getPropertyValue(prop);
|
|
856
|
+
return isNumber ? isNaN(parseFloat(val)) ? 0 : parseFloat(val) : val;
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
/**
|
|
860
|
+
* Get cursor or text position in pixels for input element
|
|
861
|
+
*
|
|
862
|
+
* @param {HTMLInputElement} input Required HTMLElement with `value` attribute
|
|
863
|
+
* @param {HTMLSpanElement} fauxContainer Container of faux.
|
|
864
|
+
* @param {HTMLElement} rawTextContainer The raw text container for the comparison
|
|
865
|
+
* @returns {Number}
|
|
866
|
+
*/
|
|
867
|
+
|
|
868
|
+
function _getTextWidth(input, fauxContainer, rawTextContainer) {
|
|
869
|
+
if (input === null || fauxContainer === null || rawTextContainer === null) return 0;
|
|
870
|
+
var _off = input.selectionStart;
|
|
871
|
+
var _faux = fauxContainer;
|
|
872
|
+
var _fauxContainer = rawTextContainer;
|
|
873
|
+
if (_faux && _fauxContainer) {
|
|
874
|
+
// Styles to simulate a node in an input field
|
|
875
|
+
// use pre-wrap instead of wrap for white-space to support wrapping in textareas
|
|
876
|
+
var listOfModifiers = ['direction', 'font-family', 'font-size', 'font-size-adjust', 'font-variant', 'font-weight', 'font-style', 'letter-spacing', 'line-height', 'text-align', 'text-indent', 'text-transform', 'word-wrap', 'word-spacing'];
|
|
877
|
+
|
|
878
|
+
// default styles
|
|
879
|
+
_faux.style.setProperty('white-space', 'pre-wrap');
|
|
880
|
+
_faux.style.setProperty('padding', '0');
|
|
881
|
+
_faux.style.setProperty('margin', '0');
|
|
882
|
+
_faux.style.setProperty('display', 'none');
|
|
883
|
+
for (var i = 0; i < listOfModifiers.length; i++) {
|
|
884
|
+
var propertyValue = _getElCSS(_fauxContainer, listOfModifiers[i], false);
|
|
885
|
+
_faux.style.setProperty(listOfModifiers[i], propertyValue);
|
|
886
|
+
}
|
|
887
|
+
_faux.textContent = input.value.substring(0, _off).replace(/\s/g, "\xA0");
|
|
888
|
+
return _actualPropertyValue(_faux, 'outerWidth');
|
|
889
|
+
}
|
|
890
|
+
}
|
|
891
|
+
|
|
892
|
+
/******/
|
|
893
|
+
return __webpack_exports__;
|
|
894
|
+
/******/
|
|
895
|
+
}()
|
|
896
|
+
);
|
|
897
|
+
});
|
|
898
|
+
|
|
899
|
+
/***/ }),
|
|
900
|
+
|
|
668
901
|
/***/ 761:
|
|
669
902
|
/***/ (function(module, exports, __webpack_require__) {
|
|
670
903
|
|
|
@@ -1189,6 +1422,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1189
1422
|
/* harmony import */ var funda_utils_dist_cjs_getElementProperty__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(funda_utils_dist_cjs_getElementProperty__WEBPACK_IMPORTED_MODULE_4__);
|
|
1190
1423
|
/* harmony import */ var funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(188);
|
|
1191
1424
|
/* harmony import */ var funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_5__);
|
|
1425
|
+
/* harmony import */ var funda_utils_dist_cjs_inputsCalculation__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(954);
|
|
1426
|
+
/* harmony import */ var funda_utils_dist_cjs_inputsCalculation__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(funda_utils_dist_cjs_inputsCalculation__WEBPACK_IMPORTED_MODULE_6__);
|
|
1192
1427
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
1193
1428
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
1194
1429
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
@@ -1201,6 +1436,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
1201
1436
|
|
|
1202
1437
|
|
|
1203
1438
|
|
|
1439
|
+
|
|
1204
1440
|
var useContainerDimensions = function useContainerDimensions(myRef) {
|
|
1205
1441
|
var _useState = useState({
|
|
1206
1442
|
width: 0,
|
|
@@ -1240,7 +1476,7 @@ var Tooltip = function Tooltip(props) {
|
|
|
1240
1476
|
content = props.content,
|
|
1241
1477
|
id = props.id,
|
|
1242
1478
|
children = props.children;
|
|
1243
|
-
var POS_OFFSET = Number(offset) ||
|
|
1479
|
+
var POS_OFFSET = Number(offset) || 4;
|
|
1244
1480
|
var EXCEEDED_SIDE_POS_OFFSET = Number(exceededSidePosOffset) || 15;
|
|
1245
1481
|
var uniqueID = funda_utils_dist_cjs_useComId__WEBPACK_IMPORTED_MODULE_2___default()();
|
|
1246
1482
|
var idRes = id || uniqueID;
|
|
@@ -1311,7 +1547,23 @@ var Tooltip = function Tooltip(props) {
|
|
|
1311
1547
|
var _modalContent = _modalRef.querySelector('.tooltip__content');
|
|
1312
1548
|
var _modalBox = _modalContent.getBoundingClientRect();
|
|
1313
1549
|
if (typeof _modalContent.dataset.offset === 'undefined' && _modalBox.left > 0) {
|
|
1550
|
+
// Adjust the coordinates due to height
|
|
1551
|
+
//------------------
|
|
1552
|
+
var triggerEl = document.querySelector("[data-overlay-id=\"".concat(_modalRef.id, "\"]"));
|
|
1553
|
+
if (triggerEl !== null) {
|
|
1554
|
+
var pos = triggerEl.dataset.microtipPosition;
|
|
1555
|
+
if (typeof pos === 'undefined') pos = 'top';
|
|
1556
|
+
var _offsetY = _modalBox.height - (0,funda_utils_dist_cjs_inputsCalculation__WEBPACK_IMPORTED_MODULE_6__.getElCSS)(_modalContent, 'font-size', true) - (0,funda_utils_dist_cjs_inputsCalculation__WEBPACK_IMPORTED_MODULE_6__.getElCSS)(_modalContent, 'padding-top', true) - (0,funda_utils_dist_cjs_inputsCalculation__WEBPACK_IMPORTED_MODULE_6__.getElCSS)(_modalContent, 'padding-bottom', true);
|
|
1557
|
+
|
|
1558
|
+
// TOP
|
|
1559
|
+
//
|
|
1560
|
+
if (pos.indexOf('top') >= 0) {
|
|
1561
|
+
_modalRef.style.transform = "translateY(-".concat(_offsetY, "px)");
|
|
1562
|
+
}
|
|
1563
|
+
}
|
|
1564
|
+
|
|
1314
1565
|
// 10 pixels is used to account for some bias in mobile devices
|
|
1566
|
+
//------------------
|
|
1315
1567
|
if (_modalBox.right + 10 > window.innerWidth) {
|
|
1316
1568
|
var _modalOffsetPosition = _modalBox.right - window.innerWidth + EXCEEDED_SIDE_POS_OFFSET;
|
|
1317
1569
|
_modalContent.dataset.offset = _modalOffsetPosition;
|
|
@@ -15,6 +15,7 @@ declare function getTextTop(el: HTMLElement): number;
|
|
|
15
15
|
* @return {Number} - Returns a pure number.
|
|
16
16
|
*/
|
|
17
17
|
declare function actualPropertyValue(el: any, prop: string, config?: any): any;
|
|
18
|
+
declare function getElCSS(input: HTMLElement, prop: any, isNumber: boolean): any;
|
|
18
19
|
/**
|
|
19
20
|
* Get cursor or text position in pixels for input element
|
|
20
21
|
*
|
|
@@ -24,4 +25,4 @@ declare function actualPropertyValue(el: any, prop: string, config?: any): any;
|
|
|
24
25
|
* @returns {Number}
|
|
25
26
|
*/
|
|
26
27
|
declare function getTextWidth(input: HTMLInputElement, fauxContainer: HTMLSpanElement, rawTextContainer: HTMLElement): any;
|
|
27
|
-
export { getTextTop, actualPropertyValue, getTextWidth };
|
|
28
|
+
export { getElCSS, getTextTop, actualPropertyValue, getTextWidth };
|
|
@@ -47,6 +47,7 @@ var __webpack_exports__ = {};
|
|
|
47
47
|
__webpack_require__.r(__webpack_exports__);
|
|
48
48
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
49
49
|
/* harmony export */ "actualPropertyValue": () => (/* binding */ actualPropertyValue),
|
|
50
|
+
/* harmony export */ "getElCSS": () => (/* binding */ getElCSS),
|
|
50
51
|
/* harmony export */ "getTextTop": () => (/* binding */ getTextTop),
|
|
51
52
|
/* harmony export */ "getTextWidth": () => (/* binding */ getTextWidth)
|
|
52
53
|
/* harmony export */ });
|
package/lib/cjs/Date/index.js
CHANGED
|
@@ -363,6 +363,10 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
363
363
|
return (/* binding */_actualPropertyValue
|
|
364
364
|
);
|
|
365
365
|
},
|
|
366
|
+
/* harmony export */"getElCSS": function getElCSS() {
|
|
367
|
+
return (/* binding */_getElCSS
|
|
368
|
+
);
|
|
369
|
+
},
|
|
366
370
|
/* harmony export */"getTextTop": function getTextTop() {
|
|
367
371
|
return (/* binding */_getTextTop
|
|
368
372
|
);
|
|
@@ -465,7 +469,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
465
469
|
el.style.visibility = visibility;
|
|
466
470
|
return actualVal;
|
|
467
471
|
}
|
|
468
|
-
function
|
|
472
|
+
function _getElCSS(input, prop, isNumber) {
|
|
469
473
|
var _document$defaultView;
|
|
470
474
|
var val = (_document$defaultView = document.defaultView) === null || _document$defaultView === void 0 ? void 0 : _document$defaultView.getComputedStyle(input, null).getPropertyValue(prop);
|
|
471
475
|
return isNumber ? isNaN(parseFloat(val)) ? 0 : parseFloat(val) : val;
|
|
@@ -496,7 +500,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
496
500
|
_faux.style.setProperty('margin', '0');
|
|
497
501
|
_faux.style.setProperty('display', 'none');
|
|
498
502
|
for (var i = 0; i < listOfModifiers.length; i++) {
|
|
499
|
-
var propertyValue =
|
|
503
|
+
var propertyValue = _getElCSS(_fauxContainer, listOfModifiers[i], false);
|
|
500
504
|
_faux.style.setProperty(listOfModifiers[i], propertyValue);
|
|
501
505
|
}
|
|
502
506
|
_faux.textContent = input.value.substring(0, _off).replace(/\s/g, "\xA0");
|
|
@@ -514,8 +518,8 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
514
518
|
/***/
|
|
515
519
|
},
|
|
516
520
|
|
|
517
|
-
/***/85: /***/function _(module, exports,
|
|
518
|
-
/* module decorator */module =
|
|
521
|
+
/***/85: /***/function _(module, exports, __nested_webpack_require_23663__) {
|
|
522
|
+
/* module decorator */module = __nested_webpack_require_23663__.nmd(module);
|
|
519
523
|
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
|
|
520
524
|
function _typeof(obj) {
|
|
521
525
|
"@babel/helpers - typeof";
|
|
@@ -527,7 +531,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
527
531
|
}, _typeof(obj);
|
|
528
532
|
}
|
|
529
533
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
530
|
-
if (( false ? 0 : _typeof(exports)) === 'object' && ( false ? 0 : _typeof(module)) === 'object') module.exports = factory(
|
|
534
|
+
if (( false ? 0 : _typeof(exports)) === 'object' && ( false ? 0 : _typeof(module)) === 'object') module.exports = factory(__nested_webpack_require_23663__(787));else if (true) !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__nested_webpack_require_23663__(787)], __WEBPACK_AMD_DEFINE_FACTORY__ = factory, __WEBPACK_AMD_DEFINE_RESULT__ = typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? __WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__) : __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}
|
|
531
535
|
})(this, function (__WEBPACK_EXTERNAL_MODULE__787__) {
|
|
532
536
|
return (/******/function () {
|
|
533
537
|
// webpackBootstrap
|
|
@@ -687,8 +691,8 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
687
691
|
/***/
|
|
688
692
|
},
|
|
689
693
|
|
|
690
|
-
/***/702: /***/function _(module, exports,
|
|
691
|
-
/* module decorator */module =
|
|
694
|
+
/***/702: /***/function _(module, exports, __nested_webpack_require_31751__) {
|
|
695
|
+
/* module decorator */module = __nested_webpack_require_31751__.nmd(module);
|
|
692
696
|
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
|
|
693
697
|
function _typeof(obj) {
|
|
694
698
|
"@babel/helpers - typeof";
|
|
@@ -700,7 +704,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
700
704
|
}, _typeof(obj);
|
|
701
705
|
}
|
|
702
706
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
703
|
-
if (( false ? 0 : _typeof(exports)) === 'object' && ( false ? 0 : _typeof(module)) === 'object') module.exports = factory(
|
|
707
|
+
if (( false ? 0 : _typeof(exports)) === 'object' && ( false ? 0 : _typeof(module)) === 'object') module.exports = factory(__nested_webpack_require_31751__(787));else if (true) !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__nested_webpack_require_31751__(787)], __WEBPACK_AMD_DEFINE_FACTORY__ = factory, __WEBPACK_AMD_DEFINE_RESULT__ = typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? __WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__) : __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}
|
|
704
708
|
})(this, function (__WEBPACK_EXTERNAL_MODULE__787__) {
|
|
705
709
|
return (/******/function () {
|
|
706
710
|
// webpackBootstrap
|
|
@@ -901,7 +905,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
901
905
|
/******/
|
|
902
906
|
/******/ // The require function
|
|
903
907
|
/******/
|
|
904
|
-
function
|
|
908
|
+
function __nested_webpack_require_41372__(moduleId) {
|
|
905
909
|
/******/ // Check if module is in cache
|
|
906
910
|
/******/var cachedModule = __webpack_module_cache__[moduleId];
|
|
907
911
|
/******/
|
|
@@ -920,7 +924,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
920
924
|
/******/
|
|
921
925
|
/******/ // Execute the module function
|
|
922
926
|
/******/
|
|
923
|
-
__webpack_modules__[moduleId].call(module.exports, module, module.exports,
|
|
927
|
+
__webpack_modules__[moduleId].call(module.exports, module, module.exports, __nested_webpack_require_41372__);
|
|
924
928
|
/******/
|
|
925
929
|
/******/ // Flag the module as loaded
|
|
926
930
|
/******/
|
|
@@ -937,14 +941,14 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
937
941
|
/******/
|
|
938
942
|
(function () {
|
|
939
943
|
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
940
|
-
/******/
|
|
944
|
+
/******/__nested_webpack_require_41372__.n = function (module) {
|
|
941
945
|
/******/var getter = module && module.__esModule ? /******/function () {
|
|
942
946
|
return module['default'];
|
|
943
947
|
} : /******/function () {
|
|
944
948
|
return module;
|
|
945
949
|
};
|
|
946
950
|
/******/
|
|
947
|
-
|
|
951
|
+
__nested_webpack_require_41372__.d(getter, {
|
|
948
952
|
a: getter
|
|
949
953
|
});
|
|
950
954
|
/******/
|
|
@@ -958,9 +962,9 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
958
962
|
/******/
|
|
959
963
|
(function () {
|
|
960
964
|
/******/ // define getter functions for harmony exports
|
|
961
|
-
/******/
|
|
965
|
+
/******/__nested_webpack_require_41372__.d = function (exports, definition) {
|
|
962
966
|
/******/for (var key in definition) {
|
|
963
|
-
/******/if (
|
|
967
|
+
/******/if (__nested_webpack_require_41372__.o(definition, key) && !__nested_webpack_require_41372__.o(exports, key)) {
|
|
964
968
|
/******/Object.defineProperty(exports, key, {
|
|
965
969
|
enumerable: true,
|
|
966
970
|
get: definition[key]
|
|
@@ -977,7 +981,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
977
981
|
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
978
982
|
/******/
|
|
979
983
|
(function () {
|
|
980
|
-
/******/
|
|
984
|
+
/******/__nested_webpack_require_41372__.o = function (obj, prop) {
|
|
981
985
|
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
982
986
|
};
|
|
983
987
|
/******/
|
|
@@ -987,7 +991,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
987
991
|
/******/
|
|
988
992
|
(function () {
|
|
989
993
|
/******/ // define __esModule on exports
|
|
990
|
-
/******/
|
|
994
|
+
/******/__nested_webpack_require_41372__.r = function (exports) {
|
|
991
995
|
/******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
992
996
|
/******/Object.defineProperty(exports, Symbol.toStringTag, {
|
|
993
997
|
value: 'Module'
|
|
@@ -1006,7 +1010,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
1006
1010
|
/******/ /* webpack/runtime/node module decorator */
|
|
1007
1011
|
/******/
|
|
1008
1012
|
(function () {
|
|
1009
|
-
/******/
|
|
1013
|
+
/******/__nested_webpack_require_41372__.nmd = function (module) {
|
|
1010
1014
|
/******/module.paths = [];
|
|
1011
1015
|
/******/
|
|
1012
1016
|
if (!module.children) module.children = [];
|
|
@@ -1023,34 +1027,34 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
1023
1027
|
(function () {
|
|
1024
1028
|
"use strict";
|
|
1025
1029
|
|
|
1026
|
-
|
|
1030
|
+
__nested_webpack_require_41372__.r(__webpack_exports__);
|
|
1027
1031
|
/* harmony export */
|
|
1028
|
-
|
|
1032
|
+
__nested_webpack_require_41372__.d(__webpack_exports__, {
|
|
1029
1033
|
/* harmony export */"default": function _default() {
|
|
1030
1034
|
return __WEBPACK_DEFAULT_EXPORT__;
|
|
1031
1035
|
}
|
|
1032
1036
|
/* harmony export */
|
|
1033
1037
|
});
|
|
1034
1038
|
/* harmony import */
|
|
1035
|
-
var react__WEBPACK_IMPORTED_MODULE_0__ =
|
|
1039
|
+
var react__WEBPACK_IMPORTED_MODULE_0__ = __nested_webpack_require_41372__(787);
|
|
1036
1040
|
/* harmony import */
|
|
1037
|
-
var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/
|
|
1041
|
+
var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__nested_webpack_require_41372__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
1038
1042
|
/* harmony import */
|
|
1039
|
-
var funda_utils_dist_cjs_useComId__WEBPACK_IMPORTED_MODULE_1__ =
|
|
1043
|
+
var funda_utils_dist_cjs_useComId__WEBPACK_IMPORTED_MODULE_1__ = __nested_webpack_require_41372__(85);
|
|
1040
1044
|
/* harmony import */
|
|
1041
|
-
var funda_utils_dist_cjs_useComId__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/
|
|
1045
|
+
var funda_utils_dist_cjs_useComId__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__nested_webpack_require_41372__.n(funda_utils_dist_cjs_useComId__WEBPACK_IMPORTED_MODULE_1__);
|
|
1042
1046
|
/* harmony import */
|
|
1043
|
-
var funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__ =
|
|
1047
|
+
var funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__ = __nested_webpack_require_41372__(188);
|
|
1044
1048
|
/* harmony import */
|
|
1045
|
-
var funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/
|
|
1049
|
+
var funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__nested_webpack_require_41372__.n(funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_2__);
|
|
1046
1050
|
/* harmony import */
|
|
1047
|
-
var funda_utils_dist_cjs_inputsCalculation__WEBPACK_IMPORTED_MODULE_3__ =
|
|
1051
|
+
var funda_utils_dist_cjs_inputsCalculation__WEBPACK_IMPORTED_MODULE_3__ = __nested_webpack_require_41372__(954);
|
|
1048
1052
|
/* harmony import */
|
|
1049
|
-
var funda_utils_dist_cjs_inputsCalculation__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/
|
|
1053
|
+
var funda_utils_dist_cjs_inputsCalculation__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__nested_webpack_require_41372__.n(funda_utils_dist_cjs_inputsCalculation__WEBPACK_IMPORTED_MODULE_3__);
|
|
1050
1054
|
/* harmony import */
|
|
1051
|
-
var funda_utils_dist_cjs_useDebounce__WEBPACK_IMPORTED_MODULE_4__ =
|
|
1055
|
+
var funda_utils_dist_cjs_useDebounce__WEBPACK_IMPORTED_MODULE_4__ = __nested_webpack_require_41372__(702);
|
|
1052
1056
|
/* harmony import */
|
|
1053
|
-
var funda_utils_dist_cjs_useDebounce__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/
|
|
1057
|
+
var funda_utils_dist_cjs_useDebounce__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__nested_webpack_require_41372__.n(funda_utils_dist_cjs_useDebounce__WEBPACK_IMPORTED_MODULE_4__);
|
|
1054
1058
|
var _excluded = ["contentRef", "wrapperClassName", "controlClassName", "controlExClassName", "controlGroupWrapperClassName", "controlGroupTextClassName", "type", "disabled", "required", "placeholder", "pattern", "readOnly", "defaultValue", "value", "requiredLabel", "label", "units", "name", "step", "min", "max", "src", "size", "minLength", "maxLength", "alt", "inputMode", "id", "appendControl", "aiPredict", "aiPredictRemainingTextRGB", "aiPredictConfirmKey", "aiPredictFetchFuncAsync", "aiPredictFetchFuncMethod", "aiPredictFetchFuncMethodParams", "aiPredictFetchCallback", "iconLeft", "iconRight", "autoComplete", "autoCapitalize", "spellCheck", "style", "tabIndex", "onChangeCallback", "onInputCallback", "onKeyPressedCallback", "onChange", "onBlur", "onFocus", "onPressEnter"];
|
|
1055
1059
|
function _regeneratorRuntime() {
|
|
1056
1060
|
"use strict";
|
package/lib/cjs/Input/index.js
CHANGED
|
@@ -304,6 +304,10 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
304
304
|
return (/* binding */_actualPropertyValue
|
|
305
305
|
);
|
|
306
306
|
},
|
|
307
|
+
/* harmony export */"getElCSS": function getElCSS() {
|
|
308
|
+
return (/* binding */_getElCSS
|
|
309
|
+
);
|
|
310
|
+
},
|
|
307
311
|
/* harmony export */"getTextTop": function getTextTop() {
|
|
308
312
|
return (/* binding */_getTextTop
|
|
309
313
|
);
|
|
@@ -406,7 +410,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
406
410
|
el.style.visibility = visibility;
|
|
407
411
|
return actualVal;
|
|
408
412
|
}
|
|
409
|
-
function
|
|
413
|
+
function _getElCSS(input, prop, isNumber) {
|
|
410
414
|
var _document$defaultView;
|
|
411
415
|
var val = (_document$defaultView = document.defaultView) === null || _document$defaultView === void 0 ? void 0 : _document$defaultView.getComputedStyle(input, null).getPropertyValue(prop);
|
|
412
416
|
return isNumber ? isNaN(parseFloat(val)) ? 0 : parseFloat(val) : val;
|
|
@@ -437,7 +441,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
437
441
|
_faux.style.setProperty('margin', '0');
|
|
438
442
|
_faux.style.setProperty('display', 'none');
|
|
439
443
|
for (var i = 0; i < listOfModifiers.length; i++) {
|
|
440
|
-
var propertyValue =
|
|
444
|
+
var propertyValue = _getElCSS(_fauxContainer, listOfModifiers[i], false);
|
|
441
445
|
_faux.style.setProperty(listOfModifiers[i], propertyValue);
|
|
442
446
|
}
|
|
443
447
|
_faux.textContent = input.value.substring(0, _off).replace(/\s/g, "\xA0");
|