@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.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),n=require("react"),t=require("./MenuItem.js"),r=require("./MenuList.styled.js");exports.MenuList=s=>{let{options:i,isMultiSelect:o,showDescription:c,onSelect:l,version:u,onInfiniteScroll:a,onDropdownItemClick:p}=s;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,s)=>{const a=s===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(r.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,r)=>e.jsx(t.MenuItem,{version:u,last:r===i.options.length-1,onSelect:l,showDescription:c,onDropdownItemClick:p,isMultiSelect:o,option:n},`${s}-${r}`)))]}),s)}return e.jsxs("div",{children:[e.jsx(t.MenuItem,{version:u,last:a,onSelect:l,showDescription:c,onDropdownItemClick:p,isMultiSelect:o,option:n},s),a?e.jsx("span",{ref:j}):null]},s)}))})};
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)}))})};
@@ -30,6 +30,7 @@
30
30
  border-bottom: 1px solid ${t.COLORS.stroke.primary};
31
31
  svg:hover {
32
32
  cursor: pointer;
33
+ background: ${t.COLORS.background.base};
33
34
  }
34
35
  ${t=>{let{headerStyle:o}=t;return e.css`
35
36
  ${Object.keys(o).map((e=>`${e}: ${o[e]};`)).join("\n")}
@@ -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:m,onSelect:a,version:d,onInfiniteScroll:g,onDropdownItemClick:h}=l;const I=r(null),v=r(null),f=o((()=>{I.current&&I.current.disconnect(),I.current=new IntersectionObserver((n=>{n[0].isIntersecting&&(null==g||g())})),v.current&&I.current.observe(v.current)}),[g]);return i((()=>(f(),()=>{I.current&&I.current.disconnect()})),[f,p]),n(e,{children:p.map(((r,o)=>{const i=o===p.length-1;if(r.options){const i=r;return t("div",Object.assign({style:{marginTop:"2.0"===d?2:0}},{children:[t(c,Object.assign({version:d},{children:[i.leadingIcon?n("span",Object.assign({style:{marginRight:8}},{children:i.leadingIcon})):n(e,{}),i.label]})),i.options.map(((e,t)=>n(s,{version:d,last:t===i.options.length-1,onSelect:a,showDescription:m,onDropdownItemClick:h,isMultiSelect:u,option:e},`${o}-${t}`)))]}),o)}return t("div",{children:[n(s,{version:d,last:i,onSelect:a,showDescription:m,onDropdownItemClick:h,isMultiSelect:u,option:r},o),i?n("span",{ref:v}):null]},o)}))})};export{l as MenuList};
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 i}from"../../constants/Theme.js";import{ComponentZindex as o}from"../../constants/zindex.js";const r=e.div`
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||o.SIDE_MODAL};
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: ${i.surface.standard};
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: ${i.surface.standard};
28
+ background: ${o.surface.standard};
29
29
  padding: 0px 24px;
30
- border-bottom: 1px solid ${i.stroke.primary};
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:i}=e;return t`
35
- ${Object.keys(i).map((e=>`${e}: ${i[e]};`)).join("\n")}
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:i}=e;return t`
42
- ${Object.keys(i).map((e=>`${e}: ${i[e]};`)).join("\n")}
42
+ ${e=>{let{bodyStyle:o}=e;return t`
43
+ ${Object.keys(o).map((e=>`${e}: ${o[e]};`)).join("\n")}
43
44
  `}}
44
- `,p=e.div`
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: ${i.surface.standard};
54
- border-top: 1px solid ${i.stroke.primary};
54
+ background: ${o.surface.standard};
55
+ border-top: 1px solid ${o.stroke.primary};
55
56
  padding: 0px 24px;
56
- ${e=>{let{footerStyle:i}=e;return t`
57
- ${Object.keys(i).map((e=>`${e}: ${i[e]};`)).join("\n")}
57
+ ${e=>{let{footerStyle:o}=e;return t`
58
+ ${Object.keys(o).map((e=>`${e}: ${o[e]};`)).join("\n")}
58
59
  `}}
59
- `,a=e.div`
60
+ `,p=e.div`
60
61
  display: flex;
61
62
  flex-direction: ${e=>e.footerDirection||"row"};
62
63
  gap: 8px;
63
- `;export{a as FooterButtonWrapper,s as SideModalBody,n as SideModalContainer,p as SideModalFooter,d as SideModalHeader,r as SideModalStyle};
64
+ `;export{p as FooterButtonWrapper,s as SideModalBody,n as SideModalContainer,a as SideModalFooter,d as SideModalHeader,r as SideModalStyle};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bikdotai/bik-component-library",
3
- "version": "0.0.548-beta.dropdown.2",
3
+ "version": "0.0.548-beta.dropdown.4",
4
4
  "description": "Bik Component Library",
5
5
  "repository": {
6
6
  "type": "git",