@bikdotai/bik-component-library 0.0.673-beta.1 → 0.0.673

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.
Files changed (29) hide show
  1. package/dist/cjs/components/QueryBuilder/Triggers/EVENTS/components/EventsTrigger.d.ts +1 -1
  2. package/dist/cjs/components/QueryBuilder/Triggers/EVENTS/selectors/useIGTriggerNameCacheSelector.d.ts +1 -1
  3. package/dist/cjs/components/QueryBuilder/Triggers/IG/components/IGTrigger.d.ts +1 -1
  4. package/dist/cjs/components/QueryBuilder/Triggers/IG/selectors/useIGTriggerNameCacheSelector.d.ts +1 -1
  5. package/dist/cjs/components/QueryBuilder/Triggers/components/BaseTriggerQueryBuilderNode.d.ts +2 -2
  6. package/dist/cjs/components/bik-layout/MockMenus.d.ts +0 -1
  7. package/dist/cjs/components/checkBox/CheckBox.d.ts +0 -1
  8. package/dist/cjs/components/checkBox/CheckBox.js +1 -1
  9. package/dist/cjs/components/dropdown/ChipInput.d.ts +0 -2
  10. package/dist/cjs/components/dropdown/ChipInput.js +1 -1
  11. package/dist/cjs/components/dropdown/Common.styled.d.ts +1 -3
  12. package/dist/cjs/components/dropdown/Common.styled.js +4 -4
  13. package/dist/cjs/components/dropdown/Dropdown.d.ts +0 -1
  14. package/dist/cjs/components/dropdown/Dropdown.js +1 -1
  15. package/dist/esm/components/QueryBuilder/Triggers/EVENTS/components/EventsTrigger.d.ts +1 -1
  16. package/dist/esm/components/QueryBuilder/Triggers/EVENTS/selectors/useIGTriggerNameCacheSelector.d.ts +1 -1
  17. package/dist/esm/components/QueryBuilder/Triggers/IG/components/IGTrigger.d.ts +1 -1
  18. package/dist/esm/components/QueryBuilder/Triggers/IG/selectors/useIGTriggerNameCacheSelector.d.ts +1 -1
  19. package/dist/esm/components/QueryBuilder/Triggers/components/BaseTriggerQueryBuilderNode.d.ts +2 -2
  20. package/dist/esm/components/bik-layout/MockMenus.d.ts +0 -1
  21. package/dist/esm/components/checkBox/CheckBox.d.ts +0 -1
  22. package/dist/esm/components/checkBox/CheckBox.js +1 -1
  23. package/dist/esm/components/dropdown/ChipInput.d.ts +0 -2
  24. package/dist/esm/components/dropdown/ChipInput.js +1 -1
  25. package/dist/esm/components/dropdown/Common.styled.d.ts +1 -3
  26. package/dist/esm/components/dropdown/Common.styled.js +1 -1
  27. package/dist/esm/components/dropdown/Dropdown.d.ts +0 -1
  28. package/dist/esm/components/dropdown/Dropdown.js +1 -1
  29. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import { QueryBuilderNodeProps } from "../../../Types/QueryBuilderNodeProps.type";
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 "../../../Types/QueryBuilderAPI.type";
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 "../../../Types/QueryBuilderNodeProps.type";
2
+ import { QueryBuilderNodeProps } from "../../../types/QueryBuilderNodeProps.type";
3
3
  declare const IGTrigger: React.FC<QueryBuilderNodeProps>;
4
4
  export default IGTrigger;
