@speakapbv/dough-component-library 9.19.0 → 9.20.2

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,13 +1,20 @@
1
1
  import { ReactNode } from "react";
2
2
  import "./bread-crumb.scss";
3
3
  import { DoughDataAttributes, Sizes } from "../../utils/constants";
4
+ interface BreadCrumbTextProps {
5
+ children: string | number;
6
+ className?: string;
7
+ }
8
+ export declare const BreadCrumbText: ({ children, className, }: BreadCrumbTextProps) => JSX.Element;
4
9
  export interface BreadCrumbProps {
5
10
  className?: string;
6
11
  children?: ReactNode;
7
12
  size?: Sizes.SMALL | Sizes.NORMAL;
8
13
  dataAttributes?: DoughDataAttributes;
14
+ noElementWrapper?: boolean;
9
15
  }
10
16
  export declare const BreadCrumb: {
11
17
  (props: BreadCrumbProps): JSX.Element;
12
18
  displayName: string;
13
19
  };
20
+ export {};
@@ -16,5 +16,7 @@ export interface LinkProps {
16
16
  target?: string;
17
17
  rel?: string;
18
18
  download?: string;
19
+ width?: string;
20
+ flex?: string;
19
21
  }
20
- export declare const Link: React.ForwardRefExoticComponent<Pick<LinkProps, "className" | "dataAttributes" | "color" | "children" | "onClick" | "underline" | "fullWidth" | "disabled" | "colorOnlyOnHover" | "href" | "target" | "rel" | "download"> & React.RefAttributes<HTMLAnchorElement>>;
22
+ export declare const Link: React.ForwardRefExoticComponent<Pick<LinkProps, "className" | "dataAttributes" | "color" | "children" | "onClick" | "underline" | "fullWidth" | "disabled" | "colorOnlyOnHover" | "href" | "target" | "rel" | "download" | "width" | "flex"> & React.RefAttributes<HTMLAnchorElement>>;
package/dist/index.d.ts CHANGED
@@ -25,7 +25,7 @@ export { Switch } from "./components/form-elements/switch/switch";
25
25
  export { RadioGroup, DoughRadioGroupData, } from "./components/form-elements/selection-inputs/radio-group";
26
26
  export { RadioOption } from "./components/form-elements/selection-inputs/radio-option";
27
27
  export { Tag } from "./components/tag-comp/tag";
28
- export { BreadCrumb } from "./components/bread-crumb/bread-crumb";
28
+ export { BreadCrumb, BreadCrumbText, } from "./components/bread-crumb/bread-crumb";
29
29
  export { Badge } from "./components/badge/badge";
30
30
  export { Spacer } from "./components/spacer/spacer";
31
31
  export { Divider } from "./components/divider/divider";
package/dist/index.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import React, { forwardRef, useState, useRef, useEffect, useImperativeHandle, Children } from 'react';
1
+ import React, { forwardRef, useState, useRef, useEffect, useImperativeHandle, Children, Fragment } from 'react';
2
2
  import { createPortal } from 'react-dom';
3
3
  import lottie from 'lottie-web/build/player/lottie_light';
4
4
 
@@ -605,7 +605,7 @@ var Link = forwardRef(function (props, ref) {
605
605
  cancelEvent(e);
606
606
  }
607
607
  }
608
- : undefined, download: props.download, target: props.target, rel: rel, ref: ref }, props.dataAttributes), props.children));
608
+ : undefined, download: props.download, target: props.target, rel: rel, ref: ref, style: { width: props.width, flex: props.flex } }, props.dataAttributes), props.children));
609
609
  });
610
610
  Link.displayName = "Link";
611
611
 
@@ -3897,7 +3897,7 @@ var SelectBox = forwardRef(function (props, ref) {
3897
3897
  });
3898
3898
  SelectBox.displayName = "SelectBox";
3899
3899
 
