@plurid/plurid-ui-components-react 0.0.0-16 → 0.0.0-19

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.
@@ -1799,7 +1799,7 @@ const StyledInputSwitch = styled__default["default"].div`
1799
1799
  `;
1800
1800
 
1801
1801
  const InputSwitch = properties => {
1802
- const {name: name, checked: checked, atChange: atChange, theme: themeProperty, compact: compact, style: style, className: className} = properties;
1802
+ const {name: name, checked: checked, atChange: atChange, theme: themeProperty, compact: compact, switch: switchProperties, style: style, className: className} = properties;
1803
1803
  const theme = themeProperty || themes.plurid;
1804
1804
  return React__default["default"].createElement(StyledInputSwitch, {
1805
1805
  compact: compact,
@@ -1809,13 +1809,13 @@ const InputSwitch = properties => {
1809
1809
  style: {
1810
1810
  marginLeft: "0.9rem"
1811
1811
  }
1812
- }, name), React__default["default"].createElement(Switch, {
1812
+ }, name), React__default["default"].createElement(Switch, Object.assign({
1813
1813
  checked: checked,
1814
1814
  level: 2,
1815
1815
  exclusive: true,
1816
1816
  theme: theme,
1817
1817
  atChange: () => atChange()
1818
- })));
1818
+ }, switchProperties))));
1819
1819
  };
1820
1820
 
1821
1821
  const StyledItemsline = styled__default["default"].div`
@@ -2587,7 +2587,7 @@ const universal = {
2587
2587
 
2588
2588
  const Head = properties => {
2589
2589
  var _a, _b, _c, _d;
2590
- const {defaults: defaults, children: children, stateHead: stateHead} = properties;
2590
+ const {Helmet: Helmet, defaults: defaults, children: children, stateHead: stateHead} = properties;
2591
2591
  const robots = (defaults === null || defaults === void 0 ? void 0 : defaults.robots) || "index,follow";
2592
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
2593
  const faviconIcon = (_a = defaults === null || defaults === void 0 ? void 0 : defaults.faviconIcon) !== null && _a !== void 0 ? _a : "/favicon.ico";
@@ -2608,7 +2608,7 @@ const Head = properties => {
2608
2608
  const ogSiteName = (defaults === null || defaults === void 0 ? void 0 : defaults.ogSiteName) || "";
2609
2609
  const appleTouchIcon = (defaults === null || defaults === void 0 ? void 0 : defaults.appleTouchIcon) || "";
2610
2610
  const {styles: styles, scripts: scripts} = stateHead;
2611
- return React__default["default"].createElement(React__default["default"].Fragment, null, React__default["default"].createElement("meta", {
2611
+ return React__default["default"].createElement(Helmet, null, React__default["default"].createElement("meta", {
2612
2612
  charSet: "utf-8"
2613
2613
  }), React__default["default"].createElement("meta", {
2614
2614
  name: "robots",
@@ -2616,9 +2616,6 @@ const Head = properties => {
2616
2616
  }), React__default["default"].createElement("meta", {
2617
2617
  name: "viewport",
2618
2618
  content: viewport
2619
- }), React__default["default"].createElement("meta", {
2620
- name: "description",
2621
- content: descriptionValue
2622
2619
  }), React__default["default"].createElement("title", null, titleValue), React__default["default"].createElement("meta", {
2623
2620
  name: "title",
2624
2621
  content: titleValue
@@ -2717,7 +2714,7 @@ const Head = properties => {
2717
2714
  };
2718
2715
 
2719
2716
  const mapStateToProperties$7 = (state, ownProperties) => ({
2720
- stateHead: ownProperties.selectors.notifications.getAll(state)
2717
+ stateHead: ownProperties.selectors.head.getHead(state)
2721
2718
  });
2722
2719
 
2723
2720
  const mapDispatchToProperties$7 = dispatch => ({});
@@ -2750,6 +2747,7 @@ const StyledNotification = styled__default["default"].div`
2750
2747
  color: ${props => props.theme.colorPrimary};
2751
2748
  box-shadow: ${props => props.theme.boxShadowUmbra};
2752
2749
  animation: ${translateUp} 750ms ease-in-out forwards;
2750
+ transition: opacity 400ms;
2753
2751
 
2754
2752
  a {
2755
2753
  text-decoration: none;
@@ -2778,12 +2776,16 @@ const StyledNotificationClose = styled__default["default"].div`
2778
2776
  const Notification = properties => {
2779
2777
  const {data: data, theme: theme, remove: remove, elements: elements, style: style, className: className} = properties;
2780
2778
  const {id: id, text: text, html: html, react: react, timeout: timeout, wordBreak: wordBreak} = data;
2781
- const resolvedWordBreak = wordBreak === false ? "normal" : "break-all";
2779
+ const resolvedWordBreak = wordBreak === true ? "break-all" : "normal";
2780
+ const [prepareForRemoval, setPrepareForRemoval] = React.useState(false);
2782
2781
  const notificationTimeout = React.useRef(null);
2783
2782
  React.useEffect((() => {
2784
2783
  if (timeout) {
2785
2784
  notificationTimeout.current = setTimeout((() => {
2786
- remove(id);
2785
+ setPrepareForRemoval(true);
2786
+ setTimeout((() => {
2787
+ remove(id);
2788
+ }), 400);
2787
2789
  }), timeout);
2788
2790
  }
2789
2791
  return () => {
@@ -2809,7 +2811,9 @@ const Notification = properties => {
2809
2811
  const content = resolveRender();
2810
2812
  return React__default["default"].createElement(StyledNotification, {
2811
2813
  theme: theme,
2812
- style: Object.assign({}, style),
2814
+ style: Object.assign(Object.assign({}, style), {
2815
+ opacity: prepareForRemoval ? 0 : undefined
2816
+ }),
2813
2817
  className: className
2814
2818
  }, content, React__default["default"].createElement(StyledNotificationClose, null, React__default["default"].createElement(pluridIconsReact.PluridIconDelete, {
2815
2819
  atClick: () => remove(id)