@bothub-chat/ui 2.32.3-develop-2d233bb6-e265-4b3b-9ae0-d4dcc5c78cb0 → 2.32.3-develop-021ea1be-69eb-4e6c-9eee-adfe942ce9f0
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/components/theme-cards/index.d.ts +1 -0
- package/dist/components/theme-cards/index.js +1 -1
- package/dist/components/theme-cards/styled.js +2 -6
- package/dist/components/theme-cards/theme-card/index.d.ts +1 -0
- package/dist/components/theme-cards/theme-card/index.js +1 -1
- package/dist/components/theme-cards/theme-card/styled.js +5 -1
- package/package.json +1 -1
|
@@ -5,6 +5,7 @@ export interface ThemeCardsProps {
|
|
|
5
5
|
titleLight?: string;
|
|
6
6
|
titleSystem?: string;
|
|
7
7
|
initialChecked?: ThemeCardVariantType;
|
|
8
|
+
isSystemDark?: boolean;
|
|
8
9
|
onChange?: (value: ThemeCardVariantType) => unknown;
|
|
9
10
|
}
|
|
10
11
|
export declare const ThemeCards: React.FC<ThemeCardsProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as t,jsx as e}from"react/jsx-runtime";import{useState as i,useCallback as r}from"react";import{ThemeCard as l}from"./theme-card/index.js";import{ThemeCardsStyled as
|
|
1
|
+
import{jsxs as t,jsx as e}from"react/jsx-runtime";import{useState as i,useCallback as r}from"react";import{ThemeCard as l}from"./theme-card/index.js";import{ThemeCardsStyled as s}from"./styled.js";const a=({titleDark:a,titleLight:n,titleSystem:m,initialChecked:c,isSystemDark:o,onChange:k})=>{const[d,h]=i(null!=c?c:null),y=r((t=>{h(t),null==k||k(t)}),[]);return t(s,{children:[e(l,{variant:"dark",checked:"dark"===d,title:a,isSystemDark:o,onClick:y}),e(l,{variant:"light",checked:"light"===d,title:n,isSystemDark:o,onClick:y}),e(l,{variant:"system",checked:"system"===d,title:m,isSystemDark:o,onClick:y})]})};export{a as ThemeCards};
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import{styled as e,css as
|
|
2
|
-
max-height: 300px;
|
|
3
|
-
`,tablet:t`
|
|
4
|
-
max-height: 250px;
|
|
5
|
-
`,mobile:t`
|
|
1
|
+
import{styled as e,css as i}from"styled-components";import{adaptive as o}from"../../adaptive/index.js";const t=e.div.withConfig({displayName:"styled__ThemeCardsStyled",componentId:"sc-uz0n23-0"})(["display:flex;flex:1;width:100%;gap:34px;align-items:center;overflow:clip;",""],o({mobile:i`
|
|
6
2
|
flex-direction: column;
|
|
7
|
-
`}));export{
|
|
3
|
+
`}));export{t as ThemeCardsStyled};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t,jsxs as
|
|
1
|
+
import{jsx as t,jsxs as r}from"react/jsx-runtime";import{useMemo as o,useCallback as s}from"react";import"../../../theme/index.js";import{ThemeCardStyled as e,ThemeCardTopbar as i,ThemeCardTopbarRadio as m,ThemeCardTopbarTitle as c,ThemeCardTopbarTitleText as n,ThemeCardImage as l}from"./styled.js";import p from"./assets/dark.svg.js";import a from"./assets/light.svg.js";import{DarkIcon as d}from"../../../icons/dark/index.js";import{LightIcon as h}from"../../../icons/light/index.js";import{SystemIcon as j}from"../../../icons/system/index.js";import"tslib";import{IconProvider as f}from"../../icon/context.js";import"../../icon/styled.js";import"@react-spring/web";import"react-dom";import"../../portal/styled.js";import"../../tooltip/styled.js";import"../../tooltip/arrow/styled.js";import"../../tooltip/context.js";import{useTheme as k}from"../../../theme/hook.js";const g={dark:p,light:a},u=({variant:u,title:y,checked:x=!1,isSystemDark:b,onClick:w})=>{const v=k(),C=o((()=>Object.assign(Object.assign({},g),{system:b?p:a})),[b]),O=o((()=>C[u]),[C,u]),D=o((()=>{switch(u){case"dark":return t(d,{});case"light":return t(h,{});case"system":return t(j,{});default:return null}}),[u]),S=s((()=>{null==w||w(u)}),[]);return r(e,{onClick:S,children:[r(i,{children:[t(m,{checked:x}),r(c,{children:[t(f,{fill:v.colors.base.white,children:D}),t(n,{children:y})]})]}),t(l,{src:O,alt:`theme-${u}`})]})};export{u as ThemeCard};
|
|
@@ -1 +1,5 @@
|
|
|
1
|
-
import{styled as e}from"styled-components";import{Radio as
|
|
1
|
+
import{styled as e,css as o}from"styled-components";import{Radio as i}from"../../radio/index.js";import{Image as t}from"../../image/index.js";import{Typography as a}from"../../typography/index.js";import{adaptive as d}from"../../../adaptive/index.js";const n=e.button.withConfig({displayName:"styled__ThemeCardStyled",componentId:"sc-gi8n5o-0"})(["all:unset;display:flex;flex-direction:column;max-width:100%;overflow:hidden;border-radius:20px;gap:20px;background-color:",";&:hover{cursor:pointer;}user-select:none;-webkit-user-drag:none;-webkit-user-select:none;"],(({theme:e})=>e.colors.grayScale.gray3)),r=e.div.withConfig({displayName:"styled__ThemeCardTopbar",componentId:"sc-gi8n5o-1"})(["display:flex;gap:20px;padding:20px;border-bottom:1px solid ",";"],(({theme:e})=>e.colors.grayScale.gray2)),p=e(i).attrs({onClick:e=>e.stopPropagation()}).withConfig({displayName:"styled__ThemeCardTopbarRadio",componentId:"sc-gi8n5o-2"})([""]),s=e.div.withConfig({displayName:"styled__ThemeCardTopbarTitle",componentId:"sc-gi8n5o-3"})(["display:flex;gap:8px;align-items:center;"]),m=e(a).attrs({variant:"body-m-medium"}).withConfig({displayName:"styled__ThemeCardTopbarTitleText",componentId:"sc-gi8n5o-4"})([""]),l=e(t).withConfig({displayName:"styled__ThemeCardImage",componentId:"sc-gi8n5o-5"})(["padding-left:20px;width:440px;height:220px;object-fit:cover;object-position:0 0;",""],d({tablet:o`
|
|
2
|
+
height: 180px;
|
|
3
|
+
`,mobile:o`
|
|
4
|
+
height: 140px;
|
|
5
|
+
`}));export{l as ThemeCardImage,n as ThemeCardStyled,r as ThemeCardTopbar,p as ThemeCardTopbarRadio,s as ThemeCardTopbarTitle,m as ThemeCardTopbarTitleText};
|