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.
@@ -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) || 10;
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 */ });
@@ -331,6 +331,13 @@ const MultipleCheckboxes = forwardRef((props: MultipleCheckboxesProps, externalR
331
331
 
332
332
  return Array.isArray(dataInit) ? dataInit.map((item: any, index: number) => {
333
333
 
334
+ const _optiondata: any = {};
335
+ Object.entries(item).forEach(([key, value]) => {
336
+ if (key !== 'extends') {
337
+ _optiondata[key] = value;
338
+ }
339
+ });
340
+
334
341
  const _groupEl = () => {
335
342
  return <>
336
343
 
@@ -339,7 +346,14 @@ const MultipleCheckboxes = forwardRef((props: MultipleCheckboxesProps, externalR
339
346
  {/* /GROUP LABEL */}
340
347
 
341
348
  {item.optgroup.map((opt: any, optIndex: number) => {
342
-
349
+
350
+ const _optiondata2: any = {};
351
+ Object.entries(item).forEach(([key, value]) => {
352
+ if (key !== 'extends') {
353
+ _optiondata2[key] = value;
354
+ }
355
+ });
356
+
343
357
  return <div
344
358
  key={'checkbox' + optIndex}
345
359
  className={combinedCls(
@@ -367,7 +381,7 @@ const MultipleCheckboxes = forwardRef((props: MultipleCheckboxesProps, externalR
367
381
  data-list-item-label={`${typeof opt.listItemLabel === 'undefined' ? '' : opt.listItemLabel}`}
368
382
  data-value={opt.value}
369
383
  data-disabled={disabled || (typeof opt.disabled !== 'undefined' ? `${opt.disabled}` : 'false')}
370
- data-optiondata={JSON.stringify(opt)}
384
+ data-optiondata={JSON.stringify(_optiondata2)}
371
385
  value={opt.value}
372
386
  disabled={disabled || (typeof opt.disabled !== 'undefined' ? opt.disabled : null)}
373
387
  checked={selectedItems.has(opt.value)}
@@ -404,6 +418,14 @@ const MultipleCheckboxes = forwardRef((props: MultipleCheckboxesProps, externalR
404
418
  />
405
419
 
406
420
  {labelRes(typeof opt.listItemLabel === 'undefined' ? opt.label : opt.listItemLabel, `multiple-checkboxes__control-label-${index}-${optIndex}-${idRes}`)}
421
+
422
+ {/* EXTENDS */}
423
+ {typeof opt.extends !== 'undefined' ? <>
424
+ <div className="d-inline-block">
425
+ <div className="form-control-extends__wrapper">{opt.extends}</div>
426
+ </div>
427
+ </> : null}
428
+
407
429
 
408
430
  </div>;
409
431
 
@@ -428,7 +450,7 @@ const MultipleCheckboxes = forwardRef((props: MultipleCheckboxesProps, externalR
428
450
  data-list-item-label={`${typeof item.listItemLabel === 'undefined' ? '' : item.listItemLabel}`}
429
451
  data-value={item.value}
430
452
  data-disabled={disabled || (typeof item.disabled !== 'undefined' ? `${item.disabled}` : 'false')}
431
- data-optiondata={JSON.stringify(item)}
453
+ data-optiondata={JSON.stringify(_optiondata)}
432
454
  value={item.value}
433
455
  disabled={disabled || (typeof item.disabled !== 'undefined' ? item.disabled : null)}
434
456
  checked={selectedItems.has(item.value)}
@@ -451,6 +473,14 @@ const MultipleCheckboxes = forwardRef((props: MultipleCheckboxesProps, externalR
451
473
  />
452
474
 
453
475
  {labelRes(typeof item.listItemLabel === 'undefined' ? item.label : item.listItemLabel, `multiple-checkboxes__control-label-${index}-${idRes}`)}
476
+
477
+ {/* EXTENDS */}
478
+ {typeof item.extends !== 'undefined' ? <>
479
+ <div className="d-inline-block">
480
+ <div className="form-control-extends__wrapper">{item.extends}</div>
481
+ </div>
482
+ </> : null}
483
+
454
484
  </>;
455
485
  };
456
486
 
@@ -467,7 +497,6 @@ const MultipleCheckboxes = forwardRef((props: MultipleCheckboxesProps, externalR
467
497
  tableLayoutCellClassName
468
498
  )}
469
499
  key={'optgroup-' + index}
470
- data-optiondata={JSON.stringify(item)}
471
500
  >
472
501
  {_groupEl()}
473
502
  </td>;
@@ -488,7 +517,7 @@ const MultipleCheckboxes = forwardRef((props: MultipleCheckboxesProps, externalR
488
517
  data-value={item.value}
489
518
  data-disabled={disabled || (typeof item.disabled !== 'undefined' ? `${item.disabled}` : 'false')}
490
519
  key={'checkbox' + index}
491
- data-optiondata={JSON.stringify(item)}
520
+ data-optiondata={JSON.stringify(_optiondata)}
492
521
  >
493
522
  {_normalEl()}
494
523
  </td>;
@@ -504,7 +533,6 @@ const MultipleCheckboxes = forwardRef((props: MultipleCheckboxesProps, externalR
504
533
  groupWrapperClassName
505
534
  )}
506
535
  key={'optgroup-' + index}
507
- data-optiondata={JSON.stringify(item)}
508
536
  >
509
537
  {_groupEl()}
510
538
  </div>;
@@ -523,7 +551,7 @@ const MultipleCheckboxes = forwardRef((props: MultipleCheckboxesProps, externalR
523
551
  data-value={item.value}
524
552
  data-disabled={disabled || (typeof item.disabled !== 'undefined' ? `${item.disabled}` : 'false')}
525
553
  key={'checkbox' + index}
526
- data-optiondata={JSON.stringify(item)}
554
+ data-optiondata={JSON.stringify(_optiondata)}
527
555
  >
528
556
  {_normalEl()}
529
557
  </div>;
@@ -11,7 +11,6 @@ import {
11
11
  import { clsWrite, combinedCls } from 'funda-utils/dist/cjs/cls';
12
12
 
13
13
 
14
-
15
14
  export interface OptionConfig {
16
15
  [propName: string]: string | number | React.ReactNode | boolean;
17
16
  }
@@ -468,9 +467,14 @@ const Radio = forwardRef((props: RadioProps, externalRef: any) => {
468
467
  {labelRes(typeof opt.listItemLabel === 'undefined' ? opt.label : opt.listItemLabel, `field-${uniqueID}-${index}-${optIndex}`)}
469
468
 
470
469
  </div>
471
- <div className="d-inline-block">
472
- <div className="form-control-extends__wrapper">{typeof opt.extends !== 'undefined' ? <>{opt.extends}</> : null}</div>
473
- </div>
470
+
471
+ {/* EXTENDS */}
472
+ {typeof opt.extends !== 'undefined' ? <>
473
+ <div className="d-inline-block">
474
+ <div className="form-control-extends__wrapper">{opt.extends}</div>
475
+ </div>
476
+ </> : null}
477
+
474
478
  </div>;
475
479
 
476
480
  })}
@@ -511,9 +515,13 @@ const Radio = forwardRef((props: RadioProps, externalRef: any) => {
511
515
  __html: `${typeof item.listItemLabel === 'undefined' ? item.label : item.listItemLabel}`
512
516
  }}></label>
513
517
  </div>
514
- <div className="d-inline-block">
515
- <div className="form-control-extends__wrapper">{typeof item.extends !== 'undefined' ? <>{item.extends}</> : null}</div>
516
- </div>
518
+
519
+ {/* EXTENDS */}
520
+ {typeof item.extends !== 'undefined' ? <>
521
+ <div className="d-inline-block">
522
+ <div className="form-control-extends__wrapper">{item.extends}</div>
523
+ </div>
524
+ </> : null}
517
525
 
518
526
  </>;
519
527
  };
@@ -122,24 +122,27 @@ const Tabs = forwardRef((props: TabsProps, externalRef: any) => {
122
122
 
123
123
  //
124
124
  Array.prototype.forEach.call($li, (node) => {
125
- node.classList.remove('active');
126
- node.firstChild.classList.remove('active');
125
+ if (node !== null) {
126
+ node.classList.remove('active');
127
+ node.firstChild.classList.remove('active');
127
128
 
128
- runExClassName(node, _classNameNav, 'remove');
129
- runExClassName(node.firstChild, _classNameNav, 'remove');
129
+ runExClassName(node, _classNameNav, 'remove');
130
+ runExClassName(node.firstChild, _classNameNav, 'remove');
131
+ }
130
132
  });
131
133
 
132
134
 
133
135
 
134
- $allContent.forEach( (node) => {
135
- //
136
- elDisplay('hide', node);
137
-
136
+ $allContent.forEach((node) => {
137
+ if (node !== null) {
138
+ //
139
+ elDisplay('hide', node);
138
140
 
139
- setTimeout(() => {
140
- node.classList.remove('active');
141
- runExClassName(node, _classNamePanel, 'remove');
142
- }, speed);
141
+ setTimeout(() => {
142
+ node.classList.remove('active');
143
+ runExClassName(node, _classNamePanel, 'remove');
144
+ }, speed);
145
+ }
143
146
  });
144
147
 
145
148
  // currently active
@@ -40,7 +40,6 @@
40
40
  display: none;
41
41
  margin-top: -.2rem;
42
42
 
43
-
44
43
  &::before {
45
44
  background-size: 100% auto !important;
46
45
  content: "";
@@ -8,6 +8,9 @@ import {
8
8
  getAbsolutePositionOfStage
9
9
  } from 'funda-utils/dist/cjs/getElementProperty';
10
10
  import { clsWrite, combinedCls } from 'funda-utils/dist/cjs/cls';
11
+ import { getElCSS } from 'funda-utils/dist/cjs/inputsCalculation';
12
+
13
+
11
14
 
12
15
 
13
16
  export type TooltipProps = {
@@ -74,7 +77,7 @@ const Tooltip = (props: TooltipProps) => {
74
77
  } = props;
75
78
 
76
79
 
77
- const POS_OFFSET = Number(offset) || 10;
80
+ const POS_OFFSET = Number(offset) || 4;
78
81
  const EXCEEDED_SIDE_POS_OFFSET = Number(exceededSidePosOffset) || 15;
79
82
  const uniqueID = useComId();
80
83
  const idRes = id || uniqueID;
@@ -152,7 +155,26 @@ const Tooltip = (props: TooltipProps) => {
152
155
  const _modalBox = _modalContent.getBoundingClientRect();
153
156
  if (typeof _modalContent.dataset.offset === 'undefined' && _modalBox.left > 0) {
154
157
 
158
+ // Adjust the coordinates due to height
159
+ //------------------
160
+ const triggerEl: any = document.querySelector(`[data-overlay-id="${_modalRef.id}"]`);
161
+ if (triggerEl !== null) {
162
+ let pos = triggerEl.dataset.microtipPosition;
163
+ if (typeof pos === 'undefined') pos = 'top';
164
+
165
+ const _offsetY = _modalBox.height - getElCSS(_modalContent, 'font-size', true) - getElCSS(_modalContent, 'padding-top', true) - getElCSS(_modalContent, 'padding-bottom', true);
166
+
167
+ // TOP
168
+ //
169
+ if (pos.indexOf('top') >= 0) {
170
+ _modalRef.style.transform = `translateY(-${_offsetY}px)`;
171
+ }
172
+
173
+ }
174
+
175
+
155
176
  // 10 pixels is used to account for some bias in mobile devices
177
+ //------------------
156
178
  if ((_modalBox.right + 10) > window.innerWidth) {
157
179
  const _modalOffsetPosition = _modalBox.right - window.innerWidth + EXCEEDED_SIDE_POS_OFFSET;
158
180
  _modalContent.dataset.offset = _modalOffsetPosition;
@@ -151,6 +151,7 @@ function getTextWidth(input: HTMLInputElement, fauxContainer: HTMLSpanElement, r
151
151
 
152
152
 
153
153
  export {
154
+ getElCSS,
154
155
  getTextTop,
155
156
  actualPropertyValue,
156
157
  getTextWidth
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "author": "UIUX Lab",
3
3
  "email": "uiuxlab@gmail.com",
4
4
  "name": "funda-ui",
5
- "version": "4.5.12",
5
+ "version": "4.5.35",
6
6
  "description": "React components using pure Bootstrap 5+ which does not contain any external style and script libraries.",
7
7
  "repository": {
8
8
  "type": "git",