@bikdotai/bik-component-library 0.0.549-0 → 0.0.549-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.
@@ -6,6 +6,7 @@ export declare const DropdownPopover: React.ForwardRefExoticComponent<OpenDropdo
6
6
  disabled?: boolean | undefined;
7
7
  onDropdownOpen?: (() => void) | undefined;
8
8
  onDropdownVisbilityChange?: ((isOpen: boolean) => void) | undefined;
9
+ tooltipContent?: string | undefined;
9
10
  } & React.RefAttributes<{
10
11
  openDropdown: boolean;
11
12
  }>>;
@@ -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"),l=require("../Common.styled.js"),s=require("../OpenedDropdown/components/OpennedDropdown.js");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}const a=i(n).default.forwardRef(((i,a)=>{var{children:d,onDropdownVisbilityChange:p,version:u="1.0"}=i,c=e.__rest(i,["children","onDropdownVisbilityChange","version"]);const v=a,[f,j]=n.useState(!1),[b,w]=n.useState(null),[D,O]=n.useState(null),y=n.useRef(null),{styles:g,attributes:h}=o.usePopper(b,D,{placement:c.placement,strategy:c.strategy});return n.useImperativeHandle(v,(()=>({openDropdown:f})),[]),n.useEffect((()=>{(null==v?void 0:v.current)&&(v.current.openDropdown=f)}),[f]),n.useEffect((()=>{null==p||p(f)}),[f]),r.jsxs(r.Fragment,{children:[r.jsxs("div",Object.assign({style:{position:"relative"},ref:w},{children:[r.jsx(l.OverLapAbs,{ref:y,disabled:c.disabled,onClick:e=>{var r;null===(r=c.onDropdownOpen)||void 0===r||r.call(c),f?(j(!1),e.preventDefault()):c.disabled||j(!0)}}),d]})),f&&r.jsx(l.OpenDropdownContainer,Object.assign({ref:O,style:Object.assign(Object.assign({},g.popper),{zIndex:3})},h.popper,{children:r.jsx(t.default,Object.assign({level:"z2",position:"down",style:{borderRadius:8}},{children:r.jsx(s.OpenedDropdown,Object.assign({},c,{onSelect:e=>{var r;"2.0"===u&&c.isMultiSelect||(null===(r=c.onSelect)||void 0===r||r.call(c,e),j(!1))},onClose:e=>{var r,n;"2.0"===u&&c.isMultiSelect&&e&&(null===(r=c.onSelect)||void 0===r||r.call(c,[...e])),j(!1),null===(n=null==c?void 0:c.onClose)||void 0===n||n.call(c)},version:u,headerRef:y}))}))}))]})}));a.displayName="DropdownPopover",exports.DropdownPopover=a;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),o=require("react/jsx-runtime"),n=require("react"),r=require("react-popper"),t=require("../../dropShadow/DropShadow.js"),l=require("../../tooltips/Tooltip.js"),s=require("../Common.styled.js"),i=require("../OpenedDropdown/components/OpennedDropdown.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}const a=d(n).default.forwardRef(((d,a)=>{var{children:p,onDropdownVisbilityChange:u,version:c="1.0",tooltipContent:v}=d,j=e.__rest(d,["children","onDropdownVisbilityChange","version","tooltipContent"]);const b=a,[f,w]=n.useState(!1),[h,O]=n.useState(null),[g,x]=n.useState(null),y=n.useRef(null),{styles:D,attributes:m}=r.usePopper(h,g,{placement:j.placement,strategy:j.strategy}),S=e=>{var o,n;"2.0"===c&&j.isMultiSelect&&e&&(null===(o=j.onSelect)||void 0===o||o.call(j,[...e])),w(!1),null===(n=null==j?void 0:j.onClose)||void 0===n||n.call(j)};n.useImperativeHandle(b,(()=>({openDropdown:f})),[]),n.useEffect((()=>{(null==b?void 0:b.current)&&(b.current.openDropdown=f)}),[f]),n.useEffect((()=>{null==u||u(f)}),[f]);const C=()=>o.jsxs(o.Fragment,{children:[o.jsxs("div",Object.assign({style:{position:"relative"},ref:O},{children:[o.jsx(s.OverLapAbs,{ref:y,disabled:j.disabled,onClick:e=>{var o;null===(o=j.onDropdownOpen)||void 0===o||o.call(j),f?(w(!1),e.preventDefault()):j.disabled||w(!0)}}),p]})),f&&o.jsx(s.OpenDropdownContainer,Object.assign({ref:x,style:Object.assign(Object.assign({},D.popper),{zIndex:3})},m.popper,{children:o.jsx(t.default,Object.assign({level:"z2",position:"down",style:{borderRadius:8}},{children:o.jsx(i.OpenedDropdown,Object.assign({},j,{onSelect:e=>{var o;"2.0"===c&&j.isMultiSelect||(null===(o=j.onSelect)||void 0===o||o.call(j,e),w(!1))},onClose:S,version:c,headerRef:y}))}))}))]});return o.jsx(o.Fragment,{children:f||void 0===v?C():o.jsx(l.Tooltip,Object.assign({body:v},{children:o.jsx("div",{children:C()})}))})}));a.displayName="DropdownPopover",exports.DropdownPopover=a;
@@ -1,5 +1,5 @@
1
1
  import { TagProps } from './model';
