linear-react-components-ui 1.1.24-beta.0 → 1.1.24-beta.10

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 (265) hide show
  1. package/lib/BaseMask-0c14ef51.d.ts +24 -0
  2. package/lib/Cnpj-bde01dd0.d.ts +18 -0
  3. package/lib/Cpf-3fa496ad.d.ts +18 -0
  4. package/lib/Phone-2bb0b397.d.ts +18 -0
  5. package/lib/ZipCode-09460e18.d.ts +13 -0
  6. package/lib/alerts/AlertProvider.js +1 -2
  7. package/lib/alerts/BaseAlert.js +1 -1
  8. package/lib/alerts/Message.js +2 -3
  9. package/lib/alerts/withAlert.js +1 -2
  10. package/lib/assets/styles/calendar.scss +140 -35
  11. package/lib/assets/styles/datepicker2.scss +3 -9
  12. package/lib/assets/styles/file.scss +8 -0
  13. package/lib/assets/styles/filefield.scss +42 -0
  14. package/lib/assets/styles/numberfield.scss +18 -0
  15. package/lib/assets/styles/periodpicker.scss +1 -1
  16. package/lib/assets/styles/radiofield.scss +185 -0
  17. package/lib/assets/styles/selectfield.scss +1 -3
  18. package/lib/assets/styles/table.scss +6 -0
  19. package/lib/assets/styles/textfield.scss +61 -27
  20. package/lib/avatar/index.js +9 -11
  21. package/lib/badge/index.js +4 -4
  22. package/lib/buttons/Button.js +1 -2
  23. package/lib/buttons/DangerButton.js +1 -1
  24. package/lib/buttons/DefaultButton.js +22 -21
  25. package/lib/buttons/InfoButton.js +1 -1
  26. package/lib/buttons/PrimaryButton.js +1 -1
  27. package/lib/buttons/SuccessButton.js +1 -1
  28. package/lib/buttons/WarningButton.js +1 -1
  29. package/lib/buttons/button_container/index.js +1 -1
  30. package/lib/buttons/split_button/index.js +2 -2
  31. package/lib/calendar/base/helpers.js +2 -2
  32. package/lib/calendar/base/index.js +123 -44
  33. package/lib/checkbox/index.js +2 -3
  34. package/lib/dialog/Custom.js +2 -3
  35. package/lib/dialog/Question.js +5 -4
  36. package/lib/dialog/base/Content.js +5 -6
  37. package/lib/dialog/base/Header.js +3 -4
  38. package/lib/dialog/base/index.js +33 -23
  39. package/lib/dialog/form/index.js +52 -12
  40. package/lib/dialog/types.d.ts +4 -0
  41. package/lib/dialog/wizard/index.js +1 -2
  42. package/lib/dialog/wizard/progressbar.js +1 -1
  43. package/lib/dialog/wizard/step.js +1 -1
  44. package/lib/dialog/wizard/useWizard.js +1 -2
  45. package/lib/drawer/Content.js +1 -2
  46. package/lib/drawer/Drawer.js +6 -7
  47. package/lib/drawer/Header.js +2 -3
  48. package/lib/dropdown/Popup.js +7 -7
  49. package/lib/dropdown/helper.js +1 -1
  50. package/lib/dropdown/withDropdown.js +3 -4
  51. package/lib/fieldset/index.js +8 -9
  52. package/lib/form/Field.js +2 -3
  53. package/lib/form/FieldArray.js +2 -3
  54. package/lib/form/FieldNumber.js +4 -5
  55. package/lib/form/FieldPeriod.js +3 -4
  56. package/lib/form/index.js +3 -4
  57. package/lib/form/withFieldHOC.js +1 -2
  58. package/lib/form/withFormSecurity.js +1 -2
  59. package/lib/form2/helpers.js +1 -1
  60. package/lib/form2/index.d.ts +1 -1
  61. package/lib/form2/types.d.ts +7 -3
  62. package/lib/form2/useForm/index.js +22 -15
  63. package/lib/gridlayout/GridCol.js +5 -5
  64. package/lib/gridlayout/GridRow.js +1 -4
  65. package/lib/hint/index.js +1 -7
  66. package/lib/icons/helper.d.ts +16 -0
  67. package/lib/icons/helper.js +16 -0
  68. package/lib/icons/index.js +9 -9
  69. package/lib/index-208e7f62.d.ts +44 -0
  70. package/lib/index-3b70931d.d.ts +44 -0
  71. package/lib/index-442d51a2.d.ts +15 -0
  72. package/lib/index-4e511971.d.ts +26 -0
  73. package/lib/index-7dfa8924.d.ts +22 -0
  74. package/lib/index-9e576346.d.ts +23 -0
  75. package/lib/index-d3b6a19a.d.ts +41 -0
  76. package/lib/index-ecafc8c6.d.ts +30 -0
  77. package/lib/inputs/base/InputTextBase.js +9 -8
  78. package/lib/inputs/base/helpers.js +3 -7
  79. package/lib/inputs/base/types.d.ts +1 -1
  80. package/lib/inputs/color/index.js +2 -3
  81. package/lib/inputs/date/Dropdown.js +6 -4
  82. package/lib/inputs/date/index.js +34 -22
  83. package/lib/inputs/errorMessage/index.js +2 -3
  84. package/lib/inputs/file/DefaultFile.js +31 -31
  85. package/lib/inputs/file/DragDropFile.js +18 -17
  86. package/lib/inputs/file/File.js +6 -5
  87. package/lib/inputs/file/FileButtonSettings.js +0 -1
  88. package/lib/inputs/file/index.js +0 -1
  89. package/lib/inputs/inputHOC.js +1 -2
  90. package/lib/inputs/mask/BaseMask.js +1 -2
  91. package/lib/inputs/mask/Cnpj.js +1 -2
  92. package/lib/inputs/mask/Cpf.js +1 -2
  93. package/lib/inputs/multiSelect/ActionButtons.js +1 -2
  94. package/lib/inputs/multiSelect/Dropdown.js +11 -11
  95. package/lib/inputs/multiSelect/helper.js +2 -1
  96. package/lib/inputs/multiSelect/index.js +10 -9
  97. package/lib/inputs/number/BaseNumber.js +1 -1
  98. package/lib/inputs/number/index.js +3 -3
  99. package/lib/inputs/period/Dropdown.js +7 -4
  100. package/lib/inputs/period/PeriodList.js +3 -12
  101. package/lib/inputs/period/helper.js +1 -3
  102. package/lib/inputs/period/index.js +116 -113
  103. package/lib/inputs/period/types.d.ts +4 -1
  104. package/lib/inputs/search/index.js +8 -5
  105. package/lib/inputs/select/ActionButtons.js +1 -1
  106. package/lib/inputs/select/Dropdown.js +3 -4
  107. package/lib/inputs/select/helper.js +13 -10
  108. package/lib/inputs/select/multiple/Selecteds.js +2 -2
  109. package/lib/inputs/select/multiple/index.js +14 -11
  110. package/lib/inputs/select/simple/index.js +19 -13
  111. package/lib/inputs/textarea/index.js +1 -1
  112. package/lib/inputs/types.d.ts +1 -0
  113. package/lib/inputs2/checkboxfield/index.d.ts +1 -1
  114. package/lib/inputs2/checkboxfield/index.js +18 -15
  115. package/lib/inputs2/colorfield/index.d.ts +2 -2
  116. package/lib/inputs2/colorfield/index.js +5 -5
  117. package/lib/inputs2/date/base/constants.js +2 -1
  118. package/lib/inputs2/date/base/index.js +6 -8
  119. package/lib/inputs2/date/datefield/calendarbox.d.ts +1 -1
  120. package/lib/inputs2/date/datefield/calendarbox.js +3 -2
  121. package/lib/inputs2/date/datefield/context.d.ts +1 -0
  122. package/lib/inputs2/date/datefield/index.d.ts +1 -0
  123. package/lib/inputs2/date/datefield/index.js +44 -33
  124. package/lib/inputs2/date/datefield/triggers.js +1 -2
  125. package/lib/inputs2/date/datefield/types.d.ts +2 -0
  126. package/lib/inputs2/date/dateperiodfield/calendarbox.d.ts +1 -1
  127. package/lib/inputs2/date/dateperiodfield/calendarbox.js +8 -6
  128. package/lib/inputs2/date/dateperiodfield/context.d.ts +1 -0
  129. package/lib/inputs2/date/dateperiodfield/index.d.ts +1 -0
  130. package/lib/inputs2/date/dateperiodfield/index.js +66 -48
  131. package/lib/inputs2/date/dateperiodfield/triggers.js +19 -14
  132. package/lib/inputs2/date/dateperiodfield/types.d.ts +2 -0
  133. package/lib/inputs2/date/helpers.d.ts +1 -0
  134. package/lib/inputs2/date/types.d.ts +2 -1
  135. package/lib/inputs2/{number/Number.d.ts → filefield/index.d.ts} +2 -2
  136. package/lib/inputs2/filefield/index.js +174 -0
  137. package/lib/inputs2/index.d.ts +20 -14
  138. package/lib/inputs2/index.js +10 -11
  139. package/lib/inputs2/mask/BaseMask.d.ts +2 -2
  140. package/lib/inputs2/mask/BaseMask.js +7 -7
  141. package/lib/inputs2/mask/Cnpj.d.ts +3 -3
  142. package/lib/inputs2/mask/Cnpj.js +4 -5
  143. package/lib/inputs2/mask/Cpf.d.ts +3 -3
  144. package/lib/inputs2/mask/Cpf.js +4 -5
  145. package/lib/inputs2/mask/Phone.d.ts +3 -3
  146. package/lib/inputs2/mask/Phone.js +1 -2
  147. package/lib/inputs2/mask/ZipCode.d.ts +3 -3
  148. package/lib/inputs2/mask/ZipCode.js +1 -2
  149. package/lib/inputs2/numberfield/currency.d.ts +13 -0
  150. package/lib/inputs2/numberfield/currency.js +91 -0
  151. package/lib/inputs2/numberfield/decimal.d.ts +13 -0
  152. package/lib/inputs2/{number/BaseNumber.js → numberfield/decimal.js} +57 -58
  153. package/lib/inputs2/numberfield/helpers.d.ts +30 -0
  154. package/lib/inputs2/numberfield/helpers.js +53 -0
  155. package/lib/inputs2/numberfield/index.d.ts +12 -0
  156. package/lib/inputs2/numberfield/index.js +104 -0
  157. package/lib/inputs2/numberfield/types.d.ts +36 -0
  158. package/lib/inputs2/numberfield/types.js +5 -0
  159. package/lib/inputs2/{number/BaseNumber.d.ts → radiofield/index.d.ts} +4 -5
  160. package/lib/inputs2/radiofield/index.js +144 -0
  161. package/lib/inputs2/radiofield/types.d.ts +33 -0
  162. package/lib/inputs2/radiofield/types.js +5 -0
  163. package/lib/inputs2/selectfield/context.d.ts +1 -0
  164. package/lib/inputs2/selectfield/index.d.ts +2 -1
  165. package/lib/inputs2/selectfield/index.js +118 -58
  166. package/lib/inputs2/selectfield/item.d.ts +2 -1
  167. package/lib/inputs2/selectfield/item.js +8 -4
  168. package/lib/inputs2/selectfield/listbox.d.ts +1 -1
  169. package/lib/inputs2/selectfield/listbox.js +24 -10
  170. package/lib/inputs2/selectfield/options.d.ts +9 -0
  171. package/lib/inputs2/selectfield/options.js +26 -0
  172. package/lib/inputs2/selectfield/search.d.ts +1 -1
  173. package/lib/inputs2/selectfield/search.js +3 -4
  174. package/lib/inputs2/selectfield/selections.d.ts +1 -1
  175. package/lib/inputs2/selectfield/selections.js +3 -2
  176. package/lib/inputs2/selectfield/triggers.js +17 -8
  177. package/lib/inputs2/selectfield/types.d.ts +0 -1
  178. package/lib/inputs2/slot/index.d.ts +2 -2
  179. package/lib/inputs2/{number/Decimal.d.ts → textareafield/index.d.ts} +2 -5
  180. package/lib/inputs2/textareafield/index.js +194 -0
  181. package/lib/inputs2/textfield/index.d.ts +1 -1
  182. package/lib/inputs2/textfield/index.js +18 -17
  183. package/lib/labelMessages/index.js +4 -6
  184. package/lib/labels/DefaultLabel.js +2 -6
  185. package/lib/labels/label_container/index.js +1 -1
  186. package/lib/list/Header.js +1 -1
  187. package/lib/list/Item.js +10 -12
  188. package/lib/list/index.js +2 -4
  189. package/lib/menus/float/MenuItem.js +3 -4
  190. package/lib/menus/float/SubMenuContainer.js +2 -3
  191. package/lib/menus/float/index.js +1 -1
  192. package/lib/menus/sidenav/ExpandMenu.js +1 -1
  193. package/lib/menus/sidenav/MenuLink.js +1 -2
  194. package/lib/menus/sidenav/NavMenuGroup.js +2 -3
  195. package/lib/menus/sidenav/NavMenuItem.js +10 -9
  196. package/lib/menus/sidenav/NavSubMenuItem.js +2 -3
  197. package/lib/menus/sidenav/helpers.js +1 -1
  198. package/lib/menus/sidenav/index.js +6 -7
  199. package/lib/menus/sidenav/popup_menu_search/index.js +1 -2
  200. package/lib/panel/Content.js +9 -8
  201. package/lib/panel/Default.js +3 -4
  202. package/lib/panel/Header.js +4 -5
  203. package/lib/permissionValidations.js +1 -1
  204. package/lib/popover/PopoverText.js +1 -2
  205. package/lib/popover/index.js +2 -1
  206. package/lib/progress/Bar.js +6 -6
  207. package/lib/radio/index.js +3 -4
  208. package/lib/shortcuts/index.js +1 -1
  209. package/lib/skeleton/SkeletonContainer.js +1 -2
  210. package/lib/skeleton/index.js +1 -4
  211. package/lib/spinner/index.js +3 -4
  212. package/lib/split/Split.js +2 -3
  213. package/lib/split/SplitSide.js +4 -5
  214. package/lib/table/Body.js +4 -5
  215. package/lib/table/Header.js +9 -7
  216. package/lib/table/HeaderColumn.js +2 -3
  217. package/lib/table/Row.js +4 -5
  218. package/lib/table/RowColumn.js +2 -3
  219. package/lib/table/index.js +20 -16
  220. package/lib/table/types.d.ts +1 -0
  221. package/lib/tabs/DropdownTabs.js +2 -3
  222. package/lib/tabs/Menu.js +1 -1
  223. package/lib/tabs/MenuTabs.js +4 -9
  224. package/lib/tabs/Panel.js +8 -7
  225. package/lib/tabs/context.js +7 -5
  226. package/lib/tabs/index.js +1 -2
  227. package/lib/textContent/index.js +2 -3
  228. package/lib/toolbar/ButtonBar.js +2 -3
  229. package/lib/toolbar/LabelBar.js +1 -2
  230. package/lib/toolbar/index.js +1 -1
  231. package/lib/tooltip/TooltipContent.js +8 -9
  232. package/lib/tooltip/useTooltip.js +8 -8
  233. package/lib/treetable/Body.js +2 -3
  234. package/lib/treetable/Header.js +3 -4
  235. package/lib/treetable/Row.js +9 -10
  236. package/lib/treeview/Header.js +1 -1
  237. package/lib/treeview/Node.js +5 -6
  238. package/lib/treeview/index.js +5 -6
  239. package/lib/uitour/index.js +9 -8
  240. package/package.json +1 -1
  241. package/lib/BaseMask-3d5d581d.d.ts +0 -24
  242. package/lib/BaseNumber-797088d7.d.ts +0 -23
  243. package/lib/Cnpj-1602be21.d.ts +0 -18
  244. package/lib/Cpf-4d6b9079.d.ts +0 -18
  245. package/lib/Currency-b33d3a22.d.ts +0 -18
  246. package/lib/Decimal-55e836d5.d.ts +0 -13
  247. package/lib/Number-9c6aceff.d.ts +0 -20
  248. package/lib/Phone-79e5e3b4.d.ts +0 -18
  249. package/lib/ZipCode-8c2e9d8b.d.ts +0 -13
  250. package/lib/calendar/base/Day.d.ts +0 -8
  251. package/lib/calendar/base/Day.js +0 -36
  252. package/lib/calendar/base/Month.d.ts +0 -8
  253. package/lib/calendar/base/Month.js +0 -39
  254. package/lib/calendar/base/Week.d.ts +0 -8
  255. package/lib/calendar/base/Week.js +0 -35
  256. package/lib/index-18a64236.d.ts +0 -23
  257. package/lib/index-43ad8140.d.ts +0 -41
  258. package/lib/index-772f9f1a.d.ts +0 -44
  259. package/lib/index-8a59cf4b.d.ts +0 -23
  260. package/lib/inputs2/number/Currency.d.ts +0 -11
  261. package/lib/inputs2/number/Currency.js +0 -47
  262. package/lib/inputs2/number/Decimal.js +0 -36
  263. package/lib/inputs2/number/Number.js +0 -49
  264. package/lib/inputs2/number/format_number.d.ts +0 -5
  265. package/lib/inputs2/number/format_number.js +0 -29
