@bikdotai/bik-component-library 0.0.620-mldn.3 → 0.0.620-mldn.4
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/bik-layout/MockMenus.d.ts +1 -0
- package/dist/cjs/components/multi-level-dropdown/GroupedMenuList.js +1 -1
- package/dist/cjs/components/multi-level-dropdown/MenuItem.js +1 -1
- package/dist/cjs/components/multi-level-dropdown/MultiLevelDropdown.js +1 -1
- package/dist/cjs/components/multi-level-dropdown/MultiLevelDropdown.styled.d.ts +4 -1
- package/dist/cjs/components/multi-level-dropdown/MultiLevelDropdown.styled.js +14 -12
- package/dist/cjs/components/multi-level-dropdown/type.d.ts +4 -1
- package/dist/esm/components/bik-layout/MockMenus.d.ts +1 -0
- package/dist/esm/components/multi-level-dropdown/GroupedMenuList.js +1 -1
- package/dist/esm/components/multi-level-dropdown/MenuItem.js +1 -1
- package/dist/esm/components/multi-level-dropdown/MultiLevelDropdown.js +1 -1
- package/dist/esm/components/multi-level-dropdown/MultiLevelDropdown.styled.d.ts +4 -1
- package/dist/esm/components/multi-level-dropdown/MultiLevelDropdown.styled.js +13 -11
- package/dist/esm/components/multi-level-dropdown/type.d.ts +4 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("../../constants/Theme.js"),t=require("../TypographyStyle.js"),n=require("./MenuItem.js"),o=require("./MultiLevelDropdown.styled.js");exports.GroupedMenuList=s=>{let{width:i,onDropdownItemClick:p,option:l,parents:u}=s;return e.jsxs(o.GroupedMenuListContainer,{children:[e.jsx(t.BodyTiny,Object.assign({style:{padding:"4px 8px 4px
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("../../constants/Theme.js"),t=require("../TypographyStyle.js"),n=require("./MenuItem.js"),o=require("./MultiLevelDropdown.styled.js");exports.GroupedMenuList=s=>{let{width:i,onDropdownItemClick:p,option:l,parents:u}=s;return e.jsxs(o.GroupedMenuListContainer,{children:[e.jsx(t.BodyTiny,Object.assign({style:{padding:"4px 8px 4px 16px"},color:r.COLORS.content.placeholder},{children:l.label})),l.options.map(((r,t)=>e.jsx(n.MenuItem,{width:i,onDropdownItemClick:p,option:r,parents:u},t)))]})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../assets/icons/chevronRight2.svg.js"),n=require("react"),i=require("../../constants/Theme.js"),s=require("../TypographyStyle.js"),o=require("./MenuList.js"),r=require("./MultiLevelDropdown.styled.js");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=l(n);exports.MenuItem=l=>{let{width:c,onDropdownItemClick:a,option:u,parents:p}=l;var h,O,v,j,b,g,C;const[x,m]=d.default.useState(!1),[f
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../assets/icons/chevronRight2.svg.js"),n=require("react"),i=require("../../constants/Theme.js"),s=require("../TypographyStyle.js"),o=require("./MenuList.js"),r=require("./MultiLevelDropdown.styled.js");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=l(n);exports.MenuItem=l=>{let{width:c,onDropdownItemClick:a,option:u,parents:p}=l;var h,O,v,j,b,g,C;const[x,m]=d.default.useState(!1),[S,f]=d.default.useState(!1),[y,L]=d.default.useState({top:0,left:0}),M=n.useRef({top:0,left:0});return e.jsxs(r.MenuItemWrapper,Object.assign({onMouseEnter:e=>{m(!0),(e=>{const t=e.currentTarget.getBoundingClientRect();L({top:t.top,left:t.right}),M.current={top:t.top,left:t.right}})(e)},onMouseLeave:()=>{m(!1)},onClick:()=>{var e;null!==(e=u.disabled)&&void 0!==e&&e||u.children||a(u,p)},id:"menuItemWrapper",style:{cursor:null!==(h=u.disabled)&&void 0!==h&&h?"not-allowed":"pointer",backgroundColor:null!==(O=u.disabled)&&void 0!==O&&O?i.COLORS.surface.standard:"transparent"}},{children:[u.customComponent?u.customComponent:e.jsxs(r.MenuItemContainer,Object.assign({isSelected:u.selected,isSubMenuOpen:x,isHovered:S,isDisabled:null!==(v=u.disabled)&&void 0!==v&&v},{children:[e.jsxs(r.ContentContainer,{children:[u.leadingIcon&&u.leadingIcon,e.jsxs("div",{children:[e.jsx(s.BodyCaption,Object.assign({style:{color:null!==(j=u.disabled)&&void 0!==j&&j?i.COLORS.content.inactive:u.selected||S?i.COLORS.content.positive:i.COLORS.content.primary}},{children:u.label})),u.subText&&e.jsx(s.BodyTiny,Object.assign({style:{color:null!==(b=u.disabled)&&void 0!==b&&b?i.COLORS.content.inactive:u.selected||S?i.COLORS.content.positive:i.COLORS.content.secondary,marginTop:"2px"}},{children:u.subText}))]})]}),u.children&&u.children.length>0?e.jsx(t.default,{width:16,height:16,color:null!==(g=u.disabled)&&void 0!==g&&g?i.COLORS.content.inactive:u.selected||S?i.COLORS.content.positive:i.COLORS.content.primary}):u.trailingIcon?u.trailingIcon:e.jsx(e.Fragment,{})]})),!(null!==(C=u.disabled)&&void 0!==C&&C)&&u.children&&u.children.length>0&&x&&e.jsx("div",Object.assign({style:{width:c},className:"submenu",onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1)},{children:e.jsx(r.SubMenuWrapper,Object.assign({style:{width:c,top:`${y.top}px`,left:`${y.left}px`}},{children:e.jsx(r.SubMenuListContainer,{children:e.jsx(o.MenuList,{width:c,onDropdownItemClick:a,options:u.children,parents:[...p,u]})})}))}))]}))};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),n=require("../zeroState/ZeroState.js"),r=require("../../constants/Theme.js"),s=require("../dropdown/OpenedDropdown/components/searchbox/SearchBox.js"),o=require("../floater/floater.js"),i=require("./MenuList.js"),l=require("./MultiLevelDropdown.styled.js");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=u(t);exports.MultiLevelDropdown=u=>{let{options:d,width:a,isSearchable:p,onDropdownItemClick:f,refElement:h,topOffset:j,leftOffset:O,isDropdownOpen:w,onDropdownOutsideClick:x}=u;const b=c.default.useRef(null),[g,m]=t.useState(d),v=e=>{b.current&&!b.current.contains(e.target)?x&&x(!0):x&&x(!1)};return t.useEffect((()=>(document.addEventListener("mousedown",v),()=>{document.removeEventListener("mousedown",v)})),[]),e.jsx(o.Floater,Object.assign({refElement:h,topOffset:j,leftOffset:O},{children:w&&e.jsx("div",Object.assign({ref:b,style:{backgroundColor:r.COLORS.surface.standard,zIndex:99999}},{children:e.jsxs(l.DropdownContainer,Object.assign({width:a},{children:[p&&e.jsx("div",Object.assign({style:{padding:"4px",width:null!=a?a:"200px"}},{children:e.jsx(s.SearchBox,{onSearch:e=>{const t=[...d],n=[];for(;t.length>0;){const r=t.shift();r&&r.label.toLowerCase().includes(e.toLowerCase())&&n.push(r),r&&"children"in r&&r.children?t.push(...r.children):r&&"options"in r&&r.options&&t.push(...r.options)}const r=e=>e.map((e=>{if(n.includes(e))return e;if("children"in e&&e.children){const t=r(e.children);if(t.length>0)return Object.assign(Object.assign({},e),{children:t})}if("options"in e&&e.options){const t=r(e.options);if(t.length>0)return Object.assign(Object.assign({},e),{options:t})}return null})).filter((e=>null!==e));m(r(d))},version:"2.0"})})),e.jsx(l.OptionsContainer,Object.assign({width:a},{children:(null!=g?g:[]).length>0&&e.jsx(i.MenuList,{width:null!=a?a:"200px",onDropdownItemClick:f,options:g,parents:[]})})),0===(null!=g?g:[]).length&&e.jsx(l.NoResultsContainer,{children:e.jsx(n.ZeroState,{title:"No results found!",subTitle:"Sorry, we are unable to find any results for your search."})})]}))}))}))};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
export declare const DropdownContainer: import("styled-components").StyledComponent<"div", any, {
|
|
2
2
|
width?: string | undefined;
|
|
3
3
|
}, never>;
|
|
4
|
+
export declare const OptionsContainer: import("styled-components").StyledComponent<"div", any, {
|
|
5
|
+
width?: string | undefined;
|
|
6
|
+
}, never>;
|
|
4
7
|
export declare const NoResultsContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
5
8
|
export declare const GroupedMenuListContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
6
9
|
export declare const StyledMenuList: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -14,4 +17,4 @@ export interface MenuItemContainerProps {
|
|
|
14
17
|
export declare const MenuItemContainer: import("styled-components").StyledComponent<"div", any, MenuItemContainerProps, never>;
|
|
15
18
|
export declare const ContentContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
16
19
|
export declare const SubMenuWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
17
|
-
export declare const
|
|
20
|
+
export declare const SubMenuListContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -1,32 +1,33 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("styled-components"),t=require("../../constants/Theme.js");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=r(e);const o=i.default.div`
|
|
2
2
|
position: relative;
|
|
3
|
+
border-radius: 8px;
|
|
4
|
+
box-shadow: 0px 2px 8px 0px rgba(0, 0, 0, 0.12);
|
|
5
|
+
padding-bottom: 4px;
|
|
6
|
+
`,n=i.default.div`
|
|
3
7
|
width: ${e=>{let{width:t}=e;return t||"200px"}};
|
|
4
8
|
max-width: 300px;
|
|
5
9
|
max-height: 280px;
|
|
6
10
|
overflow-y: scroll;
|
|
7
|
-
border-radius: 8px;
|
|
8
|
-
box-shadow: 0px 2px 8px 0px rgba(0, 0, 0, 0.12);
|
|
9
11
|
&::-webkit-scrollbar {
|
|
10
12
|
width: 0px;
|
|
11
13
|
}
|
|
12
|
-
`,
|
|
14
|
+
`,a=i.default.div`
|
|
13
15
|
margin-top: 64px;
|
|
14
16
|
height: 200px;
|
|
15
|
-
`,
|
|
17
|
+
`,d=i.default.div`
|
|
16
18
|
width: 100%;
|
|
17
19
|
justify-content: center;
|
|
18
20
|
cursor: pointer;
|
|
19
21
|
align-items: center;
|
|
20
22
|
justify-content: space-between;
|
|
21
23
|
margin: 4px 0;
|
|
22
|
-
`,
|
|
24
|
+
`,s=i.default.div`
|
|
23
25
|
z-index: 1000;
|
|
24
26
|
position: relative;
|
|
25
27
|
margin: 0px;
|
|
26
28
|
padding: 0px;
|
|
27
|
-
padding-bottom: 4px;
|
|
28
29
|
width: 100%;
|
|
29
|
-
`,
|
|
30
|
+
`,p=i.default.div`
|
|
30
31
|
position: relative;
|
|
31
32
|
padding: 1px 4px;
|
|
32
33
|
cursor: pointer;
|
|
@@ -35,7 +36,7 @@
|
|
|
35
36
|
&:focus-within > .submenu {
|
|
36
37
|
display: block;
|
|
37
38
|
}
|
|
38
|
-
`,
|
|
39
|
+
`,u=i.default.div`
|
|
39
40
|
position: relative;
|
|
40
41
|
padding: 4px 8px 4px 12px;
|
|
41
42
|
transition: background-color 0.2s;
|
|
@@ -51,24 +52,25 @@
|
|
|
51
52
|
&:hover {
|
|
52
53
|
background-color: ${e=>{let{isSelected:r,isDisabled:i}=e;return i?t.COLORS.surface.standard:r?t.COLORS.background.positive.light:t.COLORS.surface.hovered}};
|
|
53
54
|
}
|
|
54
|
-
`,
|
|
55
|
+
`,l=i.default.div`
|
|
55
56
|
display: flex;
|
|
56
57
|
align-items: center;
|
|
57
58
|
gap: 8px;
|
|
58
|
-
`,
|
|
59
|
+
`,x=i.default.div`
|
|
59
60
|
z-index: 1001;
|
|
60
61
|
position: fixed;
|
|
61
62
|
border-left: 4px solid transparent;
|
|
62
|
-
`,
|
|
63
|
+
`,c=i.default.div`
|
|
63
64
|
margin: 4px;
|
|
64
65
|
background-color: ${t.COLORS.surface.standard};
|
|
65
66
|
box-shadow: 0px 2px 8px 0px rgba(0, 0, 0, 0.12);
|
|
66
67
|
border-radius: 8px;
|
|
67
68
|
padding-top: 4px;
|
|
68
69
|
max-height: 480px;
|
|
70
|
+
padding-bottom: 4px;
|
|
69
71
|
overflow-y: scroll;
|
|
70
72
|
|
|
71
73
|
&::-webkit-scrollbar {
|
|
72
74
|
display: none;
|
|
73
75
|
}
|
|
74
|
-
`;exports.
|
|
76
|
+
`;exports.ContentContainer=l,exports.DropdownContainer=o,exports.GroupedMenuListContainer=d,exports.MenuItemContainer=u,exports.MenuItemWrapper=p,exports.NoResultsContainer=a,exports.OptionsContainer=n,exports.StyledMenuList=s,exports.SubMenuListContainer=c,exports.SubMenuWrapper=x;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
2
|
+
import { FloaterProps } from '../floater/floater';
|
|
3
|
+
export interface MultiLevelDropdownProps extends FloaterProps {
|
|
3
4
|
options: MultiLevelDropdownOption[];
|
|
4
5
|
width?: string;
|
|
5
6
|
isSearchable?: boolean;
|
|
7
|
+
isDropdownOpen?: boolean;
|
|
8
|
+
onDropdownOutsideClick?: (isOutsideClick: any) => void;
|
|
6
9
|
onDropdownItemClick: (option: MultiLevelDropdownOption, parents: MultiLevelDropdownOption[]) => void;
|
|
7
10
|
}
|
|
8
11
|
export type GroupedOption = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as o,jsx as t}from"react/jsx-runtime";import{COLORS as e}from"../../constants/Theme.js";import{BodyTiny as r}from"../TypographyStyle.js";import{MenuItem as p}from"./MenuItem.js";import{GroupedMenuListContainer as n}from"./MultiLevelDropdown.styled.js";const i=i=>{let{width:m,onDropdownItemClick:l,option:s,parents:c}=i;return o(n,{children:[t(r,Object.assign({style:{padding:"4px 8px 4px
|
|
1
|
+
import{jsxs as o,jsx as t}from"react/jsx-runtime";import{COLORS as e}from"../../constants/Theme.js";import{BodyTiny as r}from"../TypographyStyle.js";import{MenuItem as p}from"./MenuItem.js";import{GroupedMenuListContainer as n}from"./MultiLevelDropdown.styled.js";const i=i=>{let{width:m,onDropdownItemClick:l,option:s,parents:c}=i;return o(n,{children:[t(r,Object.assign({style:{padding:"4px 8px 4px 16px"},color:e.content.placeholder},{children:s.label})),s.options.map(((o,e)=>t(p,{width:m,onDropdownItemClick:l,option:o,parents:c},e)))]})};export{i as GroupedMenuList};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,jsx as t,Fragment as n}from"react/jsx-runtime";import o from"../../assets/icons/chevronRight2.svg.js";import i,{useRef as l}from"react";import{COLORS as s}from"../../constants/Theme.js";import{BodyCaption as r,BodyTiny as c}from"../TypographyStyle.js";import{MenuList as d}from"./MenuList.js";import{MenuItemWrapper as a,MenuItemContainer as p,ContentContainer as u,SubMenuWrapper as h,
|
|
1
|
+
import{jsxs as e,jsx as t,Fragment as n}from"react/jsx-runtime";import o from"../../assets/icons/chevronRight2.svg.js";import i,{useRef as l}from"react";import{COLORS as s}from"../../constants/Theme.js";import{BodyCaption as r,BodyTiny as c}from"../TypographyStyle.js";import{MenuList as d}from"./MenuList.js";import{MenuItemWrapper as a,MenuItemContainer as p,ContentContainer as u,SubMenuWrapper as h,SubMenuListContainer as m}from"./MultiLevelDropdown.styled.js";const v=v=>{let{width:g,onDropdownItemClick:b,option:f,parents:j}=v;var y,w,x,C,I,M,O;const[S,T]=i.useState(!1),[k,D]=i.useState(!1),[L,E]=i.useState({top:0,left:0}),R=l({top:0,left:0});return e(a,Object.assign({onMouseEnter:e=>{T(!0),(e=>{const t=e.currentTarget.getBoundingClientRect();E({top:t.top,left:t.right}),R.current={top:t.top,left:t.right}})(e)},onMouseLeave:()=>{T(!1)},onClick:()=>{var e;null!==(e=f.disabled)&&void 0!==e&&e||f.children||b(f,j)},id:"menuItemWrapper",style:{cursor:null!==(y=f.disabled)&&void 0!==y&&y?"not-allowed":"pointer",backgroundColor:null!==(w=f.disabled)&&void 0!==w&&w?s.surface.standard:"transparent"}},{children:[f.customComponent?f.customComponent:e(p,Object.assign({isSelected:f.selected,isSubMenuOpen:S,isHovered:k,isDisabled:null!==(x=f.disabled)&&void 0!==x&&x},{children:[e(u,{children:[f.leadingIcon&&f.leadingIcon,e("div",{children:[t(r,Object.assign({style:{color:null!==(C=f.disabled)&&void 0!==C&&C?s.content.inactive:f.selected||k?s.content.positive:s.content.primary}},{children:f.label})),f.subText&&t(c,Object.assign({style:{color:null!==(I=f.disabled)&&void 0!==I&&I?s.content.inactive:f.selected||k?s.content.positive:s.content.secondary,marginTop:"2px"}},{children:f.subText}))]})]}),f.children&&f.children.length>0?t(o,{width:16,height:16,color:null!==(M=f.disabled)&&void 0!==M&&M?s.content.inactive:f.selected||k?s.content.positive:s.content.primary}):f.trailingIcon?f.trailingIcon:t(n,{})]})),!(null!==(O=f.disabled)&&void 0!==O&&O)&&f.children&&f.children.length>0&&S&&t("div",Object.assign({style:{width:g},className:"submenu",onMouseEnter:()=>D(!0),onMouseLeave:()=>D(!1)},{children:t(h,Object.assign({style:{width:g,top:`${L.top}px`,left:`${L.left}px`}},{children:t(m,{children:t(d,{width:g,onDropdownItemClick:b,options:f.children,parents:[...j,f]})})}))}))]}))};export{v as MenuItem};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{jsx as e,jsxs as n}from"react/jsx-runtime";import t,{useState as o,useEffect as r}from"react";import{ZeroState as s}from"../zeroState/ZeroState.js";import{COLORS as i}from"../../constants/Theme.js";import{SearchBox as l}from"../dropdown/OpenedDropdown/components/searchbox/SearchBox.js";import{Floater as c}from"../floater/floater.js";import{MenuList as d}from"./MenuList.js";import{DropdownContainer as p,OptionsContainer as a,NoResultsContainer as f}from"./MultiLevelDropdown.styled.js";const u=u=>{let{options:h,width:m,isSearchable:g,onDropdownItemClick:w,refElement:j,topOffset:O,leftOffset:b,isDropdownOpen:x,onDropdownOutsideClick:v}=u;const y=t.useRef(null),[C,D]=o(h),L=e=>{y.current&&!y.current.contains(e.target)?v&&v(!0):v&&v(!1)};return r((()=>(document.addEventListener("mousedown",L),()=>{document.removeEventListener("mousedown",L)})),[]),e(c,Object.assign({refElement:j,topOffset:O,leftOffset:b},{children:x&&e("div",Object.assign({ref:y,style:{backgroundColor:i.surface.standard,zIndex:99999}},{children:n(p,Object.assign({width:m},{children:[g&&e("div",Object.assign({style:{padding:"4px",width:null!=m?m:"200px"}},{children:e(l,{onSearch:e=>{const n=[...h],t=[];for(;n.length>0;){const o=n.shift();o&&o.label.toLowerCase().includes(e.toLowerCase())&&t.push(o),o&&"children"in o&&o.children?n.push(...o.children):o&&"options"in o&&o.options&&n.push(...o.options)}const o=e=>e.map((e=>{if(t.includes(e))return e;if("children"in e&&e.children){const n=o(e.children);if(n.length>0)return Object.assign(Object.assign({},e),{children:n})}if("options"in e&&e.options){const n=o(e.options);if(n.length>0)return Object.assign(Object.assign({},e),{options:n})}return null})).filter((e=>null!==e));D(o(h))},version:"2.0"})})),e(a,Object.assign({width:m},{children:(null!=C?C:[]).length>0&&e(d,{width:null!=m?m:"200px",onDropdownItemClick:w,options:C,parents:[]})})),0===(null!=C?C:[]).length&&e(f,{children:e(s,{title:"No results found!",subTitle:"Sorry, we are unable to find any results for your search."})})]}))}))}))};export{u as MultiLevelDropdown};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
export declare const DropdownContainer: import("styled-components").StyledComponent<"div", any, {
|
|
2
2
|
width?: string | undefined;
|
|
3
3
|
}, never>;
|
|
4
|
+
export declare const OptionsContainer: import("styled-components").StyledComponent<"div", any, {
|
|
5
|
+
width?: string | undefined;
|
|
6
|
+
}, never>;
|
|
4
7
|
export declare const NoResultsContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
5
8
|
export declare const GroupedMenuListContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
6
9
|
export declare const StyledMenuList: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -14,4 +17,4 @@ export interface MenuItemContainerProps {
|
|
|
14
17
|
export declare const MenuItemContainer: import("styled-components").StyledComponent<"div", any, MenuItemContainerProps, never>;
|
|
15
18
|
export declare const ContentContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
16
19
|
export declare const SubMenuWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
17
|
-
export declare const
|
|
20
|
+
export declare const SubMenuListContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -1,32 +1,33 @@
|
|
|
1
1
|
import e from"styled-components";import{COLORS as i}from"../../constants/Theme.js";const t=e.div`
|
|
2
2
|
position: relative;
|
|
3
|
+
border-radius: 8px;
|
|
4
|
+
box-shadow: 0px 2px 8px 0px rgba(0, 0, 0, 0.12);
|
|
5
|
+
padding-bottom: 4px;
|
|
6
|
+
`,r=e.div`
|
|
3
7
|
width: ${e=>{let{width:i}=e;return i||"200px"}};
|
|
4
8
|
max-width: 300px;
|
|
5
9
|
max-height: 280px;
|
|
6
10
|
overflow-y: scroll;
|
|
7
|
-
border-radius: 8px;
|
|
8
|
-
box-shadow: 0px 2px 8px 0px rgba(0, 0, 0, 0.12);
|
|
9
11
|
&::-webkit-scrollbar {
|
|
10
12
|
width: 0px;
|
|
11
13
|
}
|
|
12
|
-
`,
|
|
14
|
+
`,o=e.div`
|
|
13
15
|
margin-top: 64px;
|
|
14
16
|
height: 200px;
|
|
15
|
-
`,
|
|
17
|
+
`,n=e.div`
|
|
16
18
|
width: 100%;
|
|
17
19
|
justify-content: center;
|
|
18
20
|
cursor: pointer;
|
|
19
21
|
align-items: center;
|
|
20
22
|
justify-content: space-between;
|
|
21
23
|
margin: 4px 0;
|
|
22
|
-
`,
|
|
24
|
+
`,d=e.div`
|
|
23
25
|
z-index: 1000;
|
|
24
26
|
position: relative;
|
|
25
27
|
margin: 0px;
|
|
26
28
|
padding: 0px;
|
|
27
|
-
padding-bottom: 4px;
|
|
28
29
|
width: 100%;
|
|
29
|
-
`,
|
|
30
|
+
`,p=e.div`
|
|
30
31
|
position: relative;
|
|
31
32
|
padding: 1px 4px;
|
|
32
33
|
cursor: pointer;
|
|
@@ -51,24 +52,25 @@ import e from"styled-components";import{COLORS as i}from"../../constants/Theme.j
|
|
|
51
52
|
&:hover {
|
|
52
53
|
background-color: ${e=>{let{isSelected:t,isDisabled:r}=e;return r?i.surface.standard:t?i.background.positive.light:i.surface.hovered}};
|
|
53
54
|
}
|
|
54
|
-
`,
|
|
55
|
+
`,a=e.div`
|
|
55
56
|
display: flex;
|
|
56
57
|
align-items: center;
|
|
57
58
|
gap: 8px;
|
|
58
|
-
`,
|
|
59
|
+
`,c=e.div`
|
|
59
60
|
z-index: 1001;
|
|
60
61
|
position: fixed;
|
|
61
62
|
border-left: 4px solid transparent;
|
|
62
|
-
`,
|
|
63
|
+
`,x=e.div`
|
|
63
64
|
margin: 4px;
|
|
64
65
|
background-color: ${i.surface.standard};
|
|
65
66
|
box-shadow: 0px 2px 8px 0px rgba(0, 0, 0, 0.12);
|
|
66
67
|
border-radius: 8px;
|
|
67
68
|
padding-top: 4px;
|
|
68
69
|
max-height: 480px;
|
|
70
|
+
padding-bottom: 4px;
|
|
69
71
|
overflow-y: scroll;
|
|
70
72
|
|
|
71
73
|
&::-webkit-scrollbar {
|
|
72
74
|
display: none;
|
|
73
75
|
}
|
|
74
|
-
`;export{
|
|
76
|
+
`;export{a as ContentContainer,t as DropdownContainer,n as GroupedMenuListContainer,s as MenuItemContainer,p as MenuItemWrapper,o as NoResultsContainer,r as OptionsContainer,d as StyledMenuList,x as SubMenuListContainer,c as SubMenuWrapper};
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
2
|
+
import { FloaterProps } from '../floater/floater';
|
|
3
|
+
export interface MultiLevelDropdownProps extends FloaterProps {
|
|
3
4
|
options: MultiLevelDropdownOption[];
|
|
4
5
|
width?: string;
|
|
5
6
|
isSearchable?: boolean;
|
|
7
|
+
isDropdownOpen?: boolean;
|
|
8
|
+
onDropdownOutsideClick?: (isOutsideClick: any) => void;
|
|
6
9
|
onDropdownItemClick: (option: MultiLevelDropdownOption, parents: MultiLevelDropdownOption[]) => void;
|
|
7
10
|
}
|
|
8
11
|
export type GroupedOption = {
|