@plurid/plurid-ui-components-react 0.0.0-11 → 0.0.0-14
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.
- package/distribution/components/pluridal/index.d.ts +1 -1
- package/distribution/components/pluridal/notifications/Notification/styled.d.ts +4 -1
- package/distribution/components/pluridal/notifications/Notifications/index.d.ts +1 -1
- package/distribution/components/pluridal/notifications/index.d.ts +1 -1
- package/distribution/components/pluridal/toolbars/ToolbarControls/index.d.ts +1 -0
- package/distribution/components/pluridal/toolbars/ToolbarSpecific/index.d.ts +1 -0
- package/distribution/components/universal/form/FormLeftRight/index.d.ts +1 -0
- package/distribution/components/universal/form/Formitem/index.d.ts +1 -0
- package/distribution/components/universal/form/Formline/index.d.ts +1 -0
- package/distribution/components/universal/inputs/Dropdown/index.d.ts +1 -0
- package/distribution/components/universal/inputs/Textline/index.d.ts +3 -3
- package/distribution/index.es.js +53 -21
- package/distribution/index.es.js.map +1 -1
- package/distribution/index.js +53 -21
- package/distribution/index.js.map +1 -1
- package/package.json +34 -33
package/distribution/index.js
CHANGED
|
@@ -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
|
-
|
|
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:
|
|
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:
|
|
2620
|
+
word-break: ${({wordBreak: wordBreak}) => wordBreak};
|
|
2606
2621
|
`;
|
|
2607
2622
|
|
|
2608
2623
|
const StyledNotificationClose = styled__default["default"].div`
|
|
@@ -2619,7 +2634,8 @@ 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) {
|
|
@@ -2635,9 +2651,21 @@ const Notification = properties => {
|
|
|
2635
2651
|
}
|
|
2636
2652
|
};
|
|
2637
2653
|
}), [ id, timeout, remove ]);
|
|
2638
|
-
const
|
|
2639
|
-
|
|
2640
|
-
|
|
2654
|
+
const resolveRender = () => {
|
|
2655
|
+
const contentProperties = {
|
|
2656
|
+
wordBreak: resolvedWordBreak
|
|
2657
|
+
};
|
|
2658
|
+
if (html) {
|
|
2659
|
+
return React__default["default"].createElement(StyledNotificationContent, Object.assign({
|
|
2660
|
+
dangerouslySetInnerHTML: pluridFunctionsReact.createMarkup(text)
|
|
2661
|
+
}, contentProperties));
|
|
2662
|
+
}
|
|
2663
|
+
if (react && elements && elements[text]) {
|
|
2664
|
+
return React__default["default"].createElement(StyledNotificationContent, Object.assign({}, contentProperties), elements[text]);
|
|
2665
|
+
}
|
|
2666
|
+
return React__default["default"].createElement(StyledNotificationContent, Object.assign({}, contentProperties), text);
|
|
2667
|
+
};
|
|
2668
|
+
const content = resolveRender();
|
|
2641
2669
|
return React__default["default"].createElement(StyledNotification, {
|
|
2642
2670
|
theme: theme,
|
|
2643
2671
|
style: Object.assign({}, style),
|
|
@@ -3126,17 +3154,19 @@ const StyledHorizontalToolbarButton = styled__default["default"].div`
|
|
|
3126
3154
|
color: ${props => props.theme.colorPrimary};
|
|
3127
3155
|
font-family: ${props => props.theme.fontFamilySansSerif};
|
|
3128
3156
|
|
|
3129
|
-
:hover {
|
|
3130
|
-
|
|
3131
|
-
|
|
3157
|
+
@media (hover: hover) {
|
|
3158
|
+
:hover {
|
|
3159
|
+
background: ${props => props.theme.backgroundColorTertiary};
|
|
3160
|
+
}
|
|
3132
3161
|
|
|
3133
|
-
|
|
3134
|
-
|
|
3162
|
+
:hover svg {
|
|
3163
|
+
transform: ${props => {
|
|
3135
3164
|
if (props.scaleIcon) {
|
|
3136
3165
|
return "scale(1.2)";
|
|
3137
3166
|
}
|
|
3138
3167
|
return "";
|
|
3139
3168
|
}};
|
|
3169
|
+
}
|
|
3140
3170
|
}
|
|
3141
3171
|
|
|
3142
3172
|
svg {
|
|
@@ -3289,17 +3319,19 @@ const StyledVerticalToolbarButton = styled__default["default"].div`
|
|
|
3289
3319
|
return "transparent";
|
|
3290
3320
|
}};
|
|
3291
3321
|
|
|
3292
|
-
:hover {
|
|
3293
|
-
|
|
3294
|
-
|
|
3322
|
+
@media (hover: hover) {
|
|
3323
|
+
:hover {
|
|
3324
|
+
background: ${props => props.theme.backgroundColorTertiary};
|
|
3325
|
+
}
|
|
3295
3326
|
|
|
3296
|
-
|
|
3297
|
-
|
|
3327
|
+
:hover svg {
|
|
3328
|
+
transform: ${props => {
|
|
3298
3329
|
if (props.scaleIcon) {
|
|
3299
3330
|
return "scale(1.2)";
|
|
3300
3331
|
}
|
|
3301
3332
|
return "";
|
|
3302
3333
|
}};
|
|
3334
|
+
}
|
|
3303
3335
|
}
|
|
3304
3336
|
|
|
3305
3337
|
svg {
|