funda-ui 4.2.675 → 4.2.688

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 (109) hide show
  1. package/Accordion/index.js +128 -16
  2. package/CascadingSelect/index.css +5 -0
  3. package/CascadingSelect/index.js +128 -13
  4. package/CascadingSelectE2E/index.css +5 -0
  5. package/CascadingSelectE2E/index.js +128 -13
  6. package/Checkbox/index.js +123 -11
  7. package/ColorPicker/index.js +124 -12
  8. package/Date/index.js +430 -54
  9. package/DropdownMenu/index.js +127 -15
  10. package/DynamicFields/index.js +126 -12
  11. package/EventCalendar/index.js +231 -6
  12. package/EventCalendarTimeline/index.js +243 -4
  13. package/File/index.js +131 -15
  14. package/Input/index.js +130 -13
  15. package/LiveSearch/index.js +286 -50
  16. package/MultipleCheckboxes/index.js +135 -17
  17. package/MultipleSelect/index.js +129 -13
  18. package/NativeSelect/index.js +122 -10
  19. package/NumberInput/index.js +129 -12
  20. package/Pagination/index.js +123 -11
  21. package/Radio/index.js +135 -17
  22. package/RangeSlider/index.js +292 -53
  23. package/Scrollbar/index.js +229 -4
  24. package/SearchBar/index.js +127 -12
  25. package/Select/index.js +158 -23
  26. package/Switch/index.js +122 -10
  27. package/Table/index.js +133 -14
  28. package/Tabs/index.js +124 -12
  29. package/TagInput/index.js +126 -12
  30. package/Textarea/index.js +123 -11
  31. package/Tooltip/index.js +218 -1
  32. package/Tree/index.js +236 -7
  33. package/Utils/cls.d.ts +8 -2
  34. package/Utils/cls.js +60 -2
  35. package/lib/cjs/Accordion/index.js +128 -16
  36. package/lib/cjs/CascadingSelect/index.js +128 -13
  37. package/lib/cjs/CascadingSelectE2E/index.js +128 -13
  38. package/lib/cjs/Checkbox/index.js +123 -11
  39. package/lib/cjs/ColorPicker/index.js +124 -12
  40. package/lib/cjs/Date/index.js +430 -54
  41. package/lib/cjs/DropdownMenu/index.js +127 -15
  42. package/lib/cjs/DynamicFields/index.js +126 -12
  43. package/lib/cjs/EventCalendar/index.js +231 -6
  44. package/lib/cjs/EventCalendarTimeline/index.js +243 -4
  45. package/lib/cjs/File/index.js +131 -15
  46. package/lib/cjs/Input/index.js +130 -13
  47. package/lib/cjs/LiveSearch/index.js +286 -50
  48. package/lib/cjs/MultipleCheckboxes/index.js +135 -17
  49. package/lib/cjs/MultipleSelect/index.js +129 -13
  50. package/lib/cjs/NativeSelect/index.js +122 -10
  51. package/lib/cjs/NumberInput/index.js +129 -12
  52. package/lib/cjs/Pagination/index.js +123 -11
  53. package/lib/cjs/Radio/index.js +135 -17
  54. package/lib/cjs/RangeSlider/index.js +292 -53
  55. package/lib/cjs/Scrollbar/index.js +229 -4
  56. package/lib/cjs/SearchBar/index.js +127 -12
  57. package/lib/cjs/Select/index.js +158 -23
  58. package/lib/cjs/Switch/index.js +122 -10
  59. package/lib/cjs/Table/index.js +133 -14
  60. package/lib/cjs/Tabs/index.js +124 -12
  61. package/lib/cjs/TagInput/index.js +126 -12
  62. package/lib/cjs/Textarea/index.js +123 -11
  63. package/lib/cjs/Tooltip/index.js +218 -1
  64. package/lib/cjs/Tree/index.js +236 -7
  65. package/lib/cjs/Utils/cls.d.ts +8 -2
  66. package/lib/cjs/Utils/cls.js +60 -2
  67. package/lib/css/CascadingSelect/index.css +5 -0
  68. package/lib/css/CascadingSelectE2E/index.css +5 -0
  69. package/lib/esm/Accordion/Accordion.tsx +5 -2
  70. package/lib/esm/Accordion/AccordionItem.tsx +23 -6
  71. package/lib/esm/CascadingSelect/Group.tsx +10 -2
  72. package/lib/esm/CascadingSelect/index.scss +6 -0
  73. package/lib/esm/CascadingSelect/index.tsx +7 -4
  74. package/lib/esm/CascadingSelectE2E/Group.tsx +9 -2
  75. package/lib/esm/CascadingSelectE2E/index.scss +6 -0
  76. package/lib/esm/CascadingSelectE2E/index.tsx +7 -4
  77. package/lib/esm/Checkbox/index.tsx +6 -2
  78. package/lib/esm/ColorPicker/index.tsx +10 -3
  79. package/lib/esm/Date/Calendar.tsx +64 -10
  80. package/lib/esm/Date/index.tsx +50 -9
  81. package/lib/esm/DropdownMenu/index.tsx +17 -6
  82. package/lib/esm/DynamicFields/index.tsx +12 -3
  83. package/lib/esm/EventCalendar/index.tsx +17 -3
  84. package/lib/esm/EventCalendarTimeline/index.tsx +40 -5
  85. package/lib/esm/File/index.tsx +22 -6
  86. package/lib/esm/Input/index.tsx +20 -4
  87. package/lib/esm/LiveSearch/index.tsx +29 -5
  88. package/lib/esm/MasonryLayout/index.tsx +1 -1
  89. package/lib/esm/MultipleCheckboxes/index.tsx +38 -8
  90. package/lib/esm/MultipleSelect/ItemList.tsx +7 -2
  91. package/lib/esm/MultipleSelect/index.tsx +6 -3
  92. package/lib/esm/NativeSelect/index.tsx +1 -1
  93. package/lib/esm/NumberInput/index.tsx +14 -3
  94. package/lib/esm/Pagination/index.tsx +5 -2
  95. package/lib/esm/Radio/index.tsx +42 -8
  96. package/lib/esm/RangeSlider/index.tsx +37 -7
  97. package/lib/esm/Scrollbar/index.tsx +25 -5
  98. package/lib/esm/SearchBar/index.tsx +14 -3
  99. package/lib/esm/Select/index.tsx +81 -14
  100. package/lib/esm/Switch/index.tsx +1 -1
  101. package/lib/esm/Table/Table.tsx +21 -3
  102. package/lib/esm/Table/TableCell.tsx +8 -2
  103. package/lib/esm/Tabs/Tabs.tsx +3 -3
  104. package/lib/esm/TagInput/index.tsx +11 -3
  105. package/lib/esm/Textarea/index.tsx +5 -2
  106. package/lib/esm/Tooltip/index.tsx +6 -2
  107. package/lib/esm/Tree/TreeList.tsx +34 -5
  108. package/lib/esm/Utils/libs/cls.ts +50 -1
  109. package/package.json +1 -1
