@solibo/solibo-ui 0.3.27 → 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/README.md +53 -8
- 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 +1783 -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 +5 -5
- 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 +11 -11
- 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/dist/utils-DXIJVVzz.js.map +1 -1
- package/dist/utils-D_TJ8wDc.cjs.map +1 -1
- package/package.json +2 -3
- 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,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/index25.css');const e=require("react/jsx-runtime"),m=require("../_dropzone/index.cjs"),u=require("../button/index.cjs"),d=require("../form/index.cjs"),_=require("../icon/index.cjs"),x=require("../list/index.cjs"),p=require("../textarea/index.cjs"),j=require("../message/index.cjs"),g="_messages_17m85_1",q="_controls_17m85_23",t={messages:g,controls:q},v=({handleUpload:o,message:s,messages:r,onChange:i,onSubmit:c,placeholder:a,sending:l})=>e.jsxs("div",{className:t.messages,"data-component":"messages",children:[e.jsx(x.List,{children:r.map(n=>e.jsx(j.Message,{...n},n.id))}),e.jsxs(d.Form,{onSubmit:n=>{n.preventDefault(),c()},children:[e.jsx(p.Textarea,{onChange:i,placeholder:a,value:s}),e.jsxs("div",{className:t.controls,children:[e.jsx(m.Dropzone,{label:"",multiple:!0,onChange:n=>{n.currentTarget.files&&o(n.currentTarget.files)},variant:"minimal"}),e.jsx(u.Button,{disabled:l||!(s!=null&&s.trim()),type:"submit",variant:"primary",children:e.jsx(_.Icon,{fill:!0,name:"plane",variant:"white"})})]})]})]});exports.Messages=v;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -6,7 +6,7 @@ import { Icon as u } from "../icon/index.js";
|
|
|
6
6
|
import { List as h } from "../list/index.js";
|
|
7
7
|
import { Textarea as v } from "../textarea/index.js";
|
|
8
8
|
import { Message as _ } from "../message/index.js";
|
|
9
|
-
import '../../assets/
|
|
9
|
+
import '../../assets/index25.css';const b = "_messages_17m85_1", g = "_controls_17m85_23", i = {
|
|
10
10
|
messages: b,
|
|
11
11
|
controls: g
|
|
12
12
|
}, z = ({
|
|
@@ -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/index26.css');const e=require("react/jsx-runtime"),s=require("../aside/index.cjs"),i=require("../branding/index.cjs"),a=require("../figure/index.cjs"),c=require("../icon/index.cjs"),l=require("../nav/index.cjs"),u="_menu_dr33h_29",m="_portal_dr33h_54",o={menu:u,portal:m},d=({children:n,portals:r,open:t=!0})=>e.jsxs("details",{className:o.menu,open:t||void 0,"data-component":"portal",children:[e.jsx("summary",{"aria-label":"Show menu",children:e.jsx(c.Icon,{name:"menu",size:"large",variant:"primary"})}),e.jsxs(s.Aside,{className:o.portal,children:[e.jsx(a.Figure,{children:e.jsx(i.Branding,{name:"logo",size:86,variant:"white"})}),r&&e.jsx(l.Nav,{horizontal:!0,children:r}),n&&n]})]});exports.Portal=d;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -4,10 +4,10 @@ import { Branding as i } from "../branding/index.js";
|
|
|
4
4
|
import { Figure as l } from "../figure/index.js";
|
|
5
5
|
import { Icon as s } from "../icon/index.js";
|
|
6
6
|
import { Nav as p } from "../nav/index.js";
|
|
7
|
-
import '../../assets/
|
|
8
|
-
menu:
|
|
9
|
-
portal:
|
|
10
|
-
},
|
|
7
|
+
import '../../assets/index26.css';const c = "_menu_dr33h_29", d = "_portal_dr33h_54", t = {
|
|
8
|
+
menu: c,
|
|
9
|
+
portal: d
|
|
10
|
+
}, x = ({
|
|
11
11
|
children: o,
|
|
12
12
|
portals: e,
|
|
13
13
|
open: m = !0
|
|
@@ -20,6 +20,6 @@ import '../../assets/index27.css';const u = "_menu_v7gyu_29", c = "_portal_v7gyu
|
|
|
20
20
|
] })
|
|
21
21
|
] });
|
|
22
22
|
export {
|
|
23
|
-
|
|
23
|
+
x as Portal
|
|
24
24
|
};
|
|
25
25
|
//# sourceMappingURL=index.js.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/index27.css');const p=require("react/jsx-runtime"),E=require("../../classix-5H4IWnMA.cjs"),e=require("react"),_=require("../list/index.cjs"),j="_sortable_178uo_1",b={sortable:j};function q({children:f,className:x,columns:o=1,onChangeOrder:n,...g}){const D=Number.isFinite(o)?Math.max(1,Math.floor(o)):1,l=e.useMemo(()=>e.Children.toArray(f),[f]),[S,m]=e.useState(l),s=e.useRef(-1);return e.useEffect(()=>m(l),[l]),p.jsx(_.List,{className:E.t(x,b.sortable,D>1&&b.columns),columns:o,ordered:!0,...g,"data-component":"sortable",children:S.map((c,a)=>{const v=e.isValidElement(c)?c.key:null;return p.jsx("li",{draggable:!0,onDragStart:t=>{s.current=a,t.dataTransfer.setData("text/plain",""),t.dataTransfer.effectAllowed="move"},onDragOver:t=>{t.preventDefault(),t.dataTransfer.dropEffect="move"},onDrop:t=>{t.preventDefault();const i=s.current;i<0||i===a||(m(y=>{const r=y.slice();return r.splice(a,0,r.splice(i,1)[0]),n==null||n(r.map((d,u)=>({id:String(e.isValidElement(d)?d.props["data-id"]??`idx-${u}`:`idx-${u}`),weight:r.length-1-u}))),r}),s.current=-1)},onDragEnd:()=>{s.current=-1},"data-component":"sortable",children:c},v??a)})})}exports.Sortable=q;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -2,7 +2,7 @@ import { jsx as d } from "react/jsx-runtime";
|
|
|
2
2
|
import { t as y } from "../../classix-DG18itHa.js";
|
|
3
3
|
import f, { useMemo as S, useState as M, useRef as T, useEffect as k } from "react";
|
|
4
4
|
import { List as w } from "../list/index.js";
|
|
5
|
-
import '../../assets/
|
|
5
|
+
import '../../assets/index27.css';const A = "_sortable_178uo_1", b = {
|
|
6
6
|
sortable: A
|
|
7
7
|
};
|
|
8
8
|
function j({
|
|
@@ -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/index28.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,19 +1,19 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useRef as p, useState as w, useCallback as h, useEffect as
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
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/index28.css';const v = "_toasts_19qwq_1", S = {
|
|
5
5
|
toasts: v
|
|
6
6
|
}, g = ({
|
|
7
7
|
defaultDurationMs: c = 5e3,
|
|
8
8
|
onRemove: f,
|
|
9
9
|
toasts: i
|
|
10
10
|
}) => {
|
|
11
|
-
const r = p(/* @__PURE__ */ new Map()), [n,
|
|
12
|
-
|
|
11
|
+
const r = p(/* @__PURE__ */ new Map()), [n, d] = w(/* @__PURE__ */ new Set()), a = h((e) => {
|
|
12
|
+
d((s) => s.has(e) ? s : new Set(s).add(e));
|
|
13
13
|
}, []);
|
|
14
|
-
return
|
|
14
|
+
return m(() => {
|
|
15
15
|
const e = r.current, s = new Set(i.map((t) => t.id));
|
|
16
|
-
|
|
16
|
+
d((t) => {
|
|
17
17
|
const o = new Set([...t].filter((u) => s.has(u)));
|
|
18
18
|
return o.size === t.size ? t : o;
|
|
19
19
|
});
|
|
@@ -26,13 +26,13 @@ import '../../assets/index29.css';const v = "_toasts_m9a8k_1", S = {
|
|
|
26
26
|
}
|
|
27
27
|
for (const [t, o] of e)
|
|
28
28
|
s.has(t) && !n.has(t) || (window.clearTimeout(o), e.delete(t));
|
|
29
|
-
}, [n, c, a, i]),
|
|
29
|
+
}, [n, c, a, i]), m(() => {
|
|
30
30
|
const e = r.current;
|
|
31
31
|
return () => {
|
|
32
32
|
for (const s of e.values()) window.clearTimeout(s);
|
|
33
33
|
e.clear();
|
|
34
34
|
};
|
|
35
|
-
}, []), i.length ? /* @__PURE__ */
|
|
35
|
+
}, []), i.length ? /* @__PURE__ */ l("div", { className: S.toasts, "data-component": "toasts", children: i.map((e) => /* @__PURE__ */ l(T, { label: e.label, onClick: () => a(e.id), onExitComplete: () => f(e.id), open: !n.has(e.id), type: e.type }, e.id)) }) : null;
|
|
36
36
|
};
|
|
37
37
|
export {
|
|
38
38
|
g as Toasts
|
|
@@ -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/index29.css');const e=require("react/jsx-runtime"),d=require("../_card/index.cjs"),i="_widget_1dptd_1",n={widget:i},s=({children:t})=>e.jsx("div",{className:n.widget,"data-component":"widget",children:e.jsx(d.Card,{children:t})});exports.Widget=s;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { Card as e } from "../_card/index.js";
|
|
3
|
-
import '../../assets/
|
|
3
|
+
import '../../assets/index29.css';const i = "_widget_1dptd_1", o = {
|
|
4
4
|
widget: i
|
|
5
5
|
}, n = ({
|
|
6
6
|
children: 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/index30.css');const e=require("react/jsx-runtime"),r=require("../icon/index.cjs"),s="_accordion_8spz8_1",i={accordion:s},a=o=>{const n=o.currentTarget.closest("details");!n||!document.startViewTransition||(o.preventDefault(),document.startViewTransition(()=>n.open=!n.open))},d=({children:o,icon:n,label:t,open:c})=>e.jsxs("details",{className:i.accordion,open:c||void 0,"data-component":"accordion",children:[e.jsxs("summary",{onClick:a,children:[n&&e.jsx(r.Icon,{name:n}),t&&t]}),o]});exports.Accordion=d;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as c, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { Icon as s } from "../icon/index.js";
|
|
3
|
-
import '../../assets/
|
|
3
|
+
import '../../assets/index30.css';const i = "_accordion_8spz8_1", a = {
|
|
4
4
|
accordion: i
|
|
5
5
|
}, d = (n) => {
|
|
6
6
|
const o = n.currentTarget.closest("details");
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index31.css');const c=require("react/jsx-runtime"),n=require("../../classix-5H4IWnMA.cjs"),d="
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index31.css');const c=require("react/jsx-runtime"),n=require("../../classix-5H4IWnMA.cjs"),d="_aside_tkb2t_1",o="_meta_tkb2t_14",r="_sticky_tkb2t_41",t={aside:d,meta:o,sticky:r},u={default:t.default,meta:t.meta},l=({children:s,className:e,sticky:a=!1,variant:i="default"})=>c.jsx("aside",{className:n.t(e&&e,t.aside,a&&t.sticky,u[i]),"data-component":"aside",children:s});exports.Aside=l;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { t as c } from "../../classix-DG18itHa.js";
|
|
3
|
-
import '../../assets/index31.css';const d = "
|
|
3
|
+
import '../../assets/index31.css';const d = "_aside_tkb2t_1", m = "_meta_tkb2t_14", n = "_sticky_tkb2t_41", t = {
|
|
4
4
|
aside: d,
|
|
5
5
|
meta: m,
|
|
6
6
|
sticky: n
|
|
7
7
|
}, _ = {
|
|
8
8
|
default: t.default,
|
|
9
9
|
meta: t.meta
|
|
10
|
-
},
|
|
10
|
+
}, f = ({
|
|
11
11
|
children: e,
|
|
12
12
|
className: s,
|
|
13
13
|
sticky: a = !1,
|
|
14
14
|
variant: i = "default"
|
|
15
15
|
}) => /* @__PURE__ */ o("aside", { className: c(s && s, t.aside, a && t.sticky, _[i]), "data-component": "aside", children: e });
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
f as Aside
|
|
18
18
|
};
|
|
19
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index33.css');const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index33.css');const a=require("react/jsx-runtime"),c=require("../../classix-5H4IWnMA.cjs"),u=require("../icon/index.cjs"),l="_button_18c17_1",d="_danger_18c17_19",_="_minimal_18c17_32",p="_primary_18c17_39",t={button:l,danger:d,minimal:_,primary:p},b={danger:t.danger,default:t.default,minimal:t.minimal,primary:t.primary},g=({children:i,className:r,disabled:o=!1,icon:n,onClick:s,variant:e="default",...m})=>a.jsxs("button",{className:c.t(r,t.button,b[e]),disabled:o,onClick:s,type:"button",...m,"data-component":"button",children:[n&&a.jsx(u.Icon,{gap:"right",name:n,size:"small",variant:e==="minimal"?"default":"white"}),i]});exports.Button=g;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import { jsxs as s, jsx as l } from "react/jsx-runtime";
|
|
2
|
-
import { t as
|
|
3
|
-
import { Icon as
|
|
4
|
-
import '../../assets/index33.css';const
|
|
5
|
-
button:
|
|
6
|
-
danger:
|
|
7
|
-
minimal:
|
|
2
|
+
import { t as c } from "../../classix-DG18itHa.js";
|
|
3
|
+
import { Icon as u } from "../icon/index.js";
|
|
4
|
+
import '../../assets/index33.css';const p = "_button_18c17_1", _ = "_danger_18c17_19", d = "_minimal_18c17_32", f = "_primary_18c17_39", t = {
|
|
5
|
+
button: p,
|
|
6
|
+
danger: _,
|
|
7
|
+
minimal: d,
|
|
8
8
|
primary: f
|
|
9
9
|
}, b = {
|
|
10
10
|
danger: t.danger,
|
|
11
11
|
default: t.default,
|
|
12
12
|
minimal: t.minimal,
|
|
13
13
|
primary: t.primary
|
|
14
|
-
},
|
|
15
|
-
children:
|
|
16
|
-
className:
|
|
17
|
-
disabled:
|
|
14
|
+
}, x = ({
|
|
15
|
+
children: m,
|
|
16
|
+
className: r,
|
|
17
|
+
disabled: i = !1,
|
|
18
18
|
icon: n,
|
|
19
19
|
onClick: o,
|
|
20
|
-
variant:
|
|
20
|
+
variant: a = "default",
|
|
21
21
|
...e
|
|
22
|
-
}) => /* @__PURE__ */ s("button", { className:
|
|
23
|
-
n && /* @__PURE__ */ l(
|
|
24
|
-
|
|
22
|
+
}) => /* @__PURE__ */ s("button", { className: c(r, t.button, b[a]), disabled: i, onClick: o, type: "button", ...e, "data-component": "button", children: [
|
|
23
|
+
n && /* @__PURE__ */ l(u, { gap: "right", name: n, size: "small", variant: a === "minimal" ? "default" : "white" }),
|
|
24
|
+
m
|
|
25
25
|
] });
|
|
26
26
|
export {
|
|
27
|
-
|
|
27
|
+
x as Button
|
|
28
28
|
};
|
|
29
29
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index14.css');const e=require("react/jsx-runtime"),x=require("../../icons-CWtPtYZj.cjs"),b=require("../loading/index.cjs"),h="
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index14.css');const e=require("react/jsx-runtime"),x=require("../../icons-CWtPtYZj.cjs"),b=require("../loading/index.cjs"),h="_checkbox_1e3mw_1",k={checkbox:h},u=({checked:s,disabled:t,isLoading:c,label:o,onChange:n,...i})=>{const r={"--icon-svg":x.iconSVG("check")};return e.jsxs("label",{className:k.checkbox,"data-component":"checkbox",children:[c&&e.jsx(b.Loading,{size:24,sticky:!0}),e.jsx("input",{checked:s,disabled:t||c,onChange:n,type:"checkbox",style:r,...i}),o&&o]})};exports.Checkbox=u;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsxs as h, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { i as x } from "../../icons-DeUtqBx_.js";
|
|
3
3
|
import { Loading as k } from "../loading/index.js";
|
|
4
|
-
import '../../assets/index14.css';const
|
|
5
|
-
checkbox:
|
|
4
|
+
import '../../assets/index14.css';const m = "_checkbox_1e3mw_1", b = {
|
|
5
|
+
checkbox: m
|
|
6
6
|
}, d = ({
|
|
7
|
-
checked:
|
|
8
|
-
disabled:
|
|
7
|
+
checked: t,
|
|
8
|
+
disabled: s,
|
|
9
9
|
isLoading: c,
|
|
10
10
|
label: o,
|
|
11
11
|
onChange: r,
|
|
@@ -14,9 +14,9 @@ import '../../assets/index14.css';const b = "_checkbox_19svo_1", m = {
|
|
|
14
14
|
const n = {
|
|
15
15
|
"--icon-svg": x("check")
|
|
16
16
|
};
|
|
17
|
-
return /* @__PURE__ */ h("label", { className:
|
|
17
|
+
return /* @__PURE__ */ h("label", { className: b.checkbox, "data-component": "checkbox", children: [
|
|
18
18
|
c && /* @__PURE__ */ e(k, { size: 24, sticky: !0 }),
|
|
19
|
-
/* @__PURE__ */ e("input", { checked:
|
|
19
|
+
/* @__PURE__ */ e("input", { checked: t, disabled: s || c, onChange: r, type: "checkbox", style: n, ...i }),
|
|
20
20
|
o && o
|
|
21
21
|
] });
|
|
22
22
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index13.css');const r=require("react/jsx-runtime"),t=require("../../helpers-fOobx0tS.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index13.css');const r=require("react/jsx-runtime"),t=require("../../helpers-fOobx0tS.cjs"),o="_controls_u02jm_15",c="_wrapper_u02jm_29",e={controls:o,wrapper:c},l=({children:s,...n})=>r.jsx(r.Fragment,{children:r.jsx("div",{className:e.wrapper,children:r.jsx("div",{className:e.controls,children:r.jsx("menu",{"data-animation":"stagger",...n,children:t.wrapChildren(s)})})})});exports.Controls=l;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/components/controls/index.tsx"],"sourcesContent":["import { wrapChildren } from '@/lib/helpers';\n\nimport styles from './styles.module.css';\n\nexport type ControlsProps = React.ComponentPropsWithoutRef<'menu'> & {};\n\nexport const Controls = ({ children, ...props }: ControlsProps) => {\n return (\n <div className={styles.wrapper}>\n
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/components/controls/index.tsx"],"sourcesContent":["import { wrapChildren } from '@/lib/helpers';\n\nimport styles from './styles.module.css';\n\nexport type ControlsProps = React.ComponentPropsWithoutRef<'menu'> & {};\n\nexport const Controls = ({ children, ...props }: ControlsProps) => {\n return (\n <>\n <div className={styles.wrapper}>\n <div className={styles.controls}>\n <menu\n data-animation='stagger'\n {...props}\n >\n {wrapChildren(children)}\n </menu>\n </div>\n </div>\n </>\n );\n};\n"],"names":["Controls","children","props","jsx","Fragment","styles","wrapper","controls","wrapChildren"],"mappings":"mOAMaA,EAAWA,CAAC,CAAEC,SAAAA,EAAU,GAAGC,CAAqB,IAEzDC,EAAAA,IAAAC,EAAAA,SAAA,CACE,eAAC,MAAA,CAAI,UAAWC,EAAOC,QACrB,SAAAH,EAAAA,IAAC,MAAA,CAAI,UAAWE,EAAOE,SACrB,eAAC,OAAA,CACC,iBAAe,UACf,GAAIL,EAEHM,wBAAaP,CAAQ,CAAA,CACxB,CAAA,CACF,CAAA,CACF,CAAA,CACF"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { w as
|
|
3
|
-
import '../../assets/index13.css';const a = "
|
|
1
|
+
import { jsx as r, Fragment as t } from "react/jsx-runtime";
|
|
2
|
+
import { w as e } from "../../helpers-Dbey5Ztb.js";
|
|
3
|
+
import '../../assets/index13.css';const a = "_controls_u02jm_15", c = "_wrapper_u02jm_29", o = {
|
|
4
4
|
controls: a,
|
|
5
|
-
wrapper:
|
|
6
|
-
},
|
|
5
|
+
wrapper: c
|
|
6
|
+
}, i = ({
|
|
7
7
|
children: n,
|
|
8
|
-
...
|
|
9
|
-
}) => /* @__PURE__ */ r("div", { className: o.wrapper,
|
|
8
|
+
...s
|
|
9
|
+
}) => /* @__PURE__ */ r(t, { children: /* @__PURE__ */ r("div", { className: o.wrapper, children: /* @__PURE__ */ r("div", { className: o.controls, children: /* @__PURE__ */ r("menu", { "data-animation": "stagger", ...s, children: e(n) }) }) }) });
|
|
10
10
|
export {
|
|
11
|
-
|
|
11
|
+
i as Controls
|
|
12
12
|
};
|
|
13
13
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/controls/index.tsx"],"sourcesContent":["import { wrapChildren } from '@/lib/helpers';\n\nimport styles from './styles.module.css';\n\nexport type ControlsProps = React.ComponentPropsWithoutRef<'menu'> & {};\n\nexport const Controls = ({ children, ...props }: ControlsProps) => {\n return (\n <div className={styles.wrapper}>\n
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/controls/index.tsx"],"sourcesContent":["import { wrapChildren } from '@/lib/helpers';\n\nimport styles from './styles.module.css';\n\nexport type ControlsProps = React.ComponentPropsWithoutRef<'menu'> & {};\n\nexport const Controls = ({ children, ...props }: ControlsProps) => {\n return (\n <>\n <div className={styles.wrapper}>\n <div className={styles.controls}>\n <menu\n data-animation='stagger'\n {...props}\n >\n {wrapChildren(children)}\n </menu>\n </div>\n </div>\n </>\n );\n};\n"],"names":["Controls","children","props","jsx","Fragment","styles","wrapper","controls","wrapChildren"],"mappings":";;;;;GAMaA,IAAWA,CAAC;AAAA,EAAEC,UAAAA;AAAAA,EAAU,GAAGC;AAAqB,MAEzD,gBAAAC,EAAAC,GAAA,EACE,4BAAC,OAAA,EAAI,WAAWC,EAAOC,SACrB,UAAA,gBAAAH,EAAC,OAAA,EAAI,WAAWE,EAAOE,UACrB,4BAAC,QAAA,EACC,kBAAe,WACf,GAAIL,GAEHM,YAAaP,CAAQ,EAAA,CACxB,EAAA,CACF,EAAA,CACF,EAAA,CACF;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index12.css');const a=require("react/jsx-runtime"),s="
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index12.css');const a=require("react/jsx-runtime"),s="_dialog_19p8b_1",t="_wrapper_19p8b_32",e={dialog:s,wrapper:t},n=({children:i,setOpen:o,...l})=>a.jsx("div",{className:e.wrapper,onClick:()=>o?o(!1):{},"data-component":"dialog",children:a.jsx("dialog",{className:e.dialog,onClick:r=>r.stopPropagation(),...l,children:i})});exports.Dialog=n;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import '../../assets/index12.css';const
|
|
3
|
-
dialog:
|
|
4
|
-
wrapper:
|
|
5
|
-
},
|
|
2
|
+
import '../../assets/index12.css';const s = "_dialog_19p8b_1", t = "_wrapper_19p8b_32", r = {
|
|
3
|
+
dialog: s,
|
|
4
|
+
wrapper: t
|
|
5
|
+
}, e = ({
|
|
6
6
|
children: l,
|
|
7
7
|
setOpen: o,
|
|
8
|
-
...
|
|
9
|
-
}) => /* @__PURE__ */ a("div", { className: r.wrapper, onClick: () => o ? o(!1) : {}, "data-component": "dialog", children: /* @__PURE__ */ a("dialog", { className: r.dialog, onClick: (
|
|
8
|
+
...p
|
|
9
|
+
}) => /* @__PURE__ */ a("div", { className: r.wrapper, onClick: () => o ? o(!1) : {}, "data-component": "dialog", children: /* @__PURE__ */ a("dialog", { className: r.dialog, onClick: (i) => i.stopPropagation(), ...p, children: l }) });
|
|
10
10
|
export {
|
|
11
|
-
|
|
11
|
+
e as Dialog
|
|
12
12
|
};
|
|
13
13
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index35.css');const s=require("react/jsx-runtime"),m=require("../../classix-5H4IWnMA.cjs"),a="
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index35.css');const s=require("react/jsx-runtime"),m=require("../../classix-5H4IWnMA.cjs"),a="_form_zvyrv_1",c="_inline_zvyrv_21",e={form:a,inline:c},l=({animation:o,children:n,className:r,inline:t=!1,...i})=>s.jsx("form",{className:m.t(r,t&&e.inline,e.form),"data-animation":o,...i,"data-component":"form",children:n&&n});exports.Form=l;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { t as s } from "../../classix-DG18itHa.js";
|
|
3
|
-
import '../../assets/index35.css';const a = "
|
|
3
|
+
import '../../assets/index35.css';const a = "_form_zvyrv_1", f = "_inline_zvyrv_21", n = {
|
|
4
4
|
form: a,
|
|
5
5
|
inline: f
|
|
6
6
|
}, _ = ({
|
|
7
|
-
animation:
|
|
7
|
+
animation: r,
|
|
8
8
|
children: o,
|
|
9
|
-
className:
|
|
9
|
+
className: m,
|
|
10
10
|
inline: t = !1,
|
|
11
11
|
...i
|
|
12
|
-
}) => /* @__PURE__ */ e("form", { className: s(
|
|
12
|
+
}) => /* @__PURE__ */ e("form", { className: s(m, t && n.inline, n.form), "data-animation": r, ...i, "data-component": "form", children: o && o });
|
|
13
13
|
export {
|
|
14
14
|
_ as Form
|
|
15
15
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index7.css');const r=require("react/jsx-runtime"),o=require("../../classix-5H4IWnMA.cjs"),s="
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index7.css');const r=require("react/jsx-runtime"),o=require("../../classix-5H4IWnMA.cjs"),s="_header_kd9kp_1",d="_jumbo_kd9kp_50",e={header:s,jumbo:d},u={default:e.default,jumbo:e.jumbo},n=({children:t,variant:a="default"})=>r.jsx("header",{className:o.t(e.header,u[a]),"data-component":"header",children:t});exports.Header=n;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import { t as r } from "../../classix-DG18itHa.js";
|
|
3
|
-
import '../../assets/index7.css';const d = "
|
|
3
|
+
import '../../assets/index7.css';const d = "_header_kd9kp_1", m = "_jumbo_kd9kp_50", e = {
|
|
4
4
|
header: d,
|
|
5
5
|
jumbo: m
|
|
6
6
|
}, s = {
|
|
7
7
|
default: e.default,
|
|
8
8
|
jumbo: e.jumbo
|
|
9
|
-
},
|
|
9
|
+
}, c = ({
|
|
10
10
|
children: o,
|
|
11
11
|
variant: t = "default"
|
|
12
12
|
}) => /* @__PURE__ */ a("header", { className: r(e.header, s[t]), "data-component": "header", children: o });
|
|
13
13
|
export {
|
|
14
|
-
|
|
14
|
+
c as Header
|
|
15
15
|
};
|
|
16
16
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),o=require("../../classix-5H4IWnMA.cjs"),a=require("react"),N=require("../../utils-D_TJ8wDc.cjs"),s=require("../../styles.module
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),o=require("../../classix-5H4IWnMA.cjs"),a=require("react"),N=require("../../utils-D_TJ8wDc.cjs"),s=require("../../styles.module-BuPl_9yN.cjs"),C=a.forwardRef(({className:S,defaultCountryCode:r="+47",disabled:i=!1,label:h,placeholder:m,type:n="text",...e},g)=>{const[c,x]=a.useState(""),[l,d]=a.useState(""),{onChange:p,value:v,...y}=e,{touched:j,onBlur:f}=N.useTouched(v==="");a.useEffect(()=>{if(typeof e.onChange=="function"&&n==="tel"){const u={name:e.name,value:l?(c||r).split(" ").join("")+l.split(" ").join(""):void 0};e.onChange({target:u,currentTarget:u})}},[c,l]),a.useEffect(()=>{n==="tel"&&!e.value&&(d(""),x(""))},[e.value,n]);const q=t.jsxs(t.Fragment,{children:[t.jsx("input",{disabled:i,hidden:!0,onChange:p,pattern:void 0,placeholder:m,ref:g,type:n,value:v}),t.jsx("input",{type:"text",className:s.inputStyles.input,disabled:i,maxLength:5,onChange:u=>x(u.target.value),placeholder:r,value:c}),t.jsx("input",{type:"tel",className:o.t(s.inputStyles.input,j&&"touched"),disabled:i,maxLength:14,name:void 0,onChange:u=>d(u.target.value),onBlur:f,pattern:e.pattern,value:l,...y})]});return t.jsxs("label",{className:s.inputStyles.container,children:[h&&t.jsx("span",{className:o.t(s.inputStyles.label,e.required&&s.inputStyles.required),children:h}),n==="tel"?q:t.jsx("input",{ref:g,className:o.t(s.inputStyles.input,S,j&&"touched"),disabled:i,onBlur:f,placeholder:m,type:n,...e})]})});exports.Input=C;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -2,7 +2,7 @@ import { jsxs as x, Fragment as P, jsx as o } from "react/jsx-runtime";
|
|
|
2
2
|
import { t as c } from "../../classix-DG18itHa.js";
|
|
3
3
|
import { forwardRef as S, useState as N, useEffect as C } from "react";
|
|
4
4
|
import { u as T } from "../../utils-DXIJVVzz.js";
|
|
5
|
-
import { i as a } from "../../styles.module-
|
|
5
|
+
import { i as a } from "../../styles.module-ZrsD4xw8.js";
|
|
6
6
|
const b = S(({
|
|
7
7
|
className: j,
|
|
8
8
|
defaultCountryCode: l = "+47",
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index5.css');const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index5.css');const n=require("react/jsx-runtime"),u=require("../../classix-5H4IWnMA.cjs"),l="_layout_pbwv9_16",r="_dashboard_pbwv9_30",c="_home_pbwv9_34",o={layout:l,dashboard:r,home:c},d=({children:t,isLoading:a=!1,feature:s,...e})=>n.jsx("main",{className:u.t(o.layout,o[s],a&&"is-loading"),...e,"data-component":"layout",children:t});exports.Layout=d;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { t as
|
|
3
|
-
import '../../assets/index5.css';const
|
|
4
|
-
layout:
|
|
5
|
-
dashboard:
|
|
6
|
-
home:
|
|
7
|
-
},
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { t as r } from "../../classix-DG18itHa.js";
|
|
3
|
+
import '../../assets/index5.css';const e = "_layout_pbwv9_16", l = "_dashboard_pbwv9_30", _ = "_home_pbwv9_34", o = {
|
|
4
|
+
layout: e,
|
|
5
|
+
dashboard: l,
|
|
6
|
+
home: _
|
|
7
|
+
}, p = ({
|
|
8
8
|
children: a,
|
|
9
9
|
isLoading: t = !1,
|
|
10
10
|
feature: s,
|
|
11
|
-
...
|
|
12
|
-
}) => /* @__PURE__ */
|
|
11
|
+
...m
|
|
12
|
+
}) => /* @__PURE__ */ n("main", { className: r(o.layout, o[s], t && "is-loading"), ...m, "data-component": "layout", children: a });
|
|
13
13
|
export {
|
|
14
|
-
|
|
14
|
+
p as Layout
|
|
15
15
|
};
|
|
16
16
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index38.css');const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index38.css');const r=require("react/jsx-runtime"),_=require("../../classix-5H4IWnMA.cjs"),c=require("../../helpers-fOobx0tS.cjs"),d="_horizontal_1459r_1",x="_list_1459r_12",y="_columns_1459r_41",s={horizontal:d,list:x,columns:y};function j({children:t,className:a,columns:o=1,horizontal:u,ordered:m,style:h,...l}){const n=Number.isFinite(o)?Math.max(1,Math.floor(o)):1,e=_.t(a,s.list,n>1&&s.columns,u&&s.horizontal),i={...h,"--list-columns":n};return m?r.jsx("ol",{className:e,style:i,...l,"data-component":"list",children:c.wrapChildren(t)}):r.jsx("ul",{className:e,style:i,...l,"data-component":"list",children:c.wrapChildren(t)})}exports.List=j;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { t as
|
|
3
|
-
import { w as
|
|
4
|
-
import '../../assets/index38.css';const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { t as u } from "../../classix-DG18itHa.js";
|
|
3
|
+
import { w as c } from "../../helpers-Dbey5Ztb.js";
|
|
4
|
+
import '../../assets/index38.css';const f = "_horizontal_1459r_1", p = "_list_1459r_12", d = "_columns_1459r_41", t = {
|
|
5
|
+
horizontal: f,
|
|
6
|
+
list: p,
|
|
7
|
+
columns: d
|
|
8
8
|
};
|
|
9
|
-
function
|
|
9
|
+
function y({
|
|
10
10
|
children: o,
|
|
11
11
|
className: m,
|
|
12
12
|
columns: s = 1,
|
|
@@ -15,13 +15,13 @@ function x({
|
|
|
15
15
|
style: _,
|
|
16
16
|
...l
|
|
17
17
|
}) {
|
|
18
|
-
const n = Number.isFinite(s) ? Math.max(1, Math.floor(s)) : 1, i =
|
|
18
|
+
const n = Number.isFinite(s) ? Math.max(1, Math.floor(s)) : 1, i = u(m, t.list, n > 1 && t.columns, e && t.horizontal), r = {
|
|
19
19
|
..._,
|
|
20
20
|
"--list-columns": n
|
|
21
21
|
};
|
|
22
|
-
return h ? /* @__PURE__ */
|
|
22
|
+
return h ? /* @__PURE__ */ a("ol", { className: i, style: r, ...l, "data-component": "list", children: c(o) }) : /* @__PURE__ */ a("ul", { className: i, style: r, ...l, "data-component": "list", children: c(o) });
|
|
23
23
|
}
|
|
24
24
|
export {
|
|
25
|
-
|
|
25
|
+
y as List
|
|
26
26
|
};
|
|
27
27
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index40.css');const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index40.css');const _=require("react/jsx-runtime"),p=require("../../classix-5H4IWnMA.cjs"),c=require("react"),v=require("../../icons-CWtPtYZj.cjs"),h="_nav_6dj6b_1",w="_horizontal_6dj6b_7",j="_tabs_6dj6b_17",g="_pills_6dj6b_38",n={nav:h,horizontal:w,tabs:j,pills:g},m={default:n.default,pills:n.pills,tabs:n.tabs},R=({animation:l,children:u,className:d,horizontal:r=!1,variant:s="default",...f})=>{const o=c.useRef(null),a=c.useRef(!1),b={"--icon-svg":v.iconSVG("chevron")};return _.jsx("nav",{className:p.t(d,r&&n.horizontal,n.nav,m[s]),"data-animation":l,"data-orientation":r?"horizontal":"vertical",onPointerDown:()=>{var e;s!=="pills"||window.innerWidth>960||(a.current=!!((e=o.current)!=null&&e.matches(":focus-within")))},onClick:e=>{var i;if(s!=="pills"||window.innerWidth>960)return;const t=(i=e.target)==null?void 0:i.closest("a");(t==null?void 0:t.getAttribute("aria-current"))==="page"&&!a.current||t==null||t.blur()},ref:o,style:b,...f,"data-component":"nav",children:u})};exports.Nav=R;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","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(
|
|
1
|
+
{"version":3,"file":"index.cjs","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":"4UAOMA,EAAW,CACfC,QAASC,EAAOD,QAChBE,MAAOD,EAAOC,MACdC,KAAMF,EAAOE,IACf,EAUaC,EAAMA,CAAC,CAClBC,UAAAA,EACAC,SAAAA,EACAC,UAAAA,EACAC,WAAAA,EAAa,GACbC,QAAAA,EAAU,UACV,GAAGC,CACK,IAAM,CACd,MAAMC,EAAMC,EAAAA,OAAoB,IAAI,EAC9BC,EAAaD,EAAAA,OAAO,EAAK,EAKzBE,EAAqB,CACzB,aAAcC,EAAAA,QAAQ,SAAS,CAAA,EAGjC,OACEC,EAAAA,IAAC,OACC,UAAWC,EAAAA,EAAGV,EAAWC,GAAcP,EAAOO,WAAYP,EAAOiB,IAAKnB,EAASU,CAAO,CAAC,EACvF,iBAAgBJ,EAChB,mBAAkBG,EAAa,aAAe,WAC9C,cAAe,IAAM,OACfC,IAAY,SAAWU,OAAOC,WAAa,MAC/CP,EAAWQ,QAAU,CAAC,GAACV,EAAAA,EAAIU,UAAJV,MAAAA,EAAaW,QAAQ,kBAC9C,EACA,QAAUC,GAAM,OACd,GAAId,IAAY,SAAWU,OAAOC,WAAa,IAAK,OAEpD,MAAMI,GAAQD,EAAAA,EAAEE,SAAFF,YAAAA,EAAiCG,QAAQ,MAErCF,GAAAA,YAAAA,EAAMG,aAAa,mBAAoB,QACxC,CAACd,EAAWQ,SAI7BG,GAAAA,MAAAA,EAAMI,MACR,EACA,IAAAjB,EACA,MAAOG,EACP,GAAIJ,EAAM,iBAAA,MAETJ,SAAAA,EACH,CAEJ"}
|