@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.
@@ -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 n}from"./styled.js";const c=({titleDark:c,titleLight:o,titleSystem:a,initialChecked:m,onChange:s})=>{const[d,h]=i(null!=m?m:null),k=r((t=>{h(t),null==s||s(t)}),[]);return t(n,{children:[e(l,{variant:"dark",checked:"dark"===d,title:c,onClick:k}),e(l,{variant:"light",checked:"light"===d,title:o,onClick:k}),e(l,{variant:"system",checked:"system"===d,title:a,onClick:k})]})};export{c as ThemeCards};
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 t}from"styled-components";import{adaptive as i}from"../../adaptive/index.js";const o=e.div.withConfig({displayName:"styled__ThemeCardsStyled",componentId:"sc-uz0n23-0"})(["display:flex;flex:1;width:100%;gap:34px;align-items:center;overflow:clip;",""],i({desktop:t`
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{o as ThemeCardsStyled};
3
+ `}));export{t as ThemeCardsStyled};
@@ -4,6 +4,7 @@ export interface ThemeCardProps {
4
4
  variant: ThemeCardVariantType;
5
5
  title?: string;
6
6
  checked?: boolean;
7
+ isSystemDark?: boolean;
7
8
  onClick?: (variant: ThemeCardVariantType) => unknown;
8
9
  }
9
10
  export declare const ThemeCard: React.FC<ThemeCardProps>;
@@ -1 +1 @@
1
- import{jsx as t,jsxs as e}from"react/jsx-runtime";import{useState as r,useMemo as o,useCallback as i,useEffect as s}from"react";import"../../../theme/index.js";import{ThemeCardStyled as m,ThemeCardTopbar as n,ThemeCardTopbarRadio as c,ThemeCardTopbarTitle as a,ThemeCardTopbarTitleText as d,ThemeCardImage as l}from"./styled.js";import p from"./assets/dark.svg.js";import h from"./assets/light.svg.js";import{DarkIcon as j}from"../../../icons/dark/index.js";import{LightIcon as f}from"../../../icons/light/index.js";import{SystemIcon as g}from"../../../icons/system/index.js";import"tslib";import{IconProvider as y}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 u={dark:p,light:h},w=({variant:w,title:x,checked:b=!1,onClick:v})=>{const C=k(),E="undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)"),[L,M]=r(!1),O=o((()=>Object.assign(Object.assign({},u),{system:L?p:h})),[L]),$=o((()=>O[w]),[O,w]),q=o((()=>{switch(w){case"dark":return t(j,{});case"light":return t(f,{});case"system":return t(g,{});default:return null}}),[w]),z=i((()=>{null==v||v(w)}),[]),A=i((t=>{M(t)}),[]);return s((()=>("object"==typeof E&&E.addEventListener("change",(t=>A(t.matches))),()=>{"object"==typeof E&&E.removeEventListener("change",(t=>A(t.matches)))})),[E]),e(m,{onClick:z,children:[e(n,{children:[t(c,{checked:b}),e(a,{children:[t(y,{fill:C.colors.base.white,children:q}),t(d,{children:x})]})]}),t(l,{src:$,alt:`theme-${w}`})]})};export{w as ThemeCard};
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 o}from"../../radio/index.js";import{Image as i}from"../../image/index.js";import{Typography as t}from"../../typography/index.js";const a=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)),d=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)),n=e(o).attrs({onClick:e=>e.stopPropagation()}).withConfig({displayName:"styled__ThemeCardTopbarRadio",componentId:"sc-gi8n5o-2"})([""]),r=e.div.withConfig({displayName:"styled__ThemeCardTopbarTitle",componentId:"sc-gi8n5o-3"})(["display:flex;gap:8px;align-items:center;"]),p=e(t).attrs({variant:"body-m-medium"}).withConfig({displayName:"styled__ThemeCardTopbarTitleText",componentId:"sc-gi8n5o-4"})([""]),s=e(i).withConfig({displayName:"styled__ThemeCardImage",componentId:"sc-gi8n5o-5"})(["padding-left:20px;width:440px;height:220px;object-fit:cover;object-position:0 0;"]);export{s as ThemeCardImage,a as ThemeCardStyled,d as ThemeCardTopbar,n as ThemeCardTopbarRadio,r as ThemeCardTopbarTitle,p as ThemeCardTopbarTitleText};
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};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bothub-chat/ui",
3
- "version": "2.32.3-develop-2d233bb6-e265-4b3b-9ae0-d4dcc5c78cb0",
3
+ "version": "2.32.3-develop-021ea1be-69eb-4e6c-9eee-adfe942ce9f0",
4
4
  "description": "Bothub UI Components",
5
5
  "keywords": [
6
6
  "bothub",