@bothub-chat/ui
Version:
Bothub UI Components
32 lines (31 loc) • 2.86 kB
JavaScript
import{jsx as t}from"react/jsx-runtime";import{styled as r,css as o}from"styled-components";import{Button as e}from"../../button/index.js";import{TrashIcon as a}from"../../../icons/trash/index.js";import{adaptive as i}from"../../../adaptive/index.js";import{AddGroupIcon as s}from"../../../icons/add-group/index.js";import{ManageChatIcon as l}from"../../../icons/manage-chat/index.js";import{SearchSimpleIcon as c}from"../../../icons/search-simple/index.js";import"react";import"unified";import"remark-parse";import"remark-gfm";import"mdast-util-to-markdown";import{isBright as n}from"../../../utils/colors/isBright.js";import"../../../utils/colors/calculateGrayScale.js";import"../../../utils/colors/calculateAccentColors.js";const d=r.div.withConfig({displayName:"styled__SidebarButtonsStyled",componentId:"sc-xl3vf8-0"})(["display:flex;flex-direction:row;transition:all 0.3s;width:100%;gap:12px;",""],(({$open:t})=>!t&&i({variant:"dashboard",merge:!0,desktop:o`
flex-direction: column;
`,tablet:o`
flex-direction: row;
`}))),m=r(e).attrs({fullWidth:!0,startIcon:t(a,{})}).withConfig({displayName:"styled__SidebarDeleteButton",componentId:"sc-xl3vf8-1"})([""]),p=r(e).attrs({children:t(s,{})}).withConfig({displayName:"styled__SidebarAddGroupButton",componentId:"sc-xl3vf8-2"})(["",""],(({variant:t,theme:r})=>{if("secondary"!==t)return o``;const e=o`
svg path {
stroke: ${r.bright&&"light"===r.mode?r.default.colors.base.black:r.colors.accent.primary};
}
`;return"custom"===r.scheme?o`
background-color: ${r.bright?r.default.colors.base.white:r.colors.grayScale.gray4};
${e}
`:o`
background-color: ${n(r.colors.grayScale.gray4)||"light"===r.mode?r.default.colors.base.white:r.default.colors.grayScale.gray3};
${e}
`})),f=r(e).attrs({children:t(l,{})}).withConfig({displayName:"styled__SidebarEditButton",componentId:"sc-xl3vf8-3"})(["",""],(({variant:t,theme:r})=>{switch(t){case"secondary":return o`
svg path {
stroke: ${r.colors.grayScale.gray1};
}
`;case"primary":return o`
svg path {
stroke: ${r.default.colors.base.white};
}
`}})),h=r(e).attrs({children:t(c,{size:16})}).withConfig({displayName:"styled__SidebarSearchButton",componentId:"sc-xl3vf8-4"})(["",""],(({variant:t,theme:r})=>{switch(t){case"secondary":return o`
svg path {
fill: ${r.colors.grayScale.gray1};
}
`;case"primary":return o`
svg path {
fill: ${r.default.colors.base.white};
}
`}})),u=r(e).withConfig({displayName:"styled__SidebarSortButton",componentId:"sc-xl3vf8-5"})([""]);export{p as SidebarAddGroupButton,d as SidebarButtonsStyled,m as SidebarDeleteButton,f as SidebarEditButton,h as SidebarSearchButton,u as SidebarSortButton};