@speakapbv/dough-component-library 9.32.0 → 9.33.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/components/containers/card/card.d.ts +1 -0
- package/dist/components/overlay/overlay.d.ts +13 -5
- package/dist/index.d.ts +2 -1
- package/dist/index.es.js +23 -10
- package/dist/index.js +22 -9
- package/dist/src/components/overlay/overlay.stories.d.ts +3 -0
- package/dist/src/utils/validation.d.ts +1 -1
- package/dist/{src/utils → utils}/styles.d.ts +0 -0
- package/package.json +1 -1
|
@@ -1,12 +1,20 @@
|
|
|
1
|
+
import { CSSProperties } from "react";
|
|
1
2
|
import { Colors, DoughDataAttributes } from "../../utils/constants";
|
|
2
3
|
import "./overlay.scss";
|
|
4
|
+
export declare enum OverlayVariant {
|
|
5
|
+
DARK = "dark",
|
|
6
|
+
STANDARD = "standard"
|
|
7
|
+
}
|
|
3
8
|
export interface OverlayProps {
|
|
4
9
|
className?: string;
|
|
5
10
|
dataAttributes?: DoughDataAttributes;
|
|
6
|
-
color?: Colors;
|
|
11
|
+
color?: Colors | string;
|
|
7
12
|
opacity?: number;
|
|
13
|
+
position?: CSSProperties["position"];
|
|
14
|
+
zIndex?: number;
|
|
15
|
+
variant?: OverlayVariant;
|
|
16
|
+
}
|
|
17
|
+
export declare function Overlay({ position, zIndex, opacity, dataAttributes, className, variant, }: OverlayProps): JSX.Element;
|
|
18
|
+
export declare namespace Overlay {
|
|
19
|
+
var displayName: string;
|
|
8
20
|
}
|
|
9
|
-
export declare const Overlay: {
|
|
10
|
-
(props: OverlayProps): JSX.Element;
|
|
11
|
-
displayName: string;
|
|
12
|
-
};
|
package/dist/index.d.ts
CHANGED
|
@@ -46,7 +46,7 @@ export { ColorTile, ColorTileRef } from "./components/color-tile/color-tile";
|
|
|
46
46
|
export { StepsIndicator } from "./components/steps-indicator/steps-indicator";
|
|
47
47
|
export { Avatar } from "./components/avatar/avatar";
|
|
48
48
|
export { Fader } from "./components/fader/fader";
|
|
49
|
-
export { Overlay } from "./components/overlay/overlay";
|
|
49
|
+
export { OverlayVariant, Overlay } from "./components/overlay/overlay";
|
|
50
50
|
export { HorizontalListSlider } from "./components/horizontal-list-slider/horizontal-list-slider";
|
|
51
51
|
export { Carousel } from "./components/carousel/carousel";
|
|
52
52
|
export { ContentSlider } from "./components/content-slider/content-slider";
|
|
@@ -62,6 +62,7 @@ export { GridItem } from "./components/containers/grid/grid-item";
|
|
|
62
62
|
export { cancelEvent } from "./utils/event";
|
|
63
63
|
export { findParentBySelector, setBreakpointSizeManually, } from "./utils/dom-management";
|
|
64
64
|
export { default as cn } from "./utils/class-names";
|
|
65
|
+
export { isStandardColor } from "./utils/styles";
|
|
65
66
|
export { generateUID } from "./utils/guid";
|
|
66
67
|
export { hideLastDoughTooltip } from "./utils/dom-management";
|
|
67
68
|
export { BreakpointViewer, BreakpointViewerProps, } from "./components/breakpoint-viewer/breakpoint-viewer";
|
package/dist/index.es.js
CHANGED
|
@@ -1053,7 +1053,9 @@ var validateInput = function (props, value) {
|
|
|
1053
1053
|
};
|
|
1054
1054
|
}
|
|
1055
1055
|
};
|
|
1056
|
-
var isTypeObject = function (value) {
|
|
1056
|
+
var isTypeObject = function (value) {
|
|
1057
|
+
return value !== null && typeof value === "object";
|
|
1058
|
+
};
|
|
1057
1059
|
|
|
1058
1060
|
var BoxDirection;
|
|
1059
1061
|
(function (BoxDirection) {
|
|
@@ -1125,8 +1127,7 @@ var Box = forwardRef(function (props, ref) {
|
|
|
1125
1127
|
var _a;
|
|
1126
1128
|
var _b, _c, _d, _e, _f, _g;
|
|
1127
1129
|
var handleScroll = function (e) {
|
|
1128
|
-
if (e.currentTarget.offsetHeight + e.currentTarget.scrollTop >=
|
|
1129
|
-
e.currentTarget.scrollHeight) {
|
|
1130
|
+
if (Math.round(e.currentTarget.offsetHeight + e.currentTarget.scrollTop) >= e.currentTarget.scrollHeight) {
|
|
1130
1131
|
if (props.onScrollReachedBottom) {
|
|
1131
1132
|
props.onScrollReachedBottom(e);
|
|
1132
1133
|
}
|
|
@@ -1170,7 +1171,7 @@ Box.displayName = "Box";
|
|
|
1170
1171
|
|
|
1171
1172
|
var Card = function (props) {
|
|
1172
1173
|
var _a;
|
|
1173
|
-
var _b = props.border, border = _b === void 0 ? false : _b, _c = props.flat, flat = _c === void 0 ? false : _c, _d = props.color, color = _d === void 0 ? Colors.THEME : _d, _e = props.fullHeight, fullHeight = _e === void 0 ? false : _e, _f = props.shadow, shadow = _f === void 0 ? true : _f, _g = props.headerButtons, headerButtons = _g === void 0 ? [] : _g;
|
|
1174
|
+
var _b = props.border, border = _b === void 0 ? false : _b, _c = props.flat, flat = _c === void 0 ? false : _c, _d = props.color, color = _d === void 0 ? Colors.THEME : _d, _e = props.fullHeight, fullHeight = _e === void 0 ? false : _e, _f = props.shadow, shadow = _f === void 0 ? true : _f, _g = props.headerButtons, headerButtons = _g === void 0 ? [] : _g, zIndex = props.zIndex;
|
|
1174
1175
|
var getHeaderItems = function (givenChildren) {
|
|
1175
1176
|
var childrenToCheck = Children.toArray(givenChildren);
|
|
1176
1177
|
var headerItems = childrenToCheck.filter(function (child) {
|
|
@@ -1270,7 +1271,7 @@ var Card = function (props) {
|
|
|
1270
1271
|
};
|
|
1271
1272
|
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 = {},
|
|
1272
1273
|
_a["dough-card-border-style-" + props.borderStyle] = props.borderStyle,
|
|
1273
|
-
_a)), dataAttributes: props.dataAttributes },
|
|
1274
|
+
_a)), dataAttributes: props.dataAttributes, zIndex: zIndex },
|
|
1274
1275
|
getHeaderItems(props.children),
|
|
1275
1276
|
getContentItems(props.children),
|
|
1276
1277
|
getFooterItems(props.children)));
|
|
@@ -5068,12 +5069,24 @@ var Fader = function (props) { return (React.createElement("span", __assign({ cl
|
|
|
5068
5069
|
: Colors.THEME, "dough-fader-side dough-fader-left") }))); };
|
|
5069
5070
|
Fader.displayName = "Fader";
|
|
5070
5071
|
|
|
5071
|
-
var css_248z$G = "/* COLORS */\n/* Typography*/\n/*Dennis should provide medium font size*/\n.dough-overlay {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n width: auto;\n height: auto;\n position: absolute !important;\n pointer-events: none;\n}\
|
|
5072
|
+
var css_248z$G = "/* COLORS */\n/* Typography*/\n/*Dennis should provide medium font size*/\n.dough-overlay {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n width: auto;\n height: auto;\n position: absolute !important;\n pointer-events: none;\n background: rgba(0, 0, 0, 0.4);\n}\n.dough-overlay.dark {\n background: rgba(0, 0, 0, 0.8);\n}";
|
|
5072
5073
|
styleInject(css_248z$G);
|
|
5073
5074
|
|
|
5074
|
-
var
|
|
5075
|
-
|
|
5076
|
-
|
|
5075
|
+
var OverlayVariant;
|
|
5076
|
+
(function (OverlayVariant) {
|
|
5077
|
+
OverlayVariant["DARK"] = "dark";
|
|
5078
|
+
OverlayVariant["STANDARD"] = "standard";
|
|
5079
|
+
})(OverlayVariant || (OverlayVariant = {}));
|
|
5080
|
+
function Overlay(_a) {
|
|
5081
|
+
var position = _a.position, zIndex = _a.zIndex, opacity = _a.opacity, dataAttributes = _a.dataAttributes, className = _a.className, _b = _a.variant, variant = _b === void 0 ? OverlayVariant.STANDARD : _b;
|
|
5082
|
+
return (React.createElement("span", __assign({ className: cn(className, "dough-overlay", {
|
|
5083
|
+
dark: variant === OverlayVariant.DARK,
|
|
5084
|
+
}) }, dataAttributes, { style: {
|
|
5085
|
+
opacity: opacity,
|
|
5086
|
+
zIndex: zIndex,
|
|
5087
|
+
position: position,
|
|
5088
|
+
} })));
|
|
5089
|
+
}
|
|
5077
5090
|
Overlay.displayName = "Overlay";
|
|
5078
5091
|
|
|
5079
5092
|
var IconArrowLeft = {
|
|
@@ -5626,4 +5639,4 @@ GridItem.displayName = "GridItem";
|
|
|
5626
5639
|
|
|
5627
5640
|
injectRobotoFont();
|
|
5628
5641
|
|
|
5629
|
-
export { AlertStatus, AlertText, AppBackground, AppWrapper, Avatar, BR, Badge, BorderStyles, Box, BoxAlign, BoxAlignContent, BoxAlignment, BoxDirection, BoxDisplay, BoxJustifyContent, BoxOverflow, BoxWrap, BreadCrumb, BreadCrumbText, BreakpointViewer, BreakpointViewportSizes, Button, ButtonInputType, Card, Carousel, CheckBox, Collapser, ColorTile, Colors, ColorsIcon, ColorsText, Container, ContentSlider, DatePicker, DateTime, DesignTokens, Dialog, Direction, Divider, DoughDateInput, DoughListItem, DropMenu, Fader, FixedColors, Footer, Grid, GridContentAlignment, GridFlow, GridItem, GridItemsAlignment, H1, H2, H3, H4, H5, H6, H7, Header, HorizontalAlignment, HorizontalListSlider, Image, ImageCarousel, ImageContentShowOnHoverClassName, InputWrapper, LayoutContainer, LayoutFlexBox, Link, Notification, NumericInput, Overlay, PanelOverlay, Paragraph, ProgressBar, RadioGroup, RadioOption, SelectBox, Sizes, Skeleton, SkeletonShape, Spacer, Spacings, Spinner, StepsIndicator, StrengthIndicator, Subtitle, Switch, Table, TableCell, TableRow, TableRowStyle, TabsContainer, Tag, Text, TextAlignment, TextArea, TextInput, TimePicker, Toggle, ToggleWithText, Tooltip, TooltipDirection, UnorderedList, VerticalAlignment, cancelEvent, checkComponentType, cn, findParentBySelector, generateUID, hideLastDoughTooltip, setBreakpointSizeManually };
|
|
5642
|
+
export { AlertStatus, AlertText, AppBackground, AppWrapper, Avatar, BR, Badge, BorderStyles, Box, BoxAlign, BoxAlignContent, BoxAlignment, BoxDirection, BoxDisplay, BoxJustifyContent, BoxOverflow, BoxWrap, BreadCrumb, BreadCrumbText, BreakpointViewer, BreakpointViewportSizes, Button, ButtonInputType, Card, Carousel, CheckBox, Collapser, ColorTile, Colors, ColorsIcon, ColorsText, Container, ContentSlider, DatePicker, DateTime, DesignTokens, Dialog, Direction, Divider, DoughDateInput, DoughListItem, DropMenu, Fader, FixedColors, Footer, Grid, GridContentAlignment, GridFlow, GridItem, GridItemsAlignment, H1, H2, H3, H4, H5, H6, H7, Header, HorizontalAlignment, HorizontalListSlider, Image, ImageCarousel, ImageContentShowOnHoverClassName, InputWrapper, LayoutContainer, LayoutFlexBox, Link, Notification, NumericInput, Overlay, OverlayVariant, PanelOverlay, Paragraph, ProgressBar, RadioGroup, RadioOption, SelectBox, Sizes, Skeleton, SkeletonShape, Spacer, Spacings, Spinner, StepsIndicator, StrengthIndicator, Subtitle, Switch, Table, TableCell, TableRow, TableRowStyle, TabsContainer, Tag, Text, TextAlignment, TextArea, TextInput, TimePicker, Toggle, ToggleWithText, Tooltip, TooltipDirection, UnorderedList, VerticalAlignment, cancelEvent, checkComponentType, cn, findParentBySelector, generateUID, hideLastDoughTooltip, isStandardColor, setBreakpointSizeManually };
|
package/dist/index.js
CHANGED
|
@@ -1046,7 +1046,9 @@ var validateInput = function (props, value) {
|
|
|
1046
1046
|
};
|
|
1047
1047
|
}
|
|
1048
1048
|
};
|
|
1049
|
-
var isTypeObject = function (value) {
|
|
1049
|
+
var isTypeObject = function (value) {
|
|
1050
|
+
return value !== null && typeof value === "object";
|
|
1051
|
+
};
|
|
1050
1052
|
|
|
1051
1053
|
(function (BoxDirection) {
|
|
1052
1054
|
BoxDirection["ROW"] = "row";
|
|
@@ -1110,8 +1112,7 @@ var Box = React.forwardRef(function (props, ref) {
|
|
|
1110
1112
|
var _a;
|
|
1111
1113
|
var _b, _c, _d, _e, _f, _g;
|
|
1112
1114
|
var handleScroll = function (e) {
|
|
1113
|
-
if (e.currentTarget.offsetHeight + e.currentTarget.scrollTop >=
|
|
1114
|
-
e.currentTarget.scrollHeight) {
|
|
1115
|
+
if (Math.round(e.currentTarget.offsetHeight + e.currentTarget.scrollTop) >= e.currentTarget.scrollHeight) {
|
|
1115
1116
|
if (props.onScrollReachedBottom) {
|
|
1116
1117
|
props.onScrollReachedBottom(e);
|
|
1117
1118
|
}
|
|
@@ -1155,7 +1156,7 @@ Box.displayName = "Box";
|
|
|
1155
1156
|
|
|
1156
1157
|
var Card = function (props) {
|
|
1157
1158
|
var _a;
|
|
1158
|
-
var _b = props.border, border = _b === void 0 ? false : _b, _c = props.flat, flat = _c === void 0 ? false : _c, _d = props.color, color = _d === void 0 ? exports.Colors.THEME : _d, _e = props.fullHeight, fullHeight = _e === void 0 ? false : _e, _f = props.shadow, shadow = _f === void 0 ? true : _f, _g = props.headerButtons, headerButtons = _g === void 0 ? [] : _g;
|
|
1159
|
+
var _b = props.border, border = _b === void 0 ? false : _b, _c = props.flat, flat = _c === void 0 ? false : _c, _d = props.color, color = _d === void 0 ? exports.Colors.THEME : _d, _e = props.fullHeight, fullHeight = _e === void 0 ? false : _e, _f = props.shadow, shadow = _f === void 0 ? true : _f, _g = props.headerButtons, headerButtons = _g === void 0 ? [] : _g, zIndex = props.zIndex;
|
|
1159
1160
|
var getHeaderItems = function (givenChildren) {
|
|
1160
1161
|
var childrenToCheck = React.Children.toArray(givenChildren);
|
|
1161
1162
|
var headerItems = childrenToCheck.filter(function (child) {
|
|
@@ -1255,7 +1256,7 @@ var Card = function (props) {
|
|
|
1255
1256
|
};
|
|
1256
1257
|
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 = {},
|
|
1257
1258
|
_a["dough-card-border-style-" + props.borderStyle] = props.borderStyle,
|
|
1258
|
-
_a)), dataAttributes: props.dataAttributes },
|
|
1259
|
+
_a)), dataAttributes: props.dataAttributes, zIndex: zIndex },
|
|
1259
1260
|
getHeaderItems(props.children),
|
|
1260
1261
|
getContentItems(props.children),
|
|
1261
1262
|
getFooterItems(props.children)));
|
|
@@ -5051,12 +5052,23 @@ var Fader = function (props) { return (React__default.createElement("span", __as
|
|
|
5051
5052
|
: exports.Colors.THEME, "dough-fader-side dough-fader-left") }))); };
|
|
5052
5053
|
Fader.displayName = "Fader";
|
|
5053
5054
|
|
|
5054
|
-
var css_248z$G = "/* COLORS */\n/* Typography*/\n/*Dennis should provide medium font size*/\n.dough-overlay {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n width: auto;\n height: auto;\n position: absolute !important;\n pointer-events: none;\n}\
|
|
5055
|
+
var css_248z$G = "/* COLORS */\n/* Typography*/\n/*Dennis should provide medium font size*/\n.dough-overlay {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n width: auto;\n height: auto;\n position: absolute !important;\n pointer-events: none;\n background: rgba(0, 0, 0, 0.4);\n}\n.dough-overlay.dark {\n background: rgba(0, 0, 0, 0.8);\n}";
|
|
5055
5056
|
styleInject(css_248z$G);
|
|
5056
5057
|
|
|
5057
|
-
|
|
5058
|
-
|
|
5059
|
-
|
|
5058
|
+
(function (OverlayVariant) {
|
|
5059
|
+
OverlayVariant["DARK"] = "dark";
|
|
5060
|
+
OverlayVariant["STANDARD"] = "standard";
|
|
5061
|
+
})(exports.OverlayVariant || (exports.OverlayVariant = {}));
|
|
5062
|
+
function Overlay(_a) {
|
|
5063
|
+
var position = _a.position, zIndex = _a.zIndex, opacity = _a.opacity, dataAttributes = _a.dataAttributes, className = _a.className, _b = _a.variant, variant = _b === void 0 ? exports.OverlayVariant.STANDARD : _b;
|
|
5064
|
+
return (React__default.createElement("span", __assign({ className: cn(className, "dough-overlay", {
|
|
5065
|
+
dark: variant === exports.OverlayVariant.DARK,
|
|
5066
|
+
}) }, dataAttributes, { style: {
|
|
5067
|
+
opacity: opacity,
|
|
5068
|
+
zIndex: zIndex,
|
|
5069
|
+
position: position,
|
|
5070
|
+
} })));
|
|
5071
|
+
}
|
|
5060
5072
|
Overlay.displayName = "Overlay";
|
|
5061
5073
|
|
|
5062
5074
|
var IconArrowLeft = {
|
|
@@ -5684,4 +5696,5 @@ exports.cn = cn;
|
|
|
5684
5696
|
exports.findParentBySelector = findParentBySelector;
|
|
5685
5697
|
exports.generateUID = generateUID;
|
|
5686
5698
|
exports.hideLastDoughTooltip = hideLastDoughTooltip;
|
|
5699
|
+
exports.isStandardColor = isStandardColor;
|
|
5687
5700
|
exports.setBreakpointSizeManually = setBreakpointSizeManually;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react").ReactFramework, import("./overlay").OverlayProps>;
|
|
2
|
+
export default _default;
|
|
3
|
+
export declare const Default: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactFramework, import("./overlay").OverlayProps>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const validateInput: (props: any, value: any) => any;
|
|
2
|
-
export declare const isTypeObject: (value: any) =>
|
|
2
|
+
export declare const isTypeObject: (value: any) => boolean;
|
|
File without changes
|