design-zystem 1.0.208 → 1.0.209

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.d.mts CHANGED
@@ -670,6 +670,17 @@ interface PopoverProps {
670
670
  }
671
671
  declare const Popover: ({ items, children }: PopoverProps) => react_jsx_runtime.JSX.Element;
672
672
 
673
+ interface MetricCardProps {
674
+ icon: string;
675
+ title: string;
676
+ value: string | number;
677
+ valueColor?: string;
678
+ iconBackgroundColor?: string;
679
+ iconColor?: string;
680
+ contentLayout?: 'col' | 'row';
681
+ }
682
+ declare const MetricCard: ({ icon, title, value, valueColor, iconBackgroundColor, iconColor, contentLayout, }: MetricCardProps) => react_jsx_runtime.JSX.Element;
683
+
673
684
  interface TooltipProps {
674
685
  children?: ReactNode;
675
686
  backgroundColor?: string;
@@ -825,4 +836,4 @@ declare const colors: {
825
836
  readonly light_blue: "#F1F5F9";
826
837
  };
827
838
 
828
- export { Accordion, type AccordionItem, Box, Bubble, Bulk, Button, CardSkeleton, Checkbox, Col, ColorPicker, DatePicker, Divider, Drawer, FileUploadZone, Grid, Icon, IconTabs, Image, Input, Link, List, ListItem, Modal, ModalConfirmation, MultiSelect, NewModal, Options, PageContainer, Pagination, Popover, Radio, Row, Select, type SelectOption, type SelectProps, SkeletonRow, Spinner, Stepper, Switch, Table, TableBody, TableCell, TableFooter, TableFooterCell, TableFooterRow, TableHeader, TableHeaderCell, TableHeaderRow, TableRow, Tabs, TagBubble, Text, Tooltip, colors, formatDate, formatDistance, formatDuration, truncateFileName, truncateText };
839
+ export { Accordion, type AccordionItem, Box, Bubble, Bulk, Button, CardSkeleton, Checkbox, Col, ColorPicker, DatePicker, Divider, Drawer, FileUploadZone, Grid, Icon, IconTabs, Image, Input, Link, List, ListItem, MetricCard, Modal, ModalConfirmation, MultiSelect, NewModal, Options, PageContainer, Pagination, Popover, Radio, Row, Select, type SelectOption, type SelectProps, SkeletonRow, Spinner, Stepper, Switch, Table, TableBody, TableCell, TableFooter, TableFooterCell, TableFooterRow, TableHeader, TableHeaderCell, TableHeaderRow, TableRow, Tabs, TagBubble, Text, Tooltip, colors, formatDate, formatDistance, formatDuration, truncateFileName, truncateText };
package/dist/index.d.ts CHANGED
@@ -670,6 +670,17 @@ interface PopoverProps {
670
670
  }
671
671
  declare const Popover: ({ items, children }: PopoverProps) => react_jsx_runtime.JSX.Element;
672
672
 
673
+ interface MetricCardProps {
674
+ icon: string;
675
+ title: string;
676
+ value: string | number;
677
+ valueColor?: string;
678
+ iconBackgroundColor?: string;
679
+ iconColor?: string;
680
+ contentLayout?: 'col' | 'row';
681
+ }
682
+ declare const MetricCard: ({ icon, title, value, valueColor, iconBackgroundColor, iconColor, contentLayout, }: MetricCardProps) => react_jsx_runtime.JSX.Element;
683
+
673
684
  interface TooltipProps {
674
685
  children?: ReactNode;
675
686
  backgroundColor?: string;
@@ -825,4 +836,4 @@ declare const colors: {
825
836
  readonly light_blue: "#F1F5F9";
826
837
  };
827
838
 
828
- export { Accordion, type AccordionItem, Box, Bubble, Bulk, Button, CardSkeleton, Checkbox, Col, ColorPicker, DatePicker, Divider, Drawer, FileUploadZone, Grid, Icon, IconTabs, Image, Input, Link, List, ListItem, Modal, ModalConfirmation, MultiSelect, NewModal, Options, PageContainer, Pagination, Popover, Radio, Row, Select, type SelectOption, type SelectProps, SkeletonRow, Spinner, Stepper, Switch, Table, TableBody, TableCell, TableFooter, TableFooterCell, TableFooterRow, TableHeader, TableHeaderCell, TableHeaderRow, TableRow, Tabs, TagBubble, Text, Tooltip, colors, formatDate, formatDistance, formatDuration, truncateFileName, truncateText };
839
+ export { Accordion, type AccordionItem, Box, Bubble, Bulk, Button, CardSkeleton, Checkbox, Col, ColorPicker, DatePicker, Divider, Drawer, FileUploadZone, Grid, Icon, IconTabs, Image, Input, Link, List, ListItem, MetricCard, Modal, ModalConfirmation, MultiSelect, NewModal, Options, PageContainer, Pagination, Popover, Radio, Row, Select, type SelectOption, type SelectProps, SkeletonRow, Spinner, Stepper, Switch, Table, TableBody, TableCell, TableFooter, TableFooterCell, TableFooterRow, TableHeader, TableHeaderCell, TableHeaderRow, TableRow, Tabs, TagBubble, Text, Tooltip, colors, formatDate, formatDistance, formatDuration, truncateFileName, truncateText };
package/dist/index.js CHANGED
@@ -80,6 +80,7 @@ __export(index_exports, {
80
80
  Link: () => Link,
81
81
  List: () => List,
82
82
  ListItem: () => ListItem,
83
+ MetricCard: () => MetricCard,
83
84
  Modal: () => Modal,
84
85
  ModalConfirmation: () => ModalConfirmation,
85
86
  MultiSelect: () => MultiSelect,
@@ -4278,10 +4279,56 @@ var Popover = ({ items = [], children }) => {
4278
4279
  ] });
4279
4280
  };
4280
4281
 
4282
+ // src/Components/MetricCard/MetricCard.tsx
4283
+ var import_jsx_runtime47 = require("react/jsx-runtime");
4284
+ var MetricCard = ({
4285
+ icon,
4286
+ title,
4287
+ value,
4288
+ valueColor,
4289
+ iconBackgroundColor = "blue_50",
4290
+ iconColor = "blue_950",
4291
+ contentLayout = "col"
4292
+ }) => {
4293
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
4294
+ Box,
4295
+ {
4296
+ padding: "16px",
4297
+ borderRadius: "6px",
4298
+ style: {
4299
+ flex: 1
4300
+ },
4301
+ children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Row, { alignItems: "center", gap: "12", fullWidth: true, children: [
4302
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
4303
+ Box,
4304
+ {
4305
+ alignItems: "center",
4306
+ justifyContent: "center",
4307
+ background: iconBackgroundColor,
4308
+ style: {
4309
+ width: 40,
4310
+ height: 40,
4311
+ borderRadius: 50
4312
+ },
4313
+ children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Icon, { name: icon, size: "m", color: iconColor, family: "regular" })
4314
+ }
4315
+ ),
4316
+ contentLayout === "row" ? /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Row, { gap: "6", alignItems: "center", children: [
4317
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Text, { size: "s", weight: "bold", variant: valueColor || "grey_600", children: value }),
4318
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Text, { size: "s", variant: "grey_600", children: title })
4319
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Col, { gap: "4", children: [
4320
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Text, { size: "s", variant: "grey_600", children: title }),
4321
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Text, { size: "s", weight: "bold", variant: valueColor || "grey_600", children: value })
4322
+ ] })
4323
+ ] })
4324
+ }
4325
+ );
4326
+ };
4327
+
4281
4328
  // src/Components/Tooltip/Tooltip.tsx
