@laser-ui/components 2.0.4 → 2.0.5

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/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
4
4
 
5
+ ## [2.0.5](https://github.com/laser-ui/laser-ui/compare/v2.0.4...v2.0.5) (2025-01-13)
6
+
7
+ ### Features
8
+
9
+ - **components:** add `Dialogs` ([eca6d58](https://github.com/laser-ui/laser-ui/commit/eca6d580b7ea94990f8b80e1672f6eaec601550e))
10
+
5
11
  ## [2.0.4](https://github.com/laser-ui/laser-ui/compare/v2.0.3...v2.0.4) (2025-01-06)
6
12
 
7
13
  ### Bug Fixes
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { useDialogService } from './hooks';
2
- export { Root, DialogService } from './root';
2
+ export { Root, DialogService, Dialogs } from './root';
3
3
  export { ConfigProvider } from './config-provider';
4
4
  export { Accordion } from './accordion';
5
5
  export { Affix } from './affix';
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export { useDialogService } from './hooks';
2
- export { Root, DialogService } from './root';
2
+ export { Root, DialogService, Dialogs } from './root';
3
3
  export { ConfigProvider } from './config-provider';
4
4
  export { Accordion } from './accordion';
5
5
  export { Affix } from './affix';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@laser-ui/components",
3
- "version": "2.0.4",
3
+ "version": "2.0.5",
4
4
  "description": "React components.",
5
5
  "keywords": [
6
6
  "ui",
@@ -37,5 +37,5 @@
37
37
  "access": "public",
38
38
  "directory": "../../dist/libs/components"
39
39
  },
40
- "gitHead": "c1b2e9c6d6a38ae529eb752693fcdf3e299fb0e4"
40
+ "gitHead": "fb803f4dd41dc2ce86f4aa34aefa67255424942e"
41
41
  }
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import type { DialogInstance } from '../dialog-service';
3
+ export declare const Dialogs: import("react").NamedExoticComponent<{
4
+ dialogs: DialogInstance<any>[];
5
+ }>;
@@ -0,0 +1,4 @@
1
+ import { memo } from 'react';
2
+ export const Dialogs = memo(function (props) {
3
+ return props.dialogs.map((dialog) => dialog.node);
4
+ });
package/root/Root.js CHANGED
@@ -1,7 +1,8 @@
1
- import { jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useEvent, useRefExtra } from '@laser-ui/hooks';
3
3
  import { isString, set } from 'lodash';
4
4
  import { useEffect, useMemo } from 'react';
5
+ import { Dialogs } from './Dialogs';
5
6
  import { useDialogs } from './dialog-service';
6
7
  import { ROOT_DATA, RootContext } from './vars';
7
8
  import dayjs from '../dayjs';
@@ -69,5 +70,5 @@ export function Root(props) {
69
70
  default:
70
71
  break;
71
72
  }
72
- return (_jsxs(RootContext, { value: context, children: [children, dialogs.map(({ node }) => node)] }));
73
+ return (_jsxs(RootContext, { value: context, children: [children, _jsx(Dialogs, { dialogs: dialogs })] }));
73
74
  }
package/root/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export type { RootProps } from './types';
2
2
  export { Root } from './Root';
3
3
  export { DialogService } from './dialog-service';
4
+ export { Dialogs } from './Dialogs';
package/root/index.js CHANGED
@@ -1,2 +1,3 @@
1
1
  export { Root } from './Root';
2
2
  export { DialogService } from './dialog-service';
3
+ export { Dialogs } from './Dialogs';