@solibo/solibo-ui 1.0.1 → 1.0.3
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/index10.css +1 -1
- package/dist/assets/index11.css +1 -1
- package/dist/assets/index12.css +1 -1
- package/dist/assets/index13.css +1 -1
- package/dist/assets/index14.css +1 -1
- package/dist/assets/index15.css +1 -1
- package/dist/assets/index16.css +1 -1
- package/dist/assets/index17.css +1 -1
- package/dist/assets/index18.css +1 -1
- package/dist/assets/index19.css +1 -1
- package/dist/assets/index20.css +1 -0
- package/dist/assets/index21.css +0 -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/index3.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/index4.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/index5.css +1 -1
- package/dist/assets/index50.css +1 -1
- package/dist/assets/index51.css +1 -1
- package/dist/assets/index52.css +1 -0
- package/dist/assets/index6.css +1 -1
- package/dist/assets/index7.css +1 -1
- package/dist/assets/index8.css +1 -1
- package/dist/assets/index9.css +1 -1
- package/dist/components/app-link/index.cjs +1 -1
- package/dist/components/app-link/index.js +1 -1
- package/dist/components/aside/index.cjs +1 -1
- package/dist/components/aside/index.js +16 -16
- 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 +1 -1
- package/dist/components/card/index.cjs +1 -1
- package/dist/components/card/index.js +24 -24
- 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/collapsible/index.cjs +1 -1
- package/dist/components/collapsible/index.js +1 -1
- package/dist/components/controls/index.cjs +1 -1
- package/dist/components/controls/index.js +1 -1
- 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/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 +2 -2
- 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/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/header/index.cjs +1 -1
- package/dist/components/header/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 +1 -1
- package/dist/components/image/index.cjs +1 -1
- package/dist/components/image/index.js +1 -1
- 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/menu/index.cjs +1 -1
- package/dist/components/menu/index.js +1 -1
- package/dist/components/message/index.cjs +1 -1
- package/dist/components/message/index.js +1 -1
- package/dist/components/messages/index.cjs +1 -1
- package/dist/components/messages/index.js +7 -7
- package/dist/components/nav/index.cjs +1 -1
- package/dist/components/nav/index.js +17 -17
- package/dist/components/object/index.cjs +1 -1
- package/dist/components/object/index.js +1 -1
- package/dist/components/popover/index.cjs +1 -1
- package/dist/components/popover/index.js +1 -1
- package/dist/components/portal/index.cjs +1 -1
- package/dist/components/portal/index.js +18 -18
- package/dist/components/search/index.cjs +1 -1
- package/dist/components/search/index.js +24 -24
- package/dist/components/select/index.cjs +1 -1
- package/dist/components/select/index.js +1 -1
- package/dist/components/sortable/index.cjs +1 -1
- package/dist/components/sortable/index.js +1 -1
- package/dist/components/table/index.cjs +1 -1
- package/dist/components/table/index.js +1 -1
- package/dist/components/textarea/index.cjs +1 -1
- package/dist/components/textarea/index.js +1 -1
- package/dist/components/toast/index.cjs +1 -1
- package/dist/components/toast/index.js +1 -1
- package/dist/components/toasts/index.cjs +1 -1
- package/dist/components/toasts/index.js +1 -1
- package/dist/components/toggle/index.cjs +1 -1
- package/dist/components/toggle/index.js +1 -1
- package/dist/components/toolbar/index.cjs +1 -1
- package/dist/components/toolbar/index.js +1 -1
- package/dist/components/tooltip/index.cjs +2 -0
- package/dist/components/tooltip/index.cjs.map +1 -0
- package/dist/components/tooltip/index.js +21 -0
- package/dist/components/tooltip/index.js.map +1 -0
- package/dist/{index-D-AyCDg7.js → index-B9xtLe2w.js} +2 -2
- package/dist/{index-D-AyCDg7.js.map → index-B9xtLe2w.js.map} +1 -1
- package/dist/{index-iItPktfX.cjs → index-CP5A_BGJ.cjs} +2 -2
- package/dist/{index-iItPktfX.cjs.map → index-CP5A_BGJ.cjs.map} +1 -1
- package/dist/{index-DS2cY2g4.js → index-DFXqYJat.js} +2 -2
- package/dist/{index-DS2cY2g4.js.map → index-DFXqYJat.js.map} +1 -1
- package/dist/{index-BOkkyMbX.cjs → index-N4IMha5Q.cjs} +2 -2
- package/dist/{index-BOkkyMbX.cjs.map → index-N4IMha5Q.cjs.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +13 -0
- package/dist/index.js +14 -12
- package/dist/index.js.map +1 -1
- package/dist/tokens.json +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index15.css');const e=require("react/jsx-runtime"),p=require("../../classix-5H4IWnMA.cjs"),v=require("../avatar/index.cjs"),x=require("../icon/index.cjs"),b="_message_ugbdy_1",y="_timestamp_ugbdy_78",j="_attachments_ugbdy_83",h="_preview_ugbdy_101",s={"message-group":"_message-group_ugbdy_1",message:b,timestamp:y,attachments:j,preview:h},f=({appearance:m="default",attachments:i,author:a,authorColor:r,authorImageUrl:o,authorRole:d,content:g,iconName:l="info",id:_,preview:u,timestamp:c,type:t="default"})=>{const n=c?new Date(c):void 0;return e.jsxs("div",{className:s["message-group"],"data-message-type":t,"data-component":"message",children:[a&&e.jsx(v.Avatar,{accessibleLabel:a,color:r,imageUrl:o,name:a,role:d}),e.jsxs("div",{className:p.t(s.message,u&&s.preview),"data-appearance":m,"data-id":_,"data-type":t,children:[t=="system"&&e.jsx(x.Icon,{fill:!0,gap:"right",name:l}),g]}),i&&e.jsx("div",{className:s.attachments,children:i}),n&&e.jsx("time",{className:s.timestamp,dateTime:n.toISOString(),children:n.toLocaleString()})]})};exports.Message=f;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -2,7 +2,7 @@ import { jsxs as o, jsx as a } from "react/jsx-runtime";
|
|
|
2
2
|
import { t as v } from "../../classix-DG18itHa.js";
|
|
3
3
|
import { Avatar as f } from "../avatar/index.js";
|
|
4
4
|
import { Icon as b } from "../icon/index.js";
|
|
5
|
-
import '../../assets/
|
|
5
|
+
import '../../assets/index15.css';const y = "_message_ugbdy_1", h = "_timestamp_ugbdy_78", w = "_attachments_ugbdy_83", N = "_preview_ugbdy_101", e = {
|
|
6
6
|
"message-group": "_message-group_ugbdy_1",
|
|
7
7
|
message: y,
|
|
8
8
|
timestamp: h,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index14.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/
|
|
7
|
+
import '../../assets/index14.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/
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index13.css');const _=require("react/jsx-runtime"),p=require("../../classix-5H4IWnMA.cjs"),b=require("react"),f=require("../../icons-DYCSlAoX.cjs"),v="_nav_1s9ne_3",h="_horizontal_1s9ne_9",g="_sidebar_1s9ne_19",m="_tabs_1s9ne_60",w="_pills_1s9ne_80",t={nav:v,horizontal:h,sidebar:g,tabs:m,pills:w},q={default:t.default,pills:t.pills,sidebar:t.sidebar,tabs:t.tabs},x=({animation:i,children:o,className:r,horizontal:s=!1,variant:e="default",...l})=>{const[c,a]=b.useState(!1),d={"--icon-svg":f.iconSVG("chevron")};return _.jsx("nav",{className:p.t(r,s&&t.horizontal,t.nav,q[e]),"data-animation":i,"data-open":c?"true":"false","data-orientation":s?"horizontal":"vertical",onBlurCapture:n=>{if(e!=="pills"||window.innerWidth>960)return;const u=n.relatedTarget;n.currentTarget.contains(u)||a(!1)},onClick:()=>{e!=="pills"||window.innerWidth>960||a(n=>!n)},style:d,...l,"data-component":"nav",children:o})};exports.Nav=x;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { t as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { i as
|
|
5
|
-
import '../../assets/
|
|
1
|
+
import { jsx as _ } from "react/jsx-runtime";
|
|
2
|
+
import { t as f } from "../../classix-DG18itHa.js";
|
|
3
|
+
import { useState as m } from "react";
|
|
4
|
+
import { i as u } from "../../icons-CKzd_L4D.js";
|
|
5
|
+
import '../../assets/index13.css';const b = "_nav_1s9ne_3", v = "_horizontal_1s9ne_9", h = "_sidebar_1s9ne_19", w = "_tabs_1s9ne_60", z = "_pills_1s9ne_80", t = {
|
|
6
6
|
nav: b,
|
|
7
7
|
horizontal: v,
|
|
8
8
|
sidebar: h,
|
|
@@ -14,23 +14,23 @@ import '../../assets/index12.css';const b = "_nav_1u1d4_3", v = "_horizontal_1u1
|
|
|
14
14
|
sidebar: t.sidebar,
|
|
15
15
|
tabs: t.tabs
|
|
16
16
|
}, S = ({
|
|
17
|
-
animation:
|
|
18
|
-
children:
|
|
17
|
+
animation: o,
|
|
18
|
+
children: i,
|
|
19
19
|
className: r,
|
|
20
|
-
horizontal:
|
|
21
|
-
variant:
|
|
20
|
+
horizontal: a = !1,
|
|
21
|
+
variant: s = "default",
|
|
22
22
|
...l
|
|
23
23
|
}) => {
|
|
24
|
-
const [
|
|
25
|
-
"--icon-svg":
|
|
24
|
+
const [c, e] = m(!1), d = {
|
|
25
|
+
"--icon-svg": u("chevron")
|
|
26
26
|
};
|
|
27
|
-
return /* @__PURE__ */
|
|
28
|
-
if (
|
|
29
|
-
const p =
|
|
30
|
-
|
|
27
|
+
return /* @__PURE__ */ _("nav", { className: f(r, a && t.horizontal, t.nav, g[s]), "data-animation": o, "data-open": c ? "true" : "false", "data-orientation": a ? "horizontal" : "vertical", onBlurCapture: (n) => {
|
|
28
|
+
if (s !== "pills" || window.innerWidth > 960) return;
|
|
29
|
+
const p = n.relatedTarget;
|
|
30
|
+
n.currentTarget.contains(p) || e(!1);
|
|
31
31
|
}, onClick: () => {
|
|
32
|
-
|
|
33
|
-
}, style:
|
|
32
|
+
s !== "pills" || window.innerWidth > 960 || e((n) => !n);
|
|
33
|
+
}, style: d, ...l, "data-component": "nav", children: i });
|
|
34
34
|
};
|
|
35
35
|
export {
|
|
36
36
|
S as Nav
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index12.css');const e=require("react/jsx-runtime"),n="_object_xxgm1_1",s={object:n},a=({accessibleLabel:c,url:t,...o})=>e.jsx("object",{"aria-label":c,className:s.object,data:t,type:"application/pdf",...o,"data-component":"objectcomponent",children:t&&e.jsxs(e.Fragment,{children:["We cannot show this file. You can try accessing it directly:",e.jsx("br",{}),e.jsx("a",{href:t,children:t})]})});exports.Object=a;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index17.css');const a=require("react/jsx-runtime"),g=require("../../classix-5H4IWnMA.cjs"),o=require("react"),R=require("../button/index.cjs"),x="_popover_ttn4t_1",P="_left_ttn4t_23",k="_right_ttn4t_28",F="_trigger_ttn4t_33",s={popover:x,"popover-panel":"_popover-panel_ttn4t_6",left:P,right:k,trigger:F},b=({children:i,position:_="left",triggerAccessibleLabel:m,triggerAriaHasPopup:y,triggerButtonContent:w})=>{const u=o.useRef(null),l=o.useRef(void 0),p=o.useId(),f=o.useRef(null),[t,d]=o.useState(!1),c=({initialFocus:e}={})=>{l.current=e,d(!0)},n=o.useCallback(({restoreFocus:e=!0}={})=>{var r;d(!1),e&&((r=f.current)==null||r.focus())},[]),h=e=>{t&&e.key==="Escape"&&n()},D=e=>{if(!t){if(e.key==="ArrowDown"){e.preventDefault(),c({initialFocus:"first"});return}e.key==="ArrowUp"&&(e.preventDefault(),c({initialFocus:"last"}))}};return o.useEffect(()=>{if(!t)return;const e=r=>{var v;(v=u.current)!=null&&v.contains(r.target)||n({restoreFocus:!1})};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[n,t]),a.jsxs("div",{className:s.popover,onKeyDown:h,onClick:e=>e.stopPropagation(),ref:u,"data-component":"popover",children:[a.jsx(R.Button,{"aria-controls":t?p:void 0,"aria-expanded":t,"aria-haspopup":y,"aria-label":m,className:g.t(s.trigger),onKeyDown:D,onClick:()=>t?n({restoreFocus:!1}):c(),ref:f,variant:"secondary",children:w}),t&&a.jsx("div",{className:g.t(s["popover-panel"],s[_]),id:p,children:typeof i=="function"?i({close:n,initialFocus:l.current,isOpen:t}):i})]})};exports.Popover=b;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -2,7 +2,7 @@ import { jsxs as k, jsx as v } from "react/jsx-runtime";
|
|
|
2
2
|
import { t as g } from "../../classix-DG18itHa.js";
|
|
3
3
|
import { useRef as a, useId as F, useState as P, useCallback as x, useEffect as E } from "react";
|
|
4
4
|
import { Button as K } from "../button/index.js";
|
|
5
|
-
import '../../assets/
|
|
5
|
+
import '../../assets/index17.css';const R = "_popover_ttn4t_1", C = "_left_ttn4t_23", I = "_right_ttn4t_28", N = "_trigger_ttn4t_33", n = {
|
|
6
6
|
popover: R,
|
|
7
7
|
"popover-panel": "_popover-panel_ttn4t_6",
|
|
8
8
|
left: C,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index11.css');const e=require("react/jsx-runtime"),r=require("../../classix-5H4IWnMA.cjs"),c=require("../button/index.cjs"),a=require("../icon/index.cjs"),u=require("../aside/index.cjs"),l=require("../branding/index.cjs"),_=require("../figure/index.cjs"),d=require("../nav/index.cjs"),g="_portal_1uuei_39",p="_content_1uuei_266",x="_toggle_1uuei_273",m="_open_1uuei_337",n={portal:g,content:p,toggle:x,open:m},j=({children:t,portals:o,open:s,setOpen:i})=>e.jsxs(u.Aside,{className:r.t(n.portal,s&&n.open),sticky:!0,"data-component":"portal",children:[e.jsx(c.Button,{className:n.toggle,onClick:()=>i(!s),variant:"tertiary",children:e.jsx(a.Icon,{name:"sidebar"})}),e.jsx(_.Figure,{children:e.jsx(l.Branding,{name:"logo",size:48,variant:"white"})}),e.jsxs("div",{className:n.content,children:[o&&e.jsx(d.Nav,{horizontal:!0,children:o}),t&&t]})]});exports.Portal=j;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { t as
|
|
3
|
-
import { Button as
|
|
4
|
-
import { Icon as
|
|
1
|
+
import { jsxs as i, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { t as m } from "../../classix-DG18itHa.js";
|
|
3
|
+
import { Button as c } from "../button/index.js";
|
|
4
|
+
import { Icon as l } from "../icon/index.js";
|
|
5
5
|
import { Aside as s } from "../aside/index.js";
|
|
6
6
|
import { Branding as p } from "../branding/index.js";
|
|
7
|
-
import { Figure as
|
|
8
|
-
import { Nav as
|
|
9
|
-
import '../../assets/
|
|
10
|
-
portal:
|
|
11
|
-
content:
|
|
12
|
-
toggle:
|
|
7
|
+
import { Figure as u } from "../figure/index.js";
|
|
8
|
+
import { Nav as _ } from "../nav/index.js";
|
|
9
|
+
import '../../assets/index11.css';const g = "_portal_1uuei_39", d = "_content_1uuei_266", f = "_toggle_1uuei_273", h = "_open_1uuei_337", t = {
|
|
10
|
+
portal: g,
|
|
11
|
+
content: d,
|
|
12
|
+
toggle: f,
|
|
13
13
|
open: h
|
|
14
14
|
}, b = ({
|
|
15
15
|
children: r,
|
|
16
|
-
portals:
|
|
17
|
-
open:
|
|
18
|
-
setOpen:
|
|
19
|
-
}) => /* @__PURE__ */
|
|
20
|
-
/* @__PURE__ */ o(
|
|
21
|
-
/* @__PURE__ */ o(
|
|
22
|
-
/* @__PURE__ */
|
|
23
|
-
|
|
16
|
+
portals: e,
|
|
17
|
+
open: n,
|
|
18
|
+
setOpen: a
|
|
19
|
+
}) => /* @__PURE__ */ i(s, { className: m(t.portal, n && t.open), sticky: !0, "data-component": "portal", children: [
|
|
20
|
+
/* @__PURE__ */ o(c, { className: t.toggle, onClick: () => a(!n), variant: "tertiary", children: /* @__PURE__ */ o(l, { name: "sidebar" }) }),
|
|
21
|
+
/* @__PURE__ */ o(u, { children: /* @__PURE__ */ o(p, { name: "logo", size: 48, variant: "white" }) }),
|
|
22
|
+
/* @__PURE__ */ i("div", { className: t.content, children: [
|
|
23
|
+
e && /* @__PURE__ */ o(_, { horizontal: !0, children: e }),
|
|
24
24
|
r && r
|
|
25
25
|
] })
|
|
26
26
|
] });
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index10.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-CP5A_BGJ.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
|
-
import { I as R } from "../../index-
|
|
9
|
-
import '../../assets/
|
|
8
|
+
import { I as R } from "../../index-DFXqYJat.js";
|
|
9
|
+
import '../../assets/index10.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
|
] }) })
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react/jsx-runtime");require("../../classix-5H4IWnMA.cjs");require("../../icons-DYCSlAoX.cjs");const e=require("../../index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react/jsx-runtime");require("../../classix-5H4IWnMA.cjs");require("../../icons-DYCSlAoX.cjs");const e=require("../../index-N4IMha5Q.cjs");require("../../use-touched-D_TJ8wDc.cjs");exports.Select=e.Select;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "../../classix-DG18itHa.js";
|
|
3
3
|
import "../../icons-CKzd_L4D.js";
|
|
4
|
-
import { S as e } from "../../index-
|
|
4
|
+
import { S as e } from "../../index-B9xtLe2w.js";
|
|
5
5
|
import "../../use-touched-DXIJVVzz.js";
|
|
6
6
|
export {
|
|
7
7
|
e as Select
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index9.css');const H=require("react/jsx-runtime"),O=require("../../classix-5H4IWnMA.cjs"),c=require("react"),G=require("../list/index.cjs"),J="_sortable_12gha_1",K="_dragging_12gha_13",Q="_dropping_12gha_28",tt="_columns_12gha_42",et="_pseudo_12gha_51",f={sortable:J,dragging:K,dropping:Q,columns:tt,pseudo:et,"target-above":"_target-above_12gha_66","target-below":"_target-below_12gha_67"},X=c.createContext(null);function nt(){return c.useContext(X)}function rt({children:M,className:$,columns:E=1,isRearranging:x=!1,onChangeOrder:k,...A}){const B=Number.isFinite(E)?Math.max(1,Math.floor(E)):1,S=c.useMemo(()=>c.Children.toArray(M),[M]),u=c.useRef(-1),R=c.useMemo(()=>typeof window<"u"&&(navigator.maxTouchPoints>0||window.matchMedia("(pointer: coarse)").matches),[]),i=c.useRef(!1),D=c.useRef(null),v=c.useRef(null),b=c.useRef(null),T=c.useRef(!1),_=c.useRef(null),d=c.useRef(null),[w,F]=c.useState({height:0,width:0}),[h,g]=c.useState(null),[z,q]=c.useState(null),L={...A.style,"--height":`calc(${w.height}px - var(--scale-16))`,"--width":B>1?`calc(${w.width}px - var(--scale-16))`:`${w.width}px`},V=o=>{k(o.map((t,s)=>({id:String(c.isValidElement(t)?t.props["data-id"]??`idx-${s}`:`idx-${s}`),weight:o.length-1-s})))},y=(o,t)=>{if(t<0||t>=S.length||o===t)return;const s=S.slice(),[e]=s.splice(o,1);s.splice(t,0,e),q(t),V(s)},m=()=>{v.current!==null&&(clearTimeout(v.current),v.current=null)},C=()=>{d.current!==null&&(cancelAnimationFrame(d.current),d.current=null)},W=o=>{let t=(o==null?void 0:o.parentElement)??null;for(;t;){const{overflowY:s}=window.getComputedStyle(t);if(/(auto|scroll|overlay)/.test(s)&&t.scrollHeight>t.clientHeight)return t;t=t.parentElement}return document.scrollingElement instanceof HTMLElement?document.scrollingElement:null},P=()=>{m(),C(),_.current=null,i.current=!1,D.current=null,b.current=null,T.current=!1,u.current=-1,g(null)},U=o=>o instanceof Element&&!!o.closest('button, a, input, textarea, select, option, [role="button"], [contenteditable="true"]'),Y=(o,t)=>{var N;const s=(N=document.elementFromPoint(o,t))==null?void 0:N.closest("[data-sortable-index]");if(!s)return;const e=Number(s.dataset.sortableIndex),n=u.current;if(!Number.isInteger(e)||n<0||e===n)return;const r=s.getBoundingClientRect(),a=e===n+1?w.height:r.height,l=t>r.top+a/2?e+1:e,I=l>n?l-1:l;D.current=I,g(I)},Z=o=>{const t=W(o);if(!t)return;const s=72,e=18,n=()=>{if(!i.current){d.current=null;return}const r=_.current;if(!r){d.current=requestAnimationFrame(n);return}const a=t===document.scrollingElement?{top:0,bottom:window.innerHeight}:t.getBoundingClientRect();let p=0;if(r.y<a.top+s){const l=Math.max(0,r.y-a.top);p=-e*(1-l/s)}else if(r.y>a.bottom-s){const l=Math.max(0,a.bottom-r.y);p=e*(1-l/s)}p!==0&&(t.scrollBy({top:p,behavior:"auto"}),Y(r.x,r.y)),d.current=requestAnimationFrame(n)};C(),d.current=requestAnimationFrame(n)},j=()=>{u.current=-1,g(null)};return c.useEffect(()=>{x||q(null)},[x]),c.useEffect(()=>()=>{m(),C()},[]),c.useEffect(()=>{const o=t=>{i.current&&t.preventDefault()};return window.addEventListener("touchmove",o,{passive:!1}),()=>{m(),window.removeEventListener("touchmove",o)}},[]),H.jsx(G.List,{className:O.t($,f.sortable,B>1&&f.columns),columns:E,ordered:!0,style:L,...A,"data-component":"sortable",children:S.map((o,t)=>{const s=c.isValidElement(o)?o.key:null;return H.jsx("li",{"data-sortable-index":t,onClickCapture:e=>{T.current&&(e.preventDefault(),e.stopPropagation(),T.current=!1)},className:O.t(h!==null&&h>t-10&&h<t+10&&f.pseudo,h===t&&u.current<t&&f["target-below"],h===t&&u.current>t&&f["target-above"],u.current===t&&f.dragging,z===t&&x&&f.dropping),onContextMenu:e=>{(i.current||v.current!==null)&&e.preventDefault()},onTouchStart:e=>{if(x||U(e.target))return;const n=e.touches[0];if(!n)return;const r=e.currentTarget;b.current={index:t,x:n.clientX,y:n.clientY},m(),v.current=setTimeout(()=>{u.current=t,i.current=!0,D.current=t,T.current=!0,F({height:r.offsetHeight,width:r.offsetWidth}),g(t),_.current={x:n.clientX,y:n.clientY},Z(r)},350)},onTouchMove:e=>{const n=e.touches[0];if(n){if(_.current={x:n.clientX,y:n.clientY},!i.current){const r=b.current;if(!r)return;Math.hypot(n.clientX-r.x,n.clientY-r.y)>8&&(m(),b.current=null);return}Y(n.clientX,n.clientY)}},onTouchEnd:e=>{if(m(),!i.current){b.current=null;return}e.preventDefault();const n=u.current,r=D.current;n>=0&&r!==null&&n!==r&&y(n,r),P()},onTouchCancel:()=>P(),draggable:!x&&!R,onDragEnd:()=>j(),onDragOver:e=>{e.preventDefault(),e.dataTransfer.dropEffect="move";const n=u.current;if(n<0||n===t)return;const r=e.currentTarget.getBoundingClientRect(),a=t===n+1?w.height:r.height,l=e.clientY>r.top+a/2?t+1:t,I=l>n?l-1:l;g(I)},onDragStart:e=>{if(R){e.preventDefault();return}u.current=t,F({height:e.currentTarget.offsetHeight,width:e.currentTarget.offsetWidth}),e.dataTransfer.setData("text/plain",""),e.dataTransfer.effectAllowed="move",g(t)},onDrop:e=>{e.preventDefault();const n=u.current,r=h;n<0||r===null||n===r||(y(n,r),j())},"data-component":"sortable",children:H.jsx(X.Provider,{value:{canMoveDown:t<S.length-1,canMoveUp:t>0,index:t,moveDown:()=>y(t,t+1),moveUp:()=>y(t,t-1)},children:o})},s??t)})})}exports.Sortable=rt;exports.useOptionalSortableItem=nt;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -2,7 +2,7 @@ import { jsx as H } from "react/jsx-runtime";
|
|
|
2
2
|
import { t as O } from "../../classix-DG18itHa.js";
|
|
3
3
|
import A, { createContext as tt, useMemo as V, useRef as a, useState as M, useEffect as B, useContext as et } from "react";
|
|
4
4
|
import { List as nt } from "../list/index.js";
|
|
5
|
-
import '../../assets/
|
|
5
|
+
import '../../assets/index9.css';const rt = "_sortable_12gha_1", ot = "_dragging_12gha_13", ct = "_dropping_12gha_28", lt = "_columns_12gha_42", ut = "_pseudo_12gha_51", f = {
|
|
6
6
|
sortable: rt,
|
|
7
7
|
dragging: ot,
|
|
8
8
|
dropping: ct,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index8.css');const f=require("react/jsx-runtime"),l=require("react"),k=require("../icon/index.cjs"),z="_table_1egqd_1",D="_sortable_1egqd_27",h={table:z,sortable:D},m=r=>l.isValidElement(r),q=r=>l.Children.toArray(r).reduce((e,t)=>m(t)?e+(t.type==="td"||t.type==="th"?1:q(t.props.children)):e,0),S=r=>{for(const e of l.Children.toArray(r)){if(!m(e))continue;if(e.type==="tr")return q(e.props.children);const t=S(e.props.children);if(t!==null)return t}return null},j=(r,e)=>l.Children.map(r,t=>{if(!m(t))return t;let s=t.props.children===void 0?t.props.children:j(t.props.children,e),n;return t.type==="td"&&t.props["data-span"]==="all"&&(n={colSpan:e}),t.type==="th"&&t.props["data-type"]&&(s=f.jsxs("span",{className:h.sortable,children:[s,f.jsx(k.Icon,{name:"updown"})]})),n||s!==t.props.children?l.cloneElement(t,n,s):t}),I=(r,e,t,s,n=1)=>{if(t==="text")return r.localeCompare(e,s,{sensitivity:"base"})*n;const c=t==="date"?Date.parse(r):Number.parseFloat(r),i=t==="date"?Date.parse(e):Number.parseFloat(e);return Number.isNaN(c)&&Number.isNaN(i)?0:Number.isNaN(c)?1:Number.isNaN(i)?-1:(c-i)*n},P=({children:r,locale:e,...t})=>{const s=l.useRef(null),n=S(r),c=n&&n>0?j(r,n):r,i=(d,u,o)=>{d.querySelectorAll("th[data-type]").forEach(a=>{a===u?(a.dataset.dir=o,a.setAttribute("aria-sort",o==="asc"?"ascending":"descending")):(delete a.dataset.dir,a.setAttribute("aria-sort","none"))})},v=l.useCallback(d=>{var x,g;const u=s.current;if(!u)return;const o=(x=d.target)==null?void 0:x.closest("th");if(!o)return;const p=u.tHead;if(!p||!p.contains(o))return;const a=o.cellIndex;if(a<0)return;const b=(g=u.tBodies)==null?void 0:g[0];if(!b)return;const y=o.getAttribute("data-type");if(!y)return;const N=o.dataset.dir==="asc"?"desc":"asc";i(p,o,N);const w=N==="asc"?1:-1,C=Array.from(b.rows);C.sort((E,R)=>{var _,A;const T=(((_=E.cells[a])==null?void 0:_.textContent)??"").trim(),F=(((A=R.cells[a])==null?void 0:A.textContent)??"").trim();return I(T,F,y,e,w)}),b.append(...C)},[e]);return f.jsx("table",{className:h.table,onClick:v,ref:s,...t,"data-component":"table",children:c})};exports.Table=P;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _, jsxs as D } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as I, useCallback as R, Children as f, cloneElement as T, isValidElement as B } from "react";
|
|
3
3
|
import { Icon as H } from "../icon/index.js";
|
|
4
|
-
import '../../assets/
|
|
4
|
+
import '../../assets/index8.css';const P = "_table_1egqd_1", V = "_sortable_1egqd_27", h = {
|
|
5
5
|
table: P,
|
|
6
6
|
sortable: V
|
|
7
7
|
}, m = (r) => B(r), v = (r) => f.toArray(r).reduce((e, t) => m(t) ? e + (t.type === "td" || t.type === "th" ? 1 : v(t.props.children)) : e, 0), w = (r) => {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index7.css');const e=require("react/jsx-runtime"),d=require("../../classix-5H4IWnMA.cjs"),x=require("../../use-touched-D_TJ8wDc.cjs"),h="_label_ah8yz_3",i="_textarea_ah8yz_11",_="_touched_ah8yz_30",t={label:h,textarea:i,touched:_},m=({label:a,maxRows:r=12,minRows:c=3,required:s,value:o,...n})=>{const{touched:l,onBlur:u}=x.useTouched(o==="");return e.jsxs("label",{className:t.label,"data-component":"textarea",children:[a&&e.jsx("span",{"data-required":s||void 0,children:a}),e.jsx("textarea",{className:d.t(t.textarea,l&&t.touched),onBlur:u,...n,required:s,style:{"--min-rows":c,"--max-rows":r},value:o})]})};exports.Textarea=m;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as h, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { t as m } from "../../classix-DG18itHa.js";
|
|
3
3
|
import { u as x } from "../../use-touched-DXIJVVzz.js";
|
|
4
|
-
import '../../assets/
|
|
4
|
+
import '../../assets/index7.css';const u = "_label_ah8yz_3", _ = "_textarea_ah8yz_11", i = "_touched_ah8yz_30", t = {
|
|
5
5
|
label: u,
|
|
6
6
|
textarea: _,
|
|
7
7
|
touched: i
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index6.css');const o=require("react/jsx-runtime"),l=require("../../classix-5H4IWnMA.cjs"),n=require("react"),q=require("../icon/index.cjs"),d="_toast_12yql_1",f="_active_12yql_21",m="_error_12yql_27",y="_success_12yql_36",c={toast:d,active:f,error:m,success:y},v=({label:i,type:t="success",onClick:u,onExitComplete:e,open:r=!0})=>{const[_,a]=n.useState(!1);return n.useEffect(()=>{if(!r)return a(!1);const s=requestAnimationFrame(()=>a(!0));return()=>cancelAnimationFrame(s)},[r]),o.jsxs("div",{"aria-live":t==="error"?"assertive":"polite",className:l.t(c.toast,c[t],_&&c.active),onClick:u,onTransitionEnd:s=>{r||s.propertyName!=="opacity"||s.currentTarget!==s.target||e==null||e()},"data-component":"toast",children:[o.jsx(q.Icon,{name:t}),i]})};exports.Toast=v;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -2,7 +2,7 @@ import { jsxs as u, jsx as m } from "react/jsx-runtime";
|
|
|
2
2
|
import { t as _ } from "../../classix-DG18itHa.js";
|
|
3
3
|
import { useState as f, useEffect as l } from "react";
|
|
4
4
|
import { Icon as q } from "../icon/index.js";
|
|
5
|
-
import '../../assets/
|
|
5
|
+
import '../../assets/index6.css';const v = "_toast_12yql_1", y = "_active_12yql_21", d = "_error_12yql_27", h = "_success_12yql_36", e = {
|
|
6
6
|
toast: v,
|
|
7
7
|
active: y,
|
|
8
8
|
error: d,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index5.css');const u=require("react/jsx-runtime"),i=require("react"),w=require("../toast/index.cjs"),p="_toasts_19qwq_1",h={toasts:p},T=({defaultDurationMs:r=5e3,onRemove:m,toasts:n})=>{const d=i.useRef(new Map),[c,l]=i.useState(new Set),a=i.useCallback(e=>{l(s=>s.has(e)?s:new Set(s).add(e))},[]);return i.useEffect(()=>{const e=d.current,s=new Set(n.map(t=>t.id));l(t=>{const o=new Set([...t].filter(f=>s.has(f)));return o.size===t.size?t:o});for(const t of n){if(c.has(t.id)||e.has(t.id))continue;const o=t.durationMs??r;e.set(t.id,window.setTimeout(()=>{a(t.id)},o))}for(const[t,o]of e)s.has(t)&&!c.has(t)||(window.clearTimeout(o),e.delete(t))},[c,r,a,n]),i.useEffect(()=>{const e=d.current;return()=>{for(const s of e.values())window.clearTimeout(s);e.clear()}},[]),n.length?u.jsx("div",{className:h.toasts,"data-component":"toasts",children:n.map(e=>u.jsx(w.Toast,{label:e.label,onClick:()=>a(e.id),onExitComplete:()=>m(e.id),open:!c.has(e.id),type:e.type},e.id))}):null};exports.Toasts=T;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as p, useState as w, useCallback as h, useEffect as m } from "react";
|
|
3
3
|
import { Toast as T } from "../toast/index.js";
|
|
4
|
-
import '../../assets/
|
|
4
|
+
import '../../assets/index5.css';const v = "_toasts_19qwq_1", S = {
|
|
5
5
|
toasts: v
|
|
6
6
|
}, g = ({
|
|
7
7
|
defaultDurationMs: c = 5e3,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index4.css');const t=require("react/jsx-runtime"),i=require("../loading/index.cjs"),g="_toggle_7uv10_1",u="_thumb_7uv10_15",d="_track_7uv10_26",e={toggle:g,thumb:u,track:d},m=({checked:s,disabled:c,isLoading:o,label:n,onChange:a})=>{const l=s!==void 0&&a===void 0;return t.jsxs("label",{className:e.toggle,onClick:r=>r.stopPropagation(),"data-component":"toggle",children:[t.jsx("input",{checked:s,disabled:c||o,onChange:a,readOnly:l,type:"checkbox"}),t.jsx("span",{"aria-hidden":"true",className:e.track,children:o?t.jsx(i.Loading,{size:24}):t.jsx("span",{className:e.thumb})}),n&&t.jsx("span",{className:"toggle",children:n})]})};exports.Toggle=m;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as g, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { Loading as i } from "../loading/index.js";
|
|
3
|
-
import '../../assets/
|
|
3
|
+
import '../../assets/index4.css';const m = "_toggle_7uv10_1", d = "_thumb_7uv10_15", p = "_track_7uv10_26", o = {
|
|
4
4
|
toggle: m,
|
|
5
5
|
thumb: d,
|
|
6
6
|
track: p
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index52.css');const a=require("react/jsx-runtime"),l=require("../../classix-5H4IWnMA.cjs"),s="_toolbar_p4e6w_1",n="_editor_p4e6w_33",o={toolbar:s,default:"_default_p4e6w_26",editor:n},i=({children:t,variant:e="default"})=>a.jsx("div",{className:l.t(o.toolbar,o[e]),onClick:r=>r.stopPropagation(),"data-component":"toolbar",children:t});exports.Toolbar=i;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { t as l } from "../../classix-DG18itHa.js";
|
|
3
|
-
import '../../assets/
|
|
3
|
+
import '../../assets/index52.css';const s = "_toolbar_p4e6w_1", n = "_editor_p4e6w_33", o = {
|
|
4
4
|
toolbar: s,
|
|
5
5
|
default: "_default_p4e6w_26",
|
|
6
6
|
editor: n
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index3.css');const s=require("react/jsx-runtime"),n=require("../../classix-5H4IWnMA.cjs"),a=require("../icon/index.cjs"),t={static:"_static_14c4q_1"},l={default:t.default,static:t.static},r=({variant:o="default",children:i,iconName:e,...c})=>s.jsxs("div",{className:n.t(t.tooltip,l[o]),...c,"data-component":"tooltip",children:[e&&s.jsx(a.Icon,{fill:!0,gap:"right",name:e}),i]});exports.Tooltip=r;
|
|
2
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/components/tooltip/index.tsx"],"sourcesContent":["import cx from 'classix';\n\nimport { Icon } from '@/components/icon';\nimport { IconName } from '@/components/icon/icons.ts';\n\nimport styles from './styles.module.css';\n\nconst variants = {\n default: styles.default,\n static: styles.static,\n};\n\nexport type TooltipProps = {\n children?: React.ReactNode;\n iconName?: IconName;\n variant?: keyof typeof variants;\n};\n\nexport const Tooltip = ({ variant = 'default', children, iconName, ...props }: TooltipProps) => {\n return (\n <div\n className={cx(styles.tooltip, variants[variant])}\n {...props}\n >\n {iconName && (\n <Icon\n fill\n gap={'right'}\n name={iconName}\n />\n )}\n {children}\n </div>\n );\n};\n"],"names":["variants","default","styles","static","Tooltip","variant","children","iconName","props","jsxs","cx","tooltip","Icon"],"mappings":"yNAOMA,EAAW,CACfC,QAASC,EAAOD,QAChBE,OAAQD,EAAOC,MACjB,EAQaC,EAAUA,CAAC,CAAEC,QAAAA,EAAU,UAAWC,SAAAA,EAAUC,SAAAA,EAAU,GAAGC,CAAoB,IAEtFC,EAAAA,KAAC,MAAA,CACC,UAAWC,EAAAA,EAAGR,EAAOS,QAASX,EAASK,CAAO,CAAC,EAC/C,GAAIG,EAAM,iBAAA,UAETD,SAAAA,CAAAA,SACEK,EAAAA,KAAA,CACC,KAAI,GACJ,IAAK,QACL,KAAML,EAAS,EAGlBD,CAAAA,EACH"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsxs as r, jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { t as l } from "../../classix-DG18itHa.js";
|
|
3
|
+
import { Icon as e } from "../icon/index.js";
|
|
4
|
+
import '../../assets/index3.css';const t = {
|
|
5
|
+
static: "_static_14c4q_1"
|
|
6
|
+
}, n = {
|
|
7
|
+
default: t.default,
|
|
8
|
+
static: t.static
|
|
9
|
+
}, d = ({
|
|
10
|
+
variant: s = "default",
|
|
11
|
+
children: a,
|
|
12
|
+
iconName: o,
|
|
13
|
+
...i
|
|
14
|
+
}) => /* @__PURE__ */ r("div", { className: l(t.tooltip, n[s]), ...i, "data-component": "tooltip", children: [
|
|
15
|
+
o && /* @__PURE__ */ c(e, { fill: !0, gap: "right", name: o }),
|
|
16
|
+
a
|
|
17
|
+
] });
|
|
18
|
+
export {
|
|
19
|
+
d as Tooltip
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/tooltip/index.tsx"],"sourcesContent":["import cx from 'classix';\n\nimport { Icon } from '@/components/icon';\nimport { IconName } from '@/components/icon/icons.ts';\n\nimport styles from './styles.module.css';\n\nconst variants = {\n default: styles.default,\n static: styles.static,\n};\n\nexport type TooltipProps = {\n children?: React.ReactNode;\n iconName?: IconName;\n variant?: keyof typeof variants;\n};\n\nexport const Tooltip = ({ variant = 'default', children, iconName, ...props }: TooltipProps) => {\n return (\n <div\n className={cx(styles.tooltip, variants[variant])}\n {...props}\n >\n {iconName && (\n <Icon\n fill\n gap={'right'}\n name={iconName}\n />\n )}\n {children}\n </div>\n );\n};\n"],"names":["variants","default","styles","static","Tooltip","variant","children","iconName","props","jsxs","cx","tooltip","Icon"],"mappings":";;;;;GAOMA,IAAW;AAAA,EACfC,SAASC,EAAOD;AAAAA,EAChBE,QAAQD,EAAOC;AACjB,GAQaC,IAAUA,CAAC;AAAA,EAAEC,SAAAA,IAAU;AAAA,EAAWC,UAAAA;AAAAA,EAAUC,UAAAA;AAAAA,EAAU,GAAGC;AAAoB,MAEtF,gBAAAC,EAAC,OAAA,EACC,WAAWC,EAAGR,EAAOS,SAASX,EAASK,CAAO,CAAC,GAC/C,GAAIG,GAAM,kBAAA,WAETD,UAAAA;AAAAA,EAAAA,uBACEK,GAAA,EACC,MAAI,IACJ,KAAK,SACL,MAAML,GAAS;AAAA,EAGlBD;AAAAA,GACH;"}
|
|
@@ -2,7 +2,7 @@ import { jsxs as m, jsx as p } from "react/jsx-runtime";
|
|
|
2
2
|
import { t as y } from "./classix-DG18itHa.js";
|
|
3
3
|
import { i as b } from "./icons-CKzd_L4D.js";
|
|
4
4
|
import { u as v } from "./use-touched-DXIJVVzz.js";
|
|
5
|
-
import './assets/
|
|
5
|
+
import './assets/index51.css';const w = /* @__PURE__ */ 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"]);
|
|
6
6
|
function C(n) {
|
|
7
7
|
return Object.fromEntries(Object.entries(n).filter(([e]) => e.startsWith("data-") || e.startsWith("aria-") || w.has(e)));
|
|
8
8
|
}
|
|
@@ -69,4 +69,4 @@ export {
|
|
|
69
69
|
z as r,
|
|
70
70
|
C as s
|
|
71
71
|
};
|
|
72
|
-
//# sourceMappingURL=index-
|
|
72
|
+
//# sourceMappingURL=index-B9xtLe2w.js.map
|