@itera-web/react-ui-divider 1.23.0 → 1.28.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.
package/es/Divider.d.ts CHANGED
@@ -1,11 +1,11 @@
1
- import * as React from 'react';
2
- export interface DividerProps extends React.HTMLAttributes<HTMLDivElement> {
3
- type?: 'horizontal' | 'vertical';
4
- orientation?: 'left' | 'center' | 'right';
5
- children?: React.ReactNode;
6
- size?: number | 'sm' | 'md' | 'lg';
7
- dashed?: boolean;
8
- color?: string;
9
- offset?: number | string;
10
- }
11
- export declare const Divider: React.ForwardRefExoticComponent<DividerProps & React.RefAttributes<HTMLDivElement>>;
1
+ import * as React from 'react';
2
+ export interface DividerProps extends React.HTMLAttributes<HTMLDivElement> {
3
+ type?: 'horizontal' | 'vertical';
4
+ orientation?: 'left' | 'center' | 'right';
5
+ children?: React.ReactNode;
6
+ size?: number | 'sm' | 'md' | 'lg';
7
+ dashed?: boolean;
8
+ color?: string;
9
+ offset?: number | string;
10
+ }
11
+ export declare const Divider: React.ForwardRefExoticComponent<DividerProps & React.RefAttributes<HTMLDivElement>>;
package/es/index.d.ts CHANGED
@@ -1 +1 @@
1
- export { Divider, type DividerProps } from './Divider';
1
+ export { Divider, type DividerProps } from './Divider';
package/es/index.js CHANGED
@@ -1 +1 @@
1
- import*as e from"react";import*as r from"@itera-web/utils-cn";var o={d:(e,r)=>{for(var t in r)o.o(r,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},o:(e,r)=>Object.prototype.hasOwnProperty.call(e,r)},t={};o.d(t,{i:()=>c});const a=(e=>{var r={};return o.d(r,e),r})({createElement:()=>e.createElement,forwardRef:()=>e.forwardRef});const n=(e=>{var r={};return o.d(r,e),r})({cn:()=>r.cn});var l=function(){return l=Object.assign||function(e){for(var r,o=1,t=arguments.length;o<t;o++)for(var a in r=arguments[o])Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a]);return e},l.apply(this,arguments)},d=function(e,r){var o={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&r.indexOf(t)<0&&(o[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(t=Object.getOwnPropertySymbols(e);a<t.length;a++)r.indexOf(t[a])<0&&Object.prototype.propertyIsEnumerable.call(e,t[a])&&(o[t[a]]=e[t[a]])}return o},c=a.forwardRef(function(e,r){var o,t=e.type,c=void 0===t?"horizontal":t,i=e.orientation,s=void 0===i?"center":i,f=e.className,m=e.children,b=e.size,p=void 0===b?"md":b,v=e.dashed,y=void 0!==v&&v,u=e.color,h=e.offset,g=void 0===h?50:h,x=d(e,["type","orientation","className","children","size","dashed","color","offset"]),O={sm:{horizontal:"my-2",vertical:"mx-2"},md:{horizontal:"my-4",vertical:"mx-4"},lg:{horizontal:"my-6",vertical:"mx-6"}},w="number"==typeof p?"".concat(p,"px"):(null===(o=O[p])||void 0===o?void 0:o[c])||O.md[c],j=null!=g?"number"==typeof g?"".concat(g,"px"):g:void 0;if("vertical"===c)return a.createElement("div",l({className:(0,n.cn)("w-px h-full",y?"border-l border-dashed border-border":"bg-border",f),ref:r,style:{marginLeft:w,marginRight:w,borderColor:y?u:void 0,backgroundColor:y?void 0:u}},x));var E=1,N=1;return"left"===s?(E=j?"0 0 ".concat(j):0,N=1):"right"===s&&(E=1,N=j?"0 0 ".concat(j):0),a.createElement("div",l({className:(0,n.cn)("flex items-center w-full text-font text-sm ".concat(w),f),ref:r},x),a.createElement("div",{className:(0,n.cn)("h-px",y?"border-t border-dashed border-border":"bg-border"),style:{flex:E,borderColor:y?u:void 0,backgroundColor:y?void 0:u}}),m&&a.createElement("span",{className:"px-3 whitespace-nowrap"},m),a.createElement("div",{className:(0,n.cn)("h-px",y?"border-t border-dashed border-border":"bg-border"),style:{flex:N,borderColor:y?u:void 0,backgroundColor:y?void 0:u}}))});c.displayName="Divider";var i=t.i;export{i as Divider};
1
+ import*as e from"react";import*as r from"@itera-web/utils-cn";var o={d:(e,r)=>{for(var t in r)o.o(r,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},o:(e,r)=>Object.prototype.hasOwnProperty.call(e,r)},t={};o.d(t,{i:()=>i});const a=(e=>{var r={};return o.d(r,e),r})({createElement:()=>e.createElement,forwardRef:()=>e.forwardRef});const n=(e=>{var r={};return o.d(r,e),r})({cn:()=>r.cn});var l=function(){return l=Object.assign||function(e){for(var r,o=1,t=arguments.length;o<t;o++)for(var a in r=arguments[o])Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a]);return e},l.apply(this,arguments)},d=function(e,r){var o={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&r.indexOf(t)<0&&(o[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(t=Object.getOwnPropertySymbols(e);a<t.length;a++)r.indexOf(t[a])<0&&Object.prototype.propertyIsEnumerable.call(e,t[a])&&(o[t[a]]=e[t[a]])}return o},i=a.forwardRef(function(e,r){var o,t=e.type,i=void 0===t?"horizontal":t,c=e.orientation,s=void 0===c?"center":c,f=e.className,b=e.children,m=e.size,v=void 0===m?"md":m,p=e.dashed,y=void 0!==p&&p,u=e.color,h=e.offset,g=void 0===h?50:h,x=d(e,["type","orientation","className","children","size","dashed","color","offset"]),O={sm:{horizontal:"my-2",vertical:"mx-2"},md:{horizontal:"my-4",vertical:"mx-4"},lg:{horizontal:"my-6",vertical:"mx-6"}},w="number"==typeof v?"".concat(v,"px"):(null===(o=O[v])||void 0===o?void 0:o[i])||O.md[i],j=null!=g?"number"==typeof g?"".concat(g,"px"):g:void 0;if("vertical"===i)return a.createElement("div",l({className:(0,n.cn)("w-px h-full",y?"border-l border-dashed border-border":"bg-border",f),ref:r,style:{marginLeft:w,marginRight:w,borderColor:y?u:void 0,backgroundColor:y?void 0:u}},x));var E=1,N=1;return"left"===s?(E=j?"0 0 ".concat(j):0,N=1):"right"===s&&(E=1,N=j?"0 0 ".concat(j):0),a.createElement("div",l({className:(0,n.cn)("flex items-center w-full text-font text-sm ".concat(w),f),ref:r},x),a.createElement("div",{className:(0,n.cn)("h-px",y?"border-t border-dashed border-border":"bg-border"),style:{flex:E,borderColor:y?u:void 0,backgroundColor:y?void 0:u}}),b&&a.createElement("span",{className:"px-3 whitespace-nowrap"},b),a.createElement("div",{className:(0,n.cn)("h-px",y?"border-t border-dashed border-border":"bg-border"),style:{flex:N,borderColor:y?u:void 0,backgroundColor:y?void 0:u}}))});i.displayName="Divider";var c=t.i;export{c as Divider};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@itera-web/react-ui-divider",
3
3
  "description": "分割线",
4
- "version": "1.23.0",
4
+ "version": "1.28.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
  }