@bikdotai/bik-component-library 0.0.27-beta.8 → 0.0.27-beta.9

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"),l=require("react"),a=require("../../DropdownWrapper.js");const i=i=>{let{onChange:r,extra:n,val:o,isLoading:s,errors:t,disabled:d}=i;const[u,c]=l.useState([]),v=o;return l.useEffect((()=>{const e=(null==n?void 0:n.options)&&Array.isArray(n.options)?n.options.filter((e=>!!Object.keys(e).length)).map((e=>({isChecked:!!(null==v?void 0:v.find((l=>l.name===e.name||l.id===e.id))),label:e.name,value:e.id}))):[],l=[];null==v||v.forEach((a=>{let{name:i,id:r}=a;-1===e.findIndex((e=>e.value===r&&e.label===i))&&l.push({selected:!0,label:i,value:null==r?void 0:r.toString()})})),c([...e,...l])}),[n,v]),e.jsx("div",{children:e.jsx(a.default,{disabled:d,allowFreeForm:!0,isSearchable:!0,isLoading:s,error:null==t?void 0:t.val,isMultiSelect:!0,options:u,onSelect:function(e){if(Array.isArray(e)){const l=[];e.forEach((e=>{var a,i;e.options?null===(a=e.options)||void 0===a||a.forEach((e=>{l.push({name:e.label,id:e.value})})):l.push({name:null!==(i=e.label)&&void 0!==i?i:"",id:e.value})})),null==r||r(l)}}})})};exports.default=l=>e.jsx(i,Object.assign({},l));
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),l=require("react"),r=require("../../DropdownWrapper.js");const a=a=>{let{onChange:i,extra:n,val:o,isLoading:s,errors:t,disabled:d}=a;const[u,c]=l.useState([]),p=o;return l.useEffect((()=>{const e=(null==n?void 0:n.options)&&Array.isArray(n.options)?n.options.filter((e=>!!Object.keys(e).length)).map((e=>({isChecked:!!(null==p?void 0:p.find((l=>l.name===e.name||l.id===e.id))),label:e.name,value:e.id}))):[],l=[...e];null==p||p.forEach((r=>{let{name:a,id:i}=r;const n=e.findIndex((e=>e.value===i&&e.label===a));-1!==n&&(l[n].selected=!0)})),c([...e,...l])}),[n,p]),e.jsx("div",{children:e.jsx(r.default,{disabled:d,allowFreeForm:!0,isSearchable:!0,isLoading:s,error:null==t?void 0:t.val,isMultiSelect:!0,options:u,onSelect:function(e){if(Array.isArray(e)){const l=[];e.forEach((e=>{var r,a;e.options?null===(r=e.options)||void 0===r||r.forEach((e=>{l.push({name:e.label,id:e.value})})):l.push({name:null!==(a=e.label)&&void 0!==a?a:"",id:e.value})})),null==i||i(l)}}})})};exports.default=l=>e.jsx(a,Object.assign({},l));
@@ -3,5 +3,6 @@ declare const DropShadow: React.FC<{
3
3
  level: 'z1' | 'z2';
4
4
  position: 'up' | 'down';
5
5
  children: React.ReactNode;
6
+ style?: React.CSSProperties;
6
7
  }>;
