@orion-ds/react 4.2.8 → 4.2.10
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/components/Accordion/Accordion.module.css +1 -1
- package/dist/components/Card/Card.d.ts.map +1 -1
- package/dist/components/Card/Card.module.css +1 -1
- package/dist/components/Card/Card.stories.d.ts.map +1 -1
- package/dist/components/Card/Card.types.d.ts +2 -0
- package/dist/components/Card/Card.types.d.ts.map +1 -1
- package/dist/components/CodeEditor/CodeEditor.d.ts.map +1 -1
- package/dist/components/CodeEditor/CodeEditor.types.d.ts.map +1 -1
- package/dist/components/NavTree/NavTree.d.ts.map +1 -1
- package/dist/components/NavTree/NavTree.module.css +1 -1
- package/dist/components/NavTree/NavTree.stories.d.ts.map +1 -1
- package/dist/components/NavTree/NavTree.types.d.ts +2 -2
- package/dist/components/SearchInput/SearchInput.d.ts.map +1 -1
- package/dist/components/SearchInput/SearchInput.module.css +1 -1
- package/dist/components/SearchInput/SearchInput.stories.d.ts +1 -0
- package/dist/components/SearchInput/SearchInput.stories.d.ts.map +1 -1
- package/dist/components/SearchInput/SearchInput.types.d.ts +5 -1
- package/dist/components/SearchInput/SearchInput.types.d.ts.map +1 -1
- package/dist/components/Tabs/Tabs.d.ts.map +1 -1
- package/dist/components/Tabs/Tabs.module.css +1 -1
- package/dist/components/Tabs/Tabs.types.d.ts +6 -0
- package/dist/components/Tabs/Tabs.types.d.ts.map +1 -1
- package/dist/components/UserMenu/UserMenu.d.ts.map +1 -1
- package/dist/components/WorkspaceSwitcher/WorkspaceSwitcher.d.ts.map +1 -1
- package/dist/components/WorkspaceSwitcher/WorkspaceSwitcher.types.d.ts.map +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/examples/LandingPage.example.d.ts.map +1 -1
- package/dist/hooks/useTheme.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index10.cjs +1 -1
- package/dist/index10.mjs +1 -1
- package/dist/index100.cjs +1 -1
- package/dist/index100.mjs +46 -33
- package/dist/index101.cjs +1 -1
- package/dist/index101.mjs +30 -24
- package/dist/index102.cjs +1 -1
- package/dist/index102.mjs +28 -28
- package/dist/index103.cjs +1 -1
- package/dist/index103.mjs +54 -40
- package/dist/index104.cjs +1 -1
- package/dist/index104.mjs +33 -53
- package/dist/index105.cjs +1 -1
- package/dist/index105.mjs +40 -58
- package/dist/index106.cjs +1 -1
- package/dist/index106.mjs +52 -30
- package/dist/index107.cjs +1 -1
- package/dist/index107.mjs +40 -20
- package/dist/index108.cjs +1 -1
- package/dist/index108.mjs +40 -18
- package/dist/index109.cjs +1 -1
- package/dist/index109.mjs +40 -30
- package/dist/index11.cjs +1 -1
- package/dist/index11.mjs +1 -1
- package/dist/index111.cjs +1 -1
- package/dist/index111.mjs +30 -46
- package/dist/index112.cjs +1 -1
- package/dist/index112.mjs +30 -52
- package/dist/index113.cjs +1 -1
- package/dist/index113.mjs +22 -28
- package/dist/index114.cjs +1 -1
- package/dist/index114.mjs +18 -44
- package/dist/index116.cjs +1 -1
- package/dist/index116.mjs +62 -30
- package/dist/index117.cjs +1 -1
- package/dist/index117.mjs +57 -32
- package/dist/index118.cjs +1 -1
- package/dist/index118.mjs +42 -33
- package/dist/index119.cjs +1 -1
- package/dist/index119.mjs +28 -30
- package/dist/index12.cjs +1 -1
- package/dist/index12.mjs +1 -1
- package/dist/index120.cjs +1 -1
- package/dist/index120.mjs +24 -35
- package/dist/index121.cjs +1 -1
- package/dist/index121.mjs +18 -36
- package/dist/index122.cjs +1 -1
- package/dist/index122.mjs +32 -20
- package/dist/index123.cjs +1 -1
- package/dist/index123.mjs +46 -14
- package/dist/index124.cjs +1 -1
- package/dist/index124.mjs +28 -27
- package/dist/index125.cjs +1 -1
- package/dist/index125.mjs +16 -14
- package/dist/index126.cjs +1 -1
- package/dist/index126.mjs +15 -37
- package/dist/index127.cjs +1 -1
- package/dist/index127.mjs +16 -28
- package/dist/index128.cjs +1 -1
- package/dist/index128.mjs +20 -24
- package/dist/index129.cjs +1 -1
- package/dist/index129.mjs +28 -28
- package/dist/index13.cjs +1 -1
- package/dist/index13.mjs +1 -1
- package/dist/index130.cjs +1 -1
- package/dist/index130.mjs +36 -28
- package/dist/index131.cjs +1 -1
- package/dist/index131.mjs +50 -28
- package/dist/index132.cjs +1 -1
- package/dist/index132.mjs +29 -41
- package/dist/index133.cjs +1 -1
- package/dist/index133.mjs +28 -52
- package/dist/index134.cjs +1 -1
- package/dist/index134.mjs +37 -37
- package/dist/index135.cjs +1 -1
- package/dist/index135.mjs +28 -50
- package/dist/index136.cjs +1 -1
- package/dist/index136.mjs +26 -18
- package/dist/index137.cjs +1 -1
- package/dist/index137.mjs +18 -154
- package/dist/index138.cjs +1 -1
- package/dist/index138.mjs +38 -218
- package/dist/index139.cjs +1 -1
- package/dist/index139.mjs +24 -28
- package/dist/index14.cjs +1 -1
- package/dist/index14.mjs +1 -1
- package/dist/index140.cjs +1 -1
- package/dist/index140.mjs +35 -42
- package/dist/index141.cjs +1 -1
- package/dist/index141.mjs +234 -44
- package/dist/index142.cjs +1 -1
- package/dist/index142.mjs +34 -17
- package/dist/index143.cjs +1 -1
- package/dist/index143.mjs +44 -47
- package/dist/index144.cjs +1 -1
- package/dist/index144.mjs +170 -64
- package/dist/index145.cjs +1 -1
- package/dist/index145.mjs +186 -31
- package/dist/index146.cjs +1 -1
- package/dist/index146.mjs +29 -41
- package/dist/index147.cjs +1 -1
- package/dist/index147.mjs +90 -32
- package/dist/index148.cjs +1 -1
- package/dist/index148.mjs +53 -57
- package/dist/index149.cjs +1 -1
- package/dist/index149.mjs +66 -62
- package/dist/index15.cjs +1 -1
- package/dist/index15.mjs +1 -1
- package/dist/index150.cjs +1 -1
- package/dist/index150.mjs +124 -42
- package/dist/index151.cjs +1 -1
- package/dist/index151.mjs +108 -24
- package/dist/index152.cjs +1 -1
- package/dist/index152.mjs +111 -40
- package/dist/index153.cjs +1 -1
- package/dist/index153.mjs +122 -20
- package/dist/index154.cjs +1 -1
- package/dist/index154.mjs +214 -76
- package/dist/index155.cjs +1 -1
- package/dist/index155.mjs +18 -67
- package/dist/index156.cjs +1 -1
- package/dist/index156.mjs +67 -65
- package/dist/index157.cjs +1 -1
- package/dist/index157.mjs +55 -40
- package/dist/index158.cjs +1 -1
- package/dist/index158.mjs +20 -234
- package/dist/index159.cjs +1 -1
- package/dist/index159.mjs +33 -34
- package/dist/index16.cjs +1 -1
- package/dist/index16.mjs +73 -69
- package/dist/index160.cjs +1 -1
- package/dist/index160.mjs +57 -44
- package/dist/index161.cjs +1 -1
- package/dist/index161.mjs +28 -170
- package/dist/index162.cjs +1 -1
- package/dist/index162.mjs +25 -186
- package/dist/index163.cjs +1 -1
- package/dist/index163.mjs +53 -29
- package/dist/index164.cjs +1 -1
- package/dist/index164.mjs +65 -90
- package/dist/index165.cjs +1 -1
- package/dist/index165.mjs +63 -53
- package/dist/index166.cjs +1 -1
- package/dist/index166.mjs +106 -66
- package/dist/index167.cjs +1 -1
- package/dist/index167.mjs +45 -124
- package/dist/index168.cjs +1 -1
- package/dist/index168.mjs +20 -108
- package/dist/index169.cjs +1 -1
- package/dist/index169.mjs +30 -111
- package/dist/index17.cjs +1 -1
- package/dist/index17.mjs +1 -1
- package/dist/index170.cjs +1 -1
- package/dist/index170.mjs +27 -122
- package/dist/index171.cjs +1 -1
- package/dist/index171.mjs +46 -214
- package/dist/index172.cjs +1 -1
- package/dist/index172.mjs +24 -106
- package/dist/index173.cjs +1 -1
- package/dist/index173.mjs +12 -22
- package/dist/index174.cjs +1 -1
- package/dist/index174.mjs +33 -18
- package/dist/index175.cjs +1 -1
- package/dist/index175.mjs +42 -64
- package/dist/index176.cjs +1 -1
- package/dist/index176.mjs +64 -18
- package/dist/index177.cjs +1 -1
- package/dist/index177.mjs +51 -55
- package/dist/index178.cjs +1 -1
- package/dist/index178.mjs +76 -12
- package/dist/index179.cjs +1 -1
- package/dist/index179.mjs +42 -38
- package/dist/index18.cjs +1 -1
- package/dist/index18.mjs +1 -1
- package/dist/index180.cjs +1 -1
- package/dist/index180.mjs +64 -26
- package/dist/index181.cjs +1 -1
- package/dist/index181.mjs +44 -45
- package/dist/index182.cjs +1 -1
- package/dist/index182.mjs +17 -17
- package/dist/index183.cjs +1 -1
- package/dist/index183.mjs +17 -17
- package/dist/index185.cjs +1 -1
- package/dist/index185.mjs +1 -1
- package/dist/index19.cjs +1 -1
- package/dist/index19.mjs +2 -2
- package/dist/index20.cjs +1 -1
- package/dist/index20.mjs +14 -14
- package/dist/index21.cjs +1 -1
- package/dist/index21.mjs +1 -1
- package/dist/index22.cjs +1 -1
- package/dist/index22.mjs +1 -1
- package/dist/index23.cjs +1 -1
- package/dist/index23.mjs +56 -36
- package/dist/index25.cjs +1 -1
- package/dist/index25.mjs +1 -1
- package/dist/index26.cjs +1 -1
- package/dist/index26.mjs +1 -1
- package/dist/index27.cjs +1 -1
- package/dist/index27.mjs +1 -1
- package/dist/index28.cjs +1 -1
- package/dist/index28.mjs +1 -1
- package/dist/index29.cjs +1 -1
- package/dist/index29.mjs +1 -1
- package/dist/index30.cjs +1 -1
- package/dist/index30.mjs +1 -1
- package/dist/index31.cjs +1 -1
- package/dist/index31.mjs +1 -1
- package/dist/index32.cjs +1 -1
- package/dist/index32.mjs +1 -1
- package/dist/index33.cjs +1 -1
- package/dist/index33.mjs +1 -1
- package/dist/index34.cjs +1 -1
- package/dist/index34.mjs +1 -1
- package/dist/index35.cjs +1 -1
- package/dist/index35.mjs +1 -1
- package/dist/index36.cjs +1 -1
- package/dist/index36.mjs +1 -1
- package/dist/index37.cjs +1 -1
- package/dist/index37.mjs +1 -1
- package/dist/index38.cjs +1 -1
- package/dist/index38.mjs +1 -1
- package/dist/index39.cjs +1 -1
- package/dist/index39.mjs +1 -1
- package/dist/index40.cjs +1 -1
- package/dist/index40.mjs +1 -1
- package/dist/index42.cjs +1 -1
- package/dist/index42.mjs +1 -1
- package/dist/index43.cjs +1 -1
- package/dist/index43.mjs +1 -1
- package/dist/index44.cjs +1 -1
- package/dist/index44.mjs +1 -1
- package/dist/index46.cjs +1 -1
- package/dist/index46.mjs +1 -1
- package/dist/index47.cjs +1 -1
- package/dist/index47.mjs +1 -1
- package/dist/index48.mjs +95 -31
- package/dist/index49.cjs +1 -1
- package/dist/index49.mjs +1 -1
- package/dist/index5.cjs +1 -1
- package/dist/index5.mjs +1 -1
- package/dist/index50.cjs +1 -1
- package/dist/index50.mjs +1 -1
- package/dist/index51.cjs +1 -1
- package/dist/index51.mjs +1 -1
- package/dist/index52.cjs +1 -1
- package/dist/index52.mjs +1 -1
- package/dist/index53.cjs +1 -1
- package/dist/index53.mjs +82 -78
- package/dist/index54.cjs +1 -1
- package/dist/index54.mjs +1 -1
- package/dist/index55.cjs +1 -1
- package/dist/index55.mjs +1 -1
- package/dist/index56.cjs +1 -1
- package/dist/index56.mjs +1 -1
- package/dist/index57.cjs +1 -1
- package/dist/index57.mjs +1 -1
- package/dist/index58.cjs +1 -1
- package/dist/index58.mjs +1 -1
- package/dist/index59.cjs +1 -1
- package/dist/index59.mjs +1 -1
- package/dist/index6.cjs +1 -1
- package/dist/index6.mjs +1 -1
- package/dist/index60.cjs +1 -1
- package/dist/index60.mjs +1 -1
- package/dist/index61.cjs +1 -1
- package/dist/index61.mjs +1 -1
- package/dist/index62.cjs +1 -1
- package/dist/index62.mjs +42 -39
- package/dist/index63.cjs +1 -1
- package/dist/index63.mjs +1 -1
- package/dist/index64.cjs +1 -1
- package/dist/index64.mjs +1 -1
- package/dist/index65.cjs +1 -1
- package/dist/index65.mjs +1 -1
- package/dist/index66.cjs +1 -1
- package/dist/index66.mjs +1 -1
- package/dist/index68.cjs +1 -1
- package/dist/index68.mjs +1 -1
- package/dist/index69.cjs +1 -1
- package/dist/index69.mjs +1 -1
- package/dist/index7.cjs +1 -1
- package/dist/index7.mjs +1 -1
- package/dist/index70.cjs +1 -1
- package/dist/index70.mjs +1 -1
- package/dist/index71.cjs +1 -1
- package/dist/index71.mjs +1 -1
- package/dist/index72.cjs +1 -1
- package/dist/index72.mjs +16 -14
- package/dist/index73.cjs +1 -1
- package/dist/index73.mjs +1 -1
- package/dist/index76.cjs +1 -1
- package/dist/index76.mjs +1 -1
- package/dist/index77.cjs +1 -1
- package/dist/index77.mjs +1 -1
- package/dist/index78.cjs +1 -1
- package/dist/index78.mjs +1 -1
- package/dist/index79.cjs +1 -1
- package/dist/index79.mjs +1 -1
- package/dist/index8.cjs +1 -1
- package/dist/index8.mjs +1 -1
- package/dist/index80.cjs +1 -1
- package/dist/index80.mjs +1 -1
- package/dist/index81.cjs +1 -1
- package/dist/index81.mjs +21 -3
- package/dist/index82.cjs +1 -1
- package/dist/index82.mjs +2 -2
- package/dist/index9.cjs +1 -1
- package/dist/index9.mjs +1 -1
- package/dist/index94.mjs +3 -1
- package/dist/index97.cjs +1 -1
- package/dist/index97.mjs +154 -24
- package/dist/index98.cjs +1 -1
- package/dist/index98.mjs +218 -46
- package/dist/index99.cjs +1 -1
- package/dist/index99.mjs +36 -55
- package/dist/styles.css +6 -5
- package/dist/theme.css +1 -0
- package/dist/tokens/brands.d.ts.map +1 -1
- package/package.json +4 -4
package/dist/index21.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("react"),u=require("lucide-react"),s=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("react"),u=require("lucide-react"),s=require("./index101.cjs"),m=t.forwardRef(({label:i,helperText:n,error:a,size:j="md",indeterminate:r=!1,className:k,id:N,disabled:h,required:o,checked:v,"aria-label":f,"aria-describedby":p,...C},y)=>{const R=t.useId(),l=N||`checkbox-${R}`,x=`${l}-error`,b=`${l}-helper`,g=t.useRef(null),d=y||g;t.useEffect(()=>{d.current&&(d.current.indeterminate=r)},[r,d]);const c=[];a&&c.push(x),n&&!a&&c.push(b),p&&c.push(p);const I=c.length>0?c.join(" "):void 0;!(i||f)&&process.env.NODE_ENV==="development"&&console.warn("Checkbox: Missing accessible name. Provide either a `label` prop or `aria-label` for screen reader users.");const q=r?"mixed":void 0,M=[s.default.container,s.default[j],a&&s.default.error,h&&s.default.disabled,k].filter(Boolean).join(" ");return e.jsxs("div",{className:M,children:[e.jsx("input",{ref:d,type:"checkbox",id:l,className:s.default.input,disabled:h,required:o,checked:v,"aria-required":o||void 0,"aria-invalid":a?"true":"false","aria-checked":q,"aria-describedby":I,"aria-label":i?void 0:f,...C}),e.jsxs("label",{htmlFor:l,className:s.default.labelWrapper,children:[e.jsx("span",{className:s.default.checkbox,"aria-hidden":"true",children:e.jsx("span",{className:s.default.checkmark,children:r?e.jsx(u.Minus,{strokeWidth:3}):e.jsx(u.Check,{strokeWidth:3})})}),i&&e.jsxs("span",{className:s.default.label,children:[i,o&&e.jsx("span",{className:s.default.required,"aria-hidden":"true",children:"*"})]})]}),n&&!a&&e.jsx("p",{id:b,className:s.default.helperText,children:n}),a&&e.jsxs("p",{id:x,className:s.default.errorMessage,role:"alert","aria-live":"assertive",children:[e.jsx(u.AlertCircle,{size:14,"aria-hidden":"true"}),e.jsx("span",{children:a})]})]})});m.displayName="Checkbox";exports.Checkbox=m;
|
package/dist/index21.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as l, jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as A, useId as B, useRef as E, useEffect as M } from "react";
|
|
3
3
|
import { Minus as W, Check as $, AlertCircle as w } from "lucide-react";
|
|
4
|
-
import e from "./
|
|
4
|
+
import e from "./index101.mjs";
|
|
5
5
|
const z = A(
|
|
6
6
|
({
|
|
7
7
|
label: i,
|
package/dist/index22.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),w=require("react"),e=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),w=require("react"),e=require("./index140.cjs"),u=w.forwardRef(({variant:c="default",size:d="md",icon:i,clickable:f=!1,onClick:s,onRemove:l,disabled:a=!1,selected:o=!1,children:h,className:p,...v},m)=>{const r=f||!!s,j=[e.default.chip,e.default[c],e.default[d],r&&e.default.clickable,o&&e.default.selected,a&&e.default.disabled,p].filter(Boolean).join(" "),k=()=>{!a&&s&&s()},x=t=>{t.stopPropagation(),!a&&l&&l()},y=t=>{a||((t.key==="Enter"||t.key===" ")&&(t.preventDefault(),s?.()),(t.key==="Backspace"||t.key==="Delete")&&(t.preventDefault(),l?.()))};return n.jsxs("div",{ref:m,className:j,role:r?"button":void 0,tabIndex:r&&!a?0:void 0,"aria-disabled":a,"aria-pressed":o,onClick:r?k:void 0,onKeyDown:r?y:void 0,...v,children:[i&&n.jsx("span",{className:e.default.icon,"aria-hidden":"true",children:i}),n.jsx("span",{className:e.default.label,children:h}),l&&n.jsx("button",{type:"button",className:e.default.removeButton,onClick:x,disabled:a,"aria-label":"Remove",children:n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:n.jsx("path",{d:"M10.5 3.5L3.5 10.5M3.5 3.5l7 7",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]})});u.displayName="Chip";exports.Chip=u;
|
package/dist/index22.mjs
CHANGED
package/dist/index23.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),i=require("react"),_=require("react-syntax-highlighter"),$=require("react-syntax-highlighter/dist/esm/styles/prism"),l=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),i=require("react"),_=require("react-syntax-highlighter"),$=require("react-syntax-highlighter/dist/esm/styles/prism"),l=require("./index168.cjs"),z=require("./index75.cjs");try{const r=require("refractor/all");r.default&&r.default.registered&&r.default.registered("markdown")&&!r.default.languages.markdown?.["quoted-string"]&&r.default.languages.insertBefore("markdown","bold",{"quoted-string":{pattern:/"(?:\\.|[^"\\])*"/,greedy:!0,alias:"string"}})}catch{}const A=i.forwardRef(({value:r="",onChange:g,language:j,readOnly:T=!1,showLineNumbers:k=!0,placeholder:C,minRows:m=10,className:B,"aria-label":S,...R},D)=>{const p=i.useRef(null),x=i.useRef(null),v=i.useRef(null),E=i.useRef(null),K=i.useRef(null),u=i.useRef(null),h=D||K,[y,F]=i.useState(0),[d,O]=i.useState([]);let q="dark";try{q=z.useThemeContext().theme}catch{}const P=q==="light"?$.oneLight:$.oneDark,L=Math.max(r.split(`
|
|
2
2
|
`).length,m);i.useEffect(()=>{if(u.current&&h.current){const{start:e,end:t}=u.current;h.current.setSelectionRange(e,t),u.current=null}}),i.useEffect(()=>{const e=v.current,t=E.current;if(!e||!t)return;const n=()=>{const o=t.clientWidth;if(o<=0)return;e.style.width=`${o}px`;const a=r.split(`
|
|
3
3
|
`),f=Math.max(a.length,m),b=[];for(let N=0;N<f;N++){const V=a[N]??"";e.textContent=V||" ",b.push(e.scrollHeight)}O(b)};n();const c=new ResizeObserver(n);return c.observe(t),()=>c.disconnect()},[r,m]),i.useEffect(()=>{const e=n=>{const c=n.target;p.current&&(p.current.scrollTop=c.scrollTop),x.current&&(x.current.scrollTop=c.scrollTop,x.current.scrollLeft=c.scrollLeft)},t=h?.current;if(t)return t.addEventListener("scroll",e),()=>{t.removeEventListener("scroll",e)}},[h]);const w=e=>{const t=e.value.substring(0,e.selectionStart);F(t.split(`
|
|
4
4
|
`).length-1)},H=e=>{if(e.key==="Tab"){e.preventDefault();const t=e.currentTarget,n=t.selectionStart,c=t.selectionEnd,o=" ";if(n===c){const a=r.substring(0,n)+o+r.substring(c);u.current={start:n+o.length,end:n+o.length},g?.(a)}else if(e.shiftKey){const a=r.lastIndexOf(`
|
package/dist/index23.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { jsxs as k, jsx as l } from "react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef as U, useRef as g, useState as K, useEffect as T } from "react";
|
|
3
3
|
import { Prism as W } from "react-syntax-highlighter";
|
|
4
4
|
import { oneLight as _, oneDark as I } from "react-syntax-highlighter/dist/esm/styles/prism";
|
|
5
|
-
import i from "./
|
|
5
|
+
import i from "./index168.mjs";
|
|
6
6
|
import { useThemeContext as G } from "./index75.mjs";
|
|
7
7
|
try {
|
|
8
8
|
const r = require("refractor/all");
|
|
@@ -34,11 +34,8 @@ const J = U(
|
|
|
34
34
|
E = G().theme;
|
|
35
35
|
} catch {
|
|
36
36
|
}
|
|
37
|
-
const O = E === "light" ? _ : I, R = Math.max(
|
|
38
|
-
|
|
39
|
-
`).length,
|
|
40
|
-
m
|
|
41
|
-
);
|
|
37
|
+
const O = E === "light" ? _ : I, R = Math.max(r.split(`
|
|
38
|
+
`).length, m);
|
|
42
39
|
T(() => {
|
|
43
40
|
if (d.current && h.current) {
|
|
44
41
|
const { start: e, end: t } = d.current;
|
|
@@ -82,7 +79,10 @@ const J = U(
|
|
|
82
79
|
const t = e.currentTarget, n = t.selectionStart, a = t.selectionEnd, o = " ";
|
|
83
80
|
if (n === a) {
|
|
84
81
|
const s = r.substring(0, n) + o + r.substring(a);
|
|
85
|
-
d.current = {
|
|
82
|
+
d.current = {
|
|
83
|
+
start: n + o.length,
|
|
84
|
+
end: n + o.length
|
|
85
|
+
}, f?.(s);
|
|
86
86
|
} else if (e.shiftKey) {
|
|
87
87
|
const s = r.lastIndexOf(`
|
|
88
88
|
`, n - 1) + 1, u = r.substring(s).match(/^ {1,2}/)?.[0] ?? "";
|
|
@@ -95,7 +95,10 @@ const J = U(
|
|
|
95
95
|
}
|
|
96
96
|
} else {
|
|
97
97
|
const s = r.substring(0, n) + o + r.substring(a);
|
|
98
|
-
d.current = {
|
|
98
|
+
d.current = {
|
|
99
|
+
start: n + o.length,
|
|
100
|
+
end: n + o.length
|
|
101
|
+
}, f?.(s);
|
|
99
102
|
}
|
|
100
103
|
}
|
|
101
104
|
}, D = [i.wrapper, j].filter(Boolean).join(" ");
|
|
@@ -103,9 +106,18 @@ const J = U(
|
|
|
103
106
|
"div",
|
|
104
107
|
{
|
|
105
108
|
className: D,
|
|
106
|
-
style: {
|
|
109
|
+
style: {
|
|
110
|
+
minHeight: `calc(${m} * 1.6em + 2 * var(--spacing-4))`
|
|
111
|
+
},
|
|
107
112
|
children: [
|
|
108
|
-
/* @__PURE__ */ l(
|
|
113
|
+
/* @__PURE__ */ l(
|
|
114
|
+
"div",
|
|
115
|
+
{
|
|
116
|
+
ref: v,
|
|
117
|
+
className: i.lineMirror,
|
|
118
|
+
"aria-hidden": "true"
|
|
119
|
+
}
|
|
120
|
+
),
|
|
109
121
|
L && /* @__PURE__ */ l(
|
|
110
122
|
"div",
|
|
111
123
|
{
|
|
@@ -135,35 +147,43 @@ const J = U(
|
|
|
135
147
|
"aria-hidden": "true"
|
|
136
148
|
}
|
|
137
149
|
),
|
|
138
|
-
/* @__PURE__ */ l(
|
|
139
|
-
|
|
150
|
+
/* @__PURE__ */ l(
|
|
151
|
+
"div",
|
|
140
152
|
{
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
153
|
+
ref: x,
|
|
154
|
+
className: i.highlightLayer,
|
|
155
|
+
"aria-hidden": "true",
|
|
156
|
+
children: /* @__PURE__ */ l(
|
|
157
|
+
W,
|
|
158
|
+
{
|
|
159
|
+
language: C,
|
|
160
|
+
style: O,
|
|
161
|
+
customStyle: {
|
|
162
|
+
margin: 0,
|
|
163
|
+
padding: 0,
|
|
164
|
+
background: "transparent",
|
|
165
|
+
fontSize: "inherit",
|
|
166
|
+
lineHeight: "inherit",
|
|
167
|
+
fontFamily: "inherit",
|
|
168
|
+
whiteSpace: "pre-wrap",
|
|
169
|
+
wordBreak: "break-word",
|
|
170
|
+
overflow: "visible"
|
|
171
|
+
},
|
|
172
|
+
codeTagProps: {
|
|
173
|
+
style: {
|
|
174
|
+
fontFamily: "inherit",
|
|
175
|
+
background: "transparent",
|
|
176
|
+
color: "var(--text-primary)",
|
|
177
|
+
whiteSpace: "pre-wrap",
|
|
178
|
+
wordBreak: "break-word"
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
children: r + `
|
|
164
182
|
`
|
|
183
|
+
}
|
|
184
|
+
)
|
|
165
185
|
}
|
|
166
|
-
)
|
|
186
|
+
),
|
|
167
187
|
/* @__PURE__ */ l(
|
|
168
188
|
"textarea",
|
|
169
189
|
{
|
package/dist/index25.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),o=require("react"),le=require("@dnd-kit/core"),g=require("lucide-react"),a=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),o=require("react"),le=require("@dnd-kit/core"),g=require("lucide-react"),a=require("./index138.cjs"),h=require("./index24.cjs"),ne=require("./index11.cjs"),F=require("./index35.cjs"),R=require("./index14.cjs");function w(E){const{id:u,title:B,itemCount:x,items:r,renderItem:z,itemLabel:O="Item",itemLabelPlural:k="Items",emptyText:A="No items in this folder",sortLabel:v="Sort",defaultExpanded:$=!0,sortOptions:i,selectedSort:M,onSortChange:P,onDrop:D,onFolderEdit:b,onFolderDelete:j,onFolderInvite:N,isDropTarget:Y=!1,isDropCompleted:H=!1,onDragEnter:Z,onDragLeaveFolder:C,className:_,...G}=E,[f,J]=o.useState($),[m,d]=o.useState(null),[T,p]=o.useState(!1),I=o.useRef(null),{setNodeRef:K}=le.useDroppable({id:u}),Q=t=>{if(t.preventDefault(),t.dataTransfer.dropEffect="move",T||(p(!0),Z?.()),!f||r.length===0){d(0);return}const l=I.current;if(!l)return;const n=Array.from(l.querySelectorAll("[data-item-id]")),ae=t.clientY;let L=n.length;for(let c=0;c<n.length;c++){const S=n[c];if(!S)continue;const q=S.getBoundingClientRect();if(ae<q.top+q.height/2){L=c;break}}d(L)},U=t=>{t.currentTarget.contains(t.relatedTarget)||(p(!1),d(null),C?.())},V=t=>{t.preventDefault();const l=t.dataTransfer.getData("text/plain")||t.dataTransfer.getData("itemId");if(l&&D){const n=m??r.length;D(l,u,n)}p(!1),d(null),C?.()},W=(t,l)=>{t.dataTransfer.effectAllowed="move",t.dataTransfer.setData("text/plain",l)},X=i?.map(t=>({id:t.value,label:t.label,onClick:()=>P?.(t.value)})),y=[...b?[{id:"rename",label:"Rename",onClick:b}]:[],...N?[{id:"invite",label:"Invite participants",onClick:N}]:[],...j?[{id:"delete",label:"Delete folder",danger:!0,onClick:j}]:[]],s=Y||T,ee=[a.default.folder,s&&a.default.dropTarget,H&&a.default.dropCompleted,_].filter(Boolean).join(" "),te=x===1?O:k;return e.jsx("div",{ref:K,className:ee,"data-folder-id":u,"data-drop-active":s,onDragOver:Q,onDragLeave:U,onDrop:V,...G,children:e.jsxs(h.Collapsible,{open:f,onOpenChange:J,children:[e.jsxs("div",{className:a.default.header,children:[e.jsxs(h.Collapsible.Trigger,{className:a.default.trigger,children:[e.jsx(g.ChevronDown,{size:20,className:`${a.default.chevron} ${f?a.default.expanded:""}`}),e.jsx("h2",{className:a.default.title,children:B}),e.jsxs(ne.Badge,{variant:"secondary",className:a.default.badge,children:[x,e.jsxs("span",{className:a.default.badgeLabel,children:[" ",te]})]})]}),e.jsxs("div",{className:a.default.actions,children:[i&&i.length>0&&e.jsx("div",{className:a.default.sortDropdown,children:e.jsx(F.Dropdown,{trigger:e.jsx(R.Button,{variant:"ghost",size:"sm",iconRight:e.jsx(g.ChevronDown,{size:16}),"aria-label":`Sort by ${v}`,children:i.find(t=>t.value===M)?.label||v}),items:X,placement:"bottom-end"})}),y.length>0&&e.jsx(F.Dropdown,{trigger:e.jsx(R.Button,{variant:"ghost",size:"sm",iconOnly:!0,icon:e.jsx(g.MoreHorizontal,{size:20}),"aria-label":"Folder actions"}),items:y,placement:"bottom-end"})]})]}),e.jsx(h.Collapsible.Content,{children:e.jsx("div",{className:a.default.content,children:r.length===0?s?e.jsx("div",{className:a.default.emptyDropZone,children:e.jsx("div",{className:a.default.insertionLine,role:"presentation"})}):e.jsx("div",{className:a.default.emptyState,children:e.jsx("p",{className:a.default.emptyText,children:A})}):e.jsxs("div",{className:a.default.grid,ref:I,children:[r.map((t,l)=>e.jsxs(o.Fragment,{children:[s&&m===l&&e.jsx("div",{className:a.default.insertionLine,role:"presentation"}),e.jsx("div",{"data-item-id":t.id,draggable:t.draggable,onDragStart:n=>W(n,t.id),children:z(t,l)})]},t.id)),s&&m===r.length&&e.jsx("div",{className:a.default.insertionLine,role:"presentation"})]})})})]})})}w.displayName="CollapsibleFolder";exports.CollapsibleFolder=w;
|
package/dist/index25.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { jsx as a, jsxs as n } from "react/jsx-runtime";
|
|
|
2
2
|
import re, { useState as h, useRef as ne } from "react";
|
|
3
3
|
import { useDroppable as le } from "@dnd-kit/core";
|
|
4
4
|
import { ChevronDown as R, MoreHorizontal as oe } from "lucide-react";
|
|
5
|
-
import t from "./
|
|
5
|
+
import t from "./index138.mjs";
|
|
6
6
|
import { Collapsible as v } from "./index24.mjs";
|
|
7
7
|
import { Badge as ie } from "./index11.mjs";
|
|
8
8
|
import { Dropdown as z } from "./index35.mjs";
|
package/dist/index26.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),l=require("react"),oe=require("react-dom"),R=require("lucide-react"),t=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),l=require("react"),oe=require("react-dom"),R=require("lucide-react"),t=require("./index116.cjs"),de=(u,i)=>{const c=i.toLowerCase().trim();return c?u.label.toLowerCase().includes(c)||u.value.toLowerCase().includes(c)||(u.description?.toLowerCase().includes(c)??!1):!0},X=l.forwardRef(({options:u,value:i,onChange:c,onInputChange:P,size:D="md",label:S,helperText:z,error:g,loading:K=!1,clearable:U=!0,allowFreeInput:f=!1,filterFn:B=de,openOnFocus:I=!0,minChars:C=0,emptyText:Y="No results found",renderOption:T,maxHeight:_=300,fullWidth:G=!1,placeholder:V,disabled:w,className:J,id:Q,onFocus:A,onBlur:H,onKeyDown:W,...Z},k)=>{const F=l.useId(),$=Q||F,q=`${$}-listbox`,v=l.useRef(null),N=l.useRef(null),b=l.useRef(null),[r,h]=l.useState(!1),[E,o]=l.useState(""),[d,j]=l.useState(-1),[M,ee]=l.useState({top:0,left:0,width:0}),a=l.useMemo(()=>u.find(e=>e.value===i)??null,[u,i]);l.useEffect(()=>{a?o(a.label):f||o("")},[a,f]);const p=l.useMemo(()=>E.length<C?[]:u.filter(e=>B(e,E)),[u,E,C,B]),x=l.useCallback(()=>{if(!v.current)return;const e=v.current.getBoundingClientRect();ee({top:e.bottom+window.scrollY+4,left:e.left+window.scrollX,width:e.width})},[]);l.useEffect(()=>{if(r)return x(),window.addEventListener("resize",x),window.addEventListener("scroll",x,!0),()=>{window.removeEventListener("resize",x),window.removeEventListener("scroll",x,!0)}},[r,x]),l.useEffect(()=>{if(!r)return;const e=n=>{const m=n.target;v.current&&!v.current.contains(m)&&b.current&&!b.current.contains(m)&&(h(!1),!f&&!i?o(""):a&&o(a.label))};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[r,f,i,a]);const te=l.useCallback(e=>{const n=e.target.value;o(n),j(-1),P?.(n),!r&&n.length>=C&&h(!0),a&&n!==a.label&&!f&&c?.(null,null)},[r,C,P,a,f,c]),se=l.useCallback(e=>{I&&!w&&h(!0),A?.(e)},[I,w,A]),le=l.useCallback(e=>{setTimeout(()=>{b.current?.contains(document.activeElement)||(h(!1),!f&&!i?o(""):a&&o(a.label))},200),H?.(e)},[f,i,a,H]),O=l.useCallback(e=>{e.disabled||(c?.(e.value,e),o(e.label),h(!1),j(-1),N.current?.focus())},[c]),ne=l.useCallback(e=>{e.stopPropagation(),c?.(null,null),o(""),N.current?.focus()},[c]),ae=l.useCallback(e=>{switch(e.key){case"ArrowDown":e.preventDefault(),r?j(n=>Math.min(n+1,p.length-1)):h(!0);break;case"ArrowUp":e.preventDefault(),j(n=>Math.max(n-1,0));break;case"Enter":e.preventDefault(),r&&d>=0&&p[d]&&O(p[d]);break;case"Escape":e.preventDefault(),h(!1),o(a?a.label:"");break;case"Tab":h(!1);break}W?.(e)},[r,d,p,O,a,W]);l.useEffect(()=>{d>=0&&b.current&&b.current.querySelectorAll('[role="option"]')[d]?.scrollIntoView({block:"nearest"})},[d]);const re=[t.default.container,t.default[D],G&&t.default.fullWidth,w&&t.default.disabled,g&&t.default.error,J].filter(Boolean).join(" "),L=D==="sm"?14:D==="lg"?20:16,ie=(e,n)=>{const m=e.value===i,y=n===d;return T?T(e,m,y):s.jsxs(s.Fragment,{children:[e.icon&&s.jsx("span",{className:t.default.optionIcon,"aria-hidden":"true",children:e.icon}),s.jsxs("div",{className:t.default.optionContent,children:[s.jsx("span",{className:t.default.optionLabel,children:e.label}),e.description&&s.jsx("span",{className:t.default.optionDescription,children:e.description})]}),m&&s.jsx(R.Check,{size:L,className:t.default.checkIcon,"aria-hidden":"true"})]})},ce=s.jsx("div",{ref:b,className:`${t.default.dropdown} ${r&&t.default.visible}`,style:{top:M.top,left:M.left,width:M.width,maxHeight:_},role:"listbox",id:q,"aria-label":S||V,children:K?s.jsxs("div",{className:t.default.loading,children:[s.jsx(R.Loader2,{size:L,className:t.default.spinner}),s.jsx("span",{children:"Loading..."})]}):p.length===0?s.jsx("div",{className:t.default.empty,children:Y}):p.map((e,n)=>{const m=n===d,y=e.value===i;return s.jsx("div",{className:[t.default.option,m&&t.default.highlighted,y&&t.default.selected,e.disabled&&t.default.disabled].filter(Boolean).join(" "),role:"option","aria-selected":y,"aria-disabled":e.disabled,onClick:()=>O(e),onMouseEnter:()=>j(n),children:ie(e,n)},e.value)})});return s.jsxs("div",{className:re,children:[S&&s.jsx("label",{htmlFor:$,className:t.default.label,children:S}),s.jsxs("div",{ref:v,className:t.default.inputWrapper,onClick:()=>N.current?.focus(),children:[s.jsx("input",{...Z,ref:e=>{typeof k=="function"?k(e):k&&(k.current=e),N.current=e},id:$,type:"text",className:t.default.input,value:E,onChange:te,onFocus:se,onBlur:le,onKeyDown:ae,disabled:w,placeholder:V,role:"combobox","aria-expanded":r,"aria-haspopup":"listbox","aria-controls":q,"aria-autocomplete":"list","aria-activedescendant":d>=0?`${q}-option-${d}`:void 0}),s.jsxs("div",{className:t.default.actions,children:[U&&i&&!w&&s.jsx("button",{type:"button",className:t.default.clearButton,onClick:ne,"aria-label":"Clear selection",tabIndex:-1,children:s.jsx(R.X,{size:L})}),s.jsx("span",{className:`${t.default.chevron} ${r?t.default.open:""}`,"aria-hidden":"true",children:s.jsx(R.ChevronDown,{size:L})})]})]}),(z||g)&&s.jsx("span",{className:g?t.default.errorText:t.default.helperText,children:g||z}),r&&oe.createPortal(ce,document.body)]})});X.displayName="Combobox";exports.Combobox=X;
|
package/dist/index26.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { jsx as s, jsxs as v, Fragment as fe } from "react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef as me, useId as he, useRef as M, useState as R, useMemo as Y, useEffect as z, useCallback as h } from "react";
|
|
3
3
|
import { createPortal as pe } from "react-dom";
|
|
4
4
|
import { Loader2 as be, X as we, ChevronDown as ve, Check as ge } from "lucide-react";
|
|
5
|
-
import t from "./
|
|
5
|
+
import t from "./index116.mjs";
|
|
6
6
|
const Ne = (d, l) => {
|
|
7
7
|
const o = l.toLowerCase().trim();
|
|
8
8
|
return o ? d.label.toLowerCase().includes(o) || d.value.toLowerCase().includes(o) || (d.description?.toLowerCase().includes(o) ?? !1) : !0;
|
package/dist/index27.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),s=require("react"),H=require("react-dom"),K=require("lucide-react"),r=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),s=require("react"),H=require("react-dom"),K=require("lucide-react"),r=require("./index122.cjs"),U=require("./index33.cjs"),B=s.createContext(null);function S(){const e=s.useContext(B);if(!e)throw new Error("Command compound components must be used within <Command>");return e}const $=(e,t)=>t?e.toLowerCase().includes(t.toLowerCase())?1:0:1,d=({value:e,onValueChange:t,filter:n=$,children:i,className:c,...l})=>{const[C,b]=s.useState(""),[v,p]=s.useState(0),y=s.useRef(new Map),[,j]=s.useState(0),x=s.useId(),m=e!==void 0?e:C,I=s.useCallback(o=>{e!==void 0?t?.(o):b(o),p(0)},[e,t]),N=s.useCallback((o,u)=>{y.current.set(o,u),j(f=>f+1)},[]),w=s.useCallback(o=>{y.current.delete(o),j(u=>u+1)},[]),g=s.useCallback(()=>{const o=[];for(const[u,f]of y.current)n(f,m)>0&&o.push(u);return o},[n,m]),h=s.useMemo(()=>({search:m,setSearch:I,filter:n,activeIndex:v,setActiveIndex:p,registerItem:N,unregisterItem:w,items:y.current,getVisibleItems:g,listId:x}),[m,I,n,v,p,N,w,g,x]),k=s.useRef(null),E=s.useCallback(o=>{const u=g();if(u.length){if(o.key==="ArrowDown")o.preventDefault(),p(f=>(f+1)%u.length);else if(o.key==="ArrowUp")o.preventDefault(),p(f=>(f-1+u.length)%u.length);else if(o.key==="Enter"){o.preventDefault();const f=u[v];f&&k.current?.querySelector(`[data-command-id="${f}"]`)?.click()}}},[g,v,p]),T=[r.default.command,c].filter(Boolean).join(" ");return a.jsx(B.Provider,{value:h,children:a.jsx("div",{ref:k,className:T,onKeyDown:E,...l,children:i})})},R=({className:e,...t})=>{const{search:n,setSearch:i,listId:c}=S(),l=s.useRef(null);s.useEffect(()=>{l.current?.focus()},[]);const C=[r.default.inputWrapper,e].filter(Boolean).join(" ");return a.jsxs("div",{className:C,children:[a.jsx(K.Search,{size:16,className:r.default.searchIcon,"aria-hidden":"true"}),a.jsx("input",{ref:l,className:r.default.input,value:n,onChange:b=>i(b.target.value),type:"text",role:"combobox","aria-expanded":"true","aria-autocomplete":"list","aria-controls":c,...t})]})};R.displayName="Command.Input";const q=({children:e,className:t,...n})=>{const{listId:i}=S(),c=[r.default.list,t].filter(Boolean).join(" ");return a.jsx("div",{id:i,className:c,role:"listbox",...n,children:e})};q.displayName="Command.List";const L=({children:e,className:t})=>{const{getVisibleItems:n}=S();if(n().length>0)return null;const c=[r.default.empty,t].filter(Boolean).join(" ");return a.jsx("div",{className:c,role:"status","aria-live":"polite",children:e})};L.displayName="Command.Empty";const A=({heading:e,children:t,className:n})=>{const i=[r.default.group,n].filter(Boolean).join(" ");return a.jsxs("div",{className:i,role:"group","aria-label":e,children:[e&&a.jsx("div",{className:r.default.groupHeading,children:e}),t]})};A.displayName="Command.Group";let z=0;const V=({onSelect:e,disabled:t=!1,value:n,children:i,className:c,...l})=>{const{filter:C,search:b,activeIndex:v,getVisibleItems:p,registerItem:y,unregisterItem:j}=S(),x=s.useRef("");x.current||(x.current=`cmd-item-${++z}`);const m=x.current,I=n||D(i);s.useEffect(()=>(y(m,I),()=>j(m)),[m,I,y,j]);const N=C(I,b)>0,h=p().indexOf(m)===v,k=()=>{t||e?.()},E=[r.default.item,t&&r.default.itemDisabled,!N&&r.default.itemHidden,c].filter(Boolean).join(" ");return a.jsx("div",{className:E,"data-command-id":m,"data-active":h,role:"option","aria-selected":h,"aria-disabled":t,onClick:k,...l,children:i})};V.displayName="Command.Item";const G=({className:e})=>{const t=[r.default.separator,e].filter(Boolean).join(" ");return a.jsx(U.Divider,{spacing:"none",className:t})};G.displayName="Command.Separator";const M=({children:e,className:t})=>{const n=[r.default.shortcut,t].filter(Boolean).join(" ");return a.jsx("span",{className:n,children:e})};M.displayName="Command.Shortcut";const P=({open:e,onOpenChange:t,children:n,className:i})=>{if(s.useEffect(()=>{if(!e)return;const l=C=>{C.key==="Escape"&&t(!1)};return document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)},[e,t]),s.useEffect(()=>(e?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[e]),!e)return null;const c=l=>{l.target===l.currentTarget&&t(!1)};return H.createPortal(a.jsx("div",{className:r.default.dialogBackdrop,onClick:c,children:a.jsx("div",{className:[r.default.dialogContent,i].filter(Boolean).join(" "),children:a.jsx(d,{children:n})})}),document.body)};P.displayName="Command.Dialog";d.Input=R;d.List=q;d.Empty=L;d.Group=A;d.Item=V;d.Separator=G;d.Shortcut=M;d.Dialog=P;d.displayName="Command";function D(e){return typeof e=="string"?e:typeof e=="number"?String(e):Array.isArray(e)?e.map(D).join(" "):s.isValidElement(e)&&e.props?D(e.props.children):""}exports.Command=d;
|
package/dist/index27.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { jsx as a, jsxs as R } from "react/jsx-runtime";
|
|
|
2
2
|
import z, { useState as L, useRef as S, useId as F, useCallback as b, useMemo as W, createContext as J, useEffect as j, useContext as Q } from "react";
|
|
3
3
|
import { createPortal as X } from "react-dom";
|
|
4
4
|
import { Search as Y } from "lucide-react";
|
|
5
|
-
import s from "./
|
|
5
|
+
import s from "./index122.mjs";
|
|
6
6
|
import { Divider as Z } from "./index33.mjs";
|
|
7
7
|
const V = J(null);
|
|
8
8
|
function B() {
|
package/dist/index28.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),n=require("react"),w=require("lucide-react"),a=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),n=require("react"),w=require("lucide-react"),a=require("./index175.cjs"),S=n.forwardRef(({open:d,onOpenChange:c,commands:m,recentCommands:i,onSelect:D,placeholder:E="Type a command or search...",emptyMessage:C="No results found.",footer:N,className:L,...R},M)=>{const[r,b]=n.useState(""),[o,u]=n.useState(0),v=n.useRef(null),y=n.useRef(null),k=n.useMemo(()=>{if(!r)return m;const e=r.toLowerCase();return m.filter(t=>{const l=t.label.toLowerCase().includes(e),h=t.description?.toLowerCase().includes(e),j=t.keywords?.some(K=>K.toLowerCase().includes(e));return l||h||j})},[m,r]),p=n.useMemo(()=>{const e=[],t=[];return k.forEach(l=>{if(l.category){const h=e.find(j=>j.title===l.category);h?h.commands.push(l):e.push({title:l.category,commands:[l]})}else t.push(l)}),t.length>0&&e.unshift({title:"",commands:t}),e},[k]),f=n.useMemo(()=>{const e=[];return i&&i.length>0&&!r&&e.push(...i),p.forEach(t=>{e.push(...t.commands)}),e},[p,i,r]);n.useEffect(()=>{d&&(b(""),u(0),setTimeout(()=>v.current?.focus(),0))},[d]);const $=n.useCallback(e=>{switch(e.key){case"ArrowDown":e.preventDefault(),u(t=>Math.min(t+1,f.length-1));break;case"ArrowUp":e.preventDefault(),u(t=>Math.max(t-1,0));break;case"Enter":{e.preventDefault();const t=f[o];t&&!t.disabled&&x(t);break}case"Escape":e.preventDefault(),c(!1);break}},[f,o,c]),x=e=>{D?.(e),e.onSelect(),c(!1)};if(n.useEffect(()=>{const e=y.current;if(!e)return;const t=e.querySelector(`[data-index="${o}"]`);t&&t.scrollIntoView({block:"nearest"})},[o]),n.useEffect(()=>{const e=t=>{(t.metaKey||t.ctrlKey)&&t.key==="k"&&(t.preventDefault(),c(!d))};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[d,c]),!d)return null;const I=[a.default.commandBar,L].filter(Boolean).join(" ");let g=0;return s.jsx("div",{className:a.default.overlay,onClick:()=>c(!1),children:s.jsxs("div",{ref:M,className:I,onClick:e=>e.stopPropagation(),onKeyDown:$,...R,children:[s.jsxs("div",{className:a.default.inputWrapper,children:[s.jsx(w.Search,{size:18,className:a.default.searchIcon}),s.jsx("input",{ref:v,type:"text",className:a.default.input,placeholder:E,value:r,onChange:e=>{b(e.target.value),u(0)},autoComplete:"off",autoCorrect:"off",spellCheck:!1}),s.jsx("kbd",{className:a.default.shortcutHint,children:"ESC"})]}),s.jsx("div",{ref:y,className:a.default.results,children:f.length===0?s.jsx("div",{className:a.default.empty,children:C}):s.jsxs(s.Fragment,{children:[i&&i.length>0&&!r&&s.jsxs("div",{className:a.default.group,children:[s.jsx("div",{className:a.default.groupTitle,children:"Recent"}),i.map(e=>{const t=g++;return s.jsxs("button",{type:"button","data-index":t,className:`${a.default.item} ${t===o?a.default.itemSelected:""} ${e.disabled?a.default.itemDisabled:""}`,onClick:()=>!e.disabled&&x(e),onMouseEnter:()=>u(t),children:[e.icon&&s.jsx("span",{className:a.default.itemIcon,children:e.icon}),s.jsxs("span",{className:a.default.itemContent,children:[s.jsx("span",{className:a.default.itemLabel,children:e.label}),e.description&&s.jsx("span",{className:a.default.itemDescription,children:e.description})]}),e.shortcut&&s.jsx("kbd",{className:a.default.itemShortcut,children:e.shortcut})]},`recent-${e.id}`)})]}),p.map(e=>s.jsxs("div",{className:a.default.group,children:[e.title&&s.jsx("div",{className:a.default.groupTitle,children:e.title}),e.commands.map(t=>{const l=g++;return s.jsxs("button",{type:"button","data-index":l,className:`${a.default.item} ${l===o?a.default.itemSelected:""} ${t.disabled?a.default.itemDisabled:""}`,onClick:()=>!t.disabled&&x(t),onMouseEnter:()=>u(l),children:[t.icon&&s.jsx("span",{className:a.default.itemIcon,children:t.icon}),s.jsxs("span",{className:a.default.itemContent,children:[s.jsx("span",{className:a.default.itemLabel,children:t.label}),t.description&&s.jsx("span",{className:a.default.itemDescription,children:t.description})]}),t.shortcut&&s.jsx("kbd",{className:a.default.itemShortcut,children:t.shortcut})]},t.id)})]},e.title||"ungrouped"))]})}),N?s.jsx("div",{className:a.default.footer,children:N}):s.jsxs("div",{className:a.default.footer,children:[s.jsxs("span",{className:a.default.footerHint,children:[s.jsx(w.Command,{size:12})," ",s.jsx("span",{children:"K to toggle"})]}),s.jsxs("span",{className:a.default.footerHint,children:[s.jsx("span",{children:"↑↓"})," to navigate"]}),s.jsxs("span",{className:a.default.footerHint,children:[s.jsx("span",{children:"↵"})," to select"]})]})]})})});S.displayName="CommandBar";exports.CommandBar=S;
|
package/dist/index28.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as a, jsxs as n, Fragment as j } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as z, useState as E, useRef as C, useMemo as v, useEffect as y, useCallback as A } from "react";
|
|
3
3
|
import { Search as q, Command as F } from "lucide-react";
|
|
4
|
-
import s from "./
|
|
4
|
+
import s from "./index175.mjs";
|
|
5
5
|
const G = z(
|
|
6
6
|
({
|
|
7
7
|
open: u,
|
package/dist/index29.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),c=require("react"),e=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),c=require("react"),e=require("./index182.cjs"),t=c.forwardRef(({size:r="lg",centered:n=!0,padded:a=!0,className:o,children:i,...s},u)=>{const d=[e.default.container,e.default[r],n&&e.default.centered,a&&e.default.padded,o].filter(Boolean).join(" ");return l.jsx("div",{ref:u,className:d,...s,children:i})});t.displayName="Container";exports.Container=t;
|
package/dist/index29.mjs
CHANGED
package/dist/index30.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),f=require("react"),b=require("lucide-react"),e=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),f=require("react"),b=require("lucide-react"),e=require("./index166.cjs"),q=f.forwardRef(({left:n,right:i,children:u,className:x,...k},r)=>a.jsxs("div",{ref:r,className:`${e.default.toolbar} ${x||""}`,...k,children:[n&&a.jsx("div",{className:e.default.toolbarLeft,children:n}),u,i&&a.jsx("div",{className:e.default.toolbarRight,children:i})]}));q.displayName="DataTable.Toolbar";const I=f.forwardRef(({pagination:n,onChange:i,className:u,...x},k)=>{const{page:r,pageSize:h,total:N,pageSizeOptions:T=[10,25,50,100]}=n,m=Math.ceil(N/h),M=(r-1)*h+1,y=Math.min(r*h,N),v=o=>{o>=1&&o<=m&&i({page:o,pageSize:h})},g=o=>{i({page:1,pageSize:Number(o.target.value)})};return a.jsxs("div",{ref:k,className:`${e.default.pagination} ${u||""}`,...x,children:[a.jsxs("div",{className:e.default.paginationInfo,children:[a.jsxs("span",{className:e.default.paginationText,children:[M,"-",y," of ",N]}),a.jsx("select",{className:e.default.pageSizeSelect,value:h,onChange:g,children:T.map(o=>a.jsxs("option",{value:o,children:[o," / page"]},o))})]}),a.jsxs("div",{className:e.default.paginationControls,children:[a.jsx("button",{type:"button",className:e.default.paginationButton,onClick:()=>v(r-1),disabled:r<=1,"aria-label":"Previous page",children:a.jsx(b.ChevronLeft,{size:16})}),a.jsxs("span",{className:e.default.paginationPages,children:[r," / ",m]}),a.jsx("button",{type:"button",className:e.default.paginationButton,onClick:()=>v(r+1),disabled:r>=m,"aria-label":"Next page",children:a.jsx(b.ChevronRight,{size:16})})]})]})});I.displayName="DataTable.Pagination";const R=f.forwardRef(({state:n,className:i,...u},x)=>a.jsxs("div",{ref:x,className:`${e.default.emptyState} ${i||""}`,...u,children:[n.icon&&a.jsx("div",{className:e.default.emptyIcon,children:n.icon}),a.jsx("h3",{className:e.default.emptyTitle,children:n.title}),n.description&&a.jsx("p",{className:e.default.emptyDescription,children:n.description}),n.action&&a.jsx("div",{className:e.default.emptyAction,children:n.action})]}));R.displayName="DataTable.EmptyState";function oe({columns:n,data:i,rowKey:u="id",searchable:x=!1,searchPlaceholder:k="Search...",searchValue:r,onSearchChange:h,pagination:N,onPaginationChange:T,selectable:m=!1,selectedKeys:M,onSelectionChange:y,bulkActions:v,rowActions:g,sort:o,onSortChange:S,emptyState:B,loading:E=!1,striped:K=!1,hoverable:W=!0,compact:w=!1,stickyHeader:H=!1,maxHeight:U,onRowClick:_,toolbar:z,className:F,...G},J){const[Q,X]=f.useState(""),[Y,O]=f.useState([]),[Z,ee]=f.useState(),[P,V]=f.useState(null),$=r??Q,d=M??Y,p=o??Z,A=f.useCallback((t,s)=>typeof u=="function"?u(t,s):t[u]??s,[u]),ae=t=>{const s=t.target.value;h?h(s):X(s)},te=t=>{if(!t.sortable)return;let s;p?.key===t.key?p.direction==="asc"?s={key:t.key,direction:"desc"}:s=void 0:s={key:t.key,direction:"asc"},S?S(s):ee(s)},se=()=>{const t=i.map((c,j)=>A(c,j)),s=d.length===i.length?[]:t;y?y(s):O(s)},le=t=>{const s=d.includes(t)?d.filter(c=>c!==t):[...d,t];y?y(s):O(s)},D=f.useMemo(()=>{let t=[...i];if(!h&&$){const s=$.toLowerCase();t=t.filter(c=>Object.values(c).some(j=>String(j).toLowerCase().includes(s)))}return!S&&p&&t.sort((s,c)=>{const j=s[p.key],l=c[p.key],L=String(j).localeCompare(String(l));return p.direction==="asc"?L:-L}),t},[i,$,p,h,S]),ne=[e.default.dataTable,w&&e.default.compact,F].filter(Boolean).join(" "),ie=[e.default.table,K&&e.default.striped,W&&e.default.hoverable,H&&e.default.stickyHeader].filter(Boolean).join(" "),ce=i.length>0&&d.length===i.length,de=d.length>0&&d.length<i.length,re={icon:a.jsx(b.Inbox,{size:48}),title:"No data",description:"There are no items to display."};return a.jsxs("div",{ref:J,className:ne,...G,children:[(x||z||m&&d.length>0)&&a.jsxs("div",{className:e.default.toolbar,children:[a.jsxs("div",{className:e.default.toolbarLeft,children:[m&&d.length>0&&v&&a.jsxs("div",{className:e.default.bulkActions,children:[a.jsxs("span",{className:e.default.selectedCount,children:[d.length," selected"]}),v.map(t=>a.jsxs("button",{type:"button",className:`${e.default.bulkAction} ${t.variant==="danger"?e.default.bulkActionDanger:""}`,onClick:()=>t.onClick(d),children:[t.icon,a.jsx("span",{children:t.label})]},t.key))]}),z]}),a.jsx("div",{className:e.default.toolbarRight,children:x&&a.jsxs("div",{className:e.default.searchWrapper,children:[a.jsx(b.Search,{size:16,className:e.default.searchIcon}),a.jsx("input",{type:"text",className:e.default.searchInput,placeholder:k,value:$,onChange:ae})]})})]}),a.jsx("div",{className:e.default.tableContainer,style:{maxHeight:U},children:E?a.jsx("div",{className:e.default.loadingOverlay,children:a.jsx("div",{className:e.default.spinner})}):D.length===0?a.jsx(R,{state:B||re}):a.jsxs("table",{className:ie,children:[a.jsx("thead",{className:e.default.thead,children:a.jsxs("tr",{children:[m&&a.jsx("th",{className:`${e.default.th} ${e.default.checkboxCell}`,children:a.jsx("input",{type:"checkbox",className:e.default.checkbox,checked:ce,ref:t=>{t&&(t.indeterminate=de)},onChange:se,"aria-label":"Select all rows"})}),n.map(t=>a.jsx("th",{className:`${e.default.th} ${t.sortable?e.default.sortable:""} ${t.sticky?e.default[`sticky-${t.sticky}`]:""} ${t.hideOnMobile?e.default.hideOnMobile:""}`,style:{width:t.width,minWidth:t.minWidth,textAlign:t.align},onClick:()=>te(t),children:a.jsxs("span",{className:e.default.thContent,children:[t.header,t.sortable&&a.jsx("span",{className:e.default.sortIcon,children:p?.key===t.key?p.direction==="asc"?a.jsx(b.ChevronUp,{size:14}):a.jsx(b.ChevronDown,{size:14}):a.jsx(b.ChevronUp,{size:14,className:e.default.sortIconInactive})})]})},t.key)),g&&g.length>0&&a.jsx("th",{className:`${e.default.th} ${e.default.actionsCell}`,children:a.jsx("span",{className:"sr-only",children:"Actions"})})]})}),a.jsx("tbody",{className:e.default.tbody,children:D.map((t,s)=>{const c=A(t,s),j=d.includes(c);return a.jsxs("tr",{className:`${e.default.tr} ${j?e.default.trSelected:""}`,onClick:l=>{l.target.closest(`.${e.default.checkbox}`)||l.target.closest(`.${e.default.actionMenu}`)||_?.(t,s)},children:[m&&a.jsx("td",{className:`${e.default.td} ${e.default.checkboxCell}`,children:a.jsx("input",{type:"checkbox",className:e.default.checkbox,checked:j,onChange:()=>le(c),"aria-label":`Select row ${s+1}`})}),n.map(l=>a.jsx("td",{className:`${e.default.td} ${l.sticky?e.default[`sticky-${l.sticky}`]:""} ${l.hideOnMobile?e.default.hideOnMobile:""}`,style:{textAlign:l.align},children:l.render?l.render(t[l.key],t,s):String(t[l.key]??"")},l.key)),g&&g.length>0&&a.jsx("td",{className:`${e.default.td} ${e.default.actionsCell}`,children:a.jsxs("div",{className:e.default.actionMenu,children:[a.jsx("button",{type:"button",className:e.default.actionMenuTrigger,onClick:()=>V(P===c?null:c),"aria-label":"Row actions",children:a.jsx(b.MoreHorizontal,{size:16})}),P===c&&a.jsx("div",{className:e.default.actionMenuDropdown,children:g.filter(l=>!l.show||l.show(t)).map(l=>a.jsxs("button",{type:"button",className:`${e.default.actionMenuItem} ${l.variant==="danger"?e.default.actionMenuItemDanger:""}`,onClick:()=>{l.onClick(t),V(null)},children:[l.icon,a.jsx("span",{children:l.label})]},l.key))})]})})]},c)})})]})}),N&&D.length>0&&a.jsx(I,{pagination:N,onChange:T||(()=>{})})]})}const C=f.forwardRef(oe);C.Toolbar=q;C.Pagination=I;C.EmptyState=R;exports.DataTable=C;
|
package/dist/index30.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as n, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as T, useState as M, useCallback as pe, useMemo as me } from "react";
|
|
3
3
|
import { Search as be, ChevronUp as E, ChevronDown as Ne, MoreHorizontal as ge, Inbox as ye, ChevronLeft as ke, ChevronRight as ue } from "lucide-react";
|
|
4
|
-
import e from "./
|
|
4
|
+
import e from "./index166.mjs";
|
|
5
5
|
const K = T(
|
|
6
6
|
({ left: i, right: c, children: p, className: N, ...v }, d) => /* @__PURE__ */ n("div", { ref: d, className: `${e.toolbar} ${N || ""}`, ...v, children: [
|
|
7
7
|
i && /* @__PURE__ */ t("div", { className: e.toolbarLeft, children: i }),
|
package/dist/index31.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),r=require("react"),d=require("date-fns"),O=require("lucide-react"),l=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),r=require("react"),d=require("date-fns"),O=require("lucide-react"),l=require("./index137.cjs"),h=require("./index15.cjs"),R=require("./index58.cjs"),F=require("./index14.cjs"),x=e=>{const{mode:a="single",min:S,max:b,disabledDates:v,placeholder:m="Pick a date",presets:i,format:c="PPP",disabled:C=!1,triggerClassName:P,className:N}=e,[k,o]=r.useState(!1),f=r.useMemo(()=>a==="single"&&e.mode!=="range"?e.selected?d.format(e.selected,c):null:a==="range"&&e.mode==="range"&&e.selected?.from?e.selected.to?`${d.format(e.selected.from,c)} - ${d.format(e.selected.to,c)}`:d.format(e.selected.from,c):null,[a,e,c]),g=r.useCallback(n=>{if(a==="single"&&e.mode!=="range"){const s=e.onSelect;s?.(n),o(!1)}else if(a==="range"&&e.mode==="range"){const s=e.onSelect,u=n;s?.(u),u?.from&&u?.to&&o(!1)}},[a,e]),q=r.useCallback(n=>{if(a==="single"&&e.mode!=="range"){const s=e.onSelect;s?.(n.value)}else if(a==="range"&&e.mode==="range"){const s=e.onSelect;s?.(n.value)}o(!1)},[a,e]),y=[l.default.trigger,P].filter(Boolean).join(" "),B=[l.default.wrapper,N].filter(Boolean).join(" "),j={min:S,max:b,disabled:v},D=t.jsxs("div",{className:l.default.popoverContent,children:[i&&i.length>0&&t.jsx("div",{className:l.default.presets,children:i.map(n=>t.jsx("button",{type:"button",className:l.default.presetButton,onClick:()=>q(n),children:n.label},n.label))}),a==="single"?t.jsx(h.Calendar,{mode:"single",selected:e.mode!=="range"?e.selected:void 0,onSelect:g,...j}):t.jsx(h.Calendar,{mode:"range",selected:e.mode==="range"?e.selected:void 0,onSelect:g,...j})]}),w=t.jsx(F.Button,{variant:"secondary",className:y,disabled:C,"aria-label":m,icon:t.jsx(O.Calendar,{size:16,className:l.default.triggerIcon}),children:f?t.jsx("span",{children:f}):t.jsx("span",{className:l.default.placeholder,children:m})});return t.jsx("div",{className:B,children:t.jsx(R.Popover,{trigger:w,content:D,placement:"bottom-start",open:k,onOpenChange:o,showArrow:!1,offset:4,className:l.default.popover})})};x.displayName="DatePicker";exports.DatePicker=x;
|
package/dist/index31.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { jsxs as $, jsx as n } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState as O, useMemo as z, useCallback as h } from "react";
|
|
3
3
|
import { format as c } from "date-fns";
|
|
4
4
|
import { Calendar as A } from "lucide-react";
|
|
5
|
-
import a from "./
|
|
5
|
+
import a from "./index137.mjs";
|
|
6
6
|
import { Calendar as S } from "./index15.mjs";
|
|
7
7
|
import { Popover as F } from "./index58.mjs";
|
|
8
8
|
import { Button as I } from "./index14.mjs";
|
package/dist/index32.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),a=require("react"),P=require("lucide-react"),e=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),a=require("react"),P=require("lucide-react"),e=require("./index179.cjs"),u=a.forwardRef(({open:t,onClose:s,title:f,description:m,subtitle:d,children:v,size:h="md",position:y="right",headerActions:j,footer:n,overlay:N=!0,closeOnOverlayClick:x=!0,closeOnEscape:r=!0,loading:b=!1,className:p,...w},D)=>{const c=a.useRef(null),o=m??d;if(a.useEffect(()=>{d&&process.env.NODE_ENV==="development"&&console.warn('[DetailPanel] The "subtitle" prop is deprecated. Use "description" instead. subtitle will be removed in v3.0.')},[d]),a.useEffect(()=>{if(!t||!r)return;const i=k=>{k.key==="Escape"&&s()};return document.addEventListener("keydown",i),()=>document.removeEventListener("keydown",i)},[t,r,s]),a.useEffect(()=>{if(t){const i=document.body.style.overflow;return document.body.style.overflow="hidden",setTimeout(()=>{c.current?.focus()},0),()=>{document.body.style.overflow=i}}},[t]),!t)return null;const E=()=>{x&&s()},g=[e.default.panel,e.default[`size-${h}`],e.default[`position-${y}`],p].filter(Boolean).join(" ");return l.jsxs("div",{className:e.default.container,children:[N&&l.jsx("div",{className:e.default.overlay,onClick:E,"aria-hidden":"true"}),l.jsxs("div",{ref:D||c,className:g,role:"dialog","aria-modal":"true","aria-labelledby":"detail-panel-title",tabIndex:-1,...w,children:[l.jsxs("div",{className:e.default.header,children:[l.jsxs("div",{className:e.default.headerContent,children:[l.jsx("h2",{id:"detail-panel-title",className:e.default.title,children:f}),o&&l.jsx("p",{className:e.default.subtitle,children:o})]}),l.jsxs("div",{className:e.default.headerActions,children:[j,l.jsx("button",{type:"button",className:e.default.closeButton,onClick:s,"aria-label":"Close panel",children:l.jsx(P.X,{size:20})})]})]}),l.jsx("div",{className:e.default.body,children:b?l.jsx("div",{className:e.default.loading,children:l.jsx("div",{className:e.default.spinner})}):v}),n&&l.jsx("div",{className:e.default.footer,children:n})]})]})});u.displayName="DetailPanel";exports.DetailPanel=u;
|
package/dist/index32.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as a, jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as P, useRef as R, useEffect as s } from "react";
|
|
3
3
|
import { X as z } from "lucide-react";
|
|
4
|
-
import e from "./
|
|
4
|
+
import e from "./index179.mjs";
|
|
5
5
|
const B = P(
|
|
6
6
|
({
|
|
7
7
|
open: l,
|
package/dist/index33.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),c=require("react"),e=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),c=require("react"),e=require("./index120.cjs"),l=c.forwardRef(({orientation:s="horizontal",variant:t="solid",spacing:d="md",label:r,className:o,...n},u)=>{const i=[e.default.divider,e.default[s],e.default[t],e.default[`spacing-${d}`],r&&e.default.withLabel,o].filter(Boolean).join(" ");return r&&s==="horizontal"?a.jsxs("div",{className:i,role:"separator","aria-orientation":s,children:[a.jsx("span",{className:e.default.line}),a.jsx("span",{className:e.default.label,children:r}),a.jsx("span",{className:e.default.line})]}):a.jsx("hr",{ref:u,className:i,role:"separator","aria-orientation":s,...n})});l.displayName="Divider";exports.Divider=l;
|
package/dist/index33.mjs
CHANGED
package/dist/index34.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),s=require("react"),g=require("react-dom"),a=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),s=require("react"),g=require("react-dom"),a=require("./index174.cjs"),u=s.forwardRef(({children:e,className:r,...o},d)=>t.jsx("div",{ref:d,className:`${a.default.header} ${r||""}`,...o,children:e}));u.displayName="Drawer.Header";const f=s.forwardRef(({children:e,className:r,...o},d)=>t.jsx("div",{ref:d,className:`${a.default.body} ${r||""}`,...o,children:e}));f.displayName="Drawer.Body";const w=s.forwardRef(({children:e,className:r,...o},d)=>t.jsx("div",{ref:d,className:`${a.default.footer} ${r||""}`,...o,children:e}));w.displayName="Drawer.Footer";const m=s.forwardRef(({open:e,onClose:r,placement:o="right",size:d="md",closeOnBackdrop:n=!0,closeOnEscape:c=!0,showCloseButton:y=!0,children:v,className:b,...h},j)=>{const l=s.useCallback(i=>{c&&i.key==="Escape"&&r()},[c,r]),k=s.useCallback(()=>{n&&r()},[n,r]);if(s.useEffect(()=>{if(e){const i=document.body.style.overflow;return document.body.style.overflow="hidden",document.addEventListener("keydown",l),()=>{document.body.style.overflow=i,document.removeEventListener("keydown",l)}}},[e,l]),!e)return null;const x=[a.default.overlay,e&&a.default.overlayVisible].filter(Boolean).join(" "),D=[a.default.drawer,a.default[o],a.default[`size-${d}`],e&&a.default.drawerVisible,b].filter(Boolean).join(" "),N=t.jsxs("div",{className:x,children:[t.jsx("div",{className:a.default.backdrop,onClick:k,"aria-hidden":"true"}),t.jsxs("div",{ref:j,className:D,role:"dialog","aria-modal":"true",...h,children:[y&&t.jsx("button",{type:"button",className:a.default.closeButton,onClick:r,"aria-label":"Close drawer",children:t.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:"M15 5L5 15M5 5L15 15",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),v]})]});return g.createPortal(N,document.body)});m.displayName="Drawer";const p=Object.assign(m,{Header:u,Body:f,Footer:w});exports.Drawer=p;
|
package/dist/index34.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as m, jsx as d } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as s, useCallback as u, useEffect as j } from "react";
|
|
3
3
|
import { createPortal as L } from "react-dom";
|
|
4
|
-
import o from "./
|
|
4
|
+
import o from "./index174.mjs";
|
|
5
5
|
const w = s(
|
|
6
6
|
({ children: e, className: r, ...t }, a) => /* @__PURE__ */ d(
|
|
7
7
|
"div",
|
package/dist/index35.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),s=require("react"),U=require("react-dom"),i=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),s=require("react"),U=require("react-dom"),i=require("./index136.cjs"),V=(e,l,m)=>{const r=window.scrollX,c=window.scrollY,u=4;let n=0,h=0;switch(m){case"bottom-start":n=e.bottom+c+u,h=e.left+r;break;case"bottom":n=e.bottom+c+u,h=e.left+r+(e.width-l.width)/2;break;case"bottom-end":n=e.bottom+c+u,h=e.right+r-l.width;break;case"top-start":n=e.top+c-l.height-u,h=e.left+r;break;case"top":n=e.top+c-l.height-u,h=e.left+r+(e.width-l.width)/2;break;case"top-end":n=e.top+c-l.height-u,h=e.right+r-l.width;break}return{top:n,left:h}},_=({item:e,onSelect:l,onNavigate:m})=>{const r=()=>{e.disabled||(e.onClick?.(),l())},c=n=>{n.key==="Enter"||n.key===" "?(n.preventDefault(),r()):n.key==="ArrowDown"?(n.preventDefault(),m?.("down")):n.key==="ArrowUp"&&(n.preventDefault(),m?.("up"))},u=[i.default.item,e.disabled&&i.default.disabled,e.danger&&i.default.danger].filter(Boolean).join(" ");return a.jsxs("div",{className:u,role:"menuitem",tabIndex:e.disabled?-1:0,"aria-disabled":e.disabled,onClick:r,onKeyDown:c,children:[e.icon&&a.jsx("span",{className:i.default.icon,"aria-hidden":"true",children:e.icon}),a.jsx("span",{className:i.default.label,children:e.label}),e.shortcut&&a.jsx("span",{className:i.default.shortcut,"aria-hidden":"true",children:e.shortcut})]})},P=s.forwardRef(({trigger:e,items:l=[],groups:m=[],placement:r="bottom-start",open:c,onOpenChange:u,onSelect:n,minWidth:h=180,closeOnSelect:y=!0,className:F,...S},A)=>{const[B,M]=s.useState(!1),[C,z]=s.useState({top:0,left:0}),[v,E]=s.useState(-1),w=s.useRef(null),k=s.useRef(null),x=s.useRef(new Map);s.useImperativeHandle(A,()=>w.current);const j=c!==void 0,f=j?c:B,I=(m.length>0?m:[{items:l}]).flatMap(t=>t.items).filter(t=>!t.disabled),b=s.useCallback(t=>{j||M(t),u?.(t),t||E(-1)},[j,u]),p=s.useCallback(()=>{if(!w.current||!k.current)return;const t=w.current.getBoundingClientRect(),d=k.current.getBoundingClientRect(),o=V(t,d,r);z(o)},[r]);s.useEffect(()=>{if(f)return requestAnimationFrame(p),window.addEventListener("resize",p),window.addEventListener("scroll",p,!0),requestAnimationFrame(()=>{const t=x.current.get(0);t&&(t.focus(),E(0))}),()=>{window.removeEventListener("resize",p),window.removeEventListener("scroll",p,!0)}},[f,p]),s.useEffect(()=>{if(!f)return;const t=d=>{const o=d.target;w.current&&!w.current.contains(o)&&k.current&&!k.current.contains(o)&&b(!1)};return document.addEventListener("mousedown",t),()=>document.removeEventListener("mousedown",t)},[f,b]),s.useEffect(()=>{if(!f)return;const t=d=>{d.key==="Escape"&&b(!1)};return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[f,b]);const K=s.useCallback(()=>{b(!f)},[f,b]),T=s.useCallback(t=>{n?.(t),y&&b(!1)},[y,n,b]),X=s.useCallback(t=>{const d=I.length;if(d===0)return;let o;t==="down"?o=v<d-1?v+1:0:o=v>0?v-1:d-1,E(o),x.current.get(o)?.focus()},[v,I.length]),Y=s.isValidElement(e)?s.cloneElement(e,{onClick:K,"aria-expanded":f,"aria-haspopup":"menu"}):e,D=m.length>0?m:[{items:l}],H=[i.default.menu,f&&i.default.visible,F].filter(Boolean).join(" ");let N=0;const O=a.jsx("div",{ref:k,className:H,style:{top:C.top,left:C.left,minWidth:h},role:"menu","aria-orientation":"vertical",...S,children:D.map((t,d)=>a.jsxs("div",{className:i.default.group,children:[t.label&&a.jsx("div",{className:i.default.groupLabel,children:t.label}),t.items.map(o=>{const L=N;return o.disabled||N++,a.jsx("div",{ref:q=>{q&&!o.disabled&&x.current.set(L,q)},children:a.jsx(_,{item:o,onSelect:()=>T(o),onNavigate:X})},o.id)}),d<D.length-1&&a.jsx("div",{className:i.default.separator,role:"separator"})]},d))});return a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:w,className:i.default.trigger,children:Y}),f&&U.createPortal(O,document.body)]})});P.displayName="Dropdown";exports.Dropdown=P;
|
package/dist/index35.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as m, jsxs as L, Fragment as O } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as Q, useState as N, useRef as C, useImperativeHandle as W, useCallback as k, useEffect as x, isValidElement as Z, cloneElement as _ } from "react";
|
|
3
3
|
import { createPortal as $ } from "react-dom";
|
|
4
|
-
import r from "./
|
|
4
|
+
import r from "./index136.mjs";
|
|
5
5
|
const g = (e, s, u) => {
|
|
6
6
|
const a = window.scrollX, i = window.scrollY, d = 4;
|
|
7
7
|
let n = 0, f = 0;
|
package/dist/index36.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),f=require("react"),e=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),f=require("react"),e=require("./index114.cjs"),r=f.forwardRef(({icon:a,title:i,description:s,action:l,secondaryAction:d,size:c="md",className:m,...u},n)=>{const o=[e.default.emptyState,e.default[c],m].filter(Boolean).join(" ");return t.jsxs("div",{ref:n,className:o,...u,children:[a&&t.jsx("div",{className:e.default.icon,"aria-hidden":"true",children:a}),t.jsx("h3",{className:e.default.title,children:i}),s&&t.jsx("p",{className:e.default.description,children:s}),(l||d)&&t.jsxs("div",{className:e.default.actions,children:[l,d]})]})});r.displayName="EmptyState";exports.EmptyState=r;
|
package/dist/index36.mjs
CHANGED
package/dist/index37.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),o=require("react"),a=require("lucide-react"),t=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),o=require("react"),a=require("lucide-react"),t=require("./index173.cjs");class i extends o.Component{constructor(r){super(r),this.reset=()=>{this.setState({hasError:!1,error:null})},this.state={hasError:!1,error:null}}static getDerivedStateFromError(r){return{hasError:!0,error:r}}componentDidCatch(r,s){this.props.onError?.(r,s)}componentDidUpdate(r){this.state.hasError&&this.props.resetKey!==void 0&&r.resetKey!==this.props.resetKey&&this.reset()}render(){if(this.state.hasError&&this.state.error){const{fallback:r}=this.props;return typeof r=="function"?r(this.state.error,this.reset):r||e.jsxs("div",{className:t.default.errorBoundary,role:"alert",children:[e.jsx(a.AlertCircle,{size:32,className:t.default.icon}),e.jsx("p",{className:t.default.title,children:"Something went wrong"}),e.jsx("p",{className:t.default.message,children:this.state.error.message}),e.jsx("button",{className:t.default.resetButton,onClick:this.reset,type:"button",children:"Try again"})]})}return this.props.children}}exports.ErrorBoundary=i;
|
package/dist/index37.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as o, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import i from "react";
|
|
3
3
|
import { AlertCircle as a } from "lucide-react";
|
|
4
|
-
import e from "./
|
|
4
|
+
import e from "./index173.mjs";
|
|
5
5
|
class m extends i.Component {
|
|
6
6
|
constructor(r) {
|
|
7
7
|
super(r), this.reset = () => {
|