@bikdotai/bik-component-library 0.0.586-mock-beta0.2 → 0.0.586-mock-beta0.3

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"),t=require("react"),o=require("react-bootstrap"),n=require("react-dom"),s=require("../../constants/Theme.js"),i=require("../datePicker/DatePicker.js");require("react-calendar"),require("../../utils/DateUtils.js");var a=require("../TypographyStyle.js");require("../datePicker/DatePickerWrapper.styled.js");var l=require("./CommonStyles.js");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=r(n);const c=t=>{let{eachOption:o,selectedOption:n,selectedDate:i,onClickingEachItem:r,rangeSelection:d,isLastItem:c,isFirstItem:p}=t;return e.jsxs(l.ItemMenuContainer,Object.assign({isFirstItem:p,isLastItem:c,onClick:()=>r(o),isSelected:o.isCustom?o.key==(null==n?void 0:n.key)&&!!i:o.key==(null==n?void 0:n.key)},{children:[e.jsx(a.BodySecondary,Object.assign({color:o.key==(null==n?void 0:n.key)?s.BASE_COLORS.positive[900]:s.BASE_COLORS.grayscale[900]},{children:o.label})),o.subLabel?e.jsx(a.BodyCaption,Object.assign({style:{color:s.BASE_COLORS.grayscale[700]}},{children:o.subLabel})):e.jsx(e.Fragment,{}),i&&(null==n?void 0:n.isCustom)&&o.key==(null==n?void 0:n.key)&&e.jsx(a.BodyCaption,{children:d?`${u(i[0])} to ${u(i[1])}`:`${u(i[0])}`})]}),o.key)},u=e=>e.toLocaleString("default",{day:"numeric",month:"short",year:"numeric"});exports.AnalyticsDropdown=n=>{let{options:r,placeholder:p="Select an option",selected:g,onOptionSelected:m,resetDropdown:v,maxHeight:j,backgroundcolor:O,calendarPopperConfig:y,variant:b="default",datePickerPlacement:D,closeDropdown:S,labelColor:h,styleProps:f}=n;var x,k,w;const[C,R]=t.useState(!1),[E,I]=t.useState(g),[F,L]=t.useState(),[q,P]=t.useState(!1),T=()=>{!C&&P(!q)},[A,B]=t.useState(g),M="small"===b?a.Caption:a.BodySecondary;return t.useEffect((()=>{v&&I(void 0)}),[v]),t.useEffect((()=>{var e;(null==g?void 0:g.isCustom)&&(null===(e=g.dateRangeSelectionOptions)||void 0===e?void 0:e.selectedDates)?L(g.dateRangeSelectionOptions.selectedDates):L(void 0),I(g)}),[g]),t.useEffect((()=>{P(!1),R(!1)}),[S]),e.jsx(e.Fragment,{children:e.jsxs(l.MainDropdown,Object.assign({drop:"down",show:q,onToggle:T,bgColor:O,id:"analytic-dropdown"},{children:[e.jsx(o.Dropdown.Toggle,Object.assign({id:"dropdown-autoclose-outside",className:"main--dropdown",style:"small"===b?{display:"flex",alignItems:"center",gap:6,padding:"4px 8px",backgroundColor:"#FAFAFA",borderRadius:4,border:`1px solid ${s.DEFAULT_THEME.colorsV2.stroke.primary}`}:f||void 0},{children:e.jsx(M,Object.assign({style:"small"===b||h?{color:h||s.DEFAULT_THEME.colorsV2.content.secondary}:void 0},{children:(null==E?void 0:E.isCustom)?F?u(F[0])===u(F[1])?`${u(F[0])}`:`${u(F[0])} to ${u(F[1])}`:(null==A?void 0:A.label)?null==A?void 0:A.label:p:E?null==E?void 0:E.label:p}))})),e.jsx(o.Dropdown.Menu,Object.assign({className:"main--dropdown"},{children:e.jsxs(l.MainDropdown,Object.assign({drop:null!=D?D:"end",id:"sub--dropdown",show:C,onToggle:e=>{!e&&P(!1),R(!C)}},{children:[e.jsx("div",Object.assign({style:{maxHeight:j||"auto",overflowY:"scroll"}},{children:r.map(((t,n)=>{var s;return e.jsx("div",{children:(null==t?void 0:t.isCustom)?e.jsx(o.Dropdown.Toggle,Object.assign({className:"sub--dropdown"},{children:e.jsx(c,{isFirstItem:0===n,isLastItem:n===r.length-1,eachOption:t,selectedOption:E,selectedDate:F,onClickingEachItem:e=>{I(e),R(!0)},rangeSelection:!!(null===(s=null==t?void 0:t.dateRangeSelectionOptions)||void 0===s?void 0:s.selectRange)})})):e.jsx(c,{isFirstItem:0===n,isLastItem:n===r.length-1,eachOption:t,selectedOption:E,selectedDate:F,onClickingEachItem:e=>{if(L(void 0),I(e),B(e),T(),!e.noOfDays)return void m(e);const t=new Date,o=new Date;o.setDate(t.getDate()-e.noOfDays),m(Object.assign(Object.assign({},e),{selectedRange:[o,t]}))}})},null==t?void 0:t.key)}))})),e.jsx(o.Dropdown.Menu,Object.assign({className:"sub--dropdown",popperConfig:{modifiers:[{name:"offset",options:{offset:[(null==y?void 0:y.offsetSkid)||0,(null==y?void 0:y.offsetDistance)||0]}},{name:"preventOverflow",options:{boundary:"viewport"}}]}},{children:e.jsx(e.Fragment,{children:d.default.createPortal(e.jsx(i.DatePicker,{selectRange:(null===(x=null==E?void 0:E.dateRangeSelectionOptions)||void 0===x?void 0:x.selectRange)||!1,maxDate:null===(k=null==E?void 0:E.dateRangeSelectionOptions)||void 0===k?void 0:k.maxDate,minDate:null===(w=null==E?void 0:E.dateRangeSelectionOptions)||void 0===w?void 0:w.minDate,selectedDates:F,onSelectRange:(e,t)=>{const o=[e,t];(null==E?void 0:E.dateRangeSelectionOptions)&&(E.dateRangeSelectionOptions.selectedDates=o,m(Object.assign(Object.assign({},E),{selectedRange:[e,t]}))),B(E),R(!1),L(o),P(!q)},onSelectDate:e=>{(null==E?void 0:E.dateRangeSelectionOptions)&&(E.dateRangeSelectionOptions.selectedDates=[e,e],m(Object.assign(Object.assign({},E),{selectedRange:[e,e]}))),B(E),R(!1),L([e,e]),P(!q)}}),document.getElementById("portal"))})}))]}))}))]}))})},exports.EachItem=c,exports.formatDate=u;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),o=require("react-bootstrap"),n=require("react-dom"),s=require("../../constants/Theme.js"),i=require("../datePicker/DatePicker.js");require("react-calendar"),require("../../utils/DateUtils.js");var a=require("../TypographyStyle.js");require("../datePicker/DatePickerWrapper.styled.js");var l=require("./CommonStyles.js");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=r(n);const c=t=>{let{eachOption:o,selectedOption:n,selectedDate:i,onClickingEachItem:r,rangeSelection:d,isLastItem:c,isFirstItem:p}=t;return e.jsxs(l.ItemMenuContainer,Object.assign({isFirstItem:p,isLastItem:c,onClick:()=>r(o),isSelected:o.isCustom?o.key==(null==n?void 0:n.key)&&!!i:o.key==(null==n?void 0:n.key)},{children:[e.jsx(a.BodySecondary,Object.assign({color:o.key==(null==n?void 0:n.key)?s.BASE_COLORS.positive[900]:s.BASE_COLORS.grayscale[900]},{children:o.label})),o.subLabel?e.jsx(a.BodyCaption,Object.assign({style:{color:s.BASE_COLORS.grayscale[700]}},{children:o.subLabel})):e.jsx(e.Fragment,{}),i&&(null==n?void 0:n.isCustom)&&o.key==(null==n?void 0:n.key)&&e.jsx(a.BodyCaption,{children:d?`${u(i[0])} to ${u(i[1])}`:`${u(i[0])}`})]}),o.key)},u=e=>e.toLocaleString("default",{day:"numeric",month:"short",year:"numeric"});exports.AnalyticsDropdown=n=>{let{options:r,placeholder:p="Select an option",selected:g,onOptionSelected:m,resetDropdown:v,maxHeight:j,backgroundcolor:O,calendarPopperConfig:y,variant:b="default",datePickerPlacement:D,closeDropdown:S,labelColor:h,styleProps:f}=n;var x,k,w;const[C,R]=t.useState(!1),[E,I]=t.useState(g),[F,L]=t.useState(),[q,P]=t.useState(!1),T=()=>{!C&&P(!q)},[A,M]=t.useState(g),B="small"===b?a.Caption:a.BodySecondary;return t.useEffect((()=>{v&&I(void 0)}),[v]),t.useEffect((()=>{var e;(null==g?void 0:g.isCustom)&&(null===(e=g.dateRangeSelectionOptions)||void 0===e?void 0:e.selectedDates)?L(g.dateRangeSelectionOptions.selectedDates):L(void 0),I(g)}),[g]),t.useEffect((()=>{P(!1),R(!1)}),[S]),e.jsx(e.Fragment,{children:e.jsxs(l.MainDropdown,Object.assign({drop:"down",show:q,onToggle:T,bgColor:O,id:"analytic-dropdown"},{children:[e.jsx(o.Dropdown.Toggle,Object.assign({id:"dropdown-autoclose-outside",className:"main--dropdown",style:"small"===b?{display:"flex",alignItems:"center",gap:6,padding:"4px 8px",backgroundColor:"#FAFAFA",borderRadius:4,border:`1px solid ${s.DEFAULT_THEME.colorsV2.stroke.primary}`}:f||void 0},{children:e.jsx(B,Object.assign({style:"small"===b||h?{color:h||s.DEFAULT_THEME.colorsV2.content.secondary}:void 0},{children:(null==E?void 0:E.isCustom)?F?u(F[0])===u(F[1])?`${u(F[0])}`:`${u(F[0])} to ${u(F[1])}`:(null==A?void 0:A.label)?null==A?void 0:A.label:p:E?null==E?void 0:E.label:p}))})),e.jsx(o.Dropdown.Menu,Object.assign({className:"main--dropdown"},{children:e.jsxs(l.MainDropdown,Object.assign({drop:null!=D?D:"end",id:"sub--dropdown",show:C,onToggle:e=>{!e&&P(!1),R(!C)}},{children:[e.jsx("div",Object.assign({style:{maxHeight:j||"auto",overflowY:"scroll"}},{children:r.map(((t,n)=>{var s;return e.jsx("div",{children:(null==t?void 0:t.isCustom)?e.jsx(o.Dropdown.Toggle,Object.assign({className:"sub--dropdown"},{children:e.jsx(c,{isFirstItem:0===n,isLastItem:n===r.length-1,eachOption:t,selectedOption:E,selectedDate:F,onClickingEachItem:e=>{I(e),R(!0)},rangeSelection:!!(null===(s=null==t?void 0:t.dateRangeSelectionOptions)||void 0===s?void 0:s.selectRange)})})):e.jsx(c,{isFirstItem:0===n,isLastItem:n===r.length-1,eachOption:t,selectedOption:E,selectedDate:F,onClickingEachItem:e=>{if(L(void 0),I(e),M(e),T(),!e.noOfDays)return void m(e);const t=new Date,o=new Date;o.setDate(t.getDate()-e.noOfDays),m(Object.assign(Object.assign({},e),{selectedRange:[o,t]}))}})},null==t?void 0:t.key)}))})),e.jsx(o.Dropdown.Menu,Object.assign({className:"sub--dropdown",popperConfig:{modifiers:[{name:"offset",options:{offset:[(null==y?void 0:y.offsetSkid)||0,(null==y?void 0:y.offsetDistance)||0]}},{name:"preventOverflow",options:{boundary:"viewport"}}]}},{children:e.jsx(e.Fragment,{children:d.default.createPortal(e.jsx(i.DatePicker,{selectRange:(null===(x=null==E?void 0:E.dateRangeSelectionOptions)||void 0===x?void 0:x.selectRange)||!1,maxDate:null===(k=null==E?void 0:E.dateRangeSelectionOptions)||void 0===k?void 0:k.maxDate,minDate:null===(w=null==E?void 0:E.dateRangeSelectionOptions)||void 0===w?void 0:w.minDate,selectedDates:F,onSelectRange:(e,t)=>{const o=[e,t];(null==E?void 0:E.dateRangeSelectionOptions)&&(E.dateRangeSelectionOptions.selectedDates=o,m(Object.assign(Object.assign({},E),{selectedRange:[e,t]}))),M(E),R(!1),L(o),P(!q)},onSelectDate:e=>{(null==E?void 0:E.dateRangeSelectionOptions)&&(E.dateRangeSelectionOptions.selectedDates=[e,e],m(Object.assign(Object.assign({},E),{selectedRange:[e,e]}))),M(E),R(!1),L([e,e]),P(!q)}}),document.body)})}))]}))}))]}))})},exports.EachItem=c,exports.formatDate=u;
@@ -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{jsx as e,Fragment as t,jsxs as o}from"react/jsx-runtime";import{useState as n,useEffect as l}from"react";import{Dropdown as i}from"react-bootstrap";import s from"react-dom";import{DEFAULT_THEME as a,BASE_COLORS as d}from"../../constants/Theme.js";import{DatePicker as c}from"../datePicker/DatePicker.js";import"react-calendar";import"../../utils/DateUtils.js";import{BodySecondary as r,BodyCaption as p,Caption as m}from"../TypographyStyle.js";import"../datePicker/DatePickerWrapper.styled.js";import{MainDropdown as g,ItemMenuContainer as u}from"./CommonStyles.js";const v=d=>{let{options:p,placeholder:u="Select an option",selected:v,onOptionSelected:h,resetDropdown:y,maxHeight:f,backgroundcolor:D,calendarPopperConfig:j,variant:k="default",datePickerPlacement:S,closeDropdown:R,labelColor:w,styleProps:C}=d;var I,x,P;const[F,L]=n(!1),[$,T]=n(v),[E,N]=n(),[A,H]=n(!1),M=()=>{!F&&H(!A)},[V,B]=n(v),U="small"===k?m:r;return l((()=>{y&&T(void 0)}),[y]),l((()=>{var e;(null==v?void 0:v.isCustom)&&(null===(e=v.dateRangeSelectionOptions)||void 0===e?void 0:e.selectedDates)?N(v.dateRangeSelectionOptions.selectedDates):N(void 0),T(v)}),[v]),l((()=>{H(!1),L(!1)}),[R]),e(t,{children:o(g,Object.assign({drop:"down",show:A,onToggle:M,bgColor:D,id:"analytic-dropdown"},{children:[e(i.Toggle,Object.assign({id:"dropdown-autoclose-outside",className:"main--dropdown",style:"small"===k?{display:"flex",alignItems:"center",gap:6,padding:"4px 8px",backgroundColor:"#FAFAFA",borderRadius:4,border:`1px solid ${a.colorsV2.stroke.primary}`}:C||void 0},{children:e(U,Object.assign({style:"small"===k||w?{color:w||a.colorsV2.content.secondary}:void 0},{children:(null==$?void 0:$.isCustom)?E?b(E[0])===b(E[1])?`${b(E[0])}`:`${b(E[0])} to ${b(E[1])}`:(null==V?void 0:V.label)?null==V?void 0:V.label:u:$?null==$?void 0:$.label:u}))})),e(i.Menu,Object.assign({className:"main--dropdown"},{children:o(g,Object.assign({drop:null!=S?S:"end",id:"sub--dropdown",show:F,onToggle:e=>{!e&&H(!1),L(!F)}},{children:[e("div",Object.assign({style:{maxHeight:f||"auto",overflowY:"scroll"}},{children:p.map(((t,o)=>{var n;return e("div",{children:(null==t?void 0:t.isCustom)?e(i.Toggle,Object.assign({className:"sub--dropdown"},{children:e(O,{isFirstItem:0===o,isLastItem:o===p.length-1,eachOption:t,selectedOption:$,selectedDate:E,onClickingEachItem:e=>{T(e),L(!0)},rangeSelection:!!(null===(n=null==t?void 0:t.dateRangeSelectionOptions)||void 0===n?void 0:n.selectRange)})})):e(O,{isFirstItem:0===o,isLastItem:o===p.length-1,eachOption:t,selectedOption:$,selectedDate:E,onClickingEachItem:e=>{if(N(void 0),T(e),B(e),M(),!e.noOfDays)return void h(e);const t=new Date,o=new Date;o.setDate(t.getDate()-e.noOfDays),h(Object.assign(Object.assign({},e),{selectedRange:[o,t]}))}})},null==t?void 0:t.key)}))})),e(i.Menu,Object.assign({className:"sub--dropdown",popperConfig:{modifiers:[{name:"offset",options:{offset:[(null==j?void 0:j.offsetSkid)||0,(null==j?void 0:j.offsetDistance)||0]}},{name:"preventOverflow",options:{boundary:"viewport"}}]}},{children:e(t,{children:s.createPortal(e(c,{selectRange:(null===(I=null==$?void 0:$.dateRangeSelectionOptions)||void 0===I?void 0:I.selectRange)||!1,maxDate:null===(x=null==$?void 0:$.dateRangeSelectionOptions)||void 0===x?void 0:x.maxDate,minDate:null===(P=null==$?void 0:$.dateRangeSelectionOptions)||void 0===P?void 0:P.minDate,selectedDates:E,onSelectRange:(e,t)=>{const o=[e,t];(null==$?void 0:$.dateRangeSelectionOptions)&&($.dateRangeSelectionOptions.selectedDates=o,h(Object.assign(Object.assign({},$),{selectedRange:[e,t]}))),B($),L(!1),N(o),H(!A)},onSelectDate:e=>{(null==$?void 0:$.dateRangeSelectionOptions)&&($.dateRangeSelectionOptions.selectedDates=[e,e],h(Object.assign(Object.assign({},$),{selectedRange:[e,e]}))),B($),L(!1),N([e,e]),H(!A)}}),document.getElementById("portal"))})}))]}))}))]}))})},O=n=>{let{eachOption:l,selectedOption:i,selectedDate:s,onClickingEachItem:a,rangeSelection:c,isLastItem:m,isFirstItem:g}=n;return o(u,Object.assign({isFirstItem:g,isLastItem:m,onClick:()=>a(l),isSelected:l.isCustom?l.key==(null==i?void 0:i.key)&&!!s:l.key==(null==i?void 0:i.key)},{children:[e(r,Object.assign({color:l.key==(null==i?void 0:i.key)?d.positive[900]:d.grayscale[900]},{children:l.label})),l.subLabel?e(p,Object.assign({style:{color:d.grayscale[700]}},{children:l.subLabel})):e(t,{}),s&&(null==i?void 0:i.isCustom)&&l.key==(null==i?void 0:i.key)&&e(p,{children:c?`${b(s[0])} to ${b(s[1])}`:`${b(s[0])}`})]}),l.key)},b=e=>e.toLocaleString("default",{day:"numeric",month:"short",year:"numeric"});export{v as AnalyticsDropdown,O as EachItem,b as formatDate};
1
+ import{jsx as e,Fragment as t,jsxs as o}from"react/jsx-runtime";import{useState as n,useEffect as i}from"react";import{Dropdown as l}from"react-bootstrap";import s from"react-dom";import{DEFAULT_THEME as a,BASE_COLORS as d}from"../../constants/Theme.js";import{DatePicker as c}from"../datePicker/DatePicker.js";import"react-calendar";import"../../utils/DateUtils.js";import{BodySecondary as r,BodyCaption as p,Caption as m}from"../TypographyStyle.js";import"../datePicker/DatePickerWrapper.styled.js";import{MainDropdown as g,ItemMenuContainer as u}from"./CommonStyles.js";const v=d=>{let{options:p,placeholder:u="Select an option",selected:v,onOptionSelected:h,resetDropdown:y,maxHeight:f,backgroundcolor:D,calendarPopperConfig:j,variant:k="default",datePickerPlacement:S,closeDropdown:R,labelColor:w,styleProps:C}=d;var I,x,P;const[F,L]=n(!1),[$,T]=n(v),[N,A]=n(),[E,H]=n(!1),M=()=>{!F&&H(!E)},[V,U]=n(v),W="small"===k?m:r;return i((()=>{y&&T(void 0)}),[y]),i((()=>{var e;(null==v?void 0:v.isCustom)&&(null===(e=v.dateRangeSelectionOptions)||void 0===e?void 0:e.selectedDates)?A(v.dateRangeSelectionOptions.selectedDates):A(void 0),T(v)}),[v]),i((()=>{H(!1),L(!1)}),[R]),e(t,{children:o(g,Object.assign({drop:"down",show:E,onToggle:M,bgColor:D,id:"analytic-dropdown"},{children:[e(l.Toggle,Object.assign({id:"dropdown-autoclose-outside",className:"main--dropdown",style:"small"===k?{display:"flex",alignItems:"center",gap:6,padding:"4px 8px",backgroundColor:"#FAFAFA",borderRadius:4,border:`1px solid ${a.colorsV2.stroke.primary}`}:C||void 0},{children:e(W,Object.assign({style:"small"===k||w?{color:w||a.colorsV2.content.secondary}:void 0},{children:(null==$?void 0:$.isCustom)?N?O(N[0])===O(N[1])?`${O(N[0])}`:`${O(N[0])} to ${O(N[1])}`:(null==V?void 0:V.label)?null==V?void 0:V.label:u:$?null==$?void 0:$.label:u}))})),e(l.Menu,Object.assign({className:"main--dropdown"},{children:o(g,Object.assign({drop:null!=S?S:"end",id:"sub--dropdown",show:F,onToggle:e=>{!e&&H(!1),L(!F)}},{children:[e("div",Object.assign({style:{maxHeight:f||"auto",overflowY:"scroll"}},{children:p.map(((t,o)=>{var n;return e("div",{children:(null==t?void 0:t.isCustom)?e(l.Toggle,Object.assign({className:"sub--dropdown"},{children:e(b,{isFirstItem:0===o,isLastItem:o===p.length-1,eachOption:t,selectedOption:$,selectedDate:N,onClickingEachItem:e=>{T(e),L(!0)},rangeSelection:!!(null===(n=null==t?void 0:t.dateRangeSelectionOptions)||void 0===n?void 0:n.selectRange)})})):e(b,{isFirstItem:0===o,isLastItem:o===p.length-1,eachOption:t,selectedOption:$,selectedDate:N,onClickingEachItem:e=>{if(A(void 0),T(e),U(e),M(),!e.noOfDays)return void h(e);const t=new Date,o=new Date;o.setDate(t.getDate()-e.noOfDays),h(Object.assign(Object.assign({},e),{selectedRange:[o,t]}))}})},null==t?void 0:t.key)}))})),e(l.Menu,Object.assign({className:"sub--dropdown",popperConfig:{modifiers:[{name:"offset",options:{offset:[(null==j?void 0:j.offsetSkid)||0,(null==j?void 0:j.offsetDistance)||0]}},{name:"preventOverflow",options:{boundary:"viewport"}}]}},{children:e(t,{children:s.createPortal(e(c,{selectRange:(null===(I=null==$?void 0:$.dateRangeSelectionOptions)||void 0===I?void 0:I.selectRange)||!1,maxDate:null===(x=null==$?void 0:$.dateRangeSelectionOptions)||void 0===x?void 0:x.maxDate,minDate:null===(P=null==$?void 0:$.dateRangeSelectionOptions)||void 0===P?void 0:P.minDate,selectedDates:N,onSelectRange:(e,t)=>{const o=[e,t];(null==$?void 0:$.dateRangeSelectionOptions)&&($.dateRangeSelectionOptions.selectedDates=o,h(Object.assign(Object.assign({},$),{selectedRange:[e,t]}))),U($),L(!1),A(o),H(!E)},onSelectDate:e=>{(null==$?void 0:$.dateRangeSelectionOptions)&&($.dateRangeSelectionOptions.selectedDates=[e,e],h(Object.assign(Object.assign({},$),{selectedRange:[e,e]}))),U($),L(!1),A([e,e]),H(!E)}}),document.body)})}))]}))}))]}))})},b=n=>{let{eachOption:i,selectedOption:l,selectedDate:s,onClickingEachItem:a,rangeSelection:c,isLastItem:m,isFirstItem:g}=n;return o(u,Object.assign({isFirstItem:g,isLastItem:m,onClick:()=>a(i),isSelected:i.isCustom?i.key==(null==l?void 0:l.key)&&!!s:i.key==(null==l?void 0:l.key)},{children:[e(r,Object.assign({color:i.key==(null==l?void 0:l.key)?d.positive[900]:d.grayscale[900]},{children:i.label})),i.subLabel?e(p,Object.assign({style:{color:d.grayscale[700]}},{children:i.subLabel})):e(t,{}),s&&(null==l?void 0:l.isCustom)&&i.key==(null==l?void 0:l.key)&&e(p,{children:c?`${O(s[0])} to ${O(s[1])}`:`${O(s[0])}`})]}),i.key)},O=e=>e.toLocaleString("default",{day:"numeric",month:"short",year:"numeric"});export{v as AnalyticsDropdown,b as EachItem,O as formatDate};
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export declare const Menus: ({
2
3
  displayName: string;
3
4
  key: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bikdotai/bik-component-library",
3
- "version": "0.0.586-mock-beta0.2",
3
+ "version": "0.0.586-mock-beta0.3",
4
4
  "description": "Bik Component Library",
5
5
  "repository": {
6
6
  "type": "git",