UNPKG

@bothub-chat/ui

Version:

Bothub UI Components

2 lines (1 loc) 3.1 kB
import{jsx as e}from"react/jsx-runtime";import{styled as o}from"styled-components";import{animated as t}from"@react-spring/web";import{CloseIcon as i}from"../../icons/close/index.js";import{InfoBigIcon as r}from"../../icons/info-big/index.js";import{Typography as n}from"../typography/index.js";import{Button as a}from"../button/index.js";const s=o(t.div).withConfig({displayName:"styled__NotificationStyled",componentId:"sc-5r3ycz-0"})(["display:flex;background:",";border:1px solid ",";border-radius:14px;overflow:hidden;box-sizing:border-box;width:100%;max-width:335px;padding:20px;flex-shrink:0;pointer-events:auto;position:relative;"],({theme:e})=>"light"===e.mode?e.default.colors.base.white:e.colors.grayScale.gray2,({theme:e,$variant:o})=>{switch(o){case"info":case"loading":return e.colors.accent.primary;case"warn":return e.colors.orange;case"error":return e.colors.critic;case"success":return e.colors.green}}),c=o.div.withConfig({displayName:"styled__NotificationContent",componentId:"sc-5r3ycz-1"})(["display:flex;width:100%;justify-content:space-between;box-sizing:border-box;align-items:",";gap:8px;"],({$text:e})=>e?"flex-start":"center"),l=o.div.withConfig({displayName:"styled__NotificationLeft",componentId:"sc-5r3ycz-2"})(["display:flex;gap:10px;align-items:",";"],({$text:e})=>e?"flex-start":"center"),d=o.div.withConfig({displayName:"styled__NotificationRight",componentId:"sc-5r3ycz-3"})(["display:flex;"]),p=o(r).withConfig({displayName:"styled__NotificationIcon",componentId:"sc-5r3ycz-4"})([""]),m=o.div.withConfig({displayName:"styled__NotificationInfo",componentId:"sc-5r3ycz-5"})(["display:flex;flex-direction:column;align-items:flex-start;"]),y=o(n).attrs({component:"h3",variant:"body-m-semibold"}).withConfig({displayName:"styled__NotificationTitle",componentId:"sc-5r3ycz-6"})(["max-width:100%;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;overflow:hidden;overflow-wrap:anywhere;"]),f=o(n).attrs({component:"p",variant:"body-m-regular"}).withConfig({displayName:"styled__NotificationText",componentId:"sc-5r3ycz-7"})(["margin-top:10px;max-width:100%;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:15;line-clamp:15;overflow:hidden;overflow-wrap:anywhere;white-space:pre-wrap;color:",";"],({theme:e})=>"light"===e.mode?e.default.colors.base.black:e.colors.grayScale.gray6),g=o(a).attrs({variant:"text",children:e(i,{})}).withConfig({displayName:"styled__NotificationCloseButton",componentId:"sc-5r3ycz-8"})([""]),w=o(t.div).withConfig({displayName:"styled__NotifyProgressBar",componentId:"sc-5r3ycz-9"})(["top:0;left:0;position:absolute;height:2px;background:",";"],({theme:e,$variant:o})=>{switch(o){case"info":case"loading":default:return e.colors.accent.primary;case"warn":return e.colors.orange;case"error":return e.colors.critic;case"success":return e.colors.green}});export{g as NotificationCloseButton,c as NotificationContent,p as NotificationIcon,m as NotificationInfo,l as NotificationLeft,d as NotificationRight,s as NotificationStyled,f as NotificationText,y as NotificationTitle,w as NotifyProgressBar};