@plurid/plurid-ui-components-react 0.0.0-10 → 0.0.0-13

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.
@@ -1038,7 +1038,9 @@ const Textline = React.forwardRef(((properties, reference) => {
1038
1038
  }, React__default["default"].createElement("input", {
1039
1039
  type: _type,
1040
1040
  value: text,
1041
- onChange: atChange,
1041
+ onChange: event => {
1042
+ atChange(event, event.target.value);
1043
+ },
1042
1044
  onKeyDown: handleKeyDown,
1043
1045
  onFocus: atFocus,
1044
1046
  onBlur: atBlur,
@@ -1107,6 +1109,7 @@ const StyledDropdownList = styled__default["default"].div`
1107
1109
  }
1108
1110
  }};
1109
1111
  color: ${props => props.theme.colorPrimary};
1112
+ position: absolute;
1110
1113
  left: ${props => {
1111
1114
  if (props.left) {
1112
1115
  return "0px";
@@ -1118,10 +1121,20 @@ const StyledDropdownList = styled__default["default"].div`
1118
1121
  return "auto";
1119
1122
  }
1120
1123
  return "0px";
1124
+ }};
1125
+ top: ${props => {
1126
+ if (props.listTop) {
1127
+ return props.listTop;
1128
+ }
1129
+ return "25px";
1121
1130
  }};
1122
1131
  height: ${props => {
1123
1132
  if (props.heightItems) {
1124
- return props.heightItems * 2 + "rem";
1133
+ const value = props.heightItems * 2 + "rem";
1134
+ if (props.heightBeyond) {
1135
+ return `calc(${value} + 1rem)`;
1136
+ }
1137
+ return value;
1125
1138
  }
1126
1139
  return "initial";
1127
1140
  }};
@@ -1150,8 +1163,6 @@ const StyledDropdownList = styled__default["default"].div`
1150
1163
  return "initial";
1151
1164
  }};
1152
1165
 
1153
- position: absolute;
1154
- top: 25px;
1155
1166
  border-radius: 10px;
1156
1167
  min-width: 60px;
1157
1168
 
@@ -1233,7 +1244,7 @@ const StyledFilterUpdate = styled__default["default"].div`
1233
1244
  `;
1234
1245
 
1235
1246
  const Dropdown = properties => {
1236
- const {selected: selected, selectables: selectables, atSelect: atSelect, left: left, kind: kind, dropdownToggled: dropdownToggled, hideAtSelect: hideAtSelect, selectAtHover: selectAtHover, selectedColor: selectedColor, filterable: filterable, style: style, className: className, theme: themeProperty, generalTheme: generalThemeProperty, interactionTheme: interactionThemeProperty, level: level, heightItems: heightItems, width: width, setDropdownToggled: setDropdownToggled, filterUpdate: filterUpdate} = properties;
1247
+ const {selected: selected, selectables: selectables, atSelect: atSelect, left: left, kind: kind, listTop: listTop, dropdownToggled: dropdownToggled, hideAtSelect: hideAtSelect, selectAtHover: selectAtHover, selectedColor: selectedColor, filterable: filterable, style: style, className: className, theme: themeProperty, generalTheme: generalThemeProperty, interactionTheme: interactionThemeProperty, level: level, heightItems: heightItems, width: width, setDropdownToggled: setDropdownToggled, filterUpdate: filterUpdate} = properties;
1237
1248
  const _generalTheme = generalThemeProperty === undefined ? themeProperty === undefined ? themes.plurid : themeProperty : generalThemeProperty;
1238
1249
  const _interactionTheme = interactionThemeProperty === undefined ? themeProperty === undefined ? themes.plurid : themeProperty : interactionThemeProperty;
1239
1250
  const _level = level !== null && level !== void 0 ? level : 0;
@@ -1330,7 +1341,6 @@ const Dropdown = properties => {
1330
1341
  }), [ themeProperty, generalThemeProperty, interactionThemeProperty ]);
1331
1342
  React.useEffect((() => {
1332
1343
  const scrollTo = index => {
1333
- console.log(itemsReferences.current[index].current);
1334
1344
  if (itemsReferences.current[index].current) {
1335
1345
  itemsReferences.current[index].current.scrollIntoView({
1336
1346
  behavior: "smooth",
@@ -1406,8 +1416,10 @@ const Dropdown = properties => {
1406
1416
  }, typeof selected === "string" ? selected : selected.value), showList && React__default["default"].createElement(StyledDropdownList, {
1407
1417
  theme: interactionTheme,
1408
1418
  left: left,
1419
+ listTop: listTop,
1409
1420
  level: _level,
1410
1421
  heightItems: heightItems && filterable && filteredSelectables.length < heightItems ? filteredSelectables.length + 1 : heightItems,
1422
+ heightBeyond: filteredSelectables.length > (heightItems || 0),
1411
1423
  width: width
1412
1424
  }, React__default["default"].createElement("ul", null, filterable && React__default["default"].createElement("li", {
1413
1425
  style: {