@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.
@@ -2,7 +2,7 @@
2
2
  declare const pluridal: {
3
3
  notifications: {
4
4
  Notification: import("react").FC<import("./notifications/Notification").NotificationOwnProperties>;
5
- Notifications: import("react-redux").ConnectedComponent<import("react").FC<import("./notifications/Notifications").NotificationsProperties>, import("react-redux").Omit<import("./notifications/Notifications").NotificationsProperties, "stateGeneralTheme" | "stateNotifications" | "dispatchRemoveNotification"> & import("./notifications/Notifications").NotificationsOwnProperties>;
5
+ Notifications: import("react-redux").ConnectedComponent<import("react").FC<import("./notifications/Notifications").NotificationsProperties>, Omit<import("./notifications/Notifications").NotificationsProperties, "stateGeneralTheme" | "stateNotifications" | "dispatchRemoveNotification"> & import("./notifications/Notifications").NotificationsOwnProperties & import("react-redux").ConnectProps>;
6
6
  };
7
7
  sitting: {
8
8
  SittingTray: import("react-redux").ConnectedComponent<import("react").FC<import("./sitting/SittingTray").SittingTrayProperties>, any>;
@@ -22,5 +22,5 @@ export interface NotificationsDispatchProperties {
22
22
  dispatchRemoveNotification: typeof notificationsStateService.actions.removeNotification;
23
23
  }
24
24
  export declare type NotificationsProperties = NotificationsOwnProperties & NotificationsStateProperties & NotificationsDispatchProperties;
25
- declare const ConnectedNotifications: import("react-redux").ConnectedComponent<React.FC<NotificationsProperties>, import("react-redux").Omit<NotificationsProperties, "stateGeneralTheme" | "stateNotifications" | "dispatchRemoveNotification"> & NotificationsOwnProperties>;
25
+ declare const ConnectedNotifications: import("react-redux").ConnectedComponent<React.FC<NotificationsProperties>, Omit<NotificationsProperties, "stateGeneralTheme" | "stateNotifications" | "dispatchRemoveNotification"> & NotificationsOwnProperties & import("react-redux").ConnectProps>;
26
26
  export default ConnectedNotifications;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  declare const notifications: {
3
3
  Notification: import("react").FC<import("./Notification").NotificationOwnProperties>;
4
- Notifications: import("react-redux").ConnectedComponent<import("react").FC<import("./Notifications").NotificationsProperties>, import("react-redux").Omit<import("./Notifications").NotificationsProperties, "stateGeneralTheme" | "stateNotifications" | "dispatchRemoveNotification"> & import("./Notifications").NotificationsOwnProperties>;
4
+ Notifications: import("react-redux").ConnectedComponent<import("react").FC<import("./Notifications").NotificationsProperties>, Omit<import("./Notifications").NotificationsProperties, "stateGeneralTheme" | "stateNotifications" | "dispatchRemoveNotification"> & import("./Notifications").NotificationsOwnProperties & import("react-redux").ConnectProps>;
5
5
  };
6
6
  export default notifications;
@@ -6,6 +6,7 @@ export interface ToolbarControlsOwnProperties {
6
6
  theme?: Theme;
7
7
  style?: React.CSSProperties;
8
8
  className?: string;
9
+ children?: React.ReactNode;
9
10
  }
10
11
  export declare type ToolbarControlsProperties = ToolbarControlsOwnProperties;
11
12
  declare const ToolbarControls: React.FC<ToolbarControlsProperties>;
@@ -8,6 +8,7 @@ export interface ToolbarSpecificOwnProperties {
8
8
  activeType: any;
9
9
  selectors: any;
10
10
  position?: keyof typeof HorizontalPositions;
11
+ children?: React.ReactNode;
11
12
  }
12
13
  export interface ToolbarSpecificStateProperties {
13
14
  stateToolbars: any;
@@ -4,6 +4,7 @@ export interface FormLeftRightProperties {
4
4
  theme?: Theme;
5
5
  style?: React.CSSProperties;
6
6
  className?: string;
7
+ children?: React.ReactNode;
7
8
  }
8
9
  /**
9
10
  * Form left and right items
@@ -5,6 +5,7 @@ export interface FormitemProperties {
5
5
  level?: number;
6
6
  style?: React.CSSProperties;
7
7
  className?: string;
8
+ children?: React.ReactNode;
8
9
  }
9
10
  /**
10
11
  * Renders a form item.
@@ -8,6 +8,7 @@ export interface FormlineProperties {
8
8
  responsive?: boolean;
9
9
  style?: React.CSSProperties;
10
10
  className?: string;
11
+ children?: React.ReactNode;
11
12
  }
12
13
  /**
13
14
  * Renders a descriptive text and a form element side by side.
@@ -7,6 +7,7 @@ export interface DropdownProperties {
7
7
  atSelect: (selection: PluridUIDropdownSelectable | string, kind?: string) => void;
8
8
  left?: boolean;
9
9
  kind?: string;
10
+ listTop?: string;
10
11
  dropdownToggled?: boolean;
11
12
  /**
12
13
  * Hide dropdown after click selection.
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import { Theme } from '@plurid/plurid-themes';
3
3
  export interface TextlineProperties {
4
4
  text: string;
5
- atChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
5
+ atChange: (event: React.ChangeEvent<HTMLInputElement>, value: string) => void;
6
6
  atKeyDown?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
7
7
  atFocus?: (event: React.FocusEvent<HTMLInputElement>) => void;
8
8
  atBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;
@@ -30,12 +30,12 @@ export interface TextlineProperties {
30
30
  export declare type TextlineType = TextlineProperties & React.RefAttributes<any>;
31
31
  /**
32
32
  * @param text `string`
33
- * @param atChange `(event: React.ChangeEvent<HTMLInputElement>) => void`
33
+ * @param atChange `(event: React.ChangeEvent<HTMLInputElement>, value: string) => void`
34
34
  * @param atKeyDown `(event: React.KeyboardEvent<HTMLInputElement>) => void`
35
35
  * @param atFocus `(event: React.FocusEvent<HTMLInputElement>) => void`
36
36
  * @param atBlur `(event: React.FocusEvent<HTMLInputElement>) => void`
37
37
  *
38
- * @param type optional - `'text' | 'password'`
38
+ * @param type optional - `'text' | 'password' | 'number'`
39
39
  * @param placeholder optional - `string`
40
40
  * @param autoCapitalize optional - `string`
41
41
  * @param autoComplete optional - `string`
@@ -1020,7 +1020,9 @@ const Textline = forwardRef(((properties, reference) => {
1020
1020
  }, React.createElement("input", {
1021
1021
  type: _type,
1022
1022
  value: text,
1023
- onChange: atChange,
1023
+ onChange: event => {
1024
+ atChange(event, event.target.value);
1025
+ },
1024
1026
  onKeyDown: handleKeyDown,
1025
1027
  onFocus: atFocus,
1026
1028
  onBlur: atBlur,
@@ -1089,6 +1091,7 @@ const StyledDropdownList = styled.div`
1089
1091
  }
1090
1092
  }};
1091
1093
  color: ${props => props.theme.colorPrimary};
1094
+ position: absolute;
1092
1095
  left: ${props => {
1093
1096
  if (props.left) {
1094
1097
  return "0px";
@@ -1100,10 +1103,20 @@ const StyledDropdownList = styled.div`
1100
1103
  return "auto";
1101
1104
  }
1102
1105
  return "0px";
1106
+ }};
1107
+ top: ${props => {
1108
+ if (props.listTop) {
1109
+ return props.listTop;
1110
+ }
1111
+ return "25px";
1103
1112
  }};
1104
1113
  height: ${props => {
1105
1114
  if (props.heightItems) {
1106
- return props.heightItems * 2 + "rem";
1115
+ const value = props.heightItems * 2 + "rem";
1116
+ if (props.heightBeyond) {
1117
+ return `calc(${value} + 1rem)`;
1118
+ }
1119
+ return value;
1107
1120
  }
1108
1121
  return "initial";
1109
1122
  }};
@@ -1132,8 +1145,6 @@ const StyledDropdownList = styled.div`
1132
1145
  return "initial";
1133
1146
  }};
1134
1147
 
1135
- position: absolute;
1136
- top: 25px;
1137
1148
  border-radius: 10px;
1138
1149
  min-width: 60px;
1139
1150
 
@@ -1215,7 +1226,7 @@ const StyledFilterUpdate = styled.div`
1215
1226
  `;
1216
1227
 
1217
1228
  const Dropdown = properties => {
1218
- 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;
1229
+ 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;
1219
1230
  const _generalTheme = generalThemeProperty === undefined ? themeProperty === undefined ? plurid : themeProperty : generalThemeProperty;
1220
1231
  const _interactionTheme = interactionThemeProperty === undefined ? themeProperty === undefined ? plurid : themeProperty : interactionThemeProperty;
1221
1232
  const _level = level !== null && level !== void 0 ? level : 0;
@@ -1312,7 +1323,6 @@ const Dropdown = properties => {
1312
1323
  }), [ themeProperty, generalThemeProperty, interactionThemeProperty ]);
1313
1324
  useEffect((() => {
1314
1325
  const scrollTo = index => {
1315
- console.log(itemsReferences.current[index].current);
1316
1326
  if (itemsReferences.current[index].current) {
1317
1327
  itemsReferences.current[index].current.scrollIntoView({
1318
1328
  behavior: "smooth",
@@ -1388,8 +1398,10 @@ const Dropdown = properties => {
1388
1398
  }, typeof selected === "string" ? selected : selected.value), showList && React.createElement(StyledDropdownList, {
1389
1399
  theme: interactionTheme,
1390
1400
  left: left,
1401
+ listTop: listTop,
1391
1402
  level: _level,
1392
1403
  heightItems: heightItems && filterable && filteredSelectables.length < heightItems ? filteredSelectables.length + 1 : heightItems,
1404
+ heightBeyond: filteredSelectables.length > (heightItems || 0),
1393
1405
  width: width
1394
1406
  }, React.createElement("ul", null, filterable && React.createElement("li", {
1395
1407
  style: {