@plurid/plurid-ui-components-react 0.0.0-13 → 0.0.0-16
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/head/Head/index.d.ts +37 -0
- package/distribution/components/pluridal/head/index.d.ts +5 -0
- package/distribution/components/pluridal/index.d.ts +3 -0
- package/distribution/components/pluridal/notifications/Notification/index.d.ts +3 -3
- package/distribution/components/pluridal/notifications/Notification/styled.d.ts +4 -1
- package/distribution/components/pluridal/notifications/Notifications/index.d.ts +5 -5
- package/distribution/components/pluridal/sitting/SittingTray/components/Sittings/index.d.ts +1 -0
- package/distribution/components/pluridal/sitting/SittingTray/components/StateImage/index.d.ts +1 -0
- package/distribution/components/pluridal/sitting/SittingTray/components/StateLine/index.d.ts +1 -0
- package/distribution/components/pluridal/sitting/SittingTray/components/StateLink/index.d.ts +1 -0
- package/distribution/components/pluridal/sitting/SittingTray/index.d.ts +1 -1
- package/distribution/components/pluridal/toolbars/ToolbarGeneral/index.d.ts +3 -3
- package/distribution/index.es.js +188 -24
- package/distribution/index.es.js.map +1 -1
- package/distribution/index.js +188 -24
- package/distribution/index.js.map +1 -1
- package/package.json +25 -42
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
|
|
|
@@ -2578,6 +2585,149 @@ const universal = {
|
|
|
2578
2585
|
varia: varia
|
|
2579
2586
|
};
|
|
2580
2587
|
|
|
2588
|
+
const Head = properties => {
|
|
2589
|
+
var _a, _b, _c, _d;
|
|
2590
|
+
const {defaults: defaults, children: children, stateHead: stateHead} = properties;
|
|
2591
|
+
const robots = (defaults === null || defaults === void 0 ? void 0 : defaults.robots) || "index,follow";
|
|
2592
|
+
const viewport = (defaults === null || defaults === void 0 ? void 0 : defaults.viewport) || "width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0, shrink-to-fit=no";
|
|
2593
|
+
const faviconIcon = (_a = defaults === null || defaults === void 0 ? void 0 : defaults.faviconIcon) !== null && _a !== void 0 ? _a : "/favicon.ico";
|
|
2594
|
+
const favicon16 = (_b = defaults === null || defaults === void 0 ? void 0 : defaults.favicon16) !== null && _b !== void 0 ? _b : "/favicon-32x32.png";
|
|
2595
|
+
const favicon32 = (_c = defaults === null || defaults === void 0 ? void 0 : defaults.favicon32) !== null && _c !== void 0 ? _c : "/favicon-16x16.png";
|
|
2596
|
+
const manifest = (_d = defaults === null || defaults === void 0 ? void 0 : defaults.manifest) !== null && _d !== void 0 ? _d : "/site.webmanifest";
|
|
2597
|
+
const themeColor = (defaults === null || defaults === void 0 ? void 0 : defaults.themeColor) || "";
|
|
2598
|
+
const titleValue = stateHead.title || (defaults === null || defaults === void 0 ? void 0 : defaults.title) || "";
|
|
2599
|
+
const descriptionValue = stateHead.description || (defaults === null || defaults === void 0 ? void 0 : defaults.description) || "";
|
|
2600
|
+
const canonicalURL = stateHead.canonicalURL || (defaults === null || defaults === void 0 ? void 0 : defaults.canonicalURL) || "";
|
|
2601
|
+
const ogTitleValue = stateHead.ogTitle || titleValue;
|
|
2602
|
+
const ogDescriptionValue = stateHead.ogDescription || titleValue;
|
|
2603
|
+
const ogImageValue = stateHead.ogImage || (defaults === null || defaults === void 0 ? void 0 : defaults.ogImage) || "";
|
|
2604
|
+
const ogURLValue = stateHead.ogURL || (defaults === null || defaults === void 0 ? void 0 : defaults.ogURL) || "";
|
|
2605
|
+
const apiDomain = (defaults === null || defaults === void 0 ? void 0 : defaults.apiDomain) || "";
|
|
2606
|
+
const ogImageWidth = (defaults === null || defaults === void 0 ? void 0 : defaults.ogImageWidth) || "1200";
|
|
2607
|
+
const ogImageHeight = (defaults === null || defaults === void 0 ? void 0 : defaults.ogImageHeight) || "630";
|
|
2608
|
+
const ogSiteName = (defaults === null || defaults === void 0 ? void 0 : defaults.ogSiteName) || "";
|
|
2609
|
+
const appleTouchIcon = (defaults === null || defaults === void 0 ? void 0 : defaults.appleTouchIcon) || "";
|
|
2610
|
+
const {styles: styles, scripts: scripts} = stateHead;
|
|
2611
|
+
return React__default["default"].createElement(React__default["default"].Fragment, null, React__default["default"].createElement("meta", {
|
|
2612
|
+
charSet: "utf-8"
|
|
2613
|
+
}), React__default["default"].createElement("meta", {
|
|
2614
|
+
name: "robots",
|
|
2615
|
+
content: robots
|
|
2616
|
+
}), React__default["default"].createElement("meta", {
|
|
2617
|
+
name: "viewport",
|
|
2618
|
+
content: viewport
|
|
2619
|
+
}), React__default["default"].createElement("meta", {
|
|
2620
|
+
name: "description",
|
|
2621
|
+
content: descriptionValue
|
|
2622
|
+
}), React__default["default"].createElement("title", null, titleValue), React__default["default"].createElement("meta", {
|
|
2623
|
+
name: "title",
|
|
2624
|
+
content: titleValue
|
|
2625
|
+
}), React__default["default"].createElement("meta", {
|
|
2626
|
+
name: "description",
|
|
2627
|
+
content: descriptionValue
|
|
2628
|
+
}), apiDomain && React__default["default"].createElement(React__default["default"].Fragment, null, React__default["default"].createElement("link", {
|
|
2629
|
+
rel: "preconnect",
|
|
2630
|
+
href: apiDomain
|
|
2631
|
+
}), React__default["default"].createElement("link", {
|
|
2632
|
+
rel: "dns-prefetch",
|
|
2633
|
+
href: apiDomain
|
|
2634
|
+
})), faviconIcon && React__default["default"].createElement("link", {
|
|
2635
|
+
rel: "icon",
|
|
2636
|
+
sizes: "64x64",
|
|
2637
|
+
href: faviconIcon
|
|
2638
|
+
}), favicon32 && React__default["default"].createElement("link", {
|
|
2639
|
+
rel: "icon",
|
|
2640
|
+
type: "image/png",
|
|
2641
|
+
sizes: "32x32",
|
|
2642
|
+
href: favicon32
|
|
2643
|
+
}), favicon16 && React__default["default"].createElement("link", {
|
|
2644
|
+
rel: "icon",
|
|
2645
|
+
type: "image/png",
|
|
2646
|
+
sizes: "16x16",
|
|
2647
|
+
href: favicon16
|
|
2648
|
+
}), manifest && React__default["default"].createElement("link", {
|
|
2649
|
+
rel: "manifest",
|
|
2650
|
+
href: manifest
|
|
2651
|
+
}), themeColor && React__default["default"].createElement("meta", {
|
|
2652
|
+
name: "theme-color",
|
|
2653
|
+
content: themeColor
|
|
2654
|
+
}), canonicalURL && React__default["default"].createElement("link", {
|
|
2655
|
+
rel: "canonical",
|
|
2656
|
+
href: canonicalURL
|
|
2657
|
+
}), React__default["default"].createElement("meta", {
|
|
2658
|
+
property: "og:type",
|
|
2659
|
+
content: "website"
|
|
2660
|
+
}), React__default["default"].createElement("meta", {
|
|
2661
|
+
property: "og:title",
|
|
2662
|
+
content: ogTitleValue
|
|
2663
|
+
}), React__default["default"].createElement("meta", {
|
|
2664
|
+
property: "og:image",
|
|
2665
|
+
content: ogImageValue
|
|
2666
|
+
}), React__default["default"].createElement("meta", {
|
|
2667
|
+
property: "og:image:width",
|
|
2668
|
+
content: ogImageWidth
|
|
2669
|
+
}), React__default["default"].createElement("meta", {
|
|
2670
|
+
property: "og:image:height",
|
|
2671
|
+
content: ogImageHeight
|
|
2672
|
+
}), ogSiteName && React__default["default"].createElement("meta", {
|
|
2673
|
+
property: "og:site_name",
|
|
2674
|
+
content: ogSiteName
|
|
2675
|
+
}), React__default["default"].createElement("meta", {
|
|
2676
|
+
property: "og:url",
|
|
2677
|
+
content: ogURLValue
|
|
2678
|
+
}), React__default["default"].createElement("meta", {
|
|
2679
|
+
property: "og:description",
|
|
2680
|
+
content: ogDescriptionValue
|
|
2681
|
+
}), React__default["default"].createElement("meta", {
|
|
2682
|
+
property: "twitter:card",
|
|
2683
|
+
content: "summary_large_image"
|
|
2684
|
+
}), React__default["default"].createElement("meta", {
|
|
2685
|
+
property: "twitter:url",
|
|
2686
|
+
content: ogURLValue
|
|
2687
|
+
}), React__default["default"].createElement("meta", {
|
|
2688
|
+
property: "twitter:title",
|
|
2689
|
+
content: ogTitleValue
|
|
2690
|
+
}), React__default["default"].createElement("meta", {
|
|
2691
|
+
property: "twitter:description",
|
|
2692
|
+
content: ogDescriptionValue
|
|
2693
|
+
}), React__default["default"].createElement("meta", {
|
|
2694
|
+
property: "twitter:image",
|
|
2695
|
+
content: ogImageValue
|
|
2696
|
+
}), React__default["default"].createElement("meta", {
|
|
2697
|
+
name: "apple-mobile-web-app-capable",
|
|
2698
|
+
content: "yes"
|
|
2699
|
+
}), React__default["default"].createElement("meta", {
|
|
2700
|
+
name: "apple-mobile-web-app-status-bar-style",
|
|
2701
|
+
content: "default"
|
|
2702
|
+
}), React__default["default"].createElement("meta", {
|
|
2703
|
+
name: "apple-mobile-web-app-title",
|
|
2704
|
+
content: titleValue
|
|
2705
|
+
}), appleTouchIcon && React__default["default"].createElement("link", {
|
|
2706
|
+
rel: "apple-touch-icon",
|
|
2707
|
+
sizes: "180x180",
|
|
2708
|
+
href: appleTouchIcon
|
|
2709
|
+
}), children, styles === null || styles === void 0 ? void 0 : styles.map((style => React__default["default"].createElement("link", {
|
|
2710
|
+
rel: "stylesheet",
|
|
2711
|
+
key: "head-style" + style,
|
|
2712
|
+
href: style
|
|
2713
|
+
}))), scripts === null || scripts === void 0 ? void 0 : scripts.map((script => React__default["default"].createElement("script", {
|
|
2714
|
+
key: "head-script" + script,
|
|
2715
|
+
src: script
|
|
2716
|
+
}))));
|
|
2717
|
+
};
|
|
2718
|
+
|
|
2719
|
+
const mapStateToProperties$7 = (state, ownProperties) => ({
|
|
2720
|
+
stateHead: ownProperties.selectors.notifications.getAll(state)
|
|
2721
|
+
});
|
|
2722
|
+
|
|
2723
|
+
const mapDispatchToProperties$7 = dispatch => ({});
|
|
2724
|
+
|
|
2725
|
+
const ConnectedHead = reactRedux.connect(mapStateToProperties$7, mapDispatchToProperties$7)(Head);
|
|
2726
|
+
|
|
2727
|
+
const head = {
|
|
2728
|
+
Head: ConnectedHead
|
|
2729
|
+
};
|
|
2730
|
+
|
|
2581
2731
|
const translateUp = styled.keyframes`
|
|
2582
2732
|
from {
|
|
2583
2733
|
transform: translateY(2000px);
|
|
@@ -2610,7 +2760,7 @@ const StyledNotification = styled__default["default"].div`
|
|
|
2610
2760
|
const StyledNotificationContent = styled__default["default"].div`
|
|
2611
2761
|
font-size: 0.9rem;
|
|
2612
2762
|
padding: 32px 16px;
|
|
2613
|
-
word-break:
|
|
2763
|
+
word-break: ${({wordBreak: wordBreak}) => wordBreak};
|
|
2614
2764
|
`;
|
|
2615
2765
|
|
|
2616
2766
|
const StyledNotificationClose = styled__default["default"].div`
|
|
@@ -2627,14 +2777,13 @@ const StyledNotificationClose = styled__default["default"].div`
|
|
|
2627
2777
|
|
|
2628
2778
|
const Notification = properties => {
|
|
2629
2779
|
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;
|
|
2780
|
+
const {id: id, text: text, html: html, react: react, timeout: timeout, wordBreak: wordBreak} = data;
|
|
2781
|
+
const resolvedWordBreak = wordBreak === false ? "normal" : "break-all";
|
|
2631
2782
|
const notificationTimeout = React.useRef(null);
|
|
2632
2783
|
React.useEffect((() => {
|
|
2633
2784
|
if (timeout) {
|
|
2634
2785
|
notificationTimeout.current = setTimeout((() => {
|
|
2635
|
-
remove(
|
|
2636
|
-
id: id
|
|
2637
|
-
});
|
|
2786
|
+
remove(id);
|
|
2638
2787
|
}), timeout);
|
|
2639
2788
|
}
|
|
2640
2789
|
return () => {
|
|
@@ -2643,17 +2792,27 @@ const Notification = properties => {
|
|
|
2643
2792
|
}
|
|
2644
2793
|
};
|
|
2645
2794
|
}), [ id, timeout, remove ]);
|
|
2646
|
-
const
|
|
2647
|
-
|
|
2648
|
-
|
|
2795
|
+
const resolveRender = () => {
|
|
2796
|
+
const contentProperties = {
|
|
2797
|
+
wordBreak: resolvedWordBreak
|
|
2798
|
+
};
|
|
2799
|
+
if (html) {
|
|
2800
|
+
return React__default["default"].createElement(StyledNotificationContent, Object.assign({
|
|
2801
|
+
dangerouslySetInnerHTML: pluridFunctionsReact.createMarkup(text)
|
|
2802
|
+
}, contentProperties));
|
|
2803
|
+
}
|
|
2804
|
+
if (react && elements && elements[text]) {
|
|
2805
|
+
return React__default["default"].createElement(StyledNotificationContent, Object.assign({}, contentProperties), elements[text]);
|
|
2806
|
+
}
|
|
2807
|
+
return React__default["default"].createElement(StyledNotificationContent, Object.assign({}, contentProperties), text);
|
|
2808
|
+
};
|
|
2809
|
+
const content = resolveRender();
|
|
2649
2810
|
return React__default["default"].createElement(StyledNotification, {
|
|
2650
2811
|
theme: theme,
|
|
2651
2812
|
style: Object.assign({}, style),
|
|
2652
2813
|
className: className
|
|
2653
2814
|
}, content, React__default["default"].createElement(StyledNotificationClose, null, React__default["default"].createElement(pluridIconsReact.PluridIconDelete, {
|
|
2654
|
-
atClick: () => remove(
|
|
2655
|
-
id: id
|
|
2656
|
-
})
|
|
2815
|
+
atClick: () => remove(id)
|
|
2657
2816
|
})));
|
|
2658
2817
|
};
|
|
2659
2818
|
|
|
@@ -2686,7 +2845,7 @@ const mapStateToProperties$6 = (state, ownProperties) => ({
|
|
|
2686
2845
|
});
|
|
2687
2846
|
|
|
2688
2847
|
const mapDispatchToProperties$6 = dispatch => ({
|
|
2689
|
-
dispatchRemoveNotification: payload => dispatch(pluridUiStateReact.notifications.actions.
|
|
2848
|
+
dispatchRemoveNotification: payload => dispatch(pluridUiStateReact.notifications.actions.remove(payload))
|
|
2690
2849
|
});
|
|
2691
2850
|
|
|
2692
2851
|
const ConnectedNotifications = reactRedux.connect(mapStateToProperties$6, mapDispatchToProperties$6)(Notifications);
|
|
@@ -3134,17 +3293,19 @@ const StyledHorizontalToolbarButton = styled__default["default"].div`
|
|
|
3134
3293
|
color: ${props => props.theme.colorPrimary};
|
|
3135
3294
|
font-family: ${props => props.theme.fontFamilySansSerif};
|
|
3136
3295
|
|
|
3137
|
-
:hover {
|
|
3138
|
-
|
|
3139
|
-
|
|
3296
|
+
@media (hover: hover) {
|
|
3297
|
+
:hover {
|
|
3298
|
+
background: ${props => props.theme.backgroundColorTertiary};
|
|
3299
|
+
}
|
|
3140
3300
|
|
|
3141
|
-
|
|
3142
|
-
|
|
3301
|
+
:hover svg {
|
|
3302
|
+
transform: ${props => {
|
|
3143
3303
|
if (props.scaleIcon) {
|
|
3144
3304
|
return "scale(1.2)";
|
|
3145
3305
|
}
|
|
3146
3306
|
return "";
|
|
3147
3307
|
}};
|
|
3308
|
+
}
|
|
3148
3309
|
}
|
|
3149
3310
|
|
|
3150
3311
|
svg {
|
|
@@ -3297,17 +3458,19 @@ const StyledVerticalToolbarButton = styled__default["default"].div`
|
|
|
3297
3458
|
return "transparent";
|
|
3298
3459
|
}};
|
|
3299
3460
|
|
|
3300
|
-
:hover {
|
|
3301
|
-
|
|
3302
|
-
|
|
3461
|
+
@media (hover: hover) {
|
|
3462
|
+
:hover {
|
|
3463
|
+
background: ${props => props.theme.backgroundColorTertiary};
|
|
3464
|
+
}
|
|
3303
3465
|
|
|
3304
|
-
|
|
3305
|
-
|
|
3466
|
+
:hover svg {
|
|
3467
|
+
transform: ${props => {
|
|
3306
3468
|
if (props.scaleIcon) {
|
|
3307
3469
|
return "scale(1.2)";
|
|
3308
3470
|
}
|
|
3309
3471
|
return "";
|
|
3310
3472
|
}};
|
|
3473
|
+
}
|
|
3311
3474
|
}
|
|
3312
3475
|
|
|
3313
3476
|
svg {
|
|
@@ -3552,6 +3715,7 @@ const toolbars = {
|
|
|
3552
3715
|
};
|
|
3553
3716
|
|
|
3554
3717
|
const pluridal = {
|
|
3718
|
+
head: head,
|
|
3555
3719
|
notifications: notifications,
|
|
3556
3720
|
sitting: sitting,
|
|
3557
3721
|
toolbars: toolbars
|