2
2
  export declare const Tag: {
3
- ({ tagText, LeadingIcon, TrailingIcon, onLeadingIconClicked, leadingIconId, trailingIconId, onTrailingIconClicked, theme, type, variant, version, cursor, tooltipContent, tooltipDirection, showTooltipArrow, }: TagProps): import("react/jsx-runtime").JSX.Element;
3
+ ({ tagText, LeadingIcon, TrailingIcon, onLeadingIconClicked, leadingIconId, trailingIconId, onTrailingIconClicked, theme, type, variant, version, cursor, }: TagProps): import("react/jsx-runtime").JSX.Element;
4
4
  displayName: string;
5
5
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),i=require("react"),t=require("../tooltips/Tooltip.js"),r=require("../TypographyStyle.js"),n=require("./model.js"),s=require("./Tag.styled.js"),a=require("./themes.js");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=o(i);const l=i=>{let{tagText:o,LeadingIcon:l,TrailingIcon:d,onLeadingIconClicked:g,leadingIconId:p,trailingIconId:j,onTrailingIconClicked:u,theme:h="light",type:y="neutral",variant:m="regular",version:b,cursor:T,tooltipContent:x,tooltipDirection:O,showTooltipArrow:I}=i,f=o;const v=h;let w=y;n.ValidTagTypeMap[m][y]||(w="neutral"),"circle"===m&&"number"==typeof f&&f>99&&(f="99+");const C={height:"compressed"===m?11:16,width:"compressed"===m?11:16,color:a.getTagIconColor(h,w),style:{display:"block"}};return e.jsx(s.Tag,Object.assign({cursor:T,theme:v,type:y,variant:m,version:b},{children:e.jsx(t.Tooltip,Object.assign({body:x,placement:O||"right",hideArrow:!I},{children:e.jsxs("div",Object.assign({className:"container"},{children:[l&&e.jsx("button",Object.assign({className:"icon-leading",onClick:g,id:`${p}-wrapper`||"leading-icon-wrapper"},{children:c.default.createElement(l,Object.assign(Object.assign({},C),{id:p||"leading-icon"}))})),""!==f&&("ai"===y&&"light"===h?"compressed"===m?e.jsx(r.AiBodyTiny,{children:f}):e.jsx(r.AiBodyCaption,{children:f}):"compressed"===m?e.jsx(r.BodyTiny,Object.assign({className:"text"},{children:f})):e.jsx(r.BodyCaption,Object.assign({className:"text"},{children:f}))),d&&e.jsx("button",Object.assign({className:"icon-trailing",onClick:u,id:`${j}-wrapper`||"trailing-icon-wrapper"},{children:c.default.createElement(d,Object.assign(Object.assign({},C),{id:j||"trailing-icon"}))}))]}))}))}))};l.displayName="Tag",exports.Tag=l;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),i=require("react"),n=require("../TypographyStyle.js"),r=require("./model.js"),t=require("./Tag.styled.js"),a=require("./themes.js");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=s(i);const l=i=>{let{tagText:s,LeadingIcon:l,TrailingIcon:o,onLeadingIconClicked:d,leadingIconId:g,trailingIconId:p,onTrailingIconClicked:j,theme:u="light",type:y="neutral",variant:m="regular",version:h,cursor:b}=i,x=s;const T=u;let O=y;r.ValidTagTypeMap[m][y]||(O="neutral"),"circle"===m&&"number"==typeof x&&x>99&&(x="99+");const I={height:"compressed"===m?11:16,width:"compressed"===m?11:16,color:a.getTagIconColor(u,O),style:{display:"block"}};return e.jsx(t.Tag,Object.assign({cursor:b,theme:T,type:y,variant:m,version:h},{children:e.jsxs("div",Object.assign({className:"container"},{children:[l&&e.jsx("button",Object.assign({className:"icon-leading",onClick:d,id:`${g}-wrapper`||"leading-icon-wrapper"},{children:c.default.createElement(l,Object.assign(Object.assign({},I),{id:g||"leading-icon"}))})),""!==x&&("ai"===y&&"light"===u?"compressed"===m?e.jsx(n.AiBodyTiny,{children:x}):e.jsx(n.AiBodyCaption,{children:x}):"compressed"===m?e.jsx(n.BodyTiny,Object.assign({className:"text"},{children:x})):e.jsx(n.BodyCaption,Object.assign({className:"text"},{children:x}))),o&&e.jsx("button",Object.assign({className:"icon-trailing",onClick:j,id:`${p}-wrapper`||"trailing-icon-wrapper"},{children:c.default.createElement(o,Object.assign(Object.assign({},I),{id:p||"trailing-icon"}))}))]}))}))};l.displayName="Tag",exports.Tag=l;
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
2
  import { MouseEventHandler } from 'react';
