@fvc/drawer 1.0.0 → 1.1.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/dist/lib/drawer/src/ChildWrapper.d.ts +1 -1
- package/dist/lib/drawer/src/Drawer.d.ts +8 -7
- package/dist/lib/drawer/src/helpers/createChildWrapper.d.ts +1 -1
- package/dist/lib/drawer/src/helpers/getChildByType.d.ts +1 -1
- package/dist/lib/drawer/src/types/index.d.ts +1 -0
- package/dist/lib/index.js +1 -1
- package/package.json +2 -2
- /package/dist/lib/drawer/src/{Drawer.types.d.ts → types/Drawer.types.d.ts} +0 -0
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { DrawerProps } from './
|
|
2
|
+
import { DrawerProps } from './types';
|
|
3
|
+
import './Drawer.scss';
|
|
3
4
|
export declare const prefixCls = "fvc-drawer";
|
|
4
5
|
export declare const Drawer: {
|
|
5
6
|
({ children, placement, width, height, maskClosable, mask, push, testId, ...props }: DrawerProps): React.JSX.Element;
|
|
6
7
|
Header: {
|
|
7
|
-
(props: import("./
|
|
8
|
-
displayName: import("./
|
|
8
|
+
(props: import("./types").ChildWrapperProps): React.JSX.Element;
|
|
9
|
+
displayName: import("./types").ChildTypes;
|
|
9
10
|
};
|
|
10
11
|
Footer: {
|
|
11
|
-
(props: import("./
|
|
12
|
-
displayName: import("./
|
|
12
|
+
(props: import("./types").ChildWrapperProps): React.JSX.Element;
|
|
13
|
+
displayName: import("./types").ChildTypes;
|
|
13
14
|
};
|
|
14
15
|
Content: {
|
|
15
|
-
(props: import("./
|
|
16
|
-
displayName: import("./
|
|
16
|
+
(props: import("./types").ChildWrapperProps): React.JSX.Element;
|
|
17
|
+
displayName: import("./types").ChildTypes;
|
|
17
18
|
};
|
|
18
19
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ChildTypes, ChildWrapperProps } from '../
|
|
2
|
+
import { ChildTypes, ChildWrapperProps } from '../types';
|
|
3
3
|
export declare const createChildWrapper: (type: ChildTypes) => {
|
|
4
4
|
(props: ChildWrapperProps): React.JSX.Element;
|
|
5
5
|
displayName: ChildTypes;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ChildTypes, ChildWrapperProps } from '../
|
|
2
|
+
import { ChildTypes, ChildWrapperProps } from '../types';
|
|
3
3
|
export declare const getChildByType: (children: React.ReactNode, type: ChildTypes) => React.ReactElement<ChildWrapperProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Drawer.types';
|
package/dist/lib/index.js
CHANGED
|
@@ -3,4 +3,4 @@ import e from"react";import{Drawer as r}from"antd";var t=function(){return t=Obj
|
|
|
3
3
|
Copyright (c) 2018 Jed Watson.
|
|
4
4
|
Licensed under the MIT License (MIT), see
|
|
5
5
|
http://jedwatson.github.io/classnames
|
|
6
|
-
*/var d
|
|
6
|
+
*/var i,d=(o||(o=1,i=a,function(){var e={}.hasOwnProperty;function r(){for(var e="",r=0;r<arguments.length;r++){var o=arguments[r];o&&(e=n(e,t(o)))}return e}function t(t){if("string"==typeof t||"number"==typeof t)return t;if("object"!=typeof t)return"";if(Array.isArray(t))return r.apply(null,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes("[native code]"))return t.toString();var o="";for(var a in t)e.call(t,a)&&t[a]&&(o=n(o,a));return o}function n(e,r){return r?e?e+" "+r:e+r:e}i.exports?(r.default=r,i.exports=r):window.classNames=r}()),a.exports),c=n(d);function l(r){var t=r.children,n=r.testId,o=r.testIdPostfix;return e.createElement("div",{"data-testid":n?"".concat(n,"-").concat(o):void 0},t)}var p=function(r){var n=function(n){return e.createElement(l,t({},n,{testIdPostfix:null==r?void 0:r.toLowerCase()}))};return n.displayName=r,n},s=function(r,t){return e.Children.toArray(r).find((function(r){return!!function(r){return e.isValidElement(r)&&"function"==typeof r.type&&"displayName"in r.type}(r)&&r.type.displayName===t}))};!function(e,r){void 0===r&&(r={});var t=r.insertAt;if("undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===t&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}(".fvc-drawer-content-wrapper > .fvc-drawer-content {\n z-index: 1;\n overflow: auto;\n background-clip: padding-box;\n background: var(--card-bg-color-20);\n border: 0;\n}\n.fvc-drawer-content > .fvc-drawer-footer {\n border-top: none;\n}\n.fvc-drawer-content > .fvc-drawer-body {\n word-wrap: break-word;\n flex-grow: 1;\n padding: 0 16px;\n font-size: 14px;\n line-height: 1.5715;\n overflow: auto;\n}\n.fvc-drawer-placement-right .fvc-drawer-close {\n left: -50px;\n}\n.fvc-drawer-placement-left .fvc-drawer-close {\n right: -40px;\n}\n.fvc-drawer .fvc-drawer-header {\n padding: 16px 32px;\n border-bottom: none;\n}\n.fvc-drawer .fvc-drawer-header-title {\n margin: 0;\n font-size: 16px;\n font-weight: 500;\n line-height: 22px;\n}\n.fvc-drawer .fvc-drawer-close {\n position: absolute;\n display: block;\n top: 0;\n padding: 20px;\n font-weight: 700;\n color: var(--white-icon-color-0);\n background: transparent;\n border: 0;\n outline: 0;\n cursor: pointer;\n}\n.fvc-drawer .fvc-drawer-close svg {\n width: 20px;\n height: 20px;\n}\n.fvc-drawer .fvc-drawer-close:focus, .fvc-drawer .fvc-drawer-close:hover {\n color: var(--white-icon-color-0);\n background: transparent;\n}\n.fvc-drawer-header-no-title .fvc-drawer .fvc-drawer-close {\n margin-right: 5px;\n padding-right: 22px;\n}");var f="fvc-drawer",u=function(n){var o,a=n.children,i=n.placement,d=void 0===i?"right":i,l=n.width,p=void 0===l?256:l,u=n.height,v=void 0===u?256:u,h=n.maskClosable,w=void 0===h||h,y=n.mask,g=void 0===y||y,m=n.push,b=void 0===m?{distance:180}:m,x=n.testId,O=void 0===x?"drawer":x,C=function(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)r.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(t[n[o]]=e[n[o]])}return t}(n,["children","placement","width","height","maskClosable","mask","push","testId"]),k=s(a,"Footer"),S=s(a,"Header"),j=s(a,"Content"),E=c(f,((o={})["".concat(f,"-placement-").concat(d)]=d,o));return e.createElement(r,t({"data-testid":O,prefixCls:f,title:S,footer:k,placement:d,width:p,height:v,maskClosable:w,mask:g,push:b,rootClassName:E,styles:{header:null==S?void 0:S.props.style,footer:null==k?void 0:k.props.style,content:null==j?void 0:j.props.style}},C),j)};u.Header=p("Header"),u.Footer=p("Footer"),u.Content=p("Content");export{u as Drawer};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fvc/drawer",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"main": "./dist/lib/index.js",
|
|
5
5
|
"types": "./dist/lib/drawer/src/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"./types/*": "./dist/lib/drawer/src/types/*"
|
|
17
17
|
},
|
|
18
18
|
"scripts": {
|
|
19
|
-
"build": "rm -rf dist && eslint --config ../../eslint.config.js . && bunx tsc --noEmit && rollup -c ./rollup.config.mjs"
|
|
19
|
+
"build": "rm -rf dist && rm -rf .rollup.cache && eslint --config ../../eslint.config.js . && bunx tsc --noEmit && rollup -c ./rollup.config.mjs"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"react": "^18.0.0",
|
|
File without changes
|