@semcore/flex-box
Advanced tools
Comparing version 4.1.0 to 4.1.1
@@ -5,2 +5,8 @@ # Changelog | ||
## [4.1.1] - 2020-12-03 | ||
### Changed | ||
- Moved `flex` property from Flex to Box. | ||
## [4.1.0] - 2020-11-05 | ||
@@ -7,0 +13,0 @@ |
@@ -38,9 +38,9 @@ "use strict"; | ||
/*__inner_css_start__*/ | ||
"._box-sizing_lear2_gg_{box-sizing:border-box}._box-inline_125bt_gg_{display:inline-block}" | ||
"._box-sizing_n3k3j_gg_{box-sizing:border-box}._box-inline_5f1mm_gg_{display:inline-block}" | ||
/*__inner_css_end__*/ | ||
, "10f0twf_gg_") | ||
, "uvi14q_gg_") | ||
/*__reshadow_css_end__*/ | ||
, { | ||
"box-sizing": "_box-sizing_lear2_gg_", | ||
"box-inline": "_box-inline_125bt_gg_" | ||
"box-sizing": "_box-sizing_n3k3j_gg_", | ||
"box-inline": "_box-inline_5f1mm_gg_" | ||
}), | ||
@@ -106,2 +106,3 @@ style = (0, _extends2["default"])({}, _ref); | ||
right: getSize(props['right']), | ||
flex: props.flex, | ||
margin: getAutoOrScaleIndent(props['m'], scaleIndent), | ||
@@ -133,2 +134,3 @@ marginTop: getAutoOrScaleIndent(props['mt'], scaleIndent) || getAutoOrScaleIndent(props['my'], scaleIndent), | ||
inline = props.inline, | ||
flex = props.flex, | ||
w = props.w, | ||
@@ -156,6 +158,6 @@ h = props.h, | ||
position = props.position, | ||
other = (0, _objectWithoutProperties2["default"])(props, ["tag", "className", "style", "scaleIndent", "boxSizing", "inline", "w", "h", "wMin", "wMax", "hMin", "hMax", "m", "mt", "mb", "my", "ml", "mr", "mx", "p", "pt", "pb", "py", "pl", "pr", "px", "css", "position"]); | ||
other = (0, _objectWithoutProperties2["default"])(props, ["tag", "className", "style", "scaleIndent", "boxSizing", "inline", "flex", "w", "h", "wMin", "wMax", "hMin", "hMax", "m", "mt", "mb", "my", "ml", "mr", "mx", "p", "pt", "pb", "py", "pl", "pr", "px", "css", "position"]); | ||
var indentStyles = (0, _react.useMemo)(function () { | ||
return calculateIndentStyles(props, scaleIndent); | ||
}, [scaleIndent, w, h, wMin, wMax, hMin, hMax, m, mt, mb, my, ml, mr, mx, p, pt, pb, py, pl, pr, px, position]); | ||
}, [scaleIndent, w, h, wMin, wMax, hMin, hMax, flex, m, mt, mb, my, ml, mr, mx, p, pt, pb, py, pl, pr, px, position]); | ||
@@ -162,0 +164,0 @@ var _styled = (0, _core.styled)(((0, _core.set)([styled_c8]), (0, _core.__extract__)())), |
@@ -37,9 +37,9 @@ "use strict"; | ||
/*__inner_css_start__*/ | ||
"._flex_1qh7v_gg_{display:flex}._flex-inline_17xy3_gg_{display:inline-flex}" | ||
"._flex_1paj4_gg_{display:flex}._flex-inline_1kaok_gg_{display:inline-flex}" | ||
/*__inner_css_end__*/ | ||
, "1386mxk_gg_") | ||
, "10fybms_gg_") | ||
/*__reshadow_css_end__*/ | ||
, { | ||
"flex": "_flex_1qh7v_gg_", | ||
"flex-inline": "_flex-inline_17xy3_gg_" | ||
"flex": "_flex_1paj4_gg_", | ||
"flex-inline": "_flex-inline_1kaok_gg_" | ||
}), | ||
@@ -50,3 +50,2 @@ style = (0, _extends2["default"])({}, _ref); | ||
return (0, _useBox3.removeUndefinedKeys)({ | ||
flex: props.flex, | ||
alignItems: props.alignItems, | ||
@@ -79,3 +78,2 @@ alignContent: props.alignContent, | ||
var inline = props.inline, | ||
flex = props.flex, | ||
flexWrap = props.flexWrap, | ||
@@ -89,3 +87,3 @@ direction = props.direction, | ||
return calculateFlexStyles(props); | ||
}, [flex, flexWrap, direction, reverse, alignItems, alignContent, justifyContent]); | ||
}, [flexWrap, direction, reverse, alignItems, alignContent, justifyContent]); | ||
@@ -92,0 +90,0 @@ var _styled = (0, _core.styled)(((0, _core.set)([styled_c8]), (0, _core.__extract__)())), |
@@ -22,9 +22,9 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty"; | ||
/*__inner_css_start__*/ | ||
"._box-sizing_lear2_gg_{box-sizing:border-box}._box-inline_125bt_gg_{display:inline-block}" | ||
"._box-sizing_n3k3j_gg_{box-sizing:border-box}._box-inline_5f1mm_gg_{display:inline-block}" | ||
/*__inner_css_end__*/ | ||
, "10f0twf_gg_") | ||
, "uvi14q_gg_") | ||
/*__reshadow_css_end__*/ | ||
, { | ||
"box-sizing": "_box-sizing_lear2_gg_", | ||
"box-inline": "_box-inline_125bt_gg_" | ||
"box-sizing": "_box-sizing_n3k3j_gg_", | ||
"box-inline": "_box-inline_5f1mm_gg_" | ||
}), | ||
@@ -90,2 +90,3 @@ style = _extends({}, _ref); | ||
right: getSize(props['right']), | ||
flex: props.flex, | ||
margin: getAutoOrScaleIndent(props['m'], scaleIndent), | ||
@@ -116,2 +117,3 @@ marginTop: getAutoOrScaleIndent(props['mt'], scaleIndent) || getAutoOrScaleIndent(props['my'], scaleIndent), | ||
inline = props.inline, | ||
flex = props.flex, | ||
w = props.w, | ||
@@ -139,7 +141,7 @@ h = props.h, | ||
position = props.position, | ||
other = _objectWithoutProperties(props, ["tag", "className", "style", "scaleIndent", "boxSizing", "inline", "w", "h", "wMin", "wMax", "hMin", "hMax", "m", "mt", "mb", "my", "ml", "mr", "mx", "p", "pt", "pb", "py", "pl", "pr", "px", "css", "position"]); | ||
other = _objectWithoutProperties(props, ["tag", "className", "style", "scaleIndent", "boxSizing", "inline", "flex", "w", "h", "wMin", "wMax", "hMin", "hMax", "m", "mt", "mb", "my", "ml", "mr", "mx", "p", "pt", "pb", "py", "pl", "pr", "px", "css", "position"]); | ||
var indentStyles = useMemo(function () { | ||
return calculateIndentStyles(props, scaleIndent); | ||
}, [scaleIndent, w, h, wMin, wMax, hMin, hMax, m, mt, mb, my, ml, mr, mx, p, pt, pb, py, pl, pr, px, position]); | ||
}, [scaleIndent, w, h, wMin, wMax, hMin, hMax, flex, m, mt, mb, my, ml, mr, mx, p, pt, pb, py, pl, pr, px, position]); | ||
@@ -146,0 +148,0 @@ var _styled = styled((set([styled_c8]), __extract__())), |
@@ -21,9 +21,9 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty"; | ||
/*__inner_css_start__*/ | ||
"._flex_1qh7v_gg_{display:flex}._flex-inline_17xy3_gg_{display:inline-flex}" | ||
"._flex_1paj4_gg_{display:flex}._flex-inline_1kaok_gg_{display:inline-flex}" | ||
/*__inner_css_end__*/ | ||
, "1386mxk_gg_") | ||
, "10fybms_gg_") | ||
/*__reshadow_css_end__*/ | ||
, { | ||
"flex": "_flex_1qh7v_gg_", | ||
"flex-inline": "_flex-inline_17xy3_gg_" | ||
"flex": "_flex_1paj4_gg_", | ||
"flex-inline": "_flex-inline_1kaok_gg_" | ||
}), | ||
@@ -34,3 +34,2 @@ style = _extends({}, _ref); | ||
return removeUndefinedKeys({ | ||
flex: props.flex, | ||
alignItems: props.alignItems, | ||
@@ -62,3 +61,2 @@ alignContent: props.alignContent, | ||
var inline = props.inline, | ||
flex = props.flex, | ||
flexWrap = props.flexWrap, | ||
@@ -72,3 +70,3 @@ direction = props.direction, | ||
return calculateFlexStyles(props); | ||
}, [flex, flexWrap, direction, reverse, alignItems, alignContent, justifyContent]); | ||
}, [flexWrap, direction, reverse, alignItems, alignContent, justifyContent]); | ||
@@ -75,0 +73,0 @@ var _styled = styled((set([styled_c8]), __extract__())), |
import React from 'react'; | ||
import { FlexProperty } from 'csstype'; | ||
import { IStyledProps } from '@semcore/core'; | ||
@@ -9,2 +10,4 @@ export declare function removeUndefinedKeys<T extends {}>(obj: T): {}; | ||
boxSizing?: 'content-box' | 'border-box'; | ||
/** CSS `flex` property */ | ||
flex?: FlexProperty<string>; | ||
/** CSS `margin` property */ | ||
@@ -11,0 +14,0 @@ m?: number | string; |
import React from 'react'; | ||
import { AlignContentProperty, AlignItemsProperty, FlexProperty, JustifyContentProperty } from 'csstype'; | ||
import { AlignContentProperty, AlignItemsProperty, JustifyContentProperty } from 'csstype'; | ||
import { IBoxProps } from '../Box/useBox'; | ||
@@ -10,6 +10,2 @@ export interface IFlexProps extends IBoxProps { | ||
/** | ||
* It manages the collective `flex` property | ||
*/ | ||
flex?: FlexProperty<string>; | ||
/** | ||
* Adds the `reverse` property to `flex-direction` | ||
@@ -16,0 +12,0 @@ */ |
{ | ||
"name": "@semcore/flex-box", | ||
"description": "SEMRush FlexBox Component", | ||
"version": "4.1.0", | ||
"version": "4.1.1", | ||
"main": "lib/cjs/index.js", | ||
@@ -6,0 +6,0 @@ "module": "lib/es6/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
88890
1111