@superdispatch/ui 0.29.5 → 0.31.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.
|
@@ -3,9 +3,9 @@ import { parseAlignProp } from "../props/AlignProps.js";
|
|
|
3
3
|
import { parseCollapsedBelow } from "../props/CollapseProp.js";
|
|
4
4
|
import { parseResponsiveProp } from "../props/ResponsiveProp.js";
|
|
5
5
|
import { parseSpaceProp } from "../props/SpaceProp.js";
|
|
6
|
-
function columnsRootMixin(align, spaceProp, isReversed, isCollapsed) {
|
|
6
|
+
function columnsRootMixin(align, horizontalAlign, spaceProp, isReversed, isCollapsed) {
|
|
7
7
|
var space = parseSpaceProp(spaceProp);
|
|
8
|
-
return css(["--column-space-left:", "px;--column-space-top:", "px;--column-space-bottom:", "px;align-items:", ";margin-left:", "px;width:", ";flex-direction:", ";"], isCollapsed ? 0 : space, isCollapsed && isReversed ? space : 0, isCollapsed && !isReversed ? space : 0, parseAlignProp(align), isCollapsed ? 0 : "-".concat(space), isCollapsed ? '100%' : "calc(100% + ".concat(space, "px)"), isCollapsed ? !isReversed ? 'column' : 'column-reverse' : !isReversed ? 'row' : 'row-reverse');
|
|
8
|
+
return css(["--column-space-left:", "px;--column-space-top:", "px;--column-space-bottom:", "px;align-items:", ";justify-content:", ";margin-left:", "px;width:", ";flex-direction:", ";"], isCollapsed ? 0 : space, isCollapsed && isReversed ? space : 0, isCollapsed && !isReversed ? space : 0, parseAlignProp(align), parseAlignProp(horizontalAlign), isCollapsed ? 0 : "-".concat(space), isCollapsed ? '100%' : "calc(100% + ".concat(space, "px)"), isCollapsed ? !isReversed ? 'column' : 'column-reverse' : !isReversed ? 'row' : 'row-reverse');
|
|
9
9
|
}
|
|
10
10
|
export var Columns = /*#__PURE__*/styled.div.withConfig({
|
|
11
11
|
displayName: "Columns",
|
|
@@ -15,12 +15,14 @@ export var Columns = /*#__PURE__*/styled.div.withConfig({
|
|
|
15
15
|
theme,
|
|
16
16
|
collapseBelow,
|
|
17
17
|
align: alignProp = 'top',
|
|
18
|
+
horizontalAlign: horizontalAlignProp = 'left',
|
|
18
19
|
space: spaceProp = 'none',
|
|
19
20
|
reverse: reverseProp = false
|
|
20
21
|
} = _ref;
|
|
21
22
|
var align = parseResponsiveProp(alignProp);
|
|
23
|
+
var horizontalAlign = parseResponsiveProp(horizontalAlignProp);
|
|
22
24
|
var space = parseResponsiveProp(spaceProp);
|
|
23
25
|
var reverse = parseResponsiveProp(reverseProp);
|
|
24
26
|
var collapsed = parseCollapsedBelow(collapseBelow);
|
|
25
|
-
return css(["width:100%;display:flex;", ";", "{", ";}", "{", ";}"], columnsRootMixin(align[0], space[0], reverse[0], collapsed[0]), theme.breakpoints.up('sm'), columnsRootMixin(align[1], space[1], reverse[1], collapsed[1]), theme.breakpoints.up('md'), columnsRootMixin(align[2], space[2], reverse[2], collapsed[2]));
|
|
27
|
+
return css(["width:100%;display:flex;", ";", "{", ";}", "{", ";}"], columnsRootMixin(align[0], horizontalAlign[0], space[0], reverse[0], collapsed[0]), theme.breakpoints.up('sm'), columnsRootMixin(align[1], horizontalAlign[1], space[1], reverse[1], collapsed[1]), theme.breakpoints.up('md'), columnsRootMixin(align[2], horizontalAlign[2], space[2], reverse[2], collapsed[2]));
|
|
26
28
|
});
|
package/dist-types/index.d.ts
CHANGED
|
@@ -147,6 +147,7 @@ interface ColumnsProps {
|
|
|
147
147
|
reverse?: ResponsiveProp<boolean>;
|
|
148
148
|
space?: ResponsiveProp<SpaceProp>;
|
|
149
149
|
align?: ResponsiveProp<VerticalAlign>;
|
|
150
|
+
horizontalAlign?: ResponsiveProp<HorizontalAlign>;
|
|
150
151
|
collapseBelow?: CollapseProp;
|
|
151
152
|
}
|
|
152
153
|
declare const Columns: ForwardRefExoticComponent<ColumnsProps>;
|
package/dist-web/index.js
CHANGED
|
@@ -1005,9 +1005,9 @@ function parseSpaceProp(prop) {
|
|
|
1005
1005
|
}
|
|
1006
1006
|
}
|
|
1007
1007
|
|
|
1008
|
-
function columnsRootMixin(align, spaceProp, isReversed, isCollapsed) {
|
|
1008
|
+
function columnsRootMixin(align, horizontalAlign, spaceProp, isReversed, isCollapsed) {
|
|
1009
1009
|
var space = parseSpaceProp(spaceProp);
|
|
1010
|
-
return css(["--column-space-left:", "px;--column-space-top:", "px;--column-space-bottom:", "px;align-items:", ";margin-left:", "px;width:", ";flex-direction:", ";"], isCollapsed ? 0 : space, isCollapsed && isReversed ? space : 0, isCollapsed && !isReversed ? space : 0, parseAlignProp(align), isCollapsed ? 0 : "-".concat(space), isCollapsed ? '100%' : "calc(100% + ".concat(space, "px)"), isCollapsed ? !isReversed ? 'column' : 'column-reverse' : !isReversed ? 'row' : 'row-reverse');
|
|
1010
|
+
return css(["--column-space-left:", "px;--column-space-top:", "px;--column-space-bottom:", "px;align-items:", ";justify-content:", ";margin-left:", "px;width:", ";flex-direction:", ";"], isCollapsed ? 0 : space, isCollapsed && isReversed ? space : 0, isCollapsed && !isReversed ? space : 0, parseAlignProp(align), parseAlignProp(horizontalAlign), isCollapsed ? 0 : "-".concat(space), isCollapsed ? '100%' : "calc(100% + ".concat(space, "px)"), isCollapsed ? !isReversed ? 'column' : 'column-reverse' : !isReversed ? 'row' : 'row-reverse');
|
|
1011
1011
|
}
|
|
1012
1012
|
var Columns = /*#__PURE__*/styled.div.withConfig({
|
|
1013
1013
|
displayName: "Columns",
|
|
@@ -1017,14 +1017,16 @@ var Columns = /*#__PURE__*/styled.div.withConfig({
|
|
|
1017
1017
|
theme,
|
|
1018
1018
|
collapseBelow,
|
|
1019
1019
|
align: alignProp = 'top',
|
|
1020
|
+
horizontalAlign: horizontalAlignProp = 'left',
|
|
1020
1021
|
space: spaceProp = 'none',
|
|
1021
1022
|
reverse: reverseProp = false
|
|
1022
1023
|
} = _ref;
|
|
1023
1024
|
var align = parseResponsiveProp(alignProp);
|
|
1025
|
+
var horizontalAlign = parseResponsiveProp(horizontalAlignProp);
|
|
1024
1026
|
var space = parseResponsiveProp(spaceProp);
|
|
1025
1027
|
var reverse = parseResponsiveProp(reverseProp);
|
|
1026
1028
|
var collapsed = parseCollapsedBelow(collapseBelow);
|
|
1027
|
-
return css(["width:100%;display:flex;", ";", "{", ";}", "{", ";}"], columnsRootMixin(align[0], space[0], reverse[0], collapsed[0]), theme.breakpoints.up('sm'), columnsRootMixin(align[1], space[1], reverse[1], collapsed[1]), theme.breakpoints.up('md'), columnsRootMixin(align[2], space[2], reverse[2], collapsed[2]));
|
|
1029
|
+
return css(["width:100%;display:flex;", ";", "{", ";}", "{", ";}"], columnsRootMixin(align[0], horizontalAlign[0], space[0], reverse[0], collapsed[0]), theme.breakpoints.up('sm'), columnsRootMixin(align[1], horizontalAlign[1], space[1], reverse[1], collapsed[1]), theme.breakpoints.up('md'), columnsRootMixin(align[2], horizontalAlign[2], space[2], reverse[2], collapsed[2]));
|
|
1028
1030
|
});
|
|
1029
1031
|
|
|
1030
1032
|
function renderChildren(node) {
|