@bothub-chat/ui 2.52.0 → 2.52.1-develop-dd2d774f-6799-446f-8a07-fb14e9a5f198

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/README.md CHANGED
@@ -1,24 +1,24 @@
1
- <p align="center">
2
- <img src="https://bothub.chat/icon-144x144.png" />
3
- </p>
4
- <h1 align="center">Bothub Chat</h1>
5
- <p align="center">UI Components from Bothub.</p>
6
- <p align="center">
7
- <a href="https://bothub-docs.vercel.app/">Documentation</a>
8
- </p>
9
-
10
- <h2>Installing</h2>
11
- <p>Preliminary requirements:</p>
12
- <ul>
13
- <li><a href="https://nodejs.org/">Node.js</a> >= <code>18.12.1</code></li>
14
- <li><a href="https://www.npmjs.com/">npm</a> >= <code>9.1.2</code></li>
15
- <li><a href="https://yarnpkg.com/">yarn</a> >= <code>1.22.19</code></li>
16
- </ul>
17
- <p>Installing peer dependencies:</p>
18
- <pre>yarn add framer-motion@10.16.3 react@18.2.0 react-dom@18.2.0 styled-components@6.0.7 react-helmet@6.1.0 normalize.css@8.0.1 react-slider@2.0.6 react-markdown@8.0.5 highlight.js@11.9.0 react-highlight@0.15.0</pre>
19
- <p>Installing package:</p>
20
- <pre>yarn add @bothub-chat/ui</pre>
21
-
22
-
23
- <h2>License</h2>
1
+ <p align="center">
2
+ <img src="https://bothub.chat/icon-144x144.png" />
3
+ </p>
4
+ <h1 align="center">Bothub Chat</h1>
5
+ <p align="center">UI Components from Bothub.</p>
6
+ <p align="center">
7
+ <a href="https://bothub-docs.vercel.app/">Documentation</a>
8
+ </p>
9
+
10
+ <h2>Installing</h2>
11
+ <p>Preliminary requirements:</p>
12
+ <ul>
13
+ <li><a href="https://nodejs.org/">Node.js</a> >= <code>18.12.1</code></li>
14
+ <li><a href="https://www.npmjs.com/">npm</a> >= <code>9.1.2</code></li>
15
+ <li><a href="https://yarnpkg.com/">yarn</a> >= <code>1.22.19</code></li>
16
+ </ul>
17
+ <p>Installing peer dependencies:</p>
18
+ <pre>yarn add framer-motion@10.16.3 react@18.2.0 react-dom@18.2.0 styled-components@6.0.7 react-helmet@6.1.0 normalize.css@8.0.1 react-slider@2.0.6 react-markdown@8.0.5 highlight.js@11.9.0 react-highlight@0.15.0</pre>
19
+ <p>Installing package:</p>
20
+ <pre>yarn add @bothub-chat/ui</pre>
21
+
22
+
23
+ <h2>License</h2>
24
24
  <p><a href="https://github.com/matbea-dev/bothub/blob/main/LICENSE">MIT</a></p>
