@bikdotai/bik-component-library 0.0.788-beta.4 → 0.0.788-beta.5
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/cjs/editor/BikEditor.styles.js +1 -1
- package/dist/cjs/editor/extensions/editorDropdown.styles.js +15 -18
- package/dist/cjs/editor/extensions/mention/MentionDropdown.js +1 -1
- package/dist/cjs/editor/extensions/slashCommand/SlashCommandMenu.js +1 -1
- package/dist/esm/editor/BikEditor.styles.js +1 -1
- package/dist/esm/editor/extensions/editorDropdown.styles.js +11 -14
- package/dist/esm/editor/extensions/mention/MentionDropdown.js +1 -1
- package/dist/esm/editor/extensions/slashCommand/SlashCommandMenu.js +1 -1
- package/package.json +1 -1
|
@@ -1,27 +1,24 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("styled-components"),
|
|
2
|
-
background: ${
|
|
3
|
-
border: 1px solid ${
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("styled-components"),t=require("../../constants/Theme.js");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=r(e);const n=o.default.div`
|
|
2
|
+
background: ${t.COLORS.surface.standard};
|
|
3
|
+
border: 1px solid ${t.COLORS.stroke.primary};
|
|
4
4
|
border-radius: 8px;
|
|
5
5
|
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
|
|
6
6
|
padding: 4px;
|
|
7
|
-
min-width:
|
|
7
|
+
min-width: 330px;
|
|
8
8
|
max-height: 260px;
|
|
9
9
|
overflow-y: auto;
|
|
10
10
|
font-size: 14px;
|
|
11
|
-
color: ${
|
|
11
|
+
color: ${t.COLORS.content.primary};
|
|
12
12
|
`,a=o.default.div`
|
|
13
13
|
display: flex;
|
|
14
14
|
align-items: center;
|
|
15
15
|
gap: 8px;
|
|
16
|
-
padding:
|
|
16
|
+
padding: 12px 16px;
|
|
17
|
+
min-height: 43px;
|
|
17
18
|
border-radius: 6px;
|
|
18
19
|
cursor: pointer;
|
|
19
|
-
color: ${
|
|
20
|
-
background: ${e=>{let{$isActive:
|
|
21
|
-
|
|
22
|
-
&:hover {
|
|
23
|
-
background: ${r.COLORS.surface.hovered};
|
|
24
|
-
}
|
|
20
|
+
color: ${t.COLORS.content.primary};
|
|
21
|
+
background: ${e=>{let{$isActive:r}=e;return r?t.COLORS.surface.hovered:"transparent"}};
|
|
25
22
|
`,i=o.default.img`
|
|
26
23
|
width: 24px;
|
|
27
24
|
height: 24px;
|
|
@@ -30,19 +27,19 @@
|
|
|
30
27
|
flex-shrink: 0;
|
|
31
28
|
`,p=o.default.span`
|
|
32
29
|
font-weight: 500;
|
|
33
|
-
color: ${
|
|
30
|
+
color: ${t.COLORS.content.primary};
|
|
34
31
|
`,s=o.default.span`
|
|
35
32
|
width: 8px;
|
|
36
33
|
height: 8px;
|
|
37
34
|
border-radius: 50%;
|
|
38
|
-
background: ${e=>{let{$online:
|
|
35
|
+
background: ${e=>{let{$online:r}=e;return r?t.COLORS.content.positive:t.COLORS.content.placeholder}};
|
|
39
36
|
margin-left: auto;
|
|
40
37
|
flex-shrink: 0;
|
|
41
38
|
`,d=o.default.span`
|
|
42
39
|
font-weight: 500;
|
|
43
|
-
color: ${
|
|
44
|
-
`,
|
|
40
|
+
color: ${t.COLORS.content.primary};
|
|
41
|
+
`,l=o.default.span`
|
|
45
42
|
font-size: 12px;
|
|
46
|
-
color: ${
|
|
43
|
+
color: ${t.COLORS.content.secondary};
|
|
47
44
|
margin-left: auto;
|
|
48
|
-
`;exports.DropdownContainer=n,exports.DropdownItem=a,exports.MentionAvatar=i,exports.MentionLabel=p,exports.MentionPresenceDot=s,exports.SlashDescription=
|
|
45
|
+
`;exports.DropdownContainer=n,exports.DropdownItem=a,exports.MentionAvatar=i,exports.MentionLabel=p,exports.MentionPresenceDot=s,exports.SlashDescription=l,exports.SlashLabel=d;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),n=require("react"),r=require("../editorDropdown.styles.js");const t=n.forwardRef(((t,o)=>{let{items:i,query:s,command:l,renderItem:a,renderDropdown:d}=t;const[c,u]=n.useState(0),p=e=>{i[e]&&l(i[e])};return n.useImperativeHandle(o,(()=>({onKeyDown:e=>{let{event:n}=e;return"ArrowUp"===n.key?(u((e=>(e+i.length-1)%i.length)),!0):"ArrowDown"===n.key?(u((e=>(e+1)%i.length)),!0):"Enter"===n.key&&(p(c),!0)}}))),n.useEffect((()=>u(0)),[i]),i.length?d?e.jsx(e.Fragment,{children:d({items:i,query:s,activeIndex:c,onSelect:e=>l(e)})}):e.jsx(r.DropdownContainer,{children:i.map(((n,t)=>e.jsx(r.DropdownItem,Object.assign({$isActive:t===c,onClick:()=>p(t)},{children:a?a(n,t===c):e.jsxs(e.Fragment,{children:[n.avatarUrl&&e.jsx(r.MentionAvatar,{src:n.avatarUrl,alt:""}),e.jsx(r.MentionLabel,{children:n.label}),void 0!==n.isOnline&&e.jsx(r.MentionPresenceDot,{$online:n.isOnline})]})}),n.id)))}):null}));t.displayName="MentionDropdown",exports.MentionDropdown=t;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),n=require("react"),r=require("../editorDropdown.styles.js");const t=n.forwardRef(((t,o)=>{let{items:i,query:s,command:l,renderItem:a,renderDropdown:d}=t;const[c,u]=n.useState(0),p=e=>{i[e]&&l(i[e])};return n.useImperativeHandle(o,(()=>({onKeyDown:e=>{let{event:n}=e;return"ArrowUp"===n.key?(u((e=>(e+i.length-1)%i.length)),!0):"ArrowDown"===n.key?(u((e=>(e+1)%i.length)),!0):"Enter"===n.key&&(p(c),!0)}}))),n.useEffect((()=>u(0)),[i]),i.length?d?e.jsx(e.Fragment,{children:d({items:i,query:s,activeIndex:c,onSelect:e=>l(e)})}):e.jsx(r.DropdownContainer,{children:i.map(((n,t)=>e.jsx(r.DropdownItem,Object.assign({$isActive:t===c,onMouseEnter:()=>u(t),onClick:()=>p(t)},{children:a?a(n,t===c):e.jsxs(e.Fragment,{children:[n.avatarUrl&&e.jsx(r.MentionAvatar,{src:n.avatarUrl,alt:""}),e.jsx(r.MentionLabel,{children:n.label}),void 0!==n.isOnline&&e.jsx(r.MentionPresenceDot,{$online:n.isOnline})]})}),n.id)))}):null}));t.displayName="MentionDropdown",exports.MentionDropdown=t;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react"),n=require("../editorDropdown.styles.js");const t=r.forwardRef(((t,s)=>{let{items:
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react"),n=require("../editorDropdown.styles.js");const t=r.forwardRef(((t,s)=>{let{items:o,query:i,command:l,renderItem:a,renderDropdown:d}=t;const[c,u]=r.useState(0),m=e=>{o[e]&&l(o[e])};return r.useImperativeHandle(s,(()=>({onKeyDown:e=>{let{event:r}=e;return"ArrowUp"===r.key?(u((e=>(e+o.length-1)%o.length)),!0):"ArrowDown"===r.key?(u((e=>(e+1)%o.length)),!0):"Enter"===r.key&&(m(c),!0)}}))),r.useEffect((()=>u(0)),[o]),o.length?d?e.jsx(e.Fragment,{children:d({items:o,query:i,activeIndex:c,onSelect:e=>l(e)})}):e.jsx(n.DropdownContainer,{children:o.map(((r,t)=>e.jsx(n.DropdownItem,Object.assign({$isActive:t===c,onMouseEnter:()=>u(t),onClick:()=>m(t)},{children:a?a(r,t===c):e.jsxs(e.Fragment,{children:[e.jsx(n.SlashLabel,{children:r.label}),r.description&&e.jsx(n.SlashDescription,{children:r.description})]})}),r.id)))}):null}));t.displayName="SlashCommandMenu",exports.SlashCommandMenu=t;
|
|
@@ -1,27 +1,24 @@
|
|
|
1
|
-
import r from"styled-components";import{COLORS as o}from"../../constants/Theme.js";const
|
|
1
|
+
import r from"styled-components";import{COLORS as o}from"../../constants/Theme.js";const t=r.div`
|
|
2
2
|
background: ${o.surface.standard};
|
|
3
3
|
border: 1px solid ${o.stroke.primary};
|
|
4
4
|
border-radius: 8px;
|
|
5
5
|
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
|
|
6
6
|
padding: 4px;
|
|
7
|
-
min-width:
|
|
7
|
+
min-width: 330px;
|
|
8
8
|
max-height: 260px;
|
|
9
9
|
overflow-y: auto;
|
|
10
10
|
font-size: 14px;
|
|
11
11
|
color: ${o.content.primary};
|
|
12
|
-
`,
|
|
12
|
+
`,e=r.div`
|
|
13
13
|
display: flex;
|
|
14
14
|
align-items: center;
|
|
15
15
|
gap: 8px;
|
|
16
|
-
padding:
|
|
16
|
+
padding: 12px 16px;
|
|
17
|
+
min-height: 43px;
|
|
17
18
|
border-radius: 6px;
|
|
18
19
|
cursor: pointer;
|
|
19
20
|
color: ${o.content.primary};
|
|
20
|
-
background: ${r=>{let{$isActive:
|
|
21
|
-
|
|
22
|
-
&:hover {
|
|
23
|
-
background: ${o.surface.hovered};
|
|
24
|
-
}
|
|
21
|
+
background: ${r=>{let{$isActive:t}=r;return t?o.surface.hovered:"transparent"}};
|
|
25
22
|
`,n=r.img`
|
|
26
23
|
width: 24px;
|
|
27
24
|
height: 24px;
|
|
@@ -31,18 +28,18 @@ import r from"styled-components";import{COLORS as o}from"../../constants/Theme.j
|
|
|
31
28
|
`,i=r.span`
|
|
32
29
|
font-weight: 500;
|
|
33
30
|
color: ${o.content.primary};
|
|
34
|
-
`,
|
|
31
|
+
`,p=r.span`
|
|
35
32
|
width: 8px;
|
|
36
33
|
height: 8px;
|
|
37
34
|
border-radius: 50%;
|
|
38
|
-
background: ${r=>{let{$online:
|
|
35
|
+
background: ${r=>{let{$online:t}=r;return t?o.content.positive:o.content.placeholder}};
|
|
39
36
|
margin-left: auto;
|
|
40
37
|
flex-shrink: 0;
|
|
41
|
-
`,
|
|
38
|
+
`,a=r.span`
|
|
42
39
|
font-weight: 500;
|
|
43
40
|
color: ${o.content.primary};
|
|
44
|
-
`,
|
|
41
|
+
`,s=r.span`
|
|
45
42
|
font-size: 12px;
|
|
46
43
|
color: ${o.content.secondary};
|
|
47
44
|
margin-left: auto;
|
|
48
|
-
`;export{
|
|
45
|
+
`;export{t as DropdownContainer,e as DropdownItem,n as MentionAvatar,i as MentionLabel,p as MentionPresenceDot,s as SlashDescription,a as SlashLabel};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,Fragment as
|
|
1
|
+
import{jsx as e,Fragment as n,jsxs as r}from"react/jsx-runtime";import{forwardRef as t,useState as o,useImperativeHandle as i,useEffect as l}from"react";import{DropdownContainer as a,DropdownItem as c,MentionAvatar as d,MentionLabel as s,MentionPresenceDot as m}from"../editorDropdown.styles.js";const p=t(((t,p)=>{let{items:h,query:y,command:u,renderItem:w,renderDropdown:v}=t;const[g,D]=o(0),k=e=>{h[e]&&u(h[e])};return i(p,(()=>({onKeyDown:e=>{let{event:n}=e;return"ArrowUp"===n.key?(D((e=>(e+h.length-1)%h.length)),!0):"ArrowDown"===n.key?(D((e=>(e+1)%h.length)),!0):"Enter"===n.key&&(k(g),!0)}}))),l((()=>D(0)),[h]),h.length?v?e(n,{children:v({items:h,query:y,activeIndex:g,onSelect:e=>u(e)})}):e(a,{children:h.map(((t,o)=>e(c,Object.assign({$isActive:o===g,onMouseEnter:()=>D(o),onClick:()=>k(o)},{children:w?w(t,o===g):r(n,{children:[t.avatarUrl&&e(d,{src:t.avatarUrl,alt:""}),e(s,{children:t.label}),void 0!==t.isOnline&&e(m,{$online:t.isOnline})]})}),t.id)))}):null}));p.displayName="MentionDropdown";export{p as MentionDropdown};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,Fragment as r,jsxs as n}from"react/jsx-runtime";import{forwardRef as t,useState as o,useImperativeHandle as i,useEffect as l}from"react";import{DropdownContainer as c,DropdownItem as d,SlashLabel as m,SlashDescription as s}from"../editorDropdown.styles.js";const a=t(((t,a)=>{let{items:h,query:p,command:
|
|
1
|
+
import{jsx as e,Fragment as r,jsxs as n}from"react/jsx-runtime";import{forwardRef as t,useState as o,useImperativeHandle as i,useEffect as l}from"react";import{DropdownContainer as c,DropdownItem as d,SlashLabel as m,SlashDescription as s}from"../editorDropdown.styles.js";const a=t(((t,a)=>{let{items:h,query:p,command:u,renderItem:y,renderDropdown:w}=t;const[g,k]=o(0),D=e=>{h[e]&&u(h[e])};return i(a,(()=>({onKeyDown:e=>{let{event:r}=e;return"ArrowUp"===r.key?(k((e=>(e+h.length-1)%h.length)),!0):"ArrowDown"===r.key?(k((e=>(e+1)%h.length)),!0):"Enter"===r.key&&(D(g),!0)}}))),l((()=>k(0)),[h]),h.length?w?e(r,{children:w({items:h,query:p,activeIndex:g,onSelect:e=>u(e)})}):e(c,{children:h.map(((t,o)=>e(d,Object.assign({$isActive:o===g,onMouseEnter:()=>k(o),onClick:()=>D(o)},{children:y?y(t,o===g):n(r,{children:[e(m,{children:t.label}),t.description&&e(s,{children:t.description})]})}),t.id)))}):null}));a.displayName="SlashCommandMenu";export{a as SlashCommandMenu};
|