@bikdotai/bik-component-library 0.0.583-beta.1 → 0.0.583-beta.2

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