@bikdotai/bik-component-library 0.0.630-0 → 0.0.630
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/QueryBuilder/Triggers/EVENTS/components/EventsTrigger.d.ts +1 -1
- package/dist/cjs/components/QueryBuilder/Triggers/EVENTS/selectors/useIGTriggerNameCacheSelector.d.ts +1 -1
- package/dist/cjs/components/QueryBuilder/Triggers/IG/components/IGTrigger.d.ts +1 -1
- package/dist/cjs/components/QueryBuilder/Triggers/IG/selectors/useIGTriggerNameCacheSelector.d.ts +1 -1
- package/dist/cjs/components/QueryBuilder/Triggers/components/BaseTriggerQueryBuilderNode.d.ts +2 -2
- package/dist/cjs/components/accordion/Accordion.d.ts +2 -1
- package/dist/cjs/components/accordion/Accordion.js +1 -1
- package/dist/cjs/components/accordion/Accordion.style.d.ts +2 -0
- package/dist/cjs/components/accordion/Accordion.style.js +6 -4
- package/dist/cjs/components/icon-button/IconButton.js +1 -1
- package/dist/cjs/components/icon-button/model.d.ts +0 -1
- package/dist/esm/components/QueryBuilder/Triggers/EVENTS/components/EventsTrigger.d.ts +1 -1
- package/dist/esm/components/QueryBuilder/Triggers/EVENTS/selectors/useIGTriggerNameCacheSelector.d.ts +1 -1
- package/dist/esm/components/QueryBuilder/Triggers/IG/components/IGTrigger.d.ts +1 -1
- package/dist/esm/components/QueryBuilder/Triggers/IG/selectors/useIGTriggerNameCacheSelector.d.ts +1 -1
- package/dist/esm/components/QueryBuilder/Triggers/components/BaseTriggerQueryBuilderNode.d.ts +2 -2
- package/dist/esm/components/accordion/Accordion.d.ts +2 -1
- package/dist/esm/components/accordion/Accordion.js +1 -1
- package/dist/esm/components/accordion/Accordion.style.d.ts +2 -0
- package/dist/esm/components/accordion/Accordion.style.js +16 -14
- package/dist/esm/components/icon-button/IconButton.js +1 -1
- package/dist/esm/components/icon-button/model.d.ts +0 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { QueryBuilderNodeProps } from "../../../
|
|
2
|
+
import { QueryBuilderNodeProps } from "../../../types/QueryBuilderNodeProps.type";
|
|
3
3
|
declare const EventsTrigger: React.FC<QueryBuilderNodeProps>;
|
|
4
4
|
export default EventsTrigger;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { QueryBuilderAPIData } from "../../../
|
|
1
|
+
import { QueryBuilderAPIData } from "../../../types/QueryBuilderAPI.type";
|
|
2
2
|
export declare const useIGTriggerNameCacheSelector: () => QueryBuilderAPIData[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { QueryBuilderNodeProps } from "../../../
|
|
2
|
+
import { QueryBuilderNodeProps } from "../../../types/QueryBuilderNodeProps.type";
|
|
3
3
|
declare const IGTrigger: React.FC<QueryBuilderNodeProps>;
|
|
4
4
|
export default IGTrigger;
|
package/dist/cjs/components/QueryBuilder/Triggers/IG/selectors/useIGTriggerNameCacheSelector.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { QueryBuilderAPIData } from "../../../
|
|
1
|
+
import { QueryBuilderAPIData } from "../../../types/QueryBuilderAPI.type";
|
|
2
2
|
export declare const useIGTriggerNameCacheSelector: () => QueryBuilderAPIData[];
|
package/dist/cjs/components/QueryBuilder/Triggers/components/BaseTriggerQueryBuilderNode.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { DropdownOption } from "../../../dropdown/type";
|
|
3
|
-
import { QueryBuilderProperty } from "../../
|
|
4
|
-
import { QueryBuilderNodeProps } from "../../
|
|
3
|
+
import { QueryBuilderProperty } from "../../types/QueryBuilder.type";
|
|
4
|
+
import { QueryBuilderNodeProps } from "../../types/QueryBuilderNodeProps.type";
|
|
5
5
|
declare const BaseTriggerQueryBuilderNode: React.FC<QueryBuilderNodeProps & {
|
|
6
6
|
cacheKey: string;
|
|
7
7
|
propertyAddBtnText: string;
|
|
@@ -8,7 +8,6 @@ export interface AccordionProps {
|
|
|
8
8
|
contentMargin?: string;
|
|
9
9
|
skipHoverHeader?: boolean;
|
|
10
10
|
headerPadding?: string;
|
|
11
|
-
childrenPadding?: string;
|
|
12
11
|
showBorders?: boolean;
|
|
13
12
|
backgroundColor?: string;
|
|
14
13
|
refresh?: number | boolean;
|
|
@@ -22,5 +21,7 @@ export interface AccordionProps {
|
|
|
22
21
|
buttonLinkText?: string;
|
|
23
22
|
onButtonLinkClick?: () => void;
|
|
24
23
|
captionStyle?: React.CSSProperties;
|
|
24
|
+
borderColor?: string;
|
|
25
|
+
borderRadius?: string;
|
|
25
26
|
}
|
|
26
27
|
export declare const BikAccordion: React.FC<AccordionProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react"),t=require("../TypographyStyle.js"),n=require("../button/Button.js"),o=require("./Accordion.style.js"),i=require("./AccordionArrow.js");exports.BikAccordion=s=>{var c,a;const[l,d]=r.useState(!1),u=r.useRef(null),h=r.useRef(null);r.useEffect((()=>{s.autoOpen&&v(s.autoOpen,{})}),[s.autoOpen]),r.useEffect((()=>{void 0!==s.isOpen&&v(s.isOpen,{})}),[s.isOpen]);const v=(e,r)=>{var t,n;h.current&&u.current&&("keydown"===r.type&&"Enter"!==r.key||(e!==l&&d(e),e?(h.current.style.maxHeight=(null!==(t=s.childrenMaxHeight)&&void 0!==t?t:h.current.scrollHeight)+"px",u.current.style.transform="rotate(180deg)",u.current.style.transition="transform 0.25s ease-in-out",h.current.style.transition="max-height 0.25s ease-in-out"):(h.current.style.maxHeight="",u.current.style.transform="rotate(0deg)",u.current.style.transition="transform 0.25s ease-in-out",h.current.style.transition="padding 0s"),null===(n=s.onToggleAccordion)||void 0===n||n.call(s,e)))};return r.useEffect((()=>{const e=new MutationObserver((()=>{l&&h.current&&(h.current.style.maxHeight=h.current.scrollHeight+"px")}));return h.current&&e.observe(h.current,{childList:!0,subtree:!0}),()=>{e.disconnect()}}),[l]),r.useEffect((()=>{var e;l&&(null==s?void 0:s.refresh)&&(null===(e=null==h?void 0:h.current)||void 0===e?void 0:e.scrollHeight)&&!s.childrenMaxHeight&&setTimeout((()=>{h.current.style.maxHeight=h.current.scrollHeight+"px"}),100)}),[l,null==s?void 0:s.refresh,null===(c=null==h?void 0:h.current)||void 0===c?void 0:c.scrollHeight]),e.jsxs(o.default,Object.assign({className:"accordion",isActive:l,width:null==s?void 0:s.width,contentMargin:null==s?void 0:s.contentMargin,headerPadding:s.headerPadding,skipHoverState:s.skipHoverHeader,showBorders:s.showBorders,backgroundColor:s.backgroundColor,openDirection:s.openDirection},{children:[e.jsxs("div",Object.assign({className:"accordion__overview "+(l?"active":""),onClick:e=>v(!l,e),onKeyDown:e=>v(!l,e),role:"button",tabIndex:0},{children:[!s.rightActionComponent&&e.jsxs("div",Object.assign({className:"accordion__overview__header",style:null!==(a=s.headerStyles)&&void 0!==a?a:{}},{children:[e.jsxs(o.AccordionHeaderGroup,{children:["string"==typeof s.header?e.jsx(t.TitleRegular,{children:null==s?void 0:s.header}):s.header,s.buttonLinkText&&e.jsx(n.Button,{buttonText:s.buttonLinkText,buttonType:"text",darkMode:!0,onClick:s.onButtonLinkClick})]}),e.jsx(i.default,{arrowColor:s.arrowColor,isNewIcon:!0,ref:u})]})),s.rightActionComponent&&e.jsxs("div",Object.assign({className:"accordion__overview__header"},{children:[e.jsxs("div",Object.assign({className:"accordion__overview__title-wrapper"},{children:[e.jsx(i.default,{arrowColor:s.arrowColor,isNewIcon:!0,ref:u}),"string"==typeof s.header?e.jsx(t.TitleRegular,{children:null==s?void 0:s.header}):s.header]})),e.jsx("div",Object.assign({onClick:e=>e.stopPropagation(),onKeyDown:e=>{"Enter"===e.key&&e.stopPropagation()},role:"button",tabIndex:0},{children:s.rightActionComponent}))]})),(null==s?void 0:s.caption)&&e.jsx("div",Object.assign({className:"accordion__overview__caption"},{children:e.jsx(t.BodySecondary,{children:e.jsx("div",Object.assign({style:s.captionStyle},{children:s.caption}))})}))]})),e.jsx("div",Object.assign({ref:h,className:"accordion__content"},{children:s.children}))]}))};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react"),t=require("../TypographyStyle.js"),n=require("../button/Button.js"),o=require("./Accordion.style.js"),i=require("./AccordionArrow.js");exports.BikAccordion=s=>{var c,a;const[l,d]=r.useState(!1),u=r.useRef(null),h=r.useRef(null);r.useEffect((()=>{s.autoOpen&&v(s.autoOpen,{})}),[s.autoOpen]),r.useEffect((()=>{void 0!==s.isOpen&&v(s.isOpen,{})}),[s.isOpen]);const v=(e,r)=>{var t,n;h.current&&u.current&&("keydown"===r.type&&"Enter"!==r.key||(e!==l&&d(e),e?(h.current.style.maxHeight=(null!==(t=s.childrenMaxHeight)&&void 0!==t?t:h.current.scrollHeight)+"px",u.current.style.transform="rotate(180deg)",u.current.style.transition="transform 0.25s ease-in-out",h.current.style.transition="max-height 0.25s ease-in-out"):(h.current.style.maxHeight="",u.current.style.transform="rotate(0deg)",u.current.style.transition="transform 0.25s ease-in-out",h.current.style.transition="padding 0s"),null===(n=s.onToggleAccordion)||void 0===n||n.call(s,e)))};return r.useEffect((()=>{const e=new MutationObserver((()=>{l&&h.current&&(h.current.style.maxHeight=h.current.scrollHeight+"px")}));return h.current&&e.observe(h.current,{childList:!0,subtree:!0}),()=>{e.disconnect()}}),[l]),r.useEffect((()=>{var e;l&&(null==s?void 0:s.refresh)&&(null===(e=null==h?void 0:h.current)||void 0===e?void 0:e.scrollHeight)&&!s.childrenMaxHeight&&setTimeout((()=>{h.current.style.maxHeight=h.current.scrollHeight+"px"}),100)}),[l,null==s?void 0:s.refresh,null===(c=null==h?void 0:h.current)||void 0===c?void 0:c.scrollHeight]),e.jsxs(o.default,Object.assign({className:"accordion",isActive:l,width:null==s?void 0:s.width,contentMargin:null==s?void 0:s.contentMargin,headerPadding:s.headerPadding,skipHoverState:s.skipHoverHeader,showBorders:s.showBorders,borderColor:s.borderColor,backgroundColor:s.backgroundColor,openDirection:s.openDirection,borderRadius:s.borderRadius},{children:[e.jsxs("div",Object.assign({className:"accordion__overview "+(l?"active":""),onClick:e=>v(!l,e),onKeyDown:e=>v(!l,e),role:"button",tabIndex:0},{children:[!s.rightActionComponent&&e.jsxs("div",Object.assign({className:"accordion__overview__header",style:null!==(a=s.headerStyles)&&void 0!==a?a:{}},{children:[e.jsxs(o.AccordionHeaderGroup,{children:["string"==typeof s.header?e.jsx(t.TitleRegular,{children:null==s?void 0:s.header}):s.header,s.buttonLinkText&&e.jsx(n.Button,{buttonText:s.buttonLinkText,buttonType:"text",darkMode:!0,onClick:s.onButtonLinkClick})]}),e.jsx(i.default,{arrowColor:s.arrowColor,isNewIcon:!0,ref:u})]})),s.rightActionComponent&&e.jsxs("div",Object.assign({className:"accordion__overview__header"},{children:[e.jsxs("div",Object.assign({className:"accordion__overview__title-wrapper"},{children:[e.jsx(i.default,{arrowColor:s.arrowColor,isNewIcon:!0,ref:u}),"string"==typeof s.header?e.jsx(t.TitleRegular,{children:null==s?void 0:s.header}):s.header]})),e.jsx("div",Object.assign({onClick:e=>e.stopPropagation(),onKeyDown:e=>{"Enter"===e.key&&e.stopPropagation()},role:"button",tabIndex:0},{children:s.rightActionComponent}))]})),(null==s?void 0:s.caption)&&e.jsx("div",Object.assign({className:"accordion__overview__caption"},{children:e.jsx(t.BodySecondary,{children:e.jsx("div",Object.assign({style:s.captionStyle},{children:s.caption}))})}))]})),e.jsx("div",Object.assign({ref:h,className:"accordion__content"},{children:s.children}))]}))};
|
|
@@ -6,6 +6,8 @@ declare const AccordionStyle: import("styled-components").StyledComponent<"div",
|
|
|
6
6
|
skipHoverState?: boolean | undefined;
|
|
7
7
|
headerPadding?: string | undefined;
|
|
8
8
|
showBorders?: boolean | undefined;
|
|
9
|
+
borderColor?: string | undefined;
|
|
10
|
+
borderRadius?: string | undefined;
|
|
9
11
|
backgroundColor?: string | undefined;
|
|
10
12
|
hasChildrenMaxHeight?: boolean | undefined;
|
|
11
13
|
openDirection?: AccordionProps['openDirection'];
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("styled-components"),r=require("../../constants/Theme.js");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("styled-components"),r=require("../../constants/Theme.js");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=o(e);const i=d.default.div`
|
|
2
2
|
width: ${e=>(null==e?void 0:e.width)||"100%"};
|
|
3
3
|
display: flex;
|
|
4
4
|
flex-direction: column;
|
|
5
5
|
border: ${e=>e.showBorders?"1px solid "+r.COLORS.stroke.primary:""};
|
|
6
|
-
border-
|
|
6
|
+
border-color: ${e=>e.borderColor||r.COLORS.stroke.primary};
|
|
7
|
+
border-radius: ${e=>e.borderRadius?e.borderRadius:e.showBorders?"4px":""};
|
|
7
8
|
background: ${e=>e.backgroundColor||"unset"};
|
|
8
9
|
.accordion {
|
|
9
10
|
&__overview {
|
|
@@ -12,6 +13,7 @@
|
|
|
12
13
|
gap: 4px;
|
|
13
14
|
padding: ${e=>e.headerPadding?e.headerPadding:"24px"};
|
|
14
15
|
border-bottom: ${e=>e.showBorders&&e.isActive?"1px solid "+r.COLORS.stroke.primary:""};
|
|
16
|
+
border-color: ${e=>e.borderColor||r.COLORS.stroke.primary};
|
|
15
17
|
&__header {
|
|
16
18
|
display: flex;
|
|
17
19
|
flex-direction: row;
|
|
@@ -34,8 +36,8 @@
|
|
|
34
36
|
order: ${e=>"UP"===e.openDirection?-1:0};
|
|
35
37
|
}
|
|
36
38
|
}
|
|
37
|
-
`,t=
|
|
39
|
+
`,t=d.default.div`
|
|
38
40
|
display: flex;
|
|
39
41
|
align-items: center;
|
|
40
42
|
gap: 24px;
|
|
41
|
-
`;exports.AccordionHeaderGroup=t,exports.default=
|
|
43
|
+
`;exports.AccordionHeaderGroup=t,exports.default=i;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),t=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),t=require("react/jsx-runtime"),r=require("react"),o=require("./IconButton.styled.js"),i=require("./theme.js");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=n(r);const d=r.forwardRef(((r,n)=>{var{id:d,iconButtonType:l="default",Icon:c,height:u=20,width:a=20,bordered:y,disabled:b,isSelected:h,style:f,svgStyle:j,iconColor:p}=r,g=e.__rest(r,["id","iconButtonType","Icon","height","width","bordered","disabled","isSelected","style","svgStyle","iconColor"]);const v=i.getIconColor(l,b,h);return t.jsx(o.IconButton,Object.assign({id:d,ref:n,style:f,iconButtonType:l,bordered:y,disabled:b,isSelected:h},g,{children:s.default.createElement(c,{height:u,width:a,color:p||v,style:Object.assign({display:"block"},null!=j?j:{})})}))}));d.displayName="IconButton",exports.IconButton=d;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { QueryBuilderNodeProps } from "../../../
|
|
2
|
+
import { QueryBuilderNodeProps } from "../../../types/QueryBuilderNodeProps.type";
|
|
3
3
|
declare const EventsTrigger: React.FC<QueryBuilderNodeProps>;
|
|
4
4
|
export default EventsTrigger;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { QueryBuilderAPIData } from "../../../
|
|
1
|
+
import { QueryBuilderAPIData } from "../../../types/QueryBuilderAPI.type";
|
|
2
2
|
export declare const useIGTriggerNameCacheSelector: () => QueryBuilderAPIData[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { QueryBuilderNodeProps } from "../../../
|
|
2
|
+
import { QueryBuilderNodeProps } from "../../../types/QueryBuilderNodeProps.type";
|
|
3
3
|
declare const IGTrigger: React.FC<QueryBuilderNodeProps>;
|
|
4
4
|
export default IGTrigger;
|
package/dist/esm/components/QueryBuilder/Triggers/IG/selectors/useIGTriggerNameCacheSelector.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { QueryBuilderAPIData } from "../../../
|
|
1
|
+
import { QueryBuilderAPIData } from "../../../types/QueryBuilderAPI.type";
|
|
2
2
|
export declare const useIGTriggerNameCacheSelector: () => QueryBuilderAPIData[];
|
package/dist/esm/components/QueryBuilder/Triggers/components/BaseTriggerQueryBuilderNode.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { DropdownOption } from "../../../dropdown/type";
|
|
3
|
-
import { QueryBuilderProperty } from "../../
|
|
4
|
-
import { QueryBuilderNodeProps } from "../../
|
|
3
|
+
import { QueryBuilderProperty } from "../../types/QueryBuilder.type";
|
|
4
|
+
import { QueryBuilderNodeProps } from "../../types/QueryBuilderNodeProps.type";
|
|
5
5
|
declare const BaseTriggerQueryBuilderNode: React.FC<QueryBuilderNodeProps & {
|
|
6
6
|
cacheKey: string;
|
|
7
7
|
propertyAddBtnText: string;
|
|
@@ -8,7 +8,6 @@ export interface AccordionProps {
|
|
|
8
8
|
contentMargin?: string;
|
|
9
9
|
skipHoverHeader?: boolean;
|
|
10
10
|
headerPadding?: string;
|
|
11
|
-
childrenPadding?: string;
|
|
12
11
|
showBorders?: boolean;
|
|
13
12
|
backgroundColor?: string;
|
|
14
13
|
refresh?: number | boolean;
|
|
@@ -22,5 +21,7 @@ export interface AccordionProps {
|
|
|
22
21
|
buttonLinkText?: string;
|
|
23
22
|
onButtonLinkClick?: () => void;
|
|
24
23
|
captionStyle?: React.CSSProperties;
|
|
24
|
+
borderColor?: string;
|
|
25
|
+
borderRadius?: string;
|
|
25
26
|
}
|
|
26
27
|
export declare const BikAccordion: React.FC<AccordionProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,jsx as r}from"react/jsx-runtime";import{useState as
|
|
1
|
+
import{jsxs as e,jsx as r}from"react/jsx-runtime";import{useState as o,useRef as t,useEffect as n}from"react";import{TitleRegular as i,BodySecondary as c}from"../TypographyStyle.js";import{Button as s}from"../button/Button.js";import a,{AccordionHeaderGroup as l}from"./Accordion.style.js";import d from"./AccordionArrow.js";const u=u=>{var h,v;const[g,p]=o(!1),m=t(null),b=t(null);n((()=>{u.autoOpen&&y(u.autoOpen,{})}),[u.autoOpen]),n((()=>{void 0!==u.isOpen&&y(u.isOpen,{})}),[u.isOpen]);const y=(e,r)=>{var o,t;b.current&&m.current&&("keydown"===r.type&&"Enter"!==r.key||(e!==g&&p(e),e?(b.current.style.maxHeight=(null!==(o=u.childrenMaxHeight)&&void 0!==o?o:b.current.scrollHeight)+"px",m.current.style.transform="rotate(180deg)",m.current.style.transition="transform 0.25s ease-in-out",b.current.style.transition="max-height 0.25s ease-in-out"):(b.current.style.maxHeight="",m.current.style.transform="rotate(0deg)",m.current.style.transition="transform 0.25s ease-in-out",b.current.style.transition="padding 0s"),null===(t=u.onToggleAccordion)||void 0===t||t.call(u,e)))};return n((()=>{const e=new MutationObserver((()=>{g&&b.current&&(b.current.style.maxHeight=b.current.scrollHeight+"px")}));return b.current&&e.observe(b.current,{childList:!0,subtree:!0}),()=>{e.disconnect()}}),[g]),n((()=>{var e;g&&(null==u?void 0:u.refresh)&&(null===(e=null==b?void 0:b.current)||void 0===e?void 0:e.scrollHeight)&&!u.childrenMaxHeight&&setTimeout((()=>{b.current.style.maxHeight=b.current.scrollHeight+"px"}),100)}),[g,null==u?void 0:u.refresh,null===(h=null==b?void 0:b.current)||void 0===h?void 0:h.scrollHeight]),e(a,Object.assign({className:"accordion",isActive:g,width:null==u?void 0:u.width,contentMargin:null==u?void 0:u.contentMargin,headerPadding:u.headerPadding,skipHoverState:u.skipHoverHeader,showBorders:u.showBorders,borderColor:u.borderColor,backgroundColor:u.backgroundColor,openDirection:u.openDirection,borderRadius:u.borderRadius},{children:[e("div",Object.assign({className:"accordion__overview "+(g?"active":""),onClick:e=>y(!g,e),onKeyDown:e=>y(!g,e),role:"button",tabIndex:0},{children:[!u.rightActionComponent&&e("div",Object.assign({className:"accordion__overview__header",style:null!==(v=u.headerStyles)&&void 0!==v?v:{}},{children:[e(l,{children:["string"==typeof u.header?r(i,{children:null==u?void 0:u.header}):u.header,u.buttonLinkText&&r(s,{buttonText:u.buttonLinkText,buttonType:"text",darkMode:!0,onClick:u.onButtonLinkClick})]}),r(d,{arrowColor:u.arrowColor,isNewIcon:!0,ref:m})]})),u.rightActionComponent&&e("div",Object.assign({className:"accordion__overview__header"},{children:[e("div",Object.assign({className:"accordion__overview__title-wrapper"},{children:[r(d,{arrowColor:u.arrowColor,isNewIcon:!0,ref:m}),"string"==typeof u.header?r(i,{children:null==u?void 0:u.header}):u.header]})),r("div",Object.assign({onClick:e=>e.stopPropagation(),onKeyDown:e=>{"Enter"===e.key&&e.stopPropagation()},role:"button",tabIndex:0},{children:u.rightActionComponent}))]})),(null==u?void 0:u.caption)&&r("div",Object.assign({className:"accordion__overview__caption"},{children:r(c,{children:r("div",Object.assign({style:u.captionStyle},{children:u.caption}))})}))]})),r("div",Object.assign({ref:b,className:"accordion__content"},{children:u.children}))]}))};export{u as BikAccordion};
|
|
@@ -6,6 +6,8 @@ declare const AccordionStyle: import("styled-components").StyledComponent<"div",
|
|
|
6
6
|
skipHoverState?: boolean | undefined;
|
|
7
7
|
headerPadding?: string | undefined;
|
|
8
8
|
showBorders?: boolean | undefined;
|
|
9
|
+
borderColor?: string | undefined;
|
|
10
|
+
borderRadius?: string | undefined;
|
|
9
11
|
backgroundColor?: string | undefined;
|
|
10
12
|
hasChildrenMaxHeight?: boolean | undefined;
|
|
11
13
|
openDirection?: AccordionProps['openDirection'];
|
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
width: ${
|
|
1
|
+
import r from"styled-components";import{COLORS as e}from"../../constants/Theme.js";const o=r.div`
|
|
2
|
+
width: ${r=>(null==r?void 0:r.width)||"100%"};
|
|
3
3
|
display: flex;
|
|
4
4
|
flex-direction: column;
|
|
5
|
-
border: ${
|
|
6
|
-
border-
|
|
7
|
-
|
|
5
|
+
border: ${r=>r.showBorders?"1px solid "+e.stroke.primary:""};
|
|
6
|
+
border-color: ${r=>r.borderColor||e.stroke.primary};
|
|
7
|
+
border-radius: ${r=>r.borderRadius?r.borderRadius:r.showBorders?"4px":""};
|
|
8
|
+
background: ${r=>r.backgroundColor||"unset"};
|
|
8
9
|
.accordion {
|
|
9
10
|
&__overview {
|
|
10
11
|
display: flex;
|
|
11
12
|
flex-direction: column;
|
|
12
13
|
gap: 4px;
|
|
13
|
-
padding: ${
|
|
14
|
-
border-bottom: ${
|
|
14
|
+
padding: ${r=>r.headerPadding?r.headerPadding:"24px"};
|
|
15
|
+
border-bottom: ${r=>r.showBorders&&r.isActive?"1px solid "+e.stroke.primary:""};
|
|
16
|
+
border-color: ${r=>r.borderColor||e.stroke.primary};
|
|
15
17
|
&__header {
|
|
16
18
|
display: flex;
|
|
17
19
|
flex-direction: row;
|
|
@@ -23,19 +25,19 @@ import e from"styled-components";import{COLORS as r}from"../../constants/Theme.j
|
|
|
23
25
|
gap: 8px;
|
|
24
26
|
}
|
|
25
27
|
:hover {
|
|
26
|
-
background: ${
|
|
27
|
-
border-radius: ${
|
|
28
|
+
background: ${r=>r.skipHoverState?null:e.surface.subdued};
|
|
29
|
+
border-radius: ${r=>r.skipHoverState?null:"4px"};
|
|
28
30
|
}
|
|
29
31
|
}
|
|
30
32
|
&__content {
|
|
31
|
-
${
|
|
32
|
-
overflow: ${
|
|
33
|
+
${r=>r.isActive?{margin:(null==r?void 0:r.contentMargin)||"0px"}:{}};
|
|
34
|
+
overflow: ${r=>r.hasChildrenMaxHeight?"scroll":"hidden"};
|
|
33
35
|
max-height: 0;
|
|
34
|
-
order: ${
|
|
36
|
+
order: ${r=>"UP"===r.openDirection?-1:0};
|
|
35
37
|
}
|
|
36
38
|
}
|
|
37
|
-
`,
|
|
39
|
+
`,d=r.div`
|
|
38
40
|
display: flex;
|
|
39
41
|
align-items: center;
|
|
40
42
|
gap: 24px;
|
|
41
|
-
`;export{
|
|
43
|
+
`;export{d as AccordionHeaderGroup,o as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__rest as
|
|
1
|
+
import{__rest as e}from"../../_virtual/_tslib.js";import{jsx as t}from"react/jsx-runtime";import o,{forwardRef as i}from"react";import{IconButton as r}from"./IconButton.styled.js";import{getIconColor as s}from"./theme.js";const d=i(((i,d)=>{var{id:l,iconButtonType:n="default",Icon:c,height:a=20,width:m=20,bordered:y,disabled:h,isSelected:p,style:u,svgStyle:b,iconColor:f}=i,g=e(i,["id","iconButtonType","Icon","height","width","bordered","disabled","isSelected","style","svgStyle","iconColor"]);const j=s(n,h,p);return t(r,Object.assign({id:l,ref:d,style:u,iconButtonType:n,bordered:y,disabled:h,isSelected:p},g,{children:o.createElement(c,{height:a,width:m,color:f||j,style:Object.assign({display:"block"},null!=b?b:{})})}))}));d.displayName="IconButton";export{d as IconButton};
|