@node-core/ui-components 1.0.1-4d3182b1699ee0824d1632746808071522f65023 → 1.0.1-53352b306fcbcdb527095209221fd17b7fc955b9

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.
@@ -2,14 +2,15 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import * as Toast from '@radix-ui/react-toast';
3
3
  import { createContext, useContext, useEffect, useState } from 'react';
4
4
  import Notification from '#ui/Common/Notification';
5
+ import styles from './index.module.css';
5
6
  const NotificationContext = createContext(null);
6
7
  export const NotificationDispatch = createContext(() => { });
7
8
  export const useNotification = () => useContext(NotificationDispatch);
8
- export const NotificationProvider = ({ viewportClassName, children, }) => {
9
+ export const NotificationProvider = ({ children }) => {
9
10
  const [notification, dispatch] = useState(null);
10
11
  useEffect(() => {
11
12
  const timeout = setTimeout(() => dispatch(null), notification?.duration);
12
13
  return () => clearTimeout(timeout);
13
14
  }, [notification]);
14
- return (_jsx(NotificationContext.Provider, { value: notification, children: _jsx(NotificationDispatch.Provider, { value: dispatch, children: _jsxs(Toast.Provider, { children: [children, _jsx(Toast.Viewport, { className: viewportClassName }), notification && (_jsx(Notification, { duration: notification.duration, children: notification.message }))] }) }) }));
15
+ return (_jsx(NotificationContext.Provider, { value: notification, children: _jsx(NotificationDispatch.Provider, { value: dispatch, children: _jsxs(Toast.Provider, { children: [children, notification && (_jsx(Notification, { duration: notification.duration, children: notification.message })), _jsx(Toast.Viewport, { className: styles.viewport })] }) }) }));
15
16
  };
@@ -0,0 +1,7 @@
1
+ /*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */
2
+ .viewport {
3
+ position: fixed;
4
+ right: calc(var(--spacing, 0.25rem)*0);
5
+ bottom: calc(var(--spacing, 0.25rem)*0);
6
+ list-style-type: none;
7
+ }
package/package.json CHANGED
@@ -23,7 +23,7 @@
23
23
  "engines": {
24
24
  "node": ">=20"
25
25
  },
26
- "version": "1.0.1-4d3182b1699ee0824d1632746808071522f65023",
26
+ "version": "1.0.1-53352b306fcbcdb527095209221fd17b7fc955b9",
27
27
  "scripts": {
28
28
  "compile:ts": "tsc",
29
29
  "compile:css": "postcss --dir dist --base src \"src/**/*.module.css\" src/styles/index.css",