@@ -16,6 +16,12 @@ Object.defineProperty(exports, "LeftSlot", {
16
16
  return _slot.LeftSlot;
17
17
  }
18
18
  });
19
+ Object.defineProperty(exports, "Options", {
20
+ enumerable: true,
21
+ get: function () {
22
+ return _options.Options;
23
+ }
24
+ });
19
25
  Object.defineProperty(exports, "RightSlot", {
20
26
  enumerable: true,
21
27
  get: function () {
@@ -38,18 +44,19 @@ var _listbox = require("./listbox");
38
44
  var _triggers = require("./triggers");
39
45
  var _selections = require("./selections");
40
46
  var _context = require("./context");
47
+ var _options = require("./options");
41
48
  var _item = require("./item");
42
49
  var _types = require("./types");
43
50
  var _helpers2 = require("./helpers");
44
- const _excluded = ["name", "label", "errors", "children", "gridLayout", "onChange", "tooltip", "tooltipPosition", "tooltipWidth", "hintPosition", "themePopover", "popoverAlign", "skeletonize", "striped", "undigitable", "externalSearch", "openDropdownOnFocus", "showClearButton", "textAlign", "searchOnDropdown", "onSearch", "permissionAttr", "customClass", "customClassLabel", "customClassWrapper", "customClassInputContainer", "onDeniedActions", "notFoundFilterLabel", "multipleInputLabelEmpty", "multipleInputLabelOneSelection", "multipleInputLabelManySelection", "searchInputPlaceholder", "dropdownAlignButton"];
51
+ const _excluded = ["name", "label", "errors", "children", "gridLayout", "onChange", "tooltip", "tooltipPosition", "tooltipWidth", "hintPosition", "themePopover", "popoverAlign", "skeletonize", "striped", "undigitable", "externalSearch", "openDropdownOnFocus", "showClearButton", "textAlign", "searchOnDropdown", "onSearch", "permissionAttr", "customClass", "customClassLabel", "customClassWrapper", "customClassInputContainer", "onDeniedActions", "notFoundFilterLabel", "multipleInputLabelEmpty", "multipleInputLabelManySelection", "searchInputPlaceholder", "dropdownAlignButton"];
45
52
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
46
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
47
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
53
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
48
54
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
49
55
  function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
50
56
  function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
51
- const SELECT_FIELD_CONTROLS_ID = `select-field-controls-${(0, _uuid.v1)()}`;
57
+ const SELECT_FIELD_CONTROLS_ID = "select-field-controls-".concat((0, _uuid.v1)());
52
58
  const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
59
+ var _props$hint, _props$hint2;
53
60
  const {
54
61
  name,
55
62
  label,
@@ -80,7 +87,6 @@ const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref
80
87
  onDeniedActions = undefined,
81
88
  notFoundFilterLabel = 'Nenhuma opção encontrada.',
82
89
  multipleInputLabelEmpty = 'Nenhum registro selecionado',
83
- multipleInputLabelOneSelection = 'Um registro selecionado',
84
90
  multipleInputLabelManySelection = 'Múltiplos registros selecionados',
85
91
  searchInputPlaceholder = 'Pesquisar registros',
86
92
  dropdownAlignButton = 'left'
@@ -97,10 +103,11 @@ const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref
97
103
  const [filterValue, setFilterValue] = _react.default.useState('');
98
104
  const [listBoxOpen, setListBoxOpen] = _react.default.useState(false);
99
105
  const [activeDescendant, setActiveDescendant] = _react.default.useState(undefined);
100
- const isMultipleDefault = _lodash.default.isEqual(props?.multiple, _types.MultipleVariantEnum.default);
101
- const isMultipleWithCheckboxes = _lodash.default.isEqual(props?.multiple, _types.MultipleVariantEnum.checkboxes);
106
+ const isMultipleDefault = _lodash.default.isEqual(props === null || props === void 0 ? void 0 : props.multiple, _types.MultipleVariantEnum.default);
107
+ const isMultipleWithCheckboxes = _lodash.default.isEqual(props === null || props === void 0 ? void 0 : props.multiple, _types.MultipleVariantEnum.checkboxes);
102
108
  const isMultipleSelect = isMultipleDefault || isMultipleWithCheckboxes;
103
109
  const liSelectedRef = _react.default.useRef(null);
110
+ const selectFieldRoot = _react.default.useRef(null);
104
111
  const selectInputRef = _react.default.useRef(null);
105
112
  const selectListBoxRef = _react.default.useRef(null);
106
113
  const selectContainerRef = _react.default.useRef(null);
@@ -123,32 +130,51 @@ const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref
123
130
  if (openDropdownOnFocus && listBoxOpen) {
124
131
  requestAnimationFrame(() => {
125
132
  if (isMultipleWithCheckboxes) {
126
- selectSearchInputRef.current?.focus?.();
133
+ var _selectSearchInputRef, _selectSearchInputRef2;
134
+ (_selectSearchInputRef = selectSearchInputRef.current) === null || _selectSearchInputRef === void 0 ? void 0 : (_selectSearchInputRef2 = _selectSearchInputRef.focus) === null || _selectSearchInputRef2 === void 0 ? void 0 : _selectSearchInputRef2.call(_selectSearchInputRef);
127
135
  }
128
136
  });
129
137
  }
130
138
  }, [listBoxOpen]);
131
139
  _react.default.useEffect(() => {
132
- if (!isMultipleWithCheckboxes && !props?.value) setInputValue('');
133
- if (!props?.value || document.activeElement === selectInputRef.current) return;
140
+ if (!isMultipleWithCheckboxes && !(props !== null && props !== void 0 && props.value)) setInputValue('');
141
+ if (!(props !== null && props !== void 0 && props.value) || document.activeElement === selectInputRef.current) return;
134
142
  const lazyInputValue = listOptionsMap.get(rest.value);
135
- if (!isMultipleWithCheckboxes) setInputValue(lazyInputValue ?? '');
143
+ if (!isMultipleWithCheckboxes) setInputValue(lazyInputValue !== null && lazyInputValue !== void 0 ? lazyInputValue : '');
136
144
  if (isMultipleWithCheckboxes) {
137
- switch (_lodash.default.size(props?.value)) {
145
+ const firstSelectionLabel = listOptionsMap.get(props === null || props === void 0 ? void 0 : props.value[0]);
146
+ switch (_lodash.default.size(props === null || props === void 0 ? void 0 : props.value)) {
138
147
  case 0:
139
148
  return setInputValue(multipleInputLabelEmpty);
140
149
  case 1:
141
- return setInputValue(multipleInputLabelOneSelection);
150
+ return setInputValue(firstSelectionLabel !== null && firstSelectionLabel !== void 0 ? firstSelectionLabel : '');
142
151
  default:
143
152
  return setInputValue(multipleInputLabelManySelection);
144
153
  }
145
154
  }
146
- }, [props?.value, listOptionsMap]);
147
- const hasLabel = !_lodash.default.isEmpty(props?.label);
148
- const hasHintMessages = Boolean(props.hint?.length);
149
- const hasValidationErrors = Boolean(errors?.length);
155
+ }, [props === null || props === void 0 ? void 0 : props.value, listOptionsMap]);
156
+ const hasLabel = !_lodash.default.isEmpty(props === null || props === void 0 ? void 0 : props.label);
157
+ const hasHintMessages = Boolean((_props$hint = props.hint) === null || _props$hint === void 0 ? void 0 : _props$hint.length);
158
+ const hasValidationErrors = Boolean(errors === null || errors === void 0 ? void 0 : errors.length);
150
159
  const isReadOnly = Boolean(props.readOnly || onDenied.readOnly);
151
160
  const isDisabled = Boolean(props.disabled || onDenied.disabled);
161
+ const {
162
+ childrenItems
163
+ } = _react.default.useMemo(() => {
164
+ const itens = [];
165
+ _react.default.Children.map(children, (childElement, index) => {
166
+ if (/*#__PURE__*/_react.default.isValidElement(childElement)) {
167
+ var _childElement$key;
168
+ const clonedChild = /*#__PURE__*/_react.default.cloneElement(childElement, {
169
+ key: (_childElement$key = childElement.key) !== null && _childElement$key !== void 0 ? _childElement$key : "child-item-".concat(index + 1)
170
+ });
171
+ if (childElement.type === _item.Item) itens.push(clonedChild);
172
+ }
173
+ });
174
+ return {
175
+ childrenItems: itens
176
+ };
177
+ }, [children, isDisabled]);
152
178
  const {
153
179
  leftSlotElements,
154
180
  rightSlotElements
@@ -157,10 +183,11 @@ const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref
157
183
  const right = [];
158
184
  _react.default.Children.map(children, (childElement, index) => {
159
185
  if (/*#__PURE__*/_react.default.isValidElement(childElement)) {
186
+ var _childElement$key2;
160
187
  const clonedChild = /*#__PURE__*/_react.default.cloneElement(childElement, {
161
- key: childElement.key ?? `slot-${index}`,
162
- disabled: isDisabled || isReadOnly,
163
- 'aria-disabled': isDisabled || isReadOnly
188
+ key: (_childElement$key2 = childElement.key) !== null && _childElement$key2 !== void 0 ? _childElement$key2 : "slot-".concat(index),
189
+ disabled: isDisabled,
190
+ 'aria-disabled': isDisabled
164
191
  });
165
192
  if (childElement.type === _slot.LeftSlot) left.push(clonedChild);
166
193
  if (childElement.type === _slot.RightSlot) right.push(clonedChild);
@@ -170,16 +197,35 @@ const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref
170
197
  leftSlotElements: left,
171
198
  rightSlotElements: right
172
199
  };
173
- }, [children, isDisabled, isReadOnly]);
174
- const hasLeftSlotElements = Boolean(leftSlotElements?.length);
175
- const hasRightSlotElements = Boolean(rightSlotElements?.length);
200
+ }, [children, isDisabled]);
201
+ const {
202
+ optionItens
203
+ } = _react.default.useMemo(() => {
204
+ const itens = [];
205
+ _react.default.Children.map(children, (childElement, index) => {
206
+ if (/*#__PURE__*/_react.default.isValidElement(childElement)) {
207
+ var _childElement$key3;
208
+ const clonedChildItem = /*#__PURE__*/_react.default.cloneElement(childElement, {
209
+ key: (_childElement$key3 = childElement.key) !== null && _childElement$key3 !== void 0 ? _childElement$key3 : "option-list-".concat(index),
210
+ disabled: isDisabled
211
+ });
212
+ if (childElement.type === _options.Options) itens.push(clonedChildItem);
213
+ }
214
+ });
215
+ return {
216
+ optionItens: itens
217
+ };
218
+ }, [children, isDisabled]);
219
+ const hasLeftSlotElements = Boolean(leftSlotElements === null || leftSlotElements === void 0 ? void 0 : leftSlotElements.length);
220
+ const hasRightSlotElements = Boolean(rightSlotElements === null || rightSlotElements === void 0 ? void 0 : rightSlotElements.length);
176
221
  const handleCloseListBox = () => {
177
222
  setListBoxOpen(false);
178
223
  setFilterValue('');
179
224
  };
