@rubin-epo/epo-widget-lib 0.9.3 → 0.9.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),s=require("./styles.cjs"),u=({width:r=900,height:i=300,xMin:c=0,yMin:l=0,verticalLabel:t,verticalLabelId:a,horizontalLabel:n,horizontalLabelId:d,title:o,children:x,className:j})=>e.jsxs(s.ChartContainer,{children:[o&&e.jsx(s.Title,{children:o}),t&&e.jsx(s.VerticalLabel,{id:a,"aria-hidden":!!a,children:t}),e.jsx(s.SVG,{preserveAspectRatio:"xMidYMid meet",viewBox:`${c} ${l} ${r} ${i}`,className:j,style:{"--aspect-ratio":`${r} / ${i}`},role:"group",children:x}),n&&e.jsx(s.HorizontalLabel,{id:d,"aria-hidden":!!d,children:n})]});u.displayName="Charts.Base";const p=u;exports.default=p;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),r=require("./styles.cjs"),c=({width:s=900,height:i=300,xMin:o=0,yMin:x=0,verticalLabel:a,verticalLabelId:t,horizontalLabel:n,horizontalLabelId:l,title:d,children:j,className:p})=>e.jsxs(r.ChartContainer,{children:[d&&e.jsx(r.TitleWrapper,{children:e.jsx(r.Title,{children:d})}),a&&e.jsxs(e.Fragment,{children:[e.jsx(r.VerticalLabelWrapper,{children:e.jsx(r.Label,{id:t,"aria-hidden":!!t,children:a})}),e.jsx(r.Filler,{})]}),e.jsx(r.SVG,{preserveAspectRatio:"xMidYMid meet",viewBox:`${o} ${x} ${s} ${i}`,className:p,style:{"--aspect-ratio":`${s} / ${i}`},role:"group",children:j}),n&&e.jsx(r.HorizontalLabelWrapper,{children:e.jsx(r.Label,{id:l,"aria-hidden":!!l,children:n})})]});c.displayName="Charts.Base";const u=c;exports.default=u;
@@ -1,51 +1,47 @@
1
- import { jsxs as x, jsx as e } from "react/jsx-runtime";
2
- import { ChartContainer as h, Title as l, VerticalLabel as B, SVG as C, HorizontalLabel as f } from "./styles.js";
3
- const n = ({
4
- width: r = 900,
1
+ import { jsxs as t, jsx as r, Fragment as x } from "react/jsx-runtime";
2
+ import { ChartContainer as B, TitleWrapper as C, Title as f, VerticalLabelWrapper as u, Label as l, Filler as W, SVG as j, HorizontalLabelWrapper as y } from "./styles.js";
3
+ const c = ({
4
+ width: e = 900,
5
5
  height: i = 300,
6
- xMin: p = 0,
7
- yMin: c = 0,
8
- verticalLabel: s,
9
- verticalLabelId: a,
10
- horizontalLabel: t,
11
- horizontalLabelId: d,
12
- title: o,
6
+ xMin: o = 0,
7
+ yMin: h = 0,
8
+ verticalLabel: a,
9
+ verticalLabelId: d,
10
+ horizontalLabel: n,
11
+ horizontalLabelId: s,
12
+ title: p,
13
13
  children: m,
14
14
  className: $
15
- }) => /* @__PURE__ */ x(h, { children: [
16
- o && /* @__PURE__ */ e(l, { children: o }),
17
- s && /* @__PURE__ */ e(
18
- B,
19
- {
20
- id: a,
21
- "aria-hidden": !!a,
22
- children: s
23
- }
24
- ),
25
- /* @__PURE__ */ e(
26
- C,
15
+ }) => /* @__PURE__ */ t(B, { children: [
16
+ p && /* @__PURE__ */ r(C, { children: /* @__PURE__ */ r(f, { children: p }) }),
17
+ a && /* @__PURE__ */ t(x, { children: [
18
+ /* @__PURE__ */ r(u, { children: /* @__PURE__ */ r(l, { id: d, "aria-hidden": !!d, children: a }) }),
19
+ /* @__PURE__ */ r(W, {})
20
+ ] }),
21
+ /* @__PURE__ */ r(
22
+ j,
27
23
  {
28
24
  preserveAspectRatio: "xMidYMid meet",
29
- viewBox: `${p} ${c} ${r} ${i}`,
25
+ viewBox: `${o} ${h} ${e} ${i}`,
30
26
  className: $,
31
27
  style: {
32
- "--aspect-ratio": `${r} / ${i}`
28
+ "--aspect-ratio": `${e} / ${i}`
33
29
  },
34
30
  role: "group",
35
31
  children: m
36
32
  }
37
33
  ),
38
- t && /* @__PURE__ */ e(
39
- f,
34
+ n && /* @__PURE__ */ r(y, { children: /* @__PURE__ */ r(
35
+ l,
40
36
  {
41
- id: d,
42
- "aria-hidden": !!d,
43
- children: t
37
+ id: s,
38
+ "aria-hidden": !!s,
39
+ children: n
44
40
  }
45
- )
41
+ ) })
46
42
  ] });
47
- n.displayName = "Charts.Base";
48
- const y = n;
43
+ c.displayName = "Charts.Base";
44
+ const T = c;
49
45
  export {
50
- y as default
46
+ T as default
51
47
  };
@@ -1,35 +1,54 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("styled-components"),l=t=>t&&t.__esModule?t:{default:t},e=l(a),r=e.default.div`
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("styled-components"),a=t=>t&&t.__esModule?t:{default:t},e=a(l),i=e.default.div`
2
2
  --label-height: 3em;
3
3
  --label-gutter: calc(var(--label-height) / 2);
4
4
 
5
5
  display: grid;
6
- grid-template-columns: var(--label-height) 1fr var(--label-height);
7
- grid-template-rows: var(--label-height) 1fr var(--label-height);
6
+ grid-template-columns: min-content 1fr min-content;
7
+ grid-template-rows: min-content 1fr min-content;
8
8
  grid-template-areas:
9
- "title title ."
10
- "vertical-label chart ."
11
- ". horizontal-label .";
9
+ "title title title"
10
+ "vertical-label chart filler"
11
+ ". horizontal-label filler";
12
+ /* for Safari */
13
+ align-items: center;
12
14
  width: 100%;
13
- `,i=e.default.span`
14
- font-size: 80%;
15
- grid-area: horizontal-label;
15
+ `;e.default.div`
16
16
  place-self: center;
17
17
  align-self: center;
18
- `,n=e.default.span`
19
- font-size: 80%;
20
- grid-area: vertical-label;
18
+ `;e.default.div`
19
+ display: flex;
20
+ align-items: center;
21
21
  place-self: center;
22
22
  align-self: center;
23
- writing-mode: vertical-rl;
24
- transform: rotate(180deg);
25
- `,o=e.default.svg`
23
+ `;const r=e.default.div`
24
+ grid-area: filler;
25
+ width: var(--label-height);
26
+ `,n=e.default.svg`
26
27
  grid-area: chart;
27
28
  max-width: 100%;
29
+ max-height: 100%;
28
30
  aspect-ratio: var(--aspect-ratio);
29
- `,s=e.default.h3`
31
+ `,d=e.default.div`
30
32
  display: flex;
31
33
  align-items: center;
32
34
  grid-area: title;
35
+ height: var(--label-height);
33
36
  padding-inline: var(--label-gutter);
37
+ `,c=e.default.h3`
34
38
  margin: 0;
35
- `;exports.ChartContainer=r;exports.HorizontalLabel=i;exports.SVG=o;exports.Title=s;exports.VerticalLabel=n;
39
+ `,o=e.default.div`
40
+ width: var(--label-height);
41
+ writing-mode: vertical-rl;
42
+ transform: rotate(180deg);
43
+ grid-area: vertical-label;
44
+ `,s=e.default.div`
45
+ height: var(--label-height);
46
+ grid-area: horizontal-label;
47
+ `,g=e.default.span`
48
+ display: flex;
49
+ align-items: center;
50
+ justify-content: center;
51
+ height: 100%;
52
+ width: 100%;
53
+ font-size: 80%;
54
+ `;exports.ChartContainer=i;exports.Filler=r;exports.HorizontalLabelWrapper=s;exports.Label=g;exports.SVG=n;exports.Title=c;exports.TitleWrapper=d;exports.VerticalLabelWrapper=o;