@speakapbv/dough-component-library 9.22.1 → 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
|
|
|
@@ -1264,7 +1264,7 @@ var Card = function (props) {
|
|
|
1264
1264
|
}
|
|
1265
1265
|
return React.createElement(React.Fragment, null);
|
|
1266
1266
|
};
|
|
1267
|
-
return (React.createElement(Box, { display: BoxDisplay.FLEX, width: "100%", height: fullHeight ? "100%" : undefined, direction: BoxDirection.COLUMN, border: border, shadow: shadow, borderRadius: !flat, color: color, overflow: fullHeight ? BoxOverflow.HIDDEN : undefined, className: cn("dough-card-wrapper", props.className, (_a = {},
|
|
1267
|
+
return (React.createElement(Box, { display: BoxDisplay.FLEX, width: "100%", height: fullHeight ? "100%" : undefined, maxHeight: props.maxHeight, direction: BoxDirection.COLUMN, border: border, shadow: shadow, borderRadius: !flat, color: color, overflow: fullHeight ? BoxOverflow.HIDDEN : undefined, className: cn("dough-card-wrapper", props.className, (_a = {},
|
|
1268
1268
|
_a["dough-card-border-style-" + props.borderStyle] = props.borderStyle,
|
|
1269
1269
|
_a)), dataAttributes: props.dataAttributes },
|
|
1270
1270
|
getHeaderItems(props.children),
|
|
@@ -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
|
|
@@ -4047,7 +4052,7 @@ var RadioGroup = function (props) {
|
|
|
4047
4052
|
};
|
|
4048
4053
|
RadioGroup.displayName = "RadioGroup";
|
|
4049
4054
|
|
|
4050
|
-
var css_248z$p = "/* COLORS */\n/* Typography*/\n/*Dennis should provide medium font size*/\n.dough-bread-crumb-ellipsis {\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n font-size: inherit;\n line-height: inherit;\n}\n\n.dough-bread-crumb-wrapper {\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: flex-start;\n width: 100%;\n font-size: 1.125rem;\n line-height: 1.125rem;\n font-weight: 700;\n font-family: \"Roboto\", sans-serif;\n}\n.dough-bread-crumb-wrapper > *:not(.dough-bread-crumb-right-arrow) {\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n font-size: inherit;\n line-height: inherit;\n}\n.dough-bread-crumb-wrapper > *:not(.dough-bread-crumb-right-arrow) > * {\n text-decoration: none !important;\n color: inherit !important;\n font-size: inherit;\n line-height: inherit;\n}\n.dough-bread-crumb-wrapper > *:not(.dough-bread-crumb-right-arrow):last-child {\n pointer-events: none !important;\n}\n.dough-bread-crumb-wrapper > .dough-bread-crumb-right-arrow {\n display: inline-flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n box-sizing: border-box;\n width: 24px;\n height: 24px;\n padding: 3px 4px
|
|
4055
|
+
var css_248z$p = "/* COLORS */\n/* Typography*/\n/*Dennis should provide medium font size*/\n.dough-bread-crumb-ellipsis {\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n font-size: inherit;\n line-height: inherit;\n}\n\n.dough-bread-crumb-wrapper {\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: flex-start;\n width: 100%;\n font-size: 1.125rem;\n line-height: 1.125rem;\n font-weight: 700;\n font-family: \"Roboto\", sans-serif;\n}\n.dough-bread-crumb-wrapper > *:not(.dough-bread-crumb-right-arrow) {\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n font-size: inherit;\n line-height: inherit;\n}\n.dough-bread-crumb-wrapper > *:not(.dough-bread-crumb-right-arrow) > * {\n text-decoration: none !important;\n color: inherit !important;\n font-size: inherit;\n line-height: inherit;\n}\n.dough-bread-crumb-wrapper > *:not(.dough-bread-crumb-right-arrow):last-child {\n pointer-events: none !important;\n}\n.dough-bread-crumb-wrapper > .dough-bread-crumb-right-arrow {\n display: inline-flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n box-sizing: border-box;\n width: 24px;\n height: 24px;\n margin-left: 4px;\n margin-right: 4px;\n padding: 3px 4px 3px 4px;\n}\n.dough-bread-crumb-wrapper > .dough-bread-crumb-right-arrow > svg {\n width: 100%;\n height: 100%;\n}\n.dough-bread-crumb-wrapper > .dough-bread-crumb-right-arrow > svg path {\n fill: #999999;\n fill: var(--dough-color-icon-default);\n}\n.dough-bread-crumb-wrapper.size-small {\n font-size: 0.875rem;\n line-height: 0.875rem;\n}\n.dough-bread-crumb-wrapper.size-small > .dough-bread-crumb-right-arrow {\n width: 20px;\n height: 20px;\n}";
|
|
4051
4056
|
styleInject(css_248z$p);
|
|
4052
4057
|
|
|
4053
4058
|
/* Unpacks children wrapped in Fragments */
|
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
|
|
|
@@ -1249,7 +1249,7 @@ var Card = function (props) {
|
|
|
1249
1249
|
}
|
|
1250
1250
|
return React__default.createElement(React__default.Fragment, null);
|
|
1251
1251
|
};
|
|
1252
|
-
return (React__default.createElement(Box, { display: exports.BoxDisplay.FLEX, width: "100%", height: fullHeight ? "100%" : undefined, direction: exports.BoxDirection.COLUMN, border: border, shadow: shadow, borderRadius: !flat, color: color, overflow: fullHeight ? exports.BoxOverflow.HIDDEN : undefined, className: cn("dough-card-wrapper", props.className, (_a = {},
|
|
1252
|
+
return (React__default.createElement(Box, { display: exports.BoxDisplay.FLEX, width: "100%", height: fullHeight ? "100%" : undefined, maxHeight: props.maxHeight, direction: exports.BoxDirection.COLUMN, border: border, shadow: shadow, borderRadius: !flat, color: color, overflow: fullHeight ? exports.BoxOverflow.HIDDEN : undefined, className: cn("dough-card-wrapper", props.className, (_a = {},
|
|
1253
1253
|
_a["dough-card-border-style-" + props.borderStyle] = props.borderStyle,
|
|
1254
1254
|
_a)), dataAttributes: props.dataAttributes },
|
|
1255
1255
|
getHeaderItems(props.children),
|
|
@@ -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
|
|
@@ -4031,7 +4036,7 @@ var RadioGroup = function (props) {
|
|
|
4031
4036
|
};
|
|
4032
4037
|
RadioGroup.displayName = "RadioGroup";
|
|
4033
4038
|
|
|
4034
|
-
var css_248z$p = "/* COLORS */\n/* Typography*/\n/*Dennis should provide medium font size*/\n.dough-bread-crumb-ellipsis {\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n font-size: inherit;\n line-height: inherit;\n}\n\n.dough-bread-crumb-wrapper {\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: flex-start;\n width: 100%;\n font-size: 1.125rem;\n line-height: 1.125rem;\n font-weight: 700;\n font-family: \"Roboto\", sans-serif;\n}\n.dough-bread-crumb-wrapper > *:not(.dough-bread-crumb-right-arrow) {\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n font-size: inherit;\n line-height: inherit;\n}\n.dough-bread-crumb-wrapper > *:not(.dough-bread-crumb-right-arrow) > * {\n text-decoration: none !important;\n color: inherit !important;\n font-size: inherit;\n line-height: inherit;\n}\n.dough-bread-crumb-wrapper > *:not(.dough-bread-crumb-right-arrow):last-child {\n pointer-events: none !important;\n}\n.dough-bread-crumb-wrapper > .dough-bread-crumb-right-arrow {\n display: inline-flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n box-sizing: border-box;\n width: 24px;\n height: 24px;\n padding: 3px 4px
|
|
4039
|
+
var css_248z$p = "/* COLORS */\n/* Typography*/\n/*Dennis should provide medium font size*/\n.dough-bread-crumb-ellipsis {\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n font-size: inherit;\n line-height: inherit;\n}\n\n.dough-bread-crumb-wrapper {\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: flex-start;\n width: 100%;\n font-size: 1.125rem;\n line-height: 1.125rem;\n font-weight: 700;\n font-family: \"Roboto\", sans-serif;\n}\n.dough-bread-crumb-wrapper > *:not(.dough-bread-crumb-right-arrow) {\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n font-size: inherit;\n line-height: inherit;\n}\n.dough-bread-crumb-wrapper > *:not(.dough-bread-crumb-right-arrow) > * {\n text-decoration: none !important;\n color: inherit !important;\n font-size: inherit;\n line-height: inherit;\n}\n.dough-bread-crumb-wrapper > *:not(.dough-bread-crumb-right-arrow):last-child {\n pointer-events: none !important;\n}\n.dough-bread-crumb-wrapper > .dough-bread-crumb-right-arrow {\n display: inline-flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n box-sizing: border-box;\n width: 24px;\n height: 24px;\n margin-left: 4px;\n margin-right: 4px;\n padding: 3px 4px 3px 4px;\n}\n.dough-bread-crumb-wrapper > .dough-bread-crumb-right-arrow > svg {\n width: 100%;\n height: 100%;\n}\n.dough-bread-crumb-wrapper > .dough-bread-crumb-right-arrow > svg path {\n fill: #999999;\n fill: var(--dough-color-icon-default);\n}\n.dough-bread-crumb-wrapper.size-small {\n font-size: 0.875rem;\n line-height: 0.875rem;\n}\n.dough-bread-crumb-wrapper.size-small > .dough-bread-crumb-right-arrow {\n width: 20px;\n height: 20px;\n}";
|
|
4035
4040
|
styleInject(css_248z$p);
|
|
4036
4041
|
|
|
4037
4042
|
/* Unpacks children wrapped in Fragments */
|