4282
4329
  var import_react21 = require("react");
4283
4330
  var import_styled_components39 = __toESM(require("styled-components"));
4284
- var import_jsx_runtime47 = require("react/jsx-runtime");
4331
+ var import_jsx_runtime48 = require("react/jsx-runtime");
4285
4332
  var StyledTooltipWrapper = import_styled_components39.default.div`
4286
4333
  position: relative;
4287
4334
  display: inline-block;
@@ -4386,14 +4433,14 @@ var Tooltip = ({
4386
4433
  const [isVisible, setIsVisible] = (0, import_react21.useState)(false);
4387
4434
  const handleMouseEnter = () => setIsVisible(true);
4388
4435
  const handleMouseLeave = () => setIsVisible(false);
4389
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
4436
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
4390
4437
  StyledTooltipWrapper,
4391
4438
  {
4392
4439
  onMouseEnter: handleMouseEnter,
4393
4440
  onMouseLeave: handleMouseLeave,
4394
4441
  children: [
4395
4442
  children,
4396
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
4443
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
4397
4444
  StyledTooltipContent,
4398
4445
  {
4399
4446
  $isVisible: isVisible,
@@ -4401,7 +4448,7 @@ var Tooltip = ({
4401
4448
  $width: width,
4402
4449
  $height: height,
4403
4450
  $direction: direction,
4404
- children: data.length > 0 ? data.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Text, { size: "s", color: "white", children: item }, index)) : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Text, { size: "s", color: "white", children: "Aucune donn\xE9e" })
4451
+ children: data.length > 0 ? data.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Text, { size: "s", color: "white", children: item }, index)) : /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Text, { size: "s", color: "white", children: "Aucune donn\xE9e" })
4405
4452
  }
4406
4453
  )
4407
4454
  ]
@@ -4411,7 +4458,7 @@ var Tooltip = ({
4411
4458
 
4412
4459
  // src/Components/Pagination/Pagination.tsx
4413
4460
  var import_react22 = require("react");
4414
- var import_jsx_runtime48 = require("react/jsx-runtime");
4461
+ var import_jsx_runtime49 = require("react/jsx-runtime");
4415
4462
  var getPageNumbers = (current, total) => {
4416
4463
  if (total <= 5) {
4417
4464
  return Array.from({ length: total }, (_, i) => i + 1);
@@ -4441,15 +4488,15 @@ var Pagination = ({
4441
4488
  const startItem = (currentPage - 1) * itemsPerPage + 1;
4442
4489
  const endItem = Math.min(currentPage * itemsPerPage, totalItems);
4443
4490
  const summary = summaryLabel || defaultSummary(startItem, endItem, totalItems);
4444
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
4491
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
4445
4492
  Row,
4446
4493
  {
4447
4494
  justifyContent: showSummary ? "space-between" : "flex-end",
4448
4495
  alignItems: "center",
4449
4496
  children: [
4450
- showSummary && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Text, { size: "s", color: colors.grey_500, children: summary }),
4451
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Row, { gap: "4", alignItems: "center", style: { width: "fit-content" }, children: [
4452
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
4497
+ showSummary && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Text, { size: "s", color: colors.grey_500, children: summary }),
4498
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Row, { gap: "4", alignItems: "center", style: { width: "fit-content" }, children: [
4499
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
4453
4500
  Button,
4454
4501
  {
4455
4502
  size: "xs",
@@ -4460,7 +4507,7 @@ var Pagination = ({
4460
4507
  }
4461
4508
  ),
4462
4509
  pages.map(
4463
- (page, index) => page === "..." ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Text, { size: "s", color: colors.grey_500, children: "..." }, `ellipsis-${index}`) : /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
4510
+ (page, index) => page === "..." ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Text, { size: "s", color: colors.grey_500, children: "..." }, `ellipsis-${index}`) : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
4464
4511
  Button,
4465
4512
  {
4466
4513
  size: "xs",
@@ -4471,7 +4518,7 @@ var Pagination = ({
4471
4518
  page
4472
4519
  )
4473
4520
  ),
4474
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
4521
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
4475
4522
  Button,
4476
4523
  {
4477
4524
  size: "xs",
@@ -4490,7 +4537,7 @@ var Pagination = ({
4490
4537
  // src/Components/FileUploadZone/FileUploadZone.tsx
4491
4538
  var import_react23 = require("react");
4492
4539
  var import_styled_components40 = __toESM(require("styled-components"));
4493
- var import_jsx_runtime49 = require("react/jsx-runtime");
4540
+ var import_jsx_runtime50 = require("react/jsx-runtime");
4494
4541
  var ACCEPT_MAP = {
4495
4542
  png: "image/png",
4496
4543
  jpg: "image/jpeg",
@@ -4649,9 +4696,9 @@ var FileUploadZone = ({
4649
4696
  onRemove == null ? void 0 : onRemove();
4650
4697
  };
4651
4698
  if (previewUrl) {
4652
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(StyledPreview, { $fullWidth: fullWidth, children: [
4653
- fileType && isPdf(fileType) ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(StyledEmbed, { src: previewUrl, type: "application/pdf" }) : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(StyledImage2, { src: previewUrl, alt: "Aper\xE7u du fichier" }),
4654
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Row, { gap: "8", justifyContent: "center", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
4699
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(StyledPreview, { $fullWidth: fullWidth, children: [
4700
+ fileType && isPdf(fileType) ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(StyledEmbed, { src: previewUrl, type: "application/pdf" }) : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(StyledImage2, { src: previewUrl, alt: "Aper\xE7u du fichier" }),
4701
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Row, { gap: "8", justifyContent: "center", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
4655
4702
  Button,
4656
4703
  {
4657
4704
  onClick: handleRemove,
@@ -4665,8 +4712,8 @@ var FileUploadZone = ({
4665
4712
  }
4666
4713
  const showIcon = icon !== false;
4667
4714
  const showBrowse = !compact && browseLabel !== false;
4668
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Col, { gap: "4", children: [
4669
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
4715
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Col, { gap: "4", children: [
4716
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
4670
4717
  StyledDropZone,
4671
4718
  {
4672
4719
  $isDragging: isDragging,
@@ -4677,7 +4724,7 @@ var FileUploadZone = ({
4677
4724
  onDragLeave: handleDragLeave,
4678
4725
  onDrop: handleDrop,
4679
4726
  children: [
4680
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
4727
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
4681
4728
  HiddenInput2,
4682
4729
  {
4683
4730
  ref: inputRef,
@@ -4687,7 +4734,7 @@ var FileUploadZone = ({
4687
4734
  disabled
4688
4735
  }
4689
4736
  ),
4690
- showIcon && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
4737
+ showIcon && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
4691
4738
  Icon,
4692
4739
  {
4693
4740
  name: icon,
@@ -4696,9 +4743,9 @@ var FileUploadZone = ({
4696
4743
  color: "blue_700"
4697
4744
  }
4698
4745
  ),
4699
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Text, { size: "s", variant: "grey_600", align: "center", children: label }),
4700
- showBrowse && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Text, { size: "xs", variant: "grey_600", align: "center", children: "ou" }),
4701
- showBrowse && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
4746
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Text, { size: "s", variant: "grey_600", align: "center", children: label }),
4747
+ showBrowse && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Text, { size: "xs", variant: "grey_600", align: "center", children: "ou" }),
4748
+ showBrowse && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
4702
4749
  Button,
4703
4750
  {
4704
4751
  outline: true,
@@ -4711,21 +4758,21 @@ var FileUploadZone = ({
4711
4758
  }
4712
4759
  }
4713
4760
  ),
4714
- sublabel && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Text, { size: "xs", variant: "grey_500", align: "center", children: sublabel })
4761
+ sublabel && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Text, { size: "xs", variant: "grey_500", align: "center", children: sublabel })
4715
4762
  ]
4716
4763
  }
4717
4764
  ),
4718
- showFileName && fileName && /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Row, { gap: "8", alignItems: "center", justifyContent: "center", children: [
4719
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Icon, { name: "file", size: "s", color: "green_700" }),
4720
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Text, { size: "s", color: "green_700", children: fileName })
4765
+ showFileName && fileName && /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Row, { gap: "8", alignItems: "center", justifyContent: "center", children: [
4766
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Icon, { name: "file", size: "s", color: "green_700" }),
4767
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Text, { size: "s", color: "green_700", children: fileName })
4721
4768
  ] }),
4722
- inlineError && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Text, { size: "s", color: "danger", align: "center", children: inlineError })
4769
+ inlineError && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Text, { size: "s", color: "danger", align: "center", children: inlineError })
4723
4770
  ] });
4724
4771
  };
4725
4772
 
4726
4773
  // src/Components/Spinner/Spinner.tsx
4727
4774
  var import_styled_components41 = __toESM(require("styled-components"));
4728
- var import_jsx_runtime50 = require("react/jsx-runtime");
4775
+ var import_jsx_runtime51 = require("react/jsx-runtime");
4729
4776
  var SIZES3 = {
4730
4777
  s: 20,
4731
4778
  m: 32,
@@ -4748,7 +4795,7 @@ var StyledSpinner = import_styled_components41.default.span`
4748
4795
  var Spinner = ({ size = "m", color = "primary" }) => {
4749
4796
  const resolvedSize = SIZES3[size];
4750
4797
  const resolvedColor = colors[color] || color || colors.primary;
4751
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
4798
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
4752
4799
  StyledSpinner,
4753
4800
  {
4754
4801
  $size: resolvedSize,
@@ -4883,6 +4930,7 @@ var truncateFileName = (fileName, maxLength = 20) => {
4883
4930
  Link,
4884
4931
  List,
4885
4932
  ListItem,
4933
+ MetricCard,
4886
4934
  Modal,
4887
4935
  ModalConfirmation,
4888
4936
  MultiSelect,
package/dist/index.mjs CHANGED
@@ -4210,10 +4210,56 @@ var Popover = ({ items = [], children }) => {
4210
4210
  ] });
4211
4211
  };