180
225
  const handleOpenListBox = () => {
181
- const currentValue = !isMultipleSelect ? props?.value : _lodash.default.orderBy([...props.value], value => _lodash.default.toNumber(value), ['asc'])[0];
182
- setActiveDescendant(_lodash.default.toString(currentValue) ?? undefined);
226
+ var _$toString;
227
+ const currentValue = !isMultipleSelect ? props === null || props === void 0 ? void 0 : props.value : _lodash.default.orderBy([...props.value], value => _lodash.default.toNumber(value), ['asc'])[0];
228
+ setActiveDescendant((_$toString = _lodash.default.toString(currentValue)) !== null && _$toString !== void 0 ? _$toString : undefined);
183
229
  };
184
230
  const handleChangeListBoxState = () => {
185
231
  setListBoxOpen(prevState => {
@@ -187,7 +233,8 @@ const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref
187
233
  setFilterValue('');
188
234
  }
189
235
  if (selectInputRef.current !== document.activeElement) {
190
- selectInputRef?.current?.focus?.();
236
+ var _selectInputRef$curre, _selectInputRef$curre2;
237
+ selectInputRef === null || selectInputRef === void 0 ? void 0 : (_selectInputRef$curre = selectInputRef.current) === null || _selectInputRef$curre === void 0 ? void 0 : (_selectInputRef$curre2 = _selectInputRef$curre.focus) === null || _selectInputRef$curre2 === void 0 ? void 0 : _selectInputRef$curre2.call(_selectInputRef$curre);
191
238
  }
192
239
  return !prevState;
193
240
  });
