@orion-ds/react 5.2.0 → 5.3.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/README.md CHANGED
@@ -14,7 +14,7 @@ TypeScript-first React component library built on the Orion Design System. Featu
14
14
  - 🤖 **AI-First Design** - Optimized for AI/LLM code generation (see AI_GUIDE.md)
15
15
  - ✅ **70+ Components** - Fully typed with IntelliSense support
16
16
  - 📐 **25+ Sections** - Pre-built page sections (Hero, Features, Pricing, etc.)
17
- - 📄 **8 Templates** - Complete page templates (Dashboard, Login, Profile, Settings, Chat, etc.)
17
+ - 📄 **7 Templates** - Complete page templates (Dashboard, Login, Profile, Settings, Chat, etc.)
18
18
  - 🎨 **Theme Switching** - Light/Dark modes with CSS variables
19
19
  - 🏢 **Multi-Brand** - orion, red, deepblue, orange, lemon brands
20
20
  - 🎯 **Lucide Icons** - 5000+ icons built-in
@@ -279,7 +279,6 @@ console.warn('Missing fonts:', missing);
279
279
 
280
280
  ### AI & Collaboration
281
281
 
282
- - **Chat** - Conversational UI component
283
282
  - **AgentCard** - Agent profile card
284
283
  - **CommandBar** - Command palette
285
284
  - **NotificationCenter** - Notification management
@@ -331,7 +330,6 @@ Complete full-page templates ready to use:
331
330
  | `LoginTemplate` | Authentication and login flows |
332
331
  | `ProfilePageTemplate` | User profile pages |
333
332
  | `SettingsTemplate` | Settings and preferences pages |
334
- | `ChatPageTemplate` | AI chat interface and conversations |
335
333
  | `AgentWorkspace` | AI agent builder and management |
336
334
  | `AgentEditor` | AI agent configuration editor |
337
335
  | `KanbanPageTemplate` | Kanban board for task management |
@@ -409,7 +407,6 @@ These components require optional peer dependencies. Install only what you need:
409
407
  | `@orion-ds/react/calendar` | `Calendar`, `DatePicker` | `date-fns` | `npm install date-fns` |
410
408
  | `@orion-ds/react/editor` | `CodeEditor` | `react-syntax-highlighter` | `npm install react-syntax-highlighter` |
411
409
  | `@orion-ds/react/dnd` | `CollapsibleFolder`, `KanbanBoard` | `@dnd-kit/core`, `@dnd-kit/sortable`, `@dnd-kit/utilities` | `npm install @dnd-kit/core @dnd-kit/sortable @dnd-kit/utilities` |
412
- | `@orion-ds/react/rich` | `Chat`, `RichText` | `react-markdown`, `remark-gfm`, `react-syntax-highlighter` | `npm install react-markdown remark-gfm react-syntax-highlighter` |
413
410
 
414
411
  ```typescript
415
412
  // Only import if you've installed the peer dependency
@@ -417,7 +414,6 @@ import { ChartContainer } from "@orion-ds/react/chart"; // requires recharts
417
414
  import { Calendar } from "@orion-ds/react/calendar"; // requires date-fns
418
415
  import { CodeEditor } from "@orion-ds/react/editor"; // requires react-syntax-highlighter
419
416
  import { CollapsibleFolder } from "@orion-ds/react/dnd"; // requires @dnd-kit/*
420
- import { Chat } from "@orion-ds/react/rich"; // requires react-markdown
421
417
  ```
422
418
 