7
8
  export default DropShadow;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime");const p={z1:{up:"0px -2px 8px rgba(0, 0, 0, 0.12)",down:"0px 2px 8px rgba(0, 0, 0, 0.12)"},z2:{up:"0px -4px 12px rgba(0, 0, 0, 0.12)",down:"0px 4px 12px rgba(0, 0, 0, 0.12)"}};exports.default=r=>{let{level:x="z1",position:t="down",children:o}=r;const s=p[x][t];return e.jsx("div",Object.assign({style:{boxShadow:s}},{children:o}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime");const p={z1:{up:"0px -2px 8px rgba(0, 0, 0, 0.12)",down:"0px 2px 8px rgba(0, 0, 0, 0.12)"},z2:{up:"0px -4px 12px rgba(0, 0, 0, 0.12)",down:"0px 4px 12px rgba(0, 0, 0, 0.12)"}};exports.default=r=>{let{level:t="z1",position:x="down",children:s,style:n}=r;const o=p[t][x];return e.jsx("div",Object.assign({style:Object.assign({boxShadow:o},null!=n?n:{})},{children:s}))};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),r=require("react/jsx-runtime"),n=require("react"),o=require("react-popper"),t=require("../../dropShadow/DropShadow.js"),s=require("../Common.styled.js"),l=require("../OpenedDropdown/components/OpennedDropdown.js");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}const p=i(n).default.forwardRef(((i,p)=>{var{children:d}=i,a=e.__rest(i,["children"]);const u=p,[c,j]=n.useState(!1),[v,f]=n.useState(null),[b,w]=n.useState(null),{styles:O,attributes:x}=o.usePopper(v,b,{});return n.useImperativeHandle(u,(()=>({openDropdown:c})),[]),n.useEffect((()=>{(null==u?void 0:u.current)&&(u.current.openDropdown=c)}),[c]),r.jsxs(r.Fragment,{children:[r.jsxs("div",Object.assign({style:{position:"relative"},ref:f},{children:[r.jsx(s.OverLapAbs,{onClick:e=>{c?e.preventDefault():a.disabled||j(!0)}}),d]})),c&&r.jsx(s.OpenDropdownContainer,Object.assign({ref:w,style:Object.assign(Object.assign({},O.popper),{zIndex:3})},x.popper,{children:r.jsx(t.default,Object.assign({level:"z2",position:"down"},{children:r.jsx(l.OpenedDropdown,Object.assign({},a,{onSelect:e=>{var r;null===(r=a.onSelect)||void 0===r||r.call(a,e),j(!1)},onClose:function(){var e;j(!1),null===(e=null==a?void 0:a.onClose)||void 0===e||e.call(a)}}))}))}))]})}));p.displayName="DropdownPopover",exports.DropdownPopover=p;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),r=require("react/jsx-runtime"),n=require("react"),o=require("react-popper"),t=require("../../dropShadow/DropShadow.js"),s=require("../Common.styled.js"),l=require("../OpenedDropdown/components/OpennedDropdown.js");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}const d=i(n).default.forwardRef(((i,d)=>{var{children:p}=i,a=e.__rest(i,["children"]);const u=d,[c,j]=n.useState(!1),[v,f]=n.useState(null),[b,w]=n.useState(null),{styles:O,attributes:x}=o.usePopper(v,b,{});return n.useImperativeHandle(u,(()=>({openDropdown:c})),[]),n.useEffect((()=>{(null==u?void 0:u.current)&&(u.current.openDropdown=c)}),[c]),r.jsxs(r.Fragment,{children:[r.jsxs("div",Object.assign({style:{position:"relative"},ref:f},{children:[r.jsx(s.OverLapAbs,{onClick:e=>{c?e.preventDefault():a.disabled||j(!0)}}),p]})),c&&r.jsx(s.OpenDropdownContainer,Object.assign({ref:w,style:Object.assign(Object.assign({},O.popper),{zIndex:3})},x.popper,{children:r.jsx(t.default,Object.assign({level:"z2",position:"down",style:{borderRadius:4}},{children:r.jsx(l.OpenedDropdown,Object.assign({},a,{onSelect:e=>{var r;null===(r=a.onSelect)||void 0===r||r.call(a,e),j(!1)},onClose:function(){var e;j(!1),null===(e=null==a?void 0:a.onClose)||void 0===e||e.call(a)}}))}))}))]})}));d.displayName="DropdownPopover",exports.DropdownPopover=d;
@@ -21,4 +21,5 @@
21
21
  flex: 1;
22
22
  display: flex;
23
23
  flex-direction: column;
