@bikdotai/bik-component-library 0.0.750 → 0.0.751

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.
@@ -9,5 +9,6 @@ export type TablePaginationProps = {
9
9
  updatePageSize: (option: DropdownOption | DropdownOption[]) => void;
10
10
  showTotalText?: boolean;
11
11
  removeBorder?: boolean;
12
+ containerStyle?: React.CSSProperties;
12
13
  };
13
14
  export declare const TablePagination: React.FC<TablePaginationProps>;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),n=require("../../assets/icons/chevronLeft.svg.js"),o=require("../../assets/icons/chevronRight.svg.js");require("../dropdown/DropdownPopover/index.js");var r=require("../dropdown/Dropdown.js");require("../dropdown/ChipDropdown.js"),require("react"),require("../zeroState/ZeroState.js");var t=require("../TypographyStyle.js"),s=require("../../constants/Theme.js");require("../dropdown/OpenedDropdown/components/description/Description.styled.js"),require("../checkBox/CheckBox.styled.js"),require("../list-item/ListItem.js"),require("../dropdown/OpenedDropdown/components/menu/FreeFormMenu.styled.js"),require("../dropdown/OpenedDropdown/components/menu/MenuItem.js"),require("../dropdown/OpenedDropdown/components/menu/MenuList.styled.js"),require("../button/Button.js"),require("../dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.styled.js"),require("../dropdown/OpenedDropdown/components/OpennedDropdown.styled.js"),require("../icon-button/IconButton.js"),require("../input/Input.js"),require("../dropdown/MenuItem/MenuItem.js");var i=require("./TablePagination.styled.js");exports.TablePagination=d=>{let{pageNumber:a,pageSize:l,totalRows:c,updatePageNumber:p,updatePageSize:u,hidePageSizeOptions:j,showTotalText:g}=d;const h=s.DEFAULT_THEME.colorsV2,w=(a-1)*l+1,y=(a-1)*l+l,m=Math.ceil(c/l),q=1==m;let x=[];x=m>=5?a===m?[a-4,a-3,a-2,a-1,a]:1===a?[a,a+1,a+2,a+3,a+4]:2===a?[a-1,a,a+1,a+2,a+3]:a===m-1?[a-3,a-2,a-1,a,a+1]:[a-2,a-1,a,a+1,a+2]:Array.from({length:m},((e,n)=>n+1));const b=[{label:"5 rows per page",value:"5",selected:5===l},{label:"10 rows per page",value:"10",selected:10===l},{label:"20 rows per page",value:"20",selected:20===l}];return e.jsxs(i.StyledTablePaginationContainer,{children:[!j&&e.jsx("div",{children:e.jsx(r.Dropdown,{size:"small",options:b,onSelect:u,width:"162px"})}),e.jsxs("div",Object.assign({className:"paging__container"},{children:[!j&&c&&e.jsxs(t.BodySecondary,Object.assign({style:{color:h.content.placeholder}},{children:["Showing ",w,"-",y>c?c:y," of"," ",c," results"]})),e.jsxs("div",Object.assign({className:"pages__buttons-container"},{children:[!q&&e.jsx(i.StyledPagingContainer,Object.assign({active:!1,onClick:()=>{1!==a&&p(Math.max(a-1,1))},disabled:1===a},{children:e.jsx(n.default,{color:h.content.secondary,height:14,width:14})})),x.map((n=>e.jsx(i.StyledPagingContainer,Object.assign({active:n==a,onClick:()=>p(n),style:{display:1==n&&c<=l?"none":"flex"}},{children:e.jsx(t.BodySecondary,Object.assign({style:{color:n==a?h.content.primaryInverse:h.content.secondary}},{children:n}))}),n))),!q&&e.jsx(i.StyledPagingContainer,Object.assign({isLast:!0,active:!1,onClick:()=>{a!==m&&p(Math.min(a+1,m))},disabled:a===m},{children:e.jsx(o.default,{color:h.content.secondary,height:14,width:14})}))]})),j&&c&&g&&e.jsxs(t.BodySecondary,Object.assign({style:{color:h.content.placeholder}},{children:["Showing ",w,"-",y>c?c:y," of"," ",c," results"]}))]}))]})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),n=require("../../assets/icons/chevronLeft.svg.js"),o=require("../../assets/icons/chevronRight.svg.js");require("../dropdown/DropdownPopover/index.js");var r=require("../dropdown/Dropdown.js");require("../dropdown/ChipDropdown.js"),require("react"),require("../zeroState/ZeroState.js");var t=require("../TypographyStyle.js"),s=require("../../constants/Theme.js");require("../dropdown/OpenedDropdown/components/description/Description.styled.js"),require("../checkBox/CheckBox.styled.js"),require("../list-item/ListItem.js"),require("../dropdown/OpenedDropdown/components/menu/FreeFormMenu.styled.js"),require("../dropdown/OpenedDropdown/components/menu/MenuItem.js"),require("../dropdown/OpenedDropdown/components/menu/MenuList.styled.js"),require("../button/Button.js"),require("../dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.styled.js"),require("../dropdown/OpenedDropdown/components/OpennedDropdown.styled.js"),require("../icon-button/IconButton.js"),require("../input/Input.js"),require("../dropdown/MenuItem/MenuItem.js");var i=require("./TablePagination.styled.js");exports.TablePagination=d=>{let{pageNumber:a,pageSize:l,totalRows:c,updatePageNumber:p,updatePageSize:u,hidePageSizeOptions:j,showTotalText:g,containerStyle:h={}}=d;const y=s.DEFAULT_THEME.colorsV2,w=(a-1)*l+1,m=(a-1)*l+l,b=Math.ceil(c/l),q=1==b;let x=[];x=b>=5?a===b?[a-4,a-3,a-2,a-1,a]:1===a?[a,a+1,a+2,a+3,a+4]:2===a?[a-1,a,a+1,a+2,a+3]:a===b-1?[a-3,a-2,a-1,a,a+1]:[a-2,a-1,a,a+1,a+2]:Array.from({length:b},((e,n)=>n+1));const v=[{label:"5 rows per page",value:"5",selected:5===l},{label:"10 rows per page",value:"10",selected:10===l},{label:"20 rows per page",value:"20",selected:20===l}];return e.jsxs(i.StyledTablePaginationContainer,Object.assign({style:h},{children:[!j&&e.jsx("div",{children:e.jsx(r.Dropdown,{size:"small",options:v,onSelect:u,width:"162px"})}),e.jsxs("div",Object.assign({className:"paging__container"},{children:[!j&&c&&e.jsxs(t.BodySecondary,Object.assign({style:{color:y.content.placeholder}},{children:["Showing ",w,"-",m>c?c:m," of"," ",c," results"]})),e.jsxs("div",Object.assign({className:"pages__buttons-container"},{children:[!q&&e.jsx(i.StyledPagingContainer,Object.assign({active:!1,onClick:()=>{1!==a&&p(Math.max(a-1,1))},disabled:1===a},{children:e.jsx(n.default,{color:y.content.secondary,height:14,width:14})})),x.map((n=>e.jsx(i.StyledPagingContainer,Object.assign({active:n==a,onClick:()=>p(n),style:{display:1==n&&c<=l?"none":"flex"}},{children:e.jsx(t.BodySecondary,Object.assign({style:{color:n==a?y.content.primaryInverse:y.content.secondary}},{children:n}))}),n))),!q&&e.jsx(i.StyledPagingContainer,Object.assign({isLast:!0,active:!1,onClick:()=>{a!==b&&p(Math.min(a+1,b))},disabled:a===b},{children:e.jsx(o.default,{color:y.content.secondary,height:14,width:14})}))]})),j&&c&&g&&e.jsxs(t.BodySecondary,Object.assign({style:{color:y.content.placeholder}},{children:["Showing ",w,"-",m>c?c:m," of"," ",c," results"]}))]}))]}))};