3900
- var css_248z$n = "/* COLORS */\n/* Typography*/\n/*Dennis should provide medium font size*/\n.dough-fe-wrapper.dough-checkbox-fe-wrapper {\n margin-top: 0;\n margin-bottom: 0;\n}\n.dough-fe-wrapper.dough-checkbox-fe-wrapper + .dough-fe-wrapper.dough-checkbox-fe-wrapper {\n margin-top: 8px;\n}\n\n.dough-selection-container {\n outline: none;\n -webkit-tap-highlight-color: transparent;\n width: 100%;\n box-sizing: border-box;\n color: rgb(110, 111, 117);\n color: var(--dough-color-text-default);\n}\n.dough-selection-container * {\n outline: none;\n -webkit-tap-highlight-color: transparent;\n}\nhtml.dough-IE11 .dough-selection-container {\n flex-basis: 32px;\n}\n.dough-selection-container .dough-fe-label {\n font-size: 0.875rem;\n width: 100%;\n}\n.dough-selection-container .dough-selection-button {\n width: 24px;\n min-width: 24px;\n max-width: 24px;\n height: 24px;\n min-height: 24px;\n max-height: 24px;\n}\n.dough-selection-container .dough-selection-button.dough-checkbox-size-small {\n width: 16px;\n min-width: 16px;\n max-width: 16px;\n height: 16px;\n min-height: 16px;\n max-height: 16px;\n}\n.dough-selection-container .dough-selection-button > .dough-button {\n padding: 0;\n margin: 0;\n min-width: 100% !important;\n max-width: 100% !important;\n width: 100% !important;\n height: 100% !important;\n min-height: 100% !important;\n max-height: 100% !important;\n overflow: hidden;\n}\n.dough-selection-container .dough-selection-button > .dough-button:after {\n content: \"\";\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 border: 2px solid rgb(210, 210, 210);\n border: 2px solid var(--dough-color-input-border);\n border-radius: 6px;\n}\nbody:not(.no-transition) .dough-selection-container .dough-selection-button > .dough-button:after {\n transition: all 350ms cubic-bezier(0.25, 1, 0, 1);\n}\nbody.no-transition .dough-selection-container .dough-selection-button > .dough-button:after {\n transition: none 0ms linear !important;\n transition-delay: 0ms !important;\n}\nhtml.dough-IE11 .dough-selection-container .dough-selection-button > .dough-button {\n padding: 0;\n margin: 0;\n}\n.dough-selection-container .dough-selection-button > .dough-button > .dough-button-icon {\n width: 24px;\n height: 24px;\n}\n.dough-selection-container .dough-selection-button > .dough-button > .dough-button-icon > .dough-inline-svg-icon,\n.dough-selection-container .dough-selection-button > .dough-button > .dough-button-icon > .svg-inline--fa {\n opacity: 0;\n transform: translate3d(0, 0, 0) scale(0.2);\n width: 16px;\n height: 16px;\n}\nbody:not(.no-transition) .dough-selection-container .dough-selection-button > .dough-button > .dough-button-icon > .dough-inline-svg-icon,\nbody:not(.no-transition) .dough-selection-container .dough-selection-button > .dough-button > .dough-button-icon > .svg-inline--fa {\n transition: all 750ms cubic-bezier(0.25, 1, 0, 1);\n}\nbody.no-transition .dough-selection-container .dough-selection-button > .dough-button > .dough-button-icon > .dough-inline-svg-icon,\nbody.no-transition .dough-selection-container .dough-selection-button > .dough-button > .dough-button-icon > .svg-inline--fa {\n transition: none 0ms linear !important;\n transition-delay: 0ms !important;\n}\n.dough-selection-container .dough-selection-button > .dough-button > .dough-button-icon > .dough-inline-svg-icon path,\n.dough-selection-container .dough-selection-button > .dough-button > .dough-button-icon > .svg-inline--fa path {\n fill: rgb(255, 255, 255);\n fill: var(--dough-color-header-alternate);\n}\n.dough-selection-container .dough-selection-button:focus > .dough-button:after {\n border-color: rgb(68, 132, 199);\n border-color: var(--dough-color-primary);\n}\n.dough-selection-container .dough-selection-button > .dough-button {\n box-shadow: none !important;\n}\n.dough-selection-container:not(.checked) .dough-selection-button > .dough-button .dough-button-background-wrapper {\n background-color: transparent !important;\n}\n.dough-selection-container:not(.checked) .dough-selection-button > .dough-button .dough-button-background-wrapper > .dough-button-background-glow {\n display: none;\n}\n.dough-selection-container:not(.checked) .dough-selection-button > .dough-button > .dough-button-icon > .dough-inline-svg-icon path,\n.dough-selection-container:not(.checked) .dough-selection-button > .dough-button > .dough-button-icon > .svg-inline--fa path {\n fill: rgb(110, 111, 117);\n fill: var(--dough-color-transparent-alternate);\n}\n.dough-selection-container.checked .dough-selection-button > .dough-button:after {\n border-color: rgba(255, 255, 255, 0);\n border-color: var(--dough-color-transparent);\n}\n.dough-selection-container.checked .dough-selection-button > .dough-button > .dough-button-icon > .dough-inline-svg-icon,\n.dough-selection-container.checked .dough-selection-button > .dough-button > .dough-button-icon > .svg-inline--fa {\n opacity: 1;\n transform: translate3d(0, 0, 0) scale(1);\n}\n.dough-selection-container.checked .dough-selection-button > .dough-button.dough-button-size-small > .dough-button-icon > .dough-inline-svg-icon,\n.dough-selection-container.checked .dough-selection-button > .dough-button.dough-button-size-small > .dough-button-icon > .svg-inline--fa {\n transform: translate3d(0, 0, 0) perspective(0px) scale(0.6);\n}\n.dough-selection-container.rounded .dough-selection-button > .dough-button:after {\n border-radius: 100%;\n}\n.dough-selection-container .dough-selection-left-box {\n cursor: pointer;\n padding: 0;\n}\n.dough-selection-container .dough-selection-right-box {\n cursor: pointer;\n}\n.dough-selection-container .dough-selection-right-box:not(:empty) {\n padding-left: 8px;\n}\n\n.dough-fe-radio-group .dough-fe-group-label {\n font-size: 0.875rem;\n font-weight: 700;\n color: rgb(110, 111, 117);\n color: var(--dough-color-text-default);\n}\n.dough-fe-radio-group .dough-fe-wrapper.dough-checkbox-fe-wrapper {\n margin-top: 4px !important;\n}";
3900
+ var css_248z$n = "/* COLORS */\n/* Typography*/\n/*Dennis should provide medium font size*/\n.dough-fe-wrapper.dough-checkbox-fe-wrapper {\n margin-top: 0;\n margin-bottom: 0;\n}\n.dough-fe-wrapper.dough-checkbox-fe-wrapper + .dough-fe-wrapper.dough-checkbox-fe-wrapper {\n margin-top: 8px;\n}\n\n.dough-selection-container {\n outline: none;\n -webkit-tap-highlight-color: transparent;\n width: 100%;\n box-sizing: border-box;\n color: rgb(110, 111, 117);\n color: var(--dough-color-text-default);\n}\n.dough-selection-container * {\n outline: none;\n -webkit-tap-highlight-color: transparent;\n}\nhtml.dough-IE11 .dough-selection-container {\n flex-basis: 32px;\n}\n.dough-selection-container .dough-fe-label {\n font-size: 0.875rem;\n width: 100%;\n}\n.dough-selection-container .dough-selection-button {\n width: 24px;\n min-width: 24px;\n max-width: 24px;\n height: 24px;\n min-height: 24px;\n max-height: 24px;\n}\n.dough-selection-container .dough-selection-button.dough-checkbox-size-small {\n width: 16px;\n min-width: 16px;\n max-width: 16px;\n height: 16px;\n min-height: 16px;\n max-height: 16px;\n}\n.dough-selection-container .dough-selection-button > .dough-button {\n padding: 0;\n margin: 0;\n min-width: 100% !important;\n max-width: 100% !important;\n width: 100% !important;\n height: 100% !important;\n min-height: 100% !important;\n max-height: 100% !important;\n overflow: hidden;\n}\n.dough-selection-container .dough-selection-button > .dough-button:after {\n content: \"\";\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 border: 2px solid rgb(210, 210, 210);\n border: 2px solid var(--dough-color-input-border);\n border-radius: 6px;\n}\nbody:not(.no-transition) .dough-selection-container .dough-selection-button > .dough-button:after {\n transition: all 350ms cubic-bezier(0.25, 1, 0, 1);\n}\nbody.no-transition .dough-selection-container .dough-selection-button > .dough-button:after {\n transition: none 0ms linear !important;\n transition-delay: 0ms !important;\n}\nhtml.dough-IE11 .dough-selection-container .dough-selection-button > .dough-button {\n padding: 0;\n margin: 0;\n}\n.dough-selection-container .dough-selection-button > .dough-button > .dough-button-icon {\n width: 24px;\n height: 24px;\n}\n.dough-selection-container .dough-selection-button > .dough-button > .dough-button-icon > .dough-inline-svg-icon,\n.dough-selection-container .dough-selection-button > .dough-button > .dough-button-icon > .svg-inline--fa {\n opacity: 0;\n transform: translate3d(0, 0, 0) scale(0.2);\n width: 16px;\n height: 16px;\n}\nbody:not(.no-transition) .dough-selection-container .dough-selection-button > .dough-button > .dough-button-icon > .dough-inline-svg-icon,\nbody:not(.no-transition) .dough-selection-container .dough-selection-button > .dough-button > .dough-button-icon > .svg-inline--fa {\n transition: all 750ms cubic-bezier(0.25, 1, 0, 1);\n}\nbody.no-transition .dough-selection-container .dough-selection-button > .dough-button > .dough-button-icon > .dough-inline-svg-icon,\nbody.no-transition .dough-selection-container .dough-selection-button > .dough-button > .dough-button-icon > .svg-inline--fa {\n transition: none 0ms linear !important;\n transition-delay: 0ms !important;\n}\n.dough-selection-container .dough-selection-button > .dough-button > .dough-button-icon > .dough-inline-svg-icon path,\n.dough-selection-container .dough-selection-button > .dough-button > .dough-button-icon > .svg-inline--fa path {\n fill: rgb(255, 255, 255);\n fill: var(--dough-color-header-alternate);\n}\n.dough-selection-container .dough-selection-button:focus > .dough-button:after {\n border-color: rgb(68, 132, 199);\n border-color: var(--dough-color-primary);\n}\n.dough-selection-container .dough-selection-button > .dough-button {\n box-shadow: none !important;\n}\n.dough-selection-container:not(.checked) .dough-selection-button > .dough-button .dough-button-background-wrapper {\n background-color: transparent !important;\n}\n.dough-selection-container:not(.checked) .dough-selection-button > .dough-button .dough-button-background-wrapper > .dough-button-background-glow {\n display: none;\n}\n.dough-selection-container:not(.checked) .dough-selection-button > .dough-button > .dough-button-icon > .dough-inline-svg-icon path,\n.dough-selection-container:not(.checked) .dough-selection-button > .dough-button > .dough-button-icon > .svg-inline--fa path {\n fill: rgb(110, 111, 117);\n fill: var(--dough-color-transparent-alternate);\n}\n.dough-selection-container.checked .dough-selection-button > .dough-button:after {\n border-color: rgba(255, 255, 255, 0);\n border-color: var(--dough-color-transparent);\n}\n.dough-selection-container.checked .dough-selection-button > .dough-button > .dough-button-icon > .dough-inline-svg-icon,\n.dough-selection-container.checked .dough-selection-button > .dough-button > .dough-button-icon > .svg-inline--fa {\n opacity: 1;\n transform: translate3d(0, 0, 0) scale(1);\n}\n.dough-selection-container.checked .dough-selection-button > .dough-button.dough-button-size-small > .dough-button-icon > .dough-inline-svg-icon,\n.dough-selection-container.checked .dough-selection-button > .dough-button.dough-button-size-small > .dough-button-icon > .svg-inline--fa {\n transform: translate3d(0, 0, 0) perspective(0px) scale(0.6);\n}\n.dough-selection-container.rounded .dough-selection-button > .dough-button:after {\n border-radius: 100%;\n}\n.dough-selection-container.disabled .dough-selection-button {\n background-color: rgb(230, 230, 230);\n border-radius: 6px;\n}\n.dough-selection-container.rounded.disabled .dough-selection-button {\n background-color: rgb(230, 230, 230);\n border-radius: 100%;\n}\n.dough-selection-container.checked.disabled .dough-selection-button {\n opacity: 0.5;\n}\n.dough-selection-container .dough-selection-left-box {\n cursor: pointer;\n padding: 0;\n}\n.dough-selection-container .dough-selection-right-box {\n cursor: pointer;\n}\n.dough-selection-container .dough-selection-right-box:not(:empty) {\n padding-left: 8px;\n}\n\n.dough-fe-radio-group .dough-fe-group-label {\n font-size: 0.875rem;\n font-weight: 700;\n color: rgb(110, 111, 117);\n color: var(--dough-color-text-default);\n}\n.dough-fe-radio-group .dough-fe-wrapper.dough-checkbox-fe-wrapper {\n margin-top: 4px !important;\n}";
3901
3901
  styleInject(css_248z$n);
