@speakapbv/dough-component-library 9.32.1 → 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 +22 -8
- package/dist/index.js +21 -7
- 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) {
|
|
@@ -1169,7 +1171,7 @@ Box.displayName = "Box";
|
|
|
1169
1171
|
|
|
1170
1172
|
var Card = function (props) {
|
|
1171
1173
|
var _a;
|
|
1172
|
-
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;
|
|
1173
1175
|
var getHeaderItems = function (givenChildren) {
|
|
1174
1176
|
var childrenToCheck = Children.toArray(givenChildren);
|
|
1175
1177
|
var headerItems = childrenToCheck.filter(function (child) {
|
|
@@ -1269,7 +1271,7 @@ var Card = function (props) {
|
|
|
1269
1271
|
};
|
|
1270
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 = {},
|
|
1271
1273
|
_a["dough-card-border-style-" + props.borderStyle] = props.borderStyle,
|
|
1272
|
-
_a)), dataAttributes: props.dataAttributes },
|
|
1274
|
+
_a)), dataAttributes: props.dataAttributes, zIndex: zIndex },
|
|
1273
1275
|
getHeaderItems(props.children),
|
|
1274
1276
|
getContentItems(props.children),
|
|
1275
1277
|
getFooterItems(props.children)));
|
|
@@ -5067,12 +5069,24 @@ var Fader = function (props) { return (React.createElement("span", __assign({ cl
|
|
|
5067
5069
|
: Colors.THEME, "dough-fader-side dough-fader-left") }))); };
|
|
5068
5070
|
Fader.displayName = "Fader";
|
|
5069
5071
|
|
|
5070
|
-
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}";
|
|
5071
5073
|
styleInject(css_248z$G);
|
|
5072
5074
|
|
|
5073
|
-
var
|
|
5074
|
-
|
|
5075
|
-
|
|
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
|
+
}
|
|
5076
5090
|
Overlay.displayName = "Overlay";
|
|
5077
5091
|
|
|
5078
5092
|
var IconArrowLeft = {
|
|
@@ -5625,4 +5639,4 @@ GridItem.displayName = "GridItem";
|
|
|
5625
5639
|
|
|
5626
5640
|
injectRobotoFont();
|
|
5627
5641
|
|
|
5628
|
-
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";
|
|
@@ -1154,7 +1156,7 @@ Box.displayName = "Box";
|
|
|
1154
1156
|
|
|
1155
1157
|
var Card = function (props) {
|
|
1156
1158
|
var _a;
|
|
1157
|
-
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;
|
|
1158
1160
|
var getHeaderItems = function (givenChildren) {
|
|
1159
1161
|
var childrenToCheck = React.Children.toArray(givenChildren);
|
|
1160
1162
|
var headerItems = childrenToCheck.filter(function (child) {
|
|
@@ -1254,7 +1256,7 @@ var Card = function (props) {
|
|
|
1254
1256
|
};
|
|
1255
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 = {},
|
|
1256
1258
|
_a["dough-card-border-style-" + props.borderStyle] = props.borderStyle,
|
|
1257
|
-
_a)), dataAttributes: props.dataAttributes },
|
|
1259
|
+
_a)), dataAttributes: props.dataAttributes, zIndex: zIndex },
|
|
1258
1260
|
getHeaderItems(props.children),
|
|
1259
1261
|
getContentItems(props.children),
|
|
1260
1262
|
getFooterItems(props.children)));
|
|
@@ -5050,12 +5052,23 @@ var Fader = function (props) { return (React__default.createElement("span", __as
|
|
|
5050
5052
|
: exports.Colors.THEME, "dough-fader-side dough-fader-left") }))); };
|
|
5051
5053
|
Fader.displayName = "Fader";
|
|
5052
5054
|
|
|
5053
|
-
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}";
|
|
5054
5056
|
styleInject(css_248z$G);
|
|
5055
5057
|
|
|
5056
|
-
|
|
5057
|
-
|
|
5058
|
-
|
|
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
|
+
}
|
|
5059
5072
|
Overlay.displayName = "Overlay";
|
|
5060
5073
|
|
|
5061
5074
|
var IconArrowLeft = {
|
|
@@ -5683,4 +5696,5 @@ exports.cn = cn;
|
|
|
5683
5696
|
exports.findParentBySelector = findParentBySelector;
|
|
5684
5697
|
exports.generateUID = generateUID;
|
|
5685
5698
|
exports.hideLastDoughTooltip = hideLastDoughTooltip;
|
|
5699
|
+
exports.isStandardColor = isStandardColor;
|
|
5686
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
|