@bikdotai/bik-component-library 0.0.548-beta.dropdown.2 → 0.0.548-beta.dropdown.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/dropdown/OpenedDropdown/components/menu/MenuList.js +1 -1
- package/dist/cjs/components/side-modal/SideModal.style.js +1 -0
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuList.js +1 -1
- package/dist/esm/components/side-modal/SideModal.style.js +17 -16
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),n=require("react"),t=require("./MenuItem.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),n=require("react"),t=require("./MenuItem.js"),s=require("./MenuList.styled.js");exports.MenuList=r=>{let{options:i,isMultiSelect:o,showDescription:l,onSelect:c,version:u,onInfiniteScroll:a,onDropdownItemClick:p}=r;const d=n.useRef(null),j=n.useRef(null),g=n.useCallback((()=>{d.current&&d.current.disconnect(),d.current=new IntersectionObserver((e=>{e[0].isIntersecting&&(null==a||a())})),j.current&&d.current.observe(j.current)}),[a]);return n.useEffect((()=>(g(),()=>{d.current&&d.current.disconnect()})),[g,i]),e.jsx(e.Fragment,{children:i.map(((n,r)=>{const a=r===i.length-1;if(n.options){const i=n;return e.jsxs("div",Object.assign({style:{marginTop:"2.0"===u?2:0}},{children:[e.jsxs(s.StyledGroupedLabel,Object.assign({version:u},{children:[i.leadingIcon?e.jsx("span",Object.assign({style:{marginRight:8}},{children:i.leadingIcon})):e.jsx(e.Fragment,{}),i.label]})),i.options.map(((n,s)=>e.jsx(t.MenuItem,{version:u,last:s===i.options.length-1,onSelect:c,showDescription:l,onDropdownItemClick:p,isMultiSelect:o,option:n},`${r}-${s}`))),a?e.jsx("span",{ref:j}):null]}),r)}return e.jsxs("div",{children:[e.jsx(t.MenuItem,{version:u,last:a,onSelect:c,showDescription:l,onDropdownItemClick:p,isMultiSelect:o,option:n},r),a?e.jsx("span",{ref:j}):null]},r)}))})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as n,Fragment as e,jsxs as t}from"react/jsx-runtime";import{useRef as r,useCallback as o,useEffect as i}from"react";import{MenuItem as s}from"./MenuItem.js";import{StyledGroupedLabel as c}from"./MenuList.styled.js";const l=l=>{let{options:p,isMultiSelect:u,showDescription:
|
|
1
|
+
import{jsx as n,Fragment as e,jsxs as t}from"react/jsx-runtime";import{useRef as r,useCallback as o,useEffect as i}from"react";import{MenuItem as s}from"./MenuItem.js";import{StyledGroupedLabel as c}from"./MenuList.styled.js";const l=l=>{let{options:p,isMultiSelect:u,showDescription:a,onSelect:m,version:d,onInfiniteScroll:g,onDropdownItemClick:h}=l;const I=r(null),f=r(null),v=o((()=>{I.current&&I.current.disconnect(),I.current=new IntersectionObserver((n=>{n[0].isIntersecting&&(null==g||g())})),f.current&&I.current.observe(f.current)}),[g]);return i((()=>(v(),()=>{I.current&&I.current.disconnect()})),[v,p]),n(e,{children:p.map(((r,o)=>{const i=o===p.length-1;if(r.options){const l=r;return t("div",Object.assign({style:{marginTop:"2.0"===d?2:0}},{children:[t(c,Object.assign({version:d},{children:[l.leadingIcon?n("span",Object.assign({style:{marginRight:8}},{children:l.leadingIcon})):n(e,{}),l.label]})),l.options.map(((e,t)=>n(s,{version:d,last:t===l.options.length-1,onSelect:m,showDescription:a,onDropdownItemClick:h,isMultiSelect:u,option:e},`${o}-${t}`))),i?n("span",{ref:f}):null]}),o)}return t("div",{children:[n(s,{version:d,last:i,onSelect:m,showDescription:a,onDropdownItemClick:h,isMultiSelect:u,option:r},o),i?n("span",{ref:f}):null]},o)}))})};export{l as MenuList};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import e,{css as t}from"styled-components";import{COLORS as
|
|
1
|
+
import e,{css as t}from"styled-components";import{COLORS as o}from"../../constants/Theme.js";import{ComponentZindex as i}from"../../constants/zindex.js";const r=e.div`
|
|
2
2
|
position: fixed;
|
|
3
3
|
top: 0;
|
|
4
4
|
left: 0;
|
|
5
|
-
z-index: ${e=>e.zIndex||
|
|
5
|
+
z-index: ${e=>e.zIndex||i.SIDE_MODAL};
|
|
6
6
|
height: 100%;
|
|
7
7
|
width: 100%;
|
|
8
8
|
background-color: rgba(0, 0, 0, 0.4);
|
|
@@ -12,7 +12,7 @@ import e,{css as t}from"styled-components";import{COLORS as i}from"../../constan
|
|
|
12
12
|
`,n=e.div`
|
|
13
13
|
height: 100%;
|
|
14
14
|
width: ${e=>e.width||"566px"};
|
|
15
|
-
background: ${
|
|
15
|
+
background: ${o.surface.standard};
|
|
16
16
|
position: relative;
|
|
17
17
|
display: flex;
|
|
18
18
|
flex-direction: column;
|
|
@@ -25,23 +25,24 @@ import e,{css as t}from"styled-components";import{COLORS as i}from"../../constan
|
|
|
25
25
|
flex-direction: row;
|
|
26
26
|
align-items: center;
|
|
27
27
|
justify-content: space-between;
|
|
28
|
-
background: ${
|
|
28
|
+
background: ${o.surface.standard};
|
|
29
29
|
padding: 0px 24px;
|
|
30
|
-
border-bottom: 1px solid ${
|
|
30
|
+
border-bottom: 1px solid ${o.stroke.primary};
|
|
31
31
|
svg:hover {
|
|
32
32
|
cursor: pointer;
|
|
33
|
+
background: ${o.background.base};
|
|
33
34
|
}
|
|
34
|
-
${e=>{let{headerStyle:
|
|
35
|
-
${Object.keys(
|
|
35
|
+
${e=>{let{headerStyle:o}=e;return t`
|
|
36
|
+
${Object.keys(o).map((e=>`${e}: ${o[e]};`)).join("\n")}
|
|
36
37
|
`}}
|
|
37
38
|
`,s=e.div`
|
|
38
39
|
overflow-y: auto;
|
|
39
40
|
padding: 24px;
|
|
40
41
|
height: ${e=>e.hideFooter?"calc(100% - 60px)":"calc(100% - 120px)"};
|
|
41
|
-
${e=>{let{bodyStyle:
|
|
42
|
-
${Object.keys(
|
|
42
|
+
${e=>{let{bodyStyle:o}=e;return t`
|
|
43
|
+
${Object.keys(o).map((e=>`${e}: ${o[e]};`)).join("\n")}
|
|
43
44
|
`}}
|
|
44
|
-
`,
|
|
45
|
+
`,a=e.div`
|
|
45
46
|
height: 60px;
|
|
46
47
|
width: 100%;
|
|
47
48
|
position: sticky;
|
|
@@ -50,14 +51,14 @@ import e,{css as t}from"styled-components";import{COLORS as i}from"../../constan
|
|
|
50
51
|
flex-direction: ${e=>e.footerDirection||"row"};
|
|
51
52
|
justify-content: space-between;
|
|
52
53
|
align-items: center;
|
|
53
|
-
background: ${
|
|
54
|
-
border-top: 1px solid ${
|
|
54
|
+
background: ${o.surface.standard};
|
|
55
|
+
border-top: 1px solid ${o.stroke.primary};
|
|
55
56
|
padding: 0px 24px;
|
|
56
|
-
${e=>{let{footerStyle:
|
|
57
|
-
${Object.keys(
|
|
57
|
+
${e=>{let{footerStyle:o}=e;return t`
|
|
58
|
+
${Object.keys(o).map((e=>`${e}: ${o[e]};`)).join("\n")}
|
|
58
59
|
`}}
|
|
59
|
-
`,
|
|
60
|
+
`,p=e.div`
|
|
60
61
|
display: flex;
|
|
61
62
|
flex-direction: ${e=>e.footerDirection||"row"};
|
|
62
63
|
gap: 8px;
|
|
63
|
-
`;export{
|
|
64
|
+
`;export{p as FooterButtonWrapper,s as SideModalBody,n as SideModalContainer,a as SideModalFooter,d as SideModalHeader,r as SideModalStyle};
|