3902
3902
 
3903
3903
  var CheckBox = forwardRef(function (props, ref) {
@@ -3934,11 +3934,12 @@ var CheckBox = forwardRef(function (props, ref) {
3934
3934
  React.createElement("div", { className: cn("dough-selection-container", {
3935
3935
  checked: props.value === 1 || props.value,
3936
3936
  rounded: props.rounded,
3937
+ disabled: props.disabled,
3937
3938
  }) },
3938
3939
  React.createElement("input", { readOnly: true, ref: hiddenInputRef, checked: props.value === 1 || props.value ? true : false, className: cn(props.inputClassName, "dough-hidden-input"), disabled: props === null || props === void 0 ? void 0 : props.disabled, type: props.checkOnly ? "radio" : "checkbox", name: props.name, value: props.value ? "on" : "off" }),
3939
3940
  React.createElement(Box, { display: BoxDisplay.FLEX, alignItems: BoxAlign.CENTER, wrap: BoxWrap.NOWRAP },
3940
3941
  React.createElement(Box, { display: BoxDisplay.INLINE_FLEX, alignItems: BoxAlign.CENTER, className: "dough-selection-left-box", padding: Sizes.XXS },
3941
- React.createElement(Button, { className: cn("dough-selection-button", "dough-checkbox-size-" + size), tabIndex: props.tabIndex === undefined
3942
+ React.createElement(Button, { className: cn("dough-selection-button", "dough-checkbox-size-" + size, props.disabled && "dough-button-disabled"), tabIndex: props.tabIndex === undefined
3942
3943
  ? 0
3943
3944
  : props.tabIndex, color: props.value ? color : Colors.TRANSPARENT, icon: getIcon(props.value), onClick: handleChange, rounded: props.rounded, size: size })),
3944
3945
  (props.label || props.children) && (React.createElement(Box, { display: BoxDisplay.FLEX, className: "dough-selection-right-box", flex: "1", alignItems: BoxAlign.CENTER },
@@ -4041,22 +4042,42 @@ var RadioGroup = function (props) {
4041
4042
  };
4042
4043
  RadioGroup.displayName = "RadioGroup";
4043
4044
 
4044
- var css_248z$p = "/* COLORS */\n/* Typography*/\n/*Dennis should provide medium font size*/\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 box-sizing: border-box;\n width: 24px;\n height: 24px;\n padding: 3px 4px 5px 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}";
4045
+ 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 5px 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}";
4045
4046
  styleInject(css_248z$p);
4046
4047
 
4048
+ /* Unpacks children wrapped in Fragments */
4049
+ function flattenChildren(children) {
4050
+ var childrenArray = Children.toArray(children);
4051
+ return childrenArray.reduce(function (flatChildren, child) {
4052
+ if (child.type === Fragment) {
4053
+ return flatChildren.concat(flattenChildren(child.props.children));
4054
+ }
4055
+ flatChildren.push(child);
4056
+ return flatChildren;
4057
+ }, []);
4058
+ }
4059
+
4060
+ var BreadCrumbText = function (_a) {
4061
+ var children = _a.children, className = _a.className;
4062
+ return (React.createElement("span", { className: cn("dough-bread-crumb-ellipsis", className) }, children));
4063
+ };
4047
4064
  var BreadCrumb = function (props) {
4048
- var _a = props.size, size = _a === void 0 ? Sizes.NORMAL : _a;
4065
+ var _a = props.size, size = _a === void 0 ? Sizes.NORMAL : _a, noElementWrapper = props.noElementWrapper;
4049
4066
  var getBreadCrumbs = function (children) {
4050
- var linkItems = Children.toArray(children);
4067
+ var linkItems = flattenChildren(children);
4051
4068
  if (linkItems && linkItems.length > 0) {
4052
4069
  return (React.createElement(React.Fragment, null, linkItems.map(function (link, index) {
4053
4070
  if (index === 0 ||
4054
4071
  linkItems.length < 4 ||
4055
4072
  index >= linkItems.length - 2) {
4056
4073
  return (React.createElement(React.Fragment, { key: "bc-link-" + index },
4057
- React.createElement("span", { className: index < linkItems.length - 1
4074
+ noElementWrapper ? (link) : typeof link === "string" ||
4075
+ typeof link === "number" ? (React.createElement(BreadCrumbText, { className: cn(index < linkItems.length - 1
4076
+ ? ColorsText.LIGHT
4077
+ : ColorsText.DARK) }, link)) : (
4078
+ /* To not include any breaking change, that part will stay*/ React.createElement("span", { className: index < linkItems.length - 1
4058
4079
  ? ColorsText.LIGHT
4059
- : ColorsText.DARK }, link),
4080
+ : ColorsText.DARK }, link)),
4060
4081
  index < linkItems.length - 1 && (React.createElement("span", { className: cn("dough-bread-crumb-right-arrow", "dough-color-icon-default") },
4061
4082
  React.createElement(RightIcon, null)))));
4062
4083
  }
@@ -5522,4 +5543,4 @@ GridItem.displayName = "GridItem";
5522
5543
 
5523
5544
  injectRobotoFont();
5524
5545
 
5525
- 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, ColorTile, Colors, ColorsIcon, ColorsText, Container, ContentSlider, DatePicker, DateTime, DesignTokens, Dialog, Direction, Divider, DoughDateInput, 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, 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 };
5546
+ 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, 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, 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
@@ -600,7 +600,7 @@ var Link = React.forwardRef(function (props, ref) {
600
600
  cancelEvent(e);
601
601
  }
602
602
  }
603
- : undefined, download: props.download, target: props.target, rel: rel, ref: ref }, props.dataAttributes), props.children));
603
+ : undefined, download: props.download, target: props.target, rel: rel, ref: ref, style: { width: props.width, flex: props.flex } }, props.dataAttributes), props.children));
604
604
  });
605
605
  Link.displayName = "Link";
606
606
 
@@ -3881,7 +3881,7 @@ var SelectBox = React.forwardRef(function (props, ref) {
3881
3881
  });
3882
3882
  SelectBox.displayName = "SelectBox";
3883
3883
 
3884
- var css_248z$n = "/* COLORS */\n/* Typography*/\n/*Dennis should provide medium font size*/\n.dough-fe-wrapper.dough-checkbox-fe-wrapper {\n margin-top: 0;\n margin-bottom: 0;\n}\n.dough-fe-wrapper.dough-checkbox-fe-wrapper + .dough-fe-wrapper.dough-checkbox-fe-wrapper {\n margin-top: 8px;\n}\n\n.dough-selection-container {\n outline: none;\n -webkit-tap-highlight-color: transparent;\n width: 100%;\n box-sizing: border-box;\n color: rgb(110, 111, 117);\n color: var(--dough-color-text-default);\n}\n.dough-selection-container * {\n outline: none;\n -webkit-tap-highlight-color: transparent;\n}\nhtml.dough-IE11 .dough-selection-container {\n flex-basis: 32px;\n}\n.dough-selection-container .dough-fe-label {\n font-size: 0.875rem;\n width: 100%;\n}\n.dough-selection-container .dough-selection-button {\n width: 24px;\n min-width: 24px;\n max-width: 24px;\n height: 24px;\n min-height: 24px;\n max-height: 24px;\n}\n.dough-selection-container .dough-selection-button.dough-checkbox-size-small {\n width: 16px;\n min-width: 16px;\n max-width: 16px;\n height: 16px;\n min-height: 16px;\n max-height: 16px;\n}\n.dough-selection-container .dough-selection-button > .dough-button {\n padding: 0;\n margin: 0;\n min-width: 100% !important;\n max-width: 100% !important;\n width: 100% !important;\n height: 100% !important;\n min-height: 100% !important;\n max-height: 100% !important;\n overflow: hidden;\n}\n.dough-selection-container .dough-selection-button > .dough-button:after {\n content: \"\";\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 border: 2px solid rgb(210, 210, 210);\n border: 2px solid var(--dough-color-input-border);\n border-radius: 6px;\n}\nbody:not(.no-transition) .dough-selection-container .dough-selection-button > .dough-button:after {\n transition: all 350ms cubic-bezier(0.25, 1, 0, 1);\n}\nbody.no-transition .dough-selection-container .dough-selection-button > .dough-button:after {\n transition: none 0ms linear !important;\n transition-delay: 0ms !important;\n}\nhtml.dough-IE11 .dough-selection-container .dough-selection-button > .dough-button {\n padding: 0;\n margin: 0;\n}\n.dough-selection-container .dough-selection-button > .dough-button > .dough-button-icon {\n width: 24px;\n height: 24px;\n}\n.dough-selection-container .dough-selection-button > .dough-button > .dough-button-icon > .dough-inline-svg-icon,\n.dough-selection-container .dough-selection-button > .dough-button > .dough-button-icon > .svg-inline--fa {\n opacity: 0;\n transform: translate3d(0, 0, 0) scale(0.2);\n width: 16px;\n height: 16px;\n}\nbody:not(.no-transition) .dough-selection-container .dough-selection-button > .dough-button > .dough-button-icon > .dough-inline-svg-icon,\nbody:not(.no-transition) .dough-selection-container .dough-selection-button > .dough-button > .dough-button-icon > .svg-inline--fa {\n transition: all 750ms cubic-bezier(0.25, 1, 0, 1);\n}\nbody.no-transition .dough-selection-container .dough-selection-button > .dough-button > .dough-button-icon > .dough-inline-svg-icon,\nbody.no-transition .dough-selection-container .dough-selection-button > .dough-button > .dough-button-icon > .svg-inline--fa {\n transition: none 0ms linear !important;\n transition-delay: 0ms !important;\n}\n.dough-selection-container .dough-selection-button > .dough-button > .dough-button-icon > .dough-inline-svg-icon path,\n.dough-selection-container .dough-selection-button > .dough-button > .dough-button-icon > .svg-inline--fa path {\n fill: rgb(255, 255, 255);\n fill: var(--dough-color-header-alternate);\n}\n.dough-selection-container .dough-selection-button:focus > .dough-button:after {\n border-color: rgb(68, 132, 199);\n border-color: var(--dough-color-primary);\n}\n.dough-selection-container .dough-selection-button > .dough-button {\n box-shadow: none !important;\n}\n.dough-selection-container:not(.checked) .dough-selection-button > .dough-button .dough-button-background-wrapper {\n background-color: transparent !important;\n}\n.dough-selection-container:not(.checked) .dough-selection-button > .dough-button .dough-button-background-wrapper > .dough-button-background-glow {\n display: none;\n}\n.dough-selection-container:not(.checked) .dough-selection-button > .dough-button > .dough-button-icon > .dough-inline-svg-icon path,\n.dough-selection-container:not(.checked) .dough-selection-button > .dough-button > .dough-button-icon > .svg-inline--fa path {\n fill: rgb(110, 111, 117);\n fill: var(--dough-color-transparent-alternate);\n}\n.dough-selection-container.checked .dough-selection-button > .dough-button:after {\n border-color: rgba(255, 255, 255, 0);\n border-color: var(--dough-color-transparent);\n}\n.dough-selection-container.checked .dough-selection-button > .dough-button > .dough-button-icon > .dough-inline-svg-icon,\n.dough-selection-container.checked .dough-selection-button > .dough-button > .dough-button-icon > .svg-inline--fa {\n opacity: 1;\n transform: translate3d(0, 0, 0) scale(1);\n}\n.dough-selection-container.checked .dough-selection-button > .dough-button.dough-button-size-small > .dough-button-icon > .dough-inline-svg-icon,\n.dough-selection-container.checked .dough-selection-button > .dough-button.dough-button-size-small > .dough-button-icon > .svg-inline--fa {\n transform: translate3d(0, 0, 0) perspective(0px) scale(0.6);\n}\n.dough-selection-container.rounded .dough-selection-button > .dough-button:after {\n border-radius: 100%;\n}\n.dough-selection-container .dough-selection-left-box {\n cursor: pointer;\n padding: 0;\n}\n.dough-selection-container .dough-selection-right-box {\n cursor: pointer;\n}\n.dough-selection-container .dough-selection-right-box:not(:empty) {\n padding-left: 8px;\n}\n\n.dough-fe-radio-group .dough-fe-group-label {\n font-size: 0.875rem;\n font-weight: 700;\n color: rgb(110, 111, 117);\n color: var(--dough-color-text-default);\n}\n.dough-fe-radio-group .dough-fe-wrapper.dough-checkbox-fe-wrapper {\n margin-top: 4px !important;\n}";
3884
+ var css_248z$n = "/* COLORS */\n/* Typography*/\n/*Dennis should provide medium font size*/\n.dough-fe-wrapper.dough-checkbox-fe-wrapper {\n margin-top: 0;\n margin-bottom: 0;\n}\n.dough-fe-wrapper.dough-checkbox-fe-wrapper + .dough-fe-wrapper.dough-checkbox-fe-wrapper {\n margin-top: 8px;\n}\n\n.dough-selection-container {\n outline: none;\n -webkit-tap-highlight-color: transparent;\n width: 100%;\n box-sizing: border-box;\n color: rgb(110, 111, 117);\n color: var(--dough-color-text-default);\n}\n.dough-selection-container * {\n outline: none;\n -webkit-tap-highlight-color: transparent;\n}\nhtml.dough-IE11 .dough-selection-container {\n flex-basis: 32px;\n}\n.dough-selection-container .dough-fe-label {\n font-size: 0.875rem;\n width: 100%;\n}\n.dough-selection-container .dough-selection-button {\n width: 24px;\n min-width: 24px;\n max-width: 24px;\n height: 24px;\n min-height: 24px;\n max-height: 24px;\n}\n.dough-selection-container .dough-selection-button.dough-checkbox-size-small {\n width: 16px;\n min-width: 16px;\n max-width: 16px;\n height: 16px;\n min-height: 16px;\n max-height: 16px;\n}\n.dough-selection-container .dough-selection-button > .dough-button {\n padding: 0;\n margin: 0;\n min-width: 100% !important;\n max-width: 100% !important;\n width: 100% !important;\n height: 100% !important;\n min-height: 100% !important;\n max-height: 100% !important;\n overflow: hidden;\n}\n.dough-selection-container .dough-selection-button > .dough-button:after {\n content: \"\";\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 border: 2px solid rgb(210, 210, 210);\n border: 2px solid var(--dough-color-input-border);\n border-radius: 6px;\n}\nbody:not(.no-transition) .dough-selection-container .dough-selection-button > .dough-button:after {\n transition: all 350ms cubic-bezier(0.25, 1, 0, 1);\n}\nbody.no-transition .dough-selection-container .dough-selection-button > .dough-button:after {\n transition: none 0ms linear !important;\n transition-delay: 0ms !important;\n}\nhtml.dough-IE11 .dough-selection-container .dough-selection-button > .dough-button {\n padding: 0;\n margin: 0;\n}\n.dough-selection-container .dough-selection-button > .dough-button > .dough-button-icon {\n width: 24px;\n height: 24px;\n}\n.dough-selection-container .dough-selection-button > .dough-button > .dough-button-icon > .dough-inline-svg-icon,\n.dough-selection-container .dough-selection-button > .dough-button > .dough-button-icon > .svg-inline--fa {\n opacity: 0;\n transform: translate3d(0, 0, 0) scale(0.2);\n width: 16px;\n height: 16px;\n}\nbody:not(.no-transition) .dough-selection-container .dough-selection-button > .dough-button > .dough-button-icon > .dough-inline-svg-icon,\nbody:not(.no-transition) .dough-selection-container .dough-selection-button > .dough-button > .dough-button-icon > .svg-inline--fa {\n transition: all 750ms cubic-bezier(0.25, 1, 0, 1);\n}\nbody.no-transition .dough-selection-container .dough-selection-button > .dough-button > .dough-button-icon > .dough-inline-svg-icon,\nbody.no-transition .dough-selection-container .dough-selection-button > .dough-button > .dough-button-icon > .svg-inline--fa {\n transition: none 0ms linear !important;\n transition-delay: 0ms !important;\n}\n.dough-selection-container .dough-selection-button > .dough-button > .dough-button-icon > .dough-inline-svg-icon path,\n.dough-selection-container .dough-selection-button > .dough-button > .dough-button-icon > .svg-inline--fa path {\n fill: rgb(255, 255, 255);\n fill: var(--dough-color-header-alternate);\n}\n.dough-selection-container .dough-selection-button:focus > .dough-button:after {\n border-color: rgb(68, 132, 199);\n border-color: var(--dough-color-primary);\n}\n.dough-selection-container .dough-selection-button > .dough-button {\n box-shadow: none !important;\n}\n.dough-selection-container:not(.checked) .dough-selection-button > .dough-button .dough-button-background-wrapper {\n background-color: transparent !important;\n}\n.dough-selection-container:not(.checked) .dough-selection-button > .dough-button .dough-button-background-wrapper > .dough-button-background-glow {\n display: none;\n}\n.dough-selection-container:not(.checked) .dough-selection-button > .dough-button > .dough-button-icon > .dough-inline-svg-icon path,\n.dough-selection-container:not(.checked) .dough-selection-button > .dough-button > .dough-button-icon > .svg-inline--fa path {\n fill: rgb(110, 111, 117);\n fill: var(--dough-color-transparent-alternate);\n}\n.dough-selection-container.checked .dough-selection-button > .dough-button:after {\n border-color: rgba(255, 255, 255, 0);\n border-color: var(--dough-color-transparent);\n}\n.dough-selection-container.checked .dough-selection-button > .dough-button > .dough-button-icon > .dough-inline-svg-icon,\n.dough-selection-container.checked .dough-selection-button > .dough-button > .dough-button-icon > .svg-inline--fa {\n opacity: 1;\n transform: translate3d(0, 0, 0) scale(1);\n}\n.dough-selection-container.checked .dough-selection-button > .dough-button.dough-button-size-small > .dough-button-icon > .dough-inline-svg-icon,\n.dough-selection-container.checked .dough-selection-button > .dough-button.dough-button-size-small > .dough-button-icon > .svg-inline--fa {\n transform: translate3d(0, 0, 0) perspective(0px) scale(0.6);\n}\n.dough-selection-container.rounded .dough-selection-button > .dough-button:after {\n border-radius: 100%;\n}\n.dough-selection-container.disabled .dough-selection-button {\n background-color: rgb(230, 230, 230);\n border-radius: 6px;\n}\n.dough-selection-container.rounded.disabled .dough-selection-button {\n background-color: rgb(230, 230, 230);\n border-radius: 100%;\n}\n.dough-selection-container.checked.disabled .dough-selection-button {\n opacity: 0.5;\n}\n.dough-selection-container .dough-selection-left-box {\n cursor: pointer;\n padding: 0;\n}\n.dough-selection-container .dough-selection-right-box {\n cursor: pointer;\n}\n.dough-selection-container .dough-selection-right-box:not(:empty) {\n padding-left: 8px;\n}\n\n.dough-fe-radio-group .dough-fe-group-label {\n font-size: 0.875rem;\n font-weight: 700;\n color: rgb(110, 111, 117);\n color: var(--dough-color-text-default);\n}\n.dough-fe-radio-group .dough-fe-wrapper.dough-checkbox-fe-wrapper {\n margin-top: 4px !important;\n}";
3885
3885
  styleInject(css_248z$n);
3886
3886
 
3887
3887
  var CheckBox = React.forwardRef(function (props, ref) {
@@ -3918,11 +3918,12 @@ var CheckBox = React.forwardRef(function (props, ref) {
3918
3918
  React__default.createElement("div", { className: cn("dough-selection-container", {
3919
3919
  checked: props.value === 1 || props.value,
3920
3920
  rounded: props.rounded,
3921
+ disabled: props.disabled,
3921
3922
  }) },
3922
3923
  React__default.createElement("input", { readOnly: true, ref: hiddenInputRef, checked: props.value === 1 || props.value ? true : false, className: cn(props.inputClassName, "dough-hidden-input"), disabled: props === null || props === void 0 ? void 0 : props.disabled, type: props.checkOnly ? "radio" : "checkbox", name: props.name, value: props.value ? "on" : "off" }),
3923
3924
  React__default.createElement(Box, { display: exports.BoxDisplay.FLEX, alignItems: exports.BoxAlign.CENTER, wrap: exports.BoxWrap.NOWRAP },
3924
3925
  React__default.createElement(Box, { display: exports.BoxDisplay.INLINE_FLEX, alignItems: exports.BoxAlign.CENTER, className: "dough-selection-left-box", padding: exports.Sizes.XXS },
3925
- React__default.createElement(Button, { className: cn("dough-selection-button", "dough-checkbox-size-" + size), tabIndex: props.tabIndex === undefined
3926
+ React__default.createElement(Button, { className: cn("dough-selection-button", "dough-checkbox-size-" + size, props.disabled && "dough-button-disabled"), tabIndex: props.tabIndex === undefined
3926
3927
  ? 0
3927
3928
  : props.tabIndex, color: props.value ? color : exports.Colors.TRANSPARENT, icon: getIcon(props.value), onClick: handleChange, rounded: props.rounded, size: size })),
3928
3929
  (props.label || props.children) && (React__default.createElement(Box, { display: exports.BoxDisplay.FLEX, className: "dough-selection-right-box", flex: "1", alignItems: exports.BoxAlign.CENTER },
@@ -4025,22 +4026,42 @@ var RadioGroup = function (props) {
4025
4026
  };
4026
4027
  RadioGroup.displayName = "RadioGroup";
4027
4028
 
4028
- var css_248z$p = "/* COLORS */\n/* Typography*/\n/*Dennis should provide medium font size*/\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 box-sizing: border-box;\n width: 24px;\n height: 24px;\n padding: 3px 4px 5px 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}";
4029
+ 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 5px 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}";
4029
4030
  styleInject(css_248z$p);
4030
4031
 
4032
+ /* Unpacks children wrapped in Fragments */
4033
+ function flattenChildren(children) {
4034
+ var childrenArray = React.Children.toArray(children);
4035
+ return childrenArray.reduce(function (flatChildren, child) {
4036
+ if (child.type === React.Fragment) {
4037
+ return flatChildren.concat(flattenChildren(child.props.children));
4038
+ }
4039
+ flatChildren.push(child);
4040
+ return flatChildren;
4041
+ }, []);
4042
+ }
4043
+
4044
+ var BreadCrumbText = function (_a) {
4045
+ var children = _a.children, className = _a.className;
4046
+ return (React__default.createElement("span", { className: cn("dough-bread-crumb-ellipsis", className) }, children));
4047
+ };
4031
4048
  var BreadCrumb = function (props) {
4032
- var _a = props.size, size = _a === void 0 ? exports.Sizes.NORMAL : _a;
4049
+ var _a = props.size, size = _a === void 0 ? exports.Sizes.NORMAL : _a, noElementWrapper = props.noElementWrapper;
4033
4050
  var getBreadCrumbs = function (children) {
4034
- var linkItems = React.Children.toArray(children);
4051
+ var linkItems = flattenChildren(children);
4035
4052
  if (linkItems && linkItems.length > 0) {
4036
4053
  return (React__default.createElement(React__default.Fragment, null, linkItems.map(function (link, index) {
4037
4054
  if (index === 0 ||
4038
4055
  linkItems.length < 4 ||
4039
4056
  index >= linkItems.length - 2) {
4040
4057
  return (React__default.createElement(React__default.Fragment, { key: "bc-link-" + index },
4041
- React__default.createElement("span", { className: index < linkItems.length - 1
4058
+ noElementWrapper ? (link) : typeof link === "string" ||
4059
+ typeof link === "number" ? (React__default.createElement(BreadCrumbText, { className: cn(index < linkItems.length - 1
4060
+ ? exports.ColorsText.LIGHT
4061
+ : exports.ColorsText.DARK) }, link)) : (
4062
+ /* To not include any breaking change, that part will stay*/ React__default.createElement("span", { className: index < linkItems.length - 1
4042
4063
  ? exports.ColorsText.LIGHT
4043
- : exports.ColorsText.DARK }, link),
4064
+ : exports.ColorsText.DARK }, link)),
4044
4065
  index < linkItems.length - 1 && (React__default.createElement("span", { className: cn("dough-bread-crumb-right-arrow", "dough-color-icon-default") },
4045
4066
  React__default.createElement(RightIcon, null)))));
4046
4067
  }
@@ -5508,6 +5529,7 @@ exports.BR = BR;
5508
5529
  exports.Badge = Badge;
5509
5530
  exports.Box = Box;
5510
5531
  exports.BreadCrumb = BreadCrumb;
5532
+ exports.BreadCrumbText = BreadCrumbText;
5511
5533
  exports.BreakpointViewer = BreakpointViewer;
5512
5534
  exports.Button = Button;
5513
5535
  exports.Card = Card;
@@ -0,0 +1,24 @@
1
+ import { BreadCrumbProps } from "./bread-crumb";
2
+ declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react").ReactFramework, BreadCrumbProps>;
3
+ export default _default;
4
+ export declare const Simple: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactFramework, BreadCrumbProps & {
5
+ width: string;
6
+ }>;
7
+ export declare const OneChild: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactFramework, BreadCrumbProps & {
8
+ width: string;
9
+ }>;
10
+ export declare const LimitedWidth: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactFramework, BreadCrumbProps & {
11
+ width: string;
12
+ }>;
13
+ export declare const MultipleChildren: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactFramework, BreadCrumbProps & {
14
+ width: string;
15
+ }>;
16
+ export declare const CustomChildren: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactFramework, BreadCrumbProps & {
17
+ width: string;
18
+ }>;
19
+ export declare const CustomChildrenLimitedWidth: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactFramework, BreadCrumbProps & {
20
+ width: string;
21
+ }>;
22
+ export declare const WithoutUsingFragments: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactFramework, BreadCrumbProps & {
23
+ width: string;
24
+ }>;
@@ -0,0 +1,4 @@
1
+ import { Children, ReactNode } from "react";
2
+ declare type ReactChildArray = ReturnType<typeof Children.toArray>;
3
+ export declare function flattenChildren(children: ReactNode): ReactChildArray;
4
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@speakapbv/dough-component-library",
3
- "version": "9.19.0",
3
+ "version": "9.20.2",
4
4
  "description": "DOUGH: Speakap React Component Library",
5
5
  "author": "Speakap",
6
6
  "license": "MIT",