@solibo/solibo-ui 1.0.0 → 1.0.2
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/index13.css +1 -1
- package/dist/assets/index25.css +1 -1
- package/dist/assets/index31.css +1 -1
- package/dist/assets/index41.css +1 -1
- package/dist/assets/index9.css +1 -1
- package/dist/components/aside/index.cjs +1 -1
- package/dist/components/aside/index.js +18 -18
- package/dist/components/card/index.cjs +1 -1
- package/dist/components/card/index.js +24 -24
- package/dist/components/empty-state/index.cjs +1 -1
- package/dist/components/empty-state/index.cjs.map +1 -1
- package/dist/components/empty-state/index.js +6 -6
- package/dist/components/messages/index.cjs +1 -1
- package/dist/components/messages/index.js +7 -7
- package/dist/components/search/index.cjs +1 -1
- package/dist/components/search/index.js +23 -23
- package/dist/tokens.json +1 -1
- package/package.json +1 -1
package/dist/assets/index13.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._messages_1e940_1 [data-type=avatar]{margin-bottom:var(--scale-8)}._messages_1e940_1 ul{background-color:var(--colors-neutral-0);padding:var(--utils-tokens-unit) 0}._messages_1e940_1 ul li{margin-bottom:var(--scale-24)}._fill_1e940_16{display:grid;flex:1;grid-template-rows:minmax(0,1fr) auto;min-height:0}._fill_1e940_16>[data-message-list]{margin:0;min-height:0;overflow-y:auto}
|
package/dist/assets/index25.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._aside_1oaey_3 section{padding:var(--utils-tokens-unit) 0}._sidebar_1oaey_9{border-right:var(--scale-1) solid var(--colors-semantic-border-default);overflow:hidden auto;padding:var(--shape-spacing-xl) var(--shape-spacing-md) var(--shape-spacing-xl) var(--shape-spacing-sm)}._sidebar_1oaey_9 header{margin-top:0;margin-bottom:var(--shape-spacing-lg)}._sidebar_1oaey_9 [data-sidebar-toggle]{display:none}@supports (-moz-appearance: none){._sidebar_1oaey_9{scrollbar-color:var(--colors-semantic-border-default) transparent;scrollbar-width:thin}}@supports selector(::-webkit-scrollbar){._sidebar_1oaey_9::-webkit-scrollbar{width:var(--scale-2)}._sidebar_1oaey_9::-webkit-scrollbar-track{background-color:transparent}._sidebar_1oaey_9::-webkit-scrollbar-thumb{background-color:var(--colors-semantic-border-default);border-radius:var(--scale-1)}}._sticky_1oaey_45{position:-webkit-sticky;position:sticky;top:0}@media (width <= 1024px){._sidebar_1oaey_9{background-color:var(--colors-semantic-primary-primary-subtle);height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;overscroll-behavior-y:auto;padding:var(--shape-spacing-md);position:relative;top:0;width:100vw;z-index:2;transition:all var(--utils-tokens-transition-duration) var(--utils-tokens-transition-timing-function)}._sidebar_1oaey_9>nav{display:none}._sidebar_1oaey_9>header{margin-bottom:0}._sidebar_1oaey_9 [data-sidebar-toggle]{position:relative;display:block;float:right;margin-top:var(--shape-spacing-2xs);padding:0}._sidebar_1oaey_9 [data-sidebar-toggle]:after{content:"";position:absolute;inset:var(--utils-tokens-negative-unit)}._sidebar_1oaey_9._open_1oaey_81{background-color:var(--colors-semantic-bg-page);display:block;height:calc(100vh - var(--shape-spacing-3xl))}._sidebar_1oaey_9._open_1oaey_81>header{margin-bottom:var(--shape-spacing-md)}._sidebar_1oaey_9._open_1oaey_81>nav{display:block}}
|
package/dist/assets/index31.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._card_tv1p7_1{background-color:var(--colors-semantic-bg-surface);border-radius:var(--shape-border-radius-radius-lg);box-shadow:var(--shape-box-shadow-xs-position-x) var(--shape-box-shadow-xs-position-y) var(--shape-box-shadow-xs-blur) var(--shape-box-shadow-xs-spread) var(--shape-box-shadow-xs-color);min-width:0;overflow:hidden!important;padding:var(--shape-spacing-md);position:relative;text-overflow:ellipsis;transition:background-color var(--utils-tokens-transition-duration) var(--utils-tokens-transition-timing-function),box-shadow var(--utils-tokens-transition-duration) var(--utils-tokens-transition-timing-function),width var(--utils-tokens-transition-duration) var(--utils-tokens-transition-timing-function);width:100%}._card_tv1p7_1 section{display:inline-block;flex:1 1 auto;min-width:0;width:100%}._card_tv1p7_1 ._head_tv1p7_27{align-items:center;display:flex;gap:var(--shape-spacing-xs);max-width:100%}._card_tv1p7_1 ._head_tv1p7_27 header{flex:1 1 auto;margin:0;min-width:0}._card_tv1p7_1 ._head_tv1p7_27._center_tv1p7_39{align-items:center}._card_tv1p7_1 ._head_tv1p7_27 :is(h1,h2,h3,h4,h5,h6):first-child{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._card_tv1p7_1 ._content_tv1p7_51>:last-child{margin-bottom:0}._card_tv1p7_1 ._margin_tv1p7_57{margin-top:var(--shape-spacing-md)}._card_tv1p7_1:has(select),._card_tv1p7_1:has([data-component=popover]){overflow:visible!important}._card_tv1p7_1 [data-component=croppable]{width:100%}._card_tv1p7_1 [data-component=list]{min-width:0}._card_tv1p7_1 [data-component=list] li{max-width:100%;min-width:0}._card_tv1p7_1 [data-component=list] li>a{display:block;max-width:100%;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._card_tv1p7_1 [data-component=list] li>[data-component=file]{width:100%}._clickable_tv1p7_93{cursor:pointer}._clickable_tv1p7_93:hover{background-color:var(--colors-semantic-interactive-hover-subtle);box-shadow:var(--shape-box-shadow-sm-position-x) var(--shape-box-shadow-sm-position-y) var(--shape-box-shadow-sm-blur) var(--shape-box-shadow-sm-spread) var(--shape-box-shadow-sm-color)}._clickable_tv1p7_93:focus-visible{outline:var(--scale-2) solid var(--colors-semantic-border-focus)}._muted_tv1p7_108 ._head_tv1p7_27 :is(header,h1,h2,h3,h4,h5,h6){font-weight:var(--font-font-weight-regular)}._muted_tv1p7_108:not(._selected_tv1p7_113){background-color:transparent}._image-top_tv1p7_118{margin-bottom:var(--shape-spacing-md);width:100%}._image-top_tv1p7_118 img{width:100%;height:calc(12.5 * var(--utils-tokens-unit));-o-object-fit:cover;object-fit:cover}._image-left_tv1p7_129{max-height:calc(8.75 * var(--utils-tokens-unit));max-width:calc(8.75 * var(--utils-tokens-unit));min-height:var(--scale-56);min-width:var(--scale-56)}._image-left_tv1p7_129 img{aspect-ratio:1 / 1}._selected_tv1p7_113{background-color:var(--colors-semantic-interactive-selected);outline:var(--scale-2) solid var(--colors-semantic-primary-primary-subtle-border)}._selected_tv1p7_113:hover{background-color:var(--colors-semantic-interactive-selected)}
|
package/dist/assets/index41.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._empty-
|
|
1
|
+
._empty-state_1byal_3{max-width:calc(30 * var(--utils-tokens-unit));align-items:center;display:flex;flex-direction:column;margin-bottom:var(--shape-spacing-3xl);margin-inline:auto;margin-top:var(--shape-spacing-3xl);text-align:center;width:100%}._empty-state_1byal_3 ._header_1byal_15{font-size:var(--typography-font-sizes-h3);font-weight:var(--font-font-weight-bold);margin-bottom:0}
|
package/dist/assets/index9.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._search_cnh59_3{display:flex;flex-direction:column;gap:var(--shape-spacing-xs);margin-bottom:var(--shape-spacing-lg);width:100%}._search_cnh59_3 [data-component=input]{max-width:calc(30 * var(--utils-tokens-unit))}._controls_cnh59_15{align-items:stretch;display:flex;gap:var(--shape-spacing-xs)}._controls_cnh59_15 label{flex:1}._controls_cnh59_15 button{white-space:nowrap}._chips_cnh59_29{align-items:center;display:flex;flex-wrap:wrap;gap:var(--shape-spacing-xs)}._dialog-content_cnh59_36{min-width:min(24rem,75vw);padding:var(--shape-spacing-xl)}._dialog-content_cnh59_36 h2{margin-top:0}._filter-groups_cnh59_45{display:flex;flex-direction:column;gap:var(--shape-spacing-lg)}._filter-group_cnh59_45{border:0;display:flex;flex-direction:column;gap:var(--shape-spacing-sm);margin:0;padding:0}._filter-group_cnh59_45 legend{font-size:var(--typography-font-sizes-label-md);font-weight:var(--font-font-weight-semibold);margin-bottom:var(--shape-spacing-sm);padding:0}@media (width < 480px){._controls_cnh59_15{align-items:stretch;flex-direction:column}}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index25.css');const s=require("react/jsx-runtime"),l=require("../../classix-5H4IWnMA.cjs"),_=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index25.css');const s=require("react/jsx-runtime"),l=require("../../classix-5H4IWnMA.cjs"),_=require("react"),y=require("../button/index.cjs"),b=require("../icon/index.cjs"),f="_aside_1oaey_3",p="_sidebar_1oaey_9",x="_sticky_1oaey_45",k="_open_1oaey_81",e={aside:f,sidebar:p,sticky:x,open:k},m={default:e.default,sidebar:e.sidebar},g=({children:c,className:n,sticky:d=!1,variant:i="default"})=>{const[t,o]=_.useState(!1);return s.jsxs("aside",{className:l.t(n&&n,t&&e.open,e.aside,d&&e.sticky,m[i]),onClick:u=>{var r;const a=u.target.closest("a[href]");a&&!((r=a.getAttribute("href"))!=null&&r.startsWith("#"))&&o(!1)},"data-component":"aside",children:[i==="sidebar"&&s.jsx(y.Button,{"data-sidebar-toggle":"true",onClick:()=>o(!t),variant:"tertiary",children:s.jsx(b.Icon,{name:t?"x":"menu"})}),c]})};exports.Aside=g;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { t as
|
|
1
|
+
import { jsxs as l, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { t as m } from "../../classix-DG18itHa.js";
|
|
3
3
|
import { useState as p } from "react";
|
|
4
4
|
import { Button as _ } from "../button/index.js";
|
|
5
|
-
import { Icon as
|
|
6
|
-
import '../../assets/index25.css';const
|
|
7
|
-
aside:
|
|
8
|
-
sidebar:
|
|
5
|
+
import { Icon as y } from "../icon/index.js";
|
|
6
|
+
import '../../assets/index25.css';const u = "_aside_1oaey_3", b = "_sidebar_1oaey_9", k = "_sticky_1oaey_45", h = "_open_1oaey_81", e = {
|
|
7
|
+
aside: u,
|
|
8
|
+
sidebar: b,
|
|
9
9
|
sticky: k,
|
|
10
|
-
open:
|
|
11
|
-
},
|
|
12
|
-
default:
|
|
13
|
-
sidebar:
|
|
14
|
-
},
|
|
10
|
+
open: h
|
|
11
|
+
}, g = {
|
|
12
|
+
default: e.default,
|
|
13
|
+
sidebar: e.sidebar
|
|
14
|
+
}, B = ({
|
|
15
15
|
children: d,
|
|
16
16
|
className: s,
|
|
17
17
|
sticky: c = !1,
|
|
18
|
-
variant:
|
|
18
|
+
variant: o = "default"
|
|
19
19
|
}) => {
|
|
20
|
-
const [
|
|
21
|
-
return /* @__PURE__ */
|
|
20
|
+
const [t, a] = p(!1);
|
|
21
|
+
return /* @__PURE__ */ l("aside", { className: m(s && s, t && e.open, e.aside, c && e.sticky, g[o]), onClick: (f) => {
|
|
22
22
|
var r;
|
|
23
|
-
const
|
|
24
|
-
|
|
23
|
+
const i = f.target.closest("a[href]");
|
|
24
|
+
i && !((r = i.getAttribute("href")) != null && r.startsWith("#")) && a(!1);
|
|
25
25
|
}, "data-component": "aside", children: [
|
|
26
|
-
|
|
26
|
+
o === "sidebar" && /* @__PURE__ */ n(_, { "data-sidebar-toggle": "true", onClick: () => a(!t), variant: "tertiary", children: /* @__PURE__ */ n(y, { name: t ? "x" : "menu" }) }),
|
|
27
27
|
d
|
|
28
28
|
] });
|
|
29
29
|
};
|
|
30
30
|
export {
|
|
31
|
-
|
|
31
|
+
B as Aside
|
|
32
32
|
};
|
|
33
33
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index31.css');const e=require("react/jsx-runtime"),d=require("../../classix-5H4IWnMA.cjs"),x=require("../badge/index.cjs"),j=require("../checkbox/index.cjs"),p=require("../figure/index.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index31.css');const e=require("react/jsx-runtime"),d=require("../../classix-5H4IWnMA.cjs"),x=require("../badge/index.cjs"),j=require("../checkbox/index.cjs"),p=require("../figure/index.cjs"),f=require("../icon/index.cjs"),v="_card_tv1p7_1",q="_head_tv1p7_27",y="_center_tv1p7_39",h="_content_tv1p7_51",N="_margin_tv1p7_57",b="_clickable_tv1p7_93",T="_muted_tv1p7_108",k="_selected_tv1p7_113",t={card:v,head:q,center:y,content:h,margin:N,clickable:b,muted:T,selected:k,"image-top":"_image-top_tv1p7_118","image-left":"_image-left_tv1p7_129"},D=({actions:g,badge:l,checkbox:c,children:m,emphasis:_="default",header:o,icon:u,image:r,imagePosition:a="top",onClick:i,variant:s="default"})=>e.jsxs("article",{className:d.t(t.card,_==="muted"&&t.muted,i&&t.clickable,(c==null?void 0:c.checked)&&t.selected),"data-emphasis":_,"data-minimal":s==="minimal",onClick:i,onKeyDown:n=>{i&&n.currentTarget===document.activeElement&&(n.key==="Enter"||n.key===" ")&&(n.preventDefault(),n.currentTarget.click())},tabIndex:i?0:-1,"data-component":"card",children:[r&&s!=="minimal"&&a==="top"&&e.jsx(p.Figure,{className:t[`image-${a}`],children:r}),e.jsxs("section",{children:[e.jsxs("div",{className:d.t(t.head,s==="minimal"&&t.center),children:[c&&e.jsx("span",{onClick:n=>n.stopPropagation(),children:e.jsx(j.Checkbox,{...c})}),r&&s!=="minimal"&&a==="left"&&e.jsx(p.Figure,{className:t[`image-${a}`],children:r}),o,l&&e.jsx(x.Badge,{...l}),u&&e.jsx(f.Icon,{name:u,size:"medium"}),g]}),m&&s!=="minimal"&&e.jsx("div",{className:d.t(t.content,!!o&&t.margin),children:m})]})]});exports.Card=D;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { t as
|
|
1
|
+
import { jsxs as d, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { t as i } from "../../classix-DG18itHa.js";
|
|
3
3
|
import { Badge as g } from "../badge/index.js";
|
|
4
4
|
import { Checkbox as N } from "../checkbox/index.js";
|
|
5
5
|
import { Figure as f } from "../figure/index.js";
|
|
6
6
|
import { Icon as h } from "../icon/index.js";
|
|
7
|
-
import '../../assets/index31.css';const y = "
|
|
7
|
+
import '../../assets/index31.css';const y = "_card_tv1p7_1", j = "_head_tv1p7_27", D = "_center_tv1p7_39", E = "_content_tv1p7_51", I = "_margin_tv1p7_57", T = "_clickable_tv1p7_93", $ = "_muted_tv1p7_108", k = "_selected_tv1p7_113", t = {
|
|
8
8
|
card: y,
|
|
9
9
|
head: j,
|
|
10
10
|
center: D,
|
|
@@ -12,35 +12,35 @@ import '../../assets/index31.css';const y = "_card_1ckti_1", j = "_head_1ckti_27
|
|
|
12
12
|
margin: I,
|
|
13
13
|
clickable: T,
|
|
14
14
|
muted: $,
|
|
15
|
-
selected:
|
|
16
|
-
"image-top": "_image-
|
|
17
|
-
"image-left": "_image-
|
|
15
|
+
selected: k,
|
|
16
|
+
"image-top": "_image-top_tv1p7_118",
|
|
17
|
+
"image-left": "_image-left_tv1p7_129"
|
|
18
18
|
}, A = ({
|
|
19
|
-
actions:
|
|
19
|
+
actions: v,
|
|
20
20
|
badge: s,
|
|
21
|
-
checkbox:
|
|
21
|
+
checkbox: m,
|
|
22
22
|
children: _,
|
|
23
23
|
emphasis: o = "default",
|
|
24
24
|
header: p,
|
|
25
25
|
icon: u,
|
|
26
|
-
image:
|
|
27
|
-
imagePosition:
|
|
28
|
-
onClick:
|
|
29
|
-
variant:
|
|
30
|
-
}) => /* @__PURE__ */
|
|
31
|
-
|
|
32
|
-
}, tabIndex:
|
|
33
|
-
|
|
34
|
-
/* @__PURE__ */
|
|
35
|
-
/* @__PURE__ */
|
|
36
|
-
|
|
37
|
-
|
|
26
|
+
image: a,
|
|
27
|
+
imagePosition: c = "top",
|
|
28
|
+
onClick: l,
|
|
29
|
+
variant: r = "default"
|
|
30
|
+
}) => /* @__PURE__ */ d("article", { className: i(t.card, o === "muted" && t.muted, l && t.clickable, (m == null ? void 0 : m.checked) && t.selected), "data-emphasis": o, "data-minimal": r === "minimal", onClick: l, onKeyDown: (e) => {
|
|
31
|
+
l && e.currentTarget === document.activeElement && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.currentTarget.click());
|
|
32
|
+
}, tabIndex: l ? 0 : -1, "data-component": "card", children: [
|
|
33
|
+
a && r !== "minimal" && c === "top" && /* @__PURE__ */ n(f, { className: t[`image-${c}`], children: a }),
|
|
34
|
+
/* @__PURE__ */ d("section", { children: [
|
|
35
|
+
/* @__PURE__ */ d("div", { className: i(t.head, r === "minimal" && t.center), children: [
|
|
36
|
+
m && /* @__PURE__ */ n("span", { onClick: (e) => e.stopPropagation(), children: /* @__PURE__ */ n(N, { ...m }) }),
|
|
37
|
+
a && r !== "minimal" && c === "left" && /* @__PURE__ */ n(f, { className: t[`image-${c}`], children: a }),
|
|
38
38
|
p,
|
|
39
|
-
s && /* @__PURE__ */
|
|
40
|
-
u && /* @__PURE__ */
|
|
41
|
-
|
|
39
|
+
s && /* @__PURE__ */ n(g, { ...s }),
|
|
40
|
+
u && /* @__PURE__ */ n(h, { name: u, size: "medium" }),
|
|
41
|
+
v
|
|
42
42
|
] }),
|
|
43
|
-
_ &&
|
|
43
|
+
_ && r !== "minimal" && /* @__PURE__ */ n("div", { className: i(t.content, !!p && t.margin), children: _ })
|
|
44
44
|
] })
|
|
45
45
|
] });
|
|
46
46
|
export {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index41.css');const e=require("react/jsx-runtime"),n="
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index41.css');const e=require("react/jsx-runtime"),n="_header_1byal_15",t={"empty-state":"_empty-state_1byal_3",header:n},c=({button:s,content:a,header:r})=>e.jsxs("div",{className:t["empty-state"],"data-component":"emptystate",children:[e.jsx("p",{className:t.header,children:r}),e.jsx("p",{children:a}),s]});exports.EmptyState=c;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/components/empty-state/index.tsx"],"sourcesContent":["import styles from './styles.module.css';\n\nexport type EmptyStateProps = {\n button?: React.ReactNode;\n content: string;\n header: string;\n};\n\nexport const EmptyState = ({ button, content, header }: EmptyStateProps) => {\n return (\n <div className={styles['empty-state']}>\n <p className={styles.header}>{header}</p>\n <p>{content}</p>\n {button}\n </div>\n );\n};\n"],"names":["EmptyState","button","content","header","styles","jsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/components/empty-state/index.tsx"],"sourcesContent":["import styles from './styles.module.css';\n\nexport type EmptyStateProps = {\n button?: React.ReactNode;\n content: string;\n header: string;\n};\n\nexport const EmptyState = ({ button, content, header }: EmptyStateProps) => {\n return (\n <div className={styles['empty-state']}>\n <p className={styles.header}>{header}</p>\n <p>{content}</p>\n {button}\n </div>\n );\n};\n"],"names":["EmptyState","button","content","header","styles","jsx"],"mappings":"4LAQaA,EAAaA,CAAC,CAAEC,OAAAA,EAAQC,QAAAA,EAASC,OAAAA,CAAwB,WAEjE,MAAA,CAAI,UAAWC,EAAO,aAAa,EAAE,iBAAA,aACpC,SAAA,CAAAC,EAAAA,IAAC,IAAA,CAAE,UAAWD,EAAOD,OAASA,SAAAA,EAAO,EACrCE,EAAAA,IAAC,KAAGH,SAAAA,CAAAA,CAAQ,EACXD,CAAAA,EACH"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsxs as m, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import '../../assets/index41.css';const p = "
|
|
3
|
-
"empty-state": "_empty-
|
|
2
|
+
import '../../assets/index41.css';const p = "_header_1byal_15", t = {
|
|
3
|
+
"empty-state": "_empty-state_1byal_3",
|
|
4
4
|
header: p
|
|
5
5
|
}, d = ({
|
|
6
|
-
button:
|
|
7
|
-
content:
|
|
6
|
+
button: a,
|
|
7
|
+
content: s,
|
|
8
8
|
header: r
|
|
9
9
|
}) => /* @__PURE__ */ m("div", { className: t["empty-state"], "data-component": "emptystate", children: [
|
|
10
10
|
/* @__PURE__ */ e("p", { className: t.header, children: r }),
|
|
11
|
-
/* @__PURE__ */ e("p", { children:
|
|
12
|
-
|
|
11
|
+
/* @__PURE__ */ e("p", { children: s }),
|
|
12
|
+
a
|
|
13
13
|
] });
|
|
14
14
|
export {
|
|
15
15
|
d as EmptyState
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index13.css');const s=require("react/jsx-runtime"),S=require("../../classix-5H4IWnMA.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index13.css');const s=require("react/jsx-runtime"),S=require("../../classix-5H4IWnMA.cjs"),o=require("react"),v=require("../editor/index.cjs"),L=require("../list/index.cjs"),w=require("../message/index.cjs"),E="_messages_1e940_1",I="_fill_1e940_16",m={messages:E,fill:I},h=({fill:g=!1,files:i,handleUpload:f,maxEditorRows:p=5,message:r="",messages:t,minEditorRows:_=1,onChange:x,onFilesChange:n,onSubmit:q,placeholder:b,sending:j})=>{var u;const c=o.useRef(null),[y,R]=o.useState([]),l=i??y,a=(u=t[t.length-1])==null?void 0:u.id,M=r.replace(/<[^>]*>/g,"").replace(/ /g," ").trim()==="";return o.useLayoutEffect(()=>{var d;const e=(d=c.current)==null?void 0:d.querySelector("[data-message-list]");!e||a===void 0||(e.scrollTop=e.scrollHeight)},[a]),s.jsxs("div",{className:S.t(m.messages,g&&m.fill),"data-component":"messages",ref:c,children:[s.jsx(L.List,{"data-message-list":!0,children:t.map(e=>s.jsx(w.Message,{...e},e.id))}),s.jsx(v.Editor,{autofocus:!0,content:r,disabled:j||M&&l.length===0,files:l,maxRows:p,minRows:_,onChange:x,onFilesChange:e=>{i===void 0&&R(e),n==null||n(e)},onSubmit:q,onUpload:f,placeholder:b,submitLabel:"Send message"})]})};exports.Messages=h;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -4,7 +4,7 @@ import { useRef as I, useState as M, useLayoutEffect as S } from "react";
|
|
|
4
4
|
import { Editor as h } from "../editor/index.js";
|
|
5
5
|
import { List as j } from "../list/index.js";
|
|
6
6
|
import { Message as q } from "../message/index.js";
|
|
7
|
-
import '../../assets/index13.css';const H = "
|
|
7
|
+
import '../../assets/index13.css';const H = "_messages_1e940_1", N = "_fill_1e940_16", f = {
|
|
8
8
|
messages: H,
|
|
9
9
|
fill: N
|
|
10
10
|
}, D = ({
|
|
@@ -12,7 +12,7 @@ import '../../assets/index13.css';const H = "_messages_2mrni_1", N = "_fill_2mrn
|
|
|
12
12
|
files: r,
|
|
13
13
|
handleUpload: u,
|
|
14
14
|
maxEditorRows: p = 5,
|
|
15
|
-
message:
|
|
15
|
+
message: l = "",
|
|
16
16
|
messages: e,
|
|
17
17
|
minEditorRows: g = 1,
|
|
18
18
|
onChange: _,
|
|
@@ -22,14 +22,14 @@ import '../../assets/index13.css';const H = "_messages_2mrni_1", N = "_fill_2mrn
|
|
|
22
22
|
sending: L
|
|
23
23
|
}) => {
|
|
24
24
|
var n;
|
|
25
|
-
const
|
|
25
|
+
const i = I(null), [R, v] = M([]), a = r ?? R, m = (n = e[e.length - 1]) == null ? void 0 : n.id, w = l.replace(/<[^>]*>/g, "").replace(/ /g, " ").trim() === "";
|
|
26
26
|
return S(() => {
|
|
27
27
|
var c;
|
|
28
|
-
const s = (c =
|
|
29
|
-
!s ||
|
|
30
|
-
}, [
|
|
28
|
+
const s = (c = i.current) == null ? void 0 : c.querySelector("[data-message-list]");
|
|
29
|
+
!s || m === void 0 || (s.scrollTop = s.scrollHeight);
|
|
30
|
+
}, [m]), /* @__PURE__ */ x("div", { className: E(f.messages, d && f.fill), "data-component": "messages", ref: i, children: [
|
|
31
31
|
/* @__PURE__ */ o(j, { "data-message-list": !0, children: e.map((s) => /* @__PURE__ */ o(q, { ...s }, s.id)) }),
|
|
32
|
-
/* @__PURE__ */ o(h, { autofocus: !0, content:
|
|
32
|
+
/* @__PURE__ */ o(h, { autofocus: !0, content: l, disabled: L || w && a.length === 0, files: a, maxRows: p, minRows: g, onChange: _, onFilesChange: (s) => {
|
|
33
33
|
r === void 0 && v(s), t == null || t(s);
|
|
34
34
|
}, onSubmit: b, onUpload: u, placeholder: y, submitLabel: "Send message" })
|
|
35
35
|
] });
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index9.css');const n=require("react/jsx-runtime"),u=require("react"),p=require("../button/index.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index9.css');const n=require("react/jsx-runtime"),u=require("react"),p=require("../button/index.cjs"),N=require("../checkbox/index.cjs"),M=require("../chip/index.cjs"),w=require("../controls/index.cjs"),C=require("../dialog/index.cjs"),I=require("../../index-iItPktfX.cjs"),O="_search_cnh59_3",R="_controls_cnh59_15",B="_chips_cnh59_29",c={search:O,controls:R,chips:B,"dialog-content":"_dialog-content_cnh59_36","filter-groups":"_filter-groups_cnh59_45","filter-group":"_filter-group_cnh59_45"},S=({closeLabel:m="Close",filterButtonLabel:_="Filters",filterDialogTitle:b="Filters",filterGroups:l=[],onChange:g,onSelectedFiltersChange:o,removeFilterLabel:j=i=>`Remove ${i.label} filter`,resetLabel:v="Reset",searchLabel:y="Search",searchPlaceholder:f="Search",selectedFilters:t=[],value:k=""})=>{const i=u.useId(),[x,r]=u.useState(!1),q=u.useMemo(()=>new Map(l.flatMap(e=>e.options).map(e=>[e.value,e])),[l]),h=t.flatMap(e=>{const s=q.get(e);return s?[s]:[]}),d=(e,s)=>{o&&o(s?[...new Set([...t,e])]:t.filter(a=>a!==e))};return n.jsxs("div",{className:c.search,"data-component":"search",children:[n.jsxs("div",{className:c.controls,children:[n.jsx(I.Input,{"aria-label":y,icon:"search",onChange:e=>g(e.target.value),placeholder:f,type:"search",value:k}),l.length>0&&n.jsx(p.Button,{"aria-expanded":x,"aria-haspopup":"dialog",badge:h.length,icon:"funnel",onClick:()=>r(!0),variant:"tertiary",children:_})]}),h.length>0&&n.jsxs("div",{"aria-label":_,className:c.chips,children:[h.map(e=>n.jsx(M.Chip,{accessibleLabel:j(e),label:e.label,onClick:()=>d(e.value,!1),onKeyDown:s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),d(e.value,!1))},role:"button"},e.value)),n.jsx(p.Button,{onClick:()=>o==null?void 0:o([]),variant:"tertiary",children:v})]}),x&&n.jsx(C.Dialog,{"aria-labelledby":i,onKeyDown:e=>{e.key==="Escape"&&r(!1)},open:!0,setOpen:r,children:n.jsxs("div",{className:c["dialog-content"],children:[n.jsx("h2",{id:i,children:b}),n.jsx("div",{className:c["filter-groups"],children:l.map((e,s)=>n.jsxs("fieldset",{className:c["filter-group"],children:[e.label&&n.jsx("legend",{children:e.label}),e.options.map(a=>n.jsx(N.Checkbox,{checked:t.includes(a.value),label:a.label,onChange:D=>d(a.value,D.target.checked)},a.value))]},e.label??s))}),n.jsx(w.Controls,{children:n.jsx(p.Button,{onClick:()=>r(!1),children:m})})]})})]})};exports.Search=S;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useId as
|
|
1
|
+
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useId as w, useState as C, useMemo as M } from "react";
|
|
3
3
|
import { Button as m } from "../button/index.js";
|
|
4
|
-
import { Checkbox as
|
|
5
|
-
import { Chip as
|
|
4
|
+
import { Checkbox as O } from "../checkbox/index.js";
|
|
5
|
+
import { Chip as j } from "../chip/index.js";
|
|
6
6
|
import { Controls as E } from "../controls/index.js";
|
|
7
7
|
import { Dialog as K } from "../dialog/index.js";
|
|
8
8
|
import { I as R } from "../../index-DS2cY2g4.js";
|
|
9
|
-
import '../../assets/index9.css';const B = "
|
|
9
|
+
import '../../assets/index9.css';const B = "_search_cnh59_3", T = "_controls_cnh59_15", $ = "_chips_cnh59_29", n = {
|
|
10
10
|
search: B,
|
|
11
11
|
controls: T,
|
|
12
12
|
chips: $,
|
|
13
|
-
"dialog-content": "_dialog-
|
|
14
|
-
"filter-groups": "_filter-
|
|
15
|
-
"filter-group": "_filter-
|
|
13
|
+
"dialog-content": "_dialog-content_cnh59_36",
|
|
14
|
+
"filter-groups": "_filter-groups_cnh59_45",
|
|
15
|
+
"filter-group": "_filter-group_cnh59_45"
|
|
16
16
|
}, S = ({
|
|
17
17
|
closeLabel: _ = "Close",
|
|
18
18
|
filterButtonLabel: u = "Filters",
|
|
19
19
|
filterDialogTitle: b = "Filters",
|
|
20
20
|
filterGroups: i = [],
|
|
21
21
|
onChange: v,
|
|
22
|
-
onSelectedFiltersChange:
|
|
22
|
+
onSelectedFiltersChange: c,
|
|
23
23
|
removeFilterLabel: g = (t) => `Remove ${t.label} filter`,
|
|
24
24
|
resetLabel: y = "Reset",
|
|
25
25
|
searchLabel: k = "Search",
|
|
26
|
-
searchPlaceholder:
|
|
26
|
+
searchPlaceholder: D = "Search",
|
|
27
27
|
selectedFilters: s = [],
|
|
28
|
-
value:
|
|
28
|
+
value: N = ""
|
|
29
29
|
}) => {
|
|
30
|
-
const t =
|
|
31
|
-
const l =
|
|
30
|
+
const t = w(), [f, h] = C(!1), x = M(() => new Map(i.flatMap((a) => a.options).map((a) => [a.value, a])), [i]), p = s.flatMap((a) => {
|
|
31
|
+
const l = x.get(a);
|
|
32
32
|
return l ? [l] : [];
|
|
33
33
|
}), d = (a, l) => {
|
|
34
|
-
|
|
34
|
+
c && c(l ? [.../* @__PURE__ */ new Set([...s, a])] : s.filter((o) => o !== a));
|
|
35
35
|
};
|
|
36
|
-
return /* @__PURE__ */
|
|
37
|
-
/* @__PURE__ */
|
|
38
|
-
/* @__PURE__ */ e(R, { "aria-label": k, icon: "search", onChange: (a) => v(a.target.value), placeholder:
|
|
36
|
+
return /* @__PURE__ */ r("div", { className: n.search, "data-component": "search", children: [
|
|
37
|
+
/* @__PURE__ */ r("div", { className: n.controls, children: [
|
|
38
|
+
/* @__PURE__ */ e(R, { "aria-label": k, icon: "search", onChange: (a) => v(a.target.value), placeholder: D, type: "search", value: N }),
|
|
39
39
|
i.length > 0 && /* @__PURE__ */ e(m, { "aria-expanded": f, "aria-haspopup": "dialog", badge: p.length, icon: "funnel", onClick: () => h(!0), variant: "tertiary", children: u })
|
|
40
40
|
] }),
|
|
41
|
-
p.length > 0 && /* @__PURE__ */
|
|
42
|
-
p.map((a) => /* @__PURE__ */ e(
|
|
41
|
+
p.length > 0 && /* @__PURE__ */ r("div", { "aria-label": u, className: n.chips, children: [
|
|
42
|
+
p.map((a) => /* @__PURE__ */ e(j, { accessibleLabel: g(a), label: a.label, onClick: () => d(a.value, !1), onKeyDown: (l) => {
|
|
43
43
|
(l.key === "Enter" || l.key === " ") && (l.preventDefault(), d(a.value, !1));
|
|
44
44
|
}, role: "button" }, a.value)),
|
|
45
|
-
/* @__PURE__ */ e(m, { onClick: () =>
|
|
45
|
+
/* @__PURE__ */ e(m, { onClick: () => c == null ? void 0 : c([]), variant: "tertiary", children: y })
|
|
46
46
|
] }),
|
|
47
47
|
f && /* @__PURE__ */ e(K, { "aria-labelledby": t, onKeyDown: (a) => {
|
|
48
48
|
a.key === "Escape" && h(!1);
|
|
49
|
-
}, open: !0, setOpen: h, children: /* @__PURE__ */
|
|
49
|
+
}, open: !0, setOpen: h, children: /* @__PURE__ */ r("div", { className: n["dialog-content"], children: [
|
|
50
50
|
/* @__PURE__ */ e("h2", { id: t, children: b }),
|
|
51
|
-
/* @__PURE__ */ e("div", { className:
|
|
51
|
+
/* @__PURE__ */ e("div", { className: n["filter-groups"], children: i.map((a, l) => /* @__PURE__ */ r("fieldset", { className: n["filter-group"], children: [
|
|
52
52
|
a.label && /* @__PURE__ */ e("legend", { children: a.label }),
|
|
53
|
-
a.options.map((o) => /* @__PURE__ */ e(
|
|
53
|
+
a.options.map((o) => /* @__PURE__ */ e(O, { checked: s.includes(o.value), label: o.label, onChange: (I) => d(o.value, I.target.checked) }, o.value))
|
|
54
54
|
] }, a.label ?? l)) }),
|
|
55
55
|
/* @__PURE__ */ e(E, { children: /* @__PURE__ */ e(m, { onClick: () => h(!1), children: _ }) })
|
|
56
56
|
] }) })
|
package/dist/tokens.json
CHANGED