carbon-react 155.8.0 → 155.9.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/esm/components/adaptive-sidebar/adaptive-sidebar.component.d.ts +3 -1
- package/esm/components/adaptive-sidebar/adaptive-sidebar.component.js +1 -1
- package/esm/components/adaptive-sidebar/adaptive-sidebar.style.d.ts +1 -0
- package/esm/components/adaptive-sidebar/adaptive-sidebar.style.js +1 -1
- package/esm/components/box/box.component.d.ts +2 -0
- package/esm/components/box/box.component.js +1 -1
- package/esm/components/box/box.style.js +1 -1
- package/lib/components/adaptive-sidebar/adaptive-sidebar.component.d.ts +3 -1
- package/lib/components/adaptive-sidebar/adaptive-sidebar.component.js +1 -1
- package/lib/components/adaptive-sidebar/adaptive-sidebar.style.d.ts +1 -0
- package/lib/components/adaptive-sidebar/adaptive-sidebar.style.js +1 -1
- package/lib/components/box/box.component.d.ts +2 -0
- package/lib/components/box/box.component.js +1 -1
- package/lib/components/box/box.style.js +1 -1
- package/package.json +1 -1
|
@@ -14,6 +14,8 @@ export interface AdaptiveSidebarProps extends MarginProps, PaddingProps, Omit<Ta
|
|
|
14
14
|
children?: React.ReactNode;
|
|
15
15
|
/** The height of the sidebar, relative to the wrapping component */
|
|
16
16
|
height?: string;
|
|
17
|
+
/** Whether the sidebar is hidden from view. In this state, the adaptive sidebar will continue to receive updates, etc. but will not be visible to users */
|
|
18
|
+
hidden?: boolean;
|
|
17
19
|
/** Whether the sidebar is open or closed */
|
|
18
20
|
open: boolean;
|
|
19
21
|
/** Whether to render the sidebar as a modal component instead of as an inline sidebar */
|
|
@@ -21,5 +23,5 @@ export interface AdaptiveSidebarProps extends MarginProps, PaddingProps, Omit<Ta
|
|
|
21
23
|
/** The width of the sidebar */
|
|
22
24
|
width?: string;
|
|
23
25
|
}
|
|
24
|
-
export declare const AdaptiveSidebar: ({ adaptiveBreakpoint, backgroundColor, borderColor, children, height, open, renderAsModal, width, ...props }: AdaptiveSidebarProps) => React.JSX.Element | null;
|
|
26
|
+
export declare const AdaptiveSidebar: ({ adaptiveBreakpoint, backgroundColor, borderColor, children, height, hidden, open, renderAsModal, width, ...props }: AdaptiveSidebarProps) => React.JSX.Element | null;
|
|
25
27
|
export default AdaptiveSidebar;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{useRef as r,useEffect as t}from"react";import{getColors as o,kebabToCamelCase as n}from"./__internal__/utils.js";import{Box as i}from"../box/box.component.js";import a from"../../style/utils/filter-styled-system-padding-props.js";import l from"../../style/utils/filter-styled-system-margin-props.js";import
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{useRef as r,useEffect as t}from"react";import{getColors as o,kebabToCamelCase as n}from"./__internal__/utils.js";import{Box as i}from"../box/box.component.js";import a from"../../style/utils/filter-styled-system-padding-props.js";import l from"../../style/utils/filter-styled-system-margin-props.js";import d from"../../hooks/__internal__/useIsAboveBreakpoint/useIsAboveBreakpoint.js";import{StyledSidebar as c,StyledAdaptiveSidebar as p}from"./adaptive-sidebar.style.js";function s(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function b(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},o=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),o.forEach((function(r){s(e,r,t[r])}))}return e}function u(e,r){return r=null!=r?r:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):function(e){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r.push.apply(r,t)}return r}(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})),e}const f=s=>{var{adaptiveBreakpoint:f=768,backgroundColor:m="white",borderColor:y="none",children:O,height:h="100%",hidden:g=!1,open:j,renderAsModal:v=!1,width:w="320px"}=s,k=function(e,r){if(null==e)return{};var t,o,n=function(e,r){if(null==e)return{};var t,o,n={},i=Object.keys(e);for(o=0;o<i.length;o++)t=i[o],r.indexOf(t)>=0||(n[t]=e[t]);return n}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)t=i[o],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(n[t]=e[t])}return n}(s,["adaptiveBreakpoint","backgroundColor","borderColor","children","height","hidden","open","renderAsModal","width"]);const P=d(f),x=r(null),_=Object.entries(o(m)).reduce(((e,[r,t])=>(e[n(r)]=t,e)),{});return t((()=>{x.current&&x.current.focus()}),[j]),t((()=>{g&&j&&document.querySelectorAll("[inert]").forEach((e=>{e.removeAttribute("inert")}))}),[g,j]),v||!P?e(c,{backgroundColor:m,className:"adaptive-sidebar-modal-view","data-role":"adaptive-sidebar-modal-view",enableBackgroundUI:j&&g,hidden:g,open:j,p:0,ref:x,children:e(i,u(b({"data-role":"adaptive-sidebar-content-wrapper",height:"100%"},_),{children:O}))}):j?e(p,u(b({backgroundColor:m,borderColor:"none"===y?void 0:y,"data-element":"adaptive-sidebar","data-role":"adaptive-sidebar",height:h,hidden:g,ref:x,role:"region",tabIndex:-1,width:w},l(k),a(k)),{children:e(i,{"data-role":"adaptive-sidebar-content-wrapper",children:O})})):null};export{f as AdaptiveSidebar,f as default};
|
|
@@ -7,6 +7,7 @@ type StyledAdaptiveSidebarProps = Pick<AdaptiveSidebarProps, "backgroundColor" |
|
|
|
7
7
|
declare const StyledAdaptiveSidebar: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../box").BoxProps & import("react").RefAttributes<HTMLDivElement>>, any, StyledAdaptiveSidebarProps, never>;
|
|
8
8
|
interface StyledSidebarProps extends SidebarProps {
|
|
9
9
|
backgroundColor: "app" | "black" | "white";
|
|
10
|
+
hidden?: boolean;
|
|
10
11
|
}
|
|
11
12
|
declare const StyledSidebar: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<SidebarProps & import("react").RefAttributes<HTMLDivElement>>, any, StyledSidebarProps, never>;
|
|
12
13
|
export { StyledAdaptiveSidebar, StyledSidebar };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import o,{css as
|
|
1
|
+
import o,{css as e}from"styled-components";import{margin as t,padding as i}from"styled-system";import{Box as d}from"../box/box.component.js";import{Sidebar as r}from"../sidebar/sidebar.component.js";import{getColors as a}from"./__internal__/utils.js";const n=o(d).withConfig({displayName:"adaptive-sidebar.style__StyledAdaptiveSidebar",componentId:"sc-efb2ab32-0"})(["",";"],(({backgroundColor:o,borderColor:d,height:r,hidden:n,width:s})=>e([""," "," "," max-height:",";max-width:",";min-width:",";overflow-y:auto;"," ",""],a(o),d&&e(["border-left:1px solid var(",");"],d),n&&e(["display:none;"]),r,s,s,t,i))),s=o(r).withConfig({displayName:"adaptive-sidebar.style__StyledSidebar",componentId:"sc-efb2ab32-1"})([""," ",""],(({hidden:o})=>e(["",""],o&&e(["display:none;"]))),(({backgroundColor:o})=>e(['div[data-element="sidebar-content"]{',"}"],a(o))));export{n as StyledAdaptiveSidebar,s as StyledSidebar};
|
|
@@ -45,6 +45,8 @@ export interface BoxProps extends FlexboxProps, Omit<GridProps, "gridGap" | "gri
|
|
|
45
45
|
bg?: string;
|
|
46
46
|
/** Set the backgroundColor attribute of the Box component */
|
|
47
47
|
backgroundColor?: string;
|
|
48
|
+
/** Whether the component is hidden from view. In this state, the component will not be visible to users but will remain in the HTML document */
|
|
49
|
+
hidden?: boolean;
|
|
48
50
|
/** Set the opacity attribute of the Box component */
|
|
49
51
|
opacity?: string | number;
|
|
50
52
|
/** Set the container to be hidden from screen readers */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as r}from"react/jsx-runtime";import e from"react";import t from"../../style/utils/filter-styled-system-padding-props.js";import o from"../../style/utils/filter-styled-system-margin-props.js";import n from"../../style/utils/filter-styled-system-layout-props.js";import i from"../../style/utils/filter-styled-system-flexbox-props.js";import a from"../../style/utils/filter-styled-system-grid-props.js";import s from"./box.style.js";import l from"../../__internal__/utils/helpers/tags/tags.js";function p(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}const c=e.forwardRef(((e,c)=>{var{"data-component":
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import e from"react";import t from"../../style/utils/filter-styled-system-padding-props.js";import o from"../../style/utils/filter-styled-system-margin-props.js";import n from"../../style/utils/filter-styled-system-layout-props.js";import i from"../../style/utils/filter-styled-system-flexbox-props.js";import a from"../../style/utils/filter-styled-system-grid-props.js";import s from"./box.style.js";import l from"../../__internal__/utils/helpers/tags/tags.js";function p(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}const c=e.forwardRef(((e,c)=>{var{"data-component":d,tabIndex:f,as:b,id:y,role:u,overflowWrap:m,scrollVariant:g,boxSizing:O,gap:h,columnGap:j,rowGap:w,className:x,children:P,bg:v,backgroundColor:S,boxShadow:k,borderRadius:G,color:D,opacity:I,height:N,width:R,hidden:$,"aria-hidden":_}=e,z=function(r,e){if(null==r)return{};var t,o,n=function(r,e){if(null==r)return{};var t,o,n={},i=Object.keys(r);for(o=0;o<i.length;o++)t=i[o],e.indexOf(t)>=0||(n[t]=r[t]);return n}(r,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);for(o=0;o<i.length;o++)t=i[o],e.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(r,t)&&(n[t]=r[t])}return n}(e,["data-component","tabIndex","as","id","role","overflowWrap","scrollVariant","boxSizing","gap","columnGap","rowGap","className","children","bg","backgroundColor","boxShadow","borderRadius","color","opacity","height","width","hidden","aria-hidden"]);let C="";"number"==typeof R?C=R<=1?`${(100*R).toFixed(0)}%`:`${R}px`:"string"==typeof R&&(C=R);let E="";"number"==typeof N?E=N<=1?`${(100*N).toFixed(0)}%`:`${N}px`:"string"==typeof N&&(E=N);const V={color:D,opacity:I,width:C,height:E};return r(s,(W=function(r){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{},o=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(t).filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})))),o.forEach((function(e){p(r,e,t[e])}))}return r}({as:b,id:y,role:u,overflowWrap:m,scrollVariant:g,boxSizing:O,gap:h,columnGap:j,rowGap:w,className:x,ref:c,bg:v,backgroundColor:S,boxShadow:k,borderRadius:G,"aria-hidden":_,hidden:$},l(d,z),o(z),t(z),i(z),a(z),n(z)),F=null!=(F={cssProps:V,tabIndex:f,children:P})?F:{},Object.getOwnPropertyDescriptors?Object.defineProperties(W,Object.getOwnPropertyDescriptors(F)):function(r){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(r);e.push.apply(e,t)}return e}(Object(F)).forEach((function(r){Object.defineProperty(W,r,Object.getOwnPropertyDescriptor(F,r))})),W));var W,F}));c.displayName="Box";export{c as Box,c as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import o,{css as r}from"styled-components";import{space as t,layout as e,flexbox as i,grid as n,position as l}from"styled-system";import s from"../../style/utils/box-gap.js";import c from"../../style/utils/color.js";import a from"./box.config.js";import
|
|
1
|
+
import o,{css as r}from"styled-components";import{space as t,layout as e,flexbox as i,grid as n,position as l}from"styled-system";import s from"../../style/utils/box-gap.js";import c from"../../style/utils/color.js";import a from"./box.config.js";import d from"../../style/themes/apply-base-theme.js";function b(o,r,t){return r in o?Object.defineProperty(o,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[r]=t,o}function p(o){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},e=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(e=e.concat(Object.getOwnPropertySymbols(t).filter((function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})))),e.forEach((function(r){b(o,r,t[r])}))}return o}function u(o,r){if(null==o)return{};var t,e,i=function(o,r){if(null==o)return{};var t,e,i={},n=Object.keys(o);for(e=0;e<n.length;e++)t=n[e],r.indexOf(t)>=0||(i[t]=o[t]);return i}(o,r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(o);for(e=0;e<n.length;e++)t=n[e],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(o,t)&&(i[t]=o[t])}return i}const f=o.div.attrs(d).withConfig({displayName:"box.style__StyledBox",componentId:"sc-9d14423c-0"})([""," "," "," "," "," "," "," "," "," "," "," "," "," ",";"," ",""],t,e,i,n,(o=>{const r=l(o),{position:t}=r,e=u(r,["position"]);return p({position:t,zIndex:["sticky","fixed"].includes(t)?3:void 0},e)}),(({borderRadius:o="borderRadius000"})=>r(["border-radius:var(--",");"],o)),(o=>{var{cssProps:r,bg:t,backgroundColor:e}=o,i=u(o,["cssProps","bg","backgroundColor"]);return c(p({color:null==r?void 0:r.color,bg:t,backgroundColor:e},i))}),(({cssProps:o})=>r(["opacity:",";"],null==o?void 0:o.opacity)),(({overflowWrap:o})=>o&&r(["overflow-wrap:",";"],o)),(({cssProps:o,size:t})=>(null==o?void 0:o.height)&&!t&&r(["height:",";"],null==o?void 0:o.height)),(({cssProps:o,size:t})=>(null==o?void 0:o.width)&&!t&&r(["width:",";"],null==o?void 0:o.width)),(({scrollVariant:o})=>o&&r(["scrollbar-color:"," ",";&::-webkit-scrollbar{width:8px;}&::-webkit-scrollbar-track{background-color:",";}&::-webkit-scrollbar-thumb{background-color:",";}"],a[o].thumb,a[o].track,a[o].track,a[o].thumb)),(({boxSizing:o})=>o&&r(["box-sizing:",";"],o)),(({display:o,gap:t,columnGap:e,rowGap:i})=>("flex"===o||"inline-flex"===o||"grid"===o||"inline-grid"===o)&&r([""," "," ",""],void 0!==t&&r(["gap:",";"],s(t)),void 0!==e&&r(["column-gap:",";"],s(e)),void 0!==i&&r(["row-gap:",";"],s(i)))),(({boxShadow:o})=>o&&r(["box-shadow:var(--",");"],o)),(({display:o,hidden:t})=>r(["display:",";"],t?"none":o)));export{f as default};
|
|
@@ -14,6 +14,8 @@ export interface AdaptiveSidebarProps extends MarginProps, PaddingProps, Omit<Ta
|
|
|
14
14
|
children?: React.ReactNode;
|
|
15
15
|
/** The height of the sidebar, relative to the wrapping component */
|
|
16
16
|
height?: string;
|
|
17
|
+
/** Whether the sidebar is hidden from view. In this state, the adaptive sidebar will continue to receive updates, etc. but will not be visible to users */
|
|
18
|
+
hidden?: boolean;
|
|
17
19
|
/** Whether the sidebar is open or closed */
|
|
18
20
|
open: boolean;
|
|
19
21
|
/** Whether to render the sidebar as a modal component instead of as an inline sidebar */
|
|
@@ -21,5 +23,5 @@ export interface AdaptiveSidebarProps extends MarginProps, PaddingProps, Omit<Ta
|
|
|
21
23
|
/** The width of the sidebar */
|
|
22
24
|
width?: string;
|
|
23
25
|
}
|
|
24
|
-
export declare const AdaptiveSidebar: ({ adaptiveBreakpoint, backgroundColor, borderColor, children, height, open, renderAsModal, width, ...props }: AdaptiveSidebarProps) => React.JSX.Element | null;
|
|
26
|
+
export declare const AdaptiveSidebar: ({ adaptiveBreakpoint, backgroundColor, borderColor, children, height, hidden, open, renderAsModal, width, ...props }: AdaptiveSidebarProps) => React.JSX.Element | null;
|
|
25
27
|
export default AdaptiveSidebar;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react"),t=require("./__internal__/utils.js"),o=require("../box/box.component.js"),n=require("../../style/utils/filter-styled-system-padding-props.js"),i=require("../../style/utils/filter-styled-system-margin-props.js"),a=require("../../hooks/__internal__/useIsAboveBreakpoint/useIsAboveBreakpoint.js"),l=require("./adaptive-sidebar.style.js");function
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react"),t=require("./__internal__/utils.js"),o=require("../box/box.component.js"),n=require("../../style/utils/filter-styled-system-padding-props.js"),i=require("../../style/utils/filter-styled-system-margin-props.js"),a=require("../../hooks/__internal__/useIsAboveBreakpoint/useIsAboveBreakpoint.js"),l=require("./adaptive-sidebar.style.js");function d(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function s(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},o=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),o.forEach((function(r){d(e,r,t[r])}))}return e}function c(e,r){return r=null!=r?r:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):function(e){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r.push.apply(r,t)}return r}(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})),e}const u=d=>{var{adaptiveBreakpoint:u=768,backgroundColor:p="white",borderColor:b="none",children:f,height:y="100%",hidden:O=!1,open:j,renderAsModal:h=!1,width:v="320px"}=d,g=function(e,r){if(null==e)return{};var t,o,n=function(e,r){if(null==e)return{};var t,o,n={},i=Object.keys(e);for(o=0;o<i.length;o++)t=i[o],r.indexOf(t)>=0||(n[t]=e[t]);return n}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)t=i[o],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(n[t]=e[t])}return n}(d,["adaptiveBreakpoint","backgroundColor","borderColor","children","height","hidden","open","renderAsModal","width"]);const m=a.default(u),w=r.useRef(null),x=Object.entries(t.getColors(p)).reduce(((e,[r,o])=>(e[t.kebabToCamelCase(r)]=o,e)),{});return r.useEffect((()=>{w.current&&w.current.focus()}),[j]),r.useEffect((()=>{O&&j&&document.querySelectorAll("[inert]").forEach((e=>{e.removeAttribute("inert")}))}),[O,j]),h||!m?e.jsx(l.StyledSidebar,{backgroundColor:p,className:"adaptive-sidebar-modal-view","data-role":"adaptive-sidebar-modal-view",enableBackgroundUI:j&&O,hidden:O,open:j,p:0,ref:w,children:e.jsx(o.Box,c(s({"data-role":"adaptive-sidebar-content-wrapper",height:"100%"},x),{children:f}))}):j?e.jsx(l.StyledAdaptiveSidebar,c(s({backgroundColor:p,borderColor:"none"===b?void 0:b,"data-element":"adaptive-sidebar","data-role":"adaptive-sidebar",height:y,hidden:O,ref:w,role:"region",tabIndex:-1,width:v},i.default(g),n.default(g)),{children:e.jsx(o.Box,{"data-role":"adaptive-sidebar-content-wrapper",children:f})})):null};exports.AdaptiveSidebar=u,exports.default=u;
|
|
@@ -7,6 +7,7 @@ type StyledAdaptiveSidebarProps = Pick<AdaptiveSidebarProps, "backgroundColor" |
|
|
|
7
7
|
declare const StyledAdaptiveSidebar: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../box").BoxProps & import("react").RefAttributes<HTMLDivElement>>, any, StyledAdaptiveSidebarProps, never>;
|
|
8
8
|
interface StyledSidebarProps extends SidebarProps {
|
|
9
9
|
backgroundColor: "app" | "black" | "white";
|
|
10
|
+
hidden?: boolean;
|
|
10
11
|
}
|
|
11
12
|
declare const StyledSidebar: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<SidebarProps & import("react").RefAttributes<HTMLDivElement>>, any, StyledSidebarProps, never>;
|
|
12
13
|
export { StyledAdaptiveSidebar, StyledSidebar };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("styled-components"),
|
|
1
|
+
"use strict";var e=require("styled-components"),d=require("styled-system"),t=require("../box/box.component.js"),i=require("../sidebar/sidebar.component.js"),s=require("./__internal__/utils.js");function r(e){return e&&e.__esModule?e:{default:e}}var o=r(e);const a=o.default(t.Box).withConfig({displayName:"adaptive-sidebar.style__StyledAdaptiveSidebar",componentId:"sc-efb2ab32-0"})(["",";"],(({backgroundColor:t,borderColor:i,height:r,hidden:o,width:a})=>e.css([""," "," "," max-height:",";max-width:",";min-width:",";overflow-y:auto;"," ",""],s.getColors(t),i&&e.css(["border-left:1px solid var(",");"],i),o&&e.css(["display:none;"]),r,a,a,d.margin,d.padding))),n=o.default(i.Sidebar).withConfig({displayName:"adaptive-sidebar.style__StyledSidebar",componentId:"sc-efb2ab32-1"})([""," ",""],(({hidden:d})=>e.css(["",""],d&&e.css(["display:none;"]))),(({backgroundColor:d})=>e.css(['div[data-element="sidebar-content"]{',"}"],s.getColors(d))));exports.StyledAdaptiveSidebar=a,exports.StyledSidebar=n;
|
|
@@ -45,6 +45,8 @@ export interface BoxProps extends FlexboxProps, Omit<GridProps, "gridGap" | "gri
|
|
|
45
45
|
bg?: string;
|
|
46
46
|
/** Set the backgroundColor attribute of the Box component */
|
|
47
47
|
backgroundColor?: string;
|
|
48
|
+
/** Whether the component is hidden from view. In this state, the component will not be visible to users but will remain in the HTML document */
|
|
49
|
+
hidden?: boolean;
|
|
48
50
|
/** Set the opacity attribute of the Box component */
|
|
49
51
|
opacity?: string | number;
|
|
50
52
|
/** Set the container to be hidden from screen readers */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react"),t=require("../../style/utils/filter-styled-system-padding-props.js"),o=require("../../style/utils/filter-styled-system-margin-props.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react"),t=require("../../style/utils/filter-styled-system-padding-props.js"),o=require("../../style/utils/filter-styled-system-margin-props.js"),n=require("../../style/utils/filter-styled-system-layout-props.js"),i=require("../../style/utils/filter-styled-system-flexbox-props.js"),l=require("../../style/utils/filter-styled-system-grid-props.js"),a=require("./box.style.js"),s=require("../../__internal__/utils/helpers/tags/tags.js");function u(e){return e&&e.__esModule?e:{default:e}}function c(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}const d=u(r).default.forwardRef(((r,u)=>{var{"data-component":d,tabIndex:p,as:f,id:b,role:y,overflowWrap:g,scrollVariant:O,boxSizing:h,gap:j,columnGap:m,rowGap:x,className:w,children:v,bg:P,backgroundColor:S,boxShadow:q,borderRadius:_,color:k,opacity:G,height:D,width:I,hidden:N,"aria-hidden":R}=r,$=function(e,r){if(null==e)return{};var t,o,n=function(e,r){if(null==e)return{};var t,o,n={},i=Object.keys(e);for(o=0;o<i.length;o++)t=i[o],r.indexOf(t)>=0||(n[t]=e[t]);return n}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)t=i[o],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(n[t]=e[t])}return n}(r,["data-component","tabIndex","as","id","role","overflowWrap","scrollVariant","boxSizing","gap","columnGap","rowGap","className","children","bg","backgroundColor","boxShadow","borderRadius","color","opacity","height","width","hidden","aria-hidden"]);let z="";"number"==typeof I?z=I<=1?`${(100*I).toFixed(0)}%`:`${I}px`:"string"==typeof I&&(z=I);let C="";"number"==typeof D?C=D<=1?`${(100*D).toFixed(0)}%`:`${D}px`:"string"==typeof D&&(C=D);const E={color:k,opacity:G,width:z,height:C};return e.jsx(a.default,(V=function(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},o=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),o.forEach((function(r){c(e,r,t[r])}))}return e}({as:f,id:b,role:y,overflowWrap:g,scrollVariant:O,boxSizing:h,gap:j,columnGap:m,rowGap:x,className:w,ref:u,bg:P,backgroundColor:S,boxShadow:q,borderRadius:_,"aria-hidden":R,hidden:N},s.default(d,$),o.default($),t.default($),i.default($),l.default($),n.default($)),W=null!=(W={cssProps:E,tabIndex:p,children:v})?W:{},Object.getOwnPropertyDescriptors?Object.defineProperties(V,Object.getOwnPropertyDescriptors(W)):function(e){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r.push.apply(r,t)}return r}(Object(W)).forEach((function(e){Object.defineProperty(V,e,Object.getOwnPropertyDescriptor(W,e))})),V));var V,W}));d.displayName="Box",exports.Box=d,exports.default=d;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("styled-components"),r=require("styled-system"),o=require("../../style/utils/box-gap.js"),t=require("../../style/utils/color.js"),s=require("./box.config.js"),l=require("../../style/themes/apply-base-theme.js");function i(e){return e&&e.__esModule?e:{default:e}}function n(e,r,o){return r in e?Object.defineProperty(e,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[r]=o,e}function c(e){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{},t=Object.keys(o);"function"==typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(o).filter((function(e){return Object.getOwnPropertyDescriptor(o,e).enumerable})))),t.forEach((function(r){n(e,r,o[r])}))}return e}function
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("styled-components"),r=require("styled-system"),o=require("../../style/utils/box-gap.js"),t=require("../../style/utils/color.js"),s=require("./box.config.js"),l=require("../../style/themes/apply-base-theme.js");function i(e){return e&&e.__esModule?e:{default:e}}function n(e,r,o){return r in e?Object.defineProperty(e,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[r]=o,e}function c(e){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{},t=Object.keys(o);"function"==typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(o).filter((function(e){return Object.getOwnPropertyDescriptor(o,e).enumerable})))),t.forEach((function(r){n(e,r,o[r])}))}return e}function a(e,r){if(null==e)return{};var o,t,s=function(e,r){if(null==e)return{};var o,t,s={},l=Object.keys(e);for(t=0;t<l.length;t++)o=l[t],r.indexOf(o)>=0||(s[o]=e[o]);return s}(e,r);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(t=0;t<l.length;t++)o=l[t],r.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(s[o]=e[o])}return s}const u=i(e).default.div.attrs(l.default).withConfig({displayName:"box.style__StyledBox",componentId:"sc-9d14423c-0"})([""," "," "," "," "," "," "," "," "," "," "," "," "," ",";"," ",""],r.space,r.layout,r.flexbox,r.grid,(e=>{const o=r.position(e),{position:t}=o,s=a(o,["position"]);return c({position:t,zIndex:["sticky","fixed"].includes(t)?3:void 0},s)}),(({borderRadius:r="borderRadius000"})=>e.css(["border-radius:var(--",");"],r)),(e=>{var{cssProps:r,bg:o,backgroundColor:s}=e,l=a(e,["cssProps","bg","backgroundColor"]);return t.default(c({color:null==r?void 0:r.color,bg:o,backgroundColor:s},l))}),(({cssProps:r})=>e.css(["opacity:",";"],null==r?void 0:r.opacity)),(({overflowWrap:r})=>r&&e.css(["overflow-wrap:",";"],r)),(({cssProps:r,size:o})=>(null==r?void 0:r.height)&&!o&&e.css(["height:",";"],null==r?void 0:r.height)),(({cssProps:r,size:o})=>(null==r?void 0:r.width)&&!o&&e.css(["width:",";"],null==r?void 0:r.width)),(({scrollVariant:r})=>r&&e.css(["scrollbar-color:"," ",";&::-webkit-scrollbar{width:8px;}&::-webkit-scrollbar-track{background-color:",";}&::-webkit-scrollbar-thumb{background-color:",";}"],s.default[r].thumb,s.default[r].track,s.default[r].track,s.default[r].thumb)),(({boxSizing:r})=>r&&e.css(["box-sizing:",";"],r)),(({display:r,gap:t,columnGap:s,rowGap:l})=>("flex"===r||"inline-flex"===r||"grid"===r||"inline-grid"===r)&&e.css([""," "," ",""],void 0!==t&&e.css(["gap:",";"],o.default(t)),void 0!==s&&e.css(["column-gap:",";"],o.default(s)),void 0!==l&&e.css(["row-gap:",";"],o.default(l)))),(({boxShadow:r})=>r&&e.css(["box-shadow:var(--",");"],r)),(({display:r,hidden:o})=>e.css(["display:",";"],o?"none":r)));exports.default=u;
|