@solibo/solibo-ui 1.0.5 → 1.0.6
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/index.css +1 -1
- 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/index20.css +1 -1
- package/dist/assets/index26.css +1 -1
- package/dist/assets/index3.css +1 -1
- package/dist/assets/index32.css +1 -1
- package/dist/assets/index39.css +1 -1
- package/dist/assets/index4.css +1 -1
- package/dist/assets/index42.css +1 -1
- package/dist/assets/index5.css +1 -1
- 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/aside/index.cjs +1 -1
- package/dist/components/aside/index.js +15 -15
- package/dist/components/card/index.cjs +1 -1
- package/dist/components/card/index.js +38 -38
- package/dist/components/checkbox/index.cjs +1 -1
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/dropdown/index.cjs +1 -1
- package/dist/components/dropdown/index.js +101 -101
- package/dist/components/editor/index.cjs +1 -1
- package/dist/components/editor/index.js +1 -1
- package/dist/components/header/index.cjs +1 -1
- package/dist/components/header/index.js +10 -10
- package/dist/components/icon/index.cjs +1 -1
- package/dist/components/icon/index.js +1 -1
- package/dist/components/input/index.cjs +1 -1
- package/dist/components/input/index.js +2 -2
- package/dist/components/message/index.cjs +1 -1
- package/dist/components/message/index.js +20 -20
- package/dist/components/messages/index.cjs +1 -1
- package/dist/components/messages/index.cjs.map +1 -1
- package/dist/components/messages/index.js +34 -31
- package/dist/components/messages/index.js.map +1 -1
- package/dist/components/nav/index.cjs +1 -1
- package/dist/components/nav/index.js +22 -22
- package/dist/components/object/index.cjs +1 -1
- package/dist/components/object/index.js +1 -1
- package/dist/components/portal/index.cjs +1 -1
- package/dist/components/portal/index.js +17 -17
- package/dist/components/search/index.cjs +1 -1
- package/dist/components/search/index.js +37 -37
- package/dist/components/select/index.cjs +1 -1
- package/dist/components/select/index.js +2 -2
- 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/tooltip/index.cjs +1 -1
- package/dist/components/tooltip/index.js +6 -6
- package/dist/{icons-BROXUtPz.cjs → icons-BoBeAmLe.cjs} +2 -2
- package/dist/{icons-BROXUtPz.cjs.map → icons-BoBeAmLe.cjs.map} +1 -1
- package/dist/{icons-CH48JQqt.js → icons-Dhj9mAkR.js} +4 -1
- package/dist/{icons-CH48JQqt.js.map → icons-Dhj9mAkR.js.map} +1 -1
- package/dist/{index-CSYOtiWJ.cjs → index-Ct0mJ-KK.cjs} +2 -2
- package/dist/{index-CSYOtiWJ.cjs.map → index-Ct0mJ-KK.cjs.map} +1 -1
- package/dist/{index-BrGCs_7h.js → index-D4LZQ-JF.js} +2 -2
- package/dist/{index-BrGCs_7h.js.map → index-D4LZQ-JF.js.map} +1 -1
- package/dist/{index-CIugi8vq.cjs → index-D9Hq7ewF.cjs} +2 -2
- package/dist/{index-CIugi8vq.cjs.map → index-D9Hq7ewF.cjs.map} +1 -1
- package/dist/{index-CRAuAHow.js → index-uQRsVtP-.js} +2 -2
- package/dist/{index-CRAuAHow.js.map → index-uQRsVtP-.js.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +2 -2
- package/dist/tokens.css +7 -2
- package/dist/tokens.json +105 -33
- package/package.json +1 -1
|
@@ -1,40 +1,43 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { t as
|
|
3
|
-
import { useRef as
|
|
4
|
-
import { Editor as
|
|
5
|
-
import { List as
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { jsxs as E, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { t as I } from "../../classix-DG18itHa.js";
|
|
3
|
+
import { useRef as L, useState as M, useLayoutEffect as S } from "react";
|
|
4
|
+
import { Editor as j } from "../editor/index.js";
|
|
5
|
+
import { List as q } from "../list/index.js";
|
|
6
|
+
import { Tooltip as T } from "../tooltip/index.js";
|
|
7
|
+
import { Message as H } from "../message/index.js";
|
|
8
|
+
import '../../assets/index13.css';const N = "_messages_5h1dw_1", U = "_fill_5h1dw_20", f = {
|
|
9
|
+
messages: N,
|
|
10
|
+
fill: U
|
|
11
|
+
}, K = ({
|
|
12
|
+
fill: p = !1,
|
|
12
13
|
files: r,
|
|
13
14
|
handleUpload: u,
|
|
14
|
-
maxEditorRows:
|
|
15
|
-
message:
|
|
16
|
-
messages:
|
|
17
|
-
minEditorRows:
|
|
18
|
-
onChange:
|
|
19
|
-
onFilesChange:
|
|
20
|
-
onSubmit:
|
|
21
|
-
placeholder:
|
|
22
|
-
sending:
|
|
15
|
+
maxEditorRows: g = 5,
|
|
16
|
+
message: i = "",
|
|
17
|
+
messages: t,
|
|
18
|
+
minEditorRows: _ = 1,
|
|
19
|
+
onChange: h,
|
|
20
|
+
onFilesChange: o,
|
|
21
|
+
onSubmit: w,
|
|
22
|
+
placeholder: v,
|
|
23
|
+
sending: y,
|
|
24
|
+
tooltipLabel: a
|
|
23
25
|
}) => {
|
|
24
|
-
var
|
|
25
|
-
const
|
|
26
|
+
var c;
|
|
27
|
+
const l = L(null), [R, b] = M([]), m = r ?? R, n = (c = t[t.length - 1]) == null ? void 0 : c.id, x = i.replace(/<[^>]*>/g, "").replace(/ /g, " ").trim() === "";
|
|
26
28
|
return S(() => {
|
|
27
|
-
var
|
|
28
|
-
const s = (
|
|
29
|
-
!s ||
|
|
30
|
-
}, [
|
|
31
|
-
/* @__PURE__ */
|
|
32
|
-
/* @__PURE__ */
|
|
33
|
-
|
|
34
|
-
|
|
29
|
+
var d;
|
|
30
|
+
const s = (d = l.current) == null ? void 0 : d.querySelector("[data-message-list]");
|
|
31
|
+
!s || n === void 0 || (s.scrollTop = s.scrollHeight);
|
|
32
|
+
}, [n]), /* @__PURE__ */ E("div", { className: I(f.messages, p && f.fill), "data-component": "messages", ref: l, children: [
|
|
33
|
+
/* @__PURE__ */ e(q, { "data-message-list": !0, children: t.map((s) => /* @__PURE__ */ e(H, { ...s }, s.id)) }),
|
|
34
|
+
a && /* @__PURE__ */ e(T, { variant: "static", children: a }),
|
|
35
|
+
/* @__PURE__ */ e(j, { autofocus: !0, content: i, disabled: y || x && m.length === 0, files: m, maxRows: g, minRows: _, onChange: h, onFilesChange: (s) => {
|
|
36
|
+
r === void 0 && b(s), o == null || o(s);
|
|
37
|
+
}, onSubmit: w, onUpload: u, placeholder: v, submitLabel: "Send message" })
|
|
35
38
|
] });
|
|
36
39
|
};
|
|
37
40
|
export {
|
|
38
|
-
|
|
41
|
+
K as Messages
|
|
39
42
|
};
|
|
40
43
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/messages/index.tsx"],"sourcesContent":["import cx from 'classix';\nimport { useLayoutEffect, useRef, useState } from 'react';\n\nimport { Editor } from '@/components/editor';\nimport { List } from '@/components/list';\n\nimport { Message, type MessageOptions } from '../message';\nimport styles from './styles.module.css';\n\nexport type MessageItem = MessageOptions;\n\nexport type MessagesProps = {\n fill?: boolean;\n files?: readonly File[];\n handleUpload: (files: FileList) => Promise<void> | void;\n maxEditorRows?: number;\n message: string;\n messages: MessageItem[];\n minEditorRows?: number;\n onChange: (content: string) => void;\n onFilesChange?: (files: File[]) => void;\n onSubmit: () => Promise<void> | void;\n placeholder?: string;\n sending: boolean;\n};\n\nexport const Messages = ({\n fill = false,\n files,\n handleUpload,\n maxEditorRows = 5,\n message = '',\n messages,\n minEditorRows = 1,\n onChange,\n onFilesChange,\n onSubmit,\n placeholder,\n sending,\n}: MessagesProps) => {\n const messagesRef = useRef<HTMLDivElement>(null);\n const [internalFiles, setInternalFiles] = useState<File[]>([]);\n const queuedFiles = files ?? internalFiles;\n const newestMessageId = messages[messages.length - 1]?.id;\n const messageIsEmpty =\n message\n .replace(/<[^>]*>/g, '')\n .replace(/ /g, ' ')\n .trim() === '';\n\n useLayoutEffect(() => {\n const messageList = messagesRef.current?.querySelector<HTMLElement>('[data-message-list]');\n if (!messageList || newestMessageId === undefined) return;\n\n messageList.scrollTop = messageList.scrollHeight;\n }, [newestMessageId]);\n\n return (\n <div\n className={cx(styles.messages, fill && styles.fill)}\n data-component='messages'\n ref={messagesRef}\n >\n <List data-message-list>\n {messages.map((message) => (\n <Message\n key={message.id}\n {...message}\n />\n ))}\n </List>\n <Editor\n autofocus\n content={message}\n disabled={sending || (messageIsEmpty && queuedFiles.length === 0)}\n files={queuedFiles}\n maxRows={maxEditorRows}\n minRows={minEditorRows}\n onChange={onChange}\n onFilesChange={(nextFiles) => {\n if (files === undefined) setInternalFiles(nextFiles);\n onFilesChange?.(nextFiles);\n }}\n onSubmit={onSubmit}\n onUpload={handleUpload}\n placeholder={placeholder}\n submitLabel='Send message'\n />\n </div>\n );\n};\n"],"names":["Messages","fill","files","handleUpload","maxEditorRows","message","messages","minEditorRows","onChange","onFilesChange","onSubmit","placeholder","sending","messagesRef","useRef","internalFiles","setInternalFiles","useState","queuedFiles","newestMessageId","length","id","messageIsEmpty","replace","trim","useLayoutEffect","messageList","current","querySelector","undefined","scrollTop","scrollHeight","jsxs","cx","styles","jsx","List","map","Message","Editor","nextFiles"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/messages/index.tsx"],"sourcesContent":["import cx from 'classix';\nimport { useLayoutEffect, useRef, useState } from 'react';\n\nimport { Editor } from '@/components/editor';\nimport { List } from '@/components/list';\nimport { Tooltip } from '@/components/tooltip';\n\nimport { Message, type MessageOptions } from '../message';\nimport styles from './styles.module.css';\n\nexport type MessageItem = MessageOptions;\n\nexport type MessagesProps = {\n fill?: boolean;\n files?: readonly File[];\n handleUpload: (files: FileList) => Promise<void> | void;\n maxEditorRows?: number;\n message: string;\n messages: MessageItem[];\n minEditorRows?: number;\n onChange: (content: string) => void;\n onFilesChange?: (files: File[]) => void;\n onSubmit: () => Promise<void> | void;\n placeholder?: string;\n sending: boolean;\n tooltipLabel?: string;\n};\n\nexport const Messages = ({\n fill = false,\n files,\n handleUpload,\n maxEditorRows = 5,\n message = '',\n messages,\n minEditorRows = 1,\n onChange,\n onFilesChange,\n onSubmit,\n placeholder,\n sending,\n tooltipLabel,\n}: MessagesProps) => {\n const messagesRef = useRef<HTMLDivElement>(null);\n const [internalFiles, setInternalFiles] = useState<File[]>([]);\n const queuedFiles = files ?? internalFiles;\n const newestMessageId = messages[messages.length - 1]?.id;\n const messageIsEmpty =\n message\n .replace(/<[^>]*>/g, '')\n .replace(/ /g, ' ')\n .trim() === '';\n\n useLayoutEffect(() => {\n const messageList = messagesRef.current?.querySelector<HTMLElement>('[data-message-list]');\n if (!messageList || newestMessageId === undefined) return;\n\n messageList.scrollTop = messageList.scrollHeight;\n }, [newestMessageId]);\n\n return (\n <div\n className={cx(styles.messages, fill && styles.fill)}\n data-component='messages'\n ref={messagesRef}\n >\n <List data-message-list>\n {messages.map((message) => (\n <Message\n key={message.id}\n {...message}\n />\n ))}\n </List>\n {tooltipLabel && <Tooltip variant='static'>{tooltipLabel}</Tooltip>}\n <Editor\n autofocus\n content={message}\n disabled={sending || (messageIsEmpty && queuedFiles.length === 0)}\n files={queuedFiles}\n maxRows={maxEditorRows}\n minRows={minEditorRows}\n onChange={onChange}\n onFilesChange={(nextFiles) => {\n if (files === undefined) setInternalFiles(nextFiles);\n onFilesChange?.(nextFiles);\n }}\n onSubmit={onSubmit}\n onUpload={handleUpload}\n placeholder={placeholder}\n submitLabel='Send message'\n />\n </div>\n );\n};\n"],"names":["Messages","fill","files","handleUpload","maxEditorRows","message","messages","minEditorRows","onChange","onFilesChange","onSubmit","placeholder","sending","tooltipLabel","messagesRef","useRef","internalFiles","setInternalFiles","useState","queuedFiles","newestMessageId","length","id","messageIsEmpty","replace","trim","useLayoutEffect","messageList","current","querySelector","undefined","scrollTop","scrollHeight","jsxs","cx","styles","jsx","List","map","Message","Tooltip","Editor","nextFiles"],"mappings":";;;;;;;;;;GA4BaA,IAAWA,CAAC;AAAA,EACvBC,MAAAA,IAAO;AAAA,EACPC,OAAAA;AAAAA,EACAC,cAAAA;AAAAA,EACAC,eAAAA,IAAgB;AAAA,EAChBC,SAAAA,IAAU;AAAA,EACVC,UAAAA;AAAAA,EACAC,eAAAA,IAAgB;AAAA,EAChBC,UAAAA;AAAAA,EACAC,eAAAA;AAAAA,EACAC,UAAAA;AAAAA,EACAC,aAAAA;AAAAA,EACAC,SAAAA;AAAAA,EACAC,cAAAA;AACa,MAAM;;AACnB,QAAMC,IAAcC,EAAuB,IAAI,GACzC,CAACC,GAAeC,CAAgB,IAAIC,EAAiB,CAAA,CAAE,GACvDC,IAAcjB,KAASc,GACvBI,KAAkBd,IAAAA,EAASA,EAASe,SAAS,CAAC,MAA5Bf,gBAAAA,EAA+BgB,IACjDC,IACJlB,EACGmB,QAAQ,YAAY,EAAE,EACtBA,QAAQ,WAAW,GAAG,EACtBC,KAAAA,MAAW;AAEhBC,SAAAA,EAAgB,MAAM;;AACpB,UAAMC,KAAcb,IAAAA,EAAYc,YAAZd,gBAAAA,EAAqBe,cAA2B;AACpE,IAAI,CAACF,KAAeP,MAAoBU,WAExCH,EAAYI,YAAYJ,EAAYK;AAAAA,EACtC,GAAG,CAACZ,CAAe,CAAC,GAGlB,gBAAAa,EAAC,OAAA,EACC,WAAWC,EAAGC,EAAO7B,UAAUL,KAAQkC,EAAOlC,IAAI,GAClD,kBAAe,YACf,KAAKa,GAEL,UAAA;AAAA,IAAA,gBAAAsB,EAACC,GAAA,EAAK,qBAAiB,IACpB/B,UAAAA,EAASgC,IAAKjC,CAAAA,MACb,gBAAA+B,EAACG,GAAA,EAEC,GAAIlC,EAAAA,GADCA,EAAQiB,EACD,CAEf,GACH;AAAA,IACCT,KAAgB,gBAAAuB,EAACI,GAAA,EAAQ,SAAQ,UAAU3B,UAAAA,GAAa;AAAA,IACzD,gBAAAuB,EAACK,KACC,WAAS,IACT,SAASpC,GACT,UAAUO,KAAYW,KAAkBJ,EAAYE,WAAW,GAC/D,OAAOF,GACP,SAASf,GACT,SAASG,GACT,UAAAC,GACA,eAAgBkC,CAAAA,MAAc;AAC5B,MAAIxC,MAAU4B,UAAWb,EAAiByB,CAAS,GACnDjC,KAAAA,QAAAA,EAAgBiC;AAAAA,IAClB,GACA,UAAAhC,GACA,UAAUP,GACV,aAAAQ,GACA,aAAY,eAAA,CAAc;AAAA,EAAA,GAE9B;AAEJ;"}
|
|
@@ -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 i=require("react/jsx-runtime"),r=require("../../classix-5H4IWnMA.cjs"),p=require("react"),h=require("../../icons-BoBeAmLe.cjs"),v="_nav_mhwz8_3",m="_label_mhwz8_9",f="_horizontal_mhwz8_17",w="_sidebar_mhwz8_27",z="_tabs_mhwz8_73",N="_pills_mhwz8_93",t={nav:v,label:m,horizontal:f,sidebar:w,tabs:z,pills:N},g={default:t.default,pills:t.pills,sidebar:t.sidebar,tabs:t.tabs},x=({className:e,...n})=>i.jsx("span",{className:r.t(e,t.label),...n,"data-component":"navlabel"}),j=({animation:e,children:n,className:c,horizontal:l=!1,variant:s="default",...d})=>{const[b,o]=p.useState(!1),u={"--icon-svg":h.iconSVG("chevron")};return i.jsx("nav",{className:r.t(c,l&&t.horizontal,t.nav,g[s]),"data-animation":e,"data-open":b?"true":"false","data-orientation":l?"horizontal":"vertical",onBlurCapture:a=>{if(s!=="pills"||window.innerWidth>960)return;const _=a.relatedTarget;a.currentTarget.contains(_)||o(!1)},onClick:()=>{s!=="pills"||window.innerWidth>960||o(a=>!a)},style:u,...d,"data-component":"nav",children:n})};exports.Nav=j;exports.NavLabel=x;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import { t as r } from "../../classix-DG18itHa.js";
|
|
3
|
-
import { useState as
|
|
4
|
-
import { i as
|
|
5
|
-
import '../../assets/
|
|
6
|
-
nav:
|
|
7
|
-
label:
|
|
8
|
-
horizontal:
|
|
3
|
+
import { useState as b } from "react";
|
|
4
|
+
import { i as f } from "../../icons-Dhj9mAkR.js";
|
|
5
|
+
import '../../assets/index12.css';const h = "_nav_mhwz8_3", u = "_label_mhwz8_9", v = "_horizontal_mhwz8_17", w = "_sidebar_mhwz8_27", z = "_tabs_mhwz8_73", N = "_pills_mhwz8_93", a = {
|
|
6
|
+
nav: h,
|
|
7
|
+
label: u,
|
|
8
|
+
horizontal: v,
|
|
9
9
|
sidebar: w,
|
|
10
10
|
tabs: z,
|
|
11
11
|
pills: N
|
|
@@ -15,26 +15,26 @@ import '../../assets/index13.css';const u = "_nav_1ecsd_3", v = "_label_1ecsd_9"
|
|
|
15
15
|
sidebar: a.sidebar,
|
|
16
16
|
tabs: a.tabs
|
|
17
17
|
}, T = ({
|
|
18
|
-
className:
|
|
19
|
-
...
|
|
20
|
-
}) => /* @__PURE__ */ i("span", { className: r(
|
|
21
|
-
animation:
|
|
22
|
-
children:
|
|
18
|
+
className: n,
|
|
19
|
+
...s
|
|
20
|
+
}) => /* @__PURE__ */ i("span", { className: r(n, a.label), ...s, "data-component": "navlabel" }), V = ({
|
|
21
|
+
animation: n,
|
|
22
|
+
children: s,
|
|
23
23
|
className: c,
|
|
24
|
-
horizontal:
|
|
25
|
-
variant:
|
|
26
|
-
...
|
|
24
|
+
horizontal: e = !1,
|
|
25
|
+
variant: o = "default",
|
|
26
|
+
...m
|
|
27
27
|
}) => {
|
|
28
|
-
const [p, l] =
|
|
29
|
-
"--icon-svg":
|
|
28
|
+
const [p, l] = b(!1), d = {
|
|
29
|
+
"--icon-svg": f("chevron")
|
|
30
30
|
};
|
|
31
|
-
return /* @__PURE__ */ i("nav", { className: r(c,
|
|
32
|
-
if (
|
|
33
|
-
const
|
|
34
|
-
t.currentTarget.contains(
|
|
31
|
+
return /* @__PURE__ */ i("nav", { className: r(c, e && a.horizontal, a.nav, g[o]), "data-animation": n, "data-open": p ? "true" : "false", "data-orientation": e ? "horizontal" : "vertical", onBlurCapture: (t) => {
|
|
32
|
+
if (o !== "pills" || window.innerWidth > 960) return;
|
|
33
|
+
const _ = t.relatedTarget;
|
|
34
|
+
t.currentTarget.contains(_) || l(!1);
|
|
35
35
|
}, onClick: () => {
|
|
36
|
-
|
|
37
|
-
}, style:
|
|
36
|
+
o !== "pills" || window.innerWidth > 960 || l((t) => !t);
|
|
37
|
+
}, style: d, ...m, "data-component": "nav", children: s });
|
|
38
38
|
};
|
|
39
39
|
export {
|
|
40
40
|
V 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/index11.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/index10.css');const e=require("react/jsx-runtime"),i=require("../../classix-5H4IWnMA.cjs"),c=require("../button/index.cjs"),a=require("../icon/index.cjs"),l=require("../aside/index.cjs"),_=require("../branding/index.cjs"),d=require("../figure/index.cjs"),m=require("../nav/index.cjs"),u="_portal_115mr_39",g="_content_115mr_267",p="_toggle_115mr_274",x="_open_115mr_338",n={portal:u,content:g,toggle:p,open:x},j=({children:t,portals:o,open:r,setOpen:s})=>e.jsxs(l.Aside,{className:i.t(n.portal,r&&n.open),sticky:!0,"data-component":"portal",children:[e.jsx(c.Button,{className:n.toggle,onClick:()=>s(!r),variant:"tertiary",children:e.jsx(a.Icon,{name:"sidebar"})}),e.jsx(d.Figure,{children:e.jsx(_.Branding,{name:"logo",size:48,variant:"white"})}),e.jsxs("div",{className:n.content,children:[o&&e.jsx(m.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
|
|
1
|
+
import { jsxs as m, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { t as a } from "../../classix-DG18itHa.js";
|
|
3
3
|
import { Button as c } from "../button/index.js";
|
|
4
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:
|
|
13
|
-
open:
|
|
7
|
+
import { Figure as _ } from "../figure/index.js";
|
|
8
|
+
import { Nav as g } from "../nav/index.js";
|
|
9
|
+
import '../../assets/index10.css';const d = "_portal_115mr_39", f = "_content_115mr_267", h = "_toggle_115mr_274", u = "_open_115mr_338", t = {
|
|
10
|
+
portal: d,
|
|
11
|
+
content: f,
|
|
12
|
+
toggle: h,
|
|
13
|
+
open: u
|
|
14
14
|
}, b = ({
|
|
15
15
|
children: r,
|
|
16
|
-
portals:
|
|
17
|
-
open:
|
|
18
|
-
setOpen:
|
|
19
|
-
}) => /* @__PURE__ */
|
|
20
|
-
/* @__PURE__ */ o(c, { className: t.toggle, onClick: () =>
|
|
21
|
-
/* @__PURE__ */ o(
|
|
22
|
-
/* @__PURE__ */
|
|
23
|
-
|
|
16
|
+
portals: n,
|
|
17
|
+
open: e,
|
|
18
|
+
setOpen: i
|
|
19
|
+
}) => /* @__PURE__ */ m(s, { className: a(t.portal, e && t.open), sticky: !0, "data-component": "portal", children: [
|
|
20
|
+
/* @__PURE__ */ o(c, { className: t.toggle, onClick: () => i(!e), variant: "tertiary", children: /* @__PURE__ */ o(l, { name: "sidebar" }) }),
|
|
21
|
+
/* @__PURE__ */ o(_, { children: /* @__PURE__ */ o(p, { name: "logo", size: 48, variant: "white" }) }),
|
|
22
|
+
/* @__PURE__ */ m("div", { className: t.content, children: [
|
|
23
|
+
n && /* @__PURE__ */ o(g, { horizontal: !0, children: n }),
|
|
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/index9.css');const n=require("react/jsx-runtime"),p=require("react"),h=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-D9Hq7ewF.cjs"),O="_search_1tuej_3",R="_controls_1tuej_15",B="_chips_1tuej_29",t={search:O,controls:R,chips:B,"dialog-content":"_dialog-content_1tuej_36","filter-groups":"_filter-groups_1tuej_45","filter-group":"_filter-group_1tuej_45"},S=({closeLabel:j="Close",filterButtonLabel:_="Filters",filterDialogTitle:m="Filters",filterGroups:c=[],onChange:b,onSelectedFiltersChange:o,removeFilterLabel:g=i=>`Remove ${i.label} filter`,resetLabel:v="Reset",searchLabel:y="Search",searchPlaceholder:f="Search",selectedFilters:l=[],value:k=""})=>{const i=p.useId(),[x,r]=p.useState(!1),q=p.useMemo(()=>new Map(c.flatMap(e=>e.options).map(e=>[e.value,e])),[c]),u=l.flatMap(e=>{const s=q.get(e);return s?[s]:[]}),d=(e,s)=>{o&&o(s?[...new Set([...l,e])]:l.filter(a=>a!==e))};return n.jsxs("div",{className:t.search,"data-component":"search",children:[n.jsxs("div",{className:t.controls,children:[n.jsx(I.Input,{"aria-label":y,icon:"search",onChange:e=>b(e.target.value),placeholder:f,type:"search",value:k}),c.length>0&&n.jsx(h.Button,{"aria-expanded":x,"aria-haspopup":"dialog",badge:u.length,icon:"funnel",onClick:()=>r(!0),variant:"tertiary",children:_})]}),u.length>0&&n.jsxs("div",{"aria-label":_,className:t.chips,children:[u.map(e=>n.jsx(M.Chip,{accessibleLabel:g(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(h.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:t["dialog-content"],children:[n.jsx("h2",{id:i,children:m}),n.jsx("div",{className:t["filter-groups"],children:c.map((e,s)=>n.jsxs("fieldset",{className:t["filter-group"],children:[e.label&&n.jsx("legend",{children:e.label}),e.options.map(a=>n.jsx(N.Checkbox,{checked:l.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(h.Button,{onClick:()=>r(!1),children:j})})]})})]})};exports.Search=S;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useId as
|
|
1
|
+
import { jsxs as n, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { useId as I, useState as w, useMemo as C } from "react";
|
|
3
3
|
import { Button as m } from "../button/index.js";
|
|
4
|
-
import { Checkbox as
|
|
5
|
-
import { Chip as
|
|
4
|
+
import { Checkbox as M } from "../checkbox/index.js";
|
|
5
|
+
import { Chip as O } 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-D4LZQ-JF.js";
|
|
9
|
+
import '../../assets/index9.css';const B = "_search_1tuej_3", T = "_controls_1tuej_15", $ = "_chips_1tuej_29", r = {
|
|
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_1tuej_36",
|
|
14
|
+
"filter-groups": "_filter-groups_1tuej_45",
|
|
15
|
+
"filter-group": "_filter-group_1tuej_45"
|
|
16
16
|
}, S = ({
|
|
17
17
|
closeLabel: _ = "Close",
|
|
18
18
|
filterButtonLabel: u = "Filters",
|
|
19
19
|
filterDialogTitle: b = "Filters",
|
|
20
|
-
filterGroups:
|
|
20
|
+
filterGroups: c = [],
|
|
21
21
|
onChange: v,
|
|
22
|
-
onSelectedFiltersChange:
|
|
23
|
-
removeFilterLabel: g = (
|
|
22
|
+
onSelectedFiltersChange: t,
|
|
23
|
+
removeFilterLabel: g = (s) => `Remove ${s.label} filter`,
|
|
24
24
|
resetLabel: y = "Reset",
|
|
25
25
|
searchLabel: k = "Search",
|
|
26
|
-
searchPlaceholder:
|
|
27
|
-
selectedFilters:
|
|
28
|
-
value:
|
|
26
|
+
searchPlaceholder: j = "Search",
|
|
27
|
+
selectedFilters: i = [],
|
|
28
|
+
value: D = ""
|
|
29
29
|
}) => {
|
|
30
|
-
const
|
|
31
|
-
const l =
|
|
30
|
+
const s = I(), [f, p] = w(!1), N = C(() => new Map(c.flatMap((e) => e.options).map((e) => [e.value, e])), [c]), h = i.flatMap((e) => {
|
|
31
|
+
const l = N.get(e);
|
|
32
32
|
return l ? [l] : [];
|
|
33
|
-
}), d = (
|
|
34
|
-
|
|
33
|
+
}), d = (e, l) => {
|
|
34
|
+
t && t(l ? [.../* @__PURE__ */ new Set([...i, e])] : i.filter((o) => o !== e));
|
|
35
35
|
};
|
|
36
|
-
return /* @__PURE__ */
|
|
37
|
-
/* @__PURE__ */
|
|
38
|
-
/* @__PURE__ */
|
|
39
|
-
|
|
36
|
+
return /* @__PURE__ */ n("div", { className: r.search, "data-component": "search", children: [
|
|
37
|
+
/* @__PURE__ */ n("div", { className: r.controls, children: [
|
|
38
|
+
/* @__PURE__ */ a(R, { "aria-label": k, icon: "search", onChange: (e) => v(e.target.value), placeholder: j, type: "search", value: D }),
|
|
39
|
+
c.length > 0 && /* @__PURE__ */ a(m, { "aria-expanded": f, "aria-haspopup": "dialog", badge: h.length, icon: "funnel", onClick: () => p(!0), variant: "tertiary", children: u })
|
|
40
40
|
] }),
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
(l.key === "Enter" || l.key === " ") && (l.preventDefault(), d(
|
|
44
|
-
}, role: "button" },
|
|
45
|
-
/* @__PURE__ */
|
|
41
|
+
h.length > 0 && /* @__PURE__ */ n("div", { "aria-label": u, className: r.chips, children: [
|
|
42
|
+
h.map((e) => /* @__PURE__ */ a(O, { accessibleLabel: g(e), label: e.label, onClick: () => d(e.value, !1), onKeyDown: (l) => {
|
|
43
|
+
(l.key === "Enter" || l.key === " ") && (l.preventDefault(), d(e.value, !1));
|
|
44
|
+
}, role: "button" }, e.value)),
|
|
45
|
+
/* @__PURE__ */ a(m, { onClick: () => t == null ? void 0 : t([]), variant: "tertiary", children: y })
|
|
46
46
|
] }),
|
|
47
|
-
f && /* @__PURE__ */
|
|
48
|
-
|
|
49
|
-
}, open: !0, setOpen:
|
|
50
|
-
/* @__PURE__ */
|
|
51
|
-
/* @__PURE__ */
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
] },
|
|
55
|
-
/* @__PURE__ */
|
|
47
|
+
f && /* @__PURE__ */ a(K, { "aria-labelledby": s, onKeyDown: (e) => {
|
|
48
|
+
e.key === "Escape" && p(!1);
|
|
49
|
+
}, open: !0, setOpen: p, children: /* @__PURE__ */ n("div", { className: r["dialog-content"], children: [
|
|
50
|
+
/* @__PURE__ */ a("h2", { id: s, children: b }),
|
|
51
|
+
/* @__PURE__ */ a("div", { className: r["filter-groups"], children: c.map((e, l) => /* @__PURE__ */ n("fieldset", { className: r["filter-group"], children: [
|
|
52
|
+
e.label && /* @__PURE__ */ a("legend", { children: e.label }),
|
|
53
|
+
e.options.map((o) => /* @__PURE__ */ a(M, { checked: i.includes(o.value), label: o.label, onChange: (x) => d(o.value, x.target.checked) }, o.value))
|
|
54
|
+
] }, e.label ?? l)) }),
|
|
55
|
+
/* @__PURE__ */ a(E, { children: /* @__PURE__ */ a(m, { onClick: () => p(!1), children: _ }) })
|
|
56
56
|
] }) })
|
|
57
57
|
] });
|
|
58
58
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react/jsx-runtime");require("../../classix-5H4IWnMA.cjs");require("../../icons-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react/jsx-runtime");require("../../classix-5H4IWnMA.cjs");require("../../icons-BoBeAmLe.cjs");const e=require("../../index-Ct0mJ-KK.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
|
-
import "../../icons-
|
|
4
|
-
import { S as e } from "../../index-
|
|
3
|
+
import "../../icons-Dhj9mAkR.js";
|
|
4
|
+
import { S as e } from "../../index-uQRsVtP-.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/index8.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/index8.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/index7.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/index7.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/index6.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/index6.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/index5.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/index5.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/index4.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/index4.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/index3.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/index3.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/index14.css');const s=require("react/jsx-runtime"),c=require("../../classix-5H4IWnMA.cjs"),a=require("../icon/index.cjs"),t={static:"_static_jn98v_1"},l={default:t.default,static:t.static},r=({variant:o="default",children:i,iconName:e,...n})=>s.jsxs("div",{className:c.t(t.tooltip,l[o]),...n,"data-component":"tooltip",children:[e&&s.jsx(a.Icon,{fill:!0,gap:"right",name:e}),i]});exports.Tooltip=r;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsxs as r, jsx as
|
|
2
|
-
import { t as
|
|
1
|
+
import { jsxs as r, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { t as c } from "../../classix-DG18itHa.js";
|
|
3
3
|
import { Icon as e } from "../icon/index.js";
|
|
4
|
-
import '../../assets/
|
|
5
|
-
static: "
|
|
4
|
+
import '../../assets/index14.css';const t = {
|
|
5
|
+
static: "_static_jn98v_1"
|
|
6
6
|
}, n = {
|
|
7
7
|
default: t.default,
|
|
8
8
|
static: t.static
|
|
@@ -11,8 +11,8 @@ import '../../assets/index3.css';const t = {
|
|
|
11
11
|
children: a,
|
|
12
12
|
iconName: o,
|
|
13
13
|
...i
|
|
14
|
-
}) => /* @__PURE__ */ r("div", { className:
|
|
15
|
-
o && /* @__PURE__ */
|
|
14
|
+
}) => /* @__PURE__ */ r("div", { className: c(t.tooltip, n[s]), ...i, "data-component": "tooltip", children: [
|
|
15
|
+
o && /* @__PURE__ */ l(e, { fill: !0, gap: "right", name: o }),
|
|
16
16
|
a
|
|
17
17
|
] });
|
|
18
18
|
export {
|