@solibo/solibo-ui 0.3.33 → 0.3.34

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.
@@ -1 +1 @@
1
- ._nav_6dj6b_1 a{display:block}._horizontal_6dj6b_7 a,._horizontal_6dj6b_7 li{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._tabs_6dj6b_17{@extend .horizontal;border-bottom:var(--border-width) solid var(--color-border-primary);display:flex;gap:var(--unit)}._tabs_6dj6b_17 a,._tabs_6dj6b_17 li{color:var(--color-outer-space);font-weight:var(--font-weight-semibold);padding:var(--unit-tiny) var(--unit-micro) var(--unit-small) var(--unit-micro);text-decoration:none}._tabs_6dj6b_17 a[aria-current=page],._tabs_6dj6b_17 li[aria-current=page]{color:var(--color-electric-violet);border-bottom:var(--border-width) solid var(--color-electric-violet)}._pills_6dj6b_38{background-color:var(--color-translucent);-webkit-backdrop-filter:blur(var(--unit-small));backdrop-filter:blur(var(--unit-small));border-radius:var(--border-radius-large);border:var(--border-width-heavy) solid var(--color-white);box-shadow:var(--shadow-big);display:flex;margin:0 auto;position:-webkit-sticky;position:sticky;top:var(--unit);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;z-index:1}._pills_6dj6b_38:has(>:only-child){display:none}._pills_6dj6b_38:before{content:"";background:var(--color-electric-violet);border-radius:var(--border-radius-large);inset-block:0;left:anchor(left);position-anchor:--current;position:absolute;transition:left var(--transition-duration) var(--transition-timing-function),top var(--transition-duration) var(--transition-timing-function),width var(--transition-duration) var(--transition-timing-function);width:anchor-size(width);z-index:0}._pills_6dj6b_38 a{border-radius:var(--unit);color:var(--color-primary);display:inline-block;font-weight:var(--font-weight-bold);padding:var(--unit);position:relative;text-decoration:none;text-overflow:ellipsis;transition:color var(--transition-duration) var(--transition-timing-function),padding var(--transition-duration) var(--transition-timing-function);white-space:nowrap;z-index:2}._pills_6dj6b_38 a[aria-current=page]{anchor-name:--current;color:var(--color-white)}._pills_6dj6b_38 a[aria-current=page]:hover{color:var(--color-white)}@media (width <= 960px){._pills_6dj6b_38{flex-direction:column}._pills_6dj6b_38 a:not([aria-current=page]){display:none}._pills_6dj6b_38 a[aria-current=page]:after{background-color:var(--color-white);content:"";display:inline-block;height:var(--unit);margin-left:var(--unit-small);-webkit-mask-image:var(--icon-svg);mask-image:var(--icon-svg);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain;transition:transform var(--transition-duration) var(--transition-timing-function);vertical-align:middle;width:var(--unit)}._pills_6dj6b_38:before{top:anchor(top);bottom:anchor(bottom);min-height:calc(var(--unit) * 2)}._pills_6dj6b_38:focus-within a{display:block}._pills_6dj6b_38:focus-within a[aria-current=page]:after{transform:rotateX(180deg)}}@supports not (position-anchor: --x){._pills_6dj6b_38:before{content:""}._pills_6dj6b_38 [aria-current=page]:before{background:var(--color-electric-violet);content:"";position:absolute;transition:all var(--transition-duration) linear;z-index:-1}}
1
+ ._nav_roa57_1 a{display:block}._horizontal_roa57_7 a,._horizontal_roa57_7 li{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._tabs_roa57_17{@extend .horizontal;border-bottom:var(--border-width) solid var(--color-border-primary);display:flex;gap:var(--unit)}._tabs_roa57_17 a,._tabs_roa57_17 li{color:var(--color-outer-space);font-weight:var(--font-weight-semibold);padding:var(--unit-tiny) var(--unit-micro) var(--unit-small) var(--unit-micro);text-decoration:none}._tabs_roa57_17 a[aria-current=page],._tabs_roa57_17 li[aria-current=page]{color:var(--color-electric-violet);border-bottom:var(--border-width) solid var(--color-electric-violet)}._pills_roa57_38{background-color:var(--color-translucent);-webkit-backdrop-filter:blur(var(--unit-small));backdrop-filter:blur(var(--unit-small));border-radius:var(--border-radius-large);border:var(--border-width-heavy) solid var(--color-white);box-shadow:var(--shadow-big);display:flex;margin:0 auto;position:-webkit-sticky;position:sticky;top:var(--unit);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;z-index:1}._pills_roa57_38:has(>:only-child){display:none}._pills_roa57_38:before{content:"";background:var(--color-electric-violet);border-radius:var(--border-radius-large);inset-block:0;left:anchor(left);position-anchor:--current;position:absolute;transition:left var(--transition-duration) var(--transition-timing-function),top var(--transition-duration) var(--transition-timing-function),width var(--transition-duration) var(--transition-timing-function);width:anchor-size(width);z-index:0}._pills_roa57_38 a{border-radius:var(--unit-large);color:var(--color-primary);display:inline-block;font-weight:var(--font-weight-bold);padding:var(--unit);position:relative;text-decoration:none;text-overflow:ellipsis;transition:color var(--transition-duration) var(--transition-timing-function),padding var(--transition-duration) var(--transition-timing-function);white-space:nowrap;z-index:2}._pills_roa57_38 a[aria-current=page]{anchor-name:--current;color:var(--color-white)}._pills_roa57_38 a[aria-current=page]:hover{color:var(--color-white)}@media (width <= 960px){._pills_roa57_38{flex-direction:column}._pills_roa57_38 a[aria-current=page]{background-color:var(--color-electric-violet)}._pills_roa57_38 a[aria-current=page]:after{background-color:var(--color-white);content:"";display:inline-block;height:var(--unit);margin-left:var(--unit-small);-webkit-mask-image:var(--icon-svg);mask-image:var(--icon-svg);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain;transition:transform var(--transition-duration) var(--transition-timing-function);vertical-align:middle;width:var(--unit)}._pills_roa57_38 a:not([aria-current=page]){display:none}._pills_roa57_38[data-open=true] a{display:block}._pills_roa57_38[data-open=true] a[aria-current=page]:after{transform:rotateX(180deg)}._pills_roa57_38:before{display:none}}@supports not (position-anchor: --x){._pills_roa57_38:before{display:none}._pills_roa57_38 a[aria-current=page]{background:var(--color-electric-violet);color:var(--color-white)}}
@@ -1,2 +1,2 @@
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;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index40.css');const p=require("react/jsx-runtime"),f=require("../../classix-5H4IWnMA.cjs"),_=require("react"),v=require("../../icons-CWtPtYZj.cjs"),h="_nav_roa57_1",b="_horizontal_roa57_7",w="_tabs_roa57_17",g="_pills_roa57_38",t={nav:h,horizontal:b,tabs:w,pills:g},m={default:t.default,pills:t.pills,tabs:t.tabs},q=({animation:o,children:i,className:r,horizontal:s=!1,variant:n="default",...l})=>{const[c,a]=_.useState(!1),u={"--icon-svg":v.iconSVG("chevron")};return p.jsx("nav",{className:f.t(r,s&&t.horizontal,t.nav,m[n]),"data-animation":o,"data-open":c?"true":"false","data-orientation":s?"horizontal":"vertical",onBlurCapture:e=>{if(n!=="pills"||window.innerWidth>960)return;const d=e.relatedTarget;e.currentTarget.contains(d)||a(!1)},onClick:()=>{n!=="pills"||window.innerWidth>960||a(e=>!e)},onFocusCapture:()=>{n!=="pills"||window.innerWidth>960||a(!0)},style:u,...l,"data-component":"nav",children:i})};exports.Nav=q;
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';\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"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/nav/index.tsx"],"sourcesContent":["import cx from 'classix';\nimport { useState } 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 [open, setOpen] = useState(false);\n\n type withVars = React.CSSProperties & {\n '--icon-svg'?: string;\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-open={open ? 'true' : 'false'}\n data-orientation={horizontal ? 'horizontal' : 'vertical'}\n onBlurCapture={(e) => {\n if (variant !== 'pills' || window.innerWidth > 960) return;\n\n const next = e.relatedTarget as Node | null;\n if (!e.currentTarget.contains(next)) {\n setOpen(false);\n }\n }}\n onClick={() => {\n if (variant !== 'pills' || window.innerWidth > 960) return;\n setOpen((v) => !v);\n }}\n onFocusCapture={() => {\n if (variant !== 'pills' || window.innerWidth > 960) return;\n setOpen(true);\n }}\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","open","setOpen","useState","withVars","iconSVG","jsx","cx","nav","e","window","innerWidth","next","relatedTarget","currentTarget","contains","v"],"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,KAAM,CAACC,EAAMC,CAAO,EAAIC,EAAAA,SAAS,EAAK,EAKhCC,EAAqB,CACzB,aAAcC,EAAAA,QAAQ,SAAS,CAAA,EAGjC,OACEC,EAAAA,IAAC,MAAA,CACC,UAAWC,EAAAA,EAAGV,EAAWC,GAAcP,EAAOO,WAAYP,EAAOiB,IAAKnB,EAASU,CAAO,CAAC,EACvF,iBAAgBJ,EAChB,YAAWM,EAAO,OAAS,QAC3B,mBAAkBH,EAAa,aAAe,WAC9C,cAAgBW,GAAM,CACpB,GAAIV,IAAY,SAAWW,OAAOC,WAAa,IAAK,OAEpD,MAAMC,EAAOH,EAAEI,cACVJ,EAAEK,cAAcC,SAASH,CAAI,GAChCV,EAAQ,EAAK,CAEjB,EACA,QAAS,IAAM,CACTH,IAAY,SAAWW,OAAOC,WAAa,KAC/CT,EAASc,GAAM,CAACA,CAAC,CACnB,EACA,eAAgB,IAAM,CAChBjB,IAAY,SAAWW,OAAOC,WAAa,KAC/CT,EAAQ,EAAI,CACd,EACA,MAAOE,EACP,GAAIJ,EAAM,iBAAA,MAETJ,SAAAA,EACH,CAEJ"}
@@ -1,38 +1,38 @@
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 = {
1
+ import { jsx as u } from "react/jsx-runtime";
2
+ import { t as d } from "../../classix-DG18itHa.js";
3
+ import { useState as _ } from "react";
4
+ import { i as m } from "../../icons-DeUtqBx_.js";
5
+ import '../../assets/index40.css';const h = "_nav_roa57_1", v = "_horizontal_roa57_7", w = "_tabs_roa57_17", b = "_pills_roa57_38", t = {
6
6
  nav: h,
7
7
  horizontal: v,
8
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,
9
+ pills: b
10
+ }, z = {
11
+ default: t.default,
12
+ pills: t.pills,
13
+ tabs: t.tabs
14
+ }, y = ({
15
+ animation: r,
16
+ children: i,
17
+ className: e,
18
18
  horizontal: s = !1,
19
- variant: r = "default",
20
- ...p
19
+ variant: n = "default",
20
+ ...l
21
21
  }) => {
22
- const a = l(null), e = l(!1), d = {
23
- "--icon-svg": b("chevron")
22
+ const [c, a] = _(!1), p = {
23
+ "--icon-svg": m("chevron")
24
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 });
25
+ return /* @__PURE__ */ u("nav", { className: d(e, s && t.horizontal, t.nav, z[n]), "data-animation": r, "data-open": c ? "true" : "false", "data-orientation": s ? "horizontal" : "vertical", onBlurCapture: (o) => {
26
+ if (n !== "pills" || window.innerWidth > 960) return;
27
+ const f = o.relatedTarget;
28
+ o.currentTarget.contains(f) || a(!1);
29
+ }, onClick: () => {
30
+ n !== "pills" || window.innerWidth > 960 || a((o) => !o);
31
+ }, onFocusCapture: () => {
32
+ n !== "pills" || window.innerWidth > 960 || a(!0);
33
+ }, style: p, ...l, "data-component": "nav", children: i });
34
34
  };
35
35
  export {
36
- R as Nav
36
+ y as Nav
37
37
  };
38
38
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
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
+ {"version":3,"file":"index.js","sources":["../../../src/components/nav/index.tsx"],"sourcesContent":["import cx from 'classix';\nimport { useState } 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 [open, setOpen] = useState(false);\n\n type withVars = React.CSSProperties & {\n '--icon-svg'?: string;\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-open={open ? 'true' : 'false'}\n data-orientation={horizontal ? 'horizontal' : 'vertical'}\n onBlurCapture={(e) => {\n if (variant !== 'pills' || window.innerWidth > 960) return;\n\n const next = e.relatedTarget as Node | null;\n if (!e.currentTarget.contains(next)) {\n setOpen(false);\n }\n }}\n onClick={() => {\n if (variant !== 'pills' || window.innerWidth > 960) return;\n setOpen((v) => !v);\n }}\n onFocusCapture={() => {\n if (variant !== 'pills' || window.innerWidth > 960) return;\n setOpen(true);\n }}\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","open","setOpen","useState","withVars","iconSVG","jsx","cx","nav","e","window","innerWidth","next","relatedTarget","currentTarget","contains","v"],"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,QAAM,CAACC,GAAMC,CAAO,IAAIC,EAAS,EAAK,GAKhCC,IAAqB;AAAA,IACzB,cAAcC,EAAQ,SAAS;AAAA,EAAA;AAGjC,SACE,gBAAAC,EAAC,OAAA,EACC,WAAWC,EAAGV,GAAWC,KAAcP,EAAOO,YAAYP,EAAOiB,KAAKnB,EAASU,CAAO,CAAC,GACvF,kBAAgBJ,GAChB,aAAWM,IAAO,SAAS,SAC3B,oBAAkBH,IAAa,eAAe,YAC9C,eAAgBW,CAAAA,MAAM;AACpB,QAAIV,MAAY,WAAWW,OAAOC,aAAa,IAAK;AAEpD,UAAMC,IAAOH,EAAEI;AACf,IAAKJ,EAAEK,cAAcC,SAASH,CAAI,KAChCV,EAAQ,EAAK;AAAA,EAEjB,GACA,SAAS,MAAM;AACb,IAAIH,MAAY,WAAWW,OAAOC,aAAa,OAC/CT,EAASc,CAAAA,MAAM,CAACA,CAAC;AAAA,EACnB,GACA,gBAAgB,MAAM;AACpB,IAAIjB,MAAY,WAAWW,OAAOC,aAAa,OAC/CT,EAAQ,EAAI;AAAA,EACd,GACA,OAAOE,GACP,GAAIJ,GAAM,kBAAA,OAETJ,UAAAA,GACH;AAEJ;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solibo/solibo-ui",
3
- "version": "0.3.33",
3
+ "version": "0.3.34",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "dev": "vite build --watch",