3
- import { Placement } from '../tooltips/Tooltip';
4
3
  export type TagTheme = 'light' | 'dark';
5
4
  export type TagVariant = 'regular' | 'circle' | 'compressed';
6
5
  export type TagType = 'negative' | 'warning' | 'positive' | 'neutral' | 'white' | 'purple' | 'blue' | 'grey' | 'ai';
@@ -84,10 +83,4 @@ export interface TagProps extends React.BaseHTMLAttributes<HTMLDivElement> {
84
83
  tagText: string | number;
85
84
  version?: '1.0' | '2.0';
86
85
  cursor?: string;
87
- /**
88
- * Tooltip content. If blank then not displayed
89
- */
90
- tooltipContent?: string;
91
- tooltipDirection?: Placement;
92
- showTooltipArrow?: boolean;
93
86
  }
@@ -6,6 +6,7 @@ export declare const DropdownPopover: React.ForwardRefExoticComponent<OpenDropdo
6
6
  disabled?: boolean | undefined;
7
7
  onDropdownOpen?: (() => void) | undefined;
8
8
  onDropdownVisbilityChange?: ((isOpen: boolean) => void) | undefined;
9
+ tooltipContent?: string | undefined;
9
10
  } & React.RefAttributes<{
10
11
  openDropdown: boolean;
11
12
  }>>;
