funda-ui 4.4.35 → 4.5.12

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.
Files changed (40) hide show
  1. package/Date/index.js +1078 -77
  2. package/EventCalendar/index.js +8 -2
  3. package/EventCalendarTimeline/index.js +32 -1
  4. package/Input/index.d.ts +7 -0
  5. package/Input/index.js +699 -57
  6. package/MasonryLayout/index.js +11 -1
  7. package/MultipleSelect/index.d.ts +1 -0
  8. package/MultipleSelect/index.js +7 -5
  9. package/RangeSlider/index.js +1078 -77
  10. package/Select/index.js +34 -2
  11. package/Textarea/index.d.ts +7 -0
  12. package/Textarea/index.js +707 -10
  13. package/Tree/index.js +2 -0
  14. package/Utils/inputsCalculation.d.ts +18 -1
  15. package/Utils/inputsCalculation.js +26 -0
  16. package/lib/cjs/Date/index.js +1078 -77
  17. package/lib/cjs/EventCalendar/index.js +8 -2
  18. package/lib/cjs/EventCalendarTimeline/index.js +32 -1
  19. package/lib/cjs/Input/index.d.ts +7 -0
  20. package/lib/cjs/Input/index.js +699 -57
  21. package/lib/cjs/MasonryLayout/index.js +11 -1
  22. package/lib/cjs/MultipleSelect/index.d.ts +1 -0
  23. package/lib/cjs/MultipleSelect/index.js +7 -5
  24. package/lib/cjs/RangeSlider/index.js +1078 -77
  25. package/lib/cjs/Select/index.js +34 -2
  26. package/lib/cjs/Textarea/index.d.ts +7 -0
  27. package/lib/cjs/Textarea/index.js +707 -10
  28. package/lib/cjs/Tree/index.js +2 -0
  29. package/lib/cjs/Utils/inputsCalculation.d.ts +18 -1
  30. package/lib/cjs/Utils/inputsCalculation.js +26 -0
  31. package/lib/esm/EventCalendar/index.tsx +8 -6
  32. package/lib/esm/EventCalendarTimeline/index.tsx +439 -403
  33. package/lib/esm/Input/index.tsx +299 -77
  34. package/lib/esm/MasonryLayout/index.tsx +9 -2
  35. package/lib/esm/MultipleSelect/index.tsx +6 -4
  36. package/lib/esm/Textarea/index.tsx +332 -39
  37. package/lib/esm/Tree/TreeList.tsx +4 -1
  38. package/lib/esm/Tree/index.tsx +1 -0
  39. package/lib/esm/Utils/libs/inputsCalculation.ts +60 -31
  40. package/package.json +1 -1
package/Tree/index.js CHANGED
@@ -1275,6 +1275,7 @@ function TreeList(props) {
1275
1275
  function handleCollapse(e) {
1276
1276
  if (disableCollapse) return;
1277
1277
  e.preventDefault();
1278
+ e.stopPropagation();
1278
1279
  var hyperlink = e.currentTarget;
1279
1280
  var url = hyperlink.getAttribute('href');
1280
1281
  var subElement = (0,dom.getNextSiblings)(hyperlink, 'ul');
@@ -1325,6 +1326,7 @@ function TreeList(props) {
1325
1326
  }
1326
1327
  function handleSelect(e) {
1327
1328
  e.preventDefault();
1329
+ e.stopPropagation();
1328
1330
  var hyperlink = e.currentTarget;
1329
1331
  if (hyperlink.classList.contains('selected')) {
1330
1332
  activeClass(hyperlink, 'remove', 'selected');
@@ -1,3 +1,20 @@
1
+ /**
2
+ * Gets the relative upside of the text
3
+ * @param {Element} el - A DOM node containing one selector to match against.
4
+ * @returns {Number} - Returns a pure number.
5
+ */
6
+ declare function getTextTop(el: HTMLElement): number;
7
+ /**
8
+ * Get the actual value with user specific methed
9
+ * it can be 'width', 'height', 'outerWidth', 'outerHeight'
10
+ * @private
11
+ * @param {Element} el - A DOM node containing one selector to match against.
12
+ * @param {String} prop - A string naming the property of style.
13
+ * @param {?Json} config - Whether or not margin is included. The key `includeMargin`
14
+ takes effect when set to true
15
+ * @return {Number} - Returns a pure number.
16
+ */
17
+ declare function actualPropertyValue(el: any, prop: string, config?: any): any;
1
18
  /**
2
19
  * Get cursor or text position in pixels for input element
3
20
  *
@@ -7,4 +24,4 @@
7
24
  * @returns {Number}
8
25
  */
9
26
  declare function getTextWidth(input: HTMLInputElement, fauxContainer: HTMLSpanElement, rawTextContainer: HTMLElement): any;
10
- export { getTextWidth };
27
+ export { getTextTop, actualPropertyValue, getTextWidth };
@@ -46,8 +46,25 @@ return /******/ (() => { // webpackBootstrap
46
46
  var __webpack_exports__ = {};
47
47
  __webpack_require__.r(__webpack_exports__);
48
48
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
49
+ /* harmony export */ "actualPropertyValue": () => (/* binding */ actualPropertyValue),
50
+ /* harmony export */ "getTextTop": () => (/* binding */ getTextTop),
49
51
  /* harmony export */ "getTextWidth": () => (/* binding */ getTextWidth)
50
52
  /* harmony export */ });
53
+ /**
54
+ * Gets the relative upside of the text
55
+ * @param {Element} el - A DOM node containing one selector to match against.
56
+ * @returns {Number} - Returns a pure number.
57
+ */
58
+ function getTextTop(el) {
59
+ var styles = window.getComputedStyle(el);
60
+ var fontSize = parseFloat(styles.fontSize);
61
+ var lineHeight = parseFloat(styles.lineHeight) || fontSize;
62
+ var paddingTop = parseFloat(styles.paddingTop);
63
+ var borderWidth = parseFloat(styles.borderWidth);
64
+ var textTop = paddingTop + (lineHeight - fontSize) / 2 - borderWidth * 2;
65
+ return textTop;
66
+ }
67
+
51
68
  /**
52
69
  * Get the actual value with user specific methed
53
70
  * it can be 'width', 'height', 'outerWidth', 'outerHeight'
@@ -73,6 +90,15 @@ function actualPropertyValue(el, prop) {
73
90
  marginWidth = parseFloat(style.marginLeft) + parseFloat(style.marginRight);
74
91
  marginHeight = parseFloat(style.marginTop) + parseFloat(style.marginBottom);
75
92
  }
93
+ if (prop === 'fontSize') {
94
+ actualVal = parseFloat(style.fontSize);
95
+ }
96
+ if (prop === 'fontFamily') {
97
+ actualVal = style.fontFamily;
98
+ }
99
+ if (prop === 'letterSpacing') {
100
+ actualVal = style.letterSpacing;
101
+ }
76
102
  if (prop === 'width') {
77
103
  maxVal = parseFloat(style.maxWidth);
78
104