@@ -196,7 +243,7 @@ const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref
196
243
  liSelectedRef.current = liElement;
197
244
  };
198
245
  const handleOnChange = (value, inputLabel, addOrRemove) => {
199
- let multipleValue = props?.value;
246
+ let multipleValue = props === null || props === void 0 ? void 0 : props.value;
200
247
  if (!addOrRemove) multipleValue = _lodash.default.union(props.value, [value]);
201
248
  if (addOrRemove) multipleValue = _lodash.default.without(props.value, value);
202
249
  const changedValue = !isMultipleSelect ? value : _lodash.default.orderBy(multipleValue, multiValue => _lodash.default.toNumber(multiValue), ['asc']);
@@ -206,13 +253,14 @@ const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref
206
253
  value: changedValue
207
254
  }
208
255
  };
209
- onChange?.(syntheticEvent);
256
+ onChange === null || onChange === void 0 ? void 0 : onChange(syntheticEvent);
210
257
  if (!isMultipleSelect) {
211
258
  setListBoxOpen(false);
212
259
  setFilterValue('');
213
- setInputValue(inputLabel ?? '');
260
+ setInputValue(inputLabel !== null && inputLabel !== void 0 ? inputLabel : '');
214
261
  if (document.activeElement === selectSearchInputRef.current) {
215
- selectInputRef?.current?.focus?.();
262
+ var _selectInputRef$curre3, _selectInputRef$curre4;
263
+ selectInputRef === null || selectInputRef === void 0 ? void 0 : (_selectInputRef$curre3 = selectInputRef.current) === null || _selectInputRef$curre3 === void 0 ? void 0 : (_selectInputRef$curre4 = _selectInputRef$curre3.focus) === null || _selectInputRef$curre4 === void 0 ? void 0 : _selectInputRef$curre4.call(_selectInputRef$curre3);
216
264
  setListBoxOpen(false);
217
265
  }
218
266
  }