24
+ background-color: ${t.COLORS.surface.standard};
24
25
  `;exports.MenuListContainer=d,exports.OpennedDropdownContainer=i;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const WorkingStepper: () => JSX.Element;
3
2
  export declare enum STEPENUM {
4
3
  STEP1 = "STEP1",
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{useState as l,useEffect as o}from"react";import a from"../../DropdownWrapper.js";const i=i=>{let{onChange:n,extra:r,val:t,isLoading:s,errors:d,disabled:u}=i;const[c,p]=l([]),v=t;return o((()=>{const e=(null==r?void 0:r.options)&&Array.isArray(r.options)?r.options.filter((e=>!!Object.keys(e).length)).map((e=>({isChecked:!!(null==v?void 0:v.find((l=>l.name===e.name||l.id===e.id))),label:e.name,value:e.id}))):[],l=[];null==v||v.forEach((o=>{let{name:a,id:i}=o;-1===e.findIndex((e=>e.value===i&&e.label===a))&&l.push({selected:!0,label:a,value:null==i?void 0:i.toString()})})),p([...e,...l])}),[r,v]),e("div",{children:e(a,{disabled:u,allowFreeForm:!0,isSearchable:!0,isLoading:s,error:null==d?void 0:d.val,isMultiSelect:!0,options:c,onSelect:function(e){if(Array.isArray(e)){const l=[];e.forEach((e=>{var o,a;e.options?null===(o=e.options)||void 0===o||o.forEach((e=>{l.push({name:e.label,id:e.value})})):l.push({name:null!==(a=e.label)&&void 0!==a?a:"",id:e.value})})),null==n||n(l)}}})})};var n=l=>e(i,Object.assign({},l));export{n as default};
1
+ import{jsx as e}from"react/jsx-runtime";import{useState as l,useEffect as o}from"react";import a from"../../DropdownWrapper.js";const i=i=>{let{onChange:n,extra:r,val:t,isLoading:s,errors:d,disabled:c}=i;const[u,p]=l([]),m=t;return o((()=>{const e=(null==r?void 0:r.options)&&Array.isArray(r.options)?r.options.filter((e=>!!Object.keys(e).length)).map((e=>({isChecked:!!(null==m?void 0:m.find((l=>l.name===e.name||l.id===e.id))),label:e.name,value:e.id}))):[],l=[...e];null==m||m.forEach((o=>{let{name:a,id:i}=o;const n=e.findIndex((e=>e.value===i&&e.label===a));-1!==n&&(l[n].selected=!0)})),p([...e,...l])}),[r,m]),e("div",{children:e(a,{disabled:c,allowFreeForm:!0,isSearchable:!0,isLoading:s,error:null==d?void 0:d.val,isMultiSelect:!0,options:u,onSelect:function(e){if(Array.isArray(e)){const l=[];e.forEach((e=>{var o,a;e.options?null===(o=e.options)||void 0===o||o.forEach((e=>{l.push({name:e.label,id:e.value})})):l.push({name:null!==(a=e.label)&&void 0!==a?a:"",id:e.value})})),null==n||n(l)}}})})};var n=l=>e(i,Object.assign({},l));export{n as default};
@@ -3,5 +3,6 @@ declare const DropShadow: React.FC<{
3
3
  level: 'z1' | 'z2';
4
4
  position: 'up' | 'down';
5
5
  children: React.ReactNode;
6
+ style?: React.CSSProperties;
6
7
  }>;
7
8
  export default DropShadow;
@@ -1 +1 @@
1
- import{jsx as p}from"react/jsx-runtime";const x={z1:{up:"0px -2px 8px rgba(0, 0, 0, 0.12)",down:"0px 2px 8px rgba(0, 0, 0, 0.12)"},z2:{up:"0px -4px 12px rgba(0, 0, 0, 0.12)",down:"0px 4px 12px rgba(0, 0, 0, 0.12)"}},r=r=>{let{level:e="z1",position:o="down",children:t}=r;const n=x[e][o];return p("div",Object.assign({style:{boxShadow:n}},{children:t}))};export{r as default};
1
+ import{jsx as p}from"react/jsx-runtime";const x={z1:{up:"0px -2px 8px rgba(0, 0, 0, 0.12)",down:"0px 2px 8px rgba(0, 0, 0, 0.12)"},z2:{up:"0px -4px 12px rgba(0, 0, 0, 0.12)",down:"0px 4px 12px rgba(0, 0, 0, 0.12)"}},e=e=>{let{level:t="z1",position:n="down",children:r,style:o}=e;const s=x[t][n];return p("div",Object.assign({style:Object.assign({boxShadow:s},null!=o?o:{})},{children:r}))};export{e as default};
@@ -1 +1 @@
1
- import{__rest as o}from"../../../_virtual/_tslib.js";import{jsxs as e,Fragment as r,jsx as n}from"react/jsx-runtime";import t,{useState as l,useImperativeHandle as i,useEffect as p}from"react";import{usePopper as s}from"react-popper";import d from"../../dropShadow/DropShadow.js";import{OverLapAbs as c,OpenDropdownContainer as a}from"../Common.styled.js";import{OpenedDropdown as m}from"../OpenedDropdown/components/OpennedDropdown.js";const u=t.forwardRef(((t,u)=>{var{children:f}=t,v=o(t,["children"]);const j=u,[b,w]=l(!1),[h,O]=l(null),[D,g]=l(null),{styles:y,attributes:C}=s(h,D,{});return i(j,(()=>({openDropdown:b})),[]),p((()=>{(null==j?void 0:j.current)&&(j.current.openDropdown=b)}),[b]),e(r,{children:[e("div",Object.assign({style:{position:"relative"},ref:O},{children:[n(c,{onClick:o=>{b?o.preventDefault():v.disabled||w(!0)}}),f]})),b&&n(a,Object.assign({ref:g,style:Object.assign(Object.assign({},y.popper),{zIndex:3})},C.popper,{children:n(d,Object.assign({level:"z2",position:"down"},{children:n(m,Object.assign({},v,{onSelect:o=>{var e;null===(e=v.onSelect)||void 0===e||e.call(v,o),w(!1)},onClose:function(){var o;w(!1),null===(o=null==v?void 0:v.onClose)||void 0===o||o.call(v)}}))}))}))]})}));u.displayName="DropdownPopover";export{u as DropdownPopover};
1
+ import{__rest as o}from"../../../_virtual/_tslib.js";import{jsxs as e,Fragment as r,jsx as n}from"react/jsx-runtime";import t,{useState as l,useImperativeHandle as i,useEffect as s}from"react";import{usePopper as p}from"react-popper";import d from"../../dropShadow/DropShadow.js";import{OverLapAbs as c,OpenDropdownContainer as a}from"../Common.styled.js";import{OpenedDropdown as m}from"../OpenedDropdown/components/OpennedDropdown.js";const u=t.forwardRef(((t,u)=>{var{children:f}=t,v=o(t,["children"]);const j=u,[b,w]=l(!1),[h,O]=l(null),[D,g]=l(null),{styles:y,attributes:C}=p(h,D,{});return i(j,(()=>({openDropdown:b})),[]),s((()=>{(null==j?void 0:j.current)&&(j.current.openDropdown=b)}),[b]),e(r,{children:[e("div",Object.assign({style:{position:"relative"},ref:O},{children:[n(c,{onClick:o=>{b?o.preventDefault():v.disabled||w(!0)}}),f]})),b&&n(a,Object.assign({ref:g,style:Object.assign(Object.assign({},y.popper),{zIndex:3})},C.popper,{children:n(d,Object.assign({level:"z2",position:"down",style:{borderRadius:4}},{children:n(m,Object.assign({},v,{onSelect:o=>{var e;null===(e=v.onSelect)||void 0===e||e.call(v,o),w(!1)},onClose:function(){var o;w(!1),null===(o=null==v?void 0:v.onClose)||void 0===o||o.call(v)}}))}))}))]})}));u.displayName="DropdownPopover";export{u as DropdownPopover};
@@ -1,4 +1,4 @@
1
- import o from"styled-components";import{COLORS as e}from"../../../../constants/Theme.js";const t=o.div`
1
+ import o from"styled-components";import{COLORS as e}from"../../../../constants/Theme.js";const r=o.div`
2
2
  border-radius: 4px;
3
3
  border: 1px solid ${e.stroke.primary};
4
4
  max-height: 640px;
@@ -15,10 +15,11 @@ import o from"styled-components";import{COLORS as e}from"../../../../constants/T
15
15
  border-bottom-color: ${e.stroke.primary};
16
16
  width: 100%;
17
17
  height: 100%;
18
- `;const i=o.div`
18
+ `;const t=o.div`
19
19
  max-height: ${o=>"number"==typeof o.maxHeight?`${o.maxHeight}px`:o.maxHeight};
20
20
  overflow-y: auto;
21
21
  flex: 1;
22
22
  display: flex;
23
23
  flex-direction: column;
24
- `;export{i as MenuListContainer,t as OpennedDropdownContainer};
24
+ background-color: ${e.surface.standard};
25
+ `;export{t as MenuListContainer,r as OpennedDropdownContainer};
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const WorkingStepper: () => JSX.Element;
3
2
  export declare enum STEPENUM {
4
3
  STEP1 = "STEP1",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bikdotai/bik-component-library",
3
- "version": "0.0.27-beta.8",
3
+ "version": "0.0.27-beta.9",
4
4
  "description": "Bik Component Library",
5
5
  "repository": {
6
6
  "type": "git",