@@ -1 +1 @@
1
- import{__rest as e}from"../../../_virtual/_tslib.js";import{jsxs as o,Fragment as n,jsx as r}from"react/jsx-runtime";import l,{useState as i,useRef as t,useImperativeHandle as s,useEffect as d}from"react";import{usePopper as p}from"react-popper";import a from"../../dropShadow/DropShadow.js";import{OverLapAbs as c,OpenDropdownContainer as m}from"../Common.styled.js";import{OpenedDropdown as u}from"../OpenedDropdown/components/OpennedDropdown.js";const v=l.forwardRef(((l,v)=>{var{children:b,onDropdownVisbilityChange:f,version:w="1.0"}=l,h=e(l,["children","onDropdownVisbilityChange","version"]);const j=v,[g,y]=i(!1),[D,O]=i(null),[S,C]=i(null),x=t(null),{styles:R,attributes:z}=p(D,S,{placement:h.placement,strategy:h.strategy});return s(j,(()=>({openDropdown:g})),[]),d((()=>{(null==j?void 0:j.current)&&(j.current.openDropdown=g)}),[g]),d((()=>{null==f||f(g)}),[g]),o(n,{children:[o("div",Object.assign({style:{position:"relative"},ref:O},{children:[r(c,{ref:x,disabled:h.disabled,onClick:e=>{var o;null===(o=h.onDropdownOpen)||void 0===o||o.call(h),g?(y(!1),e.preventDefault()):h.disabled||y(!0)}}),b]})),g&&r(m,Object.assign({ref:C,style:Object.assign(Object.assign({},R.popper),{zIndex:3})},z.popper,{children:r(a,Object.assign({level:"z2",position:"down",style:{borderRadius:8}},{children:r(u,Object.assign({},h,{onSelect:e=>{var o;"2.0"===w&&h.isMultiSelect||(null===(o=h.onSelect)||void 0===o||o.call(h,e),y(!1))},onClose:e=>{var o,n;"2.0"===w&&h.isMultiSelect&&e&&(null===(o=h.onSelect)||void 0===o||o.call(h,[...e])),y(!1),null===(n=null==h?void 0:h.onClose)||void 0===n||n.call(h)},version:w,headerRef:x}))}))}))]})}));v.displayName="DropdownPopover";export{v as DropdownPopover};
1
+ import{__rest as o}from"../../../_virtual/_tslib.js";import{jsx as e,Fragment as n,jsxs as r}from"react/jsx-runtime";import l,{useState as t,useRef as i,useImperativeHandle as s,useEffect as d}from"react";import{usePopper as p}from"react-popper";import a from"../../dropShadow/DropShadow.js";import{Tooltip as c}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=l.forwardRef(((l,b)=>{var{children:f,onDropdownVisbilityChange:h,version:j="1.0",tooltipContent:w}=l,g=o(l,["children","onDropdownVisbilityChange","version","tooltipContent"]);const y=b,[D,O]=t(!1),[C,S]=t(null),[x,R]=t(null),z=i(null),{styles:M,attributes:V}=p(C,x,{placement:g.placement,strategy:g.strategy}),_=o=>{var e,n;"2.0"===j&&g.isMultiSelect&&o&&(null===(e=g.onSelect)||void 0===e||e.call(g,[...o])),O(!1),null===(n=null==g?void 0:g.onClose)||void 0===n||n.call(g)};s(y,(()=>({openDropdown:D})),[]),d((()=>{(null==y?void 0:y.current)&&(y.current.openDropdown=D)}),[D]),d((()=>{null==h||h(D)}),[D]);const k=()=>r(n,{children:[r("div",Object.assign({style:{position:"relative"},ref:S},{children:[e(m,{ref:z,disabled:g.disabled,onClick:o=>{var e;null===(e=g.onDropdownOpen)||void 0===e||e.call(g),D?(O(!1),o.preventDefault()):g.disabled||O(!0)}}),f]})),D&&e(v,Object.assign({ref:R,style:Object.assign(Object.assign({},M.popper),{zIndex:3})},V.popper,{children:e(a,Object.assign({level:"z2",position:"down",style:{borderRadius:8}},{children:e(u,Object.assign({},g,{onSelect:o=>{var e;"2.0"===j&&g.isMultiSelect||(null===(e=g.onSelect)||void 0===e||e.call(g,o),O(!1))},onClose:_,version:j,headerRef:z}))}))}))]});return e(n,{children:D||void 0===w?k():e(c,Object.assign({body:w},{children:e("div",{children:k()})}))})}));b.displayName="DropdownPopover";export{b as DropdownPopover};
@@ -1,5 +1,5 @@
1
1
  import { TagProps } from './model';
2
2
  export declare const Tag: {
3
- ({ tagText, LeadingIcon, TrailingIcon, onLeadingIconClicked, leadingIconId, trailingIconId, onTrailingIconClicked, theme, type, variant, version, cursor, tooltipContent, tooltipDirection, showTooltipArrow, }: TagProps): import("react/jsx-runtime").JSX.Element;
3
+ ({ tagText, LeadingIcon, TrailingIcon, onLeadingIconClicked, leadingIconId, trailingIconId, onTrailingIconClicked, theme, type, variant, version, cursor, }: TagProps): import("react/jsx-runtime").JSX.Element;
4
4
  displayName: string;
5
5
  };