@@ -228,7 +276,7 @@ const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref
228
276
  value
229
277
  }
230
278
  };
231
- onChange?.(syntheticEvent);
279
+ onChange === null || onChange === void 0 ? void 0 : onChange(syntheticEvent);
232
280
  };
233
281
  const handleClearValue = () => {
234
282
  const resetValue = !isMultipleSelect ? '' : [];
@@ -238,7 +286,7 @@ const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref
238
286
  value: resetValue
239
287
  }
240
288
  };
241
- onChange?.(syntheticEvent);
289
+ onChange === null || onChange === void 0 ? void 0 : onChange(syntheticEvent);
242
290
  setListBoxOpen(false);
243
291
  if (!isMultipleSelect) {
244
292
  setFilterValue('');
@@ -249,14 +297,16 @@ const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref
249
297
  }
250
298
  };
251
299
  const handleOnBlur = event => {
252
- props?.onBlur?.(event);
300
+ var _props$onBlur;
301
+ props === null || props === void 0 ? void 0 : (_props$onBlur = props.onBlur) === null || _props$onBlur === void 0 ? void 0 : _props$onBlur.call(props, event);
253
302
  if (!event.relatedTarget || event.relatedTarget !== selectSearchInputRef.current) {
254
303
  setListBoxOpen(false);
255
304
  }
256
305
  setFilterValue('');
257
306
  };
