@speakapbv/dough-component-library 9.7.1-beta.1 → 9.10.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.
@@ -14,6 +14,10 @@ export interface ImageProps {
14
14
  borderColor?: Colors;
15
15
  width?: string;
16
16
  height?: string;
17
+ ratio?: {
18
+ width: number;
19
+ height: number;
20
+ };
17
21
  opacity?: number;
18
22
  rounded?: boolean;
19
23
  borderRadius?: boolean;
@@ -6,6 +6,7 @@ export interface TagProps {
6
6
  children?: ReactNode;
7
7
  dataAttributes?: DoughDataAttributes;
8
8
  color?: Colors;
9
+ big?: boolean;
9
10
  onRemove?(): void;
10
11
  }
11
12
  export declare const Tag: {
package/dist/index.d.ts CHANGED
@@ -58,7 +58,7 @@ export { Box, BoxAlign, BoxAlignment, BoxAlignContent, BoxDirection, BoxDisplay,
58
58
  export { Grid, GridContentAlignment, GridItemsAlignment, GridFlow, } from "./components/containers/grid/grid";
59
59
  export { GridItem } from "./components/containers/grid/grid-item";
60
60
  export { cancelEvent } from "./utils/event";
61
- export { findParentBySelector } from "./utils/dom-management";
61
+ export { findParentBySelector, setBreakpointSizeManually, } from "./utils/dom-management";
62
62
  export { default as cn } from "./utils/class-names";
63
63
  export { generateUID } from "./utils/guid";
64
64
  export { hideLastDoughTooltip } from "./utils/dom-management";
package/dist/index.es.js CHANGED
@@ -535,9 +535,16 @@ var insertBreakpointControllerDoms = function () {
535
535
  observer.observe(breakpointDom);
536
536
  });
537
537
  };
538
+ var manualBreakpointSize = null;
539
+ var setBreakpointSizeManually = function (size) {
540
+ manualBreakpointSize = size;
541
+ };
538
542
  var registerBreakpointView = function (callbacks, breakpointSize, id) {
539
543
  var _a;
540
- if (typeof IntersectionObserver !== "undefined") {
544
+ if (manualBreakpointSize && manualBreakpointSize === breakpointSize) {
545
+ callbacks.show(breakpointSize);
546
+ }
547
+ else if (typeof IntersectionObserver !== "undefined") {
541
548
  if (document.querySelectorAll(".dough-breakpoint-control").length === 0) {
542
549
  insertBreakpointControllerDoms();
543
550
  }
@@ -688,7 +695,7 @@ var Button = function (props) {
688
695
  return "24px";
689
696
  }
690
697
  }
691
- return "3px";
698
+ return "6px";
692
699
  };
693
700
  useEffect(function () {
694
701
  if (props.color && props.color !== colorVal && buttonRef.current) {
@@ -2888,7 +2895,7 @@ var css_248z$k = "/* COLORS */\n/* Typography*/\n/*Dennis should provide medium
2888
2895
  styleInject(css_248z$k);
2889
2896
 
2890
2897
  var Tag = function (props) { return (React.createElement("div", __assign({ className: cn("dough-tag-item", props.color ? props.color : Colors.HEADER, props.className) }, props.dataAttributes),
2891
- React.createElement(Text, { tiny: true, bold: true }, props.children),
2898
+ React.createElement(Text, { tiny: !props.big, bold: true }, props.children),
2892
2899
  props.onRemove && (React.createElement(Button, { padding: false, color: Colors.TRANSPARENT, icon: React.createElement(CloseIcon, null), onClick: function (e) {
2893
2900
  cancelEvent(e);
2894
2901
  if (typeof props.onRemove === "function") {
@@ -5075,7 +5082,7 @@ var ContentSlider = function (props) {
5075
5082
  };
5076
5083
  ContentSlider.displayName = "ContentSlider";
5077
5084
 
5078
- var css_248z$I = "/* COLORS */\n/* Typography*/\n/*Dennis should provide medium font size*/\n.dough-image-viewer {\n display: inline-flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n box-sizing: border-box;\n position: relative;\n z-index: 1;\n background-size: 0px 0px;\n}\n.dough-image-viewer.dough-image-border-radius {\n border-radius: 12px;\n}\n.dough-box.dough-box-border-radius .dough-image-viewer.dough-image-border-radius {\n border-radius: 6px;\n}\n.dough-image-viewer.has-border {\n padding: 3px;\n}\n.dough-image-viewer.has-border > .after {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: -1;\n width: auto;\n height: auto;\n}\n.dough-image-viewer > .dough-image-viewer-as-background {\n display: none;\n}\n.dough-image-viewer > img {\n position: relative;\n z-index: 5;\n object-fit: cover;\n width: 100%;\n height: 100%;\n object-position: center center;\n text-indent: -101%;\n overflow: hidden;\n}\nhtml.dough-IE11 .dough-image-viewer > img {\n opacity: 0;\n}\nhtml.dough-IE11 .dough-image-viewer > img {\n opacity: 0;\n}\nhtml.dough-IE11 .dough-image-viewer > .dough-image-viewer-as-background {\n display: block;\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1;\n width: auto;\n height: auto;\n background-position: center center;\n background-size: cover;\n background-repeat: no-repeat;\n}\nhtml.dough-IE11 .dough-image-viewer.has-border > .dough-image-viewer-as-background {\n position: absolute;\n top: 3px;\n right: 3px;\n bottom: 3px;\n left: 3px;\n z-index: 1;\n width: auto;\n height: auto;\n}\n.dough-image-viewer.dough-image-viewer-fit-to-view > img {\n object-fit: contain;\n}\nhtml.dough-IE11 .dough-image-viewer.dough-image-viewer-fit-to-view > img {\n opacity: 0;\n}\nhtml.dough-IE11 .dough-image-viewer.dough-image-viewer-fit-to-view > .dough-image-viewer-as-background {\n background-size: contain;\n}\n.dough-image-viewer.size-extra-small {\n width: 32px !important;\n height: 32px !important;\n}\n.dough-image-viewer.size-extra-small > img {\n width: 100%;\n height: 100%;\n}\n.dough-image-viewer.size-small {\n width: 64px !important;\n height: 64px !important;\n}\n.dough-image-viewer.size-small > img {\n width: 100%;\n height: 100%;\n}\n.dough-image-viewer.size-normal {\n width: 96px !important;\n height: 96px !important;\n}\n.dough-image-viewer.size-normal > img {\n width: 100%;\n height: 100%;\n}\n.dough-image-viewer.size-large {\n width: 128px !important;\n height: 128px !important;\n}\n.dough-image-viewer.size-large > img {\n width: 100%;\n height: 100%;\n}\n.dough-image-viewer.size-extra-large {\n width: 160px !important;\n height: 160px !important;\n}\n.dough-image-viewer.size-extra-large > img {\n width: 100%;\n height: 100%;\n}\n.dough-image-viewer.rounded {\n border-radius: 100%;\n}\n.dough-image-viewer.rounded > .dough-image-viewer-as-background,\n.dough-image-viewer.rounded > .after,\n.dough-image-viewer.rounded > img {\n border-radius: 100%;\n}\n.dough-image-viewer > .dough-image-viewer-content-container {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 10;\n width: auto;\n height: auto;\n}\nbody:not(.no-transition) .dough-image-viewer > .dough-image-viewer-content-container {\n transition: all 650ms cubic-bezier(0.25, 1, 0, 1);\n}\nbody.no-transition .dough-image-viewer > .dough-image-viewer-content-container {\n transition: none 0ms linear !important;\n transition-delay: 0ms !important;\n}\n.dough-image-viewer.dough-image-have-children-text-color * {\n color: inherit !important;\n}\n.dough-image-viewer.dough-image-viewer-show-children-on-hover > .dough-image-viewer-content-container {\n opacity: 0;\n pointer-events: none;\n}\n.dough-image-viewer.dough-image-viewer-show-children-on-hover:hover > .dough-image-viewer-content-container {\n opacity: 1;\n}\n.dough-image-viewer:not(:hover) .dough-image-show-only-on-image-hover {\n opacity: 0 !important;\n pointer-events: none !important;\n}";
5085
+ var css_248z$I = "/* COLORS */\n/* Typography*/\n/*Dennis should provide medium font size*/\n.dough-image-viewer {\n display: inline-flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n box-sizing: border-box;\n position: relative;\n z-index: 1;\n background-size: 0px 0px;\n}\n.dough-image-viewer.dough-image-border-radius {\n border-radius: 12px;\n}\n.dough-box.dough-box-border-radius .dough-image-viewer.dough-image-border-radius {\n border-radius: 6px;\n}\n.dough-image-viewer.has-border {\n padding: 3px;\n}\n.dough-image-viewer.has-border > .after {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: -1;\n width: auto;\n height: auto;\n}\n.dough-image-viewer > .dough-image-viewer-as-background {\n display: none;\n}\n.dough-image-viewer > img {\n position: relative;\n z-index: 5;\n object-fit: cover;\n width: 100%;\n height: 100%;\n object-position: center center;\n text-indent: -101%;\n overflow: hidden;\n}\nhtml.dough-IE11 .dough-image-viewer > img {\n opacity: 0;\n}\n.dough-image-viewer.dough-image-with-ratio > img {\n position: absolute;\n top: 0;\n left: 0;\n}\nhtml.dough-IE11 .dough-image-viewer > img {\n opacity: 0;\n}\nhtml.dough-IE11 .dough-image-viewer > .dough-image-viewer-as-background {\n display: block;\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1;\n width: auto;\n height: auto;\n background-position: center center;\n background-size: cover;\n background-repeat: no-repeat;\n}\nhtml.dough-IE11 .dough-image-viewer.has-border > .dough-image-viewer-as-background {\n position: absolute;\n top: 3px;\n right: 3px;\n bottom: 3px;\n left: 3px;\n z-index: 1;\n width: auto;\n height: auto;\n}\n.dough-image-viewer.dough-image-viewer-fit-to-view > img {\n object-fit: contain;\n}\nhtml.dough-IE11 .dough-image-viewer.dough-image-viewer-fit-to-view > img {\n opacity: 0;\n}\nhtml.dough-IE11 .dough-image-viewer.dough-image-viewer-fit-to-view > .dough-image-viewer-as-background {\n background-size: contain;\n}\n.dough-image-viewer.size-extra-small {\n width: 32px !important;\n height: 32px !important;\n}\n.dough-image-viewer.size-extra-small > img {\n width: 100%;\n height: 100%;\n}\n.dough-image-viewer.size-small {\n width: 64px !important;\n height: 64px !important;\n}\n.dough-image-viewer.size-small > img {\n width: 100%;\n height: 100%;\n}\n.dough-image-viewer.size-normal {\n width: 96px !important;\n height: 96px !important;\n}\n.dough-image-viewer.size-normal > img {\n width: 100%;\n height: 100%;\n}\n.dough-image-viewer.size-large {\n width: 128px !important;\n height: 128px !important;\n}\n.dough-image-viewer.size-large > img {\n width: 100%;\n height: 100%;\n}\n.dough-image-viewer.size-extra-large {\n width: 160px !important;\n height: 160px !important;\n}\n.dough-image-viewer.size-extra-large > img {\n width: 100%;\n height: 100%;\n}\n.dough-image-viewer.rounded {\n border-radius: 100%;\n}\n.dough-image-viewer.rounded > .dough-image-viewer-as-background,\n.dough-image-viewer.rounded > .after,\n.dough-image-viewer.rounded > img {\n border-radius: 100%;\n}\n.dough-image-viewer > .dough-image-viewer-content-container {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 10;\n width: auto;\n height: auto;\n}\nbody:not(.no-transition) .dough-image-viewer > .dough-image-viewer-content-container {\n transition: all 650ms cubic-bezier(0.25, 1, 0, 1);\n}\nbody.no-transition .dough-image-viewer > .dough-image-viewer-content-container {\n transition: none 0ms linear !important;\n transition-delay: 0ms !important;\n}\n.dough-image-viewer.dough-image-have-children-text-color * {\n color: inherit !important;\n}\n.dough-image-viewer.dough-image-viewer-show-children-on-hover > .dough-image-viewer-content-container {\n opacity: 0;\n pointer-events: none;\n}\n.dough-image-viewer.dough-image-viewer-show-children-on-hover:hover > .dough-image-viewer-content-container {\n opacity: 1;\n}\n.dough-image-viewer:not(:hover) .dough-image-show-only-on-image-hover {\n opacity: 0 !important;\n pointer-events: none !important;\n}";
5079
5086
  styleInject(css_248z$I);
5080
5087
 
5081
5088
  var ImageContentShowOnHoverClassName = "dough-image-show-only-on-image-hover";
@@ -5087,12 +5094,15 @@ var Image = function (props) {
5087
5094
  "dough-image-border-radius": props.borderRadius,
5088
5095
  "has-border": props.border,
5089
5096
  rounded: props.rounded,
5097
+ "dough-image-with-ratio": props.ratio,
5090
5098
  "dough-image-viewer-fit-to-view": props.fitToView,
5091
5099
  "dough-image-viewer-show-children-on-hover": props.showChildrenOnHover,
5092
- }), style: {
5093
- height: (_a = props.height) !== null && _a !== void 0 ? _a : "initial",
5094
- width: (_b = props.width) !== null && _b !== void 0 ? _b : "initial",
5095
- } }, props.dataAttributes),
5100
+ }), style: __assign({ height: (_a = props.height) !== null && _a !== void 0 ? _a : "initial", width: (_b = props.width) !== null && _b !== void 0 ? _b : "initial" }, (props.ratio
5101
+ ? {
5102
+ paddingTop: (props.ratio.height * 100) /
5103
+ props.ratio.width + "%",
5104
+ }
5105
+ : {})) }, props.dataAttributes),
5096
5106
  React.createElement("img", { alt: "", src: props.src, style: {
5097
5107
  opacity: props.opacity,
5098
5108
  } }),
@@ -5454,4 +5464,4 @@ GridItem.displayName = "GridItem";
5454
5464
 
5455
5465
  injectRobotoFont();
5456
5466
 
5457
- export { AlertStatus, AlertText, AppBackground, AppWrapper, Avatar, BR, Badge, BorderStyles, Box, BoxAlign, BoxAlignContent, BoxAlignment, BoxDirection, BoxDisplay, BoxJustifyContent, BoxOverflow, BoxWrap, BreadCrumb, BreakpointViewer, BreakpointViewportSizes, Button, ButtonInputType, Card, Carousel, CheckBox, Collapser, Colors, ColorsIcon, ColorsText, Container, ContentSlider, DatePicker, DateTime, DesignTokens, Dialog, Direction, Divider, DoughDateInput, DropMenu, Fader, 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, 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, VerticalAlignment, cancelEvent, checkComponentType, cn, findParentBySelector, generateUID, hideLastDoughTooltip };
5467
+ export { AlertStatus, AlertText, AppBackground, AppWrapper, Avatar, BR, Badge, BorderStyles, Box, BoxAlign, BoxAlignContent, BoxAlignment, BoxDirection, BoxDisplay, BoxJustifyContent, BoxOverflow, BoxWrap, BreadCrumb, BreakpointViewer, BreakpointViewportSizes, Button, ButtonInputType, Card, Carousel, CheckBox, Collapser, Colors, ColorsIcon, ColorsText, Container, ContentSlider, DatePicker, DateTime, DesignTokens, Dialog, Direction, Divider, DoughDateInput, DropMenu, Fader, 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, 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, VerticalAlignment, cancelEvent, checkComponentType, cn, findParentBySelector, generateUID, hideLastDoughTooltip, setBreakpointSizeManually };
package/dist/index.js CHANGED
@@ -531,9 +531,16 @@ var insertBreakpointControllerDoms = function () {
531
531
  observer.observe(breakpointDom);
532
532
  });
533
533
  };
534
+ var manualBreakpointSize = null;
535
+ var setBreakpointSizeManually = function (size) {
536
+ manualBreakpointSize = size;
537
+ };
534
538
  var registerBreakpointView = function (callbacks, breakpointSize, id) {
535
539
  var _a;
536
- if (typeof IntersectionObserver !== "undefined") {
540
+ if (manualBreakpointSize && manualBreakpointSize === breakpointSize) {
541
+ callbacks.show(breakpointSize);
542
+ }
543
+ else if (typeof IntersectionObserver !== "undefined") {
537
544
  if (document.querySelectorAll(".dough-breakpoint-control").length === 0) {
538
545
  insertBreakpointControllerDoms();
539
546
  }
@@ -683,7 +690,7 @@ var Button = function (props) {
683
690
  return "24px";
684
691
  }
685
692
  }
686
- return "3px";
693
+ return "6px";
687
694
  };
688
695
  React.useEffect(function () {
689
696
  if (props.color && props.color !== colorVal && buttonRef.current) {
@@ -2873,7 +2880,7 @@ var css_248z$k = "/* COLORS */\n/* Typography*/\n/*Dennis should provide medium
2873
2880
  styleInject(css_248z$k);
2874
2881
 
2875
2882
  var Tag = function (props) { return (React__default.createElement("div", __assign({ className: cn("dough-tag-item", props.color ? props.color : exports.Colors.HEADER, props.className) }, props.dataAttributes),
2876
- React__default.createElement(Text, { tiny: true, bold: true }, props.children),
2883
+ React__default.createElement(Text, { tiny: !props.big, bold: true }, props.children),
2877
2884
  props.onRemove && (React__default.createElement(Button, { padding: false, color: exports.Colors.TRANSPARENT, icon: React__default.createElement(CloseIcon, null), onClick: function (e) {
2878
2885
  cancelEvent(e);
2879
2886
  if (typeof props.onRemove === "function") {
@@ -5059,7 +5066,7 @@ var ContentSlider = function (props) {
5059
5066
  };
5060
5067
  ContentSlider.displayName = "ContentSlider";
5061
5068
 
5062
- var css_248z$I = "/* COLORS */\n/* Typography*/\n/*Dennis should provide medium font size*/\n.dough-image-viewer {\n display: inline-flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n box-sizing: border-box;\n position: relative;\n z-index: 1;\n background-size: 0px 0px;\n}\n.dough-image-viewer.dough-image-border-radius {\n border-radius: 12px;\n}\n.dough-box.dough-box-border-radius .dough-image-viewer.dough-image-border-radius {\n border-radius: 6px;\n}\n.dough-image-viewer.has-border {\n padding: 3px;\n}\n.dough-image-viewer.has-border > .after {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: -1;\n width: auto;\n height: auto;\n}\n.dough-image-viewer > .dough-image-viewer-as-background {\n display: none;\n}\n.dough-image-viewer > img {\n position: relative;\n z-index: 5;\n object-fit: cover;\n width: 100%;\n height: 100%;\n object-position: center center;\n text-indent: -101%;\n overflow: hidden;\n}\nhtml.dough-IE11 .dough-image-viewer > img {\n opacity: 0;\n}\nhtml.dough-IE11 .dough-image-viewer > img {\n opacity: 0;\n}\nhtml.dough-IE11 .dough-image-viewer > .dough-image-viewer-as-background {\n display: block;\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1;\n width: auto;\n height: auto;\n background-position: center center;\n background-size: cover;\n background-repeat: no-repeat;\n}\nhtml.dough-IE11 .dough-image-viewer.has-border > .dough-image-viewer-as-background {\n position: absolute;\n top: 3px;\n right: 3px;\n bottom: 3px;\n left: 3px;\n z-index: 1;\n width: auto;\n height: auto;\n}\n.dough-image-viewer.dough-image-viewer-fit-to-view > img {\n object-fit: contain;\n}\nhtml.dough-IE11 .dough-image-viewer.dough-image-viewer-fit-to-view > img {\n opacity: 0;\n}\nhtml.dough-IE11 .dough-image-viewer.dough-image-viewer-fit-to-view > .dough-image-viewer-as-background {\n background-size: contain;\n}\n.dough-image-viewer.size-extra-small {\n width: 32px !important;\n height: 32px !important;\n}\n.dough-image-viewer.size-extra-small > img {\n width: 100%;\n height: 100%;\n}\n.dough-image-viewer.size-small {\n width: 64px !important;\n height: 64px !important;\n}\n.dough-image-viewer.size-small > img {\n width: 100%;\n height: 100%;\n}\n.dough-image-viewer.size-normal {\n width: 96px !important;\n height: 96px !important;\n}\n.dough-image-viewer.size-normal > img {\n width: 100%;\n height: 100%;\n}\n.dough-image-viewer.size-large {\n width: 128px !important;\n height: 128px !important;\n}\n.dough-image-viewer.size-large > img {\n width: 100%;\n height: 100%;\n}\n.dough-image-viewer.size-extra-large {\n width: 160px !important;\n height: 160px !important;\n}\n.dough-image-viewer.size-extra-large > img {\n width: 100%;\n height: 100%;\n}\n.dough-image-viewer.rounded {\n border-radius: 100%;\n}\n.dough-image-viewer.rounded > .dough-image-viewer-as-background,\n.dough-image-viewer.rounded > .after,\n.dough-image-viewer.rounded > img {\n border-radius: 100%;\n}\n.dough-image-viewer > .dough-image-viewer-content-container {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 10;\n width: auto;\n height: auto;\n}\nbody:not(.no-transition) .dough-image-viewer > .dough-image-viewer-content-container {\n transition: all 650ms cubic-bezier(0.25, 1, 0, 1);\n}\nbody.no-transition .dough-image-viewer > .dough-image-viewer-content-container {\n transition: none 0ms linear !important;\n transition-delay: 0ms !important;\n}\n.dough-image-viewer.dough-image-have-children-text-color * {\n color: inherit !important;\n}\n.dough-image-viewer.dough-image-viewer-show-children-on-hover > .dough-image-viewer-content-container {\n opacity: 0;\n pointer-events: none;\n}\n.dough-image-viewer.dough-image-viewer-show-children-on-hover:hover > .dough-image-viewer-content-container {\n opacity: 1;\n}\n.dough-image-viewer:not(:hover) .dough-image-show-only-on-image-hover {\n opacity: 0 !important;\n pointer-events: none !important;\n}";
5069
+ var css_248z$I = "/* COLORS */\n/* Typography*/\n/*Dennis should provide medium font size*/\n.dough-image-viewer {\n display: inline-flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n box-sizing: border-box;\n position: relative;\n z-index: 1;\n background-size: 0px 0px;\n}\n.dough-image-viewer.dough-image-border-radius {\n border-radius: 12px;\n}\n.dough-box.dough-box-border-radius .dough-image-viewer.dough-image-border-radius {\n border-radius: 6px;\n}\n.dough-image-viewer.has-border {\n padding: 3px;\n}\n.dough-image-viewer.has-border > .after {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: -1;\n width: auto;\n height: auto;\n}\n.dough-image-viewer > .dough-image-viewer-as-background {\n display: none;\n}\n.dough-image-viewer > img {\n position: relative;\n z-index: 5;\n object-fit: cover;\n width: 100%;\n height: 100%;\n object-position: center center;\n text-indent: -101%;\n overflow: hidden;\n}\nhtml.dough-IE11 .dough-image-viewer > img {\n opacity: 0;\n}\n.dough-image-viewer.dough-image-with-ratio > img {\n position: absolute;\n top: 0;\n left: 0;\n}\nhtml.dough-IE11 .dough-image-viewer > img {\n opacity: 0;\n}\nhtml.dough-IE11 .dough-image-viewer > .dough-image-viewer-as-background {\n display: block;\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1;\n width: auto;\n height: auto;\n background-position: center center;\n background-size: cover;\n background-repeat: no-repeat;\n}\nhtml.dough-IE11 .dough-image-viewer.has-border > .dough-image-viewer-as-background {\n position: absolute;\n top: 3px;\n right: 3px;\n bottom: 3px;\n left: 3px;\n z-index: 1;\n width: auto;\n height: auto;\n}\n.dough-image-viewer.dough-image-viewer-fit-to-view > img {\n object-fit: contain;\n}\nhtml.dough-IE11 .dough-image-viewer.dough-image-viewer-fit-to-view > img {\n opacity: 0;\n}\nhtml.dough-IE11 .dough-image-viewer.dough-image-viewer-fit-to-view > .dough-image-viewer-as-background {\n background-size: contain;\n}\n.dough-image-viewer.size-extra-small {\n width: 32px !important;\n height: 32px !important;\n}\n.dough-image-viewer.size-extra-small > img {\n width: 100%;\n height: 100%;\n}\n.dough-image-viewer.size-small {\n width: 64px !important;\n height: 64px !important;\n}\n.dough-image-viewer.size-small > img {\n width: 100%;\n height: 100%;\n}\n.dough-image-viewer.size-normal {\n width: 96px !important;\n height: 96px !important;\n}\n.dough-image-viewer.size-normal > img {\n width: 100%;\n height: 100%;\n}\n.dough-image-viewer.size-large {\n width: 128px !important;\n height: 128px !important;\n}\n.dough-image-viewer.size-large > img {\n width: 100%;\n height: 100%;\n}\n.dough-image-viewer.size-extra-large {\n width: 160px !important;\n height: 160px !important;\n}\n.dough-image-viewer.size-extra-large > img {\n width: 100%;\n height: 100%;\n}\n.dough-image-viewer.rounded {\n border-radius: 100%;\n}\n.dough-image-viewer.rounded > .dough-image-viewer-as-background,\n.dough-image-viewer.rounded > .after,\n.dough-image-viewer.rounded > img {\n border-radius: 100%;\n}\n.dough-image-viewer > .dough-image-viewer-content-container {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 10;\n width: auto;\n height: auto;\n}\nbody:not(.no-transition) .dough-image-viewer > .dough-image-viewer-content-container {\n transition: all 650ms cubic-bezier(0.25, 1, 0, 1);\n}\nbody.no-transition .dough-image-viewer > .dough-image-viewer-content-container {\n transition: none 0ms linear !important;\n transition-delay: 0ms !important;\n}\n.dough-image-viewer.dough-image-have-children-text-color * {\n color: inherit !important;\n}\n.dough-image-viewer.dough-image-viewer-show-children-on-hover > .dough-image-viewer-content-container {\n opacity: 0;\n pointer-events: none;\n}\n.dough-image-viewer.dough-image-viewer-show-children-on-hover:hover > .dough-image-viewer-content-container {\n opacity: 1;\n}\n.dough-image-viewer:not(:hover) .dough-image-show-only-on-image-hover {\n opacity: 0 !important;\n pointer-events: none !important;\n}";
5063
5070
  styleInject(css_248z$I);
5064
5071
 
5065
5072
  var ImageContentShowOnHoverClassName = "dough-image-show-only-on-image-hover";
@@ -5071,12 +5078,15 @@ var Image = function (props) {
5071
5078
  "dough-image-border-radius": props.borderRadius,
5072
5079
  "has-border": props.border,
5073
5080
  rounded: props.rounded,
5081
+ "dough-image-with-ratio": props.ratio,
5074
5082
  "dough-image-viewer-fit-to-view": props.fitToView,
5075
5083
  "dough-image-viewer-show-children-on-hover": props.showChildrenOnHover,
5076
- }), style: {
5077
- height: (_a = props.height) !== null && _a !== void 0 ? _a : "initial",
5078
- width: (_b = props.width) !== null && _b !== void 0 ? _b : "initial",
5079
- } }, props.dataAttributes),
5084
+ }), style: __assign({ height: (_a = props.height) !== null && _a !== void 0 ? _a : "initial", width: (_b = props.width) !== null && _b !== void 0 ? _b : "initial" }, (props.ratio
5085
+ ? {
5086
+ paddingTop: (props.ratio.height * 100) /
5087
+ props.ratio.width + "%",
5088
+ }
5089
+ : {})) }, props.dataAttributes),
5080
5090
  React__default.createElement("img", { alt: "", src: props.src, style: {
5081
5091
  opacity: props.opacity,
5082
5092
  } }),
@@ -5508,3 +5518,4 @@ exports.cn = cn;
5508
5518
  exports.findParentBySelector = findParentBySelector;
5509
5519
  exports.generateUID = generateUID;
5510
5520
  exports.hideLastDoughTooltip = hideLastDoughTooltip;
5521
+ exports.setBreakpointSizeManually = setBreakpointSizeManually;
@@ -22,5 +22,6 @@ export declare const getAppWrapperOverlay: () => any;
22
22
  export declare const getNotificationOverlay: (verticalLayer: any, horizontalLayer: any, selector?: string | undefined) => any;
23
23
  export declare const getInjectedStylesWrapper: () => any;
24
24
  export declare const findParentBySelector: (element: HTMLElement, selector: string) => HTMLElement;
25
+ export declare const setBreakpointSizeManually: (size: BreakpointViewportSizes | null) => void;
25
26
  export declare const registerBreakpointView: (callbacks: any, breakpointSize: BreakpointViewportSizes, id: string) => void;
26
27
  export declare const deRegisterBreakpointView: (id: string) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@speakapbv/dough-component-library",
3
- "version": "9.7.1-beta.1",
3
+ "version": "9.10.0",
4
4
  "description": "DOUGH: Speakap React Component Library",
5
5
  "author": "Speakap",
6
6
  "license": "MIT",