4212
4212
 
4213
+ // src/Components/MetricCard/MetricCard.tsx
4214
+ import { jsx as jsx47, jsxs as jsxs23 } from "react/jsx-runtime";
4215
+ var MetricCard = ({
4216
+ icon,
4217
+ title,
4218
+ value,
4219
+ valueColor,
4220
+ iconBackgroundColor = "blue_50",
4221
+ iconColor = "blue_950",
4222
+ contentLayout = "col"
4223
+ }) => {
4224
+ return /* @__PURE__ */ jsx47(
4225
+ Box,
4226
+ {
4227
+ padding: "16px",
4228
+ borderRadius: "6px",
4229
+ style: {
4230
+ flex: 1
4231
+ },
4232
+ children: /* @__PURE__ */ jsxs23(Row, { alignItems: "center", gap: "12", fullWidth: true, children: [
4233
+ /* @__PURE__ */ jsx47(
4234
+ Box,
4235
+ {
4236
+ alignItems: "center",
4237
+ justifyContent: "center",
4238
+ background: iconBackgroundColor,
4239
+ style: {
4240
+ width: 40,
4241
+ height: 40,
4242
+ borderRadius: 50
4243
+ },
4244
+ children: /* @__PURE__ */ jsx47(Icon, { name: icon, size: "m", color: iconColor, family: "regular" })
4245
+ }
4246
+ ),
4247
+ contentLayout === "row" ? /* @__PURE__ */ jsxs23(Row, { gap: "6", alignItems: "center", children: [
4248
+ /* @__PURE__ */ jsx47(Text, { size: "s", weight: "bold", variant: valueColor || "grey_600", children: value }),
4249
+ /* @__PURE__ */ jsx47(Text, { size: "s", variant: "grey_600", children: title })
4250
+ ] }) : /* @__PURE__ */ jsxs23(Col, { gap: "4", children: [
4251
+ /* @__PURE__ */ jsx47(Text, { size: "s", variant: "grey_600", children: title }),
4252
+ /* @__PURE__ */ jsx47(Text, { size: "s", weight: "bold", variant: valueColor || "grey_600", children: value })
4253
+ ] })
4254
+ ] })
4255
+ }
4256
+ );
4257
+ };
4258
+
4213
4259
  // src/Components/Tooltip/Tooltip.tsx