423
419
  ### Sections & Templates
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),c=require("react"),k=require("lucide-react"),V=require("../MissingDependencyError.cjs"),r=require("./Calendar.module.css.cjs"),N=require("../Button/Button.cjs");let g,w,I,q,A,B,T,a,b,x,S,C,y,W=null;try{const e=require("date-fns");g=e.startOfMonth,w=e.endOfMonth,I=e.startOfWeek,q=e.endOfWeek,A=e.eachDayOfInterval,B=e.addMonths,T=e.subMonths,a=e.isSameDay,b=e.isSameMonth,x=e.isToday,S=e.isBefore,C=e.isAfter,y=e.format}catch(e){W=e instanceof Error?e:new Error("date-fns not found")}const X=["Su","Mo","Tu","We","Th","Fr","Sa"];function Z(e,s){const d=e.length,u=(s%d+d)%d;return[...e.slice(u),...e.slice(0,u)]}const L=e=>{if(W)return o.jsx(V.MissingDependencyError,{available:!1,componentName:"Calendar",depName:"date-fns",installCommand:"npm install date-fns",pnpmCommand:"pnpm add date-fns",docsUrl:"https://docs.orion-ds.dev/components/calendar"});const{mode:s="single",min:d,max:u,disabled:m,weekStartsOn:h=0,showOutsideDays:R=!0,className:_,...z}=e,{selected:ee,onSelect:te,...P}=z,[f,O]=c.useState(()=>s==="single"&&e.mode!=="range"&&e.mode!=="multiple"&&e.selected?g(e.selected):s==="range"&&e.mode==="range"&&e.selected?.from?g(e.selected.from):g(new Date)),F=c.useMemo(()=>{const t=g(f),n=w(f),l=I(t,{weekStartsOn:h}),i=q(n,{weekStartsOn:h});return A({start:l,end:i})},[f,h]),H=c.useMemo(()=>Z(X,h),[h]),M=c.useCallback(t=>d&&S(t,$(d))||u&&C(t,p(u))?!0:m?Array.isArray(m)?m.some(n=>a(n,t)):m(t):!1,[d,u,m]),v=c.useCallback(t=>s==="single"&&e.mode!=="range"&&e.mode!=="multiple"?e.selected?a(e.selected,t):!1:s==="multiple"&&e.mode==="multiple"?e.selected?.some(n=>a(n,t))??!1:!1,[s,e]),j=c.useCallback(t=>{if(s!=="range"||e.mode!=="range"||!e.selected)return null;const{from:n,to:l}=e.selected;return n?l?a(t,n)&&a(t,l)||a(t,n)?"start":a(t,l)?"end":C(t,n)&&S(t,l)?"middle":null:a(t,n)?"start":null:null},[s,e]),K=c.useCallback(t=>{if(!M(t)){if(s==="single"&&e.mode!=="range"&&e.mode!=="multiple"){const n=e.onSelect;n?.(t)}else if(s==="range"&&e.mode==="range"){const n=e.onSelect,l=e.selected;!l?.from||l.from&&l.to?n?.({from:t,to:void 0}):S(t,l.from)?n?.({from:t,to:l.from}):n?.({from:l.from,to:t})}else if(s==="multiple"&&e.mode==="multiple"){const n=e.onSelect,l=e.selected??[],i=l.findIndex(E=>a(E,t));i>=0?n?.(l.filter((E,Q)=>Q!==i)):n?.([...l,t])}}},[s,e,M]),U=()=>O(t=>T(t,1)),Y=()=>O(t=>B(t,1)),G=t=>{const n=[r.default.day];if(!b(t,f)&&n.push(r.default.outside),x(t)&&n.push(r.default.today),M(t)&&n.push(r.default.disabled),s==="range"){const i=j(t);i==="start"&&(n.push(r.default.rangeStart),e.mode==="range"&&e.selected?.from&&e.selected?.to&&a(e.selected.from,e.selected.to)&&n.push(r.default.rangeEnd)),i==="middle"&&n.push(r.default.rangeMiddle),i==="end"&&n.push(r.default.rangeEnd)}else v(t)&&n.push(r.default.selected);return n.join(" ")},J=[r.default.calendar,_].filter(Boolean).join(" "),D=c.useId();return o.jsxs("div",{className:J,...P,children:[o.jsxs("div",{className:r.default.header,children:[o.jsx(N.Button,{variant:"ghost",iconOnly:!0,size:"sm",icon:o.jsx(k.ChevronLeft,{size:16}),onClick:U,"aria-label":"Previous month"}),o.jsx("span",{id:D,className:r.default.monthLabel,children:y(f,"MMMM yyyy")}),o.jsx(N.Button,{variant:"ghost",iconOnly:!0,size:"sm",icon:o.jsx(k.ChevronRight,{size:16}),onClick:Y,"aria-label":"Next month"})]}),o.jsxs("div",{className:r.default.grid,role:"grid","aria-labelledby":D,children:[H.map(t=>o.jsx("div",{className:r.default.weekday,role:"columnheader","aria-label":t,children:t},t)),F.map(t=>!b(t,f)&&!R?o.jsx("div",{},t.toISOString()):o.jsx("button",{type:"button",className:G(t),onClick:()=>K(t),disabled:M(t),tabIndex:x(t)?0:-1,"aria-label":y(t,"EEEE, MMMM d, yyyy"),"aria-selected":v(t)||j(t)!==null,children:y(t,"d")},t.toISOString()))]})]})};L.displayName="Calendar";function $(e){const s=new Date(e);return s.setHours(0,0,0,0),s}function p(e){const s=new Date(e);return s.setHours(23,59,59,999),s}exports.Calendar=L;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),i=require("react"),I=require("lucide-react"),$=require("../MissingDependencyError.cjs"),p=require("../../utils/optionalDeps.cjs"),l=require("./Calendar.module.css.cjs"),q=require("../Button/Button.cjs");let g,w,A,B,T,L,W,a,x,C,S,k,y;try{const e=require("date-fns");g=e.startOfMonth,w=e.endOfMonth,A=e.startOfWeek,B=e.endOfWeek,T=e.eachDayOfInterval,L=e.addMonths,W=e.subMonths,a=e.isSameDay,x=e.isSameMonth,C=e.isToday,S=e.isBefore,k=e.isAfter,y=e.format}catch{}const ee=["Su","Mo","Tu","We","Th","Fr","Sa"];function te(e,s){const u=e.length,d=(s%u+u)%u;return[...e.slice(d),...e.slice(0,d)]}const P=e=>{const{mode:s="single",min:u,max:d,disabled:m,weekStartsOn:h=0,showOutsideDays:R=!0,className:_,...z}=e,{selected:re,onSelect:le,...F}=z,[D,b]=i.useState(),[H,K]=i.useState(!0),[f,O]=i.useState(()=>s==="single"&&e.mode!=="range"&&e.mode!=="multiple"&&e.selected?g(e.selected):s==="range"&&e.mode==="range"&&e.selected?.from?g(e.selected.from):g(new Date));i.useEffect(()=>{(async()=>{try{const n=p.checkComponent("Calendar");n instanceof Promise?b(await n):b(n)}catch{b(void 0)}finally{K(!1)}})()},[]);const Y=i.useMemo(()=>{const t=g(f),n=w(f),r=A(t,{weekStartsOn:h}),c=B(n,{weekStartsOn:h});return T({start:r,end:c})},[f,h]),G=i.useMemo(()=>te(ee,h),[h]),M=i.useCallback(t=>u&&S(t,ne(u))||d&&k(t,se(d))?!0:m?Array.isArray(m)?m.some(n=>a(n,t)):m(t):!1,[u,d,m]),j=i.useCallback(t=>s==="single"&&e.mode!=="range"&&e.mode!=="multiple"?e.selected?a(e.selected,t):!1:s==="multiple"&&e.mode==="multiple"?e.selected?.some(n=>a(n,t))??!1:!1,[s,e]),v=i.useCallback(t=>{if(s!=="range"||e.mode!=="range"||!e.selected)return null;const{from:n,to:r}=e.selected;return n?r?a(t,n)&&a(t,r)||a(t,n)?"start":a(t,r)?"end":k(t,n)&&S(t,r)?"middle":null:a(t,n)?"start":null:null},[s,e]),J=i.useCallback(t=>{if(!M(t)){if(s==="single"&&e.mode!=="range"&&e.mode!=="multiple"){const n=e.onSelect;n?.(t)}else if(s==="range"&&e.mode==="range"){const n=e.onSelect,r=e.selected;!r?.from||r.from&&r.to?n?.({from:t,to:void 0}):S(t,r.from)?n?.({from:t,to:r.from}):n?.({from:r.from,to:t})}else if(s==="multiple"&&e.mode==="multiple"){const n=e.onSelect,r=e.selected??[],c=r.findIndex(N=>a(N,t));c>=0?n?.(r.filter((N,Z)=>Z!==c)):n?.([...r,t])}}},[s,e,M]),Q=()=>O(t=>W(t,1)),U=()=>O(t=>L(t,1)),V=t=>{const n=[l.default.day];if(!x(t,f)&&n.push(l.default.outside),C(t)&&n.push(l.default.today),M(t)&&n.push(l.default.disabled),s==="range"){const c=v(t);c==="start"&&(n.push(l.default.rangeStart),e.mode==="range"&&e.selected?.from&&e.selected?.to&&a(e.selected.from,e.selected.to)&&n.push(l.default.rangeEnd)),c==="middle"&&n.push(l.default.rangeMiddle),c==="end"&&n.push(l.default.rangeEnd)}else j(t)&&n.push(l.default.selected);return n.join(" ")},E=i.useId();if(D)return o.jsx($.MissingDependencyError,{...D});if(H)return o.jsx("div",{children:"Loading calendar..."});const X=[l.default.calendar,_].filter(Boolean).join(" ");return o.jsxs("div",{className:X,...F,children:[o.jsxs("div",{className:l.default.header,children:[o.jsx(q.Button,{variant:"ghost",iconOnly:!0,size:"sm",icon:o.jsx(I.ChevronLeft,{size:16}),onClick:Q,"aria-label":"Previous month"}),o.jsx("span",{id:E,className:l.default.monthLabel,children:y(f,"MMMM yyyy")}),o.jsx(q.Button,{variant:"ghost",iconOnly:!0,size:"sm",icon:o.jsx(I.ChevronRight,{size:16}),onClick:U,"aria-label":"Next month"})]}),o.jsxs("div",{className:l.default.grid,role:"grid","aria-labelledby":E,children:[G.map(t=>o.jsx("div",{className:l.default.weekday,role:"columnheader","aria-label":t,children:t},t)),Y.map(t=>!x(t,f)&&!R?o.jsx("div",{},t.toISOString()):o.jsx("button",{type:"button",className:V(t),onClick:()=>J(t),disabled:M(t),tabIndex:C(t)?0:-1,"aria-label":y(t,"EEEE, MMMM d, yyyy"),"aria-selected":j(t)||v(t)!==null,children:y(t,"d")},t.toISOString()))]})]})};P.displayName="Calendar";function ne(e){const s=new Date(e);return s.setHours(0,0,0,0),s}function se(e){const s=new Date(e);return s.setHours(23,59,59,999),s}exports.Calendar=P;
@@ -1 +1 @@
1
- {"version":3,"file":"Calendar.d.ts","sourceRoot":"","sources":["../../../src/components/Calendar/Calendar.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAgD,MAAM,OAAO,CAAC;AAIrE,OAAO,KAAK,EAAE,aAAa,EAAa,MAAM,kBAAkB,CAAC;AA+CjE,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CA0Q5C,CAAC"}
1
+ {"version":3,"file":"Calendar.d.ts","sourceRoot":"","sources":["../../../src/components/Calendar/Calendar.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAA2D,MAAM,OAAO,CAAC;AAQhF,OAAO,KAAK,EAAE,aAAa,EAAa,MAAM,kBAAkB,CAAC;AA8CjE,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAgS5C,CAAC"}
@@ -1,68 +1,69 @@
1
- import { jsxs as O, jsx as i } from "react/jsx-runtime";
2
- import { useState as V, useMemo as w, useCallback as M, useId as X } from "react";
3
- import { ChevronLeft as Z, ChevronRight as $ } from "lucide-react";
4
- import { MissingDependencyError as p } from "../MissingDependencyError.mjs";
1
+ import { jsx as l, jsxs as D } from "react/jsx-runtime";
2
+ import { useState as b, useEffect as p, useMemo as L, useCallback as M, useId as ee } from "react";
3
+ import { ChevronLeft as te, ChevronRight as ne } from "lucide-react";
4
+ import { MissingDependencyError as re } from "../MissingDependencyError.mjs";
5
+ import { checkComponent as se } from "../../utils/optionalDeps.mjs";
5
6
  import o from "./Calendar.module.css.mjs";
6
- import { Button as I } from "../Button/Button.mjs";
7
- let h, A, T, W, B, L, j, l, b, v, S, D, y, z = null;
7
+ import { Button as T } from "../Button/Button.mjs";
8
+ let h, W, B, j, z, P, _, i, k, v, y, C, S;
8
9
  try {
9
10
  const e = require("date-fns");
10
- h = e.startOfMonth, A = e.endOfMonth, T = e.startOfWeek, W = e.endOfWeek, B = e.eachDayOfInterval, L = e.addMonths, j = e.subMonths, l = e.isSameDay, b = e.isSameMonth, v = e.isToday, S = e.isBefore, D = e.isAfter, y = e.format;
11
- } catch (e) {
12
- z = e instanceof Error ? e : new Error("date-fns not found");
11
+ h = e.startOfMonth, W = e.endOfMonth, B = e.startOfWeek, j = e.endOfWeek, z = e.eachDayOfInterval, P = e.addMonths, _ = e.subMonths, i = e.isSameDay, k = e.isSameMonth, v = e.isToday, y = e.isBefore, C = e.isAfter, S = e.format;
12
+ } catch {
13
13
  }
14
- const ee = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
15
- function te(e, r) {
16
- const c = e.length, d = (r % c + c) % c;
17
- return [...e.slice(d), ...e.slice(0, d)];
14
+ const oe = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
15
+ function ie(e, r) {
16
+ const a = e.length, f = (r % a + a) % a;
17
+ return [...e.slice(f), ...e.slice(0, f)];
18
18
  }
19
- const ne = (e) => {
20
- if (z)
21
- return /* @__PURE__ */ i(
22
- p,
23
- {
24
- available: !1,
25
- componentName: "Calendar",
26
- depName: "date-fns",
27
- installCommand: "npm install date-fns",
28
- pnpmCommand: "pnpm add date-fns",
29
- docsUrl: "https://docs.orion-ds.dev/components/calendar"
30
- }
31
- );
19
+ const le = (e) => {
32
20
  const {
33
21
  mode: r = "single",
34
- min: c,
35
- max: d,
36
- disabled: m,
37
- weekStartsOn: u = 0,
38
- showOutsideDays: _ = !0,
39
- className: F,
40
- ...P
22
+ min: a,
23
+ max: f,
24
+ disabled: u,
25
+ weekStartsOn: m = 0,
26
+ showOutsideDays: F = !0,
27
+ className: H,
28
+ ...R
41
29
  } = e, {
42
- selected: oe,
43
- onSelect: le,
44
- ...H
45
- } = P, [f, E] = V(() => r === "single" && e.mode !== "range" && e.mode !== "multiple" && e.selected ? h(e.selected) : r === "range" && e.mode === "range" && e.selected?.from ? h(e.selected.from) : h(/* @__PURE__ */ new Date())), R = w(() => {
46
- const t = h(f), n = A(f), s = T(t, { weekStartsOn: u }), a = W(n, { weekStartsOn: u });
47
- return B({ start: s, end: a });
48
- }, [f, u]), q = w(
49
- () => te(ee, u),
50
- [u]
30
+ selected: fe,
31
+ onSelect: de,
32
+ ...q
33
+ } = R, [E, O] = b(), [K, Y] = b(!0), [d, N] = b(() => r === "single" && e.mode !== "range" && e.mode !== "multiple" && e.selected ? h(e.selected) : r === "range" && e.mode === "range" && e.selected?.from ? h(e.selected.from) : h(/* @__PURE__ */ new Date()));
34
+ p(() => {
35
+ (async () => {
36
+ try {
37
+ const n = se("Calendar");
38
+ n instanceof Promise ? O(await n) : O(n);
39
+ } catch {
40
+ O(void 0);
41
+ } finally {
42
+ Y(!1);
43
+ }
44
+ })();
45
+ }, []);
46
+ const G = L(() => {
47
+ const t = h(d), n = W(d), s = B(t, { weekStartsOn: m }), c = j(n, { weekStartsOn: m });
48
+ return z({ start: s, end: c });
49
+ }, [d, m]), J = L(
50
+ () => ie(oe, m),
51
+ [m]
51
52
  ), g = M(
52
- (t) => c && S(t, re(c)) || d && D(t, se(d)) ? !0 : m ? Array.isArray(m) ? m.some((n) => l(n, t)) : m(t) : !1,
53
- [c, d, m]
54
- ), C = M(
55
- (t) => r === "single" && e.mode !== "range" && e.mode !== "multiple" ? e.selected ? l(e.selected, t) : !1 : r === "multiple" && e.mode === "multiple" ? e.selected?.some((n) => l(n, t)) ?? !1 : !1,
53
+ (t) => a && y(t, ce(a)) || f && C(t, ae(f)) ? !0 : u ? Array.isArray(u) ? u.some((n) => i(n, t)) : u(t) : !1,
54
+ [a, f, u]
55
+ ), x = M(
56
+ (t) => r === "single" && e.mode !== "range" && e.mode !== "multiple" ? e.selected ? i(e.selected, t) : !1 : r === "multiple" && e.mode === "multiple" ? e.selected?.some((n) => i(n, t)) ?? !1 : !1,
56
57
  [r, e]
57
- ), N = M(
58
+ ), I = M(
58
59
  (t) => {
59
60
  if (r !== "range" || e.mode !== "range" || !e.selected)
60
61
  return null;
61
62
  const { from: n, to: s } = e.selected;
62
- return n ? s ? l(t, n) && l(t, s) || l(t, n) ? "start" : l(t, s) ? "end" : D(t, n) && S(t, s) ? "middle" : null : l(t, n) ? "start" : null : null;
63
+ return n ? s ? i(t, n) && i(t, s) || i(t, n) ? "start" : i(t, s) ? "end" : C(t, n) && y(t, s) ? "middle" : null : i(t, n) ? "start" : null : null;
63
64
  },
64
65
  [r, e]
65
- ), K = M(
66
+ ), Q = M(
66
67
  (t) => {
67
68
  if (!g(t)) {
68
69
  if (r === "single" && e.mode !== "range" && e.mode !== "multiple") {
@@ -70,50 +71,55 @@ const ne = (e) => {
70
71
  n?.(t);
71
72
  } else if (r === "range" && e.mode === "range") {
72
73
  const n = e.onSelect, s = e.selected;
73
- !s?.from || s.from && s.to ? n?.({ from: t, to: void 0 }) : S(t, s.from) ? n?.({ from: t, to: s.from }) : n?.({ from: s.from, to: t });
74
+ !s?.from || s.from && s.to ? n?.({ from: t, to: void 0 }) : y(t, s.from) ? n?.({ from: t, to: s.from }) : n?.({ from: s.from, to: t });
74
75
  } else if (r === "multiple" && e.mode === "multiple") {
75
- const n = e.onSelect, s = e.selected ?? [], a = s.findIndex((x) => l(x, t));
76
- a >= 0 ? n?.(s.filter((x, Q) => Q !== a)) : n?.([...s, t]);
76
+ const n = e.onSelect, s = e.selected ?? [], c = s.findIndex((A) => i(A, t));
77
+ c >= 0 ? n?.(s.filter((A, $) => $ !== c)) : n?.([...s, t]);
77
78
  }
78
79
  }
79
80
  },
80
81
  [r, e, g]
81
- ), U = () => E((t) => j(t, 1)), Y = () => E((t) => L(t, 1)), G = (t) => {
82
+ ), U = () => N((t) => _(t, 1)), V = () => N((t) => P(t, 1)), X = (t) => {
82
83
  const n = [o.day];
83
- if (!b(t, f) && n.push(o.outside), v(t) && n.push(o.today), g(t) && n.push(o.disabled), r === "range") {
84
- const a = N(t);
85
- a === "start" && (n.push(o.rangeStart), e.mode === "range" && e.selected?.from && e.selected?.to && l(e.selected.from, e.selected.to) && n.push(o.rangeEnd)), a === "middle" && n.push(o.rangeMiddle), a === "end" && n.push(o.rangeEnd);
86
- } else C(t) && n.push(o.selected);
84
+ if (!k(t, d) && n.push(o.outside), v(t) && n.push(o.today), g(t) && n.push(o.disabled), r === "range") {
85
+ const c = I(t);
86
+ c === "start" && (n.push(o.rangeStart), e.mode === "range" && e.selected?.from && e.selected?.to && i(e.selected.from, e.selected.to) && n.push(o.rangeEnd)), c === "middle" && n.push(o.rangeMiddle), c === "end" && n.push(o.rangeEnd);
87
+ } else x(t) && n.push(o.selected);
87
88
  return n.join(" ");
88
- }, J = [o.calendar, F].filter(Boolean).join(" "), k = X();
89
- return /* @__PURE__ */ O("div", { className: J, ...H, children: [
90
- /* @__PURE__ */ O("div", { className: o.header, children: [
91
- /* @__PURE__ */ i(
92
- I,
89
+ }, w = ee();
90
+ if (E)
91
+ return /* @__PURE__ */ l(re, { ...E });
92
+ if (K)
93
+ return /* @__PURE__ */ l("div", { children: "Loading calendar..." });
94
+ const Z = [o.calendar, H].filter(Boolean).join(" ");
95
+ return /* @__PURE__ */ D("div", { className: Z, ...q, children: [
96
+ /* @__PURE__ */ D("div", { className: o.header, children: [
97
+ /* @__PURE__ */ l(
98
+ T,
93
99
  {
94
100
  variant: "ghost",
95
101
  iconOnly: !0,
96
102
  size: "sm",
97
- icon: /* @__PURE__ */ i(Z, { size: 16 }),
103
+ icon: /* @__PURE__ */ l(te, { size: 16 }),
98
104
  onClick: U,
99
105
  "aria-label": "Previous month"
100
106
  }
101
107
  ),
102
- /* @__PURE__ */ i("span", { id: k, className: o.monthLabel, children: y(f, "MMMM yyyy") }),
103
- /* @__PURE__ */ i(
104
- I,
108
+ /* @__PURE__ */ l("span", { id: w, className: o.monthLabel, children: S(d, "MMMM yyyy") }),
109
+ /* @__PURE__ */ l(
110
+ T,
105
111
  {
106
112
  variant: "ghost",
107
113
  iconOnly: !0,
108
114
  size: "sm",
109
- icon: /* @__PURE__ */ i($, { size: 16 }),
110
- onClick: Y,
115
+ icon: /* @__PURE__ */ l(ne, { size: 16 }),
116
+ onClick: V,
111
117
  "aria-label": "Next month"
112
118
  }
113
119
  )
114
120
  ] }),
115
- /* @__PURE__ */ O("div", { className: o.grid, role: "grid", "aria-labelledby": k, children: [
116
- q.map((t) => /* @__PURE__ */ i(
121
+ /* @__PURE__ */ D("div", { className: o.grid, role: "grid", "aria-labelledby": w, children: [
122
+ J.map((t) => /* @__PURE__ */ l(
117
123
  "div",
118
124
  {
119
125
  className: o.weekday,
@@ -123,32 +129,32 @@ const ne = (e) => {
123
129
  },
124
130
  t
125
131
  )),
126
- R.map((t) => !b(t, f) && !_ ? /* @__PURE__ */ i("div", {}, t.toISOString()) : /* @__PURE__ */ i(
132
+ G.map((t) => !k(t, d) && !F ? /* @__PURE__ */ l("div", {}, t.toISOString()) : /* @__PURE__ */ l(
127
133
  "button",
128
134
  {
129
135
  type: "button",
130
- className: G(t),
131
- onClick: () => K(t),
136
+ className: X(t),
137
+ onClick: () => Q(t),
132
138
  disabled: g(t),
133
139
  tabIndex: v(t) ? 0 : -1,
134
- "aria-label": y(t, "EEEE, MMMM d, yyyy"),
135
- "aria-selected": C(t) || N(t) !== null,
136
- children: y(t, "d")
140
+ "aria-label": S(t, "EEEE, MMMM d, yyyy"),
141
+ "aria-selected": x(t) || I(t) !== null,
142
+ children: S(t, "d")
137
143
  },
138
144
  t.toISOString()
139
145
  ))
140
146
  ] })
141
147
  ] });
142
148
  };
143
- ne.displayName = "Calendar";
144
- function re(e) {
149
+ le.displayName = "Calendar";
150
+ function ce(e) {
145
151
  const r = new Date(e);
146
152
  return r.setHours(0, 0, 0, 0), r;
147
153
  }
148
- function se(e) {
154
+ function ae(e) {
149
155
  const r = new Date(e);
150
156
  return r.setHours(23, 59, 59, 999), r;
151
157
  }
152
158
  export {
153
- ne as Calendar
159
+ le as Calendar
154
160
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),u=require("react"),S=require("./useResolvedChartColors.cjs"),h=require("../MissingDependencyError.cjs"),n=require("./Chart.module.css.cjs");let j,N,y,p=null;try{const t=require("recharts");j=t.ResponsiveContainer,N=t.Tooltip,y=t.Legend}catch(t){p=t instanceof Error?t:new Error("recharts not found")}const f=u.createContext({}),b=({config:t,children:o,className:s,style:a,...r})=>{if(p)return e.jsx(h.MissingDependencyError,{available:!1,componentName:"Chart",depName:"recharts",installCommand:"npm install recharts",pnpmCommand:"pnpm add recharts",docsUrl:"https://docs.orion-ds.dev/components/chart"});const{resolvedConfig:l,resolvedColorVars:i}=S.useResolvedChartColors(t),d=[n.default.container,s].filter(Boolean).join(" ");return e.jsx(f.Provider,{value:l,children:e.jsx("div",{role:"figure",className:d,style:{...i,...a},...r,children:e.jsx(j,{width:"100%",height:"100%",children:o})})})};b.displayName="ChartContainer";const L=({active:t,payload:o,label:s,indicator:a="dot",hideLabel:r=!1,hideIndicator:l=!1,labelFormatter:i,formatter:d,className:C})=>{if(p)return e.jsx(h.MissingDependencyError,{available:!1,componentName:"Chart",depName:"recharts",installCommand:"npm install recharts",pnpmCommand:"pnpm add recharts",docsUrl:"https://docs.orion-ds.dev/components/chart"});const T=u.useContext(f);if(!t||!o?.length)return null;const R=[n.default.tooltip,C].filter(Boolean).join(" "),g=i?i(String(s)):s,q={dot:n.default.tooltipDot,line:n.default.tooltipLine,dashed:n.default.tooltipDashed}[a];return e.jsxs("div",{className:R,children:[!r&&g&&e.jsx("div",{className:n.default.tooltipLabel,children:g}),e.jsx("div",{className:n.default.tooltipItems,children:o.map(c=>{const m=String(c.dataKey||c.name),x=T[m],M=x?.label||m,I=d?d(c.value,m):String(c.value),v=c.color||x?.color;return e.jsxs("div",{className:n.default.tooltipItem,children:[!l&&e.jsx("span",{className:q,style:{backgroundColor:v,borderColor:v}}),e.jsx("span",{className:n.default.tooltipName,children:M}),e.jsx("span",{className:n.default.tooltipValue,children:I})]},m)})})]})};L.displayName="ChartTooltipContent";const D=({payload:t,className:o})=>{if(p)return e.jsx(h.MissingDependencyError,{available:!1,componentName:"Chart",depName:"recharts",installCommand:"npm install recharts",pnpmCommand:"pnpm add recharts",docsUrl:"https://docs.orion-ds.dev/components/chart"});const s=u.useContext(f);if(!t?.length)return null;const a=[n.default.legend,o].filter(Boolean).join(" ");return e.jsx("div",{className:a,children:t.map(r=>{const l=r.dataKey||r.value,i=s[l],d=i?.label||l,C=r.color||i?.color;return e.jsxs("div",{className:n.default.legendItem,children:[e.jsx("span",{className:n.default.legendDot,style:{backgroundColor:C}}),e.jsx("span",{children:d})]},l)})})};D.displayName="ChartLegendContent";const E=({id:t,color:o,startOpacity:s=.4,endOpacity:a=.05})=>p?e.jsx(h.MissingDependencyError,{available:!1,componentName:"Chart",depName:"recharts",installCommand:"npm install recharts",pnpmCommand:"pnpm add recharts",docsUrl:"https://docs.orion-ds.dev/components/chart"}):e.jsxs("linearGradient",{id:t,x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{offset:"5%",stopColor:o,stopOpacity:s}),e.jsx("stop",{offset:"95%",stopColor:o,stopOpacity:a})]});E.displayName="ChartGradient";const G=N||null,K=y||null;exports.ChartContainer=b;exports.ChartGradient=E;exports.ChartLegend=K;exports.ChartLegendContent=D;exports.ChartTooltip=G;exports.ChartTooltipContent=L;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),p=require("react"),G=require("../../utils/optionalDeps.cjs"),K=require("./useResolvedChartColors.cjs"),f=require("../MissingDependencyError.cjs"),s=require("./Chart.module.css.cjs");let N,D,L;try{const t=require("recharts");N=t.ResponsiveContainer,D=t.Tooltip,L=t.Legend}catch{}const m=p.createContext({}),g=()=>{const[t,n]=p.useState(),[r,a]=p.useState(!0);return p.useEffect(()=>{(async()=>{try{const o=G.checkComponent("Chart");o instanceof Promise?n(await o):n(o)}catch{n(void 0)}finally{a(!1)}})()},[]),{depError:t,isChecking:r}},E=({config:t,children:n,className:r,style:a,...l})=>{const{depError:o,isChecking:i}=g(),{resolvedConfig:c,resolvedColorVars:d}=K.useResolvedChartColors(t);if(o)return e.jsx(f.MissingDependencyError,{...o});if(i)return e.jsx("div",{children:"Loading chart..."});const u=[s.default.container,r].filter(Boolean).join(" ");return e.jsx(m.Provider,{value:c,children:e.jsx("div",{role:"figure",className:u,style:{...d,...a},...l,children:e.jsx(N,{width:"100%",height:"100%",children:n})})})};E.displayName="ChartContainer";const k=({active:t,payload:n,label:r,indicator:a="dot",hideLabel:l=!1,hideIndicator:o=!1,labelFormatter:i,formatter:c,className:d})=>{const{depError:u,isChecking:x}=g(),q=p.useContext(m);if(u)return e.jsx(f.MissingDependencyError,{...u});if(x||!t||!n?.length)return null;const S=[s.default.tooltip,d].filter(Boolean).join(" "),j=i?i(String(r)):r,I={dot:s.default.tooltipDot,line:s.default.tooltipLine,dashed:s.default.tooltipDashed}[a];return e.jsxs("div",{className:S,children:[!l&&j&&e.jsx("div",{className:s.default.tooltipLabel,children:j}),e.jsx("div",{className:s.default.tooltipItems,children:n.map(C=>{const h=String(C.dataKey||C.name),v=q[h],M=v?.label||h,R=c?c(C.value,h):String(C.value),y=C.color||v?.color;return e.jsxs("div",{className:s.default.tooltipItem,children:[!o&&e.jsx("span",{className:I,style:{backgroundColor:y,borderColor:y}}),e.jsx("span",{className:s.default.tooltipName,children:M}),e.jsx("span",{className:s.default.tooltipValue,children:R})]},h)})})]})};k.displayName="ChartTooltipContent";const b=({payload:t,className:n})=>{const{depError:r,isChecking:a}=g(),l=p.useContext(m);if(r)return e.jsx(f.MissingDependencyError,{...r});if(a||!t?.length)return null;const o=[s.default.legend,n].filter(Boolean).join(" ");return e.jsx("div",{className:o,children:t.map(i=>{const c=i.dataKey||i.value,d=l[c],u=d?.label||c,x=i.color||d?.color;return e.jsxs("div",{className:s.default.legendItem,children:[e.jsx("span",{className:s.default.legendDot,style:{backgroundColor:x}}),e.jsx("span",{children:u})]},c)})})};b.displayName="ChartLegendContent";const T=({id:t,color:n,startOpacity:r=.4,endOpacity:a=.05})=>{const{depError:l,isChecking:o}=g();return l?e.jsx(f.MissingDependencyError,{...l}):o?null:e.jsxs("linearGradient",{id:t,x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{offset:"5%",stopColor:n,stopOpacity:r}),e.jsx("stop",{offset:"95%",stopColor:n,stopOpacity:a})]})};T.displayName="ChartGradient";const B=D||null,O=L||null;exports.ChartContainer=E;exports.ChartGradient=T;exports.ChartLegend=O;exports.ChartLegendContent=b;exports.ChartTooltip=B;exports.ChartTooltipContent=k;
@@ -1 +1 @@
1
- {"version":3,"file":"Chart.d.ts","sourceRoot":"","sources":["../../../src/components/Chart/Chart.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,KAAoC,MAAM,OAAO,CAAC;AAiBzD,OAAO,KAAK,EAEV,mBAAmB,EACnB,wBAAwB,EACxB,uBAAuB,EACvB,kBAAkB,EACnB,MAAM,eAAe,CAAC;AAQvB;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA0CxD,CAAC;AAIF;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CAsElE,CAAC;AAIF;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CA4ChE,CAAC;AAIF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA0BtD,CAAC;AAMF,eAAO,MAAM,YAAY,KAAkB,CAAC;AAC5C,eAAO,MAAM,WAAW,KAAiB,CAAC"}
1
+ {"version":3,"file":"Chart.d.ts","sourceRoot":"","sources":["../../../src/components/Chart/Chart.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,KAAyD,MAAM,OAAO,CAAC;AAoB9E,OAAO,KAAK,EAEV,mBAAmB,EACnB,wBAAwB,EACxB,uBAAuB,EACvB,kBAAkB,EACnB,MAAM,eAAe,CAAC;AAoCvB;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAsCxD,CAAC;AAIF;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CAmElE,CAAC;AAIF;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAyChE,CAAC;AAIF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAwBtD,CAAC;AAMF,eAAO,MAAM,YAAY,KAAkB,CAAC;AAC5C,eAAO,MAAM,WAAW,KAAiB,CAAC"}
@@ -1,156 +1,136 @@
1
- import { jsx as e, jsxs as h } from "react/jsx-runtime";
2
- import { useContext as y, createContext as K } from "react";
3
- import { useResolvedChartColors as R } from "./useResolvedChartColors.mjs";
4
- import { MissingDependencyError as C } from "../MissingDependencyError.mjs";
5
- import o from "./Chart.module.css.mjs";
6
- let b, L, x, p = null;
1
+ import { jsx as e, jsxs as u } from "react/jsx-runtime";
2
+ import { useContext as x, useState as L, useEffect as B, createContext as G } from "react";
3
+ import { checkComponent as R } from "../../utils/optionalDeps.mjs";
4
+ import { useResolvedChartColors as V } from "./useResolvedChartColors.mjs";
5
+ import { MissingDependencyError as f } from "../MissingDependencyError.mjs";
6
+ import r from "./Chart.module.css.mjs";
7
+ let D, E, b;
7
8
  try {
8
9
  const t = require("recharts");
9
- b = t.ResponsiveContainer, L = t.Tooltip, x = t.Legend;
10
- } catch (t) {
11
- p = t instanceof Error ? t : new Error("recharts not found");
10
+ D = t.ResponsiveContainer, E = t.Tooltip, b = t.Legend;
11
+ } catch {
12
12
  }
13
- const u = K({}), U = ({
13
+ const v = G({}), m = () => {
14
+ const [t, o] = L(), [s, i] = L(!0);
15
+ return B(() => {
16
+ (async () => {
17
+ try {
18
+ const n = R("Chart");
19
+ n instanceof Promise ? o(await n) : o(n);
20
+ } catch {
21
+ o(void 0);
22
+ } finally {
23
+ i(!1);
24
+ }
25
+ })();
26
+ }, []), { depError: t, isChecking: s };
27
+ }, w = ({
14
28
  config: t,
15
- children: n,
16
- className: a,
17
- style: r,
18
- ...s
29
+ children: o,
30
+ className: s,
31
+ style: i,
32
+ ...l
19
33
  }) => {
20
- if (p)
21
- return /* @__PURE__ */ e(
22
- C,
23
- {
24
- available: !1,
25
- componentName: "Chart",
26
- depName: "recharts",
27
- installCommand: "npm install recharts",
28
- pnpmCommand: "pnpm add recharts",
29
- docsUrl: "https://docs.orion-ds.dev/components/chart"
30
- }
31
- );
32
- const { resolvedConfig: l, resolvedColorVars: i } = R(t), c = [o.container, a].filter(Boolean).join(" ");
33
- return /* @__PURE__ */ e(u.Provider, { value: l, children: /* @__PURE__ */ e(
34
+ const { depError: n, isChecking: a } = m(), { resolvedConfig: c, resolvedColorVars: d } = V(t);
35
+ if (n)
36
+ return /* @__PURE__ */ e(f, { ...n });
37
+ if (a)
38
+ return /* @__PURE__ */ e("div", { children: "Loading chart..." });
39
+ const p = [r.container, s].filter(Boolean).join(" ");
40
+ return /* @__PURE__ */ e(v.Provider, { value: c, children: /* @__PURE__ */ e(
34
41
  "div",
35
42
  {
36
43
  role: "figure",
37
- className: c,
38
- style: { ...i, ...r },
39
- ...s,
40
- children: /* @__PURE__ */ e(b, { width: "100%", height: "100%", children: n })
44
+ className: p,
45
+ style: { ...d, ...i },
46
+ ...l,
47
+ children: /* @__PURE__ */ e(D, { width: "100%", height: "100%", children: o })
41
48
  }
42
49
  ) });
43
50
  };
44
- U.displayName = "ChartContainer";
45
- const B = ({
51
+ w.displayName = "ChartContainer";
52
+ const O = ({
46
53
  active: t,
47
- payload: n,
48
- label: a,
49
- indicator: r = "dot",
50
- hideLabel: s = !1,
51
- hideIndicator: l = !1,
52
- labelFormatter: i,
54
+ payload: o,
55
+ label: s,
56
+ indicator: i = "dot",
57
+ hideLabel: l = !1,
58
+ hideIndicator: n = !1,
59
+ labelFormatter: a,
53
60
  formatter: c,
54
- className: f
61
+ className: d
55
62
  }) => {
63
+ const { depError: p, isChecking: g } = m(), I = x(v);
56
64
  if (p)
57
- return /* @__PURE__ */ e(
58
- C,
59
- {
60
- available: !1,
61
- componentName: "Chart",
62
- depName: "recharts",
63
- installCommand: "npm install recharts",
64
- pnpmCommand: "pnpm add recharts",
65
- docsUrl: "https://docs.orion-ds.dev/components/chart"
66
- }
67
- );
68
- const j = y(u);
69
- if (!t || !n?.length) return null;
70
- const I = [o.tooltip, f].filter(Boolean).join(" "), v = i ? i(String(a)) : a, T = {
71
- dot: o.tooltipDot,
72
- line: o.tooltipLine,
73
- dashed: o.tooltipDashed
74
- }[r];
75
- return /* @__PURE__ */ h("div", { className: I, children: [
76
- !s && v && /* @__PURE__ */ e("div", { className: o.tooltipLabel, children: v }),
77
- /* @__PURE__ */ e("div", { className: o.tooltipItems, children: n.map((d) => {
78
- const m = String(d.dataKey || d.name), g = j[m], D = g?.label || m, E = c ? c(d.value, m) : String(d.value), N = d.color || g?.color;
79
- return /* @__PURE__ */ h("div", { className: o.tooltipItem, children: [
80
- !l && /* @__PURE__ */ e(
65
+ return /* @__PURE__ */ e(f, { ...p });
66
+ if (g || !t || !o?.length) return null;
67
+ const j = [r.tooltip, d].filter(Boolean).join(" "), y = a ? a(String(s)) : s, T = {
68
+ dot: r.tooltipDot,
69
+ line: r.tooltipLine,
70
+ dashed: r.tooltipDashed
71
+ }[i];
72
+ return /* @__PURE__ */ u("div", { className: j, children: [
73
+ !l && y && /* @__PURE__ */ e("div", { className: r.tooltipLabel, children: y }),
74
+ /* @__PURE__ */ e("div", { className: r.tooltipItems, children: o.map((h) => {
75
+ const C = String(h.dataKey || h.name), N = I[C], K = N?.label || C, S = c ? c(h.value, C) : String(h.value), k = h.color || N?.color;
76
+ return /* @__PURE__ */ u("div", { className: r.tooltipItem, children: [
77
+ !n && /* @__PURE__ */ e(
81
78
  "span",
82
79
  {
83
80
  className: T,
84
- style: { backgroundColor: N, borderColor: N }
81
+ style: { backgroundColor: k, borderColor: k }
85
82
  }
86
83
  ),
87
- /* @__PURE__ */ e("span", { className: o.tooltipName, children: D }),
88
- /* @__PURE__ */ e("span", { className: o.tooltipValue, children: E })
89
- ] }, m);
84
+ /* @__PURE__ */ e("span", { className: r.tooltipName, children: K }),
85
+ /* @__PURE__ */ e("span", { className: r.tooltipValue, children: S })
86
+ ] }, C);
90
87
  }) })
91
88
  ] });
92
89
  };
93
- B.displayName = "ChartTooltipContent";
94
- const G = ({
90
+ O.displayName = "ChartTooltipContent";
91
+ const P = ({
95
92
  payload: t,
96
- className: n
93
+ className: o
97
94
  }) => {
98
- if (p)
99
- return /* @__PURE__ */ e(
100
- C,
101
- {
102
- available: !1,
103
- componentName: "Chart",
104
- depName: "recharts",
105
- installCommand: "npm install recharts",
106
- pnpmCommand: "pnpm add recharts",
107
- docsUrl: "https://docs.orion-ds.dev/components/chart"
108
- }
109
- );
110
- const a = y(u);
111
- if (!t?.length) return null;
112
- const r = [o.legend, n].filter(Boolean).join(" ");
113
- return /* @__PURE__ */ e("div", { className: r, children: t.map((s) => {
114
- const l = s.dataKey || s.value, i = a[l], c = i?.label || l, f = s.color || i?.color;
115
- return /* @__PURE__ */ h("div", { className: o.legendItem, children: [
95
+ const { depError: s, isChecking: i } = m(), l = x(v);
96
+ if (s)
97
+ return /* @__PURE__ */ e(f, { ...s });
98
+ if (i || !t?.length) return null;
99
+ const n = [r.legend, o].filter(Boolean).join(" ");
100
+ return /* @__PURE__ */ e("div", { className: n, children: t.map((a) => {
101
+ const c = a.dataKey || a.value, d = l[c], p = d?.label || c, g = a.color || d?.color;
102
+ return /* @__PURE__ */ u("div", { className: r.legendItem, children: [
116
103
  /* @__PURE__ */ e(
117
104
  "span",
118
105
  {
119
- className: o.legendDot,
120
- style: { backgroundColor: f }
106
+ className: r.legendDot,
107
+ style: { backgroundColor: g }
121
108
  }
122
109
  ),
123
- /* @__PURE__ */ e("span", { children: c })
124
- ] }, l);
110
+ /* @__PURE__ */ e("span", { children: p })
111
+ ] }, c);
125
112
  }) });
126
113
  };
127
- G.displayName = "ChartLegendContent";
128
- const S = ({
114
+ P.displayName = "ChartLegendContent";
115
+ const q = ({
129
116
  id: t,
130
- color: n,
131
- startOpacity: a = 0.4,
132
- endOpacity: r = 0.05
133
- }) => p ? /* @__PURE__ */ e(
134
- C,
135
- {
136
- available: !1,
137
- componentName: "Chart",
138
- depName: "recharts",
139
- installCommand: "npm install recharts",
140
- pnpmCommand: "pnpm add recharts",
141
- docsUrl: "https://docs.orion-ds.dev/components/chart"
142
- }
143
- ) : /* @__PURE__ */ h("linearGradient", { id: t, x1: "0", y1: "0", x2: "0", y2: "1", children: [
144
- /* @__PURE__ */ e("stop", { offset: "5%", stopColor: n, stopOpacity: a }),
145
- /* @__PURE__ */ e("stop", { offset: "95%", stopColor: n, stopOpacity: r })
146
- ] });
147
- S.displayName = "ChartGradient";
148
- const M = L || null, P = x || null;
117
+ color: o,
118
+ startOpacity: s = 0.4,
119
+ endOpacity: i = 0.05
120
+ }) => {
121
+ const { depError: l, isChecking: n } = m();
122
+ return l ? /* @__PURE__ */ e(f, { ...l }) : n ? null : /* @__PURE__ */ u("linearGradient", { id: t, x1: "0", y1: "0", x2: "0", y2: "1", children: [
123
+ /* @__PURE__ */ e("stop", { offset: "5%", stopColor: o, stopOpacity: s }),
124
+ /* @__PURE__ */ e("stop", { offset: "95%", stopColor: o, stopOpacity: i })
125
+ ] });
126
+ };
127
+ q.displayName = "ChartGradient";
128
+ const U = E || null, W = b || null;
149
129
  export {
150
- U as ChartContainer,
151
- S as ChartGradient,
152
- P as ChartLegend,
153
- G as ChartLegendContent,
154
- M as ChartTooltip,
155
- B as ChartTooltipContent
130
+ w as ChartContainer,
131
+ q as ChartGradient,
132
+ W as ChartLegend,
133
+ P as ChartLegendContent,
134
+ U as ChartTooltip,
135
+ O as ChartTooltipContent
156
136
  };