@solibo/solibo-ui 2.2.11 → 2.2.12
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/assets/index15.css +1 -1
- package/dist/assets/index17.css +1 -1
- package/dist/assets/index21.css +1 -1
- package/dist/assets/index22.css +1 -1
- package/dist/assets/index23.css +1 -1
- package/dist/assets/index24.css +1 -1
- package/dist/assets/index25.css +1 -1
- package/dist/assets/index26.css +1 -1
- package/dist/assets/index27.css +1 -1
- package/dist/assets/index28.css +1 -1
- package/dist/assets/index29.css +1 -1
- package/dist/assets/index30.css +1 -1
- package/dist/assets/index31.css +1 -1
- package/dist/assets/index32.css +1 -1
- package/dist/assets/index33.css +1 -1
- package/dist/assets/index34.css +1 -1
- package/dist/assets/index35.css +1 -1
- package/dist/assets/index36.css +1 -1
- package/dist/assets/index37.css +1 -1
- package/dist/assets/index38.css +1 -1
- package/dist/assets/index39.css +1 -1
- package/dist/assets/index40.css +1 -1
- package/dist/assets/index41.css +1 -1
- package/dist/assets/index42.css +1 -1
- package/dist/assets/index43.css +1 -1
- package/dist/assets/index44.css +1 -1
- package/dist/assets/index45.css +1 -1
- package/dist/assets/index46.css +1 -1
- package/dist/assets/index47.css +1 -1
- package/dist/assets/index48.css +1 -1
- package/dist/assets/index49.css +1 -1
- package/dist/assets/index50.css +1 -1
- package/dist/assets/index51.css +1 -1
- package/dist/assets/index52.css +1 -1
- package/dist/assets/index53.css +1 -1
- package/dist/assets/index54.css +1 -1
- package/dist/assets/index55.css +1 -1
- package/dist/assets/index56.css +1 -1
- package/dist/assets/index57.css +1 -0
- package/dist/assets/index58.css +1 -0
- package/dist/components/app-link/index.cjs +1 -1
- package/dist/components/app-link/index.js +1 -1
- package/dist/components/app-shell/index.cjs +1 -1
- package/dist/components/app-shell/index.js +1 -1
- package/dist/components/aside/index.cjs +1 -1
- package/dist/components/aside/index.js +1 -1
- package/dist/components/avatar/index.cjs +1 -1
- package/dist/components/avatar/index.js +1 -1
- package/dist/components/badge/index.cjs +1 -1
- package/dist/components/badge/index.js +1 -1
- package/dist/components/banner/index.cjs +1 -1
- package/dist/components/banner/index.js +1 -1
- package/dist/components/branding/index.cjs +1 -1
- package/dist/components/branding/index.js +1 -1
- package/dist/components/button/index.cjs +1 -1
- package/dist/components/button/index.js +34 -34
- package/dist/components/card/index.cjs +1 -1
- package/dist/components/card/index.js +1 -1
- package/dist/components/checkbox/index.cjs +1 -1
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/chip/index.cjs +1 -1
- package/dist/components/chip/index.js +1 -1
- package/dist/components/clipboard/index.cjs +1 -1
- package/dist/components/clipboard/index.js +1 -1
- package/dist/components/collapsible/index.cjs +1 -1
- package/dist/components/collapsible/index.js +1 -1
- package/dist/components/comment/index.cjs +1 -0
- package/dist/components/comment/index.js +10 -0
- package/dist/components/comments/index.cjs +1 -0
- package/dist/components/comments/index.js +58 -0
- package/dist/components/controls/index.cjs +1 -2
- package/dist/components/controls/index.js +6 -139
- package/dist/components/croppable/index.cjs +1 -1
- package/dist/components/croppable/index.js +1 -1
- package/dist/components/dialog/index.cjs +1 -1
- package/dist/components/dialog/index.js +1 -1
- package/dist/components/divider/index.cjs +1 -1
- package/dist/components/divider/index.js +1 -1
- package/dist/components/dropdown/index.cjs +1 -1
- package/dist/components/dropdown/index.js +3 -3
- package/dist/components/dropzone/index.cjs +1 -1
- package/dist/components/dropzone/index.js +1 -1
- package/dist/components/editor/index.cjs +1 -1
- package/dist/components/editor/index.js +491 -470
- package/dist/components/empty-state/index.cjs +1 -1
- package/dist/components/empty-state/index.js +1 -1
- package/dist/components/fieldset/index.cjs +1 -1
- package/dist/components/fieldset/index.js +1 -1
- package/dist/components/figure/index.cjs +1 -1
- package/dist/components/figure/index.js +1 -1
- package/dist/components/file/index.cjs +1 -1
- package/dist/components/file/index.js +1 -1
- package/dist/components/footer/index.cjs +1 -1
- package/dist/components/footer/index.js +1 -1
- package/dist/components/form/index.cjs +1 -1
- package/dist/components/form/index.js +1 -1
- package/dist/components/graph/index.cjs +1 -1
- package/dist/components/graph/index.js +1 -1
- package/dist/components/group/index.cjs +1 -1
- package/dist/components/group/index.js +1 -1
- package/dist/components/icon/index.cjs +1 -1
- package/dist/components/icon/index.js +1 -1
- package/dist/components/iframe/index.cjs +1 -1
- package/dist/components/iframe/index.js +5 -5
- package/dist/components/input/index.cjs +1 -1
- package/dist/components/input/index.js +1 -1
- package/dist/components/link/index.cjs +1 -1
- package/dist/components/link/index.js +1 -1
- package/dist/components/list/index.cjs +1 -1
- package/dist/components/list/index.js +1 -1
- package/dist/components/loading/index.cjs +1 -1
- package/dist/components/loading/index.js +1 -1
- package/dist/components/message/index.cjs +1 -1
- package/dist/components/message/index.js +42 -37
- package/dist/components/messages/index.cjs +1 -1
- package/dist/components/messages/index.js +105 -79
- package/dist/components/popover/index.cjs +1 -1
- package/dist/components/popover/index.js +1 -1
- package/dist/components/search/index.cjs +1 -1
- package/dist/components/search/index.js +14 -14
- package/dist/components/select/index.cjs +1 -1
- package/dist/components/select/index.js +1 -1
- package/dist/components/toolbar/index.cjs +1 -1
- package/dist/components/toolbar/index.js +1 -1
- package/dist/content-Duav5qcc.js +10 -0
- package/dist/content-i-MRPlxK.cjs +1 -0
- package/dist/index-Bl5EEYDv.cjs +2 -0
- package/dist/index-DQuc_Zkg.js +149 -0
- package/dist/index-DqZSdMHT.cjs +1 -0
- package/dist/{index-Dd20d_9U.js → index-FSKjg3Z8.js} +1 -1
- package/dist/{index-Dx-KtGBg.js → index-HVXauXrX.js} +1 -1
- package/dist/index-KGoXYG8u.js +123 -0
- package/dist/{index-7blZaPiA.cjs → index-S1XsOUKE.cjs} +1 -1
- package/dist/{index-VLDsM9it.cjs → index-riaH5c_S.cjs} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +78 -3
- package/dist/index.js +110 -104
- package/dist/tokens.json +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { jsxs as o, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useState as v, useId as q, useRef as B, useEffect as G } from "react";
|
|
3
|
+
import { Avatar as D } from "./components/avatar/index.js";
|
|
4
|
+
import { Button as R } from "./components/button/index.js";
|
|
5
|
+
import { Group as H } from "./components/group/index.js";
|
|
6
|
+
import { Icon as z } from "./components/icon/index.js";
|
|
7
|
+
import { C as K } from "./index-DQuc_Zkg.js";
|
|
8
|
+
import { Editor as T } from "./components/editor/index.js";
|
|
9
|
+
import { h as V } from "./content-Duav5qcc.js";
|
|
10
|
+
import './assets/index36.css';const F = "_comment_1mvf0_1", J = "_meta_1mvf0_12", M = "_body_1mvf0_23", Q = "_notice_1mvf0_30", W = "_toggle_1mvf0_46", X = "_composer_1mvf0_51", Y = "_replies_1mvf0_73", Z = "_text_1mvf0_82", r = {
|
|
11
|
+
comment: F,
|
|
12
|
+
meta: J,
|
|
13
|
+
body: M,
|
|
14
|
+
notice: Q,
|
|
15
|
+
toggle: W,
|
|
16
|
+
composer: X,
|
|
17
|
+
replies: Y,
|
|
18
|
+
text: Z
|
|
19
|
+
}, A = ({
|
|
20
|
+
author: d,
|
|
21
|
+
label: g,
|
|
22
|
+
placeholder: y,
|
|
23
|
+
submitLabel: b,
|
|
24
|
+
cancelLabel: h,
|
|
25
|
+
initialContent: w = "",
|
|
26
|
+
autofocus: x = !1,
|
|
27
|
+
sending: S = !1,
|
|
28
|
+
onCancel: a,
|
|
29
|
+
onSubmit: N,
|
|
30
|
+
onPublished: i
|
|
31
|
+
}) => {
|
|
32
|
+
const [s, n] = v(w), [f, u] = v(!1), m = V(s, {
|
|
33
|
+
allowImages: !1
|
|
34
|
+
}), c = S || f, _ = async () => {
|
|
35
|
+
if (!(!m || c)) {
|
|
36
|
+
u(!0);
|
|
37
|
+
try {
|
|
38
|
+
const t = await N(s);
|
|
39
|
+
t !== !1 && (n(""), typeof t == "string" && (i == null || i(t)));
|
|
40
|
+
} catch {
|
|
41
|
+
return;
|
|
42
|
+
} finally {
|
|
43
|
+
u(!1);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
return /* @__PURE__ */ o("div", { "aria-label": g, className: r.composer, "data-active": m, role: "group", "data-component": "commentcomposer", children: [
|
|
48
|
+
d && /* @__PURE__ */ e("header", { children: /* @__PURE__ */ e(D, { ...d }) }),
|
|
49
|
+
/* @__PURE__ */ e(T, { autofocus: x, content: s, isSubmitting: c, maxRows: 10, minRows: 1, onChange: n, placeholder: y, variant: "embedded" }),
|
|
50
|
+
/* @__PURE__ */ e("footer", { children: /* @__PURE__ */ o(K, { variant: "inline", children: [
|
|
51
|
+
(m || a) && /* @__PURE__ */ e(R, { disabled: c, onClick: () => {
|
|
52
|
+
n(""), a == null || a();
|
|
53
|
+
}, variant: "secondary", children: h }),
|
|
54
|
+
/* @__PURE__ */ e(R, { disabled: !m || c, isLoading: c, onClick: () => void _(), variant: "primary", children: b })
|
|
55
|
+
] }) })
|
|
56
|
+
] });
|
|
57
|
+
}, $ = ({
|
|
58
|
+
id: d,
|
|
59
|
+
author: g,
|
|
60
|
+
authorImageUrl: y,
|
|
61
|
+
authorColor: b = "3",
|
|
62
|
+
timestamp: h,
|
|
63
|
+
timestampText: w,
|
|
64
|
+
content: x,
|
|
65
|
+
actions: S,
|
|
66
|
+
notice: a,
|
|
67
|
+
locked: N,
|
|
68
|
+
reactions: i,
|
|
69
|
+
editor: s,
|
|
70
|
+
replies: n = [],
|
|
71
|
+
replyComposer: f,
|
|
72
|
+
replyLabel: u = "Reply",
|
|
73
|
+
showRepliesLabel: m = "Show replies",
|
|
74
|
+
hideRepliesLabel: c = "Hide replies",
|
|
75
|
+
onPublished: _
|
|
76
|
+
}) => {
|
|
77
|
+
const [t, O] = v(!1), [C, U] = v(!1), E = q(), I = B(null);
|
|
78
|
+
G(() => {
|
|
79
|
+
var p, L, j;
|
|
80
|
+
t && C && ((p = I.current) == null || p.scrollIntoView({
|
|
81
|
+
behavior: "smooth",
|
|
82
|
+
block: "center"
|
|
83
|
+
}), (j = (L = I.current) == null ? void 0 : L.querySelector('[contenteditable="true"]')) == null || j.focus({
|
|
84
|
+
preventScroll: !0
|
|
85
|
+
}));
|
|
86
|
+
}, [t, C]);
|
|
87
|
+
const l = h ? new Date(h) : void 0, k = n.length > 0 || !!f;
|
|
88
|
+
return /* @__PURE__ */ o("div", { "data-comment-id": d, "data-component": "comment", children: [
|
|
89
|
+
/* @__PURE__ */ o("article", { className: r.comment, children: [
|
|
90
|
+
/* @__PURE__ */ o("header", { children: [
|
|
91
|
+
/* @__PURE__ */ o(H, { className: r.meta, gap: "small", justify: "between", layout: "row", children: [
|
|
92
|
+
/* @__PURE__ */ e(D, { accessibleLabel: g, color: b, imageUrl: y, name: g }),
|
|
93
|
+
/* @__PURE__ */ o("sub", { children: [
|
|
94
|
+
N && /* @__PURE__ */ e(z, { gap: "right", name: "LockKey", size: "small" }),
|
|
95
|
+
/* @__PURE__ */ e("time", { dateTime: l == null ? void 0 : l.toISOString(), children: w ?? (l == null ? void 0 : l.toLocaleString()) })
|
|
96
|
+
] })
|
|
97
|
+
] }),
|
|
98
|
+
S
|
|
99
|
+
] }),
|
|
100
|
+
/* @__PURE__ */ o("div", { className: r.body, children: [
|
|
101
|
+
a && /* @__PURE__ */ e("p", { className: r.notice, children: a }),
|
|
102
|
+
s ? /* @__PURE__ */ e(A, { ...s }) : /* @__PURE__ */ e("div", { className: r.text, "data-content": "user-generated", children: x })
|
|
103
|
+
] }),
|
|
104
|
+
!s && (i || k) && /* @__PURE__ */ o("footer", { children: [
|
|
105
|
+
i,
|
|
106
|
+
k && /* @__PURE__ */ o(R, { "aria-controls": E, "aria-expanded": t, className: r.toggle, onClick: () => {
|
|
107
|
+
O(!t), U(!t && n.length === 0);
|
|
108
|
+
}, variant: "tertiary", children: [
|
|
109
|
+
t ? c : n.length ? m : u,
|
|
110
|
+
(t || n.length > 0) && /* @__PURE__ */ e(z, { name: t ? "CaretUp" : "CaretDown", size: "small" })
|
|
111
|
+
] })
|
|
112
|
+
] })
|
|
113
|
+
] }),
|
|
114
|
+
t && k && /* @__PURE__ */ o("ul", { className: r.replies, id: E, children: [
|
|
115
|
+
n.map((p) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e($, { ...p, onPublished: _ }) }, p.id)),
|
|
116
|
+
f && /* @__PURE__ */ e("li", { "data-reply-composer": d, ref: I, children: /* @__PURE__ */ e(A, { ...f, autofocus: C, onPublished: _ }) })
|
|
117
|
+
] })
|
|
118
|
+
] });
|
|
119
|
+
};
|
|
120
|
+
export {
|
|
121
|
+
$ as C,
|
|
122
|
+
A as a
|
|
123
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require('./assets/
|
|
1
|
+
"use strict";require('./assets/index52.css');const e=require("react/jsx-runtime"),m=require("classix"),r=require("react"),U=require("./icons-BIdcCH-v.cjs"),F=require("./use-touched-Bq5Gjbpz.cjs");function W(t){return t&&`${t[0].toLocaleUpperCase()}${t.slice(1)}`}function P(t){const o=W(t);return o&&!o.endsWith(":")?`${o}:`:o}const k="_field_w1cmd_3",A="_input_w1cmd_8",D="_touched_w1cmd_48",J="_label_w1cmd_57",K="_inline_w1cmd_78",O="_error_w1cmd_99",Q="_code_w1cmd_106",n={field:k,input:A,touched:D,label:J,inline:K,error:O,code:Q};function X({className:t,defaultCountryCode:o="+47",disabled:a=!1,errorMessage:j,icon:g,invalid:_=!1,label:f,onBlur:R,placeholder:I,ref:w,required:p,style:B,type:i="text",variant:v="default",...s}){const V=r.useId(),[x,L]=r.useState(""),[l,N]=r.useState(""),{name:q,onChange:u,pattern:y,value:d,...z}=s,{touched:E,onBlur:G}=F.useTouched(d===""),h=g&&i!=="radio"&&i!=="datetime-local"?g:void 0,C=f&&v==="inline"?P(f):f,b=_&&j?V:void 0,S=[s["aria-describedby"],b].filter(Boolean).join(" ")||void 0,T=h?{...B,"--icon-svg":U.iconSVG(h)}:B,$=F.composeEventHandlers(G,R);r.useEffect(()=>{if(u&&i==="tel"){const c={name:q,value:l?(x||o).split(" ").join("")+l.split(" ").join(""):void 0};u({target:c,currentTarget:c})}},[x,o,q,u,l,i]),r.useEffect(()=>{i==="tel"&&!d&&(N(""),L(""))},[i,d]);const H=e.jsxs(e.Fragment,{children:[e.jsx("input",{disabled:a,hidden:!0,onChange:u,pattern:void 0,placeholder:I,ref:w,type:i,value:d}),e.jsx("input",{type:"text",className:m(n.code,n.input),disabled:a,maxLength:5,onChange:c=>L(c.target.value),placeholder:o,value:x}),e.jsx("input",{...z,"aria-describedby":S,"aria-invalid":_?!0:s["aria-invalid"],type:"tel",className:m(n.input,t,E&&n.touched),"data-icon":h?"true":void 0,disabled:a,maxLength:14,name:void 0,onChange:c=>N(c.target.value),onBlur:$,pattern:y,required:p,style:T,value:l})]});return e.jsxs("div",{className:n.field,"data-component":"input",children:[e.jsxs("label",{className:m(n.label,v==="inline"&&n.inline),children:[C&&e.jsx("span",{"data-required":p&&v!=="inline"?!0:void 0,children:C}),i==="tel"?H:e.jsx("input",{...s,"aria-describedby":S,"aria-invalid":_?!0:s["aria-invalid"],ref:w,className:m(n.input,t,E&&n.touched),"data-icon":h?"true":void 0,disabled:a,onBlur:$,placeholder:I,required:p,style:T,type:i})]}),b&&e.jsx("span",{className:n.error,id:b,role:"alert",children:j})]})}exports.Input=X;exports.formatInlineLabel=P;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require('./assets/
|
|
1
|
+
"use strict";require('./assets/index57.css');const u=require("react/jsx-runtime"),C=require("classix"),S=require("./icons-BIdcCH-v.cjs"),p=require("./use-touched-Bq5Gjbpz.cjs"),P=new Set(["aria-activedescendant","aria-autocomplete","aria-busy","aria-controls","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-live","aria-owns","aria-required","aria-roledescription","autoComplete","autoFocus","className","defaultValue","dir","disabled","form","id","multiple","name","onBlur","onChange","onClick","onFocus","onInput","onInvalid","onKeyDown","onKeyUp","onMouseDown","onMouseUp","onPointerDown","onPointerUp","required","role","size","style","tabIndex","title","value"]);function h(r){return Object.fromEntries(Object.entries(r).filter(([e])=>e.startsWith("data-")||e.startsWith("aria-")||P.has(e)))}const _=/^--[\w-]+$/,q=/^var\(\s*(--[\w-]+)\s*(?:,\s*(.+))?\)$/,x=new Set(["currentcolor","inherit","initial","revert","revert-layer","unset"]),l=typeof document<"u"?document.createElement("span"):null;function b(r){const e=r.trim();if(!e||!l||x.has(e.toLowerCase()))return e;const s=document.body??document.documentElement;if(!s||(l.style.color=e,!l.style.color))return e;s.appendChild(l);const n=getComputedStyle(l).color.trim();return l.remove(),n||e}function y(r,e="currentColor"){var c;if(typeof document>"u")return e;const s=getComputedStyle(document.documentElement),n=new Set;let t=r.trim();for(;t;){const o=t.match(q),a=(o==null?void 0:o[1])??(_.test(t)?t:null),i=(c=o==null?void 0:o[2])==null?void 0:c.trim();if(!a)return b(t);if(n.has(a)){t=i??"";continue}n.add(a),t=s.getPropertyValue(a).trim()||i||""}return b(e)}const j="_select_1bm47_3",V="_touched_1bm47_24",g="_label_1bm47_29",d={select:j,touched:V,label:g},E=({children:r,label:e,placeholder:s,...n})=>{const{touched:t,onBlur:c}=p.useTouched(n.value===""),o=h(n),{className:a,onBlur:i,style:v,...f}=o,w={...v,"--icon-svg":S.iconSVG("CaretDown",y("--colors-semantic-content-secondary"))},m=u.jsxs("select",{className:C(d.select,a,t&&d.touched),onBlur:p.composeEventHandlers(c,i),style:w,...f,"data-component":"select",children:[s&&u.jsx("option",{value:"",hidden:!0,children:s},"placeholder"),r]});return e?u.jsxs("label",{"data-component":"select",children:[u.jsx("span",{className:d.label,"data-required":n.required||void 0,children:e}),m]}):m};exports.Select=E;exports.resolveColor=y;exports.sanitizeSelectProps=h;
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./assets/index.css');const t=require("./components/app-link/index.cjs"),r=require("./components/app-shell/index.cjs"),i=require("./components/aside/index.cjs"),s=require("./components/avatar/index.cjs"),c=require("./components/badge/index.cjs"),p=require("./components/banner/index.cjs"),_=require("./components/branding/index.cjs"),a=require("./components/button/index.cjs"),d=require("./components/card/index.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./assets/index.css');const t=require("./components/app-link/index.cjs"),r=require("./components/app-shell/index.cjs"),i=require("./components/aside/index.cjs"),s=require("./components/avatar/index.cjs"),c=require("./components/badge/index.cjs"),p=require("./components/banner/index.cjs"),_=require("./components/branding/index.cjs"),a=require("./components/button/index.cjs"),d=require("./components/card/index.cjs"),m=require("./components/checkbox/index.cjs"),u=require("./components/chip/index.cjs"),l=require("./components/clipboard/index.cjs"),x=require("./components/collapsible/index.cjs"),q=require("./index-DqZSdMHT.cjs"),g=require("./components/comments/index.cjs"),b=require("./index-Bl5EEYDv.cjs"),C=require("./components/croppable/index.cjs"),h=require("./components/dialog/index.cjs"),v=require("./components/divider/index.cjs"),L=require("./components/dropdown/index.cjs"),S=require("./components/dropzone/index.cjs"),T=require("./components/editor/index.cjs"),I=require("./content-i-MRPlxK.cjs"),k=require("./components/empty-state/index.cjs"),F=require("./components/fieldset/index.cjs"),f=require("./components/figure/index.cjs"),P=require("./components/file/index.cjs"),y=require("./components/footer/index.cjs"),A=require("./components/form/index.cjs"),B=require("./components/graph/index.cjs"),D=require("./components/group/index.cjs"),M=require("./components/header/index.cjs"),E=require("./components/icon/index.cjs"),N=require("./components/iframe/index.cjs"),O=require("./components/image/index.cjs"),j=require("./index-S1XsOUKE.cjs"),n=require("./components/link/index.cjs"),w=require("./components/list/index.cjs"),G=require("./components/loading/index.cjs"),z=require("./components/menu/index.cjs"),H=require("./components/message/index.cjs"),W=require("./components/messages/index.cjs"),e=require("./components/nav/index.cjs"),J=require("./components/object/index.cjs"),K=require("./components/page-layout/index.cjs"),Q=require("./components/panel/index.cjs"),R=require("./components/popover/index.cjs"),U=require("./components/portal/index.cjs"),V=require("./components/search/index.cjs"),X=require("./index-riaH5c_S.cjs"),o=require("./components/sortable/index.cjs"),Y=require("./components/table/index.cjs"),Z=require("./components/textarea/index.cjs"),$=require("./components/toast/index.cjs"),ee=require("./components/toasts/index.cjs"),ne=require("./components/toggle/index.cjs"),oe=require("./components/toolbar/index.cjs"),te=require("./components/tooltip/index.cjs"),re=require("./components/widget/index.cjs");exports.AppLink=t.AppLink;exports.AppShell=r.AppShell;exports.Aside=i.Aside;exports.Avatar=s.Avatar;exports.Badge=c.Badge;exports.Banner=p.Banner;exports.Branding=_.Branding;exports.Button=a.Button;exports.Card=d.Card;exports.Checkbox=m.Checkbox;exports.Chip=u.Chip;exports.Clipboard=l.Clipboard;exports.Collapsible=x.Collapsible;exports.Comment=q.Comment;exports.Comments=g.Comments;exports.Controls=b.Controls;exports.Croppable=C.Croppable;exports.Dialog=h.Dialog;exports.Divider=v.Divider;exports.Dropdown=L.Dropdown;exports.Dropzone=S.Dropzone;exports.Editor=T.Editor;exports.hasEditorContent=I.hasEditorContent;exports.EmptyState=k.EmptyState;exports.Fieldset=F.Fieldset;exports.Figure=f.Figure;exports.File=P.File;exports.Footer=y.Footer;exports.Form=A.Form;exports.Graph=B.Graph;exports.Group=D.Group;exports.Header=M.Header;exports.Icon=E.Icon;exports.Iframe=N.Iframe;exports.Image=O.Image;exports.Input=j.Input;exports.Link=n.Link;exports.LinkContent=n.LinkContent;exports.List=w.List;exports.Loading=G.Loading;exports.Menu=z.Menu;exports.Message=H.Message;exports.Messages=W.Messages;exports.Nav=e.Nav;exports.NavItem=e.NavItem;exports.NavLabel=e.NavLabel;exports.Object=J.Object;exports.PageLayout=K.PageLayout;exports.Panel=Q.Panel;exports.Popover=R.Popover;exports.Portal=U.Portal;exports.Search=V.Search;exports.Select=X.Select;exports.Sortable=o.Sortable;exports.useOptionalSortableItem=o.useOptionalSortableItem;exports.Table=Y.Table;exports.Textarea=Z.Textarea;exports.Toast=$.Toast;exports.Toasts=ee.Toasts;exports.Toggle=ne.Toggle;exports.Toolbar=oe.Toolbar;exports.Tooltip=te.Tooltip;exports.Widget=re.Widget;
|
package/dist/index.d.ts
CHANGED
|
@@ -179,6 +179,52 @@ export declare type CollapsibleProps = {
|
|
|
179
179
|
summary: ReactNode;
|
|
180
180
|
};
|
|
181
181
|
|
|
182
|
+
declare const Comment_2: ({ id, author, authorImageUrl, authorColor, timestamp, timestampText, content, actions, notice, locked, reactions, editor, replies, replyComposer, replyLabel, showRepliesLabel, hideRepliesLabel, onPublished, }: CommentOptions & {
|
|
183
|
+
onPublished?: (id: string) => void;
|
|
184
|
+
}) => JSX.Element;
|
|
185
|
+
export { Comment_2 as Comment }
|
|
186
|
+
|
|
187
|
+
export declare type CommentComposerOptions = {
|
|
188
|
+
author?: AvatarProps;
|
|
189
|
+
label: string;
|
|
190
|
+
placeholder?: string;
|
|
191
|
+
submitLabel: string;
|
|
192
|
+
cancelLabel: string;
|
|
193
|
+
initialContent?: string;
|
|
194
|
+
autofocus?: boolean;
|
|
195
|
+
sending?: boolean;
|
|
196
|
+
onCancel?: () => void;
|
|
197
|
+
onSubmit: (content: string) => Promise<string | boolean | void>;
|
|
198
|
+
};
|
|
199
|
+
|
|
200
|
+
export declare type CommentOptions = Pick<MessageOptions, 'id' | 'author' | 'authorImageUrl' | 'authorColor' | 'timestamp' | 'timestampText' | 'content' | 'actions'> & {
|
|
201
|
+
notice?: React.ReactNode;
|
|
202
|
+
locked?: boolean;
|
|
203
|
+
reactions?: React.ReactNode;
|
|
204
|
+
editor?: CommentComposerOptions;
|
|
205
|
+
replies?: CommentOptions[];
|
|
206
|
+
replyComposer?: CommentComposerOptions;
|
|
207
|
+
replyLabel?: string;
|
|
208
|
+
showRepliesLabel?: string;
|
|
209
|
+
hideRepliesLabel?: string;
|
|
210
|
+
};
|
|
211
|
+
|
|
212
|
+
export declare const Comments: ({ comments, title, open, onOpenChange, showLabel, hideLabel, guidance, loading, composer, status, pagination, }: CommentsProps) => JSX.Element;
|
|
213
|
+
|
|
214
|
+
export declare type CommentsProps = {
|
|
215
|
+
comments: CommentOptions[];
|
|
216
|
+
title: React.ReactNode;
|
|
217
|
+
open: boolean;
|
|
218
|
+
onOpenChange: (open: boolean) => void;
|
|
219
|
+
showLabel?: string;
|
|
220
|
+
hideLabel?: string;
|
|
221
|
+
guidance?: React.ReactNode;
|
|
222
|
+
loading?: boolean;
|
|
223
|
+
composer?: CommentComposerOptions;
|
|
224
|
+
status?: React.ReactNode;
|
|
225
|
+
pagination?: React.ReactNode;
|
|
226
|
+
};
|
|
227
|
+
|
|
182
228
|
export declare const Controls: ({ children, className, maxVisibleButtons, overflow, overflowAccessibleLabel, variant, ...props }: ControlsProps) => JSX.Element | null;
|
|
183
229
|
|
|
184
230
|
export declare type ControlsProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
@@ -304,12 +350,18 @@ declare type DropzoneProps = {
|
|
|
304
350
|
variant?: 'default' | 'minimal';
|
|
305
351
|
};
|
|
306
352
|
|
|
307
|
-
export declare const Editor: ({ autofocus, autolink, content, disabled, errorMessage, fill, files, inline, inlineImages, invalid, isSubmitting, maxRows, minRows, onChange, onFilesChange, onInlineImagesChange, onSubmit, onUpload, placeholder, required, resizable, submitLabel, }: EditorProps) => JSX.Element;
|
|
353
|
+
export declare const Editor: ({ autofocus, attachmentsEnabled, sessionKey, autolink, content, controls, disabled, errorMessage, fill, files, inline, inlineImages, invalid, isSubmitting, maxRows, minRows, onChange, onFilesChange, onInlineImagesChange, onSubmit, onUpload, placeholder, required, resizable, submitLabel, variant, }: EditorProps) => JSX.Element;
|
|
308
354
|
|
|
309
355
|
export declare type EditorProps = {
|
|
310
356
|
autofocus?: boolean;
|
|
357
|
+
/** Pause attachment interaction without discarding the queued files or image previews. */
|
|
358
|
+
attachmentsEnabled?: boolean;
|
|
359
|
+
/** Switch documents in the mounted editor, resetting focus and undo history. */
|
|
360
|
+
sessionKey?: string;
|
|
311
361
|
autolink?: boolean;
|
|
312
362
|
content?: string;
|
|
363
|
+
/** Replaces the default submit button in the formatting header. Hidden for inline/embedded editors. */
|
|
364
|
+
controls?: React.ReactNode;
|
|
313
365
|
disabled?: boolean;
|
|
314
366
|
errorMessage?: string;
|
|
315
367
|
fill?: boolean;
|
|
@@ -332,6 +384,7 @@ export declare type EditorProps = {
|
|
|
332
384
|
* until resized; manual expansion is not capped by maxRows. */
|
|
333
385
|
resizable?: boolean | 'top';
|
|
334
386
|
submitLabel?: string;
|
|
387
|
+
variant?: 'default' | 'embedded';
|
|
335
388
|
};
|
|
336
389
|
|
|
337
390
|
export declare const EmptyState: ({ button, content, header, icon }: EmptyStateProps) => JSX.Element;
|
|
@@ -421,6 +474,11 @@ declare type GroupProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
|
421
474
|
stackOnMobile?: boolean;
|
|
422
475
|
};
|
|
423
476
|
|
|
477
|
+
/** Whether rich text contains text or, when allowed, an image. Files are a caller policy. */
|
|
478
|
+
export declare const hasEditorContent: (html: string, { allowImages }?: {
|
|
479
|
+
allowImages?: boolean;
|
|
480
|
+
}) => boolean;
|
|
481
|
+
|
|
424
482
|
export declare const Header: ({ backButton, capitalize, children, controls, details, cta, header, inset, size, subHeader, variant, }: HeaderProps) => JSX.Element;
|
|
425
483
|
|
|
426
484
|
export declare type HeaderProps = {
|
|
@@ -792,12 +850,27 @@ declare type MenuSharedProps = {
|
|
|
792
850
|
onItemSelect?: (item: MenuItem) => void;
|
|
793
851
|
};
|
|
794
852
|
|
|
795
|
-
export declare const Message: ({ actions, appearance, attachments, author, authorColor, authorImageUrl, authorLink, authorRole, content, iconName, id, preview, timestamp, timestampText, type, }: MessageOptions) => JSX.Element;
|
|
853
|
+
export declare const Message: ({ actions, actionsPlacement, appearance, attachments, author, authorColor, authorImageUrl, authorLink, authorRole, content, iconName, id, preview, timestamp, timestampText, type, }: MessageOptions) => JSX.Element;
|
|
854
|
+
|
|
855
|
+
export declare type MessageEditOptions = {
|
|
856
|
+
messageId: string;
|
|
857
|
+
content: string;
|
|
858
|
+
onChange: (content: string) => void;
|
|
859
|
+
/** Report a failure to the user, then reject to keep the edit available for retry. */
|
|
860
|
+
onSave: (content: string) => Promise<void>;
|
|
861
|
+
onCancel: () => void;
|
|
862
|
+
saving: boolean;
|
|
863
|
+
editingLabel?: string;
|
|
864
|
+
saveLabel?: string;
|
|
865
|
+
cancelLabel?: string;
|
|
866
|
+
};
|
|
796
867
|
|
|
797
868
|
declare type MessageItem = MessageOptions;
|
|
798
869
|
|
|
799
870
|
export declare type MessageOptions = {
|
|
800
871
|
actions?: React.ReactNode;
|
|
872
|
+
/** Toolbar actions appear beside the bubble on pointer devices and below its text on touch devices. */
|
|
873
|
+
actionsPlacement?: 'footer' | 'toolbar';
|
|
801
874
|
appearance?: 'default' | 'document' | 'file';
|
|
802
875
|
attachments?: React.ReactNode;
|
|
803
876
|
author?: string;
|
|
@@ -814,10 +887,12 @@ export declare type MessageOptions = {
|
|
|
814
887
|
type?: 'default' | 'minimal' | 'system' | 'user';
|
|
815
888
|
};
|
|
816
889
|
|
|
817
|
-
export declare const Messages: ({ autofocus, fill, files, handleUpload, inlineImages, maxEditorRows, message, messages, minEditorRows, onChange, onFilesChange, onInlineImagesChange, onSubmit, placeholder, resizableEditor, sending, submitLabel, tooltipLabel, }: MessagesProps) => JSX.Element;
|
|
890
|
+
export declare const Messages: ({ autofocus, editing, fill, files, handleUpload, inlineImages, maxEditorRows, message, messages, minEditorRows, onChange, onFilesChange, onInlineImagesChange, onSubmit, placeholder, resizableEditor, sending, submitLabel, tooltipLabel, }: MessagesProps) => JSX.Element;
|
|
818
891
|
|
|
819
892
|
export declare type MessagesProps = {
|
|
820
893
|
autofocus?: boolean;
|
|
894
|
+
/** A controlled edit uses the same composer while preserving the reply draft and attachment queue. */
|
|
895
|
+
editing?: MessageEditOptions;
|
|
821
896
|
fill?: boolean;
|
|
822
897
|
files?: readonly File[];
|
|
823
898
|
handleUpload: (files: FileList) => Promise<void> | void;
|
package/dist/index.js
CHANGED
|
@@ -2,117 +2,123 @@ import { AppLink as e } from "./components/app-link/index.js";
|
|
|
2
2
|
import { AppShell as p } from "./components/app-shell/index.js";
|
|
3
3
|
import { Aside as x } from "./components/aside/index.js";
|
|
4
4
|
import { Avatar as a } from "./components/avatar/index.js";
|
|
5
|
-
import { Badge as
|
|
5
|
+
import { Badge as l } from "./components/badge/index.js";
|
|
6
6
|
import { Banner as s } from "./components/banner/index.js";
|
|
7
|
-
import { Branding as
|
|
8
|
-
import { Button as
|
|
9
|
-
import { Card as
|
|
10
|
-
import { Checkbox as
|
|
11
|
-
import { Chip as
|
|
12
|
-
import { Clipboard as
|
|
7
|
+
import { Branding as C } from "./components/branding/index.js";
|
|
8
|
+
import { Button as b } from "./components/button/index.js";
|
|
9
|
+
import { Card as u } from "./components/card/index.js";
|
|
10
|
+
import { Checkbox as L } from "./components/checkbox/index.js";
|
|
11
|
+
import { Chip as T } from "./components/chip/index.js";
|
|
12
|
+
import { Clipboard as c } from "./components/clipboard/index.js";
|
|
13
13
|
import { Collapsible as k } from "./components/collapsible/index.js";
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
14
|
+
import { C as B } from "./index-KGoXYG8u.js";
|
|
15
|
+
import { Comments as P } from "./components/comments/index.js";
|
|
16
|
+
import { C as M } from "./index-DQuc_Zkg.js";
|
|
17
|
+
import { Croppable as y } from "./components/croppable/index.js";
|
|
18
|
+
import { Dialog as O } from "./components/dialog/index.js";
|
|
19
|
+
import { Divider as w } from "./components/divider/index.js";
|
|
20
|
+
import { Dropdown as H } from "./components/dropdown/index.js";
|
|
21
|
+
import { Dropzone as q } from "./components/dropzone/index.js";
|
|
22
|
+
import { Editor as K } from "./components/editor/index.js";
|
|
23
|
+
import { h as R } from "./content-Duav5qcc.js";
|
|
24
|
+
import { EmptyState as V } from "./components/empty-state/index.js";
|
|
25
|
+
import { Fieldset as Y } from "./components/fieldset/index.js";
|
|
26
|
+
import { Figure as _ } from "./components/figure/index.js";
|
|
27
|
+
import { File as oo } from "./components/file/index.js";
|
|
28
|
+
import { Footer as eo } from "./components/footer/index.js";
|
|
29
|
+
import { Form as po } from "./components/form/index.js";
|
|
30
|
+
import { Graph as xo } from "./components/graph/index.js";
|
|
31
|
+
import { Group as ao } from "./components/group/index.js";
|
|
32
|
+
import { Header as lo } from "./components/header/index.js";
|
|
33
|
+
import { Icon as so } from "./components/icon/index.js";
|
|
34
|
+
import { Iframe as go } from "./components/iframe/index.js";
|
|
35
|
+
import { Image as ho } from "./components/image/index.js";
|
|
36
|
+
import { I as Io } from "./index-FSKjg3Z8.js";
|
|
37
|
+
import { Link as So, LinkContent as To } from "./components/link/index.js";
|
|
38
|
+
import { List as co } from "./components/list/index.js";
|
|
39
|
+
import { Loading as ko } from "./components/loading/index.js";
|
|
40
|
+
import { Menu as Bo } from "./components/menu/index.js";
|
|
41
|
+
import { Message as Po } from "./components/message/index.js";
|
|
42
|
+
import { Messages as Mo } from "./components/messages/index.js";
|
|
43
|
+
import { Nav as yo, NavItem as Go, NavLabel as Oo } from "./components/nav/index.js";
|
|
44
|
+
import { Object as wo } from "./components/object/index.js";
|
|
45
|
+
import { PageLayout as Ho } from "./components/page-layout/index.js";
|
|
46
|
+
import { Panel as qo } from "./components/panel/index.js";
|
|
47
|
+
import { Popover as Ko } from "./components/popover/index.js";
|
|
48
|
+
import { Portal as Ro } from "./components/portal/index.js";
|
|
49
|
+
import { Search as Vo } from "./components/search/index.js";
|
|
50
|
+
import { S as Yo } from "./index-HVXauXrX.js";
|
|
51
|
+
import { Sortable as _o, useOptionalSortableItem as $o } from "./components/sortable/index.js";
|
|
52
|
+
import { Table as rr } from "./components/table/index.js";
|
|
53
|
+
import { Textarea as tr } from "./components/textarea/index.js";
|
|
54
|
+
import { Toast as mr } from "./components/toast/index.js";
|
|
55
|
+
import { Toasts as fr } from "./components/toasts/index.js";
|
|
56
|
+
import { Toggle as nr } from "./components/toggle/index.js";
|
|
57
|
+
import { Toolbar as ir } from "./components/toolbar/index.js";
|
|
58
|
+
import { Tooltip as dr } from "./components/tooltip/index.js";
|
|
59
|
+
import { Widget as gr } from "./components/widget/index.js";
|
|
57
60
|
import './assets/index.css';export {
|
|
58
61
|
e as AppLink,
|
|
59
62
|
p as AppShell,
|
|
60
63
|
x as Aside,
|
|
61
64
|
a as Avatar,
|
|
62
|
-
|
|
65
|
+
l as Badge,
|
|
63
66
|
s as Banner,
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
C as Branding,
|
|
68
|
+
b as Button,
|
|
69
|
+
u as Card,
|
|
70
|
+
L as Checkbox,
|
|
71
|
+
T as Chip,
|
|
72
|
+
c as Clipboard,
|
|
70
73
|
k as Collapsible,
|
|
71
|
-
B as
|
|
72
|
-
P as
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
O as
|
|
76
|
-
w as
|
|
77
|
-
H as
|
|
78
|
-
q as
|
|
79
|
-
K as
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
74
|
+
B as Comment,
|
|
75
|
+
P as Comments,
|
|
76
|
+
M as Controls,
|
|
77
|
+
y as Croppable,
|
|
78
|
+
O as Dialog,
|
|
79
|
+
w as Divider,
|
|
80
|
+
H as Dropdown,
|
|
81
|
+
q as Dropzone,
|
|
82
|
+
K as Editor,
|
|
83
|
+
V as EmptyState,
|
|
84
|
+
Y as Fieldset,
|
|
85
|
+
_ as Figure,
|
|
86
|
+
oo as File,
|
|
87
|
+
eo as Footer,
|
|
88
|
+
po as Form,
|
|
89
|
+
xo as Graph,
|
|
90
|
+
ao as Group,
|
|
91
|
+
lo as Header,
|
|
92
|
+
so as Icon,
|
|
93
|
+
go as Iframe,
|
|
94
|
+
ho as Image,
|
|
95
|
+
Io as Input,
|
|
96
|
+
So as Link,
|
|
97
|
+
To as LinkContent,
|
|
98
|
+
co as List,
|
|
99
|
+
ko as Loading,
|
|
100
|
+
Bo as Menu,
|
|
101
|
+
Po as Message,
|
|
102
|
+
Mo as Messages,
|
|
103
|
+
yo as Nav,
|
|
104
|
+
Go as NavItem,
|
|
105
|
+
Oo as NavLabel,
|
|
106
|
+
wo as Object,
|
|
107
|
+
Ho as PageLayout,
|
|
108
|
+
qo as Panel,
|
|
109
|
+
Ko as Popover,
|
|
110
|
+
Ro as Portal,
|
|
111
|
+
Vo as Search,
|
|
112
|
+
Yo as Select,
|
|
113
|
+
_o as Sortable,
|
|
114
|
+
rr as Table,
|
|
115
|
+
tr as Textarea,
|
|
116
|
+
mr as Toast,
|
|
117
|
+
fr as Toasts,
|
|
118
|
+
nr as Toggle,
|
|
119
|
+
ir as Toolbar,
|
|
120
|
+
dr as Tooltip,
|
|
121
|
+
gr as Widget,
|
|
122
|
+
R as hasEditorContent,
|
|
123
|
+
$o as useOptionalSortableItem
|
|
118
124
|
};
|
package/dist/tokens.json
CHANGED