@fvc/box 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/box/src/Box.d.ts +1 -0
- package/dist/lib/index.js +2 -2
- package/package.json +5 -3
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BoxProps } from './types';
|
|
3
|
+
import './Box.scss';
|
|
3
4
|
export declare const prefixCls = "fvc-box";
|
|
4
5
|
export declare const Box: {
|
|
5
6
|
({ children, className, display, style, justify, wrap, align, direction, rowGap, height, block, testId, }: BoxProps): React.JSX.Element;
|
package/dist/lib/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from"react";import{Col as n,Row as t}from"antd";var o=function(){return o=Object.assign||function(e){for(var n,t=1,o=arguments.length;t<o;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},o.apply(this,arguments)};function r(e,n){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.indexOf(o)<0&&(t[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)n.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(t[o[r]]=e[o[r]])}return t}function c(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}"function"==typeof SuppressedError&&SuppressedError;var a,i={exports:{}};
|
|
2
2
|
/*!
|
|
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
|
|
6
|
+
*/var f,l=(a||(a=1,f=i,function(){var e={}.hasOwnProperty;function n(){for(var e="",n=0;n<arguments.length;n++){var r=arguments[n];r&&(e=o(e,t(r)))}return e}function t(t){if("string"==typeof t||"number"==typeof t)return t;if("object"!=typeof t)return"";if(Array.isArray(t))return n.apply(null,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes("[native code]"))return t.toString();var r="";for(var c in t)e.call(t,c)&&t[c]&&(r=o(r,c));return r}function o(e,n){return n?e?e+" "+n:e+n:e}f.exports?(n.default=n,f.exports=n):window.classNames=n}()),i.exports),s=c(l),p="fvc-col";!function(e,n){void 0===n&&(n={});var t=n.insertAt;if("undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===t&&o.firstChild?o.insertBefore(r,o.firstChild):o.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}(".fvc-box-row {\n display: flex;\n flex-flow: row wrap;\n}\n.fvc-box-row::before, .fvc-box-row::after {\n display: flex;\n}\n.fvc-box-row-no-wrap {\n flex-wrap: nowrap;\n}\n\n.fvc-box-flex {\n display: flex;\n}\n.fvc-box-inline-flex {\n display: inline-flex;\n}\n.fvc-box-row {\n flex-direction: row;\n}\n.fvc-box-column {\n flex-direction: column;\n}\n.fvc-box-column-reverse {\n flex-direction: column-reverse;\n}\n.fvc-box-row-reverse {\n flex-direction: row-reverse;\n}\n.fvc-box-block {\n width: 100%;\n}\n.fvc-box-row-start {\n justify-content: flex-start;\n}\n.fvc-box-row-center {\n justify-content: center;\n}\n.fvc-box-row-end {\n justify-content: flex-end;\n}\n.fvc-box-row-space-between {\n justify-content: space-between;\n}\n.fvc-box-row-space-around {\n justify-content: space-around;\n}\n.fvc-box-row-top {\n align-items: flex-start;\n}\n.fvc-box-row-middle {\n align-items: center;\n}\n.fvc-box-row-bottom {\n align-items: flex-end;\n}\n.fvc-box-col {\n position: relative;\n max-width: 100%;\n min-height: 1px;\n}");var d="fvc-box",u=function(n){var t,r=n.children,c=n.className,a=n.display,i=n.style,f=n.justify,l=n.wrap,p=n.align,u=n.direction,v=n.rowGap,x=n.height,w=n.block,y=n.testId,b=s(d,((t={})["".concat(d,"-row-").concat(f)]=f,t["".concat(d,"-row-").concat(p)]=p,t["".concat(d,"-").concat(u)]=u,t["".concat(d,"-").concat(a)]=a,t["".concat(d,"-block")]=w,t["".concat(d,"-row-no-wrap")]=!1===l,t),c),m={};return v&&(m.rowGap="".concat(v,"rem")),x&&(m.minHeight=x),e.createElement("div",{"data-testid":y,className:b,style:o(o({},m),i)},r)};u.Row=function(n){var c=n.testId,a=r(n,["testId"]);return e.createElement(t,o({prefixCls:"fvc-row","data-testid":c},a))},u.Column=function(t){var c,a=t.testId,i=t.col,f=r(t,["testId","col"]),l=s(p,((c={})["".concat(p,"-").concat(i)]=void 0!==i,c),f.className);return e.createElement(n,o({prefixCls:p,"data-testid":a},f,{className:l}))};export{u as Box};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fvc/box",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"main": "./dist/lib/index.js",
|
|
5
5
|
"types": "./dist/lib/box/src/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -13,10 +13,12 @@
|
|
|
13
13
|
"import": "./dist/lib/index.js",
|
|
14
14
|
"types": "./dist/lib/box/src/index.d.ts"
|
|
15
15
|
},
|
|
16
|
-
"./types
|
|
16
|
+
"./types": {
|
|
17
|
+
"types": "./dist/lib/box/src/types/index.d.ts"
|
|
18
|
+
}
|
|
17
19
|
},
|
|
18
20
|
"scripts": {
|
|
19
|
-
"build": "rm -rf dist && eslint --config ../../eslint.config.js . && bunx tsc --noEmit && rollup -c ./rollup.config.mjs"
|
|
21
|
+
"build": "rm -rf dist && rm -rf .rollup.cache && eslint --config ../../eslint.config.js . && bunx tsc --noEmit && rollup -c ./rollup.config.mjs"
|
|
20
22
|
},
|
|
21
23
|
"dependencies": {
|
|
22
24
|
"react": "^18.0.0",
|