@itera-web/react-ui-conditionalrender 1.21.0 → 1.27.0

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.
@@ -1,21 +1,21 @@
1
- import type { FC } from 'react';
2
- import { ReactNode } from 'react';
3
- export interface IConditionalRenderProps {
4
- conditional?: boolean | string | number | object | any[];
5
- noMatch?: () => ReactNode;
6
- children?: () => ReactNode;
7
- }
8
- export interface IConditionalRenderShowProps {
9
- conditional?: boolean | string | number | object | any[];
10
- children?: () => ReactNode;
11
- className?: string;
12
- }
13
- export interface IConditionalRenderDisplayProps {
14
- conditional?: boolean | string | number | object | any[];
15
- children?: () => ReactNode;
16
- className?: string;
17
- }
18
- export declare const ConditionalRender: FC<IConditionalRenderProps> & {
19
- Show: FC<IConditionalRenderShowProps>;
20
- Display: FC<IConditionalRenderDisplayProps>;
21
- };
1
+ import type { FC } from 'react';
2
+ import { ReactNode } from 'react';
3
+ export interface IConditionalRenderProps {
4
+ conditional?: boolean | string | number | object | any[];
5
+ noMatch?: () => ReactNode;
6
+ children?: () => ReactNode;
7
+ }
8
+ export interface IConditionalRenderShowProps {
9
+ conditional?: boolean | string | number | object | any[];
10
+ children?: () => ReactNode;
11
+ className?: string;
12
+ }
13
+ export interface IConditionalRenderDisplayProps {
14
+ conditional?: boolean | string | number | object | any[];
15
+ children?: () => ReactNode;
16
+ className?: string;
17
+ }
18
+ export declare const ConditionalRender: FC<IConditionalRenderProps> & {
19
+ Show: FC<IConditionalRenderShowProps>;
20
+ Display: FC<IConditionalRenderDisplayProps>;
21
+ };
package/es/index.d.ts CHANGED
@@ -1 +1 @@
1
- export { ConditionalRender, type IConditionalRenderProps, type IConditionalRenderShowProps } from './ConditionalRender';
1
+ export { ConditionalRender, type IConditionalRenderProps, type IConditionalRenderShowProps } from './ConditionalRender';
package/es/index.js CHANGED
@@ -1 +1 @@
1
- import*as n from"react";import*as r from"@itera-web/utils-cn";var e={d:(n,r)=>{for(var t in r)e.o(r,t)&&!e.o(n,t)&&Object.defineProperty(n,t,{enumerable:!0,get:r[t]})},o:(n,r)=>Object.prototype.hasOwnProperty.call(n,r)},t={};e.d(t,{V:()=>a});const o=(n=>{var r={};return e.d(r,n),r})({default:()=>n.default});const i=(n=>{var r={};return e.d(r,n),r})({cn:()=>r.cn});var a=function(n){var r=n.conditional,e=void 0!==r&&r,t=n.noMatch,o=void 0===t?function(){return null}:t,i=n.children;return e?(void 0===i?function(){return null}:i)():o()};a.Show=function(n){var r=n.children,e=void 0===r?function(){return null}:r,t=n.className,a=void 0===t?"":t,c=n.conditional,l=void 0===c||c;return o.default.createElement("div",{className:(0,i.cn)(a,!l&&"invisible")},e())},a.Display=function(n){var r=n.children,e=void 0===r?function(){return null}:r,t=n.className,a=void 0===t?"":t,c=n.conditional,l=void 0===c||c;return o.default.createElement("div",{className:(0,i.cn)(a,!l&&"hidden")},e())};var c=t.V;export{c as ConditionalRender};
1
+ import*as n from"react";import*as e from"@itera-web/utils-cn";var r={d:(n,e)=>{for(var t in e)r.o(e,t)&&!r.o(n,t)&&Object.defineProperty(n,t,{enumerable:!0,get:e[t]})},o:(n,e)=>Object.prototype.hasOwnProperty.call(n,e)},t={};r.d(t,{V:()=>a});const o=(n=>{var e={};return r.d(e,n),e})({default:()=>n.default});const i=(n=>{var e={};return r.d(e,n),e})({cn:()=>e.cn});var a=function(n){var e=n.conditional,r=void 0!==e&&e,t=n.noMatch,o=void 0===t?function(){return null}:t,i=n.children;return r?(void 0===i?function(){return null}:i)():o()};a.Show=function(n){var e=n.children,r=void 0===e?function(){return null}:e,t=n.className,a=void 0===t?"":t,c=n.conditional,l=void 0===c||c;return o.default.createElement("div",{className:(0,i.cn)(a,!l&&"invisible")},r())},a.Display=function(n){var e=n.children,r=void 0===e?function(){return null}:e,t=n.className,a=void 0===t?"":t,c=n.conditional,l=void 0===c||c;return o.default.createElement("div",{className:(0,i.cn)(a,!l&&"hidden")},r())};var c=t.V;export{c as ConditionalRender};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@itera-web/react-ui-conditionalrender",
3
3
  "description": "条件渲染",
4
- "version": "1.21.0",
4
+ "version": "1.27.0",
5
5
  "main": "es/index.js",
6
6
  "types": "es/index.d.ts",
7
7
  "publishConfig": {
@@ -13,14 +13,14 @@
13
13
  "up": "npm publish"
14
14
  },
15
15
  "dependencies": {
16
- "@itera-web/utils-cn": "^1.20.0"
16
+ "@itera-web/utils-cn": "^1.26.0"
17
17
  },
18
18
  "peerDependencies": {
19
19
  "react": ">=17.0.0",
20
20
  "react-dom": ">=17.0.0"
21
21
  },
22
22
  "devDependencies": {
23
- "@itera-web/cli": "^1.1.45"
23
+ "@itera-web/cli": "^1.1.70"
24
24
  },
25
- "gitHead": "691b2592db8668e5d52c9712bb906484b92cb79b"
25
+ "gitHead": "ed385657bd5f002b9339de322c08659ae5ce6fc1"
26
26
  }