UNPKG

@bothub-chat/ui

Version:

Bothub UI Components

13 lines (12 loc) 3.36 kB
import{jsx as e}from"react/jsx-runtime";import{keyframes as o,styled as r,css as t}from"styled-components";import{Button as i}from"../../button/index.js";import{CloseIcon as n}from"../../../icons/close/index.js";import{SelectorIcon as a}from"../../../icons/selector/index.js";import{TextField as l}from"../../text-field/index.js";import"react";import"unified";import"remark-parse";import"remark-gfm";import"mdast-util-to-markdown";import{isBright as s}from"../../../utils/colors/isBright.js";import"../../../utils/colors/calculateGrayScale.js";import"../../../utils/colors/calculateAccentColors.js";const d=o` from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0) } `,c=r.div.withConfig({displayName:"styled__ColorPickerMenuStyled",componentId:"sc-i2jmrq-0"})(["display:flex;flex-direction:column;gap:6px;width:256px;background-color:",";border:1px solid ",";padding:8px;border-radius:10px;position:absolute;bottom:40px;left:",";animation:"," 0.1s ease-out;z-index:",";user-select:none;-moz-user-select:none;-webkit-user-drag:none;"],(({theme:e})=>e.colors.grayScale.gray4),(({theme:e})=>e.colors.grayScale.gray3),(({$centeredX:e})=>e?"0":t`calc(100% + 8px)`),d,(({theme:e})=>e.zIndex.menu)),m=r.div.withConfig({displayName:"styled__ColorPickerMenuHeader",componentId:"sc-i2jmrq-1"})(["display:flex;justify-content:space-between;align-items:center;"]),p=r(l).attrs({variant:"secondary"}).withConfig({displayName:"styled__ColorPickerMenuHeaderHexCodeInput",componentId:"sc-i2jmrq-2"})(["width:81px;height:28px;padding-block:4px;border-radius:8px;border:1px solid ",";background-color:",";label{background:none;input{text-align:center;font-weight:600;","}}"],(({theme:e})=>e.colors.grayScale.gray2),(({theme:e})=>e.colors.grayScale.gray4),(({theme:e})=>s(e.colors.grayScale.gray4)&&t` color: ${e.default.colors.base.black}; `)),f=r.div.withConfig({displayName:"styled__ColorPickerMenuHeaderLeft",componentId:"sc-i2jmrq-3"})(["display:flex;align-items:center;gap:10px;"]),u=r.div.withConfig({displayName:"styled__ColorPickerMenuPreview",componentId:"sc-i2jmrq-4"})(["width:20px;height:20px;border-radius:4px;border:1px solid ",";"],(({theme:e})=>e.colors.grayScale.gray2)),g=r(i).attrs({children:e(n,{}),variant:"text"}).withConfig({displayName:"styled__ColorPickerMenuCloseButton",componentId:"sc-i2jmrq-5"})([""]),y=r.div.withConfig({displayName:"styled__ColorPickerMenuArea",componentId:"sc-i2jmrq-6"})(["position:relative;width:100%;height:240px;cursor:pointer;background-blend-mode:multiply;"]),x=r.div.withConfig({displayName:"styled__ColorPickerMenuHueSlider",componentId:"sc-i2jmrq-7"})(["position:relative;height:16px;width:100%;border-radius:10px;cursor:pointer;background:linear-gradient( to right,#ff0000,#ff9000,#fbff00,#09ff00,#00ffea,#2f00ff,#ff00f6,#ff0004 );"]),h=r.div.attrs({children:e(a,{})}).withConfig({displayName:"styled__ColorPickerMenuSelector",componentId:"sc-i2jmrq-8"})(["display:flex;justify-content:center;align-items:center;position:absolute;transform:translate(-50%,-50%);"]);export{y as ColorPickerMenuArea,g as ColorPickerMenuCloseButton,m as ColorPickerMenuHeader,p as ColorPickerMenuHeaderHexCodeInput,f as ColorPickerMenuHeaderLeft,x as ColorPickerMenuHueSlider,u as ColorPickerMenuPreview,h as ColorPickerMenuSelector,c as ColorPickerMenuStyled};