@@ -9,5 +9,6 @@ export type TablePaginationProps = {
9
9
  updatePageSize: (option: DropdownOption | DropdownOption[]) => void;
10
10
  showTotalText?: boolean;
11
11
  removeBorder?: boolean;
12
+ containerStyle?: React.CSSProperties;
12
13
  };
13
14
  export declare const TablePagination: React.FC<TablePaginationProps>;
@@ -1 +1 @@
1
- import{jsxs as e,jsx as o}from"react/jsx-runtime";import t from"../../assets/icons/chevronLeft.svg.js";import n from"../../assets/icons/chevronRight.svg.js";import"../dropdown/DropdownPopover/index.js";import{Dropdown as r}from"../dropdown/Dropdown.js";import"../dropdown/ChipDropdown.js";import"react";import"../zeroState/ZeroState.js";import{BodySecondary as s}from"../TypographyStyle.js";import{DEFAULT_THEME as i}from"../../constants/Theme.js";import"../dropdown/OpenedDropdown/components/description/Description.styled.js";import"../checkBox/CheckBox.styled.js";import"../list-item/ListItem.js";import"../dropdown/OpenedDropdown/components/menu/FreeFormMenu.styled.js";import"../dropdown/OpenedDropdown/components/menu/MenuItem.js";import"../dropdown/OpenedDropdown/components/menu/MenuList.styled.js";import"../button/Button.js";import"../dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.styled.js";import"../dropdown/OpenedDropdown/components/OpennedDropdown.styled.js";import"../icon-button/IconButton.js";import"../input/Input.js";import"../dropdown/MenuItem/MenuItem.js";import{StyledTablePaginationContainer as p,StyledPagingContainer as d}from"./TablePagination.styled.js";const c=c=>{let{pageNumber:l,pageSize:a,totalRows:m,updatePageNumber:h,updatePageSize:w,hidePageSizeOptions:j,showTotalText:g}=c;const u=i.colorsV2,y=(l-1)*a+1,b=(l-1)*a+a,O=Math.ceil(m/a),v=1==O;let f=[];f=O>=5?l===O?[l-4,l-3,l-2,l-1,l]:1===l?[l,l+1,l+2,l+3,l+4]:2===l?[l-1,l,l+1,l+2,l+3]:l===O-1?[l-3,l-2,l-1,l,l+1]:[l-2,l-1,l,l+1,l+2]:Array.from({length:O},((e,o)=>o+1));return e(p,{children:[!j&&o("div",{children:o(r,{size:"small",options:[{label:"5 rows per page",value:"5",selected:5===a},{label:"10 rows per page",value:"10",selected:10===a},{label:"20 rows per page",value:"20",selected:20===a}],onSelect:w,width:"162px"})}),e("div",Object.assign({className:"paging__container"},{children:[!j&&m&&e(s,Object.assign({style:{color:u.content.placeholder}},{children:["Showing ",y,"-",b>m?m:b," of"," ",m," results"]})),e("div",Object.assign({className:"pages__buttons-container"},{children:[!v&&o(d,Object.assign({active:!1,onClick:()=>{1!==l&&h(Math.max(l-1,1))},disabled:1===l},{children:o(t,{color:u.content.secondary,height:14,width:14})})),f.map((e=>o(d,Object.assign({active:e==l,onClick:()=>h(e),style:{display:1==e&&m<=a?"none":"flex"}},{children:o(s,Object.assign({style:{color:e==l?u.content.primaryInverse:u.content.secondary}},{children:e}))}),e))),!v&&o(d,Object.assign({isLast:!0,active:!1,onClick:()=>{l!==O&&h(Math.min(l+1,O))},disabled:l===O},{children:o(n,{color:u.content.secondary,height:14,width:14})}))]})),j&&m&&g&&e(s,Object.assign({style:{color:u.content.placeholder}},{children:["Showing ",y,"-",b>m?m:b," of"," ",m," results"]}))]}))]})};export{c as TablePagination};
1
+ import{jsxs as e,jsx as o}from"react/jsx-runtime";import t from"../../assets/icons/chevronLeft.svg.js";import n from"../../assets/icons/chevronRight.svg.js";import"../dropdown/DropdownPopover/index.js";import{Dropdown as s}from"../dropdown/Dropdown.js";import"../dropdown/ChipDropdown.js";import"react";import"../zeroState/ZeroState.js";import{BodySecondary as r}from"../TypographyStyle.js";import{DEFAULT_THEME as i}from"../../constants/Theme.js";import"../dropdown/OpenedDropdown/components/description/Description.styled.js";import"../checkBox/CheckBox.styled.js";import"../list-item/ListItem.js";import"../dropdown/OpenedDropdown/components/menu/FreeFormMenu.styled.js";import"../dropdown/OpenedDropdown/components/menu/MenuItem.js";import"../dropdown/OpenedDropdown/components/menu/MenuList.styled.js";import"../button/Button.js";import"../dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.styled.js";import"../dropdown/OpenedDropdown/components/OpennedDropdown.styled.js";import"../icon-button/IconButton.js";import"../input/Input.js";import"../dropdown/MenuItem/MenuItem.js";import{StyledTablePaginationContainer as p,StyledPagingContainer as d}from"./TablePagination.styled.js";const c=c=>{let{pageNumber:l,pageSize:a,totalRows:m,updatePageNumber:h,updatePageSize:j,hidePageSizeOptions:w,showTotalText:g,containerStyle:u={}}=c;const y=i.colorsV2,b=(l-1)*a+1,O=(l-1)*a+a,v=Math.ceil(m/a),f=1==v;let D=[];D=v>=5?l===v?[l-4,l-3,l-2,l-1,l]:1===l?[l,l+1,l+2,l+3,l+4]:2===l?[l-1,l,l+1,l+2,l+3]:l===v-1?[l-3,l-2,l-1,l,l+1]:[l-2,l-1,l,l+1,l+2]:Array.from({length:v},((e,o)=>o+1));const S=[{label:"5 rows per page",value:"5",selected:5===a},{label:"10 rows per page",value:"10",selected:10===a},{label:"20 rows per page",value:"20",selected:20===a}];return e(p,Object.assign({style:u},{children:[!w&&o("div",{children:o(s,{size:"small",options:S,onSelect:j,width:"162px"})}),e("div",Object.assign({className:"paging__container"},{children:[!w&&m&&e(r,Object.assign({style:{color:y.content.placeholder}},{children:["Showing ",b,"-",O>m?m:O," of"," ",m," results"]})),e("div",Object.assign({className:"pages__buttons-container"},{children:[!f&&o(d,Object.assign({active:!1,onClick:()=>{1!==l&&h(Math.max(l-1,1))},disabled:1===l},{children:o(t,{color:y.content.secondary,height:14,width:14})})),D.map((e=>o(d,Object.assign({active:e==l,onClick:()=>h(e),style:{display:1==e&&m<=a?"none":"flex"}},{children:o(r,Object.assign({style:{color:e==l?y.content.primaryInverse:y.content.secondary}},{children:e}))}),e))),!f&&o(d,Object.assign({isLast:!0,active:!1,onClick:()=>{l!==v&&h(Math.min(l+1,v))},disabled:l===v},{children:o(n,{color:y.content.secondary,height:14,width:14})}))]})),w&&m&&g&&e(r,Object.assign({style:{color:y.content.placeholder}},{children:["Showing ",b,"-",O>m?m:O," of"," ",m," results"]}))]}))]}))};export{c as TablePagination};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bikdotai/bik-component-library",
3
- "version": "0.0.750",
3
+ "version": "0.0.751",
4
4
  "description": "Bik Component Library",
5
5
  "repository": {
6
6
  "type": "git",