design-zystem 1.0.236 → 1.0.237

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
@@ -641,10 +641,12 @@ interface TableCellProps extends HTMLAttributes<HTMLDivElement> {
641
641
  }
642
642
  declare const TableCell: (props: TableCellProps) => react_jsx_runtime.JSX.Element;
643
643
 
644
+ type SortOrder = 'asc' | 'desc' | null;
644
645
  interface TableHeaderCellProps extends HTMLAttributes<HTMLDivElement> {
645
646
  children?: ReactNode;
646
647
  useSort?: boolean;
647
648
  isSort?: boolean;
649
+ sortOrder?: SortOrder;
648
650
  flexGrow?: string | number;
649
651
  flexShrink?: string | number;
650
652
  width?: string;
@@ -932,4 +934,4 @@ interface OptimizeImageOptions {
932
934
  }
933
935
  declare const optimizeImage: (file: File | null | undefined, desiredBaseName: string, opts?: OptimizeImageOptions) => Promise<OptimizeImageResult>;
934
936
 
935
- export { Accordion, type AccordionItem, Avatar, Box, Bubble, Bulk, Button, CardSkeleton, Checkbox, Col, Collapse, 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, SliderInput, Spinner, Stepper, Switch, Table, TableBody, TableCell, TableFooter, TableFooterCell, TableFooterRow, TableHeader, TableHeaderCell, TableHeaderRow, TableRow, Tabs, TagBubble, Text, Tooltip, colors, formatDate, formatDistance, formatDuration, optimizeImage, truncateFileName, truncateText };
937
+ export { Accordion, type AccordionItem, Avatar, Box, Bubble, Bulk, Button, CardSkeleton, Checkbox, Col, Collapse, 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, SliderInput, type SortOrder, Spinner, Stepper, Switch, Table, TableBody, TableCell, TableFooter, TableFooterCell, TableFooterRow, TableHeader, TableHeaderCell, type TableHeaderCellProps, TableHeaderRow, TableRow, Tabs, TagBubble, Text, Tooltip, colors, formatDate, formatDistance, formatDuration, optimizeImage, truncateFileName, truncateText };
package/dist/index.d.ts CHANGED
@@ -641,10 +641,12 @@ interface TableCellProps extends HTMLAttributes<HTMLDivElement> {
641
641
  }
642
642
  declare const TableCell: (props: TableCellProps) => react_jsx_runtime.JSX.Element;
643
643
 
644
+ type SortOrder = 'asc' | 'desc' | null;
644
645
  interface TableHeaderCellProps extends HTMLAttributes<HTMLDivElement> {
645
646
  children?: ReactNode;
646
647
  useSort?: boolean;
647
648
  isSort?: boolean;
649
+ sortOrder?: SortOrder;
648
650
  flexGrow?: string | number;
649
651
  flexShrink?: string | number;
650
652
  width?: string;
@@ -932,4 +934,4 @@ interface OptimizeImageOptions {
932
934
  }
933
935
  declare const optimizeImage: (file: File | null | undefined, desiredBaseName: string, opts?: OptimizeImageOptions) => Promise<OptimizeImageResult>;
934
936
 
935
- export { Accordion, type AccordionItem, Avatar, Box, Bubble, Bulk, Button, CardSkeleton, Checkbox, Col, Collapse, 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, SliderInput, Spinner, Stepper, Switch, Table, TableBody, TableCell, TableFooter, TableFooterCell, TableFooterRow, TableHeader, TableHeaderCell, TableHeaderRow, TableRow, Tabs, TagBubble, Text, Tooltip, colors, formatDate, formatDistance, formatDuration, optimizeImage, truncateFileName, truncateText };
937
+ export { Accordion, type AccordionItem, Avatar, Box, Bubble, Bulk, Button, CardSkeleton, Checkbox, Col, Collapse, 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, SliderInput, type SortOrder, Spinner, Stepper, Switch, Table, TableBody, TableCell, TableFooter, TableFooterCell, TableFooterRow, TableHeader, TableHeaderCell, type TableHeaderCellProps, TableHeaderRow, TableRow, Tabs, TagBubble, Text, Tooltip, colors, formatDate, formatDistance, formatDuration, optimizeImage, truncateFileName, truncateText };
package/dist/index.js CHANGED
@@ -3363,6 +3363,7 @@ var TableCell = (props) => {
3363
3363
  };
3364
3364
 
3365
3365
  // src/Components/Table/TableHeaderCell/TableHeaderCell.tsx
3366
+ var import_react16 = require("react");
3366
3367
  var import_styled_components31 = __toESM(require("styled-components"));
3367
3368
  var import_jsx_runtime35 = require("react/jsx-runtime");
3368
3369
  var shouldForwardPropTableHeaderCell = (prop) => !["useSort", "isSort", "flexGrow", "flexShrink", "width"].includes(prop);
@@ -3382,24 +3383,48 @@ var StyledTableHeaderCell = import_styled_components31.default.div.withConfig({
3382
3383
  font-weight: bold;
3383
3384
  max-width: ${(props) => props.width || "auto"};
3384
3385
  min-width: ${(props) => props.width || "auto"};
3385
-
3386
- .sortingButton {
3387
- display: ${(props) => props.useSort ? "inline-flex" : "block"};
3388
- align-items: center;
3389
- padding: ${(props) => props.useSort ? "2px 10px" : "none"};
3390
- background: ${(props) => props.useSort ? props.isSort ? "#f8af2d" : "#FFF5" : "none"};
3391
- border-radius: ${(props) => props.useSort ? "20px" : "0"};
3392
- gap: ${(props) => props.useSort ? "8px" : "0"};
3393
- }
3386
+ `;
3387
+ var SortingButton = import_styled_components31.default.span`
3388
+ display: inline-flex;
3389
+ align-items: center;
3390
+ padding: 2px 10px;
3391
+ background: ${(props) => props.$isSort ? "#f8af2d" : "#FFF5"};
3392
+ border-radius: 20px;
3393
+ gap: 8px;
3394
+ cursor: pointer;
3395
+ `;
3396
+ var SortArrow = import_styled_components31.default.span`
3397
+ font-style: normal;
3398
+ font-size: 0.9em;
3399
+ line-height: 1;
3400
+ transition: opacity 0.15s;
3401
+ opacity: ${(props) => props.$opacity};
3394
3402
  `;
3395
3403
  var TableHeaderCell = (props) => {
3396
- const _a = props, { children, useSort, isSort } = _a, otherProps = __objRest(_a, ["children", "useSort", "isSort"]);
3404
+ const _a = props, { children, useSort, isSort, sortOrder } = _a, otherProps = __objRest(_a, ["children", "useSort", "isSort", "sortOrder"]);
3405
+ const [hovered, setHovered] = (0, import_react16.useState)(false);
3406
+ const showArrow = useSort && (isSort || hovered);
3407
+ const arrowChar = isSort && sortOrder === "asc" ? "\u2191" : "\u2193";
3408
+ const arrowOpacity = isSort ? 1 : 0.35;
3397
3409
  return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
3398
3410
  StyledTableHeaderCell,
3399
3411
  __spreadProps(__spreadValues({}, otherProps), {
3400
3412
  useSort,
3401
3413
  isSort,
3402
- children: useSort ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "sortingButton", children }) : children
3414
+ onMouseEnter: (e) => {
3415
+ var _a2;
3416
+ if (useSort) setHovered(true);
3417
+ (_a2 = otherProps.onMouseEnter) == null ? void 0 : _a2.call(otherProps, e);
3418
+ },
3419
+ onMouseLeave: (e) => {
3420
+ var _a2;
3421
+ if (useSort) setHovered(false);
3422
+ (_a2 = otherProps.onMouseLeave) == null ? void 0 : _a2.call(otherProps, e);
3423
+ },
3424
+ children: useSort ? /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(SortingButton, { $isSort: isSort, children: [
3425
+ children,
3426
+ showArrow && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(SortArrow, { $opacity: arrowOpacity, children: arrowChar })
3427
+ ] }) : children
3403
3428
  })
3404
3429
  );
3405
3430
  };
@@ -3525,7 +3550,7 @@ var SkeletonRow = ({ columns = 9 }) => /* @__PURE__ */ (0, import_jsx_runtime40.
3525
3550
  ] });
3526
3551
 
3527
3552
  // src/Components/Switch/Switch.tsx
3528
- var import_react16 = require("react");
3553
+ var import_react17 = require("react");
3529
3554
  var import_styled_components36 = __toESM(require("styled-components"));
3530
3555
  var import_jsx_runtime41 = require("react/jsx-runtime");
3531
3556
  var BASE = {
@@ -3606,7 +3631,7 @@ var Knob = import_styled_components36.default.span`
3606
3631
  transform: translateY(-50%) scale(0.96);
3607
3632
  }
3608
3633
  `;
3609
- var Switch = (0, import_react16.forwardRef)(
3634
+ var Switch = (0, import_react17.forwardRef)(
3610
3635
  (_a, ref) => {
3611
3636
  var _b = _a, {
3612
3637
  checked,
@@ -3662,7 +3687,7 @@ var CardSkeleton = () => {
3662
3687
  };
3663
3688
 
3664
3689
  // src/Components/Options/Options.tsx
3665
- var import_react17 = require("react");
3690
+ var import_react18 = require("react");
3666
3691
  var import_jsx_runtime43 = require("react/jsx-runtime");
3667
3692
  var Options = ({
3668
3693
  icon,
@@ -3672,8 +3697,8 @@ var Options = ({
3672
3697
  onChange,
3673
3698
  disabled = false
3674
3699
  }) => {
3675
- const [state, setState] = (0, import_react17.useState)(0);
3676
- (0, import_react17.useEffect)(() => {
3700
+ const [state, setState] = (0, import_react18.useState)(0);
3701
+ (0, import_react18.useEffect)(() => {
3677
3702
  if (defaultId) {
3678
3703
  const defaultIndex = options.findIndex(
3679
3704
  (option) => option.id === defaultId
@@ -3731,7 +3756,7 @@ var Options = ({
3731
3756
  };
3732
3757
 
3733
3758
  // src/Components/Stepper/Stepper.tsx
3734
- var import_react18 = require("react");
3759
+ var import_react19 = require("react");
3735
3760
  var import_styled_components37 = __toESM(require("styled-components"));
3736
3761
  var import_jsx_runtime44 = require("react/jsx-runtime");
3737
3762
  var Wrapper4 = import_styled_components37.default.nav`
@@ -3770,7 +3795,7 @@ var Stepper = ({
3770
3795
  return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Wrapper4, { "aria-label": "progression", className, children: Array.from({ length: numberOfSteps }, (_, i) => {
3771
3796
  const isActive = i === current;
3772
3797
  const isCompleted = i < current;
3773
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_react18.Fragment, { children: [
3798
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_react19.Fragment, { children: [
3774
3799
  /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3775
3800
  Circle,
3776
3801
  {
@@ -3787,7 +3812,7 @@ var Stepper = ({
3787
3812
  };
3788
3813
 
3789
3814
  // src/Components/Tabs/Tabs.tsx
3790
- var import_react19 = require("react");
3815
+ var import_react20 = require("react");
3791
3816
  var import_styled_components38 = __toESM(require("styled-components"));
3792
3817
  var import_jsx_runtime45 = require("react/jsx-runtime");
3793
3818
  var TOKENS = {
@@ -3937,13 +3962,13 @@ var Tabs = (_a) => {
3937
3962
  "baselineColor",
3938
3963
  "children"
3939
3964
  ]);
3940
- const rootRef = (0, import_react19.useRef)(null);
3941
- const refsMap = (0, import_react19.useRef)(/* @__PURE__ */ new Map());
3942
- const [bar, setBar] = (0, import_react19.useState)({ left: 0, width: 0 });
3965
+ const rootRef = (0, import_react20.useRef)(null);
3966
+ const refsMap = (0, import_react20.useRef)(/* @__PURE__ */ new Map());
3967
+ const [bar, setBar] = (0, import_react20.useState)({ left: 0, width: 0 });
3943
3968
  const setTabRef = (id) => (el) => {
3944
3969
  if (el) refsMap.current.set(id, el);
3945
3970
  };
3946
- const updateBar = (0, import_react19.useCallback)(() => {
3971
+ const updateBar = (0, import_react20.useCallback)(() => {
3947
3972
  const root = rootRef.current;
3948
3973
  const activeEl = value !== void 0 ? refsMap.current.get(value) : void 0;
3949
3974
  if (!root || !activeEl) return;
@@ -3951,7 +3976,7 @@ var Tabs = (_a) => {
3951
3976
  const box = activeEl.getBoundingClientRect();
3952
3977
  setBar({ left: box.left - rootBox.left, width: box.width });
3953
3978
  }, [value]);
3954
- (0, import_react19.useEffect)(() => {
3979
+ (0, import_react20.useEffect)(() => {
3955
3980
  updateBar();
3956
3981
  const ro = new ResizeObserver(updateBar);
3957
3982
  const activeEl = value !== void 0 ? refsMap.current.get(value) : void 0;
@@ -3959,14 +3984,14 @@ var Tabs = (_a) => {
3959
3984
  if (activeEl) ro.observe(activeEl);
3960
3985
  return () => ro.disconnect();
3961
3986
  }, [value, updateBar]);
3962
- const handleSelect = (0, import_react19.useCallback)(
3987
+ const handleSelect = (0, import_react20.useCallback)(
3963
3988
  (id) => {
3964
3989
  if (id !== value && onChange) onChange(id);
3965
3990
  },
3966
3991
  [onChange, value]
3967
3992
  );
3968
3993
  const isPillsFullWidth = variant === "pills" && align === "start";
3969
- const rendered = (0, import_react19.useMemo)(() => {
3994
+ const rendered = (0, import_react20.useMemo)(() => {
3970
3995
  if (items && items.length) {
3971
3996
  return items.map((it) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
3972
3997
  Tab,
@@ -3983,12 +4008,12 @@ var Tabs = (_a) => {
3983
4008
  it.id
3984
4009
  ));
3985
4010
  }
3986
- return import_react19.Children.map(children, (child) => {
4011
+ return import_react20.Children.map(children, (child) => {
3987
4012
  var _a2;
3988
- if (!(0, import_react19.isValidElement)(child)) return child;
4013
+ if (!(0, import_react20.isValidElement)(child)) return child;
3989
4014
  const id = (_a2 = child.props.id) != null ? _a2 : child.key;
3990
4015
  const active = id === value;
3991
- return (0, import_react19.cloneElement)(child, {
4016
+ return (0, import_react20.cloneElement)(child, {
3992
4017
  active,
3993
4018
  variant,
3994
4019
  fullWidth: isPillsFullWidth,
@@ -4016,7 +4041,7 @@ var Tabs = (_a) => {
4016
4041
  };
4017
4042
 
4018
4043
  // src/Components/MultiSelect/MultiSelect.tsx
4019
- var import_react20 = require("react");
4044
+ var import_react21 = require("react");
4020
4045
  var import_styled_components39 = __toESM(require("styled-components"));
4021
4046
  var import_jsx_runtime46 = require("react/jsx-runtime");
4022
4047
  var Container5 = import_styled_components39.default.div`
@@ -4059,8 +4084,8 @@ var MultiSelect = ({
4059
4084
  width,
4060
4085
  align = "left"
4061
4086
  }) => {
4062
- const [isOpen, setIsOpen] = (0, import_react20.useState)(false);
4063
- const dropdownRef = (0, import_react20.useRef)(null);
4087
+ const [isOpen, setIsOpen] = (0, import_react21.useState)(false);
4088
+ const dropdownRef = (0, import_react21.useRef)(null);
4064
4089
  const toggleOption = (value) => {
4065
4090
  if (!onChange) return;
4066
4091
  if (selectedValues.includes(value)) {
@@ -4070,7 +4095,7 @@ var MultiSelect = ({
4070
4095
  onChange([...selectedValues, value]);
4071
4096
  }
4072
4097
  };
4073
- (0, import_react20.useEffect)(() => {
4098
+ (0, import_react21.useEffect)(() => {
4074
4099
  const handleClickOutside = (e) => {
4075
4100
  if (dropdownRef.current && !dropdownRef.current.contains(e.target)) {
4076
4101
  setIsOpen(false);
@@ -4112,15 +4137,15 @@ var MultiSelect = ({
4112
4137
  };
4113
4138
 
4114
4139
  // src/Components/DatePicker/DatePicker.tsx
4115
- var import_react21 = require("react");
4140
+ var import_react22 = require("react");
4116
4141
  var import_jsx_runtime47 = require("react/jsx-runtime");
4117
4142
  var DatePicker = ({ onChange, size = "s" }) => {
4118
- const [isOpen, setIsOpen] = (0, import_react21.useState)(false);
4119
- const [startDate, setStartDate] = (0, import_react21.useState)(null);
4120
- const [endDate, setEndDate] = (0, import_react21.useState)(null);
4121
- const [currentMonth, setCurrentMonth] = (0, import_react21.useState)(/* @__PURE__ */ new Date());
4122
- const [isSelectingEnd, setIsSelectingEnd] = (0, import_react21.useState)(false);
4123
- const ref = (0, import_react21.useRef)(null);
4143
+ const [isOpen, setIsOpen] = (0, import_react22.useState)(false);
4144
+ const [startDate, setStartDate] = (0, import_react22.useState)(null);
4145
+ const [endDate, setEndDate] = (0, import_react22.useState)(null);
4146
+ const [currentMonth, setCurrentMonth] = (0, import_react22.useState)(/* @__PURE__ */ new Date());
4147
+ const [isSelectingEnd, setIsSelectingEnd] = (0, import_react22.useState)(false);
4148
+ const ref = (0, import_react22.useRef)(null);
4124
4149
  const isFiltered = !!startDate && !!endDate;
4125
4150
  const toggleCalendar = () => setIsOpen((prev) => !prev);
4126
4151
  const resetDates = () => {
@@ -4180,7 +4205,7 @@ var DatePicker = ({ onChange, size = "s" }) => {
4180
4205
  };
4181
4206
  const isDateStart = (date) => !!startDate && date.getTime() === startDate.getTime();
4182
4207
  const isDateEnd = (date) => !!endDate && date.getTime() === endDate.getTime();
4183
- (0, import_react21.useEffect)(() => {
4208
+ (0, import_react22.useEffect)(() => {
4184
4209
  const handleClickOutside = (event) => {
4185
4210
  if (ref.current && !ref.current.contains(event.target)) {
4186
4211
  setIsOpen(false);
@@ -4330,7 +4355,7 @@ var DatePicker = ({ onChange, size = "s" }) => {
4330
4355
  };
4331
4356
 
4332
4357
  // src/Components/IconTabs/IconTabs.tsx
4333
- var import_react22 = require("react");
4358
+ var import_react23 = require("react");
4334
4359
  var import_styled_components40 = __toESM(require("styled-components"));
4335
4360
  var import_jsx_runtime48 = require("react/jsx-runtime");
4336
4361
  var TabsContainer = import_styled_components40.default.div`
@@ -4392,10 +4417,10 @@ var IconTabs = ({
4392
4417
  defaultTabIndex = 0
4393
4418
  }) => {
4394
4419
  var _a;
4395
- const [selectedTab, setSelectedTab] = (0, import_react22.useState)(defaultTabIndex);
4396
- const sliderRef = (0, import_react22.useRef)(null);
4397
- const tabRefs = (0, import_react22.useRef)([]);
4398
- (0, import_react22.useEffect)(() => {
4420
+ const [selectedTab, setSelectedTab] = (0, import_react23.useState)(defaultTabIndex);
4421
+ const sliderRef = (0, import_react23.useRef)(null);
4422
+ const tabRefs = (0, import_react23.useRef)([]);
4423
+ (0, import_react23.useEffect)(() => {
4399
4424
  if (defaultTabIndex >= 0 && defaultTabIndex !== selectedTab) {
4400
4425
  setSelectedTab(defaultTabIndex);
4401
4426
  }
@@ -4406,7 +4431,7 @@ var IconTabs = ({
4406
4431
  onTabChange(index);
4407
4432
  }
4408
4433
  };
4409
- (0, import_react22.useEffect)(() => {
4434
+ (0, import_react23.useEffect)(() => {
4410
4435
  if (sliderRef.current && tabRefs.current[selectedTab]) {
4411
4436
  const selectedTabRect = tabRefs.current[selectedTab].getBoundingClientRect();
4412
4437
  const parentRect = tabRefs.current[selectedTab].parentElement.getBoundingClientRect();
@@ -4445,7 +4470,7 @@ var IconTabs = ({
4445
4470
  };
4446
4471
 
4447
4472
  // src/Components/Popover/Popover.tsx
4448
- var import_react23 = require("react");
4473
+ var import_react24 = require("react");
4449
4474
  var import_react_dom2 = require("react-dom");
4450
4475
  var import_styled_components41 = __toESM(require("styled-components"));
4451
4476
  var import_jsx_runtime49 = require("react/jsx-runtime");
@@ -4481,11 +4506,11 @@ var PopoverItem = import_styled_components41.default.div`
4481
4506
  }
4482
4507
  `;
4483
4508
  var Popover = ({ items = [], children }) => {
4484
- const [open, setOpen] = (0, import_react23.useState)(false);
4485
- const ref = (0, import_react23.useRef)(null);
4486
- const menuRef = (0, import_react23.useRef)(null);
4487
- const [menuPosition, setMenuPosition] = (0, import_react23.useState)({ top: 0, left: 0 });
4488
- const updatePosition = (0, import_react23.useCallback)(() => {
4509
+ const [open, setOpen] = (0, import_react24.useState)(false);
4510
+ const ref = (0, import_react24.useRef)(null);
4511
+ const menuRef = (0, import_react24.useRef)(null);
4512
+ const [menuPosition, setMenuPosition] = (0, import_react24.useState)({ top: 0, left: 0 });
4513
+ const updatePosition = (0, import_react24.useCallback)(() => {
4489
4514
  var _a;
4490
4515
  if (!ref.current) {
4491
4516
  return;
@@ -4505,7 +4530,7 @@ var Popover = ({ items = [], children }) => {
4505
4530
  left: rect.right
4506
4531
  });
4507
4532
  }, [items.length]);
4508
- (0, import_react23.useEffect)(() => {
4533
+ (0, import_react24.useEffect)(() => {
4509
4534
  const handleClickOutside = (event) => {
4510
4535
  var _a, _b;
4511
4536
  const isInTrigger = (_a = ref.current) == null ? void 0 : _a.contains(event.target);
@@ -4610,7 +4635,7 @@ var MetricCard = ({
4610
4635
  };
4611
4636
 
4612
4637
  // src/Components/Tooltip/Tooltip.tsx
4613
- var import_react24 = require("react");
4638
+ var import_react25 = require("react");
4614
4639
  var import_styled_components42 = __toESM(require("styled-components"));
4615
4640
  var import_jsx_runtime51 = require("react/jsx-runtime");
4616
4641
  var StyledTooltipWrapper = import_styled_components42.default.div`
@@ -4714,7 +4739,7 @@ var Tooltip = ({
4714
4739
  direction = "top",
4715
4740
  children
4716
4741
  }) => {
4717
- const [isVisible, setIsVisible] = (0, import_react24.useState)(false);
4742
+ const [isVisible, setIsVisible] = (0, import_react25.useState)(false);
4718
4743
  const handleMouseEnter = () => setIsVisible(true);
4719
4744
  const handleMouseLeave = () => setIsVisible(false);
4720
4745
  return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
@@ -4741,7 +4766,7 @@ var Tooltip = ({
4741
4766
  };
4742
4767
 
4743
4768
  // src/Components/Pagination/Pagination.tsx
4744
- var import_react25 = require("react");
4769
+ var import_react26 = require("react");
4745
4770
  var import_jsx_runtime52 = require("react/jsx-runtime");
4746
4771
  var getPageNumbers = (current, total) => {
4747
4772
  if (total <= 5) {
@@ -4765,7 +4790,7 @@ var Pagination = ({
4765
4790
  summaryLabel
4766
4791
  }) => {
4767
4792
  const totalPages = Math.max(1, Math.ceil(totalItems / itemsPerPage));
4768
- const pages = (0, import_react25.useMemo)(
4793
+ const pages = (0, import_react26.useMemo)(
4769
4794
  () => getPageNumbers(currentPage, totalPages),
4770
4795
  [currentPage, totalPages]
4771
4796
  );
@@ -4819,7 +4844,7 @@ var Pagination = ({
4819
4844
  };
4820
4845
 
4821
4846
  // src/Components/FileUploadZone/FileUploadZone.tsx
4822
- var import_react26 = require("react");
4847
+ var import_react27 = require("react");
4823
4848
  var import_styled_components43 = __toESM(require("styled-components"));
4824
4849
  var import_jsx_runtime53 = require("react/jsx-runtime");
4825
4850
  var ACCEPT_MAP = {
@@ -4906,19 +4931,19 @@ var FileUploadZone = ({
4906
4931
  icon = "cloud-arrow-up",
4907
4932
  showFileName = false
4908
4933
  }) => {
4909
- const [isDragging, setIsDragging] = (0, import_react26.useState)(false);
4910
- const [internalPreviewUrl, setInternalPreviewUrl] = (0, import_react26.useState)(
4934
+ const [isDragging, setIsDragging] = (0, import_react27.useState)(false);
4935
+ const [internalPreviewUrl, setInternalPreviewUrl] = (0, import_react27.useState)(
4911
4936
  null
4912
4937
  );
4913
- const [fileType, setFileType] = (0, import_react26.useState)(null);
4914
- const [fileName, setFileName] = (0, import_react26.useState)(null);
4915
- const [inlineError, setInlineError] = (0, import_react26.useState)(null);
4916
- const inputRef = (0, import_react26.useRef)(null);
4938
+ const [fileType, setFileType] = (0, import_react27.useState)(null);
4939
+ const [fileName, setFileName] = (0, import_react27.useState)(null);
4940
+ const [inlineError, setInlineError] = (0, import_react27.useState)(null);
4941
+ const inputRef = (0, import_react27.useRef)(null);
4917
4942
  const resolvedAccept = acceptOnlyPdf ? PDF_ONLY : accept;
4918
4943
  const mimeTypes = getMimeTypes(resolvedAccept);
4919
4944
  const acceptString = mimeTypes.join(",");
4920
4945
  const previewUrl = multiple ? null : controlledPreviewUrl || (showPreview ? internalPreviewUrl : null);
4921
- const emitError = (0, import_react26.useCallback)(
4946
+ const emitError = (0, import_react27.useCallback)(
4922
4947
  (message) => {
4923
4948
  if (onError) {
4924
4949
  onError(message);
@@ -4928,7 +4953,7 @@ var FileUploadZone = ({
4928
4953
  },
4929
4954
  [onError]
4930
4955
  );
4931
- const validateFile = (0, import_react26.useCallback)(
4956
+ const validateFile = (0, import_react27.useCallback)(
4932
4957
  (file) => {
4933
4958
  if (!mimeTypes.includes(file.type)) {
4934
4959
  return { ok: false, error: "Format de fichier non accept\xE9." };
@@ -4943,7 +4968,7 @@ var FileUploadZone = ({
4943
4968
  },
4944
4969
  [mimeTypes, maxSizeMB]
4945
4970
  );
4946
- const processFile = (0, import_react26.useCallback)(
4971
+ const processFile = (0, import_react27.useCallback)(
4947
4972
  (file) => {
4948
4973
  setInlineError(null);
4949
4974
  const result = validateFile(file);
@@ -4961,7 +4986,7 @@ var FileUploadZone = ({
4961
4986
  },
4962
4987
  [validateFile, onSave, showPreview, emitError]
4963
4988
  );
4964
- const processFiles = (0, import_react26.useCallback)(
4989
+ const processFiles = (0, import_react27.useCallback)(
4965
4990
  (files) => {
4966
4991
  setInlineError(null);
4967
4992
  for (const file of files) {
package/dist/index.mjs CHANGED
@@ -3276,8 +3276,9 @@ var TableCell = (props) => {
3276
3276
  };
3277
3277
 
3278
3278
  // src/Components/Table/TableHeaderCell/TableHeaderCell.tsx
3279
+ import { useState as useState9 } from "react";
3279
3280
  import styled31 from "styled-components";
3280
- import { jsx as jsx35 } from "react/jsx-runtime";
3281
+ import { jsx as jsx35, jsxs as jsxs15 } from "react/jsx-runtime";
3281
3282
  var shouldForwardPropTableHeaderCell = (prop) => !["useSort", "isSort", "flexGrow", "flexShrink", "width"].includes(prop);
3282
3283
  var StyledTableHeaderCell = styled31.div.withConfig({
3283
3284
  shouldForwardProp: shouldForwardPropTableHeaderCell
@@ -3295,24 +3296,48 @@ var StyledTableHeaderCell = styled31.div.withConfig({
3295
3296
  font-weight: bold;
3296
3297
  max-width: ${(props) => props.width || "auto"};
3297
3298
  min-width: ${(props) => props.width || "auto"};
3298
-
3299
- .sortingButton {
3300
- display: ${(props) => props.useSort ? "inline-flex" : "block"};
3301
- align-items: center;
3302
- padding: ${(props) => props.useSort ? "2px 10px" : "none"};
3303
- background: ${(props) => props.useSort ? props.isSort ? "#f8af2d" : "#FFF5" : "none"};
3304
- border-radius: ${(props) => props.useSort ? "20px" : "0"};
3305
- gap: ${(props) => props.useSort ? "8px" : "0"};
3306
- }
3299
+ `;
3300
+ var SortingButton = styled31.span`
3301
+ display: inline-flex;
3302
+ align-items: center;
3303
+ padding: 2px 10px;
3304
+ background: ${(props) => props.$isSort ? "#f8af2d" : "#FFF5"};
3305
+ border-radius: 20px;
3306
+ gap: 8px;
3307
+ cursor: pointer;
3308
+ `;
3309
+ var SortArrow = styled31.span`
3310
+ font-style: normal;
3311
+ font-size: 0.9em;
3312
+ line-height: 1;
3313
+ transition: opacity 0.15s;
3314
+ opacity: ${(props) => props.$opacity};
3307
3315
  `;
3308
3316
  var TableHeaderCell = (props) => {
3309
- const _a = props, { children, useSort, isSort } = _a, otherProps = __objRest(_a, ["children", "useSort", "isSort"]);
3317
+ const _a = props, { children, useSort, isSort, sortOrder } = _a, otherProps = __objRest(_a, ["children", "useSort", "isSort", "sortOrder"]);
3318
+ const [hovered, setHovered] = useState9(false);
3319
+ const showArrow = useSort && (isSort || hovered);
3320
+ const arrowChar = isSort && sortOrder === "asc" ? "\u2191" : "\u2193";
3321
+ const arrowOpacity = isSort ? 1 : 0.35;
3310
3322
  return /* @__PURE__ */ jsx35(
3311
3323
  StyledTableHeaderCell,
3312
3324
  __spreadProps(__spreadValues({}, otherProps), {
3313
3325
  useSort,
3314
3326
  isSort,
3315
- children: useSort ? /* @__PURE__ */ jsx35("div", { className: "sortingButton", children }) : children
3327
+ onMouseEnter: (e) => {
3328
+ var _a2;
3329
+ if (useSort) setHovered(true);
3330
+ (_a2 = otherProps.onMouseEnter) == null ? void 0 : _a2.call(otherProps, e);
3331
+ },
3332
+ onMouseLeave: (e) => {
3333
+ var _a2;
3334
+ if (useSort) setHovered(false);
3335
+ (_a2 = otherProps.onMouseLeave) == null ? void 0 : _a2.call(otherProps, e);
3336
+ },
3337
+ children: useSort ? /* @__PURE__ */ jsxs15(SortingButton, { $isSort: isSort, children: [
3338
+ children,
3339
+ showArrow && /* @__PURE__ */ jsx35(SortArrow, { $opacity: arrowOpacity, children: arrowChar })
3340
+ ] }) : children
3316
3341
  })
3317
3342
  );
3318
3343
  };
@@ -3413,7 +3438,7 @@ var TableFooterCell = (props) => {
3413
3438
  };
3414
3439
 
3415
3440
  // src/Components/Table/SkeletonRow/SkeletonRow.tsx
3416
- import { Fragment as Fragment4, jsx as jsx40, jsxs as jsxs15 } from "react/jsx-runtime";
3441
+ import { Fragment as Fragment4, jsx as jsx40, jsxs as jsxs16 } from "react/jsx-runtime";
3417
3442
  var style = `
3418
3443
  .skeleton-loader {
3419
3444
  width: 100%;
@@ -3432,7 +3457,7 @@ var style = `
3432
3457
  }
3433
3458
  }
3434
3459
  `;
3435
- var SkeletonRow = ({ columns = 9 }) => /* @__PURE__ */ jsxs15(Fragment4, { children: [
3460
+ var SkeletonRow = ({ columns = 9 }) => /* @__PURE__ */ jsxs16(Fragment4, { children: [
3436
3461
  /* @__PURE__ */ jsx40("style", { children: style }),
3437
3462
  /* @__PURE__ */ jsx40(TableRow, { children: Array.from({ length: columns }).map((_, index) => /* @__PURE__ */ jsx40(TableCell, { children: /* @__PURE__ */ jsx40("div", { className: "skeleton-loader" }) }, index)) })
3438
3463
  ] });
@@ -3440,7 +3465,7 @@ var SkeletonRow = ({ columns = 9 }) => /* @__PURE__ */ jsxs15(Fragment4, { child
3440
3465
  // src/Components/Switch/Switch.tsx
3441
3466
  import { forwardRef as forwardRef7 } from "react";
3442
3467
  import styled36, { css } from "styled-components";
3443
- import { jsx as jsx41, jsxs as jsxs16 } from "react/jsx-runtime";
3468
+ import { jsx as jsx41, jsxs as jsxs17 } from "react/jsx-runtime";
3444
3469
  var BASE = {
3445
3470
  s: { w: 36, h: 20, knob: 16, pad: 2 },
3446
3471
  m: { w: 48, h: 28, knob: 24, pad: 2 },
@@ -3541,7 +3566,7 @@ var Switch = forwardRef7(
3541
3566
  if (disabled) return;
3542
3567
  onChange == null ? void 0 : onChange(!!e.target.checked, e);
3543
3568
  };
3544
- return /* @__PURE__ */ jsxs16(Container4, { $disabled: disabled, htmlFor: id, children: [
3569
+ return /* @__PURE__ */ jsxs17(Container4, { $disabled: disabled, htmlFor: id, children: [
3545
3570
  /* @__PURE__ */ jsx41(
3546
3571
  HiddenCheckbox,
3547
3572
  __spreadValues({
@@ -3575,8 +3600,8 @@ var CardSkeleton = () => {
3575
3600
  };
3576
3601
 
3577
3602
  // src/Components/Options/Options.tsx
3578
- import { useState as useState9, useEffect as useEffect8 } from "react";
3579
- import { jsx as jsx43, jsxs as jsxs17 } from "react/jsx-runtime";
3603
+ import { useState as useState10, useEffect as useEffect8 } from "react";
3604
+ import { jsx as jsx43, jsxs as jsxs18 } from "react/jsx-runtime";
3580
3605
  var Options = ({
3581
3606
  icon,
3582
3607
  options,
@@ -3585,7 +3610,7 @@ var Options = ({
3585
3610
  onChange,
3586
3611
  disabled = false
3587
3612
  }) => {
3588
- const [state, setState] = useState9(0);
3613
+ const [state, setState] = useState10(0);
3589
3614
  useEffect8(() => {
3590
3615
  if (defaultId) {
3591
3616
  const defaultIndex = options.findIndex(
@@ -3635,7 +3660,7 @@ var Options = ({
3635
3660
  e.currentTarget.style.transform = "translateY(0px)";
3636
3661
  }
3637
3662
  },
3638
- children: /* @__PURE__ */ jsxs17(Row_default, { gap: "8", alignItems: "center", justifyContent: "center", children: [
3663
+ children: /* @__PURE__ */ jsxs18(Row_default, { gap: "8", alignItems: "center", justifyContent: "center", children: [
3639
3664
  /* @__PURE__ */ jsx43(Col_default, { children: /* @__PURE__ */ jsx43(Icon_default, { name: icon, type: "regular", color: "#414652" }) }),
3640
3665
  /* @__PURE__ */ jsx43(Col_default, { children: label })
3641
3666
  ] })
@@ -3646,7 +3671,7 @@ var Options = ({
3646
3671
  // src/Components/Stepper/Stepper.tsx
3647
3672
  import { Fragment as Fragment5 } from "react";
3648
3673
  import styled37 from "styled-components";
3649
- import { jsx as jsx44, jsxs as jsxs18 } from "react/jsx-runtime";
3674
+ import { jsx as jsx44, jsxs as jsxs19 } from "react/jsx-runtime";
3650
3675
  var Wrapper4 = styled37.nav`
3651
3676
  width: 100%;
3652
3677
  display: flex;
@@ -3683,7 +3708,7 @@ var Stepper = ({
3683
3708
  return /* @__PURE__ */ jsx44(Wrapper4, { "aria-label": "progression", className, children: Array.from({ length: numberOfSteps }, (_, i) => {
3684
3709
  const isActive = i === current;
3685
3710
  const isCompleted = i < current;
3686
- return /* @__PURE__ */ jsxs18(Fragment5, { children: [
3711
+ return /* @__PURE__ */ jsxs19(Fragment5, { children: [
3687
3712
  /* @__PURE__ */ jsx44(
3688
3713
  Circle,
3689
3714
  {
@@ -3705,13 +3730,13 @@ import {
3705
3730
  useEffect as useEffect9,
3706
3731
  useMemo,
3707
3732
  useRef as useRef8,
3708
- useState as useState10,
3733
+ useState as useState11,
3709
3734
  Children,
3710
3735
  isValidElement,
3711
3736
  cloneElement
3712
3737
  } from "react";
3713
3738
  import styled38 from "styled-components";
3714
- import { jsx as jsx45, jsxs as jsxs19 } from "react/jsx-runtime";
3739
+ import { jsx as jsx45, jsxs as jsxs20 } from "react/jsx-runtime";
3715
3740
  var TOKENS = {
3716
3741
  fontFamily: '"Open Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif'
3717
3742
  };
@@ -3861,7 +3886,7 @@ var Tabs = (_a) => {
3861
3886
  ]);
3862
3887
  const rootRef = useRef8(null);
3863
3888
  const refsMap = useRef8(/* @__PURE__ */ new Map());
3864
- const [bar, setBar] = useState10({ left: 0, width: 0 });
3889
+ const [bar, setBar] = useState11({ left: 0, width: 0 });
3865
3890
  const setTabRef = (id) => (el) => {
3866
3891
  if (el) refsMap.current.set(id, el);
3867
3892
  };
@@ -3919,7 +3944,7 @@ var Tabs = (_a) => {
3919
3944
  });
3920
3945
  });
3921
3946
  }, [items, children, value, variant, isPillsFullWidth, handleSelect]);
3922
- return /* @__PURE__ */ jsxs19(
3947
+ return /* @__PURE__ */ jsxs20(
3923
3948
  TabsRoot,
3924
3949
  __spreadProps(__spreadValues({
3925
3950
  ref: rootRef,
@@ -3938,9 +3963,9 @@ var Tabs = (_a) => {
3938
3963
  };
3939
3964
 
3940
3965
  // src/Components/MultiSelect/MultiSelect.tsx
3941
- import { useState as useState11, useRef as useRef9, useEffect as useEffect10 } from "react";
3966
+ import { useState as useState12, useRef as useRef9, useEffect as useEffect10 } from "react";
3942
3967
  import styled39 from "styled-components";
3943
- import { jsx as jsx46, jsxs as jsxs20 } from "react/jsx-runtime";
3968
+ import { jsx as jsx46, jsxs as jsxs21 } from "react/jsx-runtime";
3944
3969
  var Container5 = styled39.div`
3945
3970
  position: relative;
3946
3971
  display: inline-block;
@@ -3981,7 +4006,7 @@ var MultiSelect = ({
3981
4006
  width,
3982
4007
  align = "left"
3983
4008
  }) => {
3984
- const [isOpen, setIsOpen] = useState11(false);
4009
+ const [isOpen, setIsOpen] = useState12(false);
3985
4010
  const dropdownRef = useRef9(null);
3986
4011
  const toggleOption = (value) => {
3987
4012
  if (!onChange) return;
@@ -4001,7 +4026,7 @@ var MultiSelect = ({
4001
4026
  document.addEventListener("mousedown", handleClickOutside);
4002
4027
  return () => document.removeEventListener("mousedown", handleClickOutside);
4003
4028
  }, []);
4004
- return /* @__PURE__ */ jsxs20(Container5, { ref: dropdownRef, children: [
4029
+ return /* @__PURE__ */ jsxs21(Container5, { ref: dropdownRef, children: [
4005
4030
  /* @__PURE__ */ jsx46(
4006
4031
  Button,
4007
4032
  {
@@ -4012,10 +4037,10 @@ var MultiSelect = ({
4012
4037
  disabled
4013
4038
  }
4014
4039
  ),
4015
- isOpen && /* @__PURE__ */ jsxs20(Dropdown2, { $width: width, $align: align, children: [
4040
+ isOpen && /* @__PURE__ */ jsxs21(Dropdown2, { $width: width, $align: align, children: [
4016
4041
  options.map(({ label: optLabel, value }) => {
4017
4042
  const active = selectedValues.includes(value);
4018
- return /* @__PURE__ */ jsxs20(Item, { onClick: () => toggleOption(value), children: [
4043
+ return /* @__PURE__ */ jsxs21(Item, { onClick: () => toggleOption(value), children: [
4019
4044
  /* @__PURE__ */ jsx46(
4020
4045
  Icon,
4021
4046
  {
@@ -4034,14 +4059,14 @@ var MultiSelect = ({
4034
4059
  };
4035
4060
 
4036
4061
  // src/Components/DatePicker/DatePicker.tsx
4037
- import { useState as useState12, useRef as useRef10, useEffect as useEffect11 } from "react";
4038
- import { jsx as jsx47, jsxs as jsxs21 } from "react/jsx-runtime";
4062
+ import { useState as useState13, useRef as useRef10, useEffect as useEffect11 } from "react";
4063
+ import { jsx as jsx47, jsxs as jsxs22 } from "react/jsx-runtime";
4039
4064
  var DatePicker = ({ onChange, size = "s" }) => {
4040
- const [isOpen, setIsOpen] = useState12(false);
4041
- const [startDate, setStartDate] = useState12(null);
4042
- const [endDate, setEndDate] = useState12(null);
4043
- const [currentMonth, setCurrentMonth] = useState12(/* @__PURE__ */ new Date());
4044
- const [isSelectingEnd, setIsSelectingEnd] = useState12(false);
4065
+ const [isOpen, setIsOpen] = useState13(false);
4066
+ const [startDate, setStartDate] = useState13(null);
4067
+ const [endDate, setEndDate] = useState13(null);
4068
+ const [currentMonth, setCurrentMonth] = useState13(/* @__PURE__ */ new Date());
4069
+ const [isSelectingEnd, setIsSelectingEnd] = useState13(false);
4045
4070
  const ref = useRef10(null);
4046
4071
  const isFiltered = !!startDate && !!endDate;
4047
4072
  const toggleCalendar = () => setIsOpen((prev) => !prev);
@@ -4126,7 +4151,7 @@ var DatePicker = ({ onChange, size = "s" }) => {
4126
4151
  "D\xE9cembre"
4127
4152
  ];
4128
4153
  const dayNames = ["Lun", "Mar", "Mer", "Jeu", "Ven", "Sam", "Dim"];
4129
- return /* @__PURE__ */ jsxs21("div", { className: "date-picker-container", ref, children: [
4154
+ return /* @__PURE__ */ jsxs22("div", { className: "date-picker-container", ref, children: [
4130
4155
  /* @__PURE__ */ jsx47(Button, { onClick: toggleCalendar, size, iconLeft: "calendar" }),
4131
4156
  isFiltered && /* @__PURE__ */ jsx47(
4132
4157
  "span",
@@ -4149,8 +4174,8 @@ var DatePicker = ({ onChange, size = "s" }) => {
4149
4174
  children: /* @__PURE__ */ jsx47(Icon, { name: "xmark", size: "s", color: colors.white })
4150
4175
  }
4151
4176
  ),
4152
- isOpen && /* @__PURE__ */ jsx47("div", { className: "date-picker-popup", children: /* @__PURE__ */ jsx47("div", { className: "date-picker-content", children: /* @__PURE__ */ jsxs21("div", { className: "calendar-container", children: [
4153
- /* @__PURE__ */ jsxs21("div", { className: "calendar-header", children: [
4177
+ isOpen && /* @__PURE__ */ jsx47("div", { className: "date-picker-popup", children: /* @__PURE__ */ jsx47("div", { className: "date-picker-content", children: /* @__PURE__ */ jsxs22("div", { className: "calendar-container", children: [
4178
+ /* @__PURE__ */ jsxs22("div", { className: "calendar-header", children: [
4154
4179
  /* @__PURE__ */ jsx47(
4155
4180
  "button",
4156
4181
  {
@@ -4177,7 +4202,7 @@ var DatePicker = ({ onChange, size = "s" }) => {
4177
4202
  )
4178
4203
  }
4179
4204
  ),
4180
- /* @__PURE__ */ jsxs21("h3", { className: "calendar-month-title", children: [
4205
+ /* @__PURE__ */ jsxs22("h3", { className: "calendar-month-title", children: [
4181
4206
  monthNames[currentMonth.getMonth()],
4182
4207
  " ",
4183
4208
  currentMonth.getFullYear()
@@ -4232,7 +4257,7 @@ var DatePicker = ({ onChange, size = "s" }) => {
4232
4257
  index
4233
4258
  );
4234
4259
  }) }),
4235
- startDate && /* @__PURE__ */ jsx47("div", { className: "selected-dates-display", children: /* @__PURE__ */ jsx47("div", { className: "selected-dates-text", children: endDate ? /* @__PURE__ */ jsxs21("span", { children: [
4260
+ startDate && /* @__PURE__ */ jsx47("div", { className: "selected-dates-display", children: /* @__PURE__ */ jsx47("div", { className: "selected-dates-text", children: endDate ? /* @__PURE__ */ jsxs22("span", { children: [
4236
4261
  /* @__PURE__ */ jsx47("strong", { children: "Du:" }),
4237
4262
  " ",
4238
4263
  formatDate(startDate, "weekday", "fr"),
@@ -4240,7 +4265,7 @@ var DatePicker = ({ onChange, size = "s" }) => {
4240
4265
  /* @__PURE__ */ jsx47("strong", { children: "Au:" }),
4241
4266
  " ",
4242
4267
  formatDate(endDate, "weekday", "fr")
4243
- ] }) : /* @__PURE__ */ jsxs21("span", { children: [
4268
+ ] }) : /* @__PURE__ */ jsxs22("span", { children: [
4244
4269
  /* @__PURE__ */ jsx47("strong", { children: "D\xE9but:" }),
4245
4270
  " ",
4246
4271
  formatDate(startDate, "weekday", "fr"),
@@ -4252,9 +4277,9 @@ var DatePicker = ({ onChange, size = "s" }) => {
4252
4277
  };
4253
4278
 
4254
4279
  // src/Components/IconTabs/IconTabs.tsx
4255
- import { useState as useState13, useEffect as useEffect12, useRef as useRef11 } from "react";
4280
+ import { useState as useState14, useEffect as useEffect12, useRef as useRef11 } from "react";
4256
4281
  import styled40, { css as css2 } from "styled-components";
4257
- import { jsx as jsx48, jsxs as jsxs22 } from "react/jsx-runtime";
4282
+ import { jsx as jsx48, jsxs as jsxs23 } from "react/jsx-runtime";
4258
4283
  var TabsContainer = styled40.div`
4259
4284
  display: flex;
4260
4285
  flex-direction: column;
@@ -4314,7 +4339,7 @@ var IconTabs = ({
4314
4339
  defaultTabIndex = 0
4315
4340
  }) => {
4316
4341
  var _a;
4317
- const [selectedTab, setSelectedTab] = useState13(defaultTabIndex);
4342
+ const [selectedTab, setSelectedTab] = useState14(defaultTabIndex);
4318
4343
  const sliderRef = useRef11(null);
4319
4344
  const tabRefs = useRef11([]);
4320
4345
  useEffect12(() => {
@@ -4337,8 +4362,8 @@ var IconTabs = ({
4337
4362
  sliderRef.current.style.backgroundColor = colors[selectedColor];
4338
4363
  }
4339
4364
  }, [selectedTab, selectedColor]);
4340
- return /* @__PURE__ */ jsxs22(TabsContainer, { children: [
4341
- /* @__PURE__ */ jsxs22(IconsRow, { children: [
4365
+ return /* @__PURE__ */ jsxs23(TabsContainer, { children: [
4366
+ /* @__PURE__ */ jsxs23(IconsRow, { children: [
4342
4367
  items.map((item, index) => /* @__PURE__ */ jsx48(
4343
4368
  Tab2,
4344
4369
  {
@@ -4367,10 +4392,10 @@ var IconTabs = ({
4367
4392
  };
4368
4393
 
4369
4394
  // src/Components/Popover/Popover.tsx
4370
- import { useState as useState14, useRef as useRef12, useEffect as useEffect13, useCallback as useCallback4 } from "react";
4395
+ import { useState as useState15, useRef as useRef12, useEffect as useEffect13, useCallback as useCallback4 } from "react";
4371
4396
  import { createPortal } from "react-dom";
4372
4397
  import styled41 from "styled-components";
4373
- import { jsx as jsx49, jsxs as jsxs23 } from "react/jsx-runtime";
4398
+ import { jsx as jsx49, jsxs as jsxs24 } from "react/jsx-runtime";
4374
4399
  var PopoverWrapper = styled41.div`
4375
4400
  position: relative;
4376
4401
  display: inline-block;
@@ -4403,10 +4428,10 @@ var PopoverItem = styled41.div`
4403
4428
  }
4404
4429
  `;
4405
4430
  var Popover = ({ items = [], children }) => {
4406
- const [open, setOpen] = useState14(false);
4431
+ const [open, setOpen] = useState15(false);
4407
4432
  const ref = useRef12(null);
4408
4433
  const menuRef = useRef12(null);
4409
- const [menuPosition, setMenuPosition] = useState14({ top: 0, left: 0 });
4434
+ const [menuPosition, setMenuPosition] = useState15({ top: 0, left: 0 });
4410
4435
  const updatePosition = useCallback4(() => {
4411
4436
  var _a;
4412
4437
  if (!ref.current) {
@@ -4448,7 +4473,7 @@ var Popover = ({ items = [], children }) => {
4448
4473
  document.removeEventListener("mousedown", handleClickOutside);
4449
4474
  };
4450
4475
  }, [open, updatePosition]);
4451
- return /* @__PURE__ */ jsxs23(PopoverWrapper, { ref, children: [
4476
+ return /* @__PURE__ */ jsxs24(PopoverWrapper, { ref, children: [
4452
4477
  /* @__PURE__ */ jsx49(PopoverTrigger, { onClick: () => setOpen((o) => !o), children }),
4453
4478
  open && createPortal(
4454
4479
  /* @__PURE__ */ jsx49(
@@ -4481,7 +4506,7 @@ var Popover = ({ items = [], children }) => {
4481
4506
  };
4482
4507
 
4483
4508
  // src/Components/MetricCard/MetricCard.tsx
4484
- import { jsx as jsx50, jsxs as jsxs24 } from "react/jsx-runtime";
4509
+ import { jsx as jsx50, jsxs as jsxs25 } from "react/jsx-runtime";
4485
4510
  var MetricCard = ({
4486
4511
  icon,
4487
4512
  title,
@@ -4504,7 +4529,7 @@ var MetricCard = ({
4504
4529
  cursor: onClick ? "pointer" : "default"
4505
4530
  },
4506
4531
  onClick,
4507
- children: /* @__PURE__ */ jsxs24(Row, { alignItems: "center", gap: "12", fullWidth: true, children: [
4532
+ children: /* @__PURE__ */ jsxs25(Row, { alignItems: "center", gap: "12", fullWidth: true, children: [
4508
4533
  /* @__PURE__ */ jsx50(
4509
4534
  Box,
4510
4535
  {
@@ -4519,10 +4544,10 @@ var MetricCard = ({
4519
4544
  children: /* @__PURE__ */ jsx50(Icon, { name: icon, size: "m", color: iconColor, family: "regular" })
4520
4545
  }
4521
4546
  ),
4522
- contentLayout === "row" ? /* @__PURE__ */ jsxs24(Row, { gap: "6", alignItems: "center", children: [
4547
+ contentLayout === "row" ? /* @__PURE__ */ jsxs25(Row, { gap: "6", alignItems: "center", children: [
4523
4548
  /* @__PURE__ */ jsx50(Text, { size: "s", weight: "bold", variant: valueColor || "grey_600", children: value }),
4524
4549
  /* @__PURE__ */ jsx50(Text, { size: "s", variant: "grey_600", children: title })
4525
- ] }) : /* @__PURE__ */ jsxs24(Col, { gap: "4", children: [
4550
+ ] }) : /* @__PURE__ */ jsxs25(Col, { gap: "4", children: [
4526
4551
  /* @__PURE__ */ jsx50(Text, { size: "s", variant: "grey_600", children: title }),
4527
4552
  /* @__PURE__ */ jsx50(Text, { size: "s", weight: "bold", variant: valueColor || "grey_600", children: value })
4528
4553
  ] })
@@ -4532,9 +4557,9 @@ var MetricCard = ({
4532
4557
  };
4533
4558
 
4534
4559
  // src/Components/Tooltip/Tooltip.tsx
4535
- import { useState as useState15 } from "react";
4560
+ import { useState as useState16 } from "react";
4536
4561
  import styled42 from "styled-components";
4537
- import { jsx as jsx51, jsxs as jsxs25 } from "react/jsx-runtime";
4562
+ import { jsx as jsx51, jsxs as jsxs26 } from "react/jsx-runtime";
4538
4563
  var StyledTooltipWrapper = styled42.div`
4539
4564
  position: relative;
4540
4565
  display: inline-block;
@@ -4636,10 +4661,10 @@ var Tooltip = ({
4636
4661
  direction = "top",
4637
4662
  children
4638
4663
  }) => {
4639
- const [isVisible, setIsVisible] = useState15(false);
4664
+ const [isVisible, setIsVisible] = useState16(false);
4640
4665
  const handleMouseEnter = () => setIsVisible(true);
4641
4666
  const handleMouseLeave = () => setIsVisible(false);
4642
- return /* @__PURE__ */ jsxs25(
4667
+ return /* @__PURE__ */ jsxs26(
4643
4668
  StyledTooltipWrapper,
4644
4669
  {
4645
4670
  onMouseEnter: handleMouseEnter,
@@ -4664,7 +4689,7 @@ var Tooltip = ({
4664
4689
 
4665
4690
  // src/Components/Pagination/Pagination.tsx
4666
4691
  import { useMemo as useMemo2 } from "react";
4667
- import { jsx as jsx52, jsxs as jsxs26 } from "react/jsx-runtime";
4692
+ import { jsx as jsx52, jsxs as jsxs27 } from "react/jsx-runtime";
4668
4693
  var getPageNumbers = (current, total) => {
4669
4694
  if (total <= 5) {
4670
4695
  return Array.from({ length: total }, (_, i) => i + 1);
@@ -4694,14 +4719,14 @@ var Pagination = ({
4694
4719
  const startItem = (currentPage - 1) * itemsPerPage + 1;
4695
4720
  const endItem = Math.min(currentPage * itemsPerPage, totalItems);
4696
4721
  const summary = summaryLabel || defaultSummary(startItem, endItem, totalItems);
4697
- return /* @__PURE__ */ jsxs26(
4722
+ return /* @__PURE__ */ jsxs27(
4698
4723
  Row,
4699
4724
  {
4700
4725
  justifyContent: showSummary ? "space-between" : "flex-end",
4701
4726
  alignItems: "center",
4702
4727
  children: [
4703
4728
  showSummary && /* @__PURE__ */ jsx52(Text, { size: "s", color: colors.grey_500, children: summary }),
4704
- /* @__PURE__ */ jsxs26(Row, { gap: "4", alignItems: "center", style: { width: "fit-content" }, children: [
4729
+ /* @__PURE__ */ jsxs27(Row, { gap: "4", alignItems: "center", style: { width: "fit-content" }, children: [
4705
4730
  /* @__PURE__ */ jsx52(
4706
4731
  Button,
4707
4732
  {
@@ -4741,9 +4766,9 @@ var Pagination = ({
4741
4766
  };
4742
4767
 
4743
4768
  // src/Components/FileUploadZone/FileUploadZone.tsx
4744
- import { useState as useState16, useRef as useRef13, useCallback as useCallback5 } from "react";
4769
+ import { useState as useState17, useRef as useRef13, useCallback as useCallback5 } from "react";
4745
4770
  import styled43 from "styled-components";
4746
- import { jsx as jsx53, jsxs as jsxs27 } from "react/jsx-runtime";
4771
+ import { jsx as jsx53, jsxs as jsxs28 } from "react/jsx-runtime";
4747
4772
  var ACCEPT_MAP = {
4748
4773
  png: "image/png",
4749
4774
  jpg: "image/jpeg",
@@ -4828,13 +4853,13 @@ var FileUploadZone = ({
4828
4853
  icon = "cloud-arrow-up",
4829
4854
  showFileName = false
4830
4855
  }) => {
4831
- const [isDragging, setIsDragging] = useState16(false);
4832
- const [internalPreviewUrl, setInternalPreviewUrl] = useState16(
4856
+ const [isDragging, setIsDragging] = useState17(false);
4857
+ const [internalPreviewUrl, setInternalPreviewUrl] = useState17(
4833
4858
  null
4834
4859
  );
4835
- const [fileType, setFileType] = useState16(null);
4836
- const [fileName, setFileName] = useState16(null);
4837
- const [inlineError, setInlineError] = useState16(null);
4860
+ const [fileType, setFileType] = useState17(null);
4861
+ const [fileName, setFileName] = useState17(null);
4862
+ const [inlineError, setInlineError] = useState17(null);
4838
4863
  const inputRef = useRef13(null);
4839
4864
  const resolvedAccept = acceptOnlyPdf ? PDF_ONLY : accept;
4840
4865
  const mimeTypes = getMimeTypes(resolvedAccept);
@@ -4941,7 +4966,7 @@ var FileUploadZone = ({
4941
4966
  onRemove == null ? void 0 : onRemove();
4942
4967
  };
4943
4968
  if (previewUrl) {
4944
- return /* @__PURE__ */ jsxs27(StyledPreview, { $fullWidth: fullWidth, children: [
4969
+ return /* @__PURE__ */ jsxs28(StyledPreview, { $fullWidth: fullWidth, children: [
4945
4970
  fileType && isPdf(fileType) ? /* @__PURE__ */ jsx53(StyledEmbed, { src: previewUrl, type: "application/pdf" }) : /* @__PURE__ */ jsx53(StyledImage2, { src: previewUrl, alt: "Aper\xE7u du fichier" }),
4946
4971
  /* @__PURE__ */ jsx53(Row, { gap: "8", justifyContent: "center", children: /* @__PURE__ */ jsx53(
4947
4972
  Button,
@@ -4957,8 +4982,8 @@ var FileUploadZone = ({
4957
4982
  }
4958
4983
  const showIcon = icon !== false;
4959
4984
  const showBrowse = !compact && browseLabel !== false;
4960
- return /* @__PURE__ */ jsxs27(Col, { gap: "4", children: [
4961
- /* @__PURE__ */ jsxs27(
4985
+ return /* @__PURE__ */ jsxs28(Col, { gap: "4", children: [
4986
+ /* @__PURE__ */ jsxs28(
4962
4987
  StyledDropZone,
4963
4988
  {
4964
4989
  $isDragging: isDragging,
@@ -5008,7 +5033,7 @@ var FileUploadZone = ({
5008
5033
  ]
5009
5034
  }
5010
5035
  ),
5011
- showFileName && fileName && /* @__PURE__ */ jsxs27(Row, { gap: "8", alignItems: "center", justifyContent: "center", children: [
5036
+ showFileName && fileName && /* @__PURE__ */ jsxs28(Row, { gap: "8", alignItems: "center", justifyContent: "center", children: [
5012
5037
  /* @__PURE__ */ jsx53(Icon, { name: "file", size: "s", color: "green_700" }),
5013
5038
  /* @__PURE__ */ jsx53(Text, { size: "s", color: "green_700", children: fileName })
5014
5039
  ] }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "design-zystem",
3
- "version": "1.0.236",
3
+ "version": "1.0.237",
4
4
  "description": "A React design system of importable components",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",