@@ -1 +1 @@
1
- import{jsx as e,jsxs as i}from"react/jsx-runtime";import t from"react";import{Tooltip as r}from"../tooltips/Tooltip.js";import{AiBodyTiny as n,AiBodyCaption as o,BodyTiny as a,BodyCaption as c}from"../TypographyStyle.js";import{ValidTagTypeMap as s}from"./model.js";import{Tag as l}from"./Tag.styled.js";import{getTagIconColor as d}from"./themes.js";const p=p=>{let{tagText:g,LeadingIcon:m,TrailingIcon:h,onLeadingIconClicked:j,leadingIconId:b,trailingIconId:y,onTrailingIconClicked:u,theme:O="light",type:T="neutral",variant:f="regular",version:w,cursor:I,tooltipContent:k,tooltipDirection:v,showTooltipArrow:C}=p,N=g;const x=O;let A=T;s[f][T]||(A="neutral"),"circle"===f&&"number"==typeof N&&N>99&&(N="99+");const E={height:"compressed"===f?11:16,width:"compressed"===f?11:16,color:d(O,A),style:{display:"block"}};return e(l,Object.assign({cursor:I,theme:x,type:T,variant:f,version:w},{children:e(r,Object.assign({body:k,placement:v||"right",hideArrow:!C},{children:i("div",Object.assign({className:"container"},{children:[m&&e("button",Object.assign({className:"icon-leading",onClick:j,id:`${b}-wrapper`||"leading-icon-wrapper"},{children:t.createElement(m,Object.assign(Object.assign({},E),{id:b||"leading-icon"}))})),""!==N&&("ai"===T&&"light"===O?e("compressed"===f?n:o,{children:N}):e("compressed"===f?a:c,Object.assign({className:"text"},{children:N}))),h&&e("button",Object.assign({className:"icon-trailing",onClick:u,id:`${y}-wrapper`||"trailing-icon-wrapper"},{children:t.createElement(h,Object.assign(Object.assign({},E),{id:y||"trailing-icon"}))}))]}))}))}))};p.displayName="Tag";export{p as Tag};
1
+ import{jsx as e,jsxs as i}from"react/jsx-runtime";import n from"react";import{AiBodyTiny as r,AiBodyCaption as t,BodyTiny as a,BodyCaption as c}from"../TypographyStyle.js";import{ValidTagTypeMap as s}from"./model.js";import{Tag as o}from"./Tag.styled.js";import{getTagIconColor as l}from"./themes.js";const d=d=>{let{tagText:g,LeadingIcon:m,TrailingIcon:p,onLeadingIconClicked:h,leadingIconId:j,trailingIconId:b,onTrailingIconClicked:u,theme:y="light",type:O="neutral",variant:I="regular",version:f,cursor:T}=d,k=g;const v=y;let w=O;s[I][O]||(w="neutral"),"circle"===I&&"number"==typeof k&&k>99&&(k="99+");const N={height:"compressed"===I?11:16,width:"compressed"===I?11:16,color:l(y,w),style:{display:"block"}};return e(o,Object.assign({cursor:T,theme:v,type:O,variant:I,version:f},{children:i("div",Object.assign({className:"container"},{children:[m&&e("button",Object.assign({className:"icon-leading",onClick:h,id:`${j}-wrapper`||"leading-icon-wrapper"},{children:n.createElement(m,Object.assign(Object.assign({},N),{id:j||"leading-icon"}))})),""!==k&&("ai"===O&&"light"===y?e("compressed"===I?r:t,{children:k}):e("compressed"===I?a:c,Object.assign({className:"text"},{children:k}))),p&&e("button",Object.assign({className:"icon-trailing",onClick:u,id:`${b}-wrapper`||"trailing-icon-wrapper"},{children:n.createElement(p,Object.assign(Object.assign({},N),{id:b||"trailing-icon"}))}))]}))}))};d.displayName="Tag";export{d as Tag};
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
2
  import { MouseEventHandler } from 'react';
3
- import { Placement } from '../tooltips/Tooltip';
4
3
  export type TagTheme = 'light' | 'dark';
5
4
  export type TagVariant = 'regular' | 'circle' | 'compressed';
6
5
  export type TagType = 'negative' | 'warning' | 'positive' | 'neutral' | 'white' | 'purple' | 'blue' | 'grey' | 'ai';
@@ -84,10 +83,4 @@ export interface TagProps extends React.BaseHTMLAttributes<HTMLDivElement> {
84
83
  tagText: string | number;
85
84
  version?: '1.0' | '2.0';
86
85
  cursor?: string;
87
- /**
88
- * Tooltip content. If blank then not displayed
89
- */
90
- tooltipContent?: string;
91
- tooltipDirection?: Placement;
92
- showTooltipArrow?: boolean;
93
86
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bikdotai/bik-component-library",
3
- "version": "0.0.549-0",
3
+ "version": "0.0.549-2",
4
4
  "description": "Bik Component Library",
5
5
  "repository": {
6
6
  "type": "git",