@plurid/plurid-ui-components-react 0.0.0-13 → 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/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 {
|
|
@@ -1578,6 +1580,11 @@ const StyledInputBox = styled__default["default"].div`
|
|
|
1578
1580
|
color: ${({theme: theme}) => theme.colorPrimary};
|
|
1579
1581
|
background-color: ${({theme: theme}) => theme.backgroundColorTertiary};
|
|
1580
1582
|
box-shadow: inset 0px 4px 4px ${({theme: theme}) => theme.boxShadowUmbraColor};
|
|
1583
|
+
|
|
1584
|
+
|
|
1585
|
+
::placeholder {
|
|
1586
|
+
color: ${({theme: theme}) => theme.colorSecondary};
|
|
1587
|
+
}
|
|
1581
1588
|
}
|
|
1582
1589
|
`;
|
|
1583
1590
|
|
|
@@ -2610,7 +2617,7 @@ const StyledNotification = styled__default["default"].div`
|
|
|
2610
2617
|
const StyledNotificationContent = styled__default["default"].div`
|
|
2611
2618
|
font-size: 0.9rem;
|
|
2612
2619
|
padding: 32px 16px;
|
|
2613
|
-
word-break:
|
|
2620
|
+
word-break: ${({wordBreak: wordBreak}) => wordBreak};
|
|
2614
2621
|
`;
|
|
2615
2622
|
|
|
2616
2623
|
const StyledNotificationClose = styled__default["default"].div`
|
|
@@ -2627,7 +2634,8 @@ const StyledNotificationClose = styled__default["default"].div`
|
|
|
2627
2634
|
|
|
2628
2635
|
const Notification = properties => {
|
|
2629
2636
|
const {data: data, theme: theme, remove: remove, elements: elements, style: style, className: className} = properties;
|
|
2630
|
-
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";
|
|
2631
2639
|
const notificationTimeout = React.useRef(null);
|
|
2632
2640
|
React.useEffect((() => {
|
|
2633
2641
|
if (timeout) {
|
|
@@ -2643,9 +2651,21 @@ const Notification = properties => {
|
|
|
2643
2651
|
}
|
|
2644
2652
|
};
|
|
2645
2653
|
}), [ id, timeout, remove ]);
|
|
2646
|
-
const
|
|
2647
|
-
|
|
2648
|
-
|
|
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();
|
|
2649
2669
|
return React__default["default"].createElement(StyledNotification, {
|
|
2650
2670
|
theme: theme,
|
|
2651
2671
|
style: Object.assign({}, style),
|
|
@@ -3134,17 +3154,19 @@ const StyledHorizontalToolbarButton = styled__default["default"].div`
|
|
|
3134
3154
|
color: ${props => props.theme.colorPrimary};
|
|
3135
3155
|
font-family: ${props => props.theme.fontFamilySansSerif};
|
|
3136
3156
|
|
|
3137
|
-
:hover {
|
|
3138
|
-
|
|
3139
|
-
|
|
3157
|
+
@media (hover: hover) {
|
|
3158
|
+
:hover {
|
|
3159
|
+
background: ${props => props.theme.backgroundColorTertiary};
|
|
3160
|
+
}
|
|
3140
3161
|
|
|
3141
|
-
|
|
3142
|
-
|
|
3162
|
+
:hover svg {
|
|
3163
|
+
transform: ${props => {
|
|
3143
3164
|
if (props.scaleIcon) {
|
|
3144
3165
|
return "scale(1.2)";
|
|
3145
3166
|
}
|
|
3146
3167
|
return "";
|
|
3147
3168
|
}};
|
|
3169
|
+
}
|
|
3148
3170
|
}
|
|
3149
3171
|
|
|
3150
3172
|
svg {
|
|
@@ -3297,17 +3319,19 @@ const StyledVerticalToolbarButton = styled__default["default"].div`
|
|
|
3297
3319
|
return "transparent";
|
|
3298
3320
|
}};
|
|
3299
3321
|
|
|
3300
|
-
:hover {
|
|
3301
|
-
|
|
3302
|
-
|
|
3322
|
+
@media (hover: hover) {
|
|
3323
|
+
:hover {
|
|
3324
|
+
background: ${props => props.theme.backgroundColorTertiary};
|
|
3325
|
+
}
|
|
3303
3326
|
|
|
3304
|
-
|
|
3305
|
-
|
|
3327
|
+
:hover svg {
|
|
3328
|
+
transform: ${props => {
|
|
3306
3329
|
if (props.scaleIcon) {
|
|
3307
3330
|
return "scale(1.2)";
|
|
3308
3331
|
}
|
|
3309
3332
|
return "";
|
|
3310
3333
|
}};
|
|
3334
|
+
}
|
|
3311
3335
|
}
|
|
3312
3336
|
|
|
3313
3337
|
svg {
|