258
307
  const handleOnFocus = event => {
259
- props?.onFocus?.(event);
308
+ var _props$onFocus;
309
+ props === null || props === void 0 ? void 0 : (_props$onFocus = props.onFocus) === null || _props$onFocus === void 0 ? void 0 : _props$onFocus.call(props, event);
260
310
  if (openDropdownOnFocus) {
261
311
  setListBoxOpen(true);
262
312
  handleOpenListBox();
@@ -270,25 +320,28 @@ const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref
270
320
  if (undigitable || isMultipleWithCheckboxes) {
271
321
  event.preventDefault();
272
322
  } else {
273
- props.onPaste?.(event);
323
+ var _props$onPaste;
324
+ (_props$onPaste = props.onPaste) === null || _props$onPaste === void 0 ? void 0 : _props$onPaste.call(props, event);
274
325
  }
275
326
  };
276
327
  const handleOnBeforeInput = event => {
277
328
  if (undigitable || isMultipleWithCheckboxes) {
278
329
  event.preventDefault();
279
330
  } else {
280
- props.onBeforeInput?.(event);
331
+ var _props$onBeforeInput;
332
+ (_props$onBeforeInput = props.onBeforeInput) === null || _props$onBeforeInput === void 0 ? void 0 : _props$onBeforeInput.call(props, event);
281
333
  }
282
334
  };
283
335
  const handleOnSearch = event => {
284
336
  if (externalSearch) {
285
- onSearch?.(event);
337
+ onSearch === null || onSearch === void 0 ? void 0 : onSearch(event);
286
338
  } else {
287
339
  setFilterValue(event.target.value);
288
340
  }
289
341
  };
290
342
  const handleOnKeyDown = event => {
291
- props?.onKeyDown?.(event);
343
+ var _props$onKeyDown;
344
+ props === null || props === void 0 ? void 0 : (_props$onKeyDown = props.onKeyDown) === null || _props$onKeyDown === void 0 ? void 0 : _props$onKeyDown.call(props, event);
292
345
  const notUndigitableKeys = [_types.Keys.backspace, _types.Keys.delete];
293
346
  if (undigitable && notUndigitableKeys.includes(event.key)) {
294
347
  event.preventDefault();
@@ -300,13 +353,16 @@ const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref
300
353
  event.preventDefault();
301
354
  }
302
355
  requestAnimationFrame(() => {
303
- const ulListElement = selectListBoxRef.current?.querySelector('ul[role="listbox"]');
304
- const liElementsFiltered = ulListElement?.querySelectorAll('li[data-state-filtered="true"]') ?? [];
356
+ var _selectListBoxRef$cur, _ulListElement$queryS;
357
+ const ulListElement = (_selectListBoxRef$cur = selectListBoxRef.current) === null || _selectListBoxRef$cur === void 0 ? void 0 : _selectListBoxRef$cur.querySelector('ul[role="listbox"]');
358
+ const liElementsFiltered = (_ulListElement$queryS = ulListElement === null || ulListElement === void 0 ? void 0 : ulListElement.querySelectorAll('li[data-state-filtered="true"]')) !== null && _ulListElement$queryS !== void 0 ? _ulListElement$queryS : [];
305
359
  if (!listBoxOpen && event.key === _types.Keys.arrowDown) {
306
- const currentValue = !isMultipleSelect ? props?.value : _lodash.default.orderBy([...props.value], value => _lodash.default.toNumber(value), ['asc'])[0];
307
- setActiveDescendant(_lodash.default.toString(currentValue) ?? undefined);
360
+ var _$toString2;
361
+ const currentValue = !isMultipleSelect ? props === null || props === void 0 ? void 0 : props.value : _lodash.default.orderBy([...props.value], value => _lodash.default.toNumber(value), ['asc'])[0];
362
+ setActiveDescendant((_$toString2 = _lodash.default.toString(currentValue)) !== null && _$toString2 !== void 0 ? _$toString2 : undefined);
308
363
  } else {
309
- setActiveDescendant(liElementsFiltered[0]?.id ?? undefined);
364
+ var _liElementsFiltered$, _liElementsFiltered$2;
365
+ setActiveDescendant((_liElementsFiltered$ = (_liElementsFiltered$2 = liElementsFiltered[0]) === null || _liElementsFiltered$2 === void 0 ? void 0 : _liElementsFiltered$2.id) !== null && _liElementsFiltered$ !== void 0 ? _liElementsFiltered$ : undefined);
310
366
  }
311
367
  });
312
368
  if (!listBoxOpen) {
@@ -318,8 +374,9 @@ const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref
318
374
  event.preventDefault();
319
375
  }
320
376
  requestAnimationFrame(() => {
321
- const ulListElement = selectListBoxRef.current?.querySelector('ul[role="listbox"]');
322
- const liElementsFiltered = ulListElement?.querySelectorAll('li[data-state-filtered="true"]') ?? [];
377
+ var _selectListBoxRef$cur2, _ulListElement$queryS2, _selectInputRef$curre5;
378
+ const ulListElement = (_selectListBoxRef$cur2 = selectListBoxRef.current) === null || _selectListBoxRef$cur2 === void 0 ? void 0 : _selectListBoxRef$cur2.querySelector('ul[role="listbox"]');
379
+ const liElementsFiltered = (_ulListElement$queryS2 = ulListElement === null || ulListElement === void 0 ? void 0 : ulListElement.querySelectorAll('li[data-state-filtered="true"]')) !== null && _ulListElement$queryS2 !== void 0 ? _ulListElement$queryS2 : [];
323
380
  const currentElementIndex = Array.from(liElementsFiltered).findIndex(liElement => liElement.id === activeDescendant);
324
381
  let nextElementIndex = currentElementIndex;
325
382
  if (listBoxOpen) {
@@ -328,7 +385,7 @@ const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref
328
385
  case _types.Keys.escape:
329
386
  setListBoxOpen(false);
330
387
  setFilterValue('');
331
- selectInputRef.current?.focus();
388
+ (_selectInputRef$curre5 = selectInputRef.current) === null || _selectInputRef$curre5 === void 0 ? void 0 : _selectInputRef$curre5.focus();
332
389
  if (event.target === selectSearchInputRef.current) {
333
390
  setListBoxOpen(false);
334
391
  }
@@ -352,7 +409,8 @@ const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref
352
409
  }
353
410
  const nextLIOption = liElementsFiltered[nextElementIndex];
354
411
  if (nextLIOption) {
355
- setActiveDescendant(nextLIOption?.id ?? '');
412
+ var _nextLIOption$id;
413
+ setActiveDescendant((_nextLIOption$id = nextLIOption === null || nextLIOption === void 0 ? void 0 : nextLIOption.id) !== null && _nextLIOption$id !== void 0 ? _nextLIOption$id : '');
356
414
  nextLIOption.scrollIntoView({
357
415
  block: 'nearest'
358
416
  });
@@ -374,7 +432,7 @@ const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref
374
432
  handleOnSearch,
375
433
  searchOnDropdown,
376
434
  nameSelect: String(props.name),
377
- valueSelect: props?.value,
435
+ valueSelect: props === null || props === void 0 ? void 0 : props.value,
378
436
  activeDescendant,
379
437
  handleOnChange,
380
438
  handleOnKeyDown,
@@ -390,20 +448,22 @@ const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref
390
448
  dropdownAlignButton,
391
449
  handleClearValue,
392
450
  handleCheckMultiple,
393
- handleChangeListBoxState
394
- }), [striped, listBoxOpen, isDisabled, filterValue, props?.name, props?.value, activeDescendant, notFoundFilterLabel, searchOnDropdown, isMultipleSelect, showClearButton, isMultipleDefault, isMultipleWithCheckboxes, searchInputPlaceholder, dropdownAlignButton]);
451
+ handleChangeListBoxState,
452
+ optionItens
453
+ }), [striped, listBoxOpen, isDisabled, filterValue, props === null || props === void 0 ? void 0 : props.name, props === null || props === void 0 ? void 0 : props.value, activeDescendant, notFoundFilterLabel, searchOnDropdown, isMultipleSelect, showClearButton, isMultipleDefault, isMultipleWithCheckboxes, searchInputPlaceholder, dropdownAlignButton, optionItens]);
395
454
  if (unvisible || hideContent) return null;