@@ -1,2 +1,2 @@
1
- import { QueryBuilderAPIData } from "../../../Types/QueryBuilderAPI.type";
1
+ import { QueryBuilderAPIData } from "../../../types/QueryBuilderAPI.type";
2
2
  export declare const useIGTriggerNameCacheSelector: () => QueryBuilderAPIData[];
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { DropdownOption } from "../../../dropdown/type";
3
- import { QueryBuilderProperty } from "../../Types/QueryBuilder.type";
4
- import { QueryBuilderNodeProps } from "../../Types/QueryBuilderNodeProps.type";
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;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const Menus: ({
3
2
  displayName: string;
4
3
  key: number;
@@ -12,7 +12,6 @@ export type CheckBoxProps = {
12
12
  rightComponent?: JSX.Element;
13
13
  checkboxBorderColor?: string;
14
14
  boldOnChecked?: boolean;
15
- bold?: boolean;
16
15
  style?: React.CSSProperties;
17
16
  enableHover?: boolean;
18
17
  activeColor?: string;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),i=require("react"),s=require("./CheckBox.styled.js"),l=require("../TypographyStyle.js"),t=require("../../constants/Theme.js");const a=s=>{const l=i.useMemo((()=>s.activeColor||t.COLORS.background.positive.vibrant),[s.activeColor]);return e.jsxs("svg",Object.assign({width:s.isSmall?"16":"18",height:s.isSmall?"16":"18",viewBox:s.isSmall?"0 0 16 16":"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[e.jsx("rect",{x:"0",y:"0",width:s.isSmall?"16":"18",height:s.isSmall?"16":"18",rx:"4",fill:s.isDisabled?t.COLORS.content.inactive:l}),!s.isPartial&&e.jsx("svg",Object.assign({width:s.isSmall?"8":"10",height:s.isSmall?"7":"9",x:"4",y:"4",viewBox:"0 0 10 9",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.68189 1.06043C10.0724 1.45096 10.0724 2.08412 9.68189 2.47464L4.02501 8.13152C3.63449 8.52205 3.00132 8.52205 2.6108 8.13152L0.489684 6.01041C0.0991601 5.61988 0.0991598 4.98672 0.489684 4.59619C0.880209 4.20567 1.51337 4.20567 1.9039 4.59619L3.31791 6.0102L8.26768 1.06043C8.6582 0.669907 9.29137 0.669907 9.68189 1.06043Z",fill:"white"})})),s.isPartial&&e.jsx("rect",{x:"5",y:s.isSmall?"7":"8",width:s.isSmall?"6":"8",height:"2",rx:"1",fill:t.COLORS.surface.standard})]}))};exports.CheckBox=r=>{var o;const[c,d]=i.useState(r.isChecked||!1),[n,b]=i.useState(r.isPartiallyChecked||!1),[h,x]=i.useState(r.isDisabled||!1),[C,S]=i.useState(!1),[u,O]=i.useState(!1);i.useEffect((()=>{d(r.isChecked)}),[r.isChecked]),i.useEffect((()=>{x(r.isDisabled||!1)}),[r.isDisabled]),i.useEffect((()=>{b(r.isPartiallyChecked||!1)}),[r.isPartiallyChecked]);return e.jsxs(s.CheckboxContainer,Object.assign({onClick:e=>{var i;if(!r.isDisabled){const s=!c;n?b(!n):d(s),null===(i=r.onValueChange)||void 0===i||i.call(r,s,r.value,e)}},onMouseEnter:()=>S(!r.skipHoverState),onMouseLeave:()=>S(!1),onMouseDown:()=>O(!r.skipHoverState),onMouseUp:()=>O(!1),isDisabled:h,enableHover:r.enableHover,style:null!==(o=r.style)&&void 0!==o?o:{}},{children:[e.jsx(s.CheckboxIcon,Object.assign({checked:c,hovered:C,clicked:u,isDisabled:h,size:r.size,borderColor:r.checkboxBorderColor},{children:c&&e.jsx(a,{isPartial:n||!1,isDisabled:h,isSmall:"SMALL"===r.size,activeColor:null==r?void 0:r.activeColor})})),r.label?r.boldOnChecked&&c||r.bold?"DEFAULT"===r.labelSize?e.jsx(l.TitleRegular,Object.assign({color:r.isDisabled?t.COLORS.text.disabled:t.COLORS.text.primary},{children:r.label})):e.jsx(l.TitleSmall,Object.assign({color:r.isDisabled?t.COLORS.text.disabled:t.COLORS.text.primary},{children:r.label})):"SMALL"===r.size||"SMALL"===r.labelSize?e.jsx(l.BodySecondary,Object.assign({color:r.isDisabled?t.COLORS.text.disabled:t.COLORS.text.primary},{children:r.label})):e.jsx(l.BodyPrimary,Object.assign({color:r.isDisabled?t.COLORS.text.disabled:t.COLORS.text.primary},{children:r.label})):e.jsx(e.Fragment,{}),r.rightComponent]}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),i=require("react"),s=require("./CheckBox.styled.js"),l=require("../TypographyStyle.js"),t=require("../../constants/Theme.js");const a=s=>{const l=i.useMemo((()=>s.activeColor||t.COLORS.background.positive.vibrant),[s.activeColor]);return e.jsxs("svg",Object.assign({width:s.isSmall?"16":"18",height:s.isSmall?"16":"18",viewBox:s.isSmall?"0 0 16 16":"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[e.jsx("rect",{x:"0",y:"0",width:s.isSmall?"16":"18",height:s.isSmall?"16":"18",rx:"4",fill:s.isDisabled?t.COLORS.content.inactive:l}),!s.isPartial&&e.jsx("svg",Object.assign({width:s.isSmall?"8":"10",height:s.isSmall?"7":"9",x:"4",y:"4",viewBox:"0 0 10 9",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.68189 1.06043C10.0724 1.45096 10.0724 2.08412 9.68189 2.47464L4.02501 8.13152C3.63449 8.52205 3.00132 8.52205 2.6108 8.13152L0.489684 6.01041C0.0991601 5.61988 0.0991598 4.98672 0.489684 4.59619C0.880209 4.20567 1.51337 4.20567 1.9039 4.59619L3.31791 6.0102L8.26768 1.06043C8.6582 0.669907 9.29137 0.669907 9.68189 1.06043Z",fill:"white"})})),s.isPartial&&e.jsx("rect",{x:"5",y:s.isSmall?"7":"8",width:s.isSmall?"6":"8",height:"2",rx:"1",fill:t.COLORS.surface.standard})]}))};exports.CheckBox=r=>{var o;const[c,d]=i.useState(r.isChecked||!1),[n,h]=i.useState(r.isPartiallyChecked||!1),[b,x]=i.useState(r.isDisabled||!1),[C,S]=i.useState(!1),[u,O]=i.useState(!1);i.useEffect((()=>{d(r.isChecked)}),[r.isChecked]),i.useEffect((()=>{x(r.isDisabled||!1)}),[r.isDisabled]),i.useEffect((()=>{h(r.isPartiallyChecked||!1)}),[r.isPartiallyChecked]);return e.jsxs(s.CheckboxContainer,Object.assign({onClick:e=>{var i;if(!r.isDisabled){const s=!c;n?h(!n):d(s),null===(i=r.onValueChange)||void 0===i||i.call(r,s,r.value,e)}},onMouseEnter:()=>S(!r.skipHoverState),onMouseLeave:()=>S(!1),onMouseDown:()=>O(!r.skipHoverState),onMouseUp:()=>O(!1),isDisabled:b,enableHover:r.enableHover,style:null!==(o=r.style)&&void 0!==o?o:{}},{children:[e.jsx(s.CheckboxIcon,Object.assign({checked:c,hovered:C,clicked:u,isDisabled:b,size:r.size,borderColor:r.checkboxBorderColor},{children:c&&e.jsx(a,{isPartial:n||!1,isDisabled:b,isSmall:"SMALL"===r.size,activeColor:null==r?void 0:r.activeColor})})),r.label?r.boldOnChecked&&c?"DEFAULT"===r.labelSize?e.jsx(l.TitleRegular,Object.assign({color:r.isDisabled?t.COLORS.text.disabled:t.COLORS.text.primary},{children:r.label})):e.jsx(l.TitleSmall,Object.assign({color:r.isDisabled?t.COLORS.text.disabled:t.COLORS.text.primary},{children:r.label})):"SMALL"===r.size||"SMALL"===r.labelSize?e.jsx(l.BodySecondary,Object.assign({color:r.isDisabled?t.COLORS.text.disabled:t.COLORS.text.primary},{children:r.label})):e.jsx(l.BodyPrimary,Object.assign({color:r.isDisabled?t.COLORS.text.disabled:t.COLORS.text.primary},{children:r.label})):e.jsx(e.Fragment,{}),r.rightComponent]}))};
@@ -7,8 +7,6 @@ interface ChipInputProps {
7
7
  containerStyle?: React.CSSProperties;
8
8
  isDropdownOpened?: boolean;
9
9
  sizeToUse?: 'default' | 'small' | 'x-small';
10
- errorMessage?: string;
11
- showLabelsOnMoreHover?: boolean;
12
10
  }
13
11
  declare const ChipInput: React.FC<ChipInputProps>;
