@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.
package/dist/assets/index40.css
CHANGED
|
@@ -1 +1 @@
|
|
|
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
|
|
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 {
|
|
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
|
|
2
|
-
import { t as
|
|
3
|
-
import {
|
|
4
|
-
import { i as
|
|
5
|
-
import '../../assets/index40.css';const h = "
|
|
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:
|
|
10
|
-
},
|
|
11
|
-
default:
|
|
12
|
-
pills:
|
|
13
|
-
tabs:
|
|
14
|
-
},
|
|
15
|
-
animation:
|
|
16
|
-
children:
|
|
17
|
-
className:
|
|
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:
|
|
20
|
-
...
|
|
19
|
+
variant: n = "default",
|
|
20
|
+
...l
|
|
21
21
|
}) => {
|
|
22
|
-
const
|
|
23
|
-
"--icon-svg":
|
|
22
|
+
const [c, a] = _(!1), p = {
|
|
23
|
+
"--icon-svg": m("chevron")
|
|
24
24
|
};
|
|
25
|
-
return /* @__PURE__ */
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
},
|
|
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
|
-
|
|
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 {
|
|
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;"}
|