@solibo/solibo-ui 1.1.7 → 1.2.1
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/index10.css +1 -1
- package/dist/assets/index11.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/index15.css +1 -1
- package/dist/assets/index16.css +1 -1
- package/dist/assets/index17.css +1 -1
- package/dist/assets/index18.css +1 -1
- package/dist/assets/index19.css +1 -0
- package/dist/assets/index20.css +0 -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/index32.css +1 -1
- package/dist/assets/index33.css +1 -1
- package/dist/assets/index34.css +1 -1
- package/dist/assets/index35.css +1 -1
- package/dist/assets/index36.css +1 -1
- package/dist/assets/index37.css +1 -1
- package/dist/assets/index38.css +1 -1
- package/dist/assets/index39.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 -1
- package/dist/assets/index44.css +1 -1
- package/dist/assets/index45.css +1 -1
- package/dist/assets/index46.css +1 -1
- package/dist/assets/index47.css +1 -1
- package/dist/assets/index48.css +1 -1
- package/dist/assets/index49.css +1 -1
- package/dist/assets/index50.css +1 -1
- package/dist/assets/index51.css +1 -1
- package/dist/assets/index52.css +1 -0
- package/dist/assets/index53.css +1 -0
- package/dist/assets/index54.css +1 -0
- package/dist/assets/index9.css +1 -1
- package/dist/components/app-link/index.cjs +1 -1
- package/dist/components/app-link/index.js +1 -1
- package/dist/components/app-shell/index.cjs +2 -0
- package/dist/components/app-shell/index.cjs.map +1 -0
- package/dist/components/app-shell/index.js +18 -0
- package/dist/components/app-shell/index.js.map +1 -0
- package/dist/components/aside/index.cjs +1 -1
- package/dist/components/aside/index.js +1 -1
- package/dist/components/avatar/index.cjs +1 -1
- package/dist/components/avatar/index.js +1 -1
- package/dist/components/badge/index.cjs +1 -1
- package/dist/components/badge/index.js +1 -1
- package/dist/components/banner/index.cjs +1 -1
- package/dist/components/banner/index.js +1 -1
- package/dist/components/branding/index.cjs +1 -1
- package/dist/components/branding/index.js +1 -1
- package/dist/components/button/index.cjs +1 -1
- package/dist/components/button/index.js +1 -1
- package/dist/components/card/index.cjs +1 -1
- package/dist/components/card/index.js +1 -1
- package/dist/components/checkbox/index.cjs +1 -1
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/chip/index.cjs +1 -1
- package/dist/components/chip/index.js +1 -1
- package/dist/components/collapsible/index.cjs +1 -1
- package/dist/components/collapsible/index.js +1 -1
- package/dist/components/controls/index.cjs +1 -1
- package/dist/components/controls/index.js +1 -1
- package/dist/components/croppable/index.cjs +1 -1
- package/dist/components/croppable/index.js +1 -1
- package/dist/components/dialog/index.cjs +1 -1
- package/dist/components/dialog/index.js +1 -1
- package/dist/components/divider/index.cjs +2 -0
- package/dist/components/divider/index.cjs.map +1 -0
- package/dist/components/divider/index.js +12 -0
- package/dist/components/divider/index.js.map +1 -0
- package/dist/components/dropdown/index.cjs +1 -1
- package/dist/components/dropdown/index.js +3 -3
- package/dist/components/dropzone/index.cjs +1 -1
- package/dist/components/dropzone/index.js +1 -1
- package/dist/components/editor/index.cjs +1 -1
- package/dist/components/editor/index.js +2 -2
- package/dist/components/empty-state/index.cjs +1 -1
- package/dist/components/empty-state/index.js +1 -1
- package/dist/components/fieldset/index.cjs +1 -1
- package/dist/components/fieldset/index.js +1 -1
- package/dist/components/figure/index.cjs +1 -1
- package/dist/components/figure/index.js +1 -1
- package/dist/components/file/index.cjs +1 -1
- package/dist/components/file/index.js +19 -19
- package/dist/components/footer/index.cjs +1 -1
- package/dist/components/footer/index.js +1 -1
- package/dist/components/form/index.cjs +1 -1
- package/dist/components/form/index.js +1 -1
- package/dist/components/graph/index.cjs +1 -1
- package/dist/components/graph/index.js +1 -1
- package/dist/components/group/index.cjs +1 -1
- package/dist/components/group/index.js +1 -1
- package/dist/components/header/index.cjs +1 -1
- package/dist/components/header/index.js +1 -1
- package/dist/components/icon/index.cjs +1 -1
- package/dist/components/icon/index.js +1 -1
- package/dist/components/iframe/index.cjs +1 -1
- package/dist/components/iframe/index.js +1 -1
- package/dist/components/image/index.cjs +1 -1
- package/dist/components/image/index.js +1 -1
- package/dist/components/input/index.cjs +1 -1
- package/dist/components/input/index.js +1 -1
- package/dist/components/link/index.cjs +1 -1
- package/dist/components/link/index.js +1 -1
- package/dist/components/list/index.cjs +1 -1
- package/dist/components/list/index.js +1 -1
- package/dist/components/loading/index.cjs +1 -1
- package/dist/components/loading/index.js +1 -1
- package/dist/components/message/index.cjs +1 -1
- package/dist/components/message/index.js +28 -28
- package/dist/components/messages/index.cjs +1 -1
- package/dist/components/messages/index.js +1 -1
- package/dist/components/nav/index.cjs +1 -1
- package/dist/components/nav/index.cjs.map +1 -1
- package/dist/components/nav/index.js +47 -34
- package/dist/components/nav/index.js.map +1 -1
- package/dist/components/object/index.cjs +1 -1
- package/dist/components/object/index.js +1 -1
- package/dist/components/page-layout/index.cjs +2 -0
- package/dist/components/page-layout/index.cjs.map +1 -0
- package/dist/components/page-layout/index.js +23 -0
- package/dist/components/page-layout/index.js.map +1 -0
- package/dist/components/popover/index.cjs +1 -1
- package/dist/components/popover/index.js +1 -1
- package/dist/components/portal/index.cjs +1 -1
- package/dist/components/portal/index.js +11 -11
- package/dist/components/search/index.cjs +1 -1
- package/dist/components/search/index.js +1 -1
- package/dist/components/select/index.cjs +1 -1
- package/dist/components/select/index.js +1 -1
- package/dist/components/toolbar/index.cjs +1 -1
- package/dist/components/toolbar/index.js +1 -1
- package/dist/components/tooltip/index.cjs +1 -1
- package/dist/components/tooltip/index.js +1 -1
- package/dist/{index-CwIzKfBo.js → index-BLb3JiCr.js} +2 -2
- package/dist/{index-CwIzKfBo.js.map → index-BLb3JiCr.js.map} +1 -1
- package/dist/{index-CXaYq0By.cjs → index-Bt7vnwji.cjs} +2 -2
- package/dist/{index-CXaYq0By.cjs.map → index-Bt7vnwji.cjs.map} +1 -1
- package/dist/index-CQlMdqOp.cjs +2 -0
- package/dist/index-CQlMdqOp.cjs.map +1 -0
- package/dist/index-CbJ2-IPc.js +83 -0
- package/dist/index-CbJ2-IPc.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +29 -2
- package/dist/index.js +109 -102
- package/dist/index.js.map +1 -1
- package/dist/tokens.json +1 -1
- package/package.json +1 -1
- package/dist/index-5yOssOic.cjs +0 -2
- package/dist/index-5yOssOic.cjs.map +0 -1
- package/dist/index-Cv6TtBnd.js +0 -76
- package/dist/index-Cv6TtBnd.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/index16.css');const e=require("react/jsx-runtime"),x=require("../../classix-5H4IWnMA.cjs"),j=require("../avatar/index.cjs"),h=require("../icon/index.cjs"),k="_attachments_1tffk_1",w="_message_1tffk_11",S="_timestamp_1tffk_144",b="_preview_1tffk_149",t={attachments:k,"message-group":"_message-group_1tffk_11",message:w,timestamp:S,preview:b},q=({appearance:o="default",attachments:m,author:a,authorColor:r,authorImageUrl:l,authorLink:d,authorRole:g,content:_,iconName:p="Info",id:f,preview:u,timestamp:i,timestampText:v,type:s="default"})=>{const n=i?new Date(i):void 0,c=n?e.jsx("time",{className:t.timestamp,dateTime:n.toISOString(),children:v??n.toLocaleString()}):null;return e.jsxs("div",{className:t["message-group"],"data-message-type":s,"data-component":"message",children:[a&&e.jsx(j.Avatar,{accessibleLabel:a,color:r,imageUrl:l,link:d,name:a,role:g}),s==="system"&&c,e.jsxs("div",{className:x.t(t.message,u&&t.preview),"data-appearance":o,"data-id":f,"data-type":s,children:[s=="system"&&e.jsx(h.Icon,{gap:"right",name:p}),_]}),m&&e.jsx("div",{className:t.attachments,children:m}),s!=="system"&&c]})};exports.Message=q;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { t as
|
|
3
|
-
import { Avatar as
|
|
4
|
-
import { Icon as
|
|
5
|
-
import '../../assets/
|
|
6
|
-
attachments:
|
|
7
|
-
"message-group": "_message-
|
|
8
|
-
message:
|
|
9
|
-
timestamp:
|
|
10
|
-
preview:
|
|
1
|
+
import { jsx as t, jsxs as r } from "react/jsx-runtime";
|
|
2
|
+
import { t as u } from "../../classix-DG18itHa.js";
|
|
3
|
+
import { Avatar as w } from "../avatar/index.js";
|
|
4
|
+
import { Icon as N } from "../icon/index.js";
|
|
5
|
+
import '../../assets/index16.css';const x = "_attachments_1tffk_1", I = "_message_1tffk_11", S = "_timestamp_1tffk_144", b = "_preview_1tffk_149", s = {
|
|
6
|
+
attachments: x,
|
|
7
|
+
"message-group": "_message-group_1tffk_11",
|
|
8
|
+
message: I,
|
|
9
|
+
timestamp: S,
|
|
10
|
+
preview: b
|
|
11
11
|
}, D = ({
|
|
12
12
|
appearance: c = "default",
|
|
13
|
-
attachments:
|
|
14
|
-
author:
|
|
15
|
-
authorColor:
|
|
16
|
-
authorImageUrl:
|
|
17
|
-
authorLink:
|
|
13
|
+
attachments: i,
|
|
14
|
+
author: a,
|
|
15
|
+
authorColor: l,
|
|
16
|
+
authorImageUrl: d,
|
|
17
|
+
authorLink: g,
|
|
18
18
|
authorRole: p,
|
|
19
|
-
content:
|
|
20
|
-
iconName:
|
|
21
|
-
id:
|
|
19
|
+
content: f,
|
|
20
|
+
iconName: _ = "Info",
|
|
21
|
+
id: v,
|
|
22
22
|
preview: h,
|
|
23
|
-
timestamp:
|
|
24
|
-
timestampText:
|
|
23
|
+
timestamp: n,
|
|
24
|
+
timestampText: k,
|
|
25
25
|
type: e = "default"
|
|
26
26
|
}) => {
|
|
27
|
-
const m =
|
|
27
|
+
const m = n ? new Date(n) : void 0, o = m ? /* @__PURE__ */ t("time", { className: s.timestamp, dateTime: m.toISOString(), children: k ?? m.toLocaleString() }) : null;
|
|
28
28
|
return /* @__PURE__ */ r("div", { className: s["message-group"], "data-message-type": e, "data-component": "message", children: [
|
|
29
|
-
|
|
30
|
-
e === "system" &&
|
|
31
|
-
/* @__PURE__ */ r("div", { className:
|
|
32
|
-
e == "system" && /* @__PURE__ */
|
|
33
|
-
|
|
29
|
+
a && /* @__PURE__ */ t(w, { accessibleLabel: a, color: l, imageUrl: d, link: g, name: a, role: p }),
|
|
30
|
+
e === "system" && o,
|
|
31
|
+
/* @__PURE__ */ r("div", { className: u(s.message, h && s.preview), "data-appearance": c, "data-id": v, "data-type": e, children: [
|
|
32
|
+
e == "system" && /* @__PURE__ */ t(N, { gap: "right", name: _ }),
|
|
33
|
+
f
|
|
34
34
|
] }),
|
|
35
|
-
|
|
36
|
-
e !== "system" &&
|
|
35
|
+
i && /* @__PURE__ */ t("div", { className: s.attachments, children: i }),
|
|
36
|
+
e !== "system" && o
|
|
37
37
|
] });
|
|
38
38
|
};
|
|
39
39
|
export {
|
|
@@ -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/index14.css');const r=require("react/jsx-runtime"),D=require("../../classix-5H4IWnMA.cjs"),n=require("react"),G=require("../editor/index.cjs"),I=require("../list/index.cjs"),J=require("../tooltip/index.cjs"),K=require("../message/index.cjs"),Q="_messages_pqp89_1",V="_fill_pqp89_20",j={messages:Q,fill:V},X=({fill:M=!1,files:u,handleUpload:y,inlineImages:c,maxEditorRows:Y=5,message:d="",messages:l,minEditorRows:b=1,onChange:H,onFilesChange:a,onInlineImagesChange:B,onSubmit:N,placeholder:O,sending:m,submitLabel:P="Send message",tooltipLabel:f})=>{var L;const v=n.useRef(null),o=n.useRef(!0),h=n.useRef(!1),[U,W]=n.useState([]),p=u??U,g=(L=l[l.length-1])==null?void 0:L.id,k=d.replace(/<[^>]*>/g,"").replace(/ /g," ").trim()==="";return n.useLayoutEffect(()=>{var R;const e=(R=v.current)==null?void 0:R.querySelector("[data-message-list]");if(!e||g===void 0)return;const z=e.scrollHeight-e.scrollTop-e.clientHeight<450,_=!h.current||z;o.current=_,h.current=!0;const A=window.setTimeout(()=>{o.current=!1},5e3),E=()=>{e.scrollTop=e.scrollHeight};_&&E();const T=t=>{o.current&&t.target instanceof HTMLImageElement&&E()},q=t=>{t.deltaY<0&&(o.current=!1)};let i;const x=t=>{var s;i=(s=t.touches[0])==null?void 0:s.clientY},w=t=>{var S;const s=(S=t.touches[0])==null?void 0:S.clientY;s!==void 0&&i!==void 0&&s>i&&(o.current=!1),i=s};return e.addEventListener("load",T,!0),e.addEventListener("wheel",q,{passive:!0}),e.addEventListener("touchstart",x,{passive:!0}),e.addEventListener("touchmove",w,{passive:!0}),()=>{window.clearTimeout(A),e.removeEventListener("load",T,!0),e.removeEventListener("wheel",q),e.removeEventListener("touchstart",x),e.removeEventListener("touchmove",w)}},[g]),r.jsxs("div",{className:D.t(j.messages,M&&j.fill),"data-component":"messages",ref:v,children:[r.jsx(I.List,{"data-message-list":!0,children:l.map(e=>r.jsx(K.Message,{...e},e.id))}),f&&r.jsx(J.Tooltip,{variant:"static",children:f}),r.jsx(G.Editor,{autofocus:!0,content:d,disabled:m||k&&p.length===0&&!(c!=null&&c.length),files:p,inlineImages:c,isSubmitting:m,maxRows:Y,minRows:b,onChange:H,onFilesChange:e=>{u===void 0&&W(e),a==null||a(e)},onInlineImagesChange:B,onSubmit:N,onUpload:y,placeholder:O,submitLabel:P})]})};exports.Messages=X;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -5,7 +5,7 @@ import { Editor as P } from "../editor/index.js";
|
|
|
5
5
|
import { List as Q } from "../list/index.js";
|
|
6
6
|
import { Tooltip as V } from "../tooltip/index.js";
|
|
7
7
|
import { Message as X } from "../message/index.js";
|
|
8
|
-
import '../../assets/
|
|
8
|
+
import '../../assets/index14.css';const Z = "_messages_pqp89_1", $ = "_fill_pqp89_20", q = {
|
|
9
9
|
messages: Z,
|
|
10
10
|
fill: $
|
|
11
11
|
}, ne = ({
|
|
@@ -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/index13.css');const l=require("react/jsx-runtime"),c=require("../../classix-5H4IWnMA.cjs"),b=require("react"),m=require("../../icons-Dv_p0bUF.cjs"),v="_nav_1h1i0_3",p="_label_1h1i0_9",g="_item_1h1i0_17",f="_actions_1h1i0_36",N="_highlighted_1h1i0_48",x="_horizontal_1h1i0_52",j="_sidebar_1h1i0_62",w="_tabs_1h1i0_101",q="_pills_1h1i0_121",t={nav:v,label:p,item:g,actions:f,highlighted:N,horizontal:x,sidebar:j,tabs:w,pills:q},y={default:t.default,pills:t.pills,sidebar:t.sidebar,tabs:t.tabs},z=({className:a,...e})=>l.jsx("span",{className:c.t(a,t.label),...e,"data-component":"navlabel"}),S=({actions:a,children:e,className:o,highlighted:n=!1,...s})=>l.jsxs("div",{className:c.t(t.item,n&&t.highlighted,o),"data-nav-item":!0,...s,"data-component":"navitem",children:[e,a&&l.jsx("span",{className:t.actions,children:a})]}),C=({animation:a,children:e,className:o,horizontal:n=!1,variant:s="default",...h})=>{const[d,r]=b.useState(!1),_={"--icon-svg":m.iconSVG("CaretDown")};return l.jsx("nav",{className:c.t(o,n&&t.horizontal,t.nav,y[s]),"data-animation":a,"data-open":d?"true":"false","data-orientation":n?"horizontal":"vertical",onBlurCapture:i=>{if(s!=="pills"||window.innerWidth>960)return;const u=i.relatedTarget;i.currentTarget.contains(u)||r(!1)},onClick:()=>{s!=="pills"||window.innerWidth>960||r(i=>!i)},style:_,...h,"data-component":"nav",children:e})};exports.Nav=C;exports.NavItem=S;exports.NavLabel=z;
|
|
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 { 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 sidebar: styles.sidebar,\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 type NavLabelProps = React.HTMLAttributes<HTMLSpanElement>;\n\nexport const NavLabel = ({ className, ...props }: NavLabelProps) => (\n <span\n className={cx(className, styles.label)}\n {...props}\n />\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('CaretDown'),\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\n setOpen((v) => !v);\n }}\n style={withVars}\n {...props}\n >\n {children}\n </nav>\n );\n};\n"],"names":["variants","default","styles","pills","sidebar","tabs","NavLabel","className","props","jsx","cx","label","
|
|
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 sidebar: styles.sidebar,\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 type NavLabelProps = React.HTMLAttributes<HTMLSpanElement>;\n\nexport type NavItemProps = React.HTMLAttributes<HTMLDivElement> & {\n actions?: React.ReactNode;\n highlighted?: boolean;\n};\n\nexport const NavLabel = ({ className, ...props }: NavLabelProps) => (\n <span\n className={cx(className, styles.label)}\n {...props}\n />\n);\n\nexport const NavItem = ({\n actions,\n children,\n className,\n highlighted = false,\n ...props\n}: NavItemProps) => (\n <div\n className={cx(styles.item, highlighted && styles.highlighted, className)}\n data-nav-item\n {...props}\n >\n {children}\n {actions && <span className={styles.actions}>{actions}</span>}\n </div>\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('CaretDown'),\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\n setOpen((v) => !v);\n }}\n style={withVars}\n {...props}\n >\n {children}\n </nav>\n );\n};\n"],"names":["variants","default","styles","pills","sidebar","tabs","NavLabel","className","props","jsx","cx","label","NavItem","actions","children","highlighted","item","Nav","animation","horizontal","variant","open","setOpen","useState","withVars","iconSVG","nav","e","window","innerWidth","next","relatedTarget","currentTarget","contains","v"],"mappings":"4eAOMA,EAAW,CACfC,QAASC,EAAOD,QAChBE,MAAOD,EAAOC,MACdC,QAASF,EAAOE,QAChBC,KAAMH,EAAOG,IACf,EAiBaC,EAAWA,CAAC,CAAEC,UAAAA,EAAW,GAAGC,CAAqB,IAC5DC,MAAC,OAAA,CACC,UAAWC,EAAAA,EAAGH,EAAWL,EAAOS,KAAK,EACrC,GAAIH,EAAM,iBAAA,UAAA,CAAA,EAIDI,EAAUA,CAAC,CACtBC,QAAAA,EACAC,SAAAA,EACAP,UAAAA,EACAQ,YAAAA,EAAc,GACd,GAAGP,CACS,WACX,MAAA,CACC,UAAWE,EAAAA,EAAGR,EAAOc,KAAMD,GAAeb,EAAOa,YAAaR,CAAS,EACvE,gBAAa,GACb,GAAIC,EAAM,iBAAA,UAETM,SAAAA,CAAAA,EACAD,GAAWJ,EAAAA,IAAC,OAAA,CAAK,UAAWP,EAAOW,QAAUA,SAAAA,CAAAA,CAAQ,CAAA,CAAA,CACxD,EAGWI,EAAMA,CAAC,CAClBC,UAAAA,EACAJ,SAAAA,EACAP,UAAAA,EACAY,WAAAA,EAAa,GACbC,QAAAA,EAAU,UACV,GAAGZ,CACK,IAAM,CACd,KAAM,CAACa,EAAMC,CAAO,EAAIC,EAAAA,SAAS,EAAK,EAKhCC,EAAqB,CACzB,aAAcC,EAAAA,QAAQ,WAAW,CAAA,EAGnC,OACEhB,EAAAA,IAAC,MAAA,CACC,UAAWC,EAAAA,EAAGH,EAAWY,GAAcjB,EAAOiB,WAAYjB,EAAOwB,IAAK1B,EAASoB,CAAO,CAAC,EACvF,iBAAgBF,EAChB,YAAWG,EAAO,OAAS,QAC3B,mBAAkBF,EAAa,aAAe,WAC9C,cAAgBQ,GAAM,CACpB,GAAIP,IAAY,SAAWQ,OAAOC,WAAa,IAAK,OAEpD,MAAMC,EAAOH,EAAEI,cACVJ,EAAEK,cAAcC,SAASH,CAAI,GAChCR,EAAQ,EAAK,CAEjB,EACA,QAAS,IAAM,CACTF,IAAY,SAAWQ,OAAOC,WAAa,KAE/CP,EAASY,GAAM,CAACA,CAAC,CACnB,EACA,MAAOV,EACP,GAAIhB,EAAM,iBAAA,MAETM,SAAAA,EACH,CAEJ"}
|
|
@@ -1,43 +1,56 @@
|
|
|
1
|
-
import { jsx as l } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as l, jsxs as p } from "react/jsx-runtime";
|
|
2
2
|
import { t as r } from "../../classix-DG18itHa.js";
|
|
3
|
-
import { useState as
|
|
4
|
-
import { i as
|
|
5
|
-
import '../../assets/
|
|
6
|
-
nav:
|
|
3
|
+
import { useState as b } from "react";
|
|
4
|
+
import { i as f } from "../../icons-dUP7sKyt.js";
|
|
5
|
+
import '../../assets/index13.css';const v = "_nav_1h1i0_3", u = "_label_1h1i0_9", g = "_item_1h1i0_17", N = "_actions_1h1i0_36", w = "_highlighted_1h1i0_48", x = "_horizontal_1h1i0_52", z = "_sidebar_1h1i0_62", C = "_tabs_1h1i0_101", j = "_pills_1h1i0_121", t = {
|
|
6
|
+
nav: v,
|
|
7
7
|
label: u,
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
pills:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
8
|
+
item: g,
|
|
9
|
+
actions: N,
|
|
10
|
+
highlighted: w,
|
|
11
|
+
horizontal: x,
|
|
12
|
+
sidebar: z,
|
|
13
|
+
tabs: C,
|
|
14
|
+
pills: j
|
|
15
|
+
}, y = {
|
|
16
|
+
default: t.default,
|
|
17
|
+
pills: t.pills,
|
|
18
|
+
sidebar: t.sidebar,
|
|
19
|
+
tabs: t.tabs
|
|
20
|
+
}, k = ({
|
|
21
|
+
className: a,
|
|
22
|
+
...i
|
|
23
|
+
}) => /* @__PURE__ */ l("span", { className: r(a, t.label), ...i, "data-component": "navlabel" }), B = ({
|
|
24
|
+
actions: a,
|
|
25
|
+
children: i,
|
|
26
|
+
className: o,
|
|
27
|
+
highlighted: s = !1,
|
|
28
|
+
...n
|
|
29
|
+
}) => /* @__PURE__ */ p("div", { className: r(t.item, s && t.highlighted, o), "data-nav-item": !0, ...n, "data-component": "navitem", children: [
|
|
30
|
+
i,
|
|
31
|
+
a && /* @__PURE__ */ l("span", { className: t.actions, children: a })
|
|
32
|
+
] }), D = ({
|
|
33
|
+
animation: a,
|
|
34
|
+
children: i,
|
|
35
|
+
className: o,
|
|
36
|
+
horizontal: s = !1,
|
|
37
|
+
variant: n = "default",
|
|
38
|
+
...h
|
|
27
39
|
}) => {
|
|
28
|
-
const [d,
|
|
29
|
-
"--icon-svg":
|
|
40
|
+
const [d, c] = b(!1), _ = {
|
|
41
|
+
"--icon-svg": f("CaretDown")
|
|
30
42
|
};
|
|
31
|
-
return /* @__PURE__ */ l("nav", { className: r(
|
|
32
|
-
if (
|
|
33
|
-
const
|
|
34
|
-
|
|
43
|
+
return /* @__PURE__ */ l("nav", { className: r(o, s && t.horizontal, t.nav, y[n]), "data-animation": a, "data-open": d ? "true" : "false", "data-orientation": s ? "horizontal" : "vertical", onBlurCapture: (e) => {
|
|
44
|
+
if (n !== "pills" || window.innerWidth > 960) return;
|
|
45
|
+
const m = e.relatedTarget;
|
|
46
|
+
e.currentTarget.contains(m) || c(!1);
|
|
35
47
|
}, onClick: () => {
|
|
36
|
-
|
|
37
|
-
}, style: _, ...
|
|
48
|
+
n !== "pills" || window.innerWidth > 960 || c((e) => !e);
|
|
49
|
+
}, style: _, ...h, "data-component": "nav", children: i });
|
|
38
50
|
};
|
|
39
51
|
export {
|
|
40
|
-
|
|
41
|
-
|
|
52
|
+
D as Nav,
|
|
53
|
+
B as NavItem,
|
|
54
|
+
k as NavLabel
|
|
42
55
|
};
|
|
43
56
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
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 sidebar: styles.sidebar,\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 type NavLabelProps = React.HTMLAttributes<HTMLSpanElement>;\n\nexport const NavLabel = ({ className, ...props }: NavLabelProps) => (\n <span\n className={cx(className, styles.label)}\n {...props}\n />\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('CaretDown'),\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\n setOpen((v) => !v);\n }}\n style={withVars}\n {...props}\n >\n {children}\n </nav>\n );\n};\n"],"names":["variants","default","styles","pills","sidebar","tabs","NavLabel","className","props","jsx","cx","label","
|
|
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 sidebar: styles.sidebar,\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 type NavLabelProps = React.HTMLAttributes<HTMLSpanElement>;\n\nexport type NavItemProps = React.HTMLAttributes<HTMLDivElement> & {\n actions?: React.ReactNode;\n highlighted?: boolean;\n};\n\nexport const NavLabel = ({ className, ...props }: NavLabelProps) => (\n <span\n className={cx(className, styles.label)}\n {...props}\n />\n);\n\nexport const NavItem = ({\n actions,\n children,\n className,\n highlighted = false,\n ...props\n}: NavItemProps) => (\n <div\n className={cx(styles.item, highlighted && styles.highlighted, className)}\n data-nav-item\n {...props}\n >\n {children}\n {actions && <span className={styles.actions}>{actions}</span>}\n </div>\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('CaretDown'),\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\n setOpen((v) => !v);\n }}\n style={withVars}\n {...props}\n >\n {children}\n </nav>\n );\n};\n"],"names":["variants","default","styles","pills","sidebar","tabs","NavLabel","className","props","jsx","cx","label","NavItem","actions","children","highlighted","item","Nav","animation","horizontal","variant","open","setOpen","useState","withVars","iconSVG","nav","e","window","innerWidth","next","relatedTarget","currentTarget","contains","v"],"mappings":";;;;;;;;;;;;;;GAOMA,IAAW;AAAA,EACfC,SAASC,EAAOD;AAAAA,EAChBE,OAAOD,EAAOC;AAAAA,EACdC,SAASF,EAAOE;AAAAA,EAChBC,MAAMH,EAAOG;AACf,GAiBaC,IAAWA,CAAC;AAAA,EAAEC,WAAAA;AAAAA,EAAW,GAAGC;AAAqB,MAC5D,gBAAAC,EAAC,QAAA,EACC,WAAWC,EAAGH,GAAWL,EAAOS,KAAK,GACrC,GAAIH,GAAM,kBAAA,WAAA,CAAA,GAIDI,IAAUA,CAAC;AAAA,EACtBC,SAAAA;AAAAA,EACAC,UAAAA;AAAAA,EACAP,WAAAA;AAAAA,EACAQ,aAAAA,IAAc;AAAA,EACd,GAAGP;AACS,wBACX,OAAA,EACC,WAAWE,EAAGR,EAAOc,MAAMD,KAAeb,EAAOa,aAAaR,CAAS,GACvE,iBAAa,IACb,GAAIC,GAAM,kBAAA,WAETM,UAAAA;AAAAA,EAAAA;AAAAA,EACAD,KAAW,gBAAAJ,EAAC,QAAA,EAAK,WAAWP,EAAOW,SAAUA,UAAAA,EAAAA,CAAQ;AAAA,EAAA,CACxD,GAGWI,IAAMA,CAAC;AAAA,EAClBC,WAAAA;AAAAA,EACAJ,UAAAA;AAAAA,EACAP,WAAAA;AAAAA,EACAY,YAAAA,IAAa;AAAA,EACbC,SAAAA,IAAU;AAAA,EACV,GAAGZ;AACK,MAAM;AACd,QAAM,CAACa,GAAMC,CAAO,IAAIC,EAAS,EAAK,GAKhCC,IAAqB;AAAA,IACzB,cAAcC,EAAQ,WAAW;AAAA,EAAA;AAGnC,SACE,gBAAAhB,EAAC,OAAA,EACC,WAAWC,EAAGH,GAAWY,KAAcjB,EAAOiB,YAAYjB,EAAOwB,KAAK1B,EAASoB,CAAO,CAAC,GACvF,kBAAgBF,GAChB,aAAWG,IAAO,SAAS,SAC3B,oBAAkBF,IAAa,eAAe,YAC9C,eAAgBQ,CAAAA,MAAM;AACpB,QAAIP,MAAY,WAAWQ,OAAOC,aAAa,IAAK;AAEpD,UAAMC,IAAOH,EAAEI;AACf,IAAKJ,EAAEK,cAAcC,SAASH,CAAI,KAChCR,EAAQ,EAAK;AAAA,EAEjB,GACA,SAAS,MAAM;AACb,IAAIF,MAAY,WAAWQ,OAAOC,aAAa,OAE/CP,EAASY,CAAAA,MAAM,CAACA,CAAC;AAAA,EACnB,GACA,OAAOV,GACP,GAAIhB,GAAM,kBAAA,OAETM,UAAAA,GACH;AAEJ;"}
|
|
@@ -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/index12.css');const e=require("react/jsx-runtime"),n="_object_xxgm1_1",s={object:n},a=({accessibleLabel:c,url:t,...o})=>e.jsx("object",{"aria-label":c,className:s.object,data:t,type:"application/pdf",...o,"data-component":"objectcomponent",children:t&&e.jsxs(e.Fragment,{children:["We cannot show this file. You can try accessing it directly:",e.jsx("br",{}),e.jsx("a",{href:t,children:t})]})});exports.Object=a;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index11.css');const n=require("react/jsx-runtime"),c=require("../../classix-5H4IWnMA.cjs"),u="_layout_1clzr_1",y="_loading_1clzr_26",a={layout:u,"with-sidebar":"_with-sidebar_1clzr_10","fill-viewport":"_fill-viewport_1clzr_20",loading:y},_=({"aria-busy":o,children:e,className:i,fillViewport:s=!1,loading:t=!1,sidebar:l,...r})=>n.jsxs("main",{"aria-busy":o??(t||void 0),className:c.t(a.layout,!!l&&a["with-sidebar"],s&&a["fill-viewport"],t&&a.loading,i),...r,"data-component":"pagelayout",children:[l,e]});exports.PageLayout=_;
|
|
2
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/components/page-layout/index.tsx"],"sourcesContent":["import cx from 'classix';\n\nimport styles from './styles.module.css';\n\nexport type PageLayoutProps = React.ComponentPropsWithoutRef<'main'> & {\n fillViewport?: boolean;\n loading?: boolean;\n sidebar?: React.ReactNode;\n};\n\nexport const PageLayout = ({\n 'aria-busy': ariaBusy,\n children,\n className,\n fillViewport = false,\n loading = false,\n sidebar,\n ...props\n}: PageLayoutProps) => (\n <main\n aria-busy={ariaBusy ?? (loading || undefined)}\n className={cx(\n styles.layout,\n Boolean(sidebar) && styles['with-sidebar'],\n fillViewport && styles['fill-viewport'],\n loading && styles.loading,\n className\n )}\n {...props}\n >\n {sidebar}\n {children}\n </main>\n);\n"],"names":["PageLayout","ariaBusy","children","className","fillViewport","loading","sidebar","props","jsxs","undefined","cx","styles","layout","Boolean"],"mappings":"gTAUaA,EAAaA,CAAC,CACzB,YAAaC,EACbC,SAAAA,EACAC,UAAAA,EACAC,aAAAA,EAAe,GACfC,QAAAA,EAAU,GACVC,QAAAA,EACA,GAAGC,CACY,IACfC,EAAAA,KAAC,OAAA,CACC,YAAWP,IAAaI,GAAWI,QACnC,UAAWC,EAAAA,EACTC,EAAOC,OACPC,EAAQP,GAAYK,EAAO,cAAc,EACzCP,GAAgBO,EAAO,eAAe,EACtCN,GAAWM,EAAON,QAClBF,CACF,EACA,GAAII,EAAM,iBAAA,aAETD,SAAAA,CAAAA,EACAJ,CAAAA,CAAAA,CACH"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsxs as n } from "react/jsx-runtime";
|
|
2
|
+
import { t as _ } from "../../classix-DG18itHa.js";
|
|
3
|
+
import '../../assets/index11.css';const c = "_layout_1clzr_1", y = "_loading_1clzr_26", o = {
|
|
4
|
+
layout: c,
|
|
5
|
+
"with-sidebar": "_with-sidebar_1clzr_10",
|
|
6
|
+
"fill-viewport": "_fill-viewport_1clzr_20",
|
|
7
|
+
loading: y
|
|
8
|
+
}, u = ({
|
|
9
|
+
"aria-busy": t,
|
|
10
|
+
children: i,
|
|
11
|
+
className: r,
|
|
12
|
+
fillViewport: s = !1,
|
|
13
|
+
loading: a = !1,
|
|
14
|
+
sidebar: l,
|
|
15
|
+
...e
|
|
16
|
+
}) => /* @__PURE__ */ n("main", { "aria-busy": t ?? (a || void 0), className: _(o.layout, !!l && o["with-sidebar"], s && o["fill-viewport"], a && o.loading, r), ...e, "data-component": "pagelayout", children: [
|
|
17
|
+
l,
|
|
18
|
+
i
|
|
19
|
+
] });
|
|
20
|
+
export {
|
|
21
|
+
u as PageLayout
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/page-layout/index.tsx"],"sourcesContent":["import cx from 'classix';\n\nimport styles from './styles.module.css';\n\nexport type PageLayoutProps = React.ComponentPropsWithoutRef<'main'> & {\n fillViewport?: boolean;\n loading?: boolean;\n sidebar?: React.ReactNode;\n};\n\nexport const PageLayout = ({\n 'aria-busy': ariaBusy,\n children,\n className,\n fillViewport = false,\n loading = false,\n sidebar,\n ...props\n}: PageLayoutProps) => (\n <main\n aria-busy={ariaBusy ?? (loading || undefined)}\n className={cx(\n styles.layout,\n Boolean(sidebar) && styles['with-sidebar'],\n fillViewport && styles['fill-viewport'],\n loading && styles.loading,\n className\n )}\n {...props}\n >\n {sidebar}\n {children}\n </main>\n);\n"],"names":["PageLayout","ariaBusy","children","className","fillViewport","loading","sidebar","props","jsxs","undefined","cx","styles","layout","Boolean"],"mappings":";;;;;;;GAUaA,IAAaA,CAAC;AAAA,EACzB,aAAaC;AAAAA,EACbC,UAAAA;AAAAA,EACAC,WAAAA;AAAAA,EACAC,cAAAA,IAAe;AAAA,EACfC,SAAAA,IAAU;AAAA,EACVC,SAAAA;AAAAA,EACA,GAAGC;AACY,MACf,gBAAAC,EAAC,QAAA,EACC,aAAWP,MAAaI,KAAWI,SACnC,WAAWC,EACTC,EAAOC,QACPC,EAAQP,KAAYK,EAAO,cAAc,GACzCP,KAAgBO,EAAO,eAAe,GACtCN,KAAWM,EAAON,SAClBF,CACF,GACA,GAAII,GAAM,kBAAA,cAETD,UAAAA;AAAAA,EAAAA;AAAAA,EACAJ;AAAAA,EAAAA,CACH;"}
|
|
@@ -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/index52.css');const m=require("react/jsx-runtime"),k=require("../../classix-5H4IWnMA.cjs"),o=require("react"),S=require("react-dom"),K=require("../button/index.cjs"),O="_popover_14bo5_1",I="_inline_14bo5_6",N="_below_14bo5_47",H="_above_14bo5_52",W="_left_14bo5_62",M="_right_14bo5_67",U="_trigger_14bo5_72",r={popover:O,inline:I,"popover-panel":"_popover-panel_14bo5_26",below:N,above:H,"inline-panel":"_inline-panel_14bo5_57",left:W,right:M,trigger:U,"inline-trigger":"_inline-trigger_14bo5_76"},X=({children:v,inline:s=!1,triggerAccessibleLabel:C,triggerAriaHasPopup:T,triggerButtonContent:z})=>{var B;const h=o.useRef(null),y=o.useRef(void 0),b=o.useRef(null),P=o.useId(),p=o.useRef(null),[t,R]=o.useState(!1),[f,D]=o.useState(!1),[d,x]=o.useState("right"),_=({initialFocus:e}={})=>{y.current=e,D(!1),x("right"),R(!0)},l=o.useCallback(({restoreFocus:e=!0}={})=>{var i;R(!1),e&&((i=p.current)==null||i.focus())},[]),L=e=>{t&&e.key==="Escape"&&l()},j=e=>{if(!t){if(e.key==="ArrowDown"){e.preventDefault(),_({initialFocus:"first"});return}e.key==="ArrowUp"&&(e.preventDefault(),_({initialFocus:"last"}))}};o.useEffect(()=>{if(!t)return;const e=i=>{var n,g;const u=i.target;(n=h.current)!=null&&n.contains(u)||(g=b.current)!=null&&g.contains(u)||l({restoreFocus:!1})};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[l,t]);const a=o.useCallback(()=>{const e=b.current,i=p.current;if(!e||!i)return;const u=e.getBoundingClientRect(),n=i.getBoundingClientRect(),g=n.top,E=window.innerHeight-n.bottom;D(u.height>E&&g>E),x(u.width>window.innerWidth-n.left&&n.right>window.innerWidth-n.left?"left":"right")},[]);o.useLayoutEffect(()=>{if(t)return a(),window.addEventListener("resize",a),window.addEventListener("scroll",a,!0),()=>{window.removeEventListener("resize",a),window.removeEventListener("scroll",a,!0)}},[t,a]);const F=e=>{e.preventDefault(),e.stopPropagation(),t?l({restoreFocus:!1}):_()},q={"aria-controls":t?P:void 0,"aria-expanded":t,"aria-haspopup":T,"aria-label":C,className:s?r["inline-trigger"]:r.trigger,onClick:F,onKeyDown:j},c=s?(B=p.current)==null?void 0:B.getBoundingClientRect():void 0,A=[d==="left"?"translateX(-100%)":"",f?"translateY(calc(-100% - var(--shape-spacing-2xs)))":""].filter(Boolean).join(" "),w=t?m.jsx("div",{className:k.t(r["popover-panel"],r[f?"above":"below"],s&&r["inline-panel"],!s&&r[d]),"data-horizontal-placement":d,"data-placement":f?"above":"below",id:P,ref:b,style:c?{left:d==="left"?c.right:c.left,position:"fixed",top:f?c.top:c.bottom,transform:A||void 0}:void 0,children:typeof v=="function"?v({close:l,initialFocus:y.current,isOpen:t}):v}):null;return m.jsxs("div",{className:k.t(r.popover,s&&r.inline),"data-open":t,onKeyDown:L,onClick:e=>{e.preventDefault(),e.stopPropagation()},ref:h,"data-component":"popover",children:[m.jsx(K.Button,{...q,ref:p,variant:"simple",children:z}),s&&w&&typeof document<"u"?S.createPortal(w,document.body):w]})};exports.Popover=X;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -3,7 +3,7 @@ import { t as C } from "../../classix-DG18itHa.js";
|
|
|
3
3
|
import { useRef as g, useId as H, useState as b, useCallback as L, useEffect as W, useLayoutEffect as S } from "react";
|
|
4
4
|
import { createPortal as U } from "react-dom";
|
|
5
5
|
import { Button as X } from "../button/index.js";
|
|
6
|
-
import '../../assets/
|
|
6
|
+
import '../../assets/index52.css';const Y = "_popover_14bo5_1", q = "_inline_14bo5_6", G = "_below_14bo5_47", J = "_above_14bo5_52", M = "_left_14bo5_62", Q = "_right_14bo5_67", V = "_trigger_14bo5_72", n = {
|
|
7
7
|
popover: Y,
|
|
8
8
|
inline: q,
|
|
9
9
|
"popover-panel": "_popover-panel_14bo5_26",
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index10.css');const e=require("react/jsx-runtime"),i=require("../../classix-5H4IWnMA.cjs"),c=require("../button/index.cjs"),a=require("../icon/index.cjs"),l=require("../aside/index.cjs"),_=require("../branding/index.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index10.css');const e=require("react/jsx-runtime"),i=require("../../classix-5H4IWnMA.cjs"),c=require("../button/index.cjs"),a=require("../icon/index.cjs"),l=require("../aside/index.cjs"),_=require("../branding/index.cjs"),d=require("../figure/index.cjs"),u=require("../nav/index.cjs"),p="_portal_korl3_41",g="_content_korl3_260",m="_toggle_korl3_267",x="_open_korl3_320",n={portal:p,content:g,toggle:m,open:x},j=({children:o,portals:t,open:r,setOpen:s})=>e.jsxs(l.Aside,{className:i.t(n.portal,r&&n.open),sticky:!0,"data-component":"portal",children:[e.jsx(c.Button,{className:n.toggle,onClick:()=>s(!r),variant:"tertiary",children:e.jsx(a.Icon,{name:"SidebarSimple"})}),e.jsx(d.Figure,{children:e.jsx(_.Branding,{name:"logo",size:48,variant:"white"})}),e.jsxs("div",{className:n.content,children:[t&&e.jsx(u.Nav,{horizontal:!0,children:t}),o&&o]})]});exports.Portal=j;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { jsxs as i, jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { t as
|
|
3
|
-
import { Button as
|
|
4
|
-
import { Icon as
|
|
2
|
+
import { t as a } from "../../classix-DG18itHa.js";
|
|
3
|
+
import { Button as m } from "../button/index.js";
|
|
4
|
+
import { Icon as c } from "../icon/index.js";
|
|
5
5
|
import { Aside as s } from "../aside/index.js";
|
|
6
6
|
import { Branding as p } from "../branding/index.js";
|
|
7
7
|
import { Figure as _ } from "../figure/index.js";
|
|
8
8
|
import { Nav as g } from "../nav/index.js";
|
|
9
|
-
import '../../assets/index10.css';const d = "
|
|
9
|
+
import '../../assets/index10.css';const d = "_portal_korl3_41", f = "_content_korl3_260", h = "_toggle_korl3_267", k = "_open_korl3_320", t = {
|
|
10
10
|
portal: d,
|
|
11
11
|
content: f,
|
|
12
|
-
toggle:
|
|
13
|
-
open:
|
|
14
|
-
},
|
|
12
|
+
toggle: h,
|
|
13
|
+
open: k
|
|
14
|
+
}, S = ({
|
|
15
15
|
children: r,
|
|
16
16
|
portals: n,
|
|
17
17
|
open: e,
|
|
18
|
-
setOpen:
|
|
19
|
-
}) => /* @__PURE__ */ i(s, { className:
|
|
20
|
-
/* @__PURE__ */ o(
|
|
18
|
+
setOpen: l
|
|
19
|
+
}) => /* @__PURE__ */ i(s, { className: a(t.portal, e && t.open), sticky: !0, "data-component": "portal", children: [
|
|
20
|
+
/* @__PURE__ */ o(m, { className: t.toggle, onClick: () => l(!e), variant: "tertiary", children: /* @__PURE__ */ o(c, { name: "SidebarSimple" }) }),
|
|
21
21
|
/* @__PURE__ */ o(_, { children: /* @__PURE__ */ o(p, { name: "logo", size: 48, variant: "white" }) }),
|
|
22
22
|
/* @__PURE__ */ i("div", { className: t.content, children: [
|
|
23
23
|
n && /* @__PURE__ */ o(g, { horizontal: !0, children: n }),
|
|
@@ -25,6 +25,6 @@ import '../../assets/index10.css';const d = "_portal_1uwzy_41", f = "_content_1u
|
|
|
25
25
|
] })
|
|
26
26
|
] });
|
|
27
27
|
export {
|
|
28
|
-
|
|
28
|
+
S as Portal
|
|
29
29
|
};
|
|
30
30
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index9.css');const a=require("react/jsx-runtime"),b=require("react"),h=require("../button/index.cjs"),I=require("../checkbox/index.cjs"),T=require("../chip/index.cjs"),H=require("../collapsible/index.cjs"),P=require("../controls/index.cjs"),z=require("../dialog/index.cjs"),A=require("../header/index.cjs"),E=require("../../index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index9.css');const a=require("react/jsx-runtime"),b=require("react"),h=require("../button/index.cjs"),I=require("../checkbox/index.cjs"),T=require("../chip/index.cjs"),H=require("../collapsible/index.cjs"),P=require("../controls/index.cjs"),z=require("../dialog/index.cjs"),A=require("../header/index.cjs"),E=require("../../index-CQlMdqOp.cjs"),J="_search_1rde5_3",K="_controls_1rde5_15",Q="_chips_1rde5_35",S="_radio_1rde5_101",l={search:J,controls:K,chips:Q,"filter-dialog":"_filter-dialog_1rde5_42","filter-groups":"_filter-groups_1rde5_47","filter-group":"_filter-group_1rde5_47","filter-option":"_filter-option_1rde5_83","option-copy":"_option-copy_1rde5_89",radio:S,"collapsible-options":"_collapsible-options_1rde5_128"},U=({filterButtonLabel:x="Filters",filterDialogColumns:k=1,filterDialogTitle:q="Filters",filterGroups:d=[],onChange:M,onSelectedFiltersChange:i,removeFilterLabel:$=c=>`Remove ${c.label} filter`,resetLabel:j="Reset",searchLabel:O="Search",searchPlaceholder:w="Search",selectedFilters:t=[],showResultsLabel:B="Show results",value:D=""})=>{const c=b.useId(),[v,r]=b.useState(!1),R=b.useMemo(()=>new Map(d.flatMap(e=>{var n;return[...e.options,...((n=e.collapsible)==null?void 0:n.options)??[]]}).map(e=>[e.value,e])),[d]),p=t.flatMap(e=>{const n=R.get(e);return n?[n]:[]}),_=(e,n,s)=>{var f;if(!i)return;const m=new Set([...(s==null?void 0:s.options.map(o=>o.value))??[],...((f=s==null?void 0:s.collapsible)==null?void 0:f.options.map(o=>o.value))??[]]),N=t.filter(o=>!m.has(o));if(n&&(s==null?void 0:s.defaultValue)===e){i(N);return}i(n?(s==null?void 0:s.control)==="radio"||(s==null?void 0:s.selectionMode)==="single"?[...N,e]:[...new Set([...t,e])]:t.filter(o=>o!==e))},u=(e,n)=>{var s;return t.includes(e)||n.defaultValue===e&&![...n.options,...((s=n.collapsible)==null?void 0:s.options)??[]].some(m=>t.includes(m.value))},y=(e,n)=>a.jsx("div",{className:l["filter-option"],"data-component":"renderfilter",children:n.control==="radio"?a.jsxs("label",{className:l.radio,children:[a.jsx("input",{checked:u(e.value,n),name:`${c}-filter-${n.label??"group"}`,onChange:s=>_(e.value,s.target.checked,n),type:"radio"}),a.jsxs("span",{className:l["option-copy"],children:[e.label,e.description&&a.jsx("sub",{children:e.description})]})]}):a.jsx(I.Checkbox,{checked:u(e.value,n),label:a.jsxs("span",{className:l["option-copy"],children:[e.label,e.description&&a.jsx("sub",{children:e.description})]}),onChange:s=>_(e.value,s.target.checked,n)})},e.value);return a.jsxs("div",{className:l.search,"data-component":"search",children:[a.jsxs("div",{className:l.controls,children:[a.jsx(E.Input,{"aria-label":O,icon:"MagnifyingGlass",onChange:e=>M(e.target.value),placeholder:w,type:"search",value:D}),d.length>0&&a.jsx(h.Button,{"aria-expanded":v,"aria-haspopup":"dialog",badge:p.length,icon:"Funnel",onClick:()=>r(!0),variant:"tertiary",children:x})]}),p.length>0&&a.jsxs("div",{"aria-label":x,className:l.chips,children:[p.map(e=>a.jsx(T.Chip,{accessibleLabel:$(e),label:e.label,onDelete:()=>_(e.value,!1)},e.value)),a.jsx(h.Button,{onClick:()=>i==null?void 0:i([]),variant:"tertiary",children:j})]}),v&&a.jsx(z.Dialog,{"aria-labelledby":c,className:l["filter-dialog"],controls:a.jsxs(P.Controls,{children:[a.jsx(h.Button,{onClick:()=>{i==null||i([]),r(!1)},children:j}),a.jsx(h.Button,{onClick:()=>r(!1),variant:"primary",children:B})]}),header:a.jsx(A.Header,{children:a.jsx("h2",{id:c,children:q})}),open:!0,setOpen:r,children:a.jsx("div",{className:l["filter-groups"],"data-columns":k,children:d.map((e,n)=>a.jsxs("section",{"aria-labelledby":e.label?`${c}-${n}`:void 0,className:l["filter-group"],"data-column-span":e.columnSpan??1,role:e.control==="radio"?"radiogroup":"group",children:[e.label&&a.jsx("h3",{id:`${c}-${n}`,children:e.label}),e.options.map(s=>y(s,e)),e.collapsible&&a.jsx(H.Collapsible,{summary:e.collapsible.label,children:a.jsx("div",{className:l["collapsible-options"],children:e.collapsible.options.map(s=>y(s,e))})})]},e.label??n))})})]})};exports.Search=U;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -7,7 +7,7 @@ import { Collapsible as E } from "../collapsible/index.js";
|
|
|
7
7
|
import { Controls as J } from "../controls/index.js";
|
|
8
8
|
import { Dialog as K } from "../dialog/index.js";
|
|
9
9
|
import { Header as P } from "../header/index.js";
|
|
10
|
-
import { I as Q } from "../../index-
|
|
10
|
+
import { I as Q } from "../../index-CbJ2-IPc.js";
|
|
11
11
|
import '../../assets/index9.css';const U = "_search_1rde5_3", V = "_controls_1rde5_15", W = "_chips_1rde5_35", X = "_radio_1rde5_101", o = {
|
|
12
12
|
search: U,
|
|
13
13
|
controls: V,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react/jsx-runtime");require("../../classix-5H4IWnMA.cjs");require("../../icons-Dv_p0bUF.cjs");const e=require("../../index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react/jsx-runtime");require("../../classix-5H4IWnMA.cjs");require("../../icons-Dv_p0bUF.cjs");const e=require("../../index-Bt7vnwji.cjs");require("../../use-touched-Bq5Gjbpz.cjs");exports.Select=e.Select;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "../../classix-DG18itHa.js";
|
|
3
3
|
import "../../icons-dUP7sKyt.js";
|
|
4
|
-
import { S as e } from "../../index-
|
|
4
|
+
import { S as e } from "../../index-BLb3JiCr.js";
|
|
5
5
|
import "../../use-touched-B999bBr8.js";
|
|
6
6
|
export {
|
|
7
7
|
e as Select
|
|
@@ -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/index54.css');const a=require("react/jsx-runtime"),l=require("../../classix-5H4IWnMA.cjs"),s="_toolbar_vp38k_1",n="_editor_vp38k_34",o={toolbar:s,default:"_default_vp38k_28",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
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import { t as e } from "../../classix-DG18itHa.js";
|
|
3
|
-
import '../../assets/
|
|
3
|
+
import '../../assets/index54.css';const s = "_toolbar_vp38k_1", n = "_editor_vp38k_34", o = {
|
|
4
4
|
toolbar: s,
|
|
5
5
|
default: "_default_vp38k_28",
|
|
6
6
|
editor: n
|
|
@@ -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/index15.css');const s=require("react/jsx-runtime"),c=require("../../classix-5H4IWnMA.cjs"),a=require("../icon/index.cjs"),t={static:"_static_r8l1k_1"},r={default:t.default,static:t.static},l=({variant:o="default",children:i,iconName:e,...n})=>s.jsxs("div",{className:c.t(t.tooltip,r[o]),...n,"data-component":"tooltip",children:[e&&s.jsx(a.Icon,{gap:"right",name:e}),i]});exports.Tooltip=l;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as r, jsx as c } from "react/jsx-runtime";
|
|
2
2
|
import { t as l } from "../../classix-DG18itHa.js";
|
|
3
3
|
import { Icon as e } from "../icon/index.js";
|
|
4
|
-
import '../../assets/
|
|
4
|
+
import '../../assets/index15.css';const t = {
|
|
5
5
|
static: "_static_r8l1k_1"
|
|
6
6
|
}, n = {
|
|
7
7
|
default: t.default,
|
|
@@ -2,7 +2,7 @@ import { jsxs as m, jsx as p } from "react/jsx-runtime";
|
|
|
2
2
|
import { t as v } from "./classix-DG18itHa.js";
|
|
3
3
|
import { i as w } from "./icons-dUP7sKyt.js";
|
|
4
4
|
import { u as C, c as S } from "./use-touched-B999bBr8.js";
|
|
5
|
-
import './assets/
|
|
5
|
+
import './assets/index53.css';const P = /* @__PURE__ */ new Set(["aria-activedescendant", "aria-autocomplete", "aria-busy", "aria-controls", "aria-describedby", "aria-details", "aria-disabled", "aria-errormessage", "aria-expanded", "aria-haspopup", "aria-hidden", "aria-invalid", "aria-keyshortcuts", "aria-label", "aria-labelledby", "aria-live", "aria-owns", "aria-required", "aria-roledescription", "autoComplete", "autoFocus", "className", "defaultValue", "dir", "disabled", "form", "id", "multiple", "name", "onBlur", "onChange", "onClick", "onFocus", "onInput", "onInvalid", "onKeyDown", "onKeyUp", "onMouseDown", "onMouseUp", "onPointerDown", "onPointerUp", "required", "role", "size", "style", "tabIndex", "title", "value"]);
|
|
6
6
|
function _(n) {
|
|
7
7
|
return Object.fromEntries(Object.entries(n).filter(([e]) => e.startsWith("data-") || e.startsWith("aria-") || P.has(e)));
|
|
8
8
|
}
|
|
@@ -71,4 +71,4 @@ export {
|
|
|
71
71
|
N as r,
|
|
72
72
|
_ as s
|
|
73
73
|
};
|
|
74
|
-
//# sourceMappingURL=index-
|
|
74
|
+
//# sourceMappingURL=index-BLb3JiCr.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-BLb3JiCr.js","sources":["../src/components/select/sanitize-select-props.ts","../src/utils/color.ts","../src/components/select/index.tsx"],"sourcesContent":["const selectKeys = new Set([\n 'aria-activedescendant',\n 'aria-autocomplete',\n 'aria-busy',\n 'aria-controls',\n 'aria-describedby',\n 'aria-details',\n 'aria-disabled',\n 'aria-errormessage',\n 'aria-expanded',\n 'aria-haspopup',\n 'aria-hidden',\n 'aria-invalid',\n 'aria-keyshortcuts',\n 'aria-label',\n 'aria-labelledby',\n 'aria-live',\n 'aria-owns',\n 'aria-required',\n 'aria-roledescription',\n 'autoComplete',\n 'autoFocus',\n 'className',\n 'defaultValue',\n 'dir',\n 'disabled',\n 'form',\n 'id',\n 'multiple',\n 'name',\n 'onBlur',\n 'onChange',\n 'onClick',\n 'onFocus',\n 'onInput',\n 'onInvalid',\n 'onKeyDown',\n 'onKeyUp',\n 'onMouseDown',\n 'onMouseUp',\n 'onPointerDown',\n 'onPointerUp',\n 'required',\n 'role',\n 'size',\n 'style',\n 'tabIndex',\n 'title',\n 'value',\n]);\n\nexport function sanitizeSelectProps<T extends Record<string, unknown>>(props: T) {\n return Object.fromEntries(\n Object.entries(props).filter(\n ([key]) => key.startsWith('data-') || key.startsWith('aria-') || selectKeys.has(key)\n )\n ) as Partial<T>;\n}\n","const cssVariablePattern = /^--[\\w-]+$/;\nconst cssVariableReferencePattern = /^var\\(\\s*(--[\\w-]+)\\s*(?:,\\s*(.+))?\\)$/;\n\nconst unresolvedColorKeywords = new Set([\n 'currentcolor',\n 'inherit',\n 'initial',\n 'revert',\n 'revert-layer',\n 'unset',\n]);\n\nconst probe = typeof document !== 'undefined' ? document.createElement('span') : null;\n\nfunction normalizeColorValue(input: string): string {\n const value = input.trim();\n\n if (!value || !probe || unresolvedColorKeywords.has(value.toLowerCase())) {\n return value;\n }\n\n const mountNode = document.body ?? document.documentElement;\n\n if (!mountNode) {\n return value;\n }\n\n probe.style.color = value;\n\n if (!probe.style.color) {\n return value;\n }\n\n mountNode.appendChild(probe);\n\n const normalized = getComputedStyle(probe).color.trim();\n probe.remove();\n\n return normalized || value;\n}\n\nexport function resolveColor(input: `--${string}` | string, fallback = 'currentColor'): string {\n if (typeof document === 'undefined') {\n return fallback;\n }\n\n const styles = getComputedStyle(document.documentElement);\n const seen = new Set<string>();\n let current = input.trim();\n\n while (current) {\n const match = current.match(cssVariableReferencePattern);\n const variableName = match?.[1] ?? (cssVariablePattern.test(current) ? current : null);\n const nestedFallback = match?.[2]?.trim();\n\n if (!variableName) {\n return normalizeColorValue(current);\n }\n\n if (seen.has(variableName)) {\n current = nestedFallback ?? '';\n continue;\n }\n\n seen.add(variableName);\n\n current = styles.getPropertyValue(variableName).trim() || nestedFallback || '';\n }\n\n return normalizeColorValue(fallback);\n}\n","import cx from 'classix';\n\nimport { iconSVG } from '@/components/icon/icons.ts';\nimport { resolveColor } from '@/utils/color';\nimport { composeEventHandlers } from '@/utils/compose-event-handlers';\nimport { useTouched } from '@/utils/use-touched';\n\nimport { sanitizeSelectProps } from './sanitize-select-props';\nimport styles from './styles.module.css';\n\nexport type SelectProps = React.SelectHTMLAttributes<HTMLSelectElement> & {\n children: React.ReactNode;\n label?: string;\n placeholder?: string;\n};\n\ntype withVars = React.CSSProperties & {\n '--icon-svg'?: string;\n};\n\nexport const Select = ({ children, label, placeholder, ...props }: SelectProps) => {\n const { touched, onBlur } = useTouched(props.value === '');\n const selectProps = sanitizeSelectProps(props);\n const { className, onBlur: onBlurProp, style, ...restSelectProps } = selectProps;\n const withVars = {\n ...style,\n '--icon-svg': iconSVG('CaretDown', resolveColor('--colors-semantic-content-secondary')),\n } satisfies withVars;\n\n const selectElement = (\n <select\n className={cx(styles.select, className, touched && styles.touched)}\n onBlur={composeEventHandlers(onBlur, onBlurProp)}\n style={withVars}\n {...restSelectProps}\n >\n {placeholder && (\n <option\n key='placeholder'\n value={''}\n hidden\n >\n {placeholder}\n </option>\n )}\n {children}\n </select>\n );\n\n if (!label) {\n return selectElement;\n }\n\n return (\n <label>\n <span\n className={styles.label}\n data-required={props.required || undefined}\n >\n {label}\n </span>\n {selectElement}\n </label>\n );\n};\n"],"names":["selectKeys","Set","sanitizeSelectProps","props","Object","fromEntries","entries","filter","key","startsWith","has","cssVariablePattern","cssVariableReferencePattern","unresolvedColorKeywords","probe","document","createElement","normalizeColorValue","input","value","trim","toLowerCase","mountNode","body","documentElement","style","color","appendChild","normalized","getComputedStyle","remove","resolveColor","fallback","styles","seen","current","match","variableName","test","nestedFallback","add","getPropertyValue","Select","children","label","placeholder","touched","onBlur","useTouched","selectProps","className","onBlurProp","restSelectProps","withVars","iconSVG","selectElement","cx","select","composeEventHandlers","jsxs","jsx","required","undefined"],"mappings":";;;;AAAA,MAAMA,IAAa,oBAAIC,IAAI,CACzB,yBACA,qBACA,aACA,iBACA,oBACA,gBACA,iBACA,qBACA,iBACA,iBACA,eACA,gBACA,qBACA,cACA,mBACA,aACA,aACA,iBACA,wBACA,gBACA,aACA,aACA,gBACA,OACA,YACA,QACA,MACA,YACA,QACA,UACA,YACA,WACA,WACA,WACA,aACA,aACA,WACA,eACA,aACA,iBACA,eACA,YACA,QACA,QACA,SACA,YACA,SACA,OAAO,CACR;AAEM,SAASC,EAAuDC,GAAU;AAC/E,SAAOC,OAAOC,YACZD,OAAOE,QAAQH,CAAK,EAAEI,OACpB,CAAC,CAACC,CAAG,MAAMA,EAAIC,WAAW,OAAO,KAAKD,EAAIC,WAAW,OAAO,KAAKT,EAAWU,IAAIF,CAAG,CACrF,CACF;AACF;ACzDA,MAAMG,IAAqB,cACrBC,IAA8B,0CAE9BC,IAA0B,oBAAIZ,IAAI,CACtC,gBACA,WACA,WACA,UACA,gBACA,OAAO,CACR,GAEKa,IAAQ,OAAOC,WAAa,MAAcA,SAASC,cAAc,MAAM,IAAI;AAEjF,SAASC,EAAoBC,GAAuB;AAClD,QAAMC,IAAQD,EAAME,KAAAA;AAEpB,MAAI,CAACD,KAAS,CAACL,KAASD,EAAwBH,IAAIS,EAAME,YAAAA,CAAa;AACrE,WAAOF;AAGT,QAAMG,IAAYP,SAASQ,QAAQR,SAASS;AAQ5C,MANI,CAACF,MAILR,EAAMW,MAAMC,QAAQP,GAEhB,CAACL,EAAMW,MAAMC;AACf,WAAOP;AAGTG,EAAAA,EAAUK,YAAYb,CAAK;AAE3B,QAAMc,IAAaC,iBAAiBf,CAAK,EAAEY,MAAMN,KAAAA;AACjDN,SAAAA,EAAMgB,OAAAA,GAECF,KAAcT;AACvB;AAEO,SAASY,EAAab,GAA+Bc,IAAW,gBAAwB;;AAC7F,MAAI,OAAOjB,WAAa;AACtB,WAAOiB;AAGT,QAAMC,IAASJ,iBAAiBd,SAASS,eAAe,GAClDU,wBAAWjC,IAAAA;AACjB,MAAIkC,IAAUjB,EAAME,KAAAA;AAEpB,SAAOe,KAAS;AACd,UAAMC,IAAQD,EAAQC,MAAMxB,CAA2B,GACjDyB,KAAeD,KAAAA,gBAAAA,EAAQ,QAAOzB,EAAmB2B,KAAKH,CAAO,IAAIA,IAAU,OAC3EI,KAAiBH,IAAAA,KAAAA,gBAAAA,EAAQ,OAARA,gBAAAA,EAAYhB;AAEnC,QAAI,CAACiB;AACH,aAAOpB,EAAoBkB,CAAO;AAGpC,QAAID,EAAKxB,IAAI2B,CAAY,GAAG;AAC1BF,MAAAA,IAAUI,KAAkB;AAC5B;AAAA,IACF;AAEAL,IAAAA,EAAKM,IAAIH,CAAY,GAErBF,IAAUF,EAAOQ,iBAAiBJ,CAAY,EAAEjB,KAAAA,KAAUmB,KAAkB;AAAA,EAC9E;AAEA,SAAOtB,EAAoBe,CAAQ;AACrC;;;;;GClDaU,IAASA,CAAC;AAAA,EAAEC,UAAAA;AAAAA,EAAUC,OAAAA;AAAAA,EAAOC,aAAAA;AAAAA,EAAa,GAAG1C;AAAmB,MAAM;AACjF,QAAM;AAAA,IAAE2C,SAAAA;AAAAA,IAASC,QAAAA;AAAAA,EAAAA,IAAWC,EAAW7C,EAAMgB,UAAU,EAAE,GACnD8B,IAAc/C,EAAoBC,CAAK,GACvC;AAAA,IAAE+C,WAAAA;AAAAA,IAAWH,QAAQI;AAAAA,IAAY1B,OAAAA;AAAAA,IAAO,GAAG2B;AAAAA,EAAAA,IAAoBH,GAC/DI,IAAW;AAAA,IACf,GAAG5B;AAAAA,IACH,cAAc6B,EAAQ,aAAavB,EAAa,qCAAqC,CAAC;AAAA,EAAA,GAGlFwB,sBACH,UAAA,EACC,WAAWC,EAAGvB,EAAOwB,QAAQP,GAAWJ,KAAWb,EAAOa,OAAO,GACjE,QAAQY,EAAqBX,GAAQI,CAAU,GAC/C,OAAOE,GACP,GAAID,GAEHP,UAAAA;AAAAA,IAAAA,uBACE,UAAA,EAEC,OAAO,IACP,QAAM,IAELA,eAJG,aAKN;AAAA,IAEDF;AAAAA,EAAAA,GACH;AAGF,SAAKC,IAKH,gBAAAe,EAAC,SAAA,EAAK,kBAAA,UACJ,UAAA;AAAA,IAAA,gBAAAC,EAAC,QAAA,EACC,WAAW3B,EAAOW,OAClB,iBAAezC,EAAM0D,YAAYC,QAEhClB,UAAAA,EAAAA,CACH;AAAA,IACCW;AAAAA,EAAAA,GACH,IAZOA;AAcX;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";require('./assets/
|
|
2
|
-
//# sourceMappingURL=index-
|
|
1
|
+
"use strict";require('./assets/index53.css');const u=require("react/jsx-runtime"),C=require("./classix-5H4IWnMA.cjs"),S=require("./icons-Dv_p0bUF.cjs"),p=require("./use-touched-Bq5Gjbpz.cjs"),P=new Set(["aria-activedescendant","aria-autocomplete","aria-busy","aria-controls","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-live","aria-owns","aria-required","aria-roledescription","autoComplete","autoFocus","className","defaultValue","dir","disabled","form","id","multiple","name","onBlur","onChange","onClick","onFocus","onInput","onInvalid","onKeyDown","onKeyUp","onMouseDown","onMouseUp","onPointerDown","onPointerUp","required","role","size","style","tabIndex","title","value"]);function h(r){return Object.fromEntries(Object.entries(r).filter(([e])=>e.startsWith("data-")||e.startsWith("aria-")||P.has(e)))}const _=/^--[\w-]+$/,q=/^var\(\s*(--[\w-]+)\s*(?:,\s*(.+))?\)$/,x=new Set(["currentcolor","inherit","initial","revert","revert-layer","unset"]),l=typeof document<"u"?document.createElement("span"):null;function b(r){const e=r.trim();if(!e||!l||x.has(e.toLowerCase()))return e;const s=document.body??document.documentElement;if(!s||(l.style.color=e,!l.style.color))return e;s.appendChild(l);const n=getComputedStyle(l).color.trim();return l.remove(),n||e}function y(r,e="currentColor"){var i;if(typeof document>"u")return e;const s=getComputedStyle(document.documentElement),n=new Set;let t=r.trim();for(;t;){const o=t.match(q),a=(o==null?void 0:o[1])??(_.test(t)?t:null),c=(i=o==null?void 0:o[2])==null?void 0:i.trim();if(!a)return b(t);if(n.has(a)){t=c??"";continue}n.add(a),t=s.getPropertyValue(a).trim()||c||""}return b(e)}const j="_select_1bm47_3",V="_touched_1bm47_24",g="_label_1bm47_29",d={select:j,touched:V,label:g},E=({children:r,label:e,placeholder:s,...n})=>{const{touched:t,onBlur:i}=p.useTouched(n.value===""),o=h(n),{className:a,onBlur:c,style:v,...f}=o,w={...v,"--icon-svg":S.iconSVG("CaretDown",y("--colors-semantic-content-secondary"))},m=u.jsxs("select",{className:C.t(d.select,a,t&&d.touched),onBlur:p.composeEventHandlers(i,c),style:w,...f,children:[s&&u.jsx("option",{value:"",hidden:!0,children:s},"placeholder"),r]});return e?u.jsxs("label",{"data-component":"select",children:[u.jsx("span",{className:d.label,"data-required":n.required||void 0,children:e}),m]}):m};exports.Select=E;exports.resolveColor=y;exports.sanitizeSelectProps=h;
|
|
2
|
+
//# sourceMappingURL=index-Bt7vnwji.cjs.map
|