@solibo/solibo-ui 0.3.28 → 0.3.30
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/index12.css +1 -1
- package/dist/assets/index13.css +1 -1
- package/dist/assets/index14.css +1 -1
- package/dist/assets/index19.css +1 -1
- package/dist/assets/index20.css +1 -1
- package/dist/assets/index21.css +1 -1
- package/dist/assets/index22.css +1 -1
- package/dist/assets/index23.css +1 -1
- package/dist/assets/index24.css +1 -1
- package/dist/assets/index25.css +1 -1
- package/dist/assets/index26.css +1 -1
- package/dist/assets/index27.css +1 -1
- package/dist/assets/index28.css +1 -1
- package/dist/assets/index29.css +1 -1
- package/dist/assets/index30.css +1 -1
- package/dist/assets/index31.css +1 -1
- package/dist/assets/index33.css +1 -1
- package/dist/assets/index35.css +1 -1
- package/dist/assets/index38.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 -0
- package/dist/assets/index5.css +1 -1
- package/dist/assets/index7.css +1 -1
- package/dist/assets/styles.css +1 -1
- package/dist/components/_avatar/index.cjs +1 -1
- package/dist/components/_avatar/index.js +1 -1
- package/dist/components/_card/index.cjs +1 -1
- package/dist/components/_card/index.js +11 -11
- package/dist/components/_collapsible/index.cjs +1 -1
- package/dist/components/_collapsible/index.cjs.map +1 -1
- package/dist/components/_collapsible/index.js +3 -3
- package/dist/components/_collapsible/index.js.map +1 -1
- package/dist/components/_croppable/index.cjs +1 -1
- package/dist/components/_croppable/index.cjs.map +1 -1
- package/dist/components/_croppable/index.js +238 -159
- package/dist/components/_croppable/index.js.map +1 -1
- package/dist/components/_dropzone/index.cjs +1 -1
- package/dist/components/_dropzone/index.js +1 -1
- package/dist/components/_editor/index.cjs +25 -25
- package/dist/components/_editor/index.cjs.map +1 -1
- package/dist/components/_editor/index.js +1782 -1784
- package/dist/components/_editor/index.js.map +1 -1
- package/dist/components/_messages/index.cjs +1 -1
- package/dist/components/_messages/index.js +1 -1
- package/dist/components/_portal/index.cjs +1 -1
- package/dist/components/_portal/index.js +4 -4
- package/dist/components/_sortable/index.cjs +1 -1
- package/dist/components/_sortable/index.js +1 -1
- package/dist/components/_toasts/index.cjs +1 -1
- package/dist/components/_toasts/index.js +9 -9
- package/dist/components/_widget/index.cjs +1 -1
- package/dist/components/_widget/index.js +1 -1
- package/dist/components/accordion/index.cjs +1 -1
- package/dist/components/accordion/index.js +1 -1
- package/dist/components/aside/index.cjs +1 -1
- package/dist/components/aside/index.js +3 -3
- package/dist/components/button/index.cjs +1 -1
- package/dist/components/button/index.js +15 -15
- package/dist/components/checkbox/index.cjs +1 -1
- package/dist/components/checkbox/index.js +6 -6
- package/dist/components/controls/index.cjs +1 -1
- package/dist/components/controls/index.cjs.map +1 -1
- package/dist/components/controls/index.js +8 -8
- package/dist/components/controls/index.js.map +1 -1
- package/dist/components/dialog/index.cjs +1 -1
- package/dist/components/dialog/index.js +7 -7
- package/dist/components/form/index.cjs +1 -1
- package/dist/components/form/index.js +4 -4
- package/dist/components/header/index.cjs +1 -1
- package/dist/components/header/index.js +3 -3
- package/dist/components/input/index.cjs +1 -1
- package/dist/components/input/index.js +1 -1
- package/dist/components/layout/index.cjs +1 -1
- package/dist/components/layout/index.js +10 -10
- package/dist/components/list/index.cjs +1 -1
- package/dist/components/list/index.js +8 -8
- package/dist/components/nav/index.cjs +1 -1
- package/dist/components/nav/index.cjs.map +1 -1
- package/dist/components/nav/index.js +35 -20
- package/dist/components/nav/index.js.map +1 -1
- package/dist/components/textarea/index.cjs +1 -1
- package/dist/components/textarea/index.js +14 -14
- package/dist/components/toast/index.cjs +1 -1
- package/dist/components/toast/index.js +20 -20
- package/dist/components/toggle/index.cjs +1 -1
- package/dist/components/toggle/index.cjs.map +1 -1
- package/dist/components/toggle/index.js +9 -9
- package/dist/components/toggle/index.js.map +1 -1
- package/dist/components/toolbar/index.cjs +2 -0
- package/dist/components/toolbar/index.cjs.map +1 -0
- package/dist/components/toolbar/index.js +14 -0
- package/dist/components/toolbar/index.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +13 -1
- package/dist/index.js +16 -14
- package/dist/index.js.map +1 -1
- package/dist/styles.module-BuPl_9yN.cjs +2 -0
- package/dist/styles.module-BuPl_9yN.cjs.map +1 -0
- package/dist/styles.module-ZrsD4xw8.js +10 -0
- package/dist/styles.module-ZrsD4xw8.js.map +1 -0
- package/package.json +1 -1
- package/dist/styles.module--qoz6wR5.cjs +0 -2
- package/dist/styles.module--qoz6wR5.cjs.map +0 -1
- package/dist/styles.module-y5zmJBcz.js +0 -10
- package/dist/styles.module-y5zmJBcz.js.map +0 -1
|
@@ -1,23 +1,38 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { t as
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import { t as _ } from "../../classix-DG18itHa.js";
|
|
3
|
+
import { useRef as l } from "react";
|
|
4
|
+
import { i as b } from "../../icons-DeUtqBx_.js";
|
|
5
|
+
import '../../assets/index40.css';const h = "_nav_6dj6b_1", v = "_horizontal_6dj6b_7", w = "_tabs_6dj6b_17", j = "_pills_6dj6b_38", n = {
|
|
6
|
+
nav: h,
|
|
7
|
+
horizontal: v,
|
|
8
|
+
tabs: w,
|
|
9
|
+
pills: j
|
|
10
|
+
}, g = {
|
|
11
|
+
default: n.default,
|
|
12
|
+
pills: n.pills,
|
|
13
|
+
tabs: n.tabs
|
|
14
|
+
}, R = ({
|
|
15
|
+
animation: c,
|
|
16
|
+
children: u,
|
|
17
|
+
className: f,
|
|
18
|
+
horizontal: s = !1,
|
|
19
|
+
variant: r = "default",
|
|
20
|
+
...p
|
|
21
|
+
}) => {
|
|
22
|
+
const a = l(null), e = l(!1), d = {
|
|
23
|
+
"--icon-svg": b("chevron")
|
|
24
|
+
};
|
|
25
|
+
return /* @__PURE__ */ m("nav", { className: _(f, s && n.horizontal, n.nav, g[r]), "data-animation": c, "data-orientation": s ? "horizontal" : "vertical", onPointerDown: () => {
|
|
26
|
+
var o;
|
|
27
|
+
r !== "pills" || window.innerWidth > 960 || (e.current = !!((o = a.current) != null && o.matches(":focus-within")));
|
|
28
|
+
}, onClick: (o) => {
|
|
29
|
+
var i;
|
|
30
|
+
if (r !== "pills" || window.innerWidth > 960) return;
|
|
31
|
+
const t = (i = o.target) == null ? void 0 : i.closest("a");
|
|
32
|
+
(t == null ? void 0 : t.getAttribute("aria-current")) === "page" && !e.current || t == null || t.blur();
|
|
33
|
+
}, ref: a, style: d, ...p, "data-component": "nav", children: u });
|
|
34
|
+
};
|
|
20
35
|
export {
|
|
21
|
-
|
|
36
|
+
R as Nav
|
|
22
37
|
};
|
|
23
38
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/nav/index.tsx"],"sourcesContent":["import cx from 'classix';\n\nimport styles from './styles.module.css';\n\nconst variants = {\n default: styles.default,\n pills: styles.pills,\n tabs: styles.tabs,\n};\n\nexport type NavProps = React.HTMLAttributes<HTMLElement> & {\n animation?: string;\n children?: React.ReactNode;\n className?: string;\n horizontal?: boolean;\n variant?: keyof typeof variants;\n};\n\nexport const Nav = ({\n animation,\n children,\n className,\n horizontal = false,\n variant = 'default',\n ...props\n}: NavProps) => {\n return (\n <nav\n className={cx(className, horizontal && styles.horizontal, styles.nav, variants[variant])}\n data-animation={animation}\n data-orientation={horizontal ? 'horizontal' : 'vertical'}\n {...props}\n >\n {children}\n </nav>\n );\n};\n"],"names":["variants","default","styles","pills","tabs","Nav","animation","children","className","horizontal","variant","props","jsx","cx","nav"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/nav/index.tsx"],"sourcesContent":["import cx from 'classix';\nimport { useRef } from 'react';\n\nimport { iconSVG } from '@/components/icon/icons.ts';\n\nimport styles from './styles.module.css';\n\nconst variants = {\n default: styles.default,\n pills: styles.pills,\n tabs: styles.tabs,\n};\n\nexport type NavProps = React.HTMLAttributes<HTMLElement> & {\n animation?: string;\n children?: React.ReactNode;\n className?: string;\n horizontal?: boolean;\n variant?: keyof typeof variants;\n};\n\nexport const Nav = ({\n animation,\n children,\n className,\n horizontal = false,\n variant = 'default',\n ...props\n}: NavProps) => {\n const ref = useRef<HTMLElement>(null);\n const wasOpenRef = useRef(false);\n type withVars = React.CSSProperties & {\n '--icon-svg'?: string;\n };\n\n const withVars: withVars = {\n '--icon-svg': iconSVG('chevron'),\n };\n\n return (\n <nav\n className={cx(className, horizontal && styles.horizontal, styles.nav, variants[variant])}\n data-animation={animation}\n data-orientation={horizontal ? 'horizontal' : 'vertical'}\n onPointerDown={() => {\n if (variant !== 'pills' || window.innerWidth > 960) return;\n wasOpenRef.current = !!ref.current?.matches(':focus-within');\n }}\n onClick={(e) => {\n if (variant !== 'pills' || window.innerWidth > 960) return;\n\n const link = (e.target as HTMLElement | null)?.closest('a');\n\n const isCurrent = link?.getAttribute('aria-current') === 'page';\n if (isCurrent && !wasOpenRef.current) {\n return;\n }\n\n link?.blur();\n }}\n ref={ref}\n style={withVars}\n {...props}\n >\n {children}\n </nav>\n );\n};\n"],"names":["variants","default","styles","pills","tabs","Nav","animation","children","className","horizontal","variant","props","ref","useRef","wasOpenRef","withVars","iconSVG","jsx","cx","nav","window","innerWidth","current","matches","e","link","target","closest","getAttribute","blur"],"mappings":";;;;;;;;;GAOMA,IAAW;AAAA,EACfC,SAASC,EAAOD;AAAAA,EAChBE,OAAOD,EAAOC;AAAAA,EACdC,MAAMF,EAAOE;AACf,GAUaC,IAAMA,CAAC;AAAA,EAClBC,WAAAA;AAAAA,EACAC,UAAAA;AAAAA,EACAC,WAAAA;AAAAA,EACAC,YAAAA,IAAa;AAAA,EACbC,SAAAA,IAAU;AAAA,EACV,GAAGC;AACK,MAAM;AACd,QAAMC,IAAMC,EAAoB,IAAI,GAC9BC,IAAaD,EAAO,EAAK,GAKzBE,IAAqB;AAAA,IACzB,cAAcC,EAAQ,SAAS;AAAA,EAAA;AAGjC,SACE,gBAAAC,EAAC,SACC,WAAWC,EAAGV,GAAWC,KAAcP,EAAOO,YAAYP,EAAOiB,KAAKnB,EAASU,CAAO,CAAC,GACvF,kBAAgBJ,GAChB,oBAAkBG,IAAa,eAAe,YAC9C,eAAe,MAAM;;AACnB,IAAIC,MAAY,WAAWU,OAAOC,aAAa,QAC/CP,EAAWQ,UAAU,CAAC,GAACV,IAAAA,EAAIU,YAAJV,QAAAA,EAAaW,QAAQ;AAAA,EAC9C,GACA,SAAUC,CAAAA,MAAM;;AACd,QAAId,MAAY,WAAWU,OAAOC,aAAa,IAAK;AAEpD,UAAMI,KAAQD,IAAAA,EAAEE,WAAFF,gBAAAA,EAAiCG,QAAQ;AAGvD,KADkBF,KAAAA,gBAAAA,EAAMG,aAAa,qBAAoB,UACxC,CAACd,EAAWQ,WAI7BG,KAAAA,QAAAA,EAAMI;AAAAA,EACR,GACA,KAAAjB,GACA,OAAOG,GACP,GAAIJ,GAAM,kBAAA,OAETJ,UAAAA,GACH;AAEJ;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index41.css');const e=require("react/jsx-runtime"),r=require("../../classix-5H4IWnMA.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index41.css');const e=require("react/jsx-runtime"),r=require("../../classix-5H4IWnMA.cjs"),y=require("../../utils-D_TJ8wDc.cjs"),l=require("../../styles.module-BuPl_9yN.cjs"),d="_label_b5yys_1",b="_textarea_b5yys_5",n={label:d,textarea:b},m=({label:t,maxRows:o=12,minRows:c=3,required:s,value:a,...u})=>{const{touched:i,onBlur:x}=y.useTouched(a==="");return e.jsxs("label",{"data-component":"textarea",children:[t&&e.jsx("span",{className:r.t(n.label,s&&l.inputStyles.required),children:t}),e.jsx("textarea",{className:r.t(l.inputStyles.input,n.textarea,i&&"touched"),onBlur:x,...u,required:s,style:{"--min-rows":c,"--max-rows":o},value:a})]})};exports.Textarea=m;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { jsxs as p, jsx as
|
|
2
|
-
import { t as
|
|
1
|
+
import { jsxs as p, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { t as r } from "../../classix-DG18itHa.js";
|
|
3
3
|
import { u } from "../../utils-DXIJVVzz.js";
|
|
4
|
-
import { i as
|
|
5
|
-
import '../../assets/index41.css';const
|
|
6
|
-
label:
|
|
7
|
-
textarea:
|
|
8
|
-
},
|
|
4
|
+
import { i as o } from "../../styles.module-ZrsD4xw8.js";
|
|
5
|
+
import '../../assets/index41.css';const y = "_label_b5yys_1", b = "_textarea_b5yys_5", l = {
|
|
6
|
+
label: y,
|
|
7
|
+
textarea: b
|
|
8
|
+
}, j = ({
|
|
9
9
|
label: t,
|
|
10
|
-
maxRows:
|
|
11
|
-
minRows:
|
|
10
|
+
maxRows: n = 12,
|
|
11
|
+
minRows: c = 3,
|
|
12
12
|
required: e,
|
|
13
13
|
value: a,
|
|
14
14
|
...m
|
|
@@ -18,14 +18,14 @@ import '../../assets/index41.css';const d = "_label_ec2gr_1", _ = "_textarea_ec2
|
|
|
18
18
|
onBlur: i
|
|
19
19
|
} = u(a === "");
|
|
20
20
|
return /* @__PURE__ */ p("label", { "data-component": "textarea", children: [
|
|
21
|
-
t && /* @__PURE__ */
|
|
22
|
-
/* @__PURE__ */
|
|
23
|
-
"--min-rows":
|
|
24
|
-
"--max-rows":
|
|
21
|
+
t && /* @__PURE__ */ s("span", { className: r(l.label, e && o.required), children: t }),
|
|
22
|
+
/* @__PURE__ */ s("textarea", { className: r(o.input, l.textarea, x && "touched"), onBlur: i, ...m, required: e, style: {
|
|
23
|
+
"--min-rows": c,
|
|
24
|
+
"--max-rows": n
|
|
25
25
|
}, value: a })
|
|
26
26
|
] });
|
|
27
27
|
};
|
|
28
28
|
export {
|
|
29
|
-
|
|
29
|
+
j as Textarea
|
|
30
30
|
};
|
|
31
31
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index42.css');const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index42.css');const o=require("react/jsx-runtime"),v=require("../../classix-5H4IWnMA.cjs"),n=require("react"),f=require("../icon/index.cjs"),l="_toast_tav58_1",d="_active_tav58_18",m="_error_tav58_24",q="_info_tav58_28",T="_success_tav58_33",a={toast:l,active:d,error:m,info:q,success:T},g=({label:i,type:s="success",onClick:u,onExitComplete:e,open:r=!0})=>{const[_,c]=n.useState(!1);return n.useEffect(()=>{if(!r)return c(!1);const t=requestAnimationFrame(()=>c(!0));return()=>cancelAnimationFrame(t)},[r]),o.jsxs("div",{"aria-live":s==="error"?"assertive":"polite",className:v.t(a.toast,a[s],_&&a.active),onClick:u,onTransitionEnd:t=>{r||t.propertyName!=="opacity"||t.currentTarget!==t.target||e==null||e()},"data-component":"toast",children:[o.jsx(f.Icon,{name:s}),i]})};exports.Toast=g;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
import { jsxs as _, jsx as u } from "react/jsx-runtime";
|
|
2
2
|
import { t as f } from "../../classix-DG18itHa.js";
|
|
3
|
-
import { useState as m, useEffect as
|
|
4
|
-
import { Icon as
|
|
5
|
-
import '../../assets/index42.css';const
|
|
6
|
-
toast:
|
|
7
|
-
active:
|
|
8
|
-
error:
|
|
9
|
-
info:
|
|
10
|
-
success:
|
|
11
|
-
},
|
|
3
|
+
import { useState as m, useEffect as v } from "react";
|
|
4
|
+
import { Icon as d } from "../icon/index.js";
|
|
5
|
+
import '../../assets/index42.css';const l = "_toast_tav58_1", h = "_active_tav58_18", T = "_error_tav58_24", g = "_info_tav58_28", j = "_success_tav58_33", o = {
|
|
6
|
+
toast: l,
|
|
7
|
+
active: h,
|
|
8
|
+
error: T,
|
|
9
|
+
info: g,
|
|
10
|
+
success: j
|
|
11
|
+
}, N = ({
|
|
12
12
|
label: c,
|
|
13
|
-
type:
|
|
13
|
+
type: r = "success",
|
|
14
14
|
onClick: n,
|
|
15
|
-
onExitComplete:
|
|
16
|
-
open:
|
|
15
|
+
onExitComplete: s,
|
|
16
|
+
open: a = !0
|
|
17
17
|
}) => {
|
|
18
18
|
const [i, e] = m(!1);
|
|
19
|
-
return
|
|
20
|
-
if (!
|
|
21
|
-
const
|
|
22
|
-
return () => cancelAnimationFrame(
|
|
23
|
-
}, [
|
|
24
|
-
|
|
19
|
+
return v(() => {
|
|
20
|
+
if (!a) return e(!1);
|
|
21
|
+
const t = requestAnimationFrame(() => e(!0));
|
|
22
|
+
return () => cancelAnimationFrame(t);
|
|
23
|
+
}, [a]), /* @__PURE__ */ _("div", { "aria-live": r === "error" ? "assertive" : "polite", className: f(o.toast, o[r], i && o.active), onClick: n, onTransitionEnd: (t) => {
|
|
24
|
+
a || t.propertyName !== "opacity" || t.currentTarget !== t.target || s == null || s();
|
|
25
25
|
}, "data-component": "toast", children: [
|
|
26
|
-
/* @__PURE__ */ u(
|
|
26
|
+
/* @__PURE__ */ u(d, { name: r }),
|
|
27
27
|
c
|
|
28
28
|
] });
|
|
29
29
|
};
|
|
30
30
|
export {
|
|
31
|
-
|
|
31
|
+
N as Toast
|
|
32
32
|
};
|
|
33
33
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index2.css');const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index2.css');const e=require("react/jsx-runtime"),g=require("../loading/index.cjs"),r="_toggle_1rg2x_1",l="_thumb_1rg2x_15",i="_track_1rg2x_25",t={toggle:r,thumb:l,track:i},u=({checked:o,disabled:c,isLoading:s,label:n,onChange:a})=>e.jsxs("label",{className:t.toggle,"data-component":"toggle",children:[e.jsx("input",{checked:o,disabled:c||s,onChange:a,type:"checkbox"}),e.jsx("span",{"aria-hidden":"true",className:t.track,children:s?e.jsx(g.Loading,{size:24}):e.jsx("span",{className:t.thumb})}),n&&e.jsx("span",{className:"toggle",children:n})]});exports.Toggle=u;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/components/toggle/index.tsx"],"sourcesContent":["import { Loading } from '../loading';\nimport styles from './styles.module.css';\n\nexport type ToggleProps = {\n checked?: boolean;\n disabled?: boolean;\n isLoading?: boolean;\n label?: string;\n onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;\n};\n\nexport const Toggle = ({ checked, disabled, isLoading, label, onChange }: ToggleProps) => {\n return (\n <label className={styles.toggle}>\n <input\n checked={checked}\n disabled={disabled || isLoading}\n onChange={onChange}\n type='checkbox'\n />\n <span\n aria-hidden='true'\n className={styles.track}\n >\n {isLoading ? <Loading size={24} /> : <span className={styles.thumb} />}\n </span>\n <span className='toggle'>{label}</span
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/components/toggle/index.tsx"],"sourcesContent":["import { Loading } from '../loading';\nimport styles from './styles.module.css';\n\nexport type ToggleProps = {\n checked?: boolean;\n disabled?: boolean;\n isLoading?: boolean;\n label?: string;\n onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;\n};\n\nexport const Toggle = ({ checked, disabled, isLoading, label, onChange }: ToggleProps) => {\n return (\n <label className={styles.toggle}>\n <input\n checked={checked}\n disabled={disabled || isLoading}\n onChange={onChange}\n type='checkbox'\n />\n <span\n aria-hidden='true'\n className={styles.track}\n >\n {isLoading ? <Loading size={24} /> : <span className={styles.thumb} />}\n </span>\n {label && <span className='toggle'>{label}</span>}\n </label>\n );\n};\n"],"names":["Toggle","checked","disabled","isLoading","label","onChange","styles","toggle","jsx","track","Loading","thumb"],"mappings":"gPAWaA,EAASA,CAAC,CAAEC,QAAAA,EAASC,SAAAA,EAAUC,UAAAA,EAAWC,MAAAA,EAAOC,SAAAA,CAAsB,WAE/E,QAAA,CAAM,UAAWC,EAAOC,OAAO,iBAAA,SAC9B,SAAA,CAAAC,MAAC,SACC,QAAAP,EACA,SAAUC,GAAYC,EACtB,SAAAE,EACA,KAAK,WAAU,QAEhB,OAAA,CACC,cAAY,OACZ,UAAWC,EAAOG,MAEjBN,SAAAA,EAAYK,EAAAA,IAACE,UAAA,CAAQ,KAAM,KAASF,MAAC,QAAK,UAAWF,EAAOK,MAAM,EACrE,EACCP,GAASI,EAAAA,IAAC,OAAA,CAAK,UAAU,SAAUJ,SAAAA,CAAAA,CAAM,CAAA,EAC5C"}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { Loading as
|
|
1
|
+
import { jsxs as g, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { Loading as l } from "../loading/index.js";
|
|
3
3
|
import '../../assets/index2.css';const n = "_toggle_1rg2x_1", m = "_thumb_1rg2x_15", h = "_track_1rg2x_25", e = {
|
|
4
4
|
toggle: n,
|
|
5
5
|
thumb: m,
|
|
6
6
|
track: h
|
|
7
7
|
}, _ = ({
|
|
8
|
-
checked:
|
|
9
|
-
disabled:
|
|
8
|
+
checked: o,
|
|
9
|
+
disabled: c,
|
|
10
10
|
isLoading: s,
|
|
11
|
-
label:
|
|
11
|
+
label: a,
|
|
12
12
|
onChange: r
|
|
13
|
-
}) => /* @__PURE__ */
|
|
14
|
-
/* @__PURE__ */ t("input", { checked:
|
|
15
|
-
/* @__PURE__ */ t("span", { "aria-hidden": "true", className: e.track, children: s ? /* @__PURE__ */ t(
|
|
16
|
-
/* @__PURE__ */ t("span", { className: "toggle", children:
|
|
13
|
+
}) => /* @__PURE__ */ g("label", { className: e.toggle, "data-component": "toggle", children: [
|
|
14
|
+
/* @__PURE__ */ t("input", { checked: o, disabled: c || s, onChange: r, type: "checkbox" }),
|
|
15
|
+
/* @__PURE__ */ t("span", { "aria-hidden": "true", className: e.track, children: s ? /* @__PURE__ */ t(l, { size: 24 }) : /* @__PURE__ */ t("span", { className: e.thumb }) }),
|
|
16
|
+
a && /* @__PURE__ */ t("span", { className: "toggle", children: a })
|
|
17
17
|
] });
|
|
18
18
|
export {
|
|
19
19
|
_ as Toggle
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/toggle/index.tsx"],"sourcesContent":["import { Loading } from '../loading';\nimport styles from './styles.module.css';\n\nexport type ToggleProps = {\n checked?: boolean;\n disabled?: boolean;\n isLoading?: boolean;\n label?: string;\n onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;\n};\n\nexport const Toggle = ({ checked, disabled, isLoading, label, onChange }: ToggleProps) => {\n return (\n <label className={styles.toggle}>\n <input\n checked={checked}\n disabled={disabled || isLoading}\n onChange={onChange}\n type='checkbox'\n />\n <span\n aria-hidden='true'\n className={styles.track}\n >\n {isLoading ? <Loading size={24} /> : <span className={styles.thumb} />}\n </span>\n <span className='toggle'>{label}</span
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/toggle/index.tsx"],"sourcesContent":["import { Loading } from '../loading';\nimport styles from './styles.module.css';\n\nexport type ToggleProps = {\n checked?: boolean;\n disabled?: boolean;\n isLoading?: boolean;\n label?: string;\n onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;\n};\n\nexport const Toggle = ({ checked, disabled, isLoading, label, onChange }: ToggleProps) => {\n return (\n <label className={styles.toggle}>\n <input\n checked={checked}\n disabled={disabled || isLoading}\n onChange={onChange}\n type='checkbox'\n />\n <span\n aria-hidden='true'\n className={styles.track}\n >\n {isLoading ? <Loading size={24} /> : <span className={styles.thumb} />}\n </span>\n {label && <span className='toggle'>{label}</span>}\n </label>\n );\n};\n"],"names":["Toggle","checked","disabled","isLoading","label","onChange","styles","toggle","jsx","track","Loading","thumb"],"mappings":";;;;;;GAWaA,IAASA,CAAC;AAAA,EAAEC,SAAAA;AAAAA,EAASC,UAAAA;AAAAA,EAAUC,WAAAA;AAAAA,EAAWC,OAAAA;AAAAA,EAAOC,UAAAA;AAAsB,wBAE/E,SAAA,EAAM,WAAWC,EAAOC,QAAO,kBAAA,UAC9B,UAAA;AAAA,EAAA,gBAAAC,EAAC,WACC,SAAAP,GACA,UAAUC,KAAYC,GACtB,UAAAE,GACA,MAAK,YAAU;AAAA,oBAEhB,QAAA,EACC,eAAY,QACZ,WAAWC,EAAOG,OAEjBN,UAAAA,IAAY,gBAAAK,EAACE,GAAA,EAAQ,MAAM,QAAS,gBAAAF,EAAC,UAAK,WAAWF,EAAOK,OAAM,GACrE;AAAA,EACCP,KAAS,gBAAAI,EAAC,QAAA,EAAK,WAAU,UAAUJ,UAAAA,EAAAA,CAAM;AAAA,GAC5C;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index43.css');const a=require("react/jsx-runtime"),l=require("../../classix-5H4IWnMA.cjs"),s="_toolbar_104fz_1",n="_editor_104fz_33",o={toolbar:s,default:"_default_104fz_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
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/components/toolbar/index.tsx"],"sourcesContent":["import cx from 'classix';\nimport type { ReactNode } from 'react';\n\nimport styles from './styles.module.css';\n\nexport type ToolbarProps = {\n children?: ReactNode;\n variant?: 'default' | 'editor';\n};\n\nexport const Toolbar = ({ children, variant = 'default' }: ToolbarProps) => {\n return (\n <div\n className={cx(styles.toolbar, styles[variant])}\n onClick={(e) => e.stopPropagation()}\n >\n {children}\n </div>\n );\n};\n"],"names":["Toolbar","children","variant","cx","styles","toolbar","e","stopPropagation"],"mappings":"0PAUaA,EAAUA,CAAC,CAAEC,SAAAA,EAAUC,QAAAA,EAAU,SAAwB,UAEjE,MAAA,CACC,UAAWC,EAAAA,EAAGC,EAAOC,QAASD,EAAOF,CAAO,CAAC,EAC7C,QAAUI,GAAMA,EAAEC,kBAAkB,iBAAA,UAEnCN,SAAAA,EACH"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { t as e } from "../../classix-DG18itHa.js";
|
|
3
|
+
import '../../assets/index43.css';const s = "_toolbar_104fz_1", n = "_editor_104fz_33", o = {
|
|
4
|
+
toolbar: s,
|
|
5
|
+
default: "_default_104fz_26",
|
|
6
|
+
editor: n
|
|
7
|
+
}, f = ({
|
|
8
|
+
children: t,
|
|
9
|
+
variant: r = "default"
|
|
10
|
+
}) => /* @__PURE__ */ l("div", { className: e(o.toolbar, o[r]), onClick: (a) => a.stopPropagation(), "data-component": "toolbar", children: t });
|
|
11
|
+
export {
|
|
12
|
+
f as Toolbar
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/toolbar/index.tsx"],"sourcesContent":["import cx from 'classix';\nimport type { ReactNode } from 'react';\n\nimport styles from './styles.module.css';\n\nexport type ToolbarProps = {\n children?: ReactNode;\n variant?: 'default' | 'editor';\n};\n\nexport const Toolbar = ({ children, variant = 'default' }: ToolbarProps) => {\n return (\n <div\n className={cx(styles.toolbar, styles[variant])}\n onClick={(e) => e.stopPropagation()}\n >\n {children}\n </div>\n );\n};\n"],"names":["Toolbar","children","variant","cx","styles","toolbar","e","stopPropagation"],"mappings":";;;;;;GAUaA,IAAUA,CAAC;AAAA,EAAEC,UAAAA;AAAAA,EAAUC,SAAAA,IAAU;AAAwB,wBAEjE,OAAA,EACC,WAAWC,EAAGC,EAAOC,SAASD,EAAOF,CAAO,CAAC,GAC7C,SAAUI,CAAAA,MAAMA,EAAEC,mBAAkB,kBAAA,WAEnCN,UAAAA,GACH;"}
|
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./assets/index.css');const e=require("./components/_avatar/index.cjs"),n=require("./components/_card/index.cjs"),o=require("./components/_collapsible/index.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./assets/index.css');const e=require("./components/_avatar/index.cjs"),n=require("./components/_card/index.cjs"),o=require("./components/_collapsible/index.cjs"),r=require("./components/_croppable/index.cjs"),t=require("./components/_dropzone/index.cjs"),i=require("./components/_editor/index.cjs"),s=require("./components/_messages/index.cjs"),c=require("./components/_portal/index.cjs"),_=require("./components/_sortable/index.cjs"),a=require("./components/_toasts/index.cjs"),d=require("./components/_widget/index.cjs"),p=require("./components/accordion/index.cjs"),u=require("./components/app-link/index.cjs"),m=require("./components/aside/index.cjs"),x=require("./components/badge/index.cjs"),l=require("./components/banner/index.cjs"),q=require("./components/branding/index.cjs"),g=require("./components/button/index.cjs"),b=require("./components/checkbox/index.cjs"),T=require("./components/controls/index.cjs"),L=require("./components/dialog/index.cjs"),C=require("./components/figure/index.cjs"),k=require("./components/file/index.cjs"),A=require("./components/footer/index.cjs"),B=require("./components/form/index.cjs"),F=require("./components/graph/index.cjs"),h=require("./components/group/index.cjs"),v=require("./components/header/index.cjs"),I=require("./components/icon/index.cjs"),S=require("./components/image/index.cjs"),f=require("./components/input/index.cjs"),y=require("./components/layout/index.cjs"),M=require("./components/link/index.cjs"),D=require("./components/list/index.cjs"),G=require("./components/loading/index.cjs"),z=require("./components/message/index.cjs"),P=require("./components/nav/index.cjs"),E=require("./components/select/index.cjs"),H=require("./components/table/index.cjs"),N=require("./components/textarea/index.cjs"),W=require("./components/toast/index.cjs"),j=require("./components/toggle/index.cjs"),w=require("./components/toolbar/index.cjs");exports.Avatar=e.Avatar;exports.Card=n.Card;exports.Collapsible=o.Collapsible;exports.Croppable=r.Croppable;exports.Dropzone=t.Dropzone;exports.Editor=i.Editor;exports.Messages=s.Messages;exports.Portal=c.Portal;exports.Sortable=_.Sortable;exports.Toasts=a.Toasts;exports.Widget=d.Widget;exports.Accordion=p.Accordion;exports.AppLink=u.AppLink;exports.Aside=m.Aside;exports.Badge=x.Badge;exports.Banner=l.Banner;exports.Branding=q.Branding;exports.Button=g.Button;exports.Checkbox=b.Checkbox;exports.Controls=T.Controls;exports.Dialog=L.Dialog;exports.Figure=C.Figure;exports.File=k.File;exports.Footer=A.Footer;exports.Form=B.Form;exports.Graph=F.Graph;exports.Group=h.Group;exports.Header=v.Header;exports.Icon=I.Icon;exports.Image=S.Image;exports.Input=f.Input;exports.Layout=y.Layout;exports.Link=M.Link;exports.List=D.List;exports.Loading=G.Loading;exports.Message=z.Message;exports.Nav=P.Nav;exports.Select=E.Select;exports.Table=H.Table;exports.Textarea=N.Textarea;exports.Toast=W.Toast;exports.Toggle=j.Toggle;exports.Toolbar=w.Toolbar;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { ForwardRefExoticComponent } from 'react';
|
|
|
5
5
|
import { ImgHTMLAttributes } from 'react';
|
|
6
6
|
import { InputHTMLAttributes } from 'react';
|
|
7
7
|
import { JSX } from 'react/jsx-runtime';
|
|
8
|
+
import { ReactNode } from 'react';
|
|
8
9
|
import { RefAttributes } from 'react';
|
|
9
10
|
|
|
10
11
|
export declare const Accordion: ({ children, icon, label, open }: AccordionProps) => JSX.Element;
|
|
@@ -113,15 +114,19 @@ export declare const Controls: ({ children, ...props }: ControlsProps) => JSX.El
|
|
|
113
114
|
|
|
114
115
|
declare type ControlsProps = React.ComponentPropsWithoutRef<'menu'> & {};
|
|
115
116
|
|
|
116
|
-
export declare const Croppable: ({ children, fill, height, onCroppableChange, onFileChange, onTransformChange, transform, }: CroppableProps) => JSX.Element;
|
|
117
|
+
export declare const Croppable: ({ children, fill, height, image, label, onCroppableChange, onFileChange, onImageChange, onTransformChange, transform, standalone, }: CroppableProps) => JSX.Element;
|
|
117
118
|
|
|
118
119
|
declare type CroppableProps = {
|
|
119
120
|
children?: default_2.ReactNode;
|
|
120
121
|
fill?: 'width' | 'height' | 'none';
|
|
121
122
|
height?: number;
|
|
123
|
+
image?: string | null;
|
|
124
|
+
label?: string;
|
|
122
125
|
onCroppableChange?: (rect: DOMRect) => void;
|
|
123
126
|
onFileChange?: (file: File | null) => void;
|
|
127
|
+
onImageChange?: (file: File | null) => void;
|
|
124
128
|
onTransformChange?: (transform: CroppableTransform) => void;
|
|
129
|
+
standalone?: boolean;
|
|
125
130
|
transform?: CroppableTransform;
|
|
126
131
|
};
|
|
127
132
|
|
|
@@ -454,6 +459,13 @@ declare type ToggleProps = {
|
|
|
454
459
|
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
455
460
|
};
|
|
456
461
|
|
|
462
|
+
export declare const Toolbar: ({ children, variant }: ToolbarProps) => JSX.Element;
|
|
463
|
+
|
|
464
|
+
declare type ToolbarProps = {
|
|
465
|
+
children?: ReactNode;
|
|
466
|
+
variant?: 'default' | 'editor';
|
|
467
|
+
};
|
|
468
|
+
|
|
457
469
|
declare const variants: {
|
|
458
470
|
default: string;
|
|
459
471
|
meta: string;
|
package/dist/index.js
CHANGED
|
@@ -2,12 +2,12 @@ import { Avatar as e } from "./components/_avatar/index.js";
|
|
|
2
2
|
import { Card as p } from "./components/_card/index.js";
|
|
3
3
|
import { Collapsible as x } from "./components/_collapsible/index.js";
|
|
4
4
|
import { Croppable as a } from "./components/_croppable/index.js";
|
|
5
|
-
import { Dropzone as
|
|
5
|
+
import { Dropzone as l } from "./components/_dropzone/index.js";
|
|
6
6
|
import { Editor as s } from "./components/_editor/index.js";
|
|
7
7
|
import { Messages as d } from "./components/_messages/index.js";
|
|
8
|
-
import { Portal as
|
|
9
|
-
import { Sortable as
|
|
10
|
-
import { Toasts as
|
|
8
|
+
import { Portal as T } from "./components/_portal/index.js";
|
|
9
|
+
import { Sortable as u } from "./components/_sortable/index.js";
|
|
10
|
+
import { Toasts as L } from "./components/_toasts/index.js";
|
|
11
11
|
import { Widget as B } from "./components/_widget/index.js";
|
|
12
12
|
import { Accordion as k } from "./components/accordion/index.js";
|
|
13
13
|
import { AppLink as h } from "./components/app-link/index.js";
|
|
@@ -29,17 +29,18 @@ import { Header as eo } from "./components/header/index.js";
|
|
|
29
29
|
import { Icon as po } from "./components/icon/index.js";
|
|
30
30
|
import { Image as xo } from "./components/image/index.js";
|
|
31
31
|
import { Input as ao } from "./components/input/index.js";
|
|
32
|
-
import { Layout as
|
|
32
|
+
import { Layout as lo } from "./components/layout/index.js";
|
|
33
33
|
import { Link as so } from "./components/link/index.js";
|
|
34
34
|
import { List as bo } from "./components/list/index.js";
|
|
35
|
-
import { Loading as
|
|
36
|
-
import { Message as
|
|
35
|
+
import { Loading as co } from "./components/loading/index.js";
|
|
36
|
+
import { Message as Co } from "./components/message/index.js";
|
|
37
37
|
import { Nav as Ao } from "./components/nav/index.js";
|
|
38
38
|
import { Select as Fo } from "./components/select/index.js";
|
|
39
39
|
import { Table as Io } from "./components/table/index.js";
|
|
40
40
|
import { Textarea as vo } from "./components/textarea/index.js";
|
|
41
41
|
import { Toast as Go } from "./components/toast/index.js";
|
|
42
42
|
import { Toggle as So } from "./components/toggle/index.js";
|
|
43
|
+
import { Toolbar as zo } from "./components/toolbar/index.js";
|
|
43
44
|
import './assets/index.css';export {
|
|
44
45
|
k as Accordion,
|
|
45
46
|
h as AppLink,
|
|
@@ -55,7 +56,7 @@ import './assets/index.css';export {
|
|
|
55
56
|
q as Controls,
|
|
56
57
|
a as Croppable,
|
|
57
58
|
J as Dialog,
|
|
58
|
-
|
|
59
|
+
l as Dropzone,
|
|
59
60
|
s as Editor,
|
|
60
61
|
O as Figure,
|
|
61
62
|
R as File,
|
|
@@ -67,21 +68,22 @@ import './assets/index.css';export {
|
|
|
67
68
|
po as Icon,
|
|
68
69
|
xo as Image,
|
|
69
70
|
ao as Input,
|
|
70
|
-
|
|
71
|
+
lo as Layout,
|
|
71
72
|
so as Link,
|
|
72
73
|
bo as List,
|
|
73
|
-
|
|
74
|
-
|
|
74
|
+
co as Loading,
|
|
75
|
+
Co as Message,
|
|
75
76
|
d as Messages,
|
|
76
77
|
Ao as Nav,
|
|
77
|
-
|
|
78
|
+
T as Portal,
|
|
78
79
|
Fo as Select,
|
|
79
|
-
|
|
80
|
+
u as Sortable,
|
|
80
81
|
Io as Table,
|
|
81
82
|
vo as Textarea,
|
|
82
83
|
Go as Toast,
|
|
83
|
-
|
|
84
|
+
L as Toasts,
|
|
84
85
|
So as Toggle,
|
|
86
|
+
zo as Toolbar,
|
|
85
87
|
B as Widget
|
|
86
88
|
};
|
|
87
89
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.module-BuPl_9yN.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import './assets/styles.css';const n = "_container_11w26_1", e = "_input_11w26_10", t = "_label_11w26_47", _ = "_required_11w26_51", i = {
|
|
2
|
+
container: n,
|
|
3
|
+
input: e,
|
|
4
|
+
label: t,
|
|
5
|
+
required: _
|
|
6
|
+
};
|
|
7
|
+
export {
|
|
8
|
+
i
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=styles.module-ZrsD4xw8.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.module-ZrsD4xw8.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styles.module--qoz6wR5.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import './assets/styles.css';const n = "_container_1qx20_1", e = "_input_1qx20_10", t = "_label_1qx20_45", _ = "_required_1qx20_49", i = {
|
|
2
|
-
container: n,
|
|
3
|
-
input: e,
|
|
4
|
-
label: t,
|
|
5
|
-
required: _
|
|
6
|
-
};
|
|
7
|
-
export {
|
|
8
|
-
i
|
|
9
|
-
};
|
|
10
|
-
//# sourceMappingURL=styles.module-y5zmJBcz.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styles.module-y5zmJBcz.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|