396
455
  return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement(_gridlayout.default, {
397
456
  cols: gridLayout
398
457
  }, /*#__PURE__*/_react.default.createElement(_context.SelectFieldContext.Provider, {
399
458
  value: contextValues
400
459
  }, /*#__PURE__*/_react.default.createElement("div", {
460
+ ref: selectFieldRoot,
401
461
  "data-testid": "test-select-field-root",
402
- className: `select-field-root ${customClassWrapper}`,
462
+ className: "select-field-root ".concat(customClassWrapper),
403
463
  "data-state-error": hasValidationErrors,
404
464
  "data-state-hint-position": hintPosition
405
465
  }, hasLabel && /*#__PURE__*/_react.default.createElement("span", {
406
- className: `root-label ${customClassLabel}`,
466
+ className: "root-label ".concat(customClassLabel),
407
467
  "data-state-skeletonize": skeletonize
408
468
  }, /*#__PURE__*/_react.default.createElement("label", {
409
469
  "data-testid": "test-select-field-label",
@@ -419,10 +479,10 @@ const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref
419
479
  align: popoverAlign,
420
480
  iconColor: "#03bde2"
421
481
  }, /*#__PURE__*/_react.default.createElement(_popover.PopoverText, {
422
- text: props?.hint ?? ''
482
+ text: (_props$hint2 = props === null || props === void 0 ? void 0 : props.hint) !== null && _props$hint2 !== void 0 ? _props$hint2 : ''
423
483
  }))), /*#__PURE__*/_react.default.createElement("div", {
424
484
  ref: selectContainerRef,
425
- className: `container ${customClassInputContainer}`,
485
+ className: "container ".concat(customClassInputContainer),
426
486
  "aria-expanded": listBoxOpen,
427
487
  "data-state-skeletonize": skeletonize
428
488
  }, hasLeftSlotElements && !skeletonize && leftSlotElements, /*#__PURE__*/_react.default.createElement("div", {
@@ -430,7 +490,7 @@ const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref
430
490
  }, /*#__PURE__*/_react.default.createElement("input", _extends({}, rest, {
431
491
  ref: (0, _helpers.mergeRefs)(ref, selectInputRef),
432
492
  readOnly: props.readOnly || undigitable,
433
- className: `input ${customClass}`,
493
+ className: "input ".concat(customClass),
434
494
  placeholder: rest.placeholder,
435
495
  "data-state-error": hasValidationErrors,
436
496
  "data-state-multiple": isMultipleSelect,
@@ -467,7 +527,7 @@ const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref
467
527
  "data-state-skeletonize": skeletonize
468
528
  }, /*#__PURE__*/_react.default.createElement(_triggers.Triggers, null)), listBoxOpen && !hideContent && /*#__PURE__*/(0, _reactDom.createPortal)(/*#__PURE__*/_react.default.createElement(_listbox.ListBox, {
469
529
  ref: selectListBoxRef
470
- }, children), document.body)), hintPosition === 'below' && /*#__PURE__*/_react.default.createElement(_hint.default, {
530
+ }, childrenItems), document.body)), hintPosition === 'below' && /*#__PURE__*/_react.default.createElement(_hint.default, {
471
531
  customClass: "hint",
472
532
  skeletonize: skeletonize,
473
533
  description: props.hint,
@@ -478,8 +538,8 @@ const Input = exports.Input = /*#__PURE__*/_react.default.forwardRef((props, ref
478
538
  className: "error",
479
539
  "data-state-skeletonize": skeletonize,
480
540
  "aria-describedby": String(name).concat('-errors')
481
- }, errors?.map((error, index) => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
482
- key: `${index + 1}-${error}`
541
+ }, errors === null || errors === void 0 ? void 0 : errors.map((error, index) => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
542
+ key: "".concat(index + 1, "-").concat(error)
483
543
  }, error, "\xA0")))))), /*#__PURE__*/_react.default.createElement(_tooltip.Tooltip, {
484
544
  targetRef: selectInputRef,
485
545
  text: tooltip,
@@ -4,8 +4,9 @@ interface SelectFieldItemProps extends React__default.ComponentProps<'li'> {
4
4
  value: any;
5
5
  label: string;
6
6
  disabled?: boolean;
7
+ readOnly?: boolean;
7
8
  children: React__default.ReactNode;
8
9
  }
9
- declare const Item: React__default.ForwardRefExoticComponent<Pick<SelectFieldItemProps, "className" | "disabled" | "onClick" | "color" | "children" | "label" | "style" | "id" | "key" | "slot" | "title" | "hidden" | "onKeyPress" | "role" | "tabIndex" | "align" | "value" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "lang" | "nonce" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & React__default.RefAttributes<HTMLLIElement>>;
10
+ declare const Item: React__default.ForwardRefExoticComponent<Pick<SelectFieldItemProps, "children" | "style" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "placeholder" | "slot" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "align" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "label" | "key" | "disabled" | "value" | "readOnly"> & React__default.RefAttributes<HTMLLIElement>>;
10
11
 
11
12
  export { Item, SelectFieldItemProps };
@@ -8,13 +8,14 @@ var _react = _interopRequireDefault(require("react"));
8
8
  var _lodash = _interopRequireDefault(require("lodash"));
9
9
  var Checkbox = _interopRequireWildcard(require("../checkboxfield"));
10
10
  var _context = require("./context");
11
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
12
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
11
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
13
12
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
13
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
15
14
  const Item = exports.Item = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
15
+ var _filterValue$toString;
16
16
  const {
17
17
  disabled,
18
+ readOnly,
18
19
  children
19
20
  } = props;
20
21
  const {
@@ -32,10 +33,10 @@ const Item = exports.Item = /*#__PURE__*/_react.default.forwardRef((props, ref)
32
33
  const hasFocus = Boolean(activeDescendant === valueToString);
33
34
  const ariaSelected = !isMultipleSelect ? Boolean(props.value === valueSelect) : [...valueSelect].includes(props.value);
34
35
  const addOrRemove = !isMultipleSelect ? undefined : ariaSelected;
35
- const hasPartOfFilter = Boolean(String(props.label).toLowerCase().includes(filterValue?.toString().toLowerCase() ?? ''));
36
+ const hasPartOfFilter = Boolean(String(props.label).toLowerCase().includes((_filterValue$toString = filterValue === null || filterValue === void 0 ? void 0 : filterValue.toString().toLowerCase()) !== null && _filterValue$toString !== void 0 ? _filterValue$toString : ''));
36
37
  const handleOnClickItem = event => {
37
38
  if (isMultipleDefault && ariaSelected) event.preventDefault();else {
38
- handleOnChange?.(props.value, props.label, addOrRemove);
39
+ handleOnChange === null || handleOnChange === void 0 ? void 0 : handleOnChange(props.value, props.label, addOrRemove);
39
40
  }
40
41
  };
41
42
  return /*#__PURE__*/_react.default.createElement("li", _extends({
@@ -58,6 +59,7 @@ const Item = exports.Item = /*#__PURE__*/_react.default.forwardRef((props, ref)
58
59
  title: props.label,
59
60
  "aria-label": props.label,
60
61
  "aria-selected": ariaSelected,
62
+ "aria-readonly": readOnly,
61
63
  "aria-hidden": props['aria-hidden'] || !hasPartOfFilter,
62
64
  "aria-disabled": disabled,
63
65
  "data-content-value": props.value,
@@ -75,6 +77,8 @@ const Item = exports.Item = /*#__PURE__*/_react.default.forwardRef((props, ref)
75
77
  }
76
78
  }, props), isMultipleWithCheckboxes && /*#__PURE__*/_react.default.createElement(Checkbox.Input, {
77
79
  rounded: true,
80
+ disabled: disabled,
81
+ readOnly: readOnly,
78
82
  checked: ariaSelected,
79
83
  size: "default",
80
84
  variant: "secondary",
@@ -2,6 +2,6 @@ import React__default from 'react';
2
2
 
3
3
  interface SelectFieldListBoxProps extends React__default.ComponentProps<'div'> {
4
4
  }
5
- declare const ListBox: React__default.ForwardRefExoticComponent<Pick<SelectFieldListBoxProps, "className" | "onClick" | "color" | "children" | "style" | "id" | "key" | "slot" | "title" | "hidden" | "onKeyPress" | "role" | "tabIndex" | "align" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "lang" | "nonce" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & React__default.RefAttributes<HTMLDivElement>>;
5
+ declare const ListBox: React__default.ForwardRefExoticComponent<Pick<SelectFieldListBoxProps, "children" | "style" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "placeholder" | "slot" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "align" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key"> & React__default.RefAttributes<HTMLDivElement>>;
6
6
 
7
7
  export { ListBox, SelectFieldListBoxProps };
@@ -6,13 +6,14 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.ListBox = void 0;
7
7
  var _react = _interopRequireDefault(require("react"));
8
8
  var _lodash = _interopRequireDefault(require("lodash"));
9
- var _context = require("./context");
10
9
  var _search = require("./search");
10
+ var _context = require("./context");
11
11
  const _excluded = ["children"];
12
12
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
13
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
14
14
  function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
15
15
  function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
16
+ const MAX_HEIGHT = 27 * 15 + 1; // 27px de height do list item * 15 itens máximos na exibição + 1px de borda listbox.
16
17
  const ListBox = exports.ListBox = /*#__PURE__*/_react.default.forwardRef((props, ref) => {
17
18
  const {
18
19
  children
@@ -34,21 +35,24 @@ const ListBox = exports.ListBox = /*#__PURE__*/_react.default.forwardRef((props,
34
35
  const shouldBeShowSearchInput = searchOnDropdown || isMultipleWithCheckboxes;
35
36
  _react.default.useCallback(() => {
36
37
  requestAnimationFrame(() => {
37
- const hasChildrenElementsInUL = listBoxRef.current?.childNodes;
38
- const liElementsFiltered = listBoxRef.current?.querySelectorAll('li[data-state-filtered="true"]') ?? [];
38
+ var _listBoxRef$current, _listBoxRef$current$q, _listBoxRef$current2;
39
+ const hasChildrenElementsInUL = (_listBoxRef$current = listBoxRef.current) === null || _listBoxRef$current === void 0 ? void 0 : _listBoxRef$current.childNodes;
40
+ const liElementsFiltered = (_listBoxRef$current$q = (_listBoxRef$current2 = listBoxRef.current) === null || _listBoxRef$current2 === void 0 ? void 0 : _listBoxRef$current2.querySelectorAll('li[data-state-filtered="true"]')) !== null && _listBoxRef$current$q !== void 0 ? _listBoxRef$current$q : [];
39
41
  const filterIsEmpty = !_lodash.default.isEmpty(hasChildrenElementsInUL) && _lodash.default.isEmpty(liElementsFiltered);
40
42
  setFilterResultIsEmpty(filterIsEmpty);
41
43
  });
42
44
  }, [])();
43
45
  _react.default.useEffect(() => {
44
- liSelectedRef?.current?.scrollIntoView({
46
+ var _liSelectedRef$curren;
47
+ liSelectedRef === null || liSelectedRef === void 0 ? void 0 : (_liSelectedRef$curren = liSelectedRef.current) === null || _liSelectedRef$curren === void 0 ? void 0 : _liSelectedRef$curren.scrollIntoView({
45
48
  block: 'nearest',
46
49
  behavior: 'auto'
47
50
  });
48
51
  }, []);
49
52
  _react.default.useEffect(() => {
50
53
  const updatePosition = () => {
51
- const selectPositionOnScreen = selectContainerRef.current?.getBoundingClientRect();
54
+ var _selectContainerRef$c;
55
+ const selectPositionOnScreen = (_selectContainerRef$c = selectContainerRef.current) === null || _selectContainerRef$c === void 0 ? void 0 : _selectContainerRef$c.getBoundingClientRect();
52
56
  if (selectPositionOnScreen) {
53
57
  const {
54
58
  top,
@@ -56,12 +60,22 @@ const ListBox = exports.ListBox = /*#__PURE__*/_react.default.forwardRef((props,
56
60
  width,
57
61
  height
58
62
  } = selectPositionOnScreen;
59
- setListBoxStyles({
60
- top: top + height + window.scrollY,
63
+ const spaceBelow = window.innerHeight - (top + height);
64
+ const spaceAbove = top;
65
+ const shouldOpenUp = spaceBelow < MAX_HEIGHT && spaceAbove > spaceBelow;
66
+ let styles = {
61
67
  left: left + window.scrollX,
62
- minWidth: width,
63
- position: 'absolute'
64
- });
68
+ position: 'absolute',
69
+ minWidth: width
70
+ };
71
+ if (shouldOpenUp) {
72
+ styles.bottom = window.innerHeight - top - window.scrollY;
73
+ styles.maxHeight = Math.min(MAX_HEIGHT, spaceAbove);
74
+ } else {
75
+ styles.top = top + height + window.scrollY;
76
+ styles.maxHeight = Math.min(MAX_HEIGHT, spaceBelow);
77
+ }
78
+ setListBoxStyles(styles);
65
79
  }
66
80
  };
67
81
  if (listBoxOpen) {