@efiche/design 0.2.1 → 0.2.3

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/index.cjs CHANGED
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  "use strict";
2
3
  var __defProp = Object.defineProperty;
3
4
  var __defProps = Object.defineProperties;
@@ -157,10 +158,12 @@ var LineChart = ({
157
158
  height = 250,
158
159
  legend = false,
159
160
  grid = true,
160
- theme = "light"
161
+ theme = "light",
162
+ className,
163
+ style
161
164
  }) => {
162
165
  const { gridColor, axisStroke, axisTick, tooltipStyle } = getChartTheme(theme);
163
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_recharts.ResponsiveContainer, { width: "100%", height, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_recharts.LineChart, { data, children: [
166
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className, style: __spreadValues({ minWidth: 250, width: "100%" }, style), children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_recharts.ResponsiveContainer, { width: "100%", height, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_recharts.LineChart, { data, children: [
164
167
  grid && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_recharts.CartesianGrid, { strokeDasharray: "3 3", stroke: gridColor }),
165
168
  /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_recharts.XAxis, { dataKey: xKey, stroke: axisStroke, tick: axisTick }),
166
169
  /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_recharts.YAxis, { stroke: axisStroke, tick: axisTick }),
@@ -183,7 +186,7 @@ var LineChart = ({
183
186
  line.dataKey
184
187
  );
185
188
  })
186
- ] }) });
189
+ ] }) }) });
187
190
  };
188
191
  var LineChart_default = LineChart;
189
192
 
@@ -197,10 +200,12 @@ var BarChart = ({
197
200
  height = 250,
198
201
  legend = false,
199
202
  grid = true,
200
- theme = "light"
203
+ theme = "light",
204
+ className,
205
+ style
201
206
  }) => {
202
207
  const { gridColor, axisStroke, axisTick, tooltipStyle } = getChartTheme(theme);
203
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_recharts2.ResponsiveContainer, { width: "100%", height, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_recharts2.BarChart, { data, children: [
208
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className, style: __spreadValues({ minWidth: 250, width: "100%" }, style), children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_recharts2.ResponsiveContainer, { width: "100%", height, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_recharts2.BarChart, { data, children: [
204
209
  grid && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_recharts2.CartesianGrid, { strokeDasharray: "3 3", stroke: gridColor }),
205
210
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_recharts2.XAxis, { dataKey: xKey, stroke: axisStroke, tick: axisTick }),
206
211
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_recharts2.YAxis, { stroke: axisStroke, tick: axisTick }),
@@ -222,7 +227,7 @@ var BarChart = ({
222
227
  bar.dataKey
223
228
  );
224
229
  })
225
- ] }) });
230
+ ] }) }) });
226
231
  };
227
232
  var BarChart_default = BarChart;
228
233
 
@@ -236,10 +241,12 @@ var AreaChart = ({
236
241
  height = 250,
237
242
  legend = false,
238
243
  grid = true,
239
- theme = "light"
244
+ theme = "light",
245
+ className,
246
+ style
240
247
  }) => {
241
248
  const { gridColor, axisStroke, axisTick, tooltipStyle } = getChartTheme(theme);
242
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_recharts3.ResponsiveContainer, { width: "100%", height, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_recharts3.AreaChart, { data, children: [
249
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className, style: __spreadValues({ minWidth: 250, width: "100%" }, style), children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_recharts3.ResponsiveContainer, { width: "100%", height, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_recharts3.AreaChart, { data, children: [
243
250
  grid && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_recharts3.CartesianGrid, { strokeDasharray: "3 3", stroke: gridColor }),
244
251
  /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_recharts3.XAxis, { dataKey: xKey, stroke: axisStroke, tick: axisTick }),
245
252
  /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_recharts3.YAxis, { stroke: axisStroke, tick: axisTick }),
@@ -264,7 +271,7 @@ var AreaChart = ({
264
271
  area.dataKey
265
272
  );
266
273
  })
267
- ] }) });
274
+ ] }) }) });
268
275
  };
269
276
  var AreaChart_default = AreaChart;
270
277
 
@@ -277,7 +284,9 @@ var PieChart = ({
277
284
  donut = false,
278
285
  legend = false,
279
286
  label = false,
280
- theme = "light"
287
+ theme = "light",
288
+ className,
289
+ style
281
290
  }) => {
282
291
  const { tooltipStyle } = getChartTheme(theme);
283
292
  const dataWithColors = data.map((item, i) => {
@@ -288,7 +297,7 @@ var PieChart = ({
288
297
  });
289
298
  const outerRadius = 90;
290
299
  const innerRadius = donut ? 55 : 0;
291
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_recharts4.ResponsiveContainer, { width: "100%", height, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_recharts4.PieChart, { children: [
300
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className, style: __spreadValues({ minWidth: 250, width: "100%" }, style), children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_recharts4.ResponsiveContainer, { width: "100%", height, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_recharts4.PieChart, { children: [
292
301
  /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
293
302
  import_recharts4.Pie,
294
303
  {
@@ -304,7 +313,7 @@ var PieChart = ({
304
313
  ),
305
314
  /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_recharts4.Tooltip, { contentStyle: tooltipStyle }),
306
315
  legend && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_recharts4.Legend, {})
307
- ] }) });
316
+ ] }) }) });
308
317
  };
309
318
  var PieChart_default = PieChart;
310
319