@@ -489,9 +489,9 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
489
489
  /***/ (function(module, exports, __webpack_require__) {
490
490
 
491
491
  /* module decorator */ module = __webpack_require__.nmd(module);
492
- 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); }
492
+ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;function _typeof2(obj) { "@babel/helpers - typeof"; return _typeof2 = "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; }, _typeof2(obj); }
493
493
  (function webpackUniversalModuleDefinition(root, factory) {
494
- 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),
494
+ if (( false ? 0 : _typeof2(exports)) === 'object' && ( false ? 0 : _typeof2(module)) === 'object') module.exports = factory();else if (true) !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
495
495
  __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
496
496
  (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
497
497
  __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}
@@ -503,16 +503,16 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
503
503
 
504
504
  /******/ // The require scope
505
505
  /******/
506
- var __nested_webpack_require_987__ = {};
506
+ var __nested_webpack_require_993__ = {};
507
507
  /******/
508
508
  /************************************************************************/
509
509
  /******/ /* webpack/runtime/define property getters */
510
510
  /******/
511
511
  (function () {
512
512
  /******/ // define getter functions for harmony exports
513
- /******/__nested_webpack_require_987__.d = function (exports, definition) {
513
+ /******/__nested_webpack_require_993__.d = function (exports, definition) {
514
514
  /******/for (var key in definition) {
515
- /******/if (__nested_webpack_require_987__.o(definition, key) && !__nested_webpack_require_987__.o(exports, key)) {
515
+ /******/if (__nested_webpack_require_993__.o(definition, key) && !__nested_webpack_require_993__.o(exports, key)) {
516
516
  /******/Object.defineProperty(exports, key, {
517
517
  enumerable: true,
518
518
  get: definition[key]
@@ -529,7 +529,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
529
529
  /******/ /* webpack/runtime/hasOwnProperty shorthand */
530
530
  /******/
531
531
  (function () {
532
- /******/__nested_webpack_require_987__.o = function (obj, prop) {
532
+ /******/__nested_webpack_require_993__.o = function (obj, prop) {
533
533
  return Object.prototype.hasOwnProperty.call(obj, prop);
534
534
  };
535
535
  /******/
@@ -539,7 +539,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
539
539
  /******/
540
540
  (function () {
541
541
  /******/ // define __esModule on exports
542
- /******/__nested_webpack_require_987__.r = function (exports) {
542
+ /******/__nested_webpack_require_993__.r = function (exports) {
543
543
  /******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
544
544
  /******/Object.defineProperty(exports, Symbol.toStringTag, {
545
545
  value: 'Module'
@@ -557,27 +557,139 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
557
557
  /******/
558
558
  /************************************************************************/
559
559
  var __webpack_exports__ = {};
560
- __nested_webpack_require_987__.r(__webpack_exports__);
560
+ __nested_webpack_require_993__.r(__webpack_exports__);
561
561
  /* harmony export */
562
- __nested_webpack_require_987__.d(__webpack_exports__, {
562
+ __nested_webpack_require_993__.d(__webpack_exports__, {
563
563
  /* harmony export */"clsWrite": function clsWrite() {
564
564
  return (/* binding */_clsWrite
565
565
  );
566
+ },
567
+ /* harmony export */"combinedCls": function combinedCls() {
568
+ return (/* binding */_combinedCls
569
+ );
566
570
  }
567
571
  /* harmony export */
568
572
  });
573
+ function _slicedToArray(arr, i) {
574
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
575
+ }
576
+ function _nonIterableRest() {
577
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
578
+ }
579
+ function _unsupportedIterableToArray(o, minLen) {
580
+ if (!o) return;
581
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
582
+ var n = Object.prototype.toString.call(o).slice(8, -1);
583
+ if (n === "Object" && o.constructor) n = o.constructor.name;
584
+ if (n === "Map" || n === "Set") return Array.from(o);
585
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
586
+ }
587
+ function _arrayLikeToArray(arr, len) {
588
+ if (len == null || len > arr.length) len = arr.length;
589
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
590
+ return arr2;
591
+ }
592
+ function _iterableToArrayLimit(arr, i) {
593
+ var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
594
+ if (null != _i) {
595
+ var _s,
596
+ _e,
597
+ _x,
598
+ _r,
599
+ _arr = [],
600
+ _n = !0,
601
+ _d = !1;
602
+ try {
603
+ if (_x = (_i = _i.call(arr)).next, 0 === i) {
604
+ if (Object(_i) !== _i) return;
605
+ _n = !1;
606
+ } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
607
+ } catch (err) {
608
+ _d = !0, _e = err;
609
+ } finally {
610
+ try {
611
+ if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
612
+ } finally {
613
+ if (_d) throw _e;
614
+ }
615
+ }
616
+ return _arr;
617
+ }
618
+ }
619
+ function _arrayWithHoles(arr) {
620
+ if (Array.isArray(arr)) return arr;
621
+ }
622
+ function _typeof(obj) {
623
+ "@babel/helpers - typeof";
624
+
625
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
626
+ return typeof obj;
627
+ } : function (obj) {
628
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
629
+ }, _typeof(obj);
630
+ }
569
631
  /**
570
632
  * Output of class name
571
633
  * @param {*} s - Any
572
634
  * @param {String} defaultCls - Default string
573
635
  * @param {?*} targetCls - Any
574
- * @returns HtmlElementCollection
636
+ * @returns {*}
575
637
  */
576
638
  function _clsWrite(s, defaultCls) {
577
639
  var targetCls = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
578
640
  return s || s === '' ? typeof targetCls === 'undefined' ? s : targetCls : defaultCls;
579
641
  }
580
642
 
643
+ /**
644
+ * Combined classnames
645
+ * @param {*} args
646
+ * @returns {String|undefined}
647
+ */
648
+ /* Usage:
649
+
650
+ console.log(combinedCls('a-1', 'a-2', 'a-3', {
651
+ 'p-1': null,
652
+ 'p-2': undefined,
653
+ 'p-3': true,
654
+ 'p-4': false,
655
+ 'p-5': 'kkk',
656
+ 'p-6': 0,
657
+ 'p-7': 1,
658
+ 'p-8': '',
659
+ undefined
660
+ })); // a-1 a-2 a-3 p-3 p-5 p-7
661
+ */
662
+ function _combinedCls() {
663
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
664
+ args[_key] = arguments[_key];
665
+ }
666
+ if (args) {
667
+ var classes = [];
668
+ for (var i = 0; i < args.length; i++) {
669
+ var className = args[i];
670
+ if (!className) {
671
+ continue;
672
+ }
673
+ var type = _typeof(className);
674
+ if (type === 'string' || type === 'number') {
675
+ classes.push(className);
676
+ } else if (type === 'object') {
677
+ var _classes = Array.isArray(className) ? className : Object.entries(className).map(function (_ref) {
678
+ var _ref2 = _slicedToArray(_ref, 2),
679
+ key = _ref2[0],
680
+ value = _ref2[1];
681
+ return value ? key : null;
682
+ });
683
+ classes = _classes.length ? classes.concat(_classes.filter(function (c) {
684
+ return !!c;
685
+ })) : classes;
686
+ }
687
+ }
688
+ return classes.join(' ').trim();
689
+ }
690
+ return undefined;
691
+ }
692
+
581
693
  /******/
582
694
  return __webpack_exports__;
583
695
  /******/
@@ -739,29 +851,29 @@ var AccordionItem = function AccordionItem(props) {
739
851
  }, [heightObserver]);
740
852
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
741
853
  "data-index": index,
742
- className: "custom-accordion-item ".concat((0,cls.clsWrite)(itemClassName, 'accordion-item'), " ").concat(activedClassName),
854
+ className: (0,cls.combinedCls)('custom-accordion-item', (0,cls.clsWrite)(itemClassName, 'accordion-item'), activedClassName),
743
855
  onClick: triggerType === 'click' ? onToggleEv : function () {},
744
856
  onMouseOver: triggerType === 'click' ? function () {} : onToggleEv,
745
857
  onTransitionEnd: typeof onTransitionEnd === 'function' ? onTransitionEnd : function () {},
746
858
  "aria-expanded": defaultActive ? 'true' : 'false',
747
859
  style: typeof itemStyle !== 'undefined' ? itemStyle : {}
748
860
  }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
749
- className: "custom-accordion-header ".concat((0,cls.clsWrite)(itemHeaderClassName, 'accordion-header position-relative')),
861
+ className: (0,cls.combinedCls)('custom-accordion-header', (0,cls.clsWrite)(itemHeaderClassName, 'accordion-header position-relative')),
750
862
  role: "presentation"
751
863
  }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("button", {
752
864
  tabIndex: -1,
753
- className: "custom-accordion-trigger ".concat((0,cls.clsWrite)(itemTriggerClassName, 'accordion-button'), " ").concat(activedClassName === '' ? 'collapsed' : 'active'),
865
+ className: (0,cls.combinedCls)('custom-accordion-trigger', (0,cls.clsWrite)(itemTriggerClassName, 'accordion-button'), activedClassName === '' ? 'collapsed' : 'active'),
754
866
  type: "button"
755
867
  }, title), itemTriggerIcon), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
756
868
  ref: contentWrapperRef,
757
- className: "custom-accordion-content__wrapper w-100 ".concat((0,cls.clsWrite)(itemContentWrapperClassName, 'accordion-collapse')),
869
+ className: (0,cls.combinedCls)('custom-accordion-content__wrapper w-100', (0,cls.clsWrite)(itemContentWrapperClassName, 'accordion-collapse')),
758
870
  role: "tabpanel",
759
871
  style: {
760
872
  height: defaultActive ? 'auto' : '0px',
761
873
  overflow: 'hidden' // “overflow” affects the width, so add `w-100` to `custom-accordion-content__wrapper`
762
874
  }
763
875
  }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
764
- className: "custom-accordion-content ".concat((0,cls.clsWrite)(itemContentClassName, 'accordion-body')),
876
+ className: (0,cls.combinedCls)('custom-accordion-content', (0,cls.clsWrite)(itemContentClassName, 'accordion-body')),
765
877
  ref: contentRef
766
878
  }, children))));
767
879
  };
@@ -895,7 +1007,7 @@ var Accordion = function Accordion(props) {
895
1007
  }
896
1008
  }
897
1009
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
898
- className: "custom-accordion-item ".concat((0,cls.clsWrite)(wrapperClassName, 'accordion')),
1010
+ className: (0,cls.combinedCls)('custom-accordion-item', (0,cls.clsWrite)(wrapperClassName, 'accordion')),
899
1011
  role: "tablist",
900
1012
  ref: rootRef
901
1013
  }, children != null ? children.map(function (item, i) {
@@ -18,6 +18,11 @@
18
18
  font-weight: 400;
19
19
  line-height: 1.5;
20
20
  color: inherit;
21
+ /* text */
22
+ overflow: hidden;
23
+ text-overflow: ellipsis;
24
+ white-space: nowrap;
25
+ max-width: calc(100% - 20px);
21
26
  /* required */
22
27
  display: flex;
23
28
  }
@@ -210,9 +210,9 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
210
210
  /***/ (function(module, exports, __webpack_require__) {
211
211
 
212
212
  /* module decorator */ module = __webpack_require__.nmd(module);
213
- 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); }
213
+ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;function _typeof2(obj) { "@babel/helpers - typeof"; return _typeof2 = "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; }, _typeof2(obj); }
214
214
  (function webpackUniversalModuleDefinition(root, factory) {
215
- 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),
215
+ if (( false ? 0 : _typeof2(exports)) === 'object' && ( false ? 0 : _typeof2(module)) === 'object') module.exports = factory();else if (true) !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
216
216
  __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
217
217
  (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
218
218
  __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}
@@ -224,16 +224,16 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
224
224
 
225
225
  /******/ // The require scope
226
226
  /******/
227
- var __nested_webpack_require_987__ = {};
227
+ var __nested_webpack_require_993__ = {};
228
228
  /******/
229
229
  /************************************************************************/
230
230
  /******/ /* webpack/runtime/define property getters */
231
231
  /******/
232
232
  (function () {
233
233
  /******/ // define getter functions for harmony exports
234
- /******/__nested_webpack_require_987__.d = function (exports, definition) {
234
+ /******/__nested_webpack_require_993__.d = function (exports, definition) {
235
235
  /******/for (var key in definition) {
236
- /******/if (__nested_webpack_require_987__.o(definition, key) && !__nested_webpack_require_987__.o(exports, key)) {
236
+ /******/if (__nested_webpack_require_993__.o(definition, key) && !__nested_webpack_require_993__.o(exports, key)) {
237
237
  /******/Object.defineProperty(exports, key, {
238
238
  enumerable: true,
239
239
  get: definition[key]
@@ -250,7 +250,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
250
250
  /******/ /* webpack/runtime/hasOwnProperty shorthand */
251
251
  /******/
252
252
  (function () {
253
- /******/__nested_webpack_require_987__.o = function (obj, prop) {
253
+ /******/__nested_webpack_require_993__.o = function (obj, prop) {
254
254
  return Object.prototype.hasOwnProperty.call(obj, prop);
255
255
  };
256
256
  /******/
@@ -260,7 +260,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
260
260
  /******/
261
261
  (function () {
262
262
  /******/ // define __esModule on exports
263
- /******/__nested_webpack_require_987__.r = function (exports) {
263
+ /******/__nested_webpack_require_993__.r = function (exports) {
264
264
  /******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
265
265
  /******/Object.defineProperty(exports, Symbol.toStringTag, {
266
266
  value: 'Module'
@@ -278,27 +278,139 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
278
278
  /******/
279
279
  /************************************************************************/
280
280
  var __webpack_exports__ = {};
281
- __nested_webpack_require_987__.r(__webpack_exports__);
281
+ __nested_webpack_require_993__.r(__webpack_exports__);
282
282
  /* harmony export */
283
- __nested_webpack_require_987__.d(__webpack_exports__, {
283
+ __nested_webpack_require_993__.d(__webpack_exports__, {
284
284
  /* harmony export */"clsWrite": function clsWrite() {
285
285
  return (/* binding */_clsWrite
286
286
  );
287
+ },
288
+ /* harmony export */"combinedCls": function combinedCls() {
289
+ return (/* binding */_combinedCls
290
+ );
287
291
  }
288
292
  /* harmony export */
289
293
  });
294
+ function _slicedToArray(arr, i) {
295
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
296
+ }
297
+ function _nonIterableRest() {
298
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
299
+ }
300
+ function _unsupportedIterableToArray(o, minLen) {
301
+ if (!o) return;
302
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
303
+ var n = Object.prototype.toString.call(o).slice(8, -1);
304
+ if (n === "Object" && o.constructor) n = o.constructor.name;
305
+ if (n === "Map" || n === "Set") return Array.from(o);
306
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
307
+ }
308
+ function _arrayLikeToArray(arr, len) {
309
+ if (len == null || len > arr.length) len = arr.length;
310
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
311
+ return arr2;
312
+ }
313
+ function _iterableToArrayLimit(arr, i) {
314
+ var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
315
+ if (null != _i) {
316
+ var _s,
317
+ _e,
318
+ _x,
319
+ _r,
320
+ _arr = [],
321
+ _n = !0,
322
+ _d = !1;
323
+ try {
324
+ if (_x = (_i = _i.call(arr)).next, 0 === i) {
325
+ if (Object(_i) !== _i) return;
326
+ _n = !1;
327
+ } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
328
+ } catch (err) {
329
+ _d = !0, _e = err;
330
+ } finally {
331
+ try {
332
+ if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
333
+ } finally {
334
+ if (_d) throw _e;
335
+ }
336
+ }
337
+ return _arr;
338
+ }
339
+ }
340
+ function _arrayWithHoles(arr) {
341
+ if (Array.isArray(arr)) return arr;
342
+ }
343
+ function _typeof(obj) {
344
+ "@babel/helpers - typeof";
345
+
346
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
347
+ return typeof obj;
348
+ } : function (obj) {
349
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
350
+ }, _typeof(obj);
351
+ }
290
352
  /**
291
353
  * Output of class name
292
354
  * @param {*} s - Any
293
355
  * @param {String} defaultCls - Default string
294
356
  * @param {?*} targetCls - Any
295
- * @returns HtmlElementCollection
357
+ * @returns {*}
296
358
  */
297
359
  function _clsWrite(s, defaultCls) {
298
360
  var targetCls = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
299
361
  return s || s === '' ? typeof targetCls === 'undefined' ? s : targetCls : defaultCls;
300
362
  }
301
363
 
364
+ /**
365
+ * Combined classnames
366
+ * @param {*} args
367
+ * @returns {String|undefined}
368
+ */
369
+ /* Usage:
370
+
371
+ console.log(combinedCls('a-1', 'a-2', 'a-3', {
372
+ 'p-1': null,
373
+ 'p-2': undefined,
374
+ 'p-3': true,
375
+ 'p-4': false,
376
+ 'p-5': 'kkk',
377
+ 'p-6': 0,
378
+ 'p-7': 1,
379
+ 'p-8': '',
380
+ undefined
381
+ })); // a-1 a-2 a-3 p-3 p-5 p-7
382
+ */
383
+ function _combinedCls() {
384
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
385
+ args[_key] = arguments[_key];
386
+ }
387
+ if (args) {
388
+ var classes = [];
389
+ for (var i = 0; i < args.length; i++) {
390
+ var className = args[i];
391
+ if (!className) {
392
+ continue;
393
+ }
394
+ var type = _typeof(className);
395
+ if (type === 'string' || type === 'number') {
396
+ classes.push(className);
397
+ } else if (type === 'object') {
398
+ var _classes = Array.isArray(className) ? className : Object.entries(className).map(function (_ref) {
399
+ var _ref2 = _slicedToArray(_ref, 2),
400
+ key = _ref2[0],
401
+ value = _ref2[1];
402
+ return value ? key : null;
403
+ });
404
+ classes = _classes.length ? classes.concat(_classes.filter(function (c) {
405
+ return !!c;
406
+ })) : classes;
407
+ }
408
+ }
409
+ return classes.join(' ').trim();
410
+ }
411
+ return undefined;
412
+ }
413
+
302
414
  /******/
303
415
  return __webpack_exports__;
304
416
  /******/
@@ -1743,6 +1855,7 @@ var getElementProperty = __webpack_require__(767);
1743
1855
  var cls = __webpack_require__(188);
1744
1856
  ;// CONCATENATED MODULE: ./src/Group.tsx
1745
1857
 
1858
+
1746
1859
  function Group(props) {
1747
1860
  var level = props.level,
1748
1861
  columnTitle = props.columnTitle,
@@ -1759,7 +1872,9 @@ function Group(props) {
1759
1872
  "data-id": item.id,
1760
1873
  "data-value": JSON.stringify(item),
1761
1874
  "data-level": level,
1762
- className: "cas-select__opt ".concat(item.current ? 'active' : ''),
1875
+ className: (0,cls.combinedCls)('cas-select__opt', {
1876
+ 'active': item.current
1877
+ }),
1763
1878
  dangerouslySetInnerHTML: {
1764
1879
  __html: typeof item.label !== 'undefined' ? item.label : item.name // "item.label" usually uses hierarchical style
1765
1880
  },
@@ -2690,7 +2805,7 @@ var CascadingSelect = function CascadingSelect(props) {
2690
2805
  htmlFor: idRes,
2691
2806
  className: "form-label"
2692
2807
  }, label)) : null, triggerContent ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
2693
- className: triggerClassName ? "cas-select__trigger ".concat(triggerClassName) : "cas-select__trigger d-inline w-auto",
2808
+ className: (0,cls.clsWrite)(wrapperClassName, 'cas-select__trigger d-inline w-auto', "cas-select__trigger ".concat(triggerClassName)),
2694
2809
  onClick: handleDisplayOptions
2695
2810
  }, triggerContent)) : null, !hasErr ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((cjs_default()), {
2696
2811
  show: true,
@@ -2779,7 +2894,7 @@ var CascadingSelect = function CascadingSelect(props) {
2779
2894
  id: idRes,
2780
2895
  "data-overlay-id": "cas-select__items-wrapper-".concat(idRes),
2781
2896
  name: name,
2782
- className: "".concat((0,cls.clsWrite)(controlClassName, 'form-control'), " ").concat(controlExClassName || ''),
2897
+ className: (0,cls.combinedCls)((0,cls.clsWrite)(controlClassName, 'form-control'), controlExClassName),
2783
2898
  placeholder: placeholder,
2784
2899
  value: changedVal // placeholder will not change if defaultValue is used
2785
2900
  ,
@@ -18,6 +18,11 @@
18
18
  font-weight: 400;
19
19
  line-height: 1.5;
20
20
  color: inherit;
21
+ /* text */
22
+ overflow: hidden;
23
+ text-overflow: ellipsis;
24
+ white-space: nowrap;
25
+ max-width: calc(100% - 20px);
21
26
  /* required */
22
27
  display: flex;
23
28
  }