design-zystem 1.0.509 → 1.0.513

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.
@@ -913,6 +913,7 @@ interface TableHeaderCellProps {
913
913
  /** Laisse le libellé passer à la ligne au lieu d'être tronqué. */
914
914
  wrap?: boolean;
915
915
  className?: string;
916
+ colSpan?: number;
916
917
  /** Rend la cellule triable — affiche `children` dans un bouton avec une
917
918
  * flèche de tri unique (↑ / ↓), visible sur la colonne triée et en survol. */
918
919
  useSort?: boolean;
@@ -922,7 +923,7 @@ interface TableHeaderCellProps {
922
923
  onClick?: () => void;
923
924
  hint?: ReactNode;
924
925
  }
925
- declare const TableHeaderCell: ({ children, width, sticky, stickyOffset, surface, backgroundColor, borderLeft, wrap, className, useSort, isSort, sortOrder, onClick, hint, }: TableHeaderCellProps) => react.JSX.Element;
926
+ declare const TableHeaderCell: ({ children, width, sticky, stickyOffset, surface, backgroundColor, borderLeft, wrap, className, colSpan, useSort, isSort, sortOrder, onClick, hint, }: TableHeaderCellProps) => react.JSX.Element;
926
927
 
927
928
  interface TableRowProps {
928
929
  children?: ReactNode;
@@ -1651,6 +1652,7 @@ interface BannerAction {
1651
1652
  label: string;
1652
1653
  icon?: ReactNode;
1653
1654
  onClick?: () => void;
1655
+ variant?: 'outline' | 'link';
1654
1656
  }
1655
1657
  interface BannerToggle {
1656
1658
  checked: boolean;
@@ -913,6 +913,7 @@ interface TableHeaderCellProps {
913
913
  /** Laisse le libellé passer à la ligne au lieu d'être tronqué. */
914
914
  wrap?: boolean;
915
915
  className?: string;
916
+ colSpan?: number;
916
917
  /** Rend la cellule triable — affiche `children` dans un bouton avec une
917
918
  * flèche de tri unique (↑ / ↓), visible sur la colonne triée et en survol. */
918
919
  useSort?: boolean;
@@ -922,7 +923,7 @@ interface TableHeaderCellProps {
922
923
  onClick?: () => void;
923
924
  hint?: ReactNode;
924
925
  }
925
- declare const TableHeaderCell: ({ children, width, sticky, stickyOffset, surface, backgroundColor, borderLeft, wrap, className, useSort, isSort, sortOrder, onClick, hint, }: TableHeaderCellProps) => react.JSX.Element;
926
+ declare const TableHeaderCell: ({ children, width, sticky, stickyOffset, surface, backgroundColor, borderLeft, wrap, className, colSpan, useSort, isSort, sortOrder, onClick, hint, }: TableHeaderCellProps) => react.JSX.Element;
926
927
 
927
928
  interface TableRowProps {
928
929
  children?: ReactNode;
@@ -1651,6 +1652,7 @@ interface BannerAction {
1651
1652
  label: string;
1652
1653
  icon?: ReactNode;
1653
1654
  onClick?: () => void;
1655
+ variant?: 'outline' | 'link';
1654
1656
  }
1655
1657
  interface BannerToggle {
1656
1658
  checked: boolean;
package/dist/ui/index.js CHANGED
@@ -4895,6 +4895,7 @@ var TableHeaderCell = ({
4895
4895
  borderLeft = false,
4896
4896
  wrap = false,
4897
4897
  className,
4898
+ colSpan,
4898
4899
  useSort = false,
4899
4900
  isSort = false,
4900
4901
  sortOrder = null,
@@ -4907,7 +4908,8 @@ var TableHeaderCell = ({
4907
4908
  return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(OverflowTooltip, { children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
4908
4909
  "th",
4909
4910
  {
4910
- scope: "col",
4911
+ scope: colSpan ? "colgroup" : "col",
4912
+ colSpan,
4911
4913
  onMouseEnter: () => useSort && setHovered(true),
4912
4914
  onMouseLeave: () => useSort && setHovered(false),
4913
4915
  className: cn(
@@ -4919,9 +4921,9 @@ var TableHeaderCell = ({
4919
4921
  className
4920
4922
  ),
4921
4923
  style: {
4922
- width: width || "auto",
4923
- maxWidth: width || "auto",
4924
- minWidth: width || "auto",
4924
+ width: colSpan ? void 0 : width || "auto",
4925
+ maxWidth: colSpan ? void 0 : width || "auto",
4926
+ minWidth: colSpan ? void 0 : width || "auto",
4925
4927
  position: sticky ? "sticky" : "static",
4926
4928
  // `top` re-anchors this cell to the scroll container's edge — needed
4927
4929
  // because setting `position: sticky` here (for left/right freezing)
@@ -7912,7 +7914,7 @@ var bannerVariants = (0, import_class_variance_authority16.cva)("rounded-[6px] p
7912
7914
  "red-500": "bg-red-50 text-red-500",
7913
7915
  "green-700": "bg-green-50 text-green-900",
7914
7916
  "green-100": "bg-green-50 text-green-900",
7915
- "grey-600": "bg-grey-100 text-grey-600",
7917
+ "grey-600": "bg-grey-200 text-grey-600",
7916
7918
  "yellow-500": "bg-yellow-50 text-yellow-500",
7917
7919
  "yellow-300": "bg-yellow-50 text-yellow-500",
7918
7920
  "yellow-200": "bg-yellow-50 text-yellow-500",
@@ -7937,6 +7939,10 @@ var TEXT_CLASS2 = {
7937
7939
  "orange-600": "text-orange-600",
7938
7940
  "purple-700": "text-purple-700"
7939
7941
  };
7942
+ var LINK_COLOR_BY_THEME = {
7943
+ "red-500": "red-500",
7944
+ "red-900": "red-500"
7945
+ };
7940
7946
  var textAlignByJustify = {
7941
7947
  start: "left",
7942
7948
  center: "center",
@@ -7985,6 +7991,24 @@ var Banner = ({
7985
7991
  disabled: toggle.disabled,
7986
7992
  "aria-label": toggle.label
7987
7993
  }
7994
+ ) : (action == null ? void 0 : action.variant) === "link" ? /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(
7995
+ "button",
7996
+ {
7997
+ type: "button",
7998
+ onClick: action.onClick,
7999
+ className: cn(
8000
+ linkVariants({
8001
+ size: "s",
8002
+ color: LINK_COLOR_BY_THEME[theme != null ? theme : "blue-700"]
8003
+ }),
8004
+ "inline-flex shrink-0 items-center gap-1.5 whitespace-nowrap"
8005
+ ),
8006
+ children: [
8007
+ action.icon,
8008
+ action.label,
8009
+ /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(FaIcon, { name: "chevron-right", size: 10 })
8010
+ ]
8011
+ }
7988
8012
  ) : action && /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(
7989
8013
  Button,
7990
8014
  {
package/dist/ui/index.mjs CHANGED
@@ -4667,6 +4667,7 @@ var TableHeaderCell = ({
4667
4667
  borderLeft = false,
4668
4668
  wrap = false,
4669
4669
  className,
4670
+ colSpan,
4670
4671
  useSort = false,
4671
4672
  isSort = false,
4672
4673
  sortOrder = null,
@@ -4679,7 +4680,8 @@ var TableHeaderCell = ({
4679
4680
  return /* @__PURE__ */ jsx52(OverflowTooltip, { children: /* @__PURE__ */ jsxs27(
4680
4681
  "th",
4681
4682
  {
4682
- scope: "col",
4683
+ scope: colSpan ? "colgroup" : "col",
4684
+ colSpan,
4683
4685
  onMouseEnter: () => useSort && setHovered(true),
4684
4686
  onMouseLeave: () => useSort && setHovered(false),
4685
4687
  className: cn(
@@ -4691,9 +4693,9 @@ var TableHeaderCell = ({
4691
4693
  className
4692
4694
  ),
4693
4695
  style: {
4694
- width: width || "auto",
4695
- maxWidth: width || "auto",
4696
- minWidth: width || "auto",
4696
+ width: colSpan ? void 0 : width || "auto",
4697
+ maxWidth: colSpan ? void 0 : width || "auto",
4698
+ minWidth: colSpan ? void 0 : width || "auto",
4697
4699
  position: sticky ? "sticky" : "static",
4698
4700
  // `top` re-anchors this cell to the scroll container's edge — needed
4699
4701
  // because setting `position: sticky` here (for left/right freezing)
@@ -7695,7 +7697,7 @@ var bannerVariants = cva16("rounded-[6px] px-4 py-2", {
7695
7697
  "red-500": "bg-red-50 text-red-500",
7696
7698
  "green-700": "bg-green-50 text-green-900",
7697
7699
  "green-100": "bg-green-50 text-green-900",
7698
- "grey-600": "bg-grey-100 text-grey-600",
7700
+ "grey-600": "bg-grey-200 text-grey-600",
7699
7701
  "yellow-500": "bg-yellow-50 text-yellow-500",
7700
7702
  "yellow-300": "bg-yellow-50 text-yellow-500",
7701
7703
  "yellow-200": "bg-yellow-50 text-yellow-500",
@@ -7720,6 +7722,10 @@ var TEXT_CLASS2 = {
7720
7722
  "orange-600": "text-orange-600",
7721
7723
  "purple-700": "text-purple-700"
7722
7724
  };
7725
+ var LINK_COLOR_BY_THEME = {
7726
+ "red-500": "red-500",
7727
+ "red-900": "red-500"
7728
+ };
7723
7729
  var textAlignByJustify = {
7724
7730
  start: "left",
7725
7731
  center: "center",
@@ -7768,6 +7774,24 @@ var Banner = ({
7768
7774
  disabled: toggle.disabled,
7769
7775
  "aria-label": toggle.label
7770
7776
  }
7777
+ ) : (action == null ? void 0 : action.variant) === "link" ? /* @__PURE__ */ jsxs49(
7778
+ "button",
7779
+ {
7780
+ type: "button",
7781
+ onClick: action.onClick,
7782
+ className: cn(
7783
+ linkVariants({
7784
+ size: "s",
7785
+ color: LINK_COLOR_BY_THEME[theme != null ? theme : "blue-700"]
7786
+ }),
7787
+ "inline-flex shrink-0 items-center gap-1.5 whitespace-nowrap"
7788
+ ),
7789
+ children: [
7790
+ action.icon,
7791
+ action.label,
7792
+ /* @__PURE__ */ jsx104(FaIcon, { name: "chevron-right", size: 10 })
7793
+ ]
7794
+ }
7771
7795
  ) : action && /* @__PURE__ */ jsxs49(
7772
7796
  Button,
7773
7797
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "design-zystem",
3
- "version": "1.0.509",
3
+ "version": "1.0.513",
4
4
  "description": "A React design system of importable components",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",