14
12
  export default ChipInput;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),s=require("../../utils/StringUtils.js"),l=require("../../constants/Theme.js"),r=require("../../assets/icons/chevronDown.svg.js"),i=require("../../assets/icons/cross.svg.js"),n=require("../../assets/icons/errorInfo.svg.js"),o=require("../input/Input.styled.js"),a=require("../tag/Tag.js"),c=require("../tooltips/Tooltip.js"),d=require("../TypographyStyle.js"),h=require("./Common.styled.js");exports.default=j=>{let{chips:g,onDeleteChip:u,containerStyle:p={},sizeToUse:x="default",isDropdownOpened:O,placeholder:b="Select..",errorMessage:y="",showLabelsOnMoreHover:m=!1}=j;const[v,f]=t.useState(),[q,C]=t.useState(0),[S,T]=t.useState([]);return t.useEffect((()=>{if(!g)return;let e=0;const t=(e=>1===e.length?100:2===e.length?40:34)(g);let s=g.filter((s=>(e+=s.label.length,e<=t)));0===s.length&&g.length>0&&(s=[g[0]]),f(s);const l=g.filter((e=>!s.includes(e))).map((e=>e.label));T(l),C(g.length-s.length)}),[g]),e.jsxs(e.Fragment,{children:[e.jsxs(h.ChipInputWrapper,Object.assign({style:Object.assign({},p),error:!!y},{children:[e.jsxs("div",Object.assign({className:"chips-container"},{children:[null==v?void 0:v.map(((t,l)=>e.jsx("div",Object.assign({style:{zIndex:2}},{children:e.jsx(a.Tag,Object.assign({tagText:s.default.truncateText(t.selectedLabel||t.label,40),TrailingIcon:()=>e.jsx(i.default,{width:12,height:12,style:{cursor:"pointer"},onClick:()=>{u(t)}})},{children:t.selectedLabel||t.label}))}),l))),!!q&&e.jsx("div",Object.assign({style:{position:"relative",zIndex:10,pointerEvents:"auto"}},{children:e.jsx(c.Tooltip,Object.assign({body:"",placement:"bottom",tooltipContent:m&&S.length>0?e.jsx("div",Object.assign({style:{padding:"4px"}},{children:S.map(((t,s)=>e.jsx(d.BodyCaption,Object.assign({style:{color:l.COLORS.text.white}},{children:t}),s)))})):void 0},{children:e.jsx(d.BodyCaption,Object.assign({color:l.COLORS.content.placeholder},{children:`+${q} more`}))}))})),0===g.length&&e.jsx("div",Object.assign({style:{color:l.COLORS.content.placeholder}},{children:b}))]})),e.jsx("div",{children:e.jsx(r.default,{style:{transform:O?"rotate(180deg)":"rotate(0deg)"},width:"x-small"===x?16:"small"===x?20:24,height:"x-small"===x?16:"small"===x?20:24,color:l.COLORS.content.primary})})]})),!!y&&e.jsxs(o.InputFooter,Object.assign({invalid:!0},{children:[!!y&&e.jsx(n.default,{width:16,height:16}),y]}))]})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),s=require("../../utils/StringUtils.js"),l=require("../../constants/Theme.js"),r=require("../../assets/icons/chevronDown.svg.js"),n=require("../../assets/icons/cross.svg.js"),i=require("../tag/Tag.js"),a=require("../TypographyStyle.js"),c=require("./Common.styled.js");exports.default=o=>{let{chips:d,onDeleteChip:h,containerStyle:g={},sizeToUse:u="default",isDropdownOpened:j,placeholder:p="Select.."}=o;const[x,O]=t.useState(),[b,m]=t.useState(0);return t.useEffect((()=>{if(!d)return;let e=0;const t=(e=>1===e.length?100:2===e.length?40:34)(d);let s=d.filter((s=>(e+=s.label.length,e<=t)));0===s.length&&d.length>0&&(s=[d[0]]),O(s),m(d.length-s.length)}),[d]),e.jsxs(c.ChipInputWrapper,Object.assign({style:Object.assign({},g)},{children:[e.jsxs("div",Object.assign({className:"chips-container"},{children:[null==x?void 0:x.map(((t,l)=>e.jsx("div",Object.assign({style:{zIndex:2}},{children:e.jsx(i.Tag,Object.assign({tagText:s.default.truncateText(t.selectedLabel||t.label,40),TrailingIcon:()=>e.jsx(n.default,{width:12,height:12,style:{cursor:"pointer"},onClick:()=>{h(t)}})},{children:t.selectedLabel||t.label}))}),l))),!!b&&e.jsx(a.BodyCaption,Object.assign({color:l.COLORS.content.placeholder},{children:`+${b} more`})),0===d.length&&e.jsx("div",Object.assign({style:{color:l.COLORS.content.placeholder}},{children:p}))]})),e.jsx("div",{children:e.jsx(r.default,{style:{transform:j?"rotate(180deg)":"rotate(0deg)"},width:"x-small"===u?16:"small"===u?20:24,height:"x-small"===u?16:"small"===u?20:24,color:l.COLORS.content.primary})})]}))};
@@ -4,6 +4,4 @@ export declare const OverLapAbs: import("styled-components").StyledComponent<"di
4
4
  }, never>;
5
5
  export declare const OpenDropdownContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
6
6
  export declare const LoadingContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
7
- export declare const ChipInputWrapper: import("styled-components").StyledComponent<"div", any, {
8
- error?: boolean | undefined;
9
- }, never>;
7
+ export declare const ChipInputWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -8,7 +8,7 @@
8
8
  height: 100%;
9
9
  z-index: 2;
10
10
  cursor: ${e=>(null==e?void 0:e.disabled)?"not-allowed":"pointer"};
11
- `,n=r.default.div`
11
+ `,p=r.default.div`
12
12
  margin-top: 8px;
13
13
  margin-bottom: 8px;
14
14
  `;r.default.div`
@@ -19,7 +19,7 @@
19
19
  background: ${t.COLORS.surface.hovered};
20
20
  border: 1px solid ${t.COLORS.stroke.primary};
21
21
  border-radius: 4px;
22
- `;const p=r.default.div`
22
+ `;const n=r.default.div`
23
23
  width: 360px;
24
24
  height: 100%;
25
25
  padding: 8px;
@@ -27,11 +27,11 @@
27
27
  justify-content: space-between;
28
28
  align-items: center;
29
29
  border-radius: 4px;
30
- border: ${e=>e.error?`1px solid ${t.COLORS.stroke.negative.vibrant}`:`1px solid ${t.COLORS.stroke.primary}`};
30
+ border: 1px solid ${t.COLORS.stroke.primary};
31
31
  .chips-container {
32
32
  display: flex;
33
33
  gap: 8px;
34
34
  flex-wrap: wrap;
35
35
  align-items: center;
36
36
  }
