@bikdotai/bik-component-library 0.0.581-aidd-beta.15 → 0.0.581-aidd-beta.17

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("../../../_virtual/_tslib.js"),o=require("react/jsx-runtime"),r=require("react"),t=require("react-popper"),n=require("../../dropShadow/DropShadow.js"),l=require("../../tooltips/Tooltip.js"),i=require("../Common.styled.js"),s=require("../OpenedDropdown/components/OpennedDropdown.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}const p=d(r).default.forwardRef(((d,p)=>{var{children:a,onDropdownVisbilityChange:c,version:u="1.0",tooltipContent:v,tooltipDirection:j,showTooltipArrow:w}=d,b=e.__rest(d,["children","onDropdownVisbilityChange","version","tooltipContent","tooltipDirection","showTooltipArrow"]);const f=p,[h,D]=r.useState(!1),[O,g]=r.useState(null),[x,y]=r.useState(null),m=r.useRef(null),{styles:S,attributes:C}=t.usePopper(O,x,{placement:b.placement,strategy:b.strategy}),q=e=>{var o,r;"2.0"===u&&b.isMultiSelect&&e&&(null===(o=b.onSelect)||void 0===o||o.call(b,[...e])),D(!1),null===(r=null==b?void 0:b.onClose)||void 0===r||r.call(b)};r.useImperativeHandle(f,(()=>({openDropdown:h})),[]),r.useEffect((()=>{(null==f?void 0:f.current)&&(f.current.openDropdown=h)}),[h]),r.useEffect((()=>{null==c||c(h)}),[h]);const _=()=>o.jsxs(o.Fragment,{children:[o.jsxs("div",Object.assign({style:{position:"relative"},ref:g},{children:[o.jsx(i.OverLapAbs,{ref:m,disabled:b.disabled,onClick:e=>{var o;null===(o=b.onDropdownOpen)||void 0===o||o.call(b),h?(D(!1),e.preventDefault()):b.disabled||D(!0)}}),a]})),h&&o.jsx(i.OpenDropdownContainer,Object.assign({ref:y,style:Object.assign(Object.assign({},S.popper),{zIndex:3})},C.popper,{children:o.jsx(n.default,Object.assign({level:"z2",position:"down",style:{borderRadius:8}},{children:o.jsx(s.OpenedDropdown,Object.assign({},b,{onSelect:e=>{var o;"2.0"===u&&b.isMultiSelect||(null===(o=b.onSelect)||void 0===o||o.call(b,e),D(!1))},onClose:q,version:u,headerRef:m}))}))}))]});return o.jsx(o.Fragment,{children:h||void 0===v?_():o.jsx(l.Tooltip,Object.assign({body:v,placement:j,hideArrow:!w},{children:o.jsx("div",{children:_()})}))})}));p.displayName="DropdownPopover",exports.DropdownPopover=p;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),t=require("react/jsx-runtime"),o=require("react"),n=require("react-popper"),r=require("../../dropShadow/DropShadow.js"),i=require("../../tooltips/Tooltip.js"),l=require("../Common.styled.js"),s=require("../OpenedDropdown/components/OpennedDropdown.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}const p=d(o).default.forwardRef(((d,p)=>{var{children:a,onDropdownVisbilityChange:c,version:u="1.0",tooltipContent:v,tooltipDirection:j,showTooltipArrow:h}=d,f=e.__rest(d,["children","onDropdownVisbilityChange","version","tooltipContent","tooltipDirection","showTooltipArrow"]);const w=p,[b,g]=o.useState(!1),[D,O]=o.useState(null),[y,x]=o.useState(null),m=o.useRef(null),{styles:S,attributes:C}=n.usePopper(D,y,{placement:f.placement,strategy:f.strategy}),q=e=>{var t,o;"2.0"===u&&f.isMultiSelect&&e&&(null===(t=f.onSelect)||void 0===t||t.call(f,[...e])),g(!1),null===(o=null==f?void 0:f.onClose)||void 0===o||o.call(f)};o.useImperativeHandle(w,(()=>({openDropdown:b})),[]),o.useEffect((()=>{(null==w?void 0:w.current)&&(w.current.openDropdown=b)}),[b]),o.useEffect((()=>{null==c||c(b)}),[b]);const _=()=>t.jsxs(t.Fragment,{children:[t.jsx("div",Object.assign({style:{position:"relative",width:"fit-content",height:"fit-content"},ref:O},{children:t.jsx(l.OverLapAbs,Object.assign({ref:m,disabled:f.disabled,onClick:e=>{var t;null===(t=f.onDropdownOpen)||void 0===t||t.call(f),b?(g(!1),e.preventDefault()):f.disabled||g(!0)},style:{width:"fit-content",height:"fit-content"}},{children:a}))})),b&&t.jsx(l.OpenDropdownContainer,Object.assign({ref:x,style:Object.assign(Object.assign({},S.popper),{zIndex:3})},C.popper,{children:t.jsx(r.default,Object.assign({level:"z2",position:"down",style:{borderRadius:8}},{children:t.jsx(s.OpenedDropdown,Object.assign({},f,{onSelect:e=>{var t;"2.0"===u&&f.isMultiSelect||(null===(t=f.onSelect)||void 0===t||t.call(f,e),g(!1))},onClose:q,version:u,headerRef:m}))}))}))]});return t.jsx(t.Fragment,{children:b||void 0===v?_():t.jsx(i.Tooltip,Object.assign({body:v,placement:j,hideArrow:!h},{children:t.jsx("div",{children:_()})}))})}));p.displayName="DropdownPopover",exports.DropdownPopover=p;
@@ -1 +1 @@
1
- import{__rest as o}from"../../../_virtual/_tslib.js";import{jsx as e,Fragment as r,jsxs as n}from"react/jsx-runtime";import t,{useState as l,useRef as i,useImperativeHandle as s,useEffect as p}from"react";import{usePopper as d}from"react-popper";import c from"../../dropShadow/DropShadow.js";import{Tooltip as a}from"../../tooltips/Tooltip.js";import{OverLapAbs as m,OpenDropdownContainer as v}from"../Common.styled.js";import{OpenedDropdown as u}from"../OpenedDropdown/components/OpennedDropdown.js";const h=t.forwardRef(((t,h)=>{var{children:w,onDropdownVisbilityChange:b,version:f="1.0",tooltipContent:j,tooltipDirection:D,showTooltipArrow:g}=t,y=o(t,["children","onDropdownVisbilityChange","version","tooltipContent","tooltipDirection","showTooltipArrow"]);const O=h,[C,S]=l(!1),[x,A]=l(null),[R,T]=l(null),z=i(null),{styles:M,attributes:V}=d(x,R,{placement:y.placement,strategy:y.strategy}),_=o=>{var e,r;"2.0"===f&&y.isMultiSelect&&o&&(null===(e=y.onSelect)||void 0===e||e.call(y,[...o])),S(!1),null===(r=null==y?void 0:y.onClose)||void 0===r||r.call(y)};s(O,(()=>({openDropdown:C})),[]),p((()=>{(null==O?void 0:O.current)&&(O.current.openDropdown=C)}),[C]),p((()=>{null==b||b(C)}),[C]);const k=()=>n(r,{children:[n("div",Object.assign({style:{position:"relative"},ref:A},{children:[e(m,{ref:z,disabled:y.disabled,onClick:o=>{var e;null===(e=y.onDropdownOpen)||void 0===e||e.call(y),C?(S(!1),o.preventDefault()):y.disabled||S(!0)}}),w]})),C&&e(v,Object.assign({ref:T,style:Object.assign(Object.assign({},M.popper),{zIndex:3})},V.popper,{children:e(c,Object.assign({level:"z2",position:"down",style:{borderRadius:8}},{children:e(u,Object.assign({},y,{onSelect:o=>{var e;"2.0"===f&&y.isMultiSelect||(null===(e=y.onSelect)||void 0===e||e.call(y,o),S(!1))},onClose:_,version:f,headerRef:z}))}))}))]});return e(r,{children:C||void 0===j?k():e(a,Object.assign({body:j,placement:D,hideArrow:!g},{children:e("div",{children:k()})}))})}));h.displayName="DropdownPopover";export{h as DropdownPopover};
1
+ import{__rest as o}from"../../../_virtual/_tslib.js";import{jsx as e,Fragment as t,jsxs as n}from"react/jsx-runtime";import i,{useState as r,useRef as l,useImperativeHandle as s,useEffect as d}from"react";import{usePopper as p}from"react-popper";import c from"../../dropShadow/DropShadow.js";import{Tooltip as a}from"../../tooltips/Tooltip.js";import{OverLapAbs as h,OpenDropdownContainer as m}from"../Common.styled.js";import{OpenedDropdown as v}from"../OpenedDropdown/components/OpennedDropdown.js";const u=i.forwardRef(((i,u)=>{var{children:f,onDropdownVisbilityChange:w,version:b="1.0",tooltipContent:g,tooltipDirection:j,showTooltipArrow:y}=i,D=o(i,["children","onDropdownVisbilityChange","version","tooltipContent","tooltipDirection","showTooltipArrow"]);const O=u,[C,S]=r(!1),[x,A]=r(null),[R,T]=r(null),z=l(null),{styles:M,attributes:V}=p(x,R,{placement:D.placement,strategy:D.strategy}),_=o=>{var e,t;"2.0"===b&&D.isMultiSelect&&o&&(null===(e=D.onSelect)||void 0===e||e.call(D,[...o])),S(!1),null===(t=null==D?void 0:D.onClose)||void 0===t||t.call(D)};s(O,(()=>({openDropdown:C})),[]),d((()=>{(null==O?void 0:O.current)&&(O.current.openDropdown=C)}),[C]),d((()=>{null==w||w(C)}),[C]);const k=()=>n(t,{children:[e("div",Object.assign({style:{position:"relative",width:"fit-content",height:"fit-content"},ref:A},{children:e(h,Object.assign({ref:z,disabled:D.disabled,onClick:o=>{var e;null===(e=D.onDropdownOpen)||void 0===e||e.call(D),C?(S(!1),o.preventDefault()):D.disabled||S(!0)},style:{width:"fit-content",height:"fit-content"}},{children:f}))})),C&&e(m,Object.assign({ref:T,style:Object.assign(Object.assign({},M.popper),{zIndex:3})},V.popper,{children:e(c,Object.assign({level:"z2",position:"down",style:{borderRadius:8}},{children:e(v,Object.assign({},D,{onSelect:o=>{var e;"2.0"===b&&D.isMultiSelect||(null===(e=D.onSelect)||void 0===e||e.call(D,o),S(!1))},onClose:_,version:b,headerRef:z}))}))}))]});return e(t,{children:C||void 0===g?k():e(a,Object.assign({body:g,placement:j,hideArrow:!y},{children:e("div",{children:k()})}))})}));u.displayName="DropdownPopover";export{u as DropdownPopover};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bikdotai/bik-component-library",
3
- "version": "0.0.581-aidd-beta.15",
3
+ "version": "0.0.581-aidd-beta.17",
4
4
  "description": "Bik Component Library",
5
5
  "repository": {
6
6
  "type": "git",