@itera-web/react-ui-divider 1.23.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/LICENSE.md +0 -0
- package/README.md +1 -0
- package/es/Divider.d.ts +11 -0
- package/es/index.d.ts +1 -0
- package/es/index.js +1 -0
- package/package.json +26 -0
package/LICENSE.md
ADDED
|
File without changes
|
package/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
### [使用文档](http://iterative.keyboardecho.com/)
|
package/es/Divider.d.ts
ADDED
|
@@ -0,0 +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>>;
|
package/es/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Divider, type DividerProps } from './Divider';
|
package/es/index.js
ADDED
|
@@ -0,0 +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};
|
package/package.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@itera-web/react-ui-divider",
|
|
3
|
+
"description": "分割线",
|
|
4
|
+
"version": "1.23.0",
|
|
5
|
+
"main": "es/index.js",
|
|
6
|
+
"types": "es/index.d.ts",
|
|
7
|
+
"publishConfig": {
|
|
8
|
+
"access": "public"
|
|
9
|
+
},
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"scripts": {
|
|
12
|
+
"build": "itera-cli package",
|
|
13
|
+
"up": "npm publish"
|
|
14
|
+
},
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"@itera-web/utils-cn": "^1.20.0"
|
|
17
|
+
},
|
|
18
|
+
"peerDependencies": {
|
|
19
|
+
"react": ">=17.0.0",
|
|
20
|
+
"react-dom": ">=17.0.0"
|
|
21
|
+
},
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"@itera-web/cli": "^1.1.45"
|
|
24
|
+
},
|
|
25
|
+
"gitHead": "691b2592db8668e5d52c9712bb906484b92cb79b"
|
|
26
|
+
}
|