37
- `;exports.ChipInputWrapper=p,exports.OpenDropdownContainer=n,exports.OverLapAbs=o;
37
+ `;exports.ChipInputWrapper=n,exports.OpenDropdownContainer=p,exports.OverLapAbs=o;
@@ -15,6 +15,5 @@ export type DropdownProps = OpenDropdownProps & {
15
15
  'data-test'?: string;
16
16
  showLeadingIconInPlaceholder?: boolean;
17
17
  showTrailingIconPlaceholder?: boolean;
18
- showLabelsOnMoreHover?: boolean;
19
18
  };
20
19
  export declare const Dropdown: React.FC<DropdownProps>;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),t=require("react/jsx-runtime"),n=require("react"),o=require("../../constants/Theme.js"),l=require("../../assets/icons/chevronDown.svg.js"),r=require("../input/Input.js"),i=require("../input/context/InputStyleProvider.js"),s=require("./ChipInput.js"),a=require("./DropdownPopover/index.js"),d=require("./OpenedDropdown/utils/iterationOnOptions.js");function u(){}const c=c=>{var p,h,v,g,x,{placeHolder:w,size:j,onSelect:f,defaultOptions:b,disabled:O,noErrorHint:I,placeHolderHeight:y,showPlaceholderWhenSelected:S=!1,inputStyle:m={},inputType:H="default",onDeleteChip:D,truncatedText:P,showLeadingIconInPlaceholder:T=!1,showTrailingIconPlaceholder:q=!1,showLabelsOnMoreHover:C=!1}=c,E=e.__rest(c,["placeHolder","size","onSelect","defaultOptions","disabled","noErrorHint","placeHolderHeight","showPlaceholderWhenSelected","inputStyle","inputType","onDeleteChip","truncatedText","showLeadingIconInPlaceholder","showTrailingIconPlaceholder","showLabelsOnMoreHover"]);const[L,M]=n.useState(!1),_=null!=j?j:"default",z=n.useRef(),[W,A]=n.useState(null!=b?b:[]);n.useEffect((()=>{var e;const t=[];null===(e=null==E?void 0:E.options)||void 0===e||e.forEach((e=>{e.options?e.options.forEach((e=>{e.selected&&t.push(Object.assign(Object.assign({},e),{label:e.label}))})):e.selected&&t.push(e)})),A([...t])}),[E.options]),n.useEffect((()=>{b&&A([...b])}),[b]);const R=d.getSelectedOptionsAsText(W);return t.jsx(i.InputStyleContext.Provider,Object.assign({value:{InputWrapper:Object.assign({height:y||("x-small"===_?24:"small"===_?32:48),width:null!==(h=null!==(p=E.buttonWidth)&&void 0!==p?p:E.width)&&void 0!==h?h:"100%",zIndex:1,cursor:"pointer",padding:"x-small"===_?"4px 8px":"6px 8px"},m),input:{minHeight:"100%"}}},{children:t.jsxs(a.DropdownPopover,Object.assign({"data-test":E["data-test"],ref:z,onSelect:function(e){Array.isArray(e)?A([...e]):A([e]),null==f||f(e)},disabled:O,onDropdownVisbilityChange:e=>M(e)},E,{children:["default"==H&&t.jsx(r.Input,{version:E.version,noErrorHint:I,state:O?"disabled":"none",value:S?w:null!=R?R:"",errorMessage:E.error,variant:_,placeholder:null!=w?w:"Select an option",width:null!==(v=E.width)&&void 0!==v?v:"100%",onChangeText:u,leftIcon:T&&(null===(g=W[0])||void 0===g?void 0:g.leadingIcon)?{icon:()=>{var e;return t.jsx(t.Fragment,{children:null===(e=W[0])||void 0===e?void 0:e.leadingIcon})}}:void 0,rightIcon:{icon:()=>{var e;return t.jsxs("div",Object.assign({style:{display:"flex"}},{children:[q&&(null===(e=W[0])||void 0===e?void 0:e.trailingIcon),t.jsx(l.default,{style:{transform:L?"rotate(180deg)":"rotate(0deg)"},onClick:u,width:"x-small"===_?16:"small"===_?20:24,height:"x-small"===_?16:"small"===_?20:24,color:o.COLORS.content.primary})]}))}},truncateText:null==P||P}),"chip"==H&&t.jsx(s.default,{placeholder:null!=w?w:"Select options",chips:W,onDeleteChip:e=>{null==D||D(e)},errorMessage:E.error,isDropdownOpened:L,sizeToUse:_,containerStyle:{width:null!==(x=E.width)&&void 0!==x?x:"100%",cursor:"pointer"},showLabelsOnMoreHover:null!=C&&C})]}))}))};c.displayName="Dropdown",exports.Dropdown=c;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),t=require("react/jsx-runtime"),n=require("react"),l=require("../../constants/Theme.js"),o=require("../../assets/icons/chevronDown.svg.js"),i=require("../input/Input.js"),r=require("../input/context/InputStyleProvider.js"),s=require("./ChipInput.js"),a=require("./DropdownPopover/index.js"),d=require("./OpenedDropdown/utils/iterationOnOptions.js");function u(){}const c=c=>{var p,h,v,g,x,{placeHolder:j,size:f,onSelect:w,defaultOptions:I,disabled:b,noErrorHint:y,placeHolderHeight:O,showPlaceholderWhenSelected:S=!1,inputStyle:m={},inputType:D="default",onDeleteChip:P,truncatedText:T,showLeadingIconInPlaceholder:q=!1,showTrailingIconPlaceholder:H=!1}=c,C=e.__rest(c,["placeHolder","size","onSelect","defaultOptions","disabled","noErrorHint","placeHolderHeight","showPlaceholderWhenSelected","inputStyle","inputType","onDeleteChip","truncatedText","showLeadingIconInPlaceholder","showTrailingIconPlaceholder"]);const[E,_]=n.useState(!1),z=null!=f?f:"default",W=n.useRef(),[A,L]=n.useState(null!=I?I:[]);n.useEffect((()=>{var e;const t=[];null===(e=null==C?void 0:C.options)||void 0===e||e.forEach((e=>{e.options?e.options.forEach((e=>{e.selected&&t.push(Object.assign(Object.assign({},e),{label:e.label}))})):e.selected&&t.push(e)})),L([...t])}),[C.options]),n.useEffect((()=>{I&&L([...I])}),[I]);const M=d.getSelectedOptionsAsText(A);return t.jsx(r.InputStyleContext.Provider,Object.assign({value:{InputWrapper:Object.assign({height:O||("x-small"===z?24:"small"===z?32:48),width:null!==(h=null!==(p=C.buttonWidth)&&void 0!==p?p:C.width)&&void 0!==h?h:"100%",zIndex:1,cursor:"pointer",padding:"x-small"===z?"4px 8px":"6px 8px"},m),input:{minHeight:"100%"}}},{children:t.jsxs(a.DropdownPopover,Object.assign({"data-test":C["data-test"],ref:W,onSelect:function(e){Array.isArray(e)?L([...e]):L([e]),null==w||w(e)},disabled:b,onDropdownVisbilityChange:e=>_(e)},C,{children:["default"==D&&t.jsx(i.Input,{version:C.version,noErrorHint:y,state:b?"disabled":"none",value:S?j:null!=M?M:"",errorMessage:C.error,variant:z,placeholder:null!=j?j:"Select an option",width:null!==(v=C.width)&&void 0!==v?v:"100%",onChangeText:u,leftIcon:q&&(null===(g=A[0])||void 0===g?void 0:g.leadingIcon)?{icon:()=>{var e;return t.jsx(t.Fragment,{children:null===(e=A[0])||void 0===e?void 0:e.leadingIcon})}}:void 0,rightIcon:{icon:()=>{var e;return t.jsxs("div",Object.assign({style:{display:"flex"}},{children:[H&&(null===(e=A[0])||void 0===e?void 0:e.trailingIcon),t.jsx(o.default,{style:{transform:E?"rotate(180deg)":"rotate(0deg)"},onClick:u,width:"x-small"===z?16:"small"===z?20:24,height:"x-small"===z?16:"small"===z?20:24,color:l.COLORS.content.primary})]}))}},truncateText:null==T||T}),"chip"==D&&t.jsx(s.default,{placeholder:null!=j?j:"Select options",chips:A,onDeleteChip:e=>{null==P||P(e)},isDropdownOpened:E,sizeToUse:z,containerStyle:{width:null!==(x=C.width)&&void 0!==x?x:"100%",cursor:"pointer"}})]}))}))};c.displayName="Dropdown",exports.Dropdown=c;
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import { QueryBuilderNodeProps } from "../../../Types/QueryBuilderNodeProps.type";
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 "../../../Types/QueryBuilderAPI.type";
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 "../../../Types/QueryBuilderNodeProps.type";
2
+ import { QueryBuilderNodeProps } from "../../../types/QueryBuilderNodeProps.type";
3
3
  declare const IGTrigger: React.FC<QueryBuilderNodeProps>;
