@speakapbv/dough-component-library 9.24.0 → 9.25.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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { ReactNode, Ref, UIEvent } from "react";
|
|
1
|
+
import React, { MouseEventHandler, ReactNode, Ref, UIEvent } from "react";
|
|
2
2
|
import { Colors, Sizes, DoughDataAttributes } from "../../../utils/constants";
|
|
3
3
|
import "./box.scss";
|
|
4
4
|
export declare enum BoxDirection {
|
|
@@ -92,6 +92,7 @@ export interface BoxProps {
|
|
|
92
92
|
bottom?: Sizes;
|
|
93
93
|
left?: Sizes;
|
|
94
94
|
};
|
|
95
|
+
transform?: string;
|
|
95
96
|
overflow?: BoxOverflow | {
|
|
96
97
|
x?: BoxOverflow;
|
|
97
98
|
y?: BoxOverflow;
|
|
@@ -111,5 +112,8 @@ export interface BoxProps {
|
|
|
111
112
|
alignSelf?: BoxAlign | BoxAlignment.FLEX_START | BoxAlignment.FLEX_END | BoxAlignment.CENTER | BoxAlignment.BASELINE | BoxAlignment.STRETCH;
|
|
112
113
|
/** Event properties */
|
|
113
114
|
onScrollReachedBottom?(e?: UIEvent): void;
|
|
115
|
+
onMouseEnter?: MouseEventHandler<HTMLDivElement>;
|
|
116
|
+
onMouseLeave?: MouseEventHandler<HTMLDivElement>;
|
|
117
|
+
onClick?: MouseEventHandler<HTMLDivElement>;
|
|
114
118
|
}
|
|
115
|
-
export declare const Box: React.ForwardRefExoticComponent<Pick<BoxProps, "className" | "children" | "dataAttributes" | "width" | "height" | "minWidth" | "minHeight" | "maxWidth" | "maxHeight" | "absolute" | "zIndex" | "color" | "border" | "borderRadius" | "rounded" | "shadow" | "padding" | "overflow" | "display" | "direction" | "flex" | "basis" | "grow" | "shrink" | "order" | "wrap" | "justifyContent" | "alignItems" | "alignContent" | "alignSelf" | "onScrollReachedBottom"> & React.RefAttributes<HTMLDivElement>>;
|
|
119
|
+
export declare const Box: React.ForwardRefExoticComponent<Pick<BoxProps, "className" | "children" | "dataAttributes" | "width" | "height" | "minWidth" | "minHeight" | "maxWidth" | "maxHeight" | "absolute" | "zIndex" | "color" | "border" | "borderRadius" | "rounded" | "shadow" | "padding" | "transform" | "overflow" | "display" | "direction" | "flex" | "basis" | "grow" | "shrink" | "order" | "wrap" | "justifyContent" | "alignItems" | "alignContent" | "alignSelf" | "onScrollReachedBottom" | "onMouseEnter" | "onMouseLeave" | "onClick"> & React.RefAttributes<HTMLDivElement>>;
|
package/dist/index.es.js
CHANGED
|
@@ -1159,8 +1159,8 @@ var Box = forwardRef(function (props, ref) {
|
|
|
1159
1159
|
_a["dough-flex-align-items-" + props.alignItems] = props.alignItems,
|
|
1160
1160
|
_a["dough-flex-align-content-" + props.alignContent] = props.alignContent,
|
|
1161
1161
|
_a["dough-flex-align-self-" + props.alignSelf] = props.alignSelf,
|
|
1162
|
-
_a)), style: __assign({ width: props.width, height: props.height, minWidth: props.minWidth, minHeight: props.minHeight, maxWidth: props.maxWidth, maxHeight: props.maxHeight, flexBasis: props.basis, flexGrow: props.grow, flexShrink: props.shrink, order: props.order, flex: props.flex, zIndex: props.zIndex }, (isTypeObject(props.absolute) &&
|
|
1163
|
-
props.absolute)) }, props.dataAttributes, { onScroll: props.onScrollReachedBottom ? handleScroll : undefined }), props.children));
|
|
1162
|
+
_a)), style: __assign({ width: props.width, height: props.height, minWidth: props.minWidth, minHeight: props.minHeight, maxWidth: props.maxWidth, maxHeight: props.maxHeight, flexBasis: props.basis, flexGrow: props.grow, flexShrink: props.shrink, order: props.order, flex: props.flex, zIndex: props.zIndex, transform: props.transform }, (isTypeObject(props.absolute) &&
|
|
1163
|
+
props.absolute)) }, props.dataAttributes, { onScroll: props.onScrollReachedBottom ? handleScroll : undefined, onMouseEnter: props.onMouseEnter, onMouseLeave: props.onMouseLeave, onClick: props.onClick }), props.children));
|
|
1164
1164
|
});
|
|
1165
1165
|
Box.displayName = "Box";
|
|
1166
1166
|
|
|
@@ -2249,8 +2249,13 @@ var css_248z$g = "/* COLORS */\n/* Typography*/\n/*Dennis should provide medium
|
|
|
2249
2249
|
styleInject(css_248z$g);
|
|
2250
2250
|
|
|
2251
2251
|
var Divider = function (props) {
|
|
2252
|
-
var _a
|
|
2253
|
-
|
|
2252
|
+
var _a;
|
|
2253
|
+
var _b = props.size, size = _b === void 0 ? Sizes.SMALL : _b, _c = props.type, type = _c === void 0 ? Direction.HORIZONTAL : _c, _d = props.color, color = _d === void 0 ? Colors.GRAY5 : _d;
|
|
2254
|
+
return (React.createElement("div", __assign({ className: cn("dough-divider", props.className, type, "size-" + size), style: {
|
|
2255
|
+
height: props.height,
|
|
2256
|
+
width: props.width,
|
|
2257
|
+
zIndex: (_a = props.zIndex) !== null && _a !== void 0 ? _a : 0,
|
|
2258
|
+
} }, props.dataAttributes),
|
|
2254
2259
|
React.createElement("div", { className: cn("dough-divider-line", color), style: props.lineThickness === undefined
|
|
2255
2260
|
? undefined
|
|
2256
2261
|
: __assign({}, (type === Direction.HORIZONTAL
|
package/dist/index.js
CHANGED
|
@@ -1144,8 +1144,8 @@ var Box = React.forwardRef(function (props, ref) {
|
|
|
1144
1144
|
_a["dough-flex-align-items-" + props.alignItems] = props.alignItems,
|
|
1145
1145
|
_a["dough-flex-align-content-" + props.alignContent] = props.alignContent,
|
|
1146
1146
|
_a["dough-flex-align-self-" + props.alignSelf] = props.alignSelf,
|
|
1147
|
-
_a)), style: __assign({ width: props.width, height: props.height, minWidth: props.minWidth, minHeight: props.minHeight, maxWidth: props.maxWidth, maxHeight: props.maxHeight, flexBasis: props.basis, flexGrow: props.grow, flexShrink: props.shrink, order: props.order, flex: props.flex, zIndex: props.zIndex }, (isTypeObject(props.absolute) &&
|
|
1148
|
-
props.absolute)) }, props.dataAttributes, { onScroll: props.onScrollReachedBottom ? handleScroll : undefined }), props.children));
|
|
1147
|
+
_a)), style: __assign({ width: props.width, height: props.height, minWidth: props.minWidth, minHeight: props.minHeight, maxWidth: props.maxWidth, maxHeight: props.maxHeight, flexBasis: props.basis, flexGrow: props.grow, flexShrink: props.shrink, order: props.order, flex: props.flex, zIndex: props.zIndex, transform: props.transform }, (isTypeObject(props.absolute) &&
|
|
1148
|
+
props.absolute)) }, props.dataAttributes, { onScroll: props.onScrollReachedBottom ? handleScroll : undefined, onMouseEnter: props.onMouseEnter, onMouseLeave: props.onMouseLeave, onClick: props.onClick }), props.children));
|
|
1149
1149
|
});
|
|
1150
1150
|
Box.displayName = "Box";
|
|
1151
1151
|
|
|
@@ -2234,8 +2234,13 @@ var css_248z$g = "/* COLORS */\n/* Typography*/\n/*Dennis should provide medium
|
|
|
2234
2234
|
styleInject(css_248z$g);
|
|
2235
2235
|
|
|
2236
2236
|
var Divider = function (props) {
|
|
2237
|
-
var _a
|
|
2238
|
-
|
|
2237
|
+
var _a;
|
|
2238
|
+
var _b = props.size, size = _b === void 0 ? exports.Sizes.SMALL : _b, _c = props.type, type = _c === void 0 ? exports.Direction.HORIZONTAL : _c, _d = props.color, color = _d === void 0 ? exports.Colors.GRAY5 : _d;
|
|
2239
|
+
return (React__default.createElement("div", __assign({ className: cn("dough-divider", props.className, type, "size-" + size), style: {
|
|
2240
|
+
height: props.height,
|
|
2241
|
+
width: props.width,
|
|
2242
|
+
zIndex: (_a = props.zIndex) !== null && _a !== void 0 ? _a : 0,
|
|
2243
|
+
} }, props.dataAttributes),
|
|
2239
2244
|
React__default.createElement("div", { className: cn("dough-divider-line", color), style: props.lineThickness === undefined
|
|
2240
2245
|
? undefined
|
|
2241
2246
|
: __assign({}, (type === exports.Direction.HORIZONTAL
|