@solibo/solibo-ui 0.5.6 → 0.5.8
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/index15.css +1 -1
- package/dist/assets/index16.css +1 -1
- package/dist/assets/index18.css +1 -1
- package/dist/assets/index2.css +1 -1
- package/dist/assets/index21.css +1 -1
- package/dist/assets/index24.css +1 -1
- package/dist/assets/index29.css +1 -1
- package/dist/assets/index31.css +1 -1
- package/dist/assets/index35.css +1 -1
- package/dist/assets/index38.css +1 -1
- package/dist/assets/index39.css +1 -1
- package/dist/components/_avatar/index.cjs +1 -1
- package/dist/components/_avatar/index.js +7 -7
- package/dist/components/_card/index.cjs +1 -1
- package/dist/components/_card/index.js +29 -29
- package/dist/components/_croppable/index.cjs +1 -1
- package/dist/components/_croppable/index.js +110 -110
- package/dist/components/_editor/index.cjs +1 -1
- package/dist/components/_editor/index.js +1 -1
- package/dist/components/_sortable/index.cjs +1 -1
- package/dist/components/_sortable/index.cjs.map +1 -1
- package/dist/components/_sortable/index.js +27 -27
- package/dist/components/_sortable/index.js.map +1 -1
- package/dist/components/badge/index.cjs +1 -1
- package/dist/components/badge/index.js +9 -9
- package/dist/components/button/index.cjs +1 -1
- package/dist/components/button/index.js +14 -14
- package/dist/components/file/index.cjs +1 -1
- package/dist/components/file/index.js +16 -16
- package/dist/components/icon/index.cjs +1 -1
- package/dist/components/icon/index.js +22 -22
- package/dist/components/loading/index.cjs +1 -1
- package/dist/components/loading/index.js +7 -7
- package/dist/components/message/index.cjs +1 -1
- package/dist/components/message/index.js +6 -6
- package/dist/components/toggle/index.cjs +1 -1
- package/dist/components/toggle/index.js +8 -8
- package/dist/tokens.json +1 -1
- package/package.json +1 -1
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { t as
|
|
3
|
-
import _, { useMemo as
|
|
4
|
-
import { i as
|
|
5
|
-
import { List as
|
|
6
|
-
import '../../assets/index24.css';const
|
|
7
|
-
sortable:
|
|
8
|
-
dragging:
|
|
9
|
-
dropping:
|
|
10
|
-
columns:
|
|
11
|
-
pseudo:
|
|
12
|
-
"target-above": "_target-
|
|
13
|
-
"target-below": "_target-
|
|
1
|
+
import { jsx as I } from "react/jsx-runtime";
|
|
2
|
+
import { t as T } from "../../classix-DG18itHa.js";
|
|
3
|
+
import _, { useMemo as z, useRef as B, useState as h, useEffect as M } from "react";
|
|
4
|
+
import { i as N } from "../../icons-DkF2p6NO.js";
|
|
5
|
+
import { List as k } from "../list/index.js";
|
|
6
|
+
import '../../assets/index24.css';const j = "_sortable_c1ptl_5", F = "_dragging_c1ptl_35", G = "_dropping_c1ptl_50", L = "_columns_c1ptl_63", W = "_pseudo_c1ptl_73", s = {
|
|
7
|
+
sortable: j,
|
|
8
|
+
dragging: F,
|
|
9
|
+
dropping: G,
|
|
10
|
+
columns: L,
|
|
11
|
+
pseudo: W,
|
|
12
|
+
"target-above": "_target-above_c1ptl_88",
|
|
13
|
+
"target-below": "_target-below_c1ptl_89"
|
|
14
14
|
};
|
|
15
15
|
function P({
|
|
16
16
|
children: b,
|
|
17
|
-
className:
|
|
17
|
+
className: E,
|
|
18
18
|
columns: u = 1,
|
|
19
19
|
isRearranging: d = !1,
|
|
20
20
|
onChangeOrder: g,
|
|
21
21
|
...x
|
|
22
22
|
}) {
|
|
23
|
-
const
|
|
23
|
+
const v = Number.isFinite(u) ? Math.max(1, Math.floor(u)) : 1, w = z(() => _.Children.toArray(b), [b]), r = B(-1), [i, $] = h({
|
|
24
24
|
height: 0,
|
|
25
25
|
width: 0
|
|
26
|
-
}), [a, f] = h(null), [
|
|
26
|
+
}), [a, f] = h(null), [A, D] = h(null), H = {
|
|
27
27
|
...x.style,
|
|
28
|
-
"--icon-svg":
|
|
29
|
-
"--height":
|
|
30
|
-
"--width":
|
|
28
|
+
"--icon-svg": N("sort", !0),
|
|
29
|
+
"--height": `calc(${i.height}px - var(--scale-16))`,
|
|
30
|
+
"--width": v > 1 ? `calc(${i.width}px - var(--scale-16))` : `${i.width}px`
|
|
31
31
|
}, S = () => {
|
|
32
32
|
r.current = -1, f(null);
|
|
33
33
|
};
|
|
34
|
-
return
|
|
34
|
+
return M(() => {
|
|
35
35
|
d || D(null);
|
|
36
|
-
}, [d]), /* @__PURE__ */
|
|
37
|
-
const
|
|
38
|
-
return /* @__PURE__ */
|
|
36
|
+
}, [d]), /* @__PURE__ */ I(k, { className: T(E, s.sortable, v > 1 && s.columns), columns: u, ordered: !0, style: H, ...x, "data-component": "sortable", children: w.map((m, t) => {
|
|
37
|
+
const V = _.isValidElement(m) ? m.key : null;
|
|
38
|
+
return /* @__PURE__ */ I("li", { className: T(a !== null && a > t - 10 && a < t + 10 && s.pseudo, a === t && r.current < t && s["target-below"], a === t && r.current > t && s["target-above"], r.current === t && s.dragging, A === t && d && s.dropping), draggable: !d, onDragEnd: () => S(), onDragOver: (e) => {
|
|
39
39
|
e.preventDefault(), e.dataTransfer.dropEffect = "move";
|
|
40
40
|
const o = r.current;
|
|
41
41
|
if (o < 0 || o === t) return;
|
|
42
42
|
const n = e.currentTarget.getBoundingClientRect(), c = t === o + 1 ? i.height : n.height, l = e.clientY > n.top + c / 2 ? t + 1 : t, p = l > o ? l - 1 : l;
|
|
43
43
|
f(p);
|
|
44
44
|
}, onDragStart: (e) => {
|
|
45
|
-
r.current = t,
|
|
45
|
+
r.current = t, $({
|
|
46
46
|
height: e.currentTarget.offsetHeight,
|
|
47
47
|
width: e.currentTarget.offsetWidth
|
|
48
48
|
}), e.dataTransfer.setData("text/plain", ""), e.dataTransfer.effectAllowed = "move", f(t);
|
|
@@ -51,12 +51,12 @@ function P({
|
|
|
51
51
|
const o = r.current, n = a;
|
|
52
52
|
if (o < 0 || n === null || o === n) return;
|
|
53
53
|
D(n);
|
|
54
|
-
const c =
|
|
55
|
-
c.splice(n, 0,
|
|
54
|
+
const c = w.slice(), [y] = c.splice(o, 1);
|
|
55
|
+
c.splice(n, 0, y), g == null || g(c.map((l, p) => ({
|
|
56
56
|
id: String(_.isValidElement(l) ? l.props["data-id"] ?? `idx-${p}` : `idx-${p}`),
|
|
57
57
|
weight: c.length - 1 - p
|
|
58
58
|
}))), S();
|
|
59
|
-
}, "data-component": "sortable", children: m },
|
|
59
|
+
}, "data-component": "sortable", children: m }, V ?? t);
|
|
60
60
|
}) });
|
|
61
61
|
}
|
|
62
62
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/_sortable/index.tsx"],"sourcesContent":["import cx from 'classix';\nimport React, { useEffect, useMemo, useRef, useState } from 'react';\n\nimport { iconSVG } from '@/components/icon/icons.ts';\nimport { List } from '@/components/list';\n\nimport styles from './styles.module.css';\n\ntype SortItem = { id: string; weight: number };\n\ntype SortableProps = React.ComponentPropsWithoutRef<'ol'> & {\n columns?: number;\n isRearranging?: boolean;\n onChangeOrder: (order: SortItem[]) => void;\n};\n\ntype withVars = React.CSSProperties & {\n '--height'?: string;\n '--width'?: string;\n '--icon-svg'?: string;\n};\n\n/**\n * Children must provide a stable `data-id` for emits `{ id, weight }` and `key` (reconciliation).\n */\n\nexport function Sortable({\n children,\n className,\n columns = 1,\n isRearranging = false,\n onChangeOrder,\n ...props\n}: SortableProps) {\n const cols = Number.isFinite(columns) ? Math.max(1, Math.floor(columns)) : 1;\n const arr = useMemo(() => React.Children.toArray(children), [children]);\n const drag = useRef(-1);\n const [zoneSize, setZoneSize] = useState({\n height: 0,\n width: 0,\n });\n const [dropIndex, setDropIndex] = useState<number | null>(null);\n const [droppedAtIndex, setDroppedAtIndex] = useState<number | null>(null);\n const withVars: withVars = {\n ...props.style,\n '--icon-svg': iconSVG('sort', true),\n '--height':
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/_sortable/index.tsx"],"sourcesContent":["import cx from 'classix';\nimport React, { useEffect, useMemo, useRef, useState } from 'react';\n\nimport { iconSVG } from '@/components/icon/icons.ts';\nimport { List } from '@/components/list';\n\nimport styles from './styles.module.css';\n\ntype SortItem = { id: string; weight: number };\n\ntype SortableProps = React.ComponentPropsWithoutRef<'ol'> & {\n columns?: number;\n isRearranging?: boolean;\n onChangeOrder: (order: SortItem[]) => void;\n};\n\ntype withVars = React.CSSProperties & {\n '--height'?: string;\n '--width'?: string;\n '--icon-svg'?: string;\n};\n\n/**\n * Children must provide a stable `data-id` for emits `{ id, weight }` and `key` (reconciliation).\n */\n\nexport function Sortable({\n children,\n className,\n columns = 1,\n isRearranging = false,\n onChangeOrder,\n ...props\n}: SortableProps) {\n const cols = Number.isFinite(columns) ? Math.max(1, Math.floor(columns)) : 1;\n const arr = useMemo(() => React.Children.toArray(children), [children]);\n const drag = useRef(-1);\n const [zoneSize, setZoneSize] = useState({\n height: 0,\n width: 0,\n });\n const [dropIndex, setDropIndex] = useState<number | null>(null);\n const [droppedAtIndex, setDroppedAtIndex] = useState<number | null>(null);\n const withVars: withVars = {\n ...props.style,\n '--icon-svg': iconSVG('sort', true),\n '--height': `calc(${zoneSize.height}px - var(--scale-16))`,\n '--width': cols > 1 ? `calc(${zoneSize.width}px - var(--scale-16))` : `${zoneSize.width}px`,\n };\n\n const resetDragState = () => {\n drag.current = -1;\n setDropIndex(null);\n };\n\n useEffect(() => {\n if (!isRearranging) {\n setDroppedAtIndex(null);\n }\n }, [isRearranging]);\n\n return (\n <List\n className={cx(className, styles.sortable, cols > 1 && styles.columns)}\n columns={columns}\n ordered\n style={withVars}\n {...props}\n >\n {arr.map((child, i) => {\n const key = React.isValidElement(child) ? child.key : null;\n\n return (\n <li\n key={key ?? i}\n className={cx(\n dropIndex !== null && dropIndex > i - 10 && dropIndex < i + 10 && styles.pseudo,\n dropIndex === i && drag.current < i && styles['target-below'],\n dropIndex === i && drag.current > i && styles['target-above'],\n drag.current === i && styles.dragging,\n droppedAtIndex === i && isRearranging && styles.dropping\n )}\n draggable={!isRearranging}\n onDragEnd={() => resetDragState()}\n onDragOver={(e) => {\n e.preventDefault();\n e.dataTransfer.dropEffect = 'move';\n const from = drag.current;\n if (from < 0 || from === i) return;\n\n const rect = e.currentTarget.getBoundingClientRect();\n const itemHeight = i === from + 1 ? zoneSize.height : rect.height;\n const isBottomHalf = e.clientY > rect.top + itemHeight / 2;\n const rawIndex = isBottomHalf ? i + 1 : i;\n const nextDropIndex = rawIndex > from ? rawIndex - 1 : rawIndex;\n\n setDropIndex(nextDropIndex);\n }}\n onDragStart={(e) => {\n drag.current = i;\n setZoneSize({\n height: e.currentTarget.offsetHeight,\n width: e.currentTarget.offsetWidth,\n });\n e.dataTransfer.setData('text/plain', '');\n e.dataTransfer.effectAllowed = 'move';\n setDropIndex(i);\n }}\n onDrop={(e) => {\n e.preventDefault();\n const from = drag.current;\n const to = dropIndex;\n if (from < 0 || to === null || from === to) return;\n\n setDroppedAtIndex(to);\n const next = arr.slice();\n const [moved] = next.splice(from, 1);\n next.splice(to, 0, moved);\n\n onChangeOrder?.(\n next.map((c, idx) => ({\n id: String(\n React.isValidElement(c)\n ? ((c.props as { 'data-id'?: string })['data-id'] ?? `idx-${idx}`)\n : `idx-${idx}`\n ),\n\n weight: next.length - 1 - idx,\n }))\n );\n\n resetDragState();\n }}\n >\n {child}\n </li>\n );\n })}\n </List>\n );\n}\n"],"names":["Sortable","children","className","columns","isRearranging","onChangeOrder","props","cols","Number","isFinite","Math","max","floor","arr","useMemo","React","Children","toArray","drag","useRef","zoneSize","setZoneSize","useState","height","width","dropIndex","setDropIndex","droppedAtIndex","setDroppedAtIndex","withVars","style","iconSVG","resetDragState","current","useEffect","jsx","List","cx","styles","sortable","map","child","i","key","isValidElement","pseudo","dragging","dropping","e","preventDefault","dataTransfer","dropEffect","from","rect","currentTarget","getBoundingClientRect","itemHeight","rawIndex","clientY","top","nextDropIndex","offsetHeight","offsetWidth","setData","effectAllowed","to","next","slice","moved","splice","c","idx","id","String","weight","length"],"mappings":";;;;;;;;;;;;;;AA0BO,SAASA,EAAS;AAA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,CAACC,CAAK,IAAIF,EAAKG,OAAOjB,GAAM,CAAC;AACnCc,MAAAA,EAAKG,OAAOJ,GAAI,GAAGG,CAAK,GAExB/D,KAAAA,QAAAA,EACE6D,EAAK1B,IAAI,CAAC8B,GAAGC,OAAS;AAAA,QACpBC,IAAIC,OACF1D,EAAM6B,eAAe0B,CAAC,IAChBA,EAAEhE,MAAiC,SAAS,KAAK,OAAOiE,CAAG,KAC7D,OAAOA,CAAG,EAChB;AAAA,QAEAG,QAAQR,EAAKS,SAAS,IAAIJ;AAAAA,MAAAA,EAC1B,IAGJvC,EAAAA;AAAAA,IACF,GAAE,kBAAA,YAEDS,UAAAA,EAAAA,GA5DIE,KAAOD,CA6Dd;AAAA,EAEJ,CAAC,EAAA,CACH;AAEJ;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index29.css');const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index29.css');const n=require("react/jsx-runtime"),r=require("../../classix-5H4IWnMA.cjs"),s=require("../button/index.cjs"),c=require("../icon/index.cjs"),d="_badge_j10be_1",m="_primary_j10be_8",l="_info_j10be_13",e={badge:d,primary:m,info:l},u={default:e.default,info:e.info,primary:e.primary},_=({children:t,deleteAccessibleLabel:i="Remove",onDelete:a,variant:o="default"})=>n.jsxs("span",{className:r.t(e.badge,u[o]),"data-component":"badge",children:[t,a&&n.jsx(s.Button,{"aria-label":i,onClick:a,variant:"minimal",children:n.jsx(c.Icon,{name:"x"})})]});exports.Badge=_;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { t as
|
|
3
|
-
import { Button as
|
|
4
|
-
import { Icon as
|
|
5
|
-
import '../../assets/index29.css';const
|
|
6
|
-
badge:
|
|
7
|
-
primary:
|
|
1
|
+
import { jsxs as e, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { t as m } from "../../classix-DG18itHa.js";
|
|
3
|
+
import { Button as s } from "../button/index.js";
|
|
4
|
+
import { Icon as c } from "../icon/index.js";
|
|
5
|
+
import '../../assets/index29.css';const d = "_badge_j10be_1", f = "_primary_j10be_8", p = "_info_j10be_13", a = {
|
|
6
|
+
badge: d,
|
|
7
|
+
primary: f,
|
|
8
8
|
info: p
|
|
9
9
|
}, l = {
|
|
10
10
|
default: a.default,
|
|
@@ -15,9 +15,9 @@ import '../../assets/index29.css';const c = "_badge_17jf9_1", d = "_primary_17jf
|
|
|
15
15
|
deleteAccessibleLabel: i = "Remove",
|
|
16
16
|
onDelete: r,
|
|
17
17
|
variant: t = "default"
|
|
18
|
-
}) => /* @__PURE__ */
|
|
18
|
+
}) => /* @__PURE__ */ e("span", { className: m(a.badge, l[t]), "data-component": "badge", children: [
|
|
19
19
|
n,
|
|
20
|
-
r && /* @__PURE__ */ o(
|
|
20
|
+
r && /* @__PURE__ */ o(s, { "aria-label": i, onClick: r, variant: "minimal", children: /* @__PURE__ */ o(c, { name: "x" }) })
|
|
21
21
|
] });
|
|
22
22
|
export {
|
|
23
23
|
j as Badge
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index31.css');const a=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index31.css');const a=require("react/jsx-runtime"),c=require("../../classix-5H4IWnMA.cjs"),l=require("../icon/index.cjs"),d="_button_1scj6_1",_="_danger_1scj6_22",p="_minimal_1scj6_35",b="_primary_1scj6_42",t={button:d,danger:_,minimal:p,primary:b},g={danger:t.danger,default:t.default,minimal:t.minimal,primary:t.primary};function y({children:i,className:s,disabled:r=!1,icon:e,onClick:o,ref:m,variant:n="default",...u}){return a.jsxs("button",{className:c.t(t.button,g[n],s),disabled:r,onClick:o,ref:m,type:"button",...u,"data-component":"button",children:[e&&a.jsx(l.Icon,{gap:"right",name:e,size:"small",variant:n==="minimal"||n==="default"?"default":"white"}),i]})}exports.Button=y;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { t as
|
|
3
|
-
import { Icon as
|
|
4
|
-
import '../../assets/index31.css';const
|
|
5
|
-
button:
|
|
6
|
-
danger:
|
|
1
|
+
import { jsxs as l, jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { t as c } from "../../classix-DG18itHa.js";
|
|
3
|
+
import { Icon as d } from "../icon/index.js";
|
|
4
|
+
import '../../assets/index31.css';const p = "_button_1scj6_1", _ = "_danger_1scj6_22", f = "_minimal_1scj6_35", b = "_primary_1scj6_42", t = {
|
|
5
|
+
button: p,
|
|
6
|
+
danger: _,
|
|
7
7
|
minimal: f,
|
|
8
8
|
primary: b
|
|
9
9
|
}, g = {
|
|
@@ -12,22 +12,22 @@ import '../../assets/index31.css';const _ = "_button_l8m83_1", c = "_danger_l8m8
|
|
|
12
12
|
minimal: t.minimal,
|
|
13
13
|
primary: t.primary
|
|
14
14
|
};
|
|
15
|
-
function
|
|
16
|
-
children:
|
|
15
|
+
function x({
|
|
16
|
+
children: m,
|
|
17
17
|
className: r,
|
|
18
18
|
disabled: i = !1,
|
|
19
|
-
icon:
|
|
19
|
+
icon: a,
|
|
20
20
|
onClick: o,
|
|
21
21
|
ref: e,
|
|
22
22
|
variant: n = "default",
|
|
23
|
-
...
|
|
23
|
+
...s
|
|
24
24
|
}) {
|
|
25
|
-
return /* @__PURE__ */
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
return /* @__PURE__ */ l("button", { className: c(t.button, g[n], r), disabled: i, onClick: o, ref: e, type: "button", ...s, "data-component": "button", children: [
|
|
26
|
+
a && /* @__PURE__ */ u(d, { gap: "right", name: a, size: "small", variant: n === "minimal" || n === "default" ? "default" : "white" }),
|
|
27
|
+
m
|
|
28
28
|
] });
|
|
29
29
|
}
|
|
30
30
|
export {
|
|
31
|
-
|
|
31
|
+
x as Button
|
|
32
32
|
};
|
|
33
33
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index10.css');const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index10.css');const e=require("react/jsx-runtime"),n=require("../icon/index.cjs"),d="_file_1ik2m_1",r={file:d,delete:"_delete_1ik2m_52"},m=({deleteAccessibleLabel:o,name:s,onClick:t,onDelete:i,ref:c,url:a})=>e.jsxs("div",{className:r.file,ref:c,"data-component":"file",children:[e.jsxs("a",{href:a,onClick:l=>{l.stopPropagation(),(t||!a)&&(l.preventDefault(),t==null||t())},title:s,children:[e.jsx(n.Icon,{name:"document",size:"small",variant:"primary"}),s]}),i&&e.jsx("a",{"aria-label":o??`Delete ${s}`,className:r.delete,onClick:()=>i(),tabIndex:0,children:e.jsx(n.Icon,{name:"trash",size:"small",variant:"danger"})})]});exports.File=m;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { Icon as
|
|
3
|
-
import '../../assets/index10.css';const
|
|
4
|
-
file:
|
|
5
|
-
delete: "
|
|
1
|
+
import { jsxs as s, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { Icon as m } from "../icon/index.js";
|
|
3
|
+
import '../../assets/index10.css';const f = "_file_1ik2m_1", n = {
|
|
4
|
+
file: f,
|
|
5
|
+
delete: "_delete_1ik2m_52"
|
|
6
6
|
}, _ = ({
|
|
7
|
-
deleteAccessibleLabel:
|
|
8
|
-
name:
|
|
7
|
+
deleteAccessibleLabel: d,
|
|
8
|
+
name: a,
|
|
9
9
|
onClick: e,
|
|
10
|
-
onDelete:
|
|
10
|
+
onDelete: i,
|
|
11
11
|
ref: o,
|
|
12
|
-
url:
|
|
13
|
-
}) => /* @__PURE__ */
|
|
14
|
-
/* @__PURE__ */
|
|
15
|
-
|
|
16
|
-
}, title:
|
|
17
|
-
/* @__PURE__ */
|
|
18
|
-
|
|
12
|
+
url: l
|
|
13
|
+
}) => /* @__PURE__ */ s("div", { className: n.file, ref: o, "data-component": "file", children: [
|
|
14
|
+
/* @__PURE__ */ s("a", { href: l, onClick: (r) => {
|
|
15
|
+
r.stopPropagation(), (e || !l) && (r.preventDefault(), e == null || e());
|
|
16
|
+
}, title: a, children: [
|
|
17
|
+
/* @__PURE__ */ t(m, { name: "document", size: "small", variant: "primary" }),
|
|
18
|
+
a
|
|
19
19
|
] }),
|
|
20
|
-
|
|
20
|
+
i && /* @__PURE__ */ t("a", { "aria-label": d ?? `Delete ${a}`, className: n.delete, onClick: () => i(), tabIndex: 0, children: /* @__PURE__ */ t(m, { name: "trash", size: "small", variant: "danger" }) })
|
|
21
21
|
] });
|
|
22
22
|
export {
|
|
23
23
|
_ as File
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index35.css');const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index35.css');const r=require("react/jsx-runtime"),o=require("../../classix-5H4IWnMA.cjs"),n=require("../../icons-vqS7W0cD.cjs"),l="_icon_1uucz_1",_="_small_1uucz_9",m="_medium_1uucz_14",d="_large_1uucz_19",g="_danger_1uucz_24",p="_primary_1uucz_32",y="_white_1uucz_36",e={icon:l,small:_,medium:m,large:d,danger:g,default:"_default_1uucz_28",primary:p,white:y,"gap-right":"_gap-right_1uucz_40","gap-left":"_gap-left_1uucz_44"},z={large:e.large,medium:e.medium,small:e.small},f={danger:e.danger,default:e.default,primary:e.primary,white:e.white},h=({fill:a,gap:t="none",name:c,size:s="medium",variant:u="default"})=>{const i={maskImage:n.iconSVG(c,a??!1)};return r.jsx("span",{"aria-hidden":"true",className:o.t(t!=="none"&&e[`gap-${t}`],z[s],e.icon,f[u]),style:i,"data-component":"icon"})},w=()=>Object.keys(n.iconPaths);exports.Icon=h;exports.Icons=w;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { t as
|
|
3
|
-
import { i as
|
|
4
|
-
import '../../assets/index35.css';const
|
|
5
|
-
icon:
|
|
6
|
-
small:
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { t as o } from "../../classix-DG18itHa.js";
|
|
3
|
+
import { i as u, a as m } from "../../icons-DkF2p6NO.js";
|
|
4
|
+
import '../../assets/index35.css';const _ = "_icon_1uucz_1", l = "_small_1uucz_9", d = "_medium_1uucz_14", g = "_large_1uucz_19", p = "_danger_1uucz_24", f = "_primary_1uucz_32", z = "_white_1uucz_36", a = {
|
|
5
|
+
icon: _,
|
|
6
|
+
small: l,
|
|
7
7
|
medium: d,
|
|
8
8
|
large: g,
|
|
9
|
-
danger:
|
|
10
|
-
default: "
|
|
9
|
+
danger: p,
|
|
10
|
+
default: "_default_1uucz_28",
|
|
11
11
|
primary: f,
|
|
12
|
-
white:
|
|
13
|
-
"gap-right": "_gap-
|
|
14
|
-
"gap-left": "_gap-
|
|
15
|
-
},
|
|
12
|
+
white: z,
|
|
13
|
+
"gap-right": "_gap-right_1uucz_40",
|
|
14
|
+
"gap-left": "_gap-left_1uucz_44"
|
|
15
|
+
}, h = {
|
|
16
16
|
large: a.large,
|
|
17
17
|
medium: a.medium,
|
|
18
18
|
small: a.small
|
|
19
|
-
},
|
|
19
|
+
}, y = {
|
|
20
20
|
danger: a.danger,
|
|
21
21
|
default: a.default,
|
|
22
22
|
primary: a.primary,
|
|
23
23
|
white: a.white
|
|
24
|
-
},
|
|
24
|
+
}, k = ({
|
|
25
25
|
fill: t,
|
|
26
26
|
gap: e = "none",
|
|
27
27
|
name: n,
|
|
28
|
-
size:
|
|
29
|
-
variant:
|
|
28
|
+
size: c = "medium",
|
|
29
|
+
variant: r = "default"
|
|
30
30
|
}) => {
|
|
31
|
-
const
|
|
32
|
-
maskImage:
|
|
31
|
+
const s = {
|
|
32
|
+
maskImage: u(n, t ?? !1)
|
|
33
33
|
};
|
|
34
|
-
return /* @__PURE__ */
|
|
35
|
-
},
|
|
34
|
+
return /* @__PURE__ */ i("span", { "aria-hidden": "true", className: o(e !== "none" && a[`gap-${e}`], h[c], a.icon, y[r]), style: s, "data-component": "icon" });
|
|
35
|
+
}, x = () => Object.keys(m);
|
|
36
36
|
export {
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
k as Icon,
|
|
38
|
+
x as Icons
|
|
39
39
|
};
|
|
40
40
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index38.css');const t=require("react/jsx-runtime"),i=require("../../classix-5H4IWnMA.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index38.css');const t=require("react/jsx-runtime"),i=require("../../classix-5H4IWnMA.cjs"),d="_loading_2k531_23",l="_spin_2k531_1",_="_ping_2k531_39",r="_sticky_2k531_65",n={loading:d,default:"_default_2k531_28",spin:l,ping:_,sticky:r},g=({variant:o="default",size:s,sticky:a=!1,...e})=>{const c={"--border-size":s?s/8+"px":void 0,"--size":s?s+"px":void 0};return t.jsx("div",{className:i.t(n.loading,a&&n.sticky),"data-component":"loading",children:t.jsx("span",{className:i.t(n.loading,n[o]),style:c,...e})})};exports.Loading=g;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import { t } from "../../classix-DG18itHa.js";
|
|
3
|
-
import '../../assets/index38.css';const l = "
|
|
3
|
+
import '../../assets/index38.css';const l = "_loading_2k531_23", _ = "_spin_2k531_1", p = "_ping_2k531_39", e = "_sticky_2k531_65", o = {
|
|
4
4
|
loading: l,
|
|
5
|
-
default: "
|
|
5
|
+
default: "_default_2k531_28",
|
|
6
6
|
spin: _,
|
|
7
7
|
ping: p,
|
|
8
8
|
sticky: e
|
|
9
|
-
},
|
|
9
|
+
}, k = ({
|
|
10
10
|
variant: i = "default",
|
|
11
11
|
size: n,
|
|
12
|
-
sticky:
|
|
13
|
-
...
|
|
12
|
+
sticky: a = !1,
|
|
13
|
+
...d
|
|
14
14
|
}) => {
|
|
15
15
|
const c = {
|
|
16
16
|
"--border-size": n ? n / 8 + "px" : void 0,
|
|
17
17
|
"--size": n ? n + "px" : void 0
|
|
18
18
|
};
|
|
19
|
-
return /* @__PURE__ */ s("div", { className: t(o.loading,
|
|
19
|
+
return /* @__PURE__ */ s("div", { className: t(o.loading, a && o.sticky), "data-component": "loading", children: /* @__PURE__ */ s("span", { className: t(o.loading, o[i]), style: c, ...d }) });
|
|
20
20
|
};
|
|
21
21
|
export {
|
|
22
|
-
|
|
22
|
+
k as Loading
|
|
23
23
|
};
|
|
24
24
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index39.css');const s=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index39.css');const s=require("react/jsx-runtime"),i=require("../../classix-5H4IWnMA.cjs"),r=require("../icon/index.cjs"),c="_message_1whow_1",m="_preview_1whow_40",t={message:c,preview:m},g=({content:a,id:n,preview:o,type:e="default"})=>s.jsxs("div",{className:i.t(t.message,o&&t.preview),"data-id":n,"data-type":e,"data-component":"message",children:[e=="system"&&s.jsx(r.Icon,{gap:"right",name:"info"}),a]});exports.Message=g;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as m, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { t as i } from "../../classix-DG18itHa.js";
|
|
3
3
|
import { Icon as n } from "../icon/index.js";
|
|
4
|
-
import '../../assets/index39.css';const p = "
|
|
4
|
+
import '../../assets/index39.css';const p = "_message_1whow_1", c = "_preview_1whow_40", s = {
|
|
5
5
|
message: p,
|
|
6
6
|
preview: c
|
|
7
|
-
},
|
|
7
|
+
}, _ = ({
|
|
8
8
|
content: t,
|
|
9
9
|
id: a,
|
|
10
|
-
preview:
|
|
10
|
+
preview: o,
|
|
11
11
|
type: e = "default"
|
|
12
|
-
}) => /* @__PURE__ */
|
|
12
|
+
}) => /* @__PURE__ */ m("div", { className: i(s.message, o && s.preview), "data-id": a, "data-type": e, "data-component": "message", children: [
|
|
13
13
|
e == "system" && /* @__PURE__ */ r(n, { gap: "right", name: "info" }),
|
|
14
14
|
t
|
|
15
15
|
] });
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
_ as Message
|
|
18
18
|
};
|
|
19
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index2.css');const t=require("react/jsx-runtime"),i=require("../loading/index.cjs"),g="
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index2.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,24 +1,24 @@
|
|
|
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/index2.css';const m = "
|
|
3
|
+
import '../../assets/index2.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
|
|
7
|
-
},
|
|
7
|
+
}, h = ({
|
|
8
8
|
checked: s,
|
|
9
|
-
disabled:
|
|
9
|
+
disabled: l,
|
|
10
10
|
isLoading: a,
|
|
11
11
|
label: e,
|
|
12
|
-
onChange:
|
|
12
|
+
onChange: c
|
|
13
13
|
}) => {
|
|
14
|
-
const
|
|
15
|
-
return /* @__PURE__ */ g("label", { className: o.toggle, onClick: (
|
|
16
|
-
/* @__PURE__ */ t("input", { checked: s, disabled:
|
|
14
|
+
const n = s !== void 0 && c === void 0;
|
|
15
|
+
return /* @__PURE__ */ g("label", { className: o.toggle, onClick: (r) => r.stopPropagation(), "data-component": "toggle", children: [
|
|
16
|
+
/* @__PURE__ */ t("input", { checked: s, disabled: l || a, onChange: c, readOnly: n, type: "checkbox" }),
|
|
17
17
|
/* @__PURE__ */ t("span", { "aria-hidden": "true", className: o.track, children: a ? /* @__PURE__ */ t(i, { size: 24 }) : /* @__PURE__ */ t("span", { className: o.thumb }) }),
|
|
18
18
|
e && /* @__PURE__ */ t("span", { className: "toggle", children: e })
|
|
19
19
|
] });
|
|
20
20
|
};
|
|
21
21
|
export {
|
|
22
|
-
|
|
22
|
+
h as Toggle
|
|
23
23
|
};
|
|
24
24
|
//# sourceMappingURL=index.js.map
|
package/dist/tokens.json
CHANGED