@bikdotai/bik-component-library 0.0.5582-tooltip-beta → 0.0.5583-tooltip-beta
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.
- package/dist/cjs/components/bik-layout/MockMenus.d.ts +0 -1
- package/dist/cjs/components/tag/Tag.js +1 -1
- package/dist/cjs/components/tag/themes.js +1 -1
- package/dist/esm/components/bik-layout/MockMenus.d.ts +0 -1
- package/dist/esm/components/tag/Tag.js +1 -1
- package/dist/esm/components/tag/themes.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),i=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),i=require("react"),r=require("../TypographyStyle.js"),n=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 o=i=>{let{tagText:s,LeadingIcon:o,TrailingIcon:l,onLeadingIconClicked:d,leadingIconId:g,trailingIconId:p,onTrailingIconClicked:u,theme:j="light",type:b="neutral",variant:h="regular",version:m,cursor:y,noBorder:x}=i,T=s;const O=j;let I=b;n.ValidTagTypeMap[h][b]||(I="neutral"),"circle"===h&&"number"==typeof T&&T>99&&(T="99+");const f={height:"compressed"===h?12:16,width:"compressed"===h?12:16,color:a.getTagIconColor(j,I),style:{display:"block"}};return e.jsx(t.Tag,Object.assign({cursor:y,theme:O,type:b,variant:h,version:m,noBorder:x},{children:e.jsxs("div",Object.assign({className:"container"},{children:[o&&e.jsx("button",Object.assign({className:"icon-leading",onClick:d,id:`${g}-wrapper`||"leading-icon-wrapper"},{children:c.default.createElement(o,Object.assign(Object.assign({},f),{id:g||"leading-icon"}))})),""!==T&&("ai"===b&&"light"===j?e.jsx(r.AiBodyCaption,{children:T}):e.jsx(r.BodyCaption,Object.assign({className:"text"},{children:T}))),l&&e.jsx("button",Object.assign({className:"icon-trailing",onClick:u,id:`${p}-wrapper`||"trailing-icon-wrapper"},{children:c.default.createElement(l,Object.assign(Object.assign({},f),{id:p||"trailing-icon"}))}))]}))}))};o.displayName="Tag",exports.Tag=o;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("../../constants/Theme.js");const e={blue:{iconColor:{light:r.COLORS.content.blue,dark:r.COLORS.content.primaryInverse},textColor:{light:r.COLORS.content.blue,dark:r.COLORS.content.primaryInverse},border:r.COLORS.stroke.blue.lightAlt,backgroundColor:{light:r.COLORS.background.blue.light,dark:r.COLORS.content.blue,circle:r.COLORS.content.blue}},purple:{iconColor:{light:r.COLORS.background.inverseLight,dark:r.COLORS.content.primaryInverse},textColor:{light:r.COLORS.background.inverseLight,dark:r.COLORS.content.primaryInverse},border:r.COLORS.stroke.brandLightAlt,backgroundColor:{light:r.COLORS.background.brandLight,dark:r.COLORS.background.inverse,circle:r.COLORS.background.inverse}},negative:{iconColor:{light:r.COLORS.content.negative,dark:r.COLORS.content.primaryInverse},textColor:{light:r.COLORS.content.negative,dark:r.COLORS.content.primaryInverse},border:r.COLORS.stroke.negative.lightAlt,backgroundColor:{light:r.COLORS.background.negative.light,dark:r.COLORS.background.negative.vibrant,circle:r.COLORS.background.negative.vibrant}},positive:{iconColor:{light:r.COLORS.content.positive,dark:r.COLORS.content.primaryInverse},textColor:{light:r.COLORS.content.positive,dark:r.COLORS.content.primaryInverse},border:r.COLORS.stroke.positive.lightAlt,backgroundColor:{light:r.COLORS.background.positive.light,dark:r.COLORS.background.positive.vibrant,circle:r.COLORS.background.positive.vibrant}},warning:{iconColor:{light:r.COLORS.content.warning,dark:r.COLORS.content.primary},textColor:{light:r.COLORS.content.warning,dark:r.COLORS.content.primary},border:r.COLORS.stroke.warning.lightAlt,backgroundColor:{light:r.COLORS.background.warning.light,dark:r.COLORS.background.warning.vibrant,circle:r.COLORS.background.warning.vibrant}},neutral:{iconColor:{light:r.COLORS.content.secondary,dark:r.COLORS.content.primaryInverse},textColor:{light:r.COLORS.content.secondary,dark:r.COLORS.content.primaryInverse},border:r.COLORS.stroke.primary,backgroundColor:{light:r.COLORS.surface.subdued,dark:r.COLORS.background.inverse,circle:r.COLORS.background.inverseLight}},white:{iconColor:{light:r.COLORS.content.secondary,dark:r.COLORS.content.primaryInverse},textColor:{light:r.COLORS.content.secondary,dark:r.COLORS.content.primaryInverse},border:r.COLORS.stroke.primary,backgroundColor:{light:r.COLORS.surface.standard,dark:r.COLORS.background.inverse,circle:r.COLORS.background.inverseLight}},grey:{iconColor:{light:r.COLORS.content.secondary,dark:r.COLORS.content.primaryInverse},textColor:{light:r.COLORS.content.secondary,dark:r.COLORS.content.primaryInverse},border:r.COLORS.stroke.primary,backgroundColor:{light:r.COLORS.surface.subdued,dark:r.COLORS.content.secondary,circle:r.COLORS.content.secondary}},ai:{iconColor:{light:r.COLORS.content.primaryInverse,dark:r.COLORS.content.primaryInverse},textColor:{light:r.COLORS.content.primaryInverse,dark:r.COLORS.content.primaryInverse},border:"none",backgroundColor:{light:r.COLORS.surface.aiLight,dark:r.COLORS.surface.ai,circle:r.COLORS.surface.ai}}};exports.generateBorder=(r,t)=>"ai"===r&&"light"===t?"rgba(254, 186, 210, 1)":e[r].border,exports.getBackgroundColor=(r,t)=>e[t].backgroundColor[r],exports.getPadding=r=>"regular"===r||"
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("../../constants/Theme.js");const e={blue:{iconColor:{light:r.COLORS.content.blue,dark:r.COLORS.content.primaryInverse},textColor:{light:r.COLORS.content.blue,dark:r.COLORS.content.primaryInverse},border:r.COLORS.stroke.blue.lightAlt,backgroundColor:{light:r.COLORS.background.blue.light,dark:r.COLORS.content.blue,circle:r.COLORS.content.blue}},purple:{iconColor:{light:r.COLORS.background.inverseLight,dark:r.COLORS.content.primaryInverse},textColor:{light:r.COLORS.background.inverseLight,dark:r.COLORS.content.primaryInverse},border:r.COLORS.stroke.brandLightAlt,backgroundColor:{light:r.COLORS.background.brandLight,dark:r.COLORS.background.inverse,circle:r.COLORS.background.inverse}},negative:{iconColor:{light:r.COLORS.content.negative,dark:r.COLORS.content.primaryInverse},textColor:{light:r.COLORS.content.negative,dark:r.COLORS.content.primaryInverse},border:r.COLORS.stroke.negative.lightAlt,backgroundColor:{light:r.COLORS.background.negative.light,dark:r.COLORS.background.negative.vibrant,circle:r.COLORS.background.negative.vibrant}},positive:{iconColor:{light:r.COLORS.content.positive,dark:r.COLORS.content.primaryInverse},textColor:{light:r.COLORS.content.positive,dark:r.COLORS.content.primaryInverse},border:r.COLORS.stroke.positive.lightAlt,backgroundColor:{light:r.COLORS.background.positive.light,dark:r.COLORS.background.positive.vibrant,circle:r.COLORS.background.positive.vibrant}},warning:{iconColor:{light:r.COLORS.content.warning,dark:r.COLORS.content.primary},textColor:{light:r.COLORS.content.warning,dark:r.COLORS.content.primary},border:r.COLORS.stroke.warning.lightAlt,backgroundColor:{light:r.COLORS.background.warning.light,dark:r.COLORS.background.warning.vibrant,circle:r.COLORS.background.warning.vibrant}},neutral:{iconColor:{light:r.COLORS.content.secondary,dark:r.COLORS.content.primaryInverse},textColor:{light:r.COLORS.content.secondary,dark:r.COLORS.content.primaryInverse},border:r.COLORS.stroke.primary,backgroundColor:{light:r.COLORS.surface.subdued,dark:r.COLORS.background.inverse,circle:r.COLORS.background.inverseLight}},white:{iconColor:{light:r.COLORS.content.secondary,dark:r.COLORS.content.primaryInverse},textColor:{light:r.COLORS.content.secondary,dark:r.COLORS.content.primaryInverse},border:r.COLORS.stroke.primary,backgroundColor:{light:r.COLORS.surface.standard,dark:r.COLORS.background.inverse,circle:r.COLORS.background.inverseLight}},grey:{iconColor:{light:r.COLORS.content.secondary,dark:r.COLORS.content.primaryInverse},textColor:{light:r.COLORS.content.secondary,dark:r.COLORS.content.primaryInverse},border:r.COLORS.stroke.primary,backgroundColor:{light:r.COLORS.surface.subdued,dark:r.COLORS.content.secondary,circle:r.COLORS.content.secondary}},ai:{iconColor:{light:r.COLORS.content.primaryInverse,dark:r.COLORS.content.primaryInverse},textColor:{light:r.COLORS.content.primaryInverse,dark:r.COLORS.content.primaryInverse},border:"none",backgroundColor:{light:r.COLORS.surface.aiLight,dark:r.COLORS.surface.ai,circle:r.COLORS.surface.ai}}};exports.generateBorder=(r,t)=>"ai"===r&&"light"===t?"rgba(254, 186, 210, 1)":e[r].border,exports.getBackgroundColor=(r,t)=>e[t].backgroundColor[r],exports.getPadding=r=>"regular"===r||"circle"===r?"4px 8px":"2px 6px",exports.getTagIconColor=(r,t)=>e[t].iconColor[r],exports.getTextColor=(r,t)=>e[t].textColor[r];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as i}from"react/jsx-runtime";import
|
|
1
|
+
import{jsx as e,jsxs as i}from"react/jsx-runtime";import n from"react";import{AiBodyCaption as r,BodyCaption as t}from"../TypographyStyle.js";import{ValidTagTypeMap as a}from"./model.js";import{Tag as c}from"./Tag.styled.js";import{getTagIconColor as o}from"./themes.js";const s=s=>{let{tagText:l,LeadingIcon:d,TrailingIcon:g,onLeadingIconClicked:m,leadingIconId:p,trailingIconId:h,onTrailingIconClicked:j,theme:b="light",type:u="neutral",variant:y="regular",version:O,cursor:I,noBorder:f}=s,T=l;const k=b;let v=u;a[y][u]||(v="neutral"),"circle"===y&&"number"==typeof T&&T>99&&(T="99+");const w={height:"compressed"===y?12:16,width:"compressed"===y?12:16,color:o(b,v),style:{display:"block"}};return e(c,Object.assign({cursor:I,theme:k,type:u,variant:y,version:O,noBorder:f},{children:i("div",Object.assign({className:"container"},{children:[d&&e("button",Object.assign({className:"icon-leading",onClick:m,id:`${p}-wrapper`||"leading-icon-wrapper"},{children:n.createElement(d,Object.assign(Object.assign({},w),{id:p||"leading-icon"}))})),""!==T&&("ai"===u&&"light"===b?e(r,{children:T}):e(t,Object.assign({className:"text"},{children:T}))),g&&e("button",Object.assign({className:"icon-trailing",onClick:j,id:`${h}-wrapper`||"trailing-icon-wrapper"},{children:n.createElement(g,Object.assign(Object.assign({},w),{id:h||"trailing-icon"}))}))]}))}))};s.displayName="Tag";export{s as Tag};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{COLORS as r}from"../../constants/Theme.js";const n={blue:{iconColor:{light:r.content.blue,dark:r.content.primaryInverse},textColor:{light:r.content.blue,dark:r.content.primaryInverse},border:r.stroke.blue.lightAlt,backgroundColor:{light:r.background.blue.light,dark:r.content.blue,circle:r.content.blue}},purple:{iconColor:{light:r.background.inverseLight,dark:r.content.primaryInverse},textColor:{light:r.background.inverseLight,dark:r.content.primaryInverse},border:r.stroke.brandLightAlt,backgroundColor:{light:r.background.brandLight,dark:r.background.inverse,circle:r.background.inverse}},negative:{iconColor:{light:r.content.negative,dark:r.content.primaryInverse},textColor:{light:r.content.negative,dark:r.content.primaryInverse},border:r.stroke.negative.lightAlt,backgroundColor:{light:r.background.negative.light,dark:r.background.negative.vibrant,circle:r.background.negative.vibrant}},positive:{iconColor:{light:r.content.positive,dark:r.content.primaryInverse},textColor:{light:r.content.positive,dark:r.content.primaryInverse},border:r.stroke.positive.lightAlt,backgroundColor:{light:r.background.positive.light,dark:r.background.positive.vibrant,circle:r.background.positive.vibrant}},warning:{iconColor:{light:r.content.warning,dark:r.content.primary},textColor:{light:r.content.warning,dark:r.content.primary},border:r.stroke.warning.lightAlt,backgroundColor:{light:r.background.warning.light,dark:r.background.warning.vibrant,circle:r.background.warning.vibrant}},neutral:{iconColor:{light:r.content.secondary,dark:r.content.primaryInverse},textColor:{light:r.content.secondary,dark:r.content.primaryInverse},border:r.stroke.primary,backgroundColor:{light:r.surface.subdued,dark:r.background.inverse,circle:r.background.inverseLight}},white:{iconColor:{light:r.content.secondary,dark:r.content.primaryInverse},textColor:{light:r.content.secondary,dark:r.content.primaryInverse},border:r.stroke.primary,backgroundColor:{light:r.surface.standard,dark:r.background.inverse,circle:r.background.inverseLight}},grey:{iconColor:{light:r.content.secondary,dark:r.content.primaryInverse},textColor:{light:r.content.secondary,dark:r.content.primaryInverse},border:r.stroke.primary,backgroundColor:{light:r.surface.subdued,dark:r.content.secondary,circle:r.content.secondary}},ai:{iconColor:{light:r.content.primaryInverse,dark:r.content.primaryInverse},textColor:{light:r.content.primaryInverse,dark:r.content.primaryInverse},border:"none",backgroundColor:{light:r.surface.aiLight,dark:r.surface.ai,circle:r.surface.ai}}},e=(r,e)=>n[e].iconColor[r],t=(r,e)=>n[e].textColor[r],o=(r,e)=>"ai"===r&&"light"===e?"rgba(254, 186, 210, 1)":n[r].border,i=(r,e)=>n[e].backgroundColor[r],a=r=>"regular"===r||"
|
|
1
|
+
import{COLORS as r}from"../../constants/Theme.js";const n={blue:{iconColor:{light:r.content.blue,dark:r.content.primaryInverse},textColor:{light:r.content.blue,dark:r.content.primaryInverse},border:r.stroke.blue.lightAlt,backgroundColor:{light:r.background.blue.light,dark:r.content.blue,circle:r.content.blue}},purple:{iconColor:{light:r.background.inverseLight,dark:r.content.primaryInverse},textColor:{light:r.background.inverseLight,dark:r.content.primaryInverse},border:r.stroke.brandLightAlt,backgroundColor:{light:r.background.brandLight,dark:r.background.inverse,circle:r.background.inverse}},negative:{iconColor:{light:r.content.negative,dark:r.content.primaryInverse},textColor:{light:r.content.negative,dark:r.content.primaryInverse},border:r.stroke.negative.lightAlt,backgroundColor:{light:r.background.negative.light,dark:r.background.negative.vibrant,circle:r.background.negative.vibrant}},positive:{iconColor:{light:r.content.positive,dark:r.content.primaryInverse},textColor:{light:r.content.positive,dark:r.content.primaryInverse},border:r.stroke.positive.lightAlt,backgroundColor:{light:r.background.positive.light,dark:r.background.positive.vibrant,circle:r.background.positive.vibrant}},warning:{iconColor:{light:r.content.warning,dark:r.content.primary},textColor:{light:r.content.warning,dark:r.content.primary},border:r.stroke.warning.lightAlt,backgroundColor:{light:r.background.warning.light,dark:r.background.warning.vibrant,circle:r.background.warning.vibrant}},neutral:{iconColor:{light:r.content.secondary,dark:r.content.primaryInverse},textColor:{light:r.content.secondary,dark:r.content.primaryInverse},border:r.stroke.primary,backgroundColor:{light:r.surface.subdued,dark:r.background.inverse,circle:r.background.inverseLight}},white:{iconColor:{light:r.content.secondary,dark:r.content.primaryInverse},textColor:{light:r.content.secondary,dark:r.content.primaryInverse},border:r.stroke.primary,backgroundColor:{light:r.surface.standard,dark:r.background.inverse,circle:r.background.inverseLight}},grey:{iconColor:{light:r.content.secondary,dark:r.content.primaryInverse},textColor:{light:r.content.secondary,dark:r.content.primaryInverse},border:r.stroke.primary,backgroundColor:{light:r.surface.subdued,dark:r.content.secondary,circle:r.content.secondary}},ai:{iconColor:{light:r.content.primaryInverse,dark:r.content.primaryInverse},textColor:{light:r.content.primaryInverse,dark:r.content.primaryInverse},border:"none",backgroundColor:{light:r.surface.aiLight,dark:r.surface.ai,circle:r.surface.ai}}},e=(r,e)=>n[e].iconColor[r],t=(r,e)=>n[e].textColor[r],o=(r,e)=>"ai"===r&&"light"===e?"rgba(254, 186, 210, 1)":n[r].border,i=(r,e)=>n[e].backgroundColor[r],a=r=>"regular"===r||"circle"===r?"4px 8px":"2px 6px";export{o as generateBorder,i as getBackgroundColor,a as getPadding,e as getTagIconColor,t as getTextColor};
|