4
4
  export default IGTrigger;
@@ -1,2 +1,2 @@
1
- import { QueryBuilderAPIData } from "../../../Types/QueryBuilderAPI.type";
1
+ import { QueryBuilderAPIData } from "../../../types/QueryBuilderAPI.type";
2
2
  export declare const useIGTriggerNameCacheSelector: () => QueryBuilderAPIData[];
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { DropdownOption } from "../../../dropdown/type";
3
- import { QueryBuilderProperty } from "../../Types/QueryBuilder.type";
4
- import { QueryBuilderNodeProps } from "../../Types/QueryBuilderNodeProps.type";
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;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const Menus: ({
3
2
  displayName: string;
4
3
  key: number;
@@ -12,7 +12,6 @@ export type CheckBoxProps = {
12
12
  rightComponent?: JSX.Element;
13
13
  checkboxBorderColor?: string;
14
14
  boldOnChecked?: boolean;
15
- bold?: boolean;
16
15
  style?: React.CSSProperties;
17
16
  enableHover?: boolean;
18
17
  activeColor?: string;
@@ -1 +1 @@
1
- import{jsxs as e,jsx as i,Fragment as l}from"react/jsx-runtime";import{useState as s,useEffect as t,useMemo as a}from"react";import{CheckboxContainer as o,CheckboxIcon as r}from"./CheckBox.styled.js";import{TitleRegular as d,TitleSmall as n,BodySecondary as c,BodyPrimary as b}from"../TypographyStyle.js";import{COLORS as h}from"../../constants/Theme.js";const m=l=>{const s=a((()=>l.activeColor||h.background.positive.vibrant),[l.activeColor]);return e("svg",Object.assign({width:l.isSmall?"16":"18",height:l.isSmall?"16":"18",viewBox:l.isSmall?"0 0 16 16":"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[i("rect",{x:"0",y:"0",width:l.isSmall?"16":"18",height:l.isSmall?"16":"18",rx:"4",fill:l.isDisabled?h.content.inactive:s}),!l.isPartial&&i("svg",Object.assign({width:l.isSmall?"8":"10",height:l.isSmall?"7":"9",x:"4",y:"4",viewBox:"0 0 10 9",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:i("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.68189 1.06043C10.0724 1.45096 10.0724 2.08412 9.68189 2.47464L4.02501 8.13152C3.63449 8.52205 3.00132 8.52205 2.6108 8.13152L0.489684 6.01041C0.0991601 5.61988 0.0991598 4.98672 0.489684 4.59619C0.880209 4.20567 1.51337 4.20567 1.9039 4.59619L3.31791 6.0102L8.26768 1.06043C8.6582 0.669907 9.29137 0.669907 9.68189 1.06043Z",fill:"white"})})),l.isPartial&&i("rect",{x:"5",y:l.isSmall?"7":"8",width:l.isSmall?"6":"8",height:"2",rx:"1",fill:h.surface.standard})]}))},v=a=>{var v;const[g,C]=s(a.isChecked||!1),[p,x]=s(a.isPartiallyChecked||!1),[S,u]=s(a.isDisabled||!1),[w,y]=s(!1),[k,D]=s(!1);t((()=>{C(a.isChecked)}),[a.isChecked]),t((()=>{u(a.isDisabled||!1)}),[a.isDisabled]),t((()=>{x(a.isPartiallyChecked||!1)}),[a.isPartiallyChecked]);return e(o,Object.assign({onClick:e=>{var i;if(!a.isDisabled){const l=!g;p?x(!p):C(l),null===(i=a.onValueChange)||void 0===i||i.call(a,l,a.value,e)}},onMouseEnter:()=>y(!a.skipHoverState),onMouseLeave:()=>y(!1),onMouseDown:()=>D(!a.skipHoverState),onMouseUp:()=>D(!1),isDisabled:S,enableHover:a.enableHover,style:null!==(v=a.style)&&void 0!==v?v:{}},{children:[i(r,Object.assign({checked:g,hovered:w,clicked:k,isDisabled:S,size:a.size,borderColor:a.checkboxBorderColor},{children:g&&i(m,{isPartial:p||!1,isDisabled:S,isSmall:"SMALL"===a.size,activeColor:null==a?void 0:a.activeColor})})),a.label?a.boldOnChecked&&g||a.bold?"DEFAULT"===a.labelSize?i(d,Object.assign({color:a.isDisabled?h.text.disabled:h.text.primary},{children:a.label})):i(n,Object.assign({color:a.isDisabled?h.text.disabled:h.text.primary},{children:a.label})):"SMALL"===a.size||"SMALL"===a.labelSize?i(c,Object.assign({color:a.isDisabled?h.text.disabled:h.text.primary},{children:a.label})):i(b,Object.assign({color:a.isDisabled?h.text.disabled:h.text.primary},{children:a.label})):i(l,{}),a.rightComponent]}))};export{v as CheckBox};
1
+ import{jsxs as e,jsx as i,Fragment as l}from"react/jsx-runtime";import{useState as s,useEffect as t,useMemo as a}from"react";import{CheckboxContainer as o,CheckboxIcon as r}from"./CheckBox.styled.js";import{TitleRegular as d,TitleSmall as n,BodySecondary as c,BodyPrimary as h}from"../TypographyStyle.js";import{COLORS as b}from"../../constants/Theme.js";const m=l=>{const s=a((()=>l.activeColor||b.background.positive.vibrant),[l.activeColor]);return e("svg",Object.assign({width:l.isSmall?"16":"18",height:l.isSmall?"16":"18",viewBox:l.isSmall?"0 0 16 16":"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[i("rect",{x:"0",y:"0",width:l.isSmall?"16":"18",height:l.isSmall?"16":"18",rx:"4",fill:l.isDisabled?b.content.inactive:s}),!l.isPartial&&i("svg",Object.assign({width:l.isSmall?"8":"10",height:l.isSmall?"7":"9",x:"4",y:"4",viewBox:"0 0 10 9",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:i("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.68189 1.06043C10.0724 1.45096 10.0724 2.08412 9.68189 2.47464L4.02501 8.13152C3.63449 8.52205 3.00132 8.52205 2.6108 8.13152L0.489684 6.01041C0.0991601 5.61988 0.0991598 4.98672 0.489684 4.59619C0.880209 4.20567 1.51337 4.20567 1.9039 4.59619L3.31791 6.0102L8.26768 1.06043C8.6582 0.669907 9.29137 0.669907 9.68189 1.06043Z",fill:"white"})})),l.isPartial&&i("rect",{x:"5",y:l.isSmall?"7":"8",width:l.isSmall?"6":"8",height:"2",rx:"1",fill:b.surface.standard})]}))},v=a=>{var v;const[g,C]=s(a.isChecked||!1),[p,x]=s(a.isPartiallyChecked||!1),[S,u]=s(a.isDisabled||!1),[w,y]=s(!1),[k,D]=s(!1);t((()=>{C(a.isChecked)}),[a.isChecked]),t((()=>{u(a.isDisabled||!1)}),[a.isDisabled]),t((()=>{x(a.isPartiallyChecked||!1)}),[a.isPartiallyChecked]);return e(o,Object.assign({onClick:e=>{var i;if(!a.isDisabled){const l=!g;p?x(!p):C(l),null===(i=a.onValueChange)||void 0===i||i.call(a,l,a.value,e)}},onMouseEnter:()=>y(!a.skipHoverState),onMouseLeave:()=>y(!1),onMouseDown:()=>D(!a.skipHoverState),onMouseUp:()=>D(!1),isDisabled:S,enableHover:a.enableHover,style:null!==(v=a.style)&&void 0!==v?v:{}},{children:[i(r,Object.assign({checked:g,hovered:w,clicked:k,isDisabled:S,size:a.size,borderColor:a.checkboxBorderColor},{children:g&&i(m,{isPartial:p||!1,isDisabled:S,isSmall:"SMALL"===a.size,activeColor:null==a?void 0:a.activeColor})})),a.label?a.boldOnChecked&&g?"DEFAULT"===a.labelSize?i(d,Object.assign({color:a.isDisabled?b.text.disabled:b.text.primary},{children:a.label})):i(n,Object.assign({color:a.isDisabled?b.text.disabled:b.text.primary},{children:a.label})):"SMALL"===a.size||"SMALL"===a.labelSize?i(c,Object.assign({color:a.isDisabled?b.text.disabled:b.text.primary},{children:a.label})):i(h,Object.assign({color:a.isDisabled?b.text.disabled:b.text.primary},{children:a.label})):i(l,{}),a.rightComponent]}))};export{v as CheckBox};
@@ -7,8 +7,6 @@ interface ChipInputProps {
7
7
  containerStyle?: React.CSSProperties;
8
8
  isDropdownOpened?: boolean;
9
9
  sizeToUse?: 'default' | 'small' | 'x-small';
10
- errorMessage?: string;
11
- showLabelsOnMoreHover?: boolean;
12
10
  }
13
11
  declare const ChipInput: React.FC<ChipInputProps>;
14
12
  export default ChipInput;
@@ -1 +1 @@
1
- import{jsxs as e,Fragment as t,jsx as s}from"react/jsx-runtime";import{useState as o,useEffect as l}from"react";import i from"../../utils/StringUtils.js";import{COLORS as r}from"../../constants/Theme.js";import n from"../../assets/icons/chevronDown.svg.js";import c from"../../assets/icons/cross.svg.js";import a from"../../assets/icons/errorInfo.svg.js";import{InputFooter as d}from"../input/Input.styled.js";import{Tag as h}from"../tag/Tag.js";import{Tooltip as m}from"../tooltips/Tooltip.js";import{BodyCaption as p}from"../TypographyStyle.js";import{ChipInputWrapper as g}from"./Common.styled.js";const j=j=>{let{chips:b,onDeleteChip:f,containerStyle:v={},sizeToUse:y="default",isDropdownOpened:O,placeholder:u="Select..",errorMessage:x="",showLabelsOnMoreHover:T=!1}=j;const[w,I]=o(),[C,S]=o(0),[z,D]=o([]);return l((()=>{if(!b)return;let e=0;const t=(e=>1===e.length?100:2===e.length?40:34)(b);let s=b.filter((s=>(e+=s.label.length,e<=t)));0===s.length&&b.length>0&&(s=[b[0]]),I(s);const o=b.filter((e=>!s.includes(e))).map((e=>e.label));D(o),S(b.length-s.length)}),[b]),e(t,{children:[e(g,Object.assign({style:Object.assign({},v),error:!!x},{children:[e("div",Object.assign({className:"chips-container"},{children:[null==w?void 0:w.map(((e,t)=>s("div",Object.assign({style:{zIndex:2}},{children:s(h,Object.assign({tagText:i.truncateText(e.selectedLabel||e.label,40),TrailingIcon:()=>s(c,{width:12,height:12,style:{cursor:"pointer"},onClick:()=>{f(e)}})},{children:e.selectedLabel||e.label}))}),t))),!!C&&s("div",Object.assign({style:{position:"relative",zIndex:10,pointerEvents:"auto"}},{children:s(m,Object.assign({body:"",placement:"bottom",tooltipContent:T&&z.length>0?s("div",Object.assign({style:{padding:"4px"}},{children:z.map(((e,t)=>s(p,Object.assign({style:{color:r.text.white}},{children:e}),t)))})):void 0},{children:s(p,Object.assign({color:r.content.placeholder},{children:`+${C} more`}))}))})),0===b.length&&s("div",Object.assign({style:{color:r.content.placeholder}},{children:u}))]})),s("div",{children:s(n,{style:{transform:O?"rotate(180deg)":"rotate(0deg)"},width:"x-small"===y?16:"small"===y?20:24,height:"x-small"===y?16:"small"===y?20:24,color:r.content.primary})})]})),!!x&&e(d,Object.assign({invalid:!0},{children:[!!x&&s(a,{width:16,height:16}),x]}))]})};export{j as default};
1
+ import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useState as l,useEffect as s}from"react";import r from"../../utils/StringUtils.js";import{COLORS as o}from"../../constants/Theme.js";import n from"../../assets/icons/chevronDown.svg.js";import i from"../../assets/icons/cross.svg.js";import{Tag as c}from"../tag/Tag.js";import{BodyCaption as a}from"../TypographyStyle.js";import{ChipInputWrapper as m}from"./Common.styled.js";const h=h=>{let{chips:d,onDeleteChip:g,containerStyle:p={},sizeToUse:j="default",isDropdownOpened:f,placeholder:b="Select.."}=h;const[y,u]=l(),[v,O]=l(0);return s((()=>{if(!d)return;let e=0;const t=(e=>1===e.length?100:2===e.length?40:34)(d);let l=d.filter((l=>(e+=l.label.length,e<=t)));0===l.length&&d.length>0&&(l=[d[0]]),u(l),O(d.length-l.length)}),[d]),e(m,Object.assign({style:Object.assign({},p)},{children:[e("div",Object.assign({className:"chips-container"},{children:[null==y?void 0:y.map(((e,l)=>t("div",Object.assign({style:{zIndex:2}},{children:t(c,Object.assign({tagText:r.truncateText(e.selectedLabel||e.label,40),TrailingIcon:()=>t(i,{width:12,height:12,style:{cursor:"pointer"},onClick:()=>{g(e)}})},{children:e.selectedLabel||e.label}))}),l))),!!v&&t(a,Object.assign({color:o.content.placeholder},{children:`+${v} more`})),0===d.length&&t("div",Object.assign({style:{color:o.content.placeholder}},{children:b}))]})),t("div",{children:t(n,{style:{transform:f?"rotate(180deg)":"rotate(0deg)"},width:"x-small"===j?16:"small"===j?20:24,height:"x-small"===j?16:"small"===j?20:24,color:o.content.primary})})]}))};export{h as default};
@@ -4,6 +4,4 @@ export declare const OverLapAbs: import("styled-components").StyledComponent<"di
4
4
  }, never>;
5
5
  export declare const OpenDropdownContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
6
6
  export declare const LoadingContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
7
- export declare const ChipInputWrapper: import("styled-components").StyledComponent<"div", any, {
8
- error?: boolean | undefined;
9
- }, never>;
7
+ export declare const ChipInputWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -27,7 +27,7 @@ import e from"styled-components";import{COLORS as i}from"../../constants/Theme.j
27
27
  justify-content: space-between;
28
28
  align-items: center;
29
29
  border-radius: 4px;
30
- border: ${e=>e.error?`1px solid ${i.stroke.negative.vibrant}`:`1px solid ${i.stroke.primary}`};
30
+ border: 1px solid ${i.stroke.primary};
31
31
  .chips-container {
32
32
  display: flex;
33
33
  gap: 8px;
@@ -15,6 +15,5 @@ export type DropdownProps = OpenDropdownProps & {
15
15
  'data-test'?: string;
16
16
  showLeadingIconInPlaceholder?: boolean;
17
17
  showTrailingIconPlaceholder?: boolean;
18
- showLabelsOnMoreHover?: boolean;
19
18
  };
20
19
  export declare const Dropdown: React.FC<DropdownProps>;
@@ -1 +1 @@
1
- import{__rest as e}from"../../_virtual/_tslib.js";import{jsx as o,jsxs as n,Fragment as t}from"react/jsx-runtime";import{useState as l,useRef as r,useEffect as i}from"react";import{COLORS as s}from"../../constants/Theme.js";import a from"../../assets/icons/chevronDown.svg.js";import{Input as d}from"../input/Input.js";import{InputStyleContext as c}from"../input/context/InputStyleProvider.js";import p from"./ChipInput.js";import{DropdownPopover as h}from"./DropdownPopover/index.js";import{getSelectedOptionsAsText as u}from"./OpenedDropdown/utils/iterationOnOptions.js";function m(){}const v=v=>{var g,f,w,b,x,{placeHolder:I,size:j,onSelect:O,defaultOptions:y,disabled:H,noErrorHint:S,placeHolderHeight:T,showPlaceholderWhenSelected:D=!1,inputStyle:P={},inputType:C="default",onDeleteChip:E,truncatedText:L,showLeadingIconInPlaceholder:M=!1,showTrailingIconPlaceholder:z=!1,showLabelsOnMoreHover:W=!1}=v,A=e(v,["placeHolder","size","onSelect","defaultOptions","disabled","noErrorHint","placeHolderHeight","showPlaceholderWhenSelected","inputStyle","inputType","onDeleteChip","truncatedText","showLeadingIconInPlaceholder","showTrailingIconPlaceholder","showLabelsOnMoreHover"]);const[_,k]=l(!1),N=null!=j?j:"default",U=r(),[V,q]=l(null!=y?y:[]);i((()=>{var e;const o=[];null===(e=null==A?void 0:A.options)||void 0===e||e.forEach((e=>{e.options?e.options.forEach((e=>{e.selected&&o.push(Object.assign(Object.assign({},e),{label:e.label}))})):e.selected&&o.push(e)})),q([...o])}),[A.options]),i((()=>{y&&q([...y])}),[y]);const B=u(V);return o(c.Provider,Object.assign({value:{InputWrapper:Object.assign({height:T||("x-small"===N?24:"small"===N?32:48),width:null!==(f=null!==(g=A.buttonWidth)&&void 0!==g?g:A.width)&&void 0!==f?f:"100%",zIndex:1,cursor:"pointer",padding:"x-small"===N?"4px 8px":"6px 8px"},P),input:{minHeight:"100%"}}},{children:n(h,Object.assign({"data-test":A["data-test"],ref:U,onSelect:function(e){Array.isArray(e)?q([...e]):q([e]),null==O||O(e)},disabled:H,onDropdownVisbilityChange:e=>k(e)},A,{children:["default"==C&&o(d,{version:A.version,noErrorHint:S,state:H?"disabled":"none",value:D?I:null!=B?B:"",errorMessage:A.error,variant:N,placeholder:null!=I?I:"Select an option",width:null!==(w=A.width)&&void 0!==w?w:"100%",onChangeText:m,leftIcon:M&&(null===(b=V[0])||void 0===b?void 0:b.leadingIcon)?{icon:()=>{var e;return o(t,{children:null===(e=V[0])||void 0===e?void 0:e.leadingIcon})}}:void 0,rightIcon:{icon:()=>{var e;return n("div",Object.assign({style:{display:"flex"}},{children:[z&&(null===(e=V[0])||void 0===e?void 0:e.trailingIcon),o(a,{style:{transform:_?"rotate(180deg)":"rotate(0deg)"},onClick:m,width:"x-small"===N?16:"small"===N?20:24,height:"x-small"===N?16:"small"===N?20:24,color:s.content.primary})]}))}},truncateText:null==L||L}),"chip"==C&&o(p,{placeholder:null!=I?I:"Select options",chips:V,onDeleteChip:e=>{null==E||E(e)},errorMessage:A.error,isDropdownOpened:_,sizeToUse:N,containerStyle:{width:null!==(x=A.width)&&void 0!==x?x:"100%",cursor:"pointer"},showLabelsOnMoreHover:null!=W&&W})]}))}))};v.displayName="Dropdown";export{v as Dropdown};
1
+ import{__rest as e}from"../../_virtual/_tslib.js";import{jsx as o,jsxs as n,Fragment as t}from"react/jsx-runtime";import{useState as l,useRef as i,useEffect as r}from"react";import{COLORS as s}from"../../constants/Theme.js";import a from"../../assets/icons/chevronDown.svg.js";import{Input as d}from"../input/Input.js";import{InputStyleContext as c}from"../input/context/InputStyleProvider.js";import p from"./ChipInput.js";import{DropdownPopover as u}from"./DropdownPopover/index.js";import{getSelectedOptionsAsText as h}from"./OpenedDropdown/utils/iterationOnOptions.js";function m(){}const v=v=>{var g,f,w,x,I,{placeHolder:b,size:j,onSelect:y,defaultOptions:O,disabled:S,noErrorHint:H,placeHolderHeight:T,showPlaceholderWhenSelected:D=!1,inputStyle:P={},inputType:C="default",onDeleteChip:E,truncatedText:z,showLeadingIconInPlaceholder:W=!1,showTrailingIconPlaceholder:A=!1}=v,L=e(v,["placeHolder","size","onSelect","defaultOptions","disabled","noErrorHint","placeHolderHeight","showPlaceholderWhenSelected","inputStyle","inputType","onDeleteChip","truncatedText","showLeadingIconInPlaceholder","showTrailingIconPlaceholder"]);const[_,k]=l(!1),M=null!=j?j:"default",N=i(),[U,V]=l(null!=O?O:[]);r((()=>{var e;const o=[];null===(e=null==L?void 0:L.options)||void 0===e||e.forEach((e=>{e.options?e.options.forEach((e=>{e.selected&&o.push(Object.assign(Object.assign({},e),{label:e.label}))})):e.selected&&o.push(e)})),V([...o])}),[L.options]),r((()=>{O&&V([...O])}),[O]);const q=h(U);return o(c.Provider,Object.assign({value:{InputWrapper:Object.assign({height:T||("x-small"===M?24:"small"===M?32:48),width:null!==(f=null!==(g=L.buttonWidth)&&void 0!==g?g:L.width)&&void 0!==f?f:"100%",zIndex:1,cursor:"pointer",padding:"x-small"===M?"4px 8px":"6px 8px"},P),input:{minHeight:"100%"}}},{children:n(u,Object.assign({"data-test":L["data-test"],ref:N,onSelect:function(e){Array.isArray(e)?V([...e]):V([e]),null==y||y(e)},disabled:S,onDropdownVisbilityChange:e=>k(e)},L,{children:["default"==C&&o(d,{version:L.version,noErrorHint:H,state:S?"disabled":"none",value:D?b:null!=q?q:"",errorMessage:L.error,variant:M,placeholder:null!=b?b:"Select an option",width:null!==(w=L.width)&&void 0!==w?w:"100%",onChangeText:m,leftIcon:W&&(null===(x=U[0])||void 0===x?void 0:x.leadingIcon)?{icon:()=>{var e;return o(t,{children:null===(e=U[0])||void 0===e?void 0:e.leadingIcon})}}:void 0,rightIcon:{icon:()=>{var e;return n("div",Object.assign({style:{display:"flex"}},{children:[A&&(null===(e=U[0])||void 0===e?void 0:e.trailingIcon),o(a,{style:{transform:_?"rotate(180deg)":"rotate(0deg)"},onClick:m,width:"x-small"===M?16:"small"===M?20:24,height:"x-small"===M?16:"small"===M?20:24,color:s.content.primary})]}))}},truncateText:null==z||z}),"chip"==C&&o(p,{placeholder:null!=b?b:"Select options",chips:U,onDeleteChip:e=>{null==E||E(e)},isDropdownOpened:_,sizeToUse:M,containerStyle:{width:null!==(I=L.width)&&void 0!==I?I:"100%",cursor:"pointer"}})]}))}))};v.displayName="Dropdown";export{v as Dropdown};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bikdotai/bik-component-library",
3
- "version": "0.0.673-beta.1",
3
+ "version": "0.0.673",
4
4
  "description": "Bik Component Library",
5
5
  "repository": {
6
6
  "type": "git",