4214
4260
  import { useState as useState13 } from "react";
4215
4261
  import styled39 from "styled-components";
4216
- import { jsx as jsx47, jsxs as jsxs23 } from "react/jsx-runtime";
4262
+ import { jsx as jsx48, jsxs as jsxs24 } from "react/jsx-runtime";
4217
4263
  var StyledTooltipWrapper = styled39.div`
4218
4264
  position: relative;
4219
4265
  display: inline-block;
@@ -4318,14 +4364,14 @@ var Tooltip = ({
4318
4364
  const [isVisible, setIsVisible] = useState13(false);
4319
4365
  const handleMouseEnter = () => setIsVisible(true);
4320
4366
  const handleMouseLeave = () => setIsVisible(false);
4321
- return /* @__PURE__ */ jsxs23(
4367
+ return /* @__PURE__ */ jsxs24(
4322
4368
  StyledTooltipWrapper,
4323
4369
  {
4324
4370
  onMouseEnter: handleMouseEnter,
4325
4371
  onMouseLeave: handleMouseLeave,
4326
4372
  children: [
4327
4373
  children,
4328
- /* @__PURE__ */ jsx47(
4374
+ /* @__PURE__ */ jsx48(
4329
4375
  StyledTooltipContent,
4330
4376
  {
4331
4377
  $isVisible: isVisible,
@@ -4333,7 +4379,7 @@ var Tooltip = ({
4333
4379
  $width: width,
4334
4380
  $height: height,
4335
4381
  $direction: direction,
4336
- children: data.length > 0 ? data.map((item, index) => /* @__PURE__ */ jsx47(Text, { size: "s", color: "white", children: item }, index)) : /* @__PURE__ */ jsx47(Text, { size: "s", color: "white", children: "Aucune donn\xE9e" })
4382
+ children: data.length > 0 ? data.map((item, index) => /* @__PURE__ */ jsx48(Text, { size: "s", color: "white", children: item }, index)) : /* @__PURE__ */ jsx48(Text, { size: "s", color: "white", children: "Aucune donn\xE9e" })
4337
4383
  }
4338
4384
  )
4339
4385
  ]
@@ -4343,7 +4389,7 @@ var Tooltip = ({
4343
4389
 
4344
4390
  // src/Components/Pagination/Pagination.tsx
4345
4391
  import { useMemo as useMemo2 } from "react";
4346
- import { jsx as jsx48, jsxs as jsxs24 } from "react/jsx-runtime";
4392
+ import { jsx as jsx49, jsxs as jsxs25 } from "react/jsx-runtime";
4347
4393
  var getPageNumbers = (current, total) => {
4348
4394
  if (total <= 5) {
4349
4395
  return Array.from({ length: total }, (_, i) => i + 1);
@@ -4373,15 +4419,15 @@ var Pagination = ({
4373
4419
  const startItem = (currentPage - 1) * itemsPerPage + 1;
4374
4420
  const endItem = Math.min(currentPage * itemsPerPage, totalItems);
4375
4421
  const summary = summaryLabel || defaultSummary(startItem, endItem, totalItems);
4376
- return /* @__PURE__ */ jsxs24(
4422
+ return /* @__PURE__ */ jsxs25(
4377
4423
  Row,
4378
4424
  {
4379
4425
  justifyContent: showSummary ? "space-between" : "flex-end",
4380
4426
  alignItems: "center",
4381
4427
  children: [
4382
- showSummary && /* @__PURE__ */ jsx48(Text, { size: "s", color: colors.grey_500, children: summary }),
4383
- /* @__PURE__ */ jsxs24(Row, { gap: "4", alignItems: "center", style: { width: "fit-content" }, children: [
4384
- /* @__PURE__ */ jsx48(
4428
+ showSummary && /* @__PURE__ */ jsx49(Text, { size: "s", color: colors.grey_500, children: summary }),
4429
+ /* @__PURE__ */ jsxs25(Row, { gap: "4", alignItems: "center", style: { width: "fit-content" }, children: [
4430
+ /* @__PURE__ */ jsx49(
4385
4431
  Button,
4386
4432
  {
4387
4433
  size: "xs",
@@ -4392,7 +4438,7 @@ var Pagination = ({
4392
4438
  }
4393
4439
  ),
4394
4440
  pages.map(
4395
- (page, index) => page === "..." ? /* @__PURE__ */ jsx48(Text, { size: "s", color: colors.grey_500, children: "..." }, `ellipsis-${index}`) : /* @__PURE__ */ jsx48(
4441
+ (page, index) => page === "..." ? /* @__PURE__ */ jsx49(Text, { size: "s", color: colors.grey_500, children: "..." }, `ellipsis-${index}`) : /* @__PURE__ */ jsx49(
4396
4442
  Button,
4397
4443
  {
4398
4444
  size: "xs",
@@ -4403,7 +4449,7 @@ var Pagination = ({
4403
4449
  page
4404
4450
  )
4405
4451
  ),
4406
- /* @__PURE__ */ jsx48(
4452
+ /* @__PURE__ */ jsx49(
4407
4453
  Button,
4408
4454
  {
4409
4455
  size: "xs",
@@ -4422,7 +4468,7 @@ var Pagination = ({
4422
4468
  // src/Components/FileUploadZone/FileUploadZone.tsx
4423
4469
  import { useState as useState14, useRef as useRef13, useCallback as useCallback4 } from "react";
4424
4470
  import styled40 from "styled-components";
4425
- import { jsx as jsx49, jsxs as jsxs25 } from "react/jsx-runtime";
4471
+ import { jsx as jsx50, jsxs as jsxs26 } from "react/jsx-runtime";
4426
4472
  var ACCEPT_MAP = {
4427
4473
  png: "image/png",
4428
4474
  jpg: "image/jpeg",
@@ -4581,9 +4627,9 @@ var FileUploadZone = ({
4581
4627
  onRemove == null ? void 0 : onRemove();
4582
4628
  };
4583
4629
  if (previewUrl) {
4584
- return /* @__PURE__ */ jsxs25(StyledPreview, { $fullWidth: fullWidth, children: [
4585
- fileType && isPdf(fileType) ? /* @__PURE__ */ jsx49(StyledEmbed, { src: previewUrl, type: "application/pdf" }) : /* @__PURE__ */ jsx49(StyledImage2, { src: previewUrl, alt: "Aper\xE7u du fichier" }),
4586
- /* @__PURE__ */ jsx49(Row, { gap: "8", justifyContent: "center", children: /* @__PURE__ */ jsx49(
4630
+ return /* @__PURE__ */ jsxs26(StyledPreview, { $fullWidth: fullWidth, children: [
4631
+ fileType && isPdf(fileType) ? /* @__PURE__ */ jsx50(StyledEmbed, { src: previewUrl, type: "application/pdf" }) : /* @__PURE__ */ jsx50(StyledImage2, { src: previewUrl, alt: "Aper\xE7u du fichier" }),
4632
+ /* @__PURE__ */ jsx50(Row, { gap: "8", justifyContent: "center", children: /* @__PURE__ */ jsx50(
4587
4633
  Button,
4588
4634
  {
4589
4635
  onClick: handleRemove,
@@ -4597,8 +4643,8 @@ var FileUploadZone = ({
4597
4643
  }
4598
4644
  const showIcon = icon !== false;
4599
4645
  const showBrowse = !compact && browseLabel !== false;
4600
- return /* @__PURE__ */ jsxs25(Col, { gap: "4", children: [
4601
- /* @__PURE__ */ jsxs25(
4646
+ return /* @__PURE__ */ jsxs26(Col, { gap: "4", children: [
4647
+ /* @__PURE__ */ jsxs26(
4602
4648
  StyledDropZone,
4603
4649
  {
4604
4650
  $isDragging: isDragging,
@@ -4609,7 +4655,7 @@ var FileUploadZone = ({
4609
4655
  onDragLeave: handleDragLeave,
4610
4656
  onDrop: handleDrop,
4611
4657
  children: [
4612
- /* @__PURE__ */ jsx49(
4658
+ /* @__PURE__ */ jsx50(
4613
4659
  HiddenInput2,
4614
4660
  {
4615
4661
  ref: inputRef,
@@ -4619,7 +4665,7 @@ var FileUploadZone = ({
4619
4665
  disabled
4620
4666
  }
4621
4667
  ),
4622
- showIcon && /* @__PURE__ */ jsx49(
4668
+ showIcon && /* @__PURE__ */ jsx50(
4623
4669
  Icon,
4624
4670
  {
4625
4671
  name: icon,
@@ -4628,9 +4674,9 @@ var FileUploadZone = ({
4628
4674
  color: "blue_700"
4629
4675
  }
4630
4676
  ),
4631
- /* @__PURE__ */ jsx49(Text, { size: "s", variant: "grey_600", align: "center", children: label }),
4632
- showBrowse && /* @__PURE__ */ jsx49(Text, { size: "xs", variant: "grey_600", align: "center", children: "ou" }),
4633
- showBrowse && /* @__PURE__ */ jsx49(
4677
+ /* @__PURE__ */ jsx50(Text, { size: "s", variant: "grey_600", align: "center", children: label }),
4678
+ showBrowse && /* @__PURE__ */ jsx50(Text, { size: "xs", variant: "grey_600", align: "center", children: "ou" }),
4679
+ showBrowse && /* @__PURE__ */ jsx50(
4634
4680
  Button,
4635
4681
  {
4636
4682
  outline: true,
@@ -4643,21 +4689,21 @@ var FileUploadZone = ({
4643
4689
  }
4644
4690
  }
4645
4691
  ),
4646
- sublabel && /* @__PURE__ */ jsx49(Text, { size: "xs", variant: "grey_500", align: "center", children: sublabel })
4692
+ sublabel && /* @__PURE__ */ jsx50(Text, { size: "xs", variant: "grey_500", align: "center", children: sublabel })
4647
4693
  ]
4648
4694
  }
4649
4695
  ),
4650
- showFileName && fileName && /* @__PURE__ */ jsxs25(Row, { gap: "8", alignItems: "center", justifyContent: "center", children: [
4651
- /* @__PURE__ */ jsx49(Icon, { name: "file", size: "s", color: "green_700" }),
4652
- /* @__PURE__ */ jsx49(Text, { size: "s", color: "green_700", children: fileName })
4696
+ showFileName && fileName && /* @__PURE__ */ jsxs26(Row, { gap: "8", alignItems: "center", justifyContent: "center", children: [
4697
+ /* @__PURE__ */ jsx50(Icon, { name: "file", size: "s", color: "green_700" }),
4698
+ /* @__PURE__ */ jsx50(Text, { size: "s", color: "green_700", children: fileName })
4653
4699
  ] }),
4654
- inlineError && /* @__PURE__ */ jsx49(Text, { size: "s", color: "danger", align: "center", children: inlineError })
4700
+ inlineError && /* @__PURE__ */ jsx50(Text, { size: "s", color: "danger", align: "center", children: inlineError })
4655
4701
  ] });
4656
4702
  };
4657
4703
 
4658
4704
  // src/Components/Spinner/Spinner.tsx
4659
4705
  import styled41, { keyframes } from "styled-components";
4660
- import { jsx as jsx50 } from "react/jsx-runtime";
4706
+ import { jsx as jsx51 } from "react/jsx-runtime";
4661
4707
  var SIZES3 = {
4662
4708
  s: 20,
4663
4709
  m: 32,
@@ -4680,7 +4726,7 @@ var StyledSpinner = styled41.span`
4680
4726
  var Spinner = ({ size = "m", color = "primary" }) => {
4681
4727
  const resolvedSize = SIZES3[size];
4682
4728
  const resolvedColor = colors[color] || color || colors.primary;
4683
- return /* @__PURE__ */ jsx50(
4729
+ return /* @__PURE__ */ jsx51(
4684
4730
  StyledSpinner,
4685
4731
  {
4686
4732
  $size: resolvedSize,
@@ -4814,6 +4860,7 @@ export {
4814
4860
  Link,
4815
4861
  List,
4816
4862
  ListItem,
4863
+ MetricCard,
4817
4864
  Modal,
4818
4865
  ModalConfirmation,
4819
4866
  MultiSelect,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "design-zystem",
3
- "version": "1.0.208",
3
+ "version": "1.0.209",
4
4
  "description": "A React design system of importable components",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",