@bikdotai/bik-component-library 0.0.332 → 0.0.333

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("react/jsx-runtime"),t=require("./MenuItem.js"),s=require("./MenuList.styled.js");exports.MenuList=i=>{let{options:n,isMultiSelect:o,showDescription:r,onSelect:l,version:c}=i;return e.jsx(e.Fragment,{children:n.map(((i,u)=>{const p=u===n.length-1;if(i.options){const n=i;return e.jsxs("div",Object.assign({style:{marginTop:"2.0"===c?2:0}},{children:[e.jsx(s.StyledGroupedLabel,Object.assign({version:c},{children:n.label})),n.options.map(((s,i)=>e.jsx(t.MenuItem,{version:c,last:i===n.options.length-1,onSelect:l,showDescription:r,isMultiSelect:o,option:s},`${u}-${i}`)))]}),u)}return e.jsx(t.MenuItem,{version:c,last:p,onSelect:l,showDescription:r,isMultiSelect:o,option:i},u)}))})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("./MenuItem.js"),s=require("./MenuList.styled.js");exports.MenuList=n=>{let{options:i,isMultiSelect:r,showDescription:o,onSelect:l,version:c}=n;return e.jsx(e.Fragment,{children:i.map(((n,a)=>{const u=a===i.length-1;if(n.options){const i=n;return e.jsxs("div",Object.assign({style:{marginTop:"2.0"===c?2:0}},{children:[e.jsxs(s.StyledGroupedLabel,Object.assign({version:c},{children:[i.leadingIcon?e.jsx("span",Object.assign({style:{marginRight:8}},{children:i.leadingIcon})):e.jsx(e.Fragment,{}),i.label]})),i.options.map(((s,n)=>e.jsx(t.MenuItem,{version:c,last:n===i.options.length-1,onSelect:l,showDescription:o,isMultiSelect:r,option:s},`${a}-${n}`)))]}),a)}return e.jsx(t.MenuItem,{version:c,last:u,onSelect:l,showDescription:o,isMultiSelect:r,option:n},a)}))})};
@@ -19,6 +19,7 @@ export interface OpenDropdownProps {
19
19
  }
20
20
  export type GroupedOption = {
21
21
  label?: string;
22
+ leadingIcon?: JSX.Element;
22
23
  options: (SingleOption | MultiSelectOption)[];
23
24
  };
24
25
  export type SingleOption = {
@@ -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 t,Fragment as e,jsxs as o}from"react/jsx-runtime";import{MenuItem as i}from"./MenuItem.js";import{StyledGroupedLabel as n}from"./MenuList.styled.js";const s=s=>{let{options:r,isMultiSelect:l,showDescription:c,onSelect:p,version:m}=s;return t(e,{children:r.map(((e,s)=>{const a=s===r.length-1;if(e.options){const r=e;return o("div",Object.assign({style:{marginTop:"2.0"===m?2:0}},{children:[t(n,Object.assign({version:m},{children:r.label})),r.options.map(((e,o)=>t(i,{version:m,last:o===r.options.length-1,onSelect:p,showDescription:c,isMultiSelect:l,option:e},`${s}-${o}`)))]}),s)}return t(i,{version:m,last:a,onSelect:p,showDescription:c,isMultiSelect:l,option:e},s)}))})};export{s as MenuList};
1
+ import{jsx as e,Fragment as t,jsxs as i}from"react/jsx-runtime";import{MenuItem as n}from"./MenuItem.js";import{StyledGroupedLabel as o}from"./MenuList.styled.js";const s=s=>{let{options:r,isMultiSelect:l,showDescription:c,onSelect:p,version:a}=s;return e(t,{children:r.map(((s,m)=>{const g=m===r.length-1;if(s.options){const r=s;return i("div",Object.assign({style:{marginTop:"2.0"===a?2:0}},{children:[i(o,Object.assign({version:a},{children:[r.leadingIcon?e("span",Object.assign({style:{marginRight:8}},{children:r.leadingIcon})):e(t,{}),r.label]})),r.options.map(((t,i)=>e(n,{version:a,last:i===r.options.length-1,onSelect:p,showDescription:c,isMultiSelect:l,option:t},`${m}-${i}`)))]}),m)}return e(n,{version:a,last:g,onSelect:p,showDescription:c,isMultiSelect:l,option:s},m)}))})};export{s as MenuList};
@@ -19,6 +19,7 @@ export interface OpenDropdownProps {
19
19
  }
20
20
  export type GroupedOption = {
21
21
  label?: string;
22
+ leadingIcon?: JSX.Element;
22
23
  options: (SingleOption | MultiSelectOption)[];
23
24
  };
24
25
  export type SingleOption = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bikdotai/bik-component-library",
3
- "version": "0.0.332",
3
+ "version": "0.0.333",
4
4
  "description": "Bik Component Library",
5
5
  "repository": {
6
6
  "type": "git",