@plurid/plurid-ui-components-react 0.0.0-12 → 0.0.0-15

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.
@@ -304,8 +304,9 @@ const StyledPureButton = styled__default["default"].button`
304
304
  min-height: 40px;
305
305
  min-width: 160px;
306
306
 
307
- :hover {
308
- background-color: ${({theme: theme, level: level, isDisabled: isDisabled}) => {
307
+ @media (hover: hover) {
308
+ :hover {
309
+ background-color: ${({theme: theme, level: level, isDisabled: isDisabled}) => {
309
310
  if (isDisabled) {
310
311
  return theme.backgroundColorPrimaryAlpha;
311
312
  }
@@ -326,6 +327,7 @@ const StyledPureButton = styled__default["default"].button`
326
327
  return theme.backgroundColorSecondary;
327
328
  }
328
329
  }};
330
+ }
329
331
  }
330
332
 
331
333
  :active {
@@ -1038,7 +1040,9 @@ const Textline = React.forwardRef(((properties, reference) => {
1038
1040
  }, React__default["default"].createElement("input", {
1039
1041
  type: _type,
1040
1042
  value: text,
1041
- onChange: atChange,
1043
+ onChange: event => {
1044
+ atChange(event, event.target.value);
1045
+ },
1042
1046
  onKeyDown: handleKeyDown,
1043
1047
  onFocus: atFocus,
1044
1048
  onBlur: atBlur,
@@ -1107,6 +1111,7 @@ const StyledDropdownList = styled__default["default"].div`
1107
1111
  }
1108
1112
  }};
1109
1113
  color: ${props => props.theme.colorPrimary};
1114
+ position: absolute;
1110
1115
  left: ${props => {
1111
1116
  if (props.left) {
1112
1117
  return "0px";
@@ -1118,6 +1123,12 @@ const StyledDropdownList = styled__default["default"].div`
1118
1123
  return "auto";
1119
1124
  }
1120
1125
  return "0px";
1126
+ }};
1127
+ top: ${props => {
1128
+ if (props.listTop) {
1129
+ return props.listTop;
1130
+ }
1131
+ return "25px";
1121
1132
  }};
1122
1133
  height: ${props => {
1123
1134
  if (props.heightItems) {
@@ -1154,8 +1165,6 @@ const StyledDropdownList = styled__default["default"].div`
1154
1165
  return "initial";
1155
1166
  }};
1156
1167
 
1157
- position: absolute;
1158
- top: 25px;
1159
1168
  border-radius: 10px;
1160
1169
  min-width: 60px;
1161
1170
 
@@ -1237,7 +1246,7 @@ const StyledFilterUpdate = styled__default["default"].div`
1237
1246
  `;
1238
1247
 
1239
1248
  const Dropdown = properties => {
1240
- 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;
1249
+ 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;
1241
1250
  const _generalTheme = generalThemeProperty === undefined ? themeProperty === undefined ? themes.plurid : themeProperty : generalThemeProperty;
1242
1251
  const _interactionTheme = interactionThemeProperty === undefined ? themeProperty === undefined ? themes.plurid : themeProperty : interactionThemeProperty;
1243
1252
  const _level = level !== null && level !== void 0 ? level : 0;
@@ -1409,6 +1418,7 @@ const Dropdown = properties => {
1409
1418
  }, typeof selected === "string" ? selected : selected.value), showList && React__default["default"].createElement(StyledDropdownList, {
1410
1419
  theme: interactionTheme,
1411
1420
  left: left,
1421
+ listTop: listTop,
1412
1422
  level: _level,
1413
1423
  heightItems: heightItems && filterable && filteredSelectables.length < heightItems ? filteredSelectables.length + 1 : heightItems,
1414
1424
  heightBeyond: filteredSelectables.length > (heightItems || 0),
@@ -1570,6 +1580,11 @@ const StyledInputBox = styled__default["default"].div`
1570
1580
  color: ${({theme: theme}) => theme.colorPrimary};
1571
1581
  background-color: ${({theme: theme}) => theme.backgroundColorTertiary};
1572
1582
  box-shadow: inset 0px 4px 4px ${({theme: theme}) => theme.boxShadowUmbraColor};
1583
+
1584
+
1585
+ ::placeholder {
1586
+ color: ${({theme: theme}) => theme.colorSecondary};
1587
+ }
1573
1588
  }
1574
1589
  `;
1575
1590
 
@@ -2602,7 +2617,7 @@ const StyledNotification = styled__default["default"].div`
2602
2617
  const StyledNotificationContent = styled__default["default"].div`
2603
2618
  font-size: 0.9rem;
2604
2619
  padding: 32px 16px;
2605
- word-break: break-all;
2620
+ word-break: ${({wordBreak: wordBreak}) => wordBreak};
2606
2621
  `;
2607
2622
 
2608
2623
  const StyledNotificationClose = styled__default["default"].div`
@@ -2619,14 +2634,13 @@ const StyledNotificationClose = styled__default["default"].div`
2619
2634
 
2620
2635
  const Notification = properties => {
2621
2636
  const {data: data, theme: theme, remove: remove, elements: elements, style: style, className: className} = properties;
2622
- const {id: id, text: text, html: html, react: react, timeout: timeout} = data;
2637
+ const {id: id, text: text, html: html, react: react, timeout: timeout, wordBreak: wordBreak} = data;
2638
+ const resolvedWordBreak = wordBreak === false ? "normal" : "break-all";
2623
2639
  const notificationTimeout = React.useRef(null);
2624
2640
  React.useEffect((() => {
2625
2641
  if (timeout) {
2626
2642
  notificationTimeout.current = setTimeout((() => {
2627
- remove({
2628
- id: id
2629
- });
2643
+ remove(id);
2630
2644
  }), timeout);
2631
2645
  }
2632
2646
  return () => {
@@ -2635,17 +2649,27 @@ const Notification = properties => {
2635
2649
  }
2636
2650
  };
2637
2651
  }), [ id, timeout, remove ]);
2638
- const content = html ? React__default["default"].createElement(StyledNotificationContent, {
2639
- dangerouslySetInnerHTML: pluridFunctionsReact.createMarkup(text)
2640
- }) : react && elements && elements[text] ? React__default["default"].createElement(StyledNotificationContent, null, elements[text]) : React__default["default"].createElement(StyledNotificationContent, null, text);
2652
+ const resolveRender = () => {
2653
+ const contentProperties = {
2654
+ wordBreak: resolvedWordBreak
2655
+ };
2656
+ if (html) {
2657
+ return React__default["default"].createElement(StyledNotificationContent, Object.assign({
2658
+ dangerouslySetInnerHTML: pluridFunctionsReact.createMarkup(text)
2659
+ }, contentProperties));
2660
+ }
2661
+ if (react && elements && elements[text]) {
2662
+ return React__default["default"].createElement(StyledNotificationContent, Object.assign({}, contentProperties), elements[text]);
2663
+ }
2664
+ return React__default["default"].createElement(StyledNotificationContent, Object.assign({}, contentProperties), text);
2665
+ };
2666
+ const content = resolveRender();
2641
2667
  return React__default["default"].createElement(StyledNotification, {
2642
2668
  theme: theme,
2643
2669
  style: Object.assign({}, style),
2644
2670
  className: className
2645
2671
  }, content, React__default["default"].createElement(StyledNotificationClose, null, React__default["default"].createElement(pluridIconsReact.PluridIconDelete, {
2646
- atClick: () => remove({
2647
- id: id
2648
- })
2672
+ atClick: () => remove(id)
2649
2673
  })));
2650
2674
  };
2651
2675
 
@@ -3126,17 +3150,19 @@ const StyledHorizontalToolbarButton = styled__default["default"].div`
3126
3150
  color: ${props => props.theme.colorPrimary};
3127
3151
  font-family: ${props => props.theme.fontFamilySansSerif};
3128
3152
 
3129
- :hover {
3130
- background: ${props => props.theme.backgroundColorTertiary};
3131
- }
3153
+ @media (hover: hover) {
3154
+ :hover {
3155
+ background: ${props => props.theme.backgroundColorTertiary};
3156
+ }
3132
3157
 
3133
- :hover svg {
3134
- transform: ${props => {
3158
+ :hover svg {
3159
+ transform: ${props => {
3135
3160
  if (props.scaleIcon) {
3136
3161
  return "scale(1.2)";
3137
3162
  }
3138
3163
  return "";
3139
3164
  }};
3165
+ }
3140
3166
  }
3141
3167
 
3142
3168
  svg {
@@ -3289,17 +3315,19 @@ const StyledVerticalToolbarButton = styled__default["default"].div`
3289
3315
  return "transparent";
3290
3316
  }};
3291
3317
 
3292
- :hover {
3293
- background: ${props => props.theme.backgroundColorTertiary};
3294
- }
3318
+ @media (hover: hover) {
3319
+ :hover {
3320
+ background: ${props => props.theme.backgroundColorTertiary};
3321
+ }
3295
3322
 
3296
- :hover svg {
3297
- transform: ${props => {
3323
+ :hover svg {
3324
+ transform: ${props => {
3298
3325
  if (props.scaleIcon) {
3299
3326
  return "scale(1.2)";
3300
3327
  }
3301
3328
  return "";
3302
3329
  }};
3330
+ }
3303
3331
  }
3304
3332
 
3305
3333
  svg {