@@ -1 +1 @@
1
- import{__rest as e}from"tslib";import{jsx as l,jsxs as t,Fragment as a}from"react/jsx-runtime";import{useCallback as r,useState as o,useMemo as i}from"react";import{SelectFieldLabel as n,SelectFieldStyled as d,SelectFieldInput as s,SelectFieldSkeleton as c,SelectFieldInputLeftSide as u,SelectFieldSearchSimpleIcon as p,SelectFieldSearchIcon as h,SelectFieldInputNative as m,SelectFieldPlaceholder as b,SelectFieldInputSide as S,SelectFieldClearButton as f,SelectFieldLoader as C,SelectFieldArrow as y,SelectFieldErrorText as g}from"./styled.js";export{SelectFieldColorValueText,SelectFieldValue,SelectFieldValueColor,SelectFieldValueList,SelectFieldValueListItem,SelectFieldValueText,SelectFieldValues}from"./styled.js";import{Skeleton as k}from"../skeleton/index.js";import{SelectModal as $}from"./select-modal/index.js";import{SelectFieldInputValue as v}from"./nodes/value/index.js";import{SelectFieldProvider as x}from"./context.js";export{SelectFieldConsumer,SelectFieldContext,useSelectFieldContext}from"./context.js";import{useSelectField as V}from"./useSelectField.js";const F=F=>{var{className:W,label:j,placeholder:P,data:I,fullWidth:O=!1,contentWidth:T,error:A,skeleton:L=!1,blur:z=!1,size:G="small",disableSelect:M=!1,disableScrollbar:N=!1,empty:R,after:w,loading:B=!1,searchSampleIcon:D=!1,enableInput:q=!1,inputType:E="text",inputValue:H,clearable:J=!1,disablePortal:K,tabs:Q,search:U,searchPlaceholder:X,resetStyleState:Y,children:Z,modalWidth:_,dataTest:ee,selectedColor:le,compactWidth:te,modalStyles:ae,openedModel:re,onSearch:oe,onOptionClick:ie,onGroupCheckboxClick:ne,onInputChange:de,onPointerLeave:se}=F,ce=e(F,["className","label","placeholder","data","fullWidth","contentWidth","error","skeleton","blur","size","disableSelect","disableScrollbar","empty","after","loading","searchSampleIcon","enableInput","inputType","inputValue","clearable","disablePortal","tabs","search","searchPlaceholder","resetStyleState","children","modalWidth","dataTest","selectedColor","compactWidth","modalStyles","openedModel","onSearch","onOptionClick","onGroupCheckboxClick","onInputChange","onPointerLeave"]);const ue=V(ce),{isOpen:pe,triggerRef:he,value:me,disabled:be,multiple:Se,handleClose:fe,handleInputClick:Ce,setValue:ye}=ue,ge=e(ue,["isOpen","triggerRef","value","disabled","multiple","handleClose","handleInputClick","setValue"]),ke=r(e=>{null==de||de(e)},[de]),[$e,ve]=void 0===H?o(""):[H,ke],[xe,Ve]=o(!1),Fe=i(()=>q&&"search"===E,[q,E]),We=i(()=>Se&&Array.isArray(me)&&me.length>0,[Se,me]),je=i(()=>L?l(n,{children:l(k,{width:100})}):"string"==typeof j?l(n,{children:j}):j,[L,j]),Pe=r((e,l)=>{if(l.stopPropagation(),Array.isArray(me)){if("string"==typeof e)return void ye(me.filter(l=>"string"==typeof l?l!==e:l.value!==e));ye(me.filter(l=>"string"==typeof l?l!==e.value:l.value!==e.value))}fe()},[me]),Ie=r(e=>{ve(e.currentTarget.value)},[ve]),Oe=r(()=>{ye(null),ve("")},[ye,ve]);return l(x,{selectRef:he,handleSelectClick:Ce.bind(null,!1),children:t(d,{$fullWidth:O,$disabled:be,className:W,onPointerLeave:se,children:[je,null!=Z?Z:l(a,{children:L?l(s,{$open:!1,$error:!1,$disabled:!1,$skeleton:!0,$loading:!1,$blur:z,$multiple:!1,ref:he,children:l(c,{})}):t(s,{$open:pe,$error:!!A,$disabled:be,$skeleton:!1,$blur:z,$loading:B,$multiple:We,ref:he,onClick:Ce.bind(null,!1),"data-test":ee,children:[t(u,{children:[(!me||Array.isArray(me)&&0===me.length)&&t(a,{children:[Fe&&l(D?p:h,{$focus:xe}),q?l(m,{type:E,value:$e,placeholder:P,disabled:be,onClick:Ce.bind(null,!0),onChange:Ie,onFocus:Ve.bind(null,!0),onBlur:Ve.bind(null,!1)}):l(b,{$open:pe,children:P})]}),l(v,{value:me,handleValueDelete:Pe})]}),t(S,{children:[(me&&(J||q)||Fe&&!B&&$e)&&l(f,{onClick:Oe}),B&&l(C,{}),l(y,{$isOpen:pe})]})]})}),l($,Object.assign({},ge,{isOpen:pe,data:I,contentWidth:T,size:G,disableSelect:M,disableScrollbar:N,empty:R,after:w,tabs:Q,search:U,searchPlaceholder:X,resetStyleState:Y,blur:z,disablePortal:K,value:me,multiple:Se,onSearch:oe,onOptionClick:ie,onGroupCheckboxClick:ne,handleClose:fe,setValue:ye,modalWidth:_,selectedColor:le,compactWidth:te,modalStyles:ae,openedModel:re})),A&&l(g,{children:A})]})})};export{F as SelectField,y as SelectFieldArrow,f as SelectFieldClearButton,g as SelectFieldErrorText,s as SelectFieldInput,u as SelectFieldInputLeftSide,m as SelectFieldInputNative,S as SelectFieldInputSide,n as SelectFieldLabel,C as SelectFieldLoader,b as SelectFieldPlaceholder,x as SelectFieldProvider,h as SelectFieldSearchIcon,p as SelectFieldSearchSimpleIcon,c as SelectFieldSkeleton,d as SelectFieldStyled,$ as SelectModal,V as useSelectField};
1
+ import{__rest as e}from"tslib";import{jsx as l,jsxs as t,Fragment as a}from"react/jsx-runtime";import{useCallback as r,useState as o,useMemo as i}from"react";import{SelectFieldLabel as n,SelectFieldStyled as d,SelectFieldInput as s,SelectFieldSkeleton as c,SelectFieldInputLeftSide as u,SelectFieldSearchSimpleIcon as p,SelectFieldSearchIcon as h,SelectFieldInputNative as m,SelectFieldPlaceholder as b,SelectFieldInputSide as S,SelectFieldClearButton as f,SelectFieldLoader as C,SelectFieldArrow as y,SelectFieldErrorText as g}from"./styled.js";export{SelectFieldColorValueText,SelectFieldValue,SelectFieldValueColor,SelectFieldValueList,SelectFieldValueListItem,SelectFieldValueText,SelectFieldValues}from"./styled.js";import{Skeleton as k}from"../skeleton/index.js";import{SelectModal as $}from"./select-modal/index.js";import{SelectFieldInputValue as v}from"./nodes/value/index.js";import{SelectFieldProvider as x}from"./context.js";export{SelectFieldConsumer,SelectFieldContext,useSelectFieldContext}from"./context.js";import{useSelectField as V}from"./useSelectField.js";const F=F=>{var{className:W,label:j,placeholder:P,data:I,fullWidth:O=!1,contentWidth:T,error:A,skeleton:L=!1,blur:z=!1,size:G="small",disableSelect:M=!1,disableScrollbar:N=!1,empty:R,after:w,loading:B=!1,searchSampleIcon:D=!1,enableInput:q=!1,inputType:E="text",inputValue:H,clearable:J=!1,disablePortal:K,tabs:Q,search:U,searchPlaceholder:X,resetStyleState:Y,children:Z,modalWidth:_,dataTest:ee,selectedColor:le,compactWidth:te,modalStyles:ae,openedModel:re,onSearch:oe,onOptionClick:ie,onGroupCheckboxClick:ne,onInputChange:de,onPointerLeave:se}=F,ce=e(F,["className","label","placeholder","data","fullWidth","contentWidth","error","skeleton","blur","size","disableSelect","disableScrollbar","empty","after","loading","searchSampleIcon","enableInput","inputType","inputValue","clearable","disablePortal","tabs","search","searchPlaceholder","resetStyleState","children","modalWidth","dataTest","selectedColor","compactWidth","modalStyles","openedModel","onSearch","onOptionClick","onGroupCheckboxClick","onInputChange","onPointerLeave"]);const ue=V(ce),{isOpen:pe,triggerRef:he,value:me,disabled:be,multiple:Se,handleClose:fe,handleInputClick:Ce,setValue:ye}=ue,ge=e(ue,["isOpen","triggerRef","value","disabled","multiple","handleClose","handleInputClick","setValue"]),ke=r(e=>{null==de||de(e)},[de]),[$e,ve]=void 0===H?o(""):[H,ke],[xe,Ve]=o(!1),Fe=i(()=>q&&"search"===E,[q,E]),We=i(()=>Se&&Array.isArray(me)&&me.length>0,[Se,me]),je=i(()=>L&&null!=j?l(n,{children:l(k,{width:100})}):"string"==typeof j?l(n,{children:j}):j,[L,j]),Pe=r((e,l)=>{if(l.stopPropagation(),Array.isArray(me)){if("string"==typeof e)return void ye(me.filter(l=>"string"==typeof l?l!==e:l.value!==e));ye(me.filter(l=>"string"==typeof l?l!==e.value:l.value!==e.value))}fe()},[me]),Ie=r(e=>{ve(e.currentTarget.value)},[ve]),Oe=r(()=>{ye(null),ve("")},[ye,ve]);return l(x,{selectRef:he,handleSelectClick:Ce.bind(null,!1),children:t(d,{$fullWidth:O,$disabled:be,className:W,onPointerLeave:se,children:[je,null!=Z?Z:l(a,{children:L?l(s,{$open:!1,$error:!1,$disabled:!1,$skeleton:!0,$loading:!1,$blur:z,$multiple:!1,ref:he,children:l(c,{})}):t(s,{$open:pe,$error:!!A,$disabled:be,$skeleton:!1,$blur:z,$loading:B,$multiple:We,ref:he,onClick:Ce.bind(null,!1),"data-test":ee,children:[t(u,{children:[(!me||Array.isArray(me)&&0===me.length)&&t(a,{children:[Fe&&l(D?p:h,{$focus:xe}),q?l(m,{type:E,value:$e,placeholder:P,disabled:be,onClick:Ce.bind(null,!0),onChange:Ie,onFocus:Ve.bind(null,!0),onBlur:Ve.bind(null,!1)}):l(b,{$open:pe,children:P})]}),l(v,{value:me,handleValueDelete:Pe})]}),t(S,{children:[(me&&(J||q)||Fe&&!B&&$e)&&l(f,{onClick:Oe}),B&&l(C,{}),l(y,{$isOpen:pe})]})]})}),l($,Object.assign({},ge,{isOpen:pe,data:I,contentWidth:T,size:G,disableSelect:M,disableScrollbar:N,empty:R,after:w,tabs:Q,search:U,searchPlaceholder:X,resetStyleState:Y,blur:z,disablePortal:K,value:me,multiple:Se,onSearch:oe,onOptionClick:ie,onGroupCheckboxClick:ne,handleClose:fe,setValue:ye,modalWidth:_,selectedColor:le,compactWidth:te,modalStyles:ae,openedModel:re})),A&&l(g,{children:A})]})})};export{F as SelectField,y as SelectFieldArrow,f as SelectFieldClearButton,g as SelectFieldErrorText,s as SelectFieldInput,u as SelectFieldInputLeftSide,m as SelectFieldInputNative,S as SelectFieldInputSide,n as SelectFieldLabel,C as SelectFieldLoader,b as SelectFieldPlaceholder,x as SelectFieldProvider,h as SelectFieldSearchIcon,p as SelectFieldSearchSimpleIcon,c as SelectFieldSkeleton,d as SelectFieldStyled,$ as SelectModal,V as useSelectField};
package/package.json CHANGED
@@ -1,72 +1,72 @@
1
- {
2
- "name": "@bothub-chat/ui",
3
- "version": "2.52.0",
4
- "description": "Bothub UI Components",
5
- "keywords": [
6
- "bot",
7
- "chat",
8
- "chatgpt",
9
- "ai",
10
- "react"
11
- ],
12
- "repository": {
13
- "url": "https://github.com/bothubchat/bothub.git",
14
- "type": "git",
15
- "directory": "./packages/ui"
16
- },
17
- "publishConfig": {
18
- "access": "public",
19
- "registry": "https://registry.npmjs.org/"
20
- },
21
- "author": "dev2alert <atmpotn@yandex.ru>",
22
- "license": "MIT",
23
- "homepage": "https://bothub.chat",
24
- "files": [
25
- "./dist",
26
- "./fonts"
27
- ],
28
- "type": "module",
29
- "main": "./dist/index.js",
30
- "module": "./dist/index.js",
31
- "types": "./dist/index.d.ts",
32
- "exports": {
33
- ".": {
34
- "types": "./dist/index.d.ts",
35
- "import": "./dist/index.js",
36
- "default": "./dist/index.js"
37
- },
38
- "./components/*": "./dist/components/*",
39
- "./fonts/*": "./fonts/*",
40
- "./utils/*": "./dist/utils/*"
41
- },
42
- "sideEffects": false,
43
- "resolutions": {
44
- "react-helmet/react": "^19.0.0"
45
- },
46
- "peerDependencies": {
47
- "@uidotdev/usehooks": "^2.4.1",
48
- "react": "19.1.1",
49
- "react-dom": "19.1.1",
50
- "react-helmet": ">=2",
51
- "styled-components": "^6.0.7"
52
- },
53
- "dependencies": {
54
- "@dnd-kit/core": "^6.1.0",
55
- "@floating-ui/react": "^0.26.16",
56
- "@floating-ui/react-dom": "^2.1.0",
57
- "@react-spring/web": "^10",
58
- "date-fns": "^3.6.0",
59
- "dompurify": "^3.2.6",
60
- "highlight.js": "^11.11.0",
61
- "katex": "^0.16.10",
62
- "marked": "^16.2.1",
63
- "normalize.css": "^8.0.1",
64
- "rc-slider": "^11.1.8",
65
- "react-markdown": "^10.0.0",
66
- "rehype-katex": "^7.0.0",
67
- "remark-gfm": "^4.0.1",
68
- "remark-math": "^6.0.0",
69
- "tslib": "^2.6.2",
70
- "unist-util-visit": "^5.0.0"
71
- }
72
- }
1
+ {
2
+ "name": "@bothub-chat/ui",
3
+ "version": "2.52.1-develop-dd2d774f-6799-446f-8a07-fb14e9a5f198",
4
+ "description": "Bothub UI Components",
5
+ "keywords": [
6
+ "bot",
7
+ "chat",
8
+ "chatgpt",
9
+ "ai",
10
+ "react"
11
+ ],
12
+ "repository": {
13
+ "url": "https://github.com/bothubchat/bothub.git",
14
+ "type": "git",
15
+ "directory": "./packages/ui"
16
+ },
17
+ "publishConfig": {
18
+ "access": "public",
19
+ "registry": "https://registry.npmjs.org/"
20
+ },
21
+ "author": "dev2alert <atmpotn@yandex.ru>",
22
+ "license": "MIT",
23
+ "homepage": "https://bothub.chat",
24
+ "files": [
25
+ "./dist",
26
+ "./fonts"
27
+ ],
28
+ "type": "module",
29
+ "main": "./dist/index.js",
30
+ "module": "./dist/index.js",
31
+ "types": "./dist/index.d.ts",
32
+ "exports": {
33
+ ".": {
34
+ "types": "./dist/index.d.ts",
35
+ "import": "./dist/index.js",
36
+ "default": "./dist/index.js"
37
+ },
38
+ "./components/*": "./dist/components/*",
39
+ "./fonts/*": "./fonts/*",
40
+ "./utils/*": "./dist/utils/*"
41
+ },
42
+ "sideEffects": false,
43
+ "resolutions": {
44
+ "react-helmet/react": "^19.0.0"
45
+ },
46
+ "peerDependencies": {
47
+ "@uidotdev/usehooks": "^2.4.1",
48
+ "react": "19.1.1",
49
+ "react-dom": "19.1.1",
50
+ "react-helmet": ">=2",
51
+ "styled-components": "^6.0.7"
52
+ },
53
+ "dependencies": {
54
+ "@dnd-kit/core": "^6.1.0",
55
+ "@floating-ui/react": "^0.26.16",
56
+ "@floating-ui/react-dom": "^2.1.0",
57
+ "@react-spring/web": "^10",
58
+ "date-fns": "^3.6.0",
59
+ "dompurify": "^3.2.6",
60
+ "highlight.js": "^11.11.0",
61
+ "katex": "^0.16.10",
62
+ "marked": "^16.2.1",
63
+ "normalize.css": "^8.0.1",
64
+ "rc-slider": "^11.1.8",
65
+ "react-markdown": "^10.0.0",
66
+ "rehype-katex": "^7.0.0",
67
+ "remark-gfm": "^4.0.1",
68
+ "remark-math": "^6.0.0",
69
+ "tslib": "^2.6.2",
70
+ "unist-util-visit": "^5.0.0"
71
+ }
72
+ }