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