design-zystem 1.0.336 → 1.0.337

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
@@ -761,6 +761,8 @@ interface TableRowProps extends HTMLAttributes<HTMLDivElement> {
761
761
  height?: string;
762
762
  isClickable?: boolean;
763
763
  hoverable?: boolean;
764
+ /** Colored bar on the left edge to flag a row, e.g. one needing follow-up. Drawn over the row so columns stay aligned with unflagged rows. */
765
+ accentColor?: string;
764
766
  onClick?: (e: MouseEvent<HTMLDivElement>) => void;
765
767
  style?: CSSProperties;
766
768
  className?: string;
package/dist/index.d.ts CHANGED
@@ -761,6 +761,8 @@ interface TableRowProps extends HTMLAttributes<HTMLDivElement> {
761
761
  height?: string;
762
762
  isClickable?: boolean;
763
763
  hoverable?: boolean;
764
+ /** Colored bar on the left edge to flag a row, e.g. one needing follow-up. Drawn over the row so columns stay aligned with unflagged rows. */
765
+ accentColor?: string;
764
766
  onClick?: (e: MouseEvent<HTMLDivElement>) => void;
765
767
  style?: CSSProperties;
766
768
  className?: string;
package/dist/index.js CHANGED
@@ -3990,7 +3990,8 @@ var shouldForwardPropTableRow = (prop) => ![
3990
3990
  "borderTop",
3991
3991
  "height",
3992
3992
  "isClickable",
3993
- "hoverable"
3993
+ "hoverable",
3994
+ "accentColor"
3994
3995
  ].includes(prop);
3995
3996
  var StyledTableRow = import_styled_components32.default.div.withConfig({
3996
3997
  shouldForwardProp: shouldForwardPropTableRow
@@ -4003,6 +4004,16 @@ var StyledTableRow = import_styled_components32.default.div.withConfig({
4003
4004
  border-top: ${(props) => props.borderTop || "none"};
4004
4005
  height: ${(props) => props.height || ""};
4005
4006
  transition: box-shadow 0.12s ease;
4007
+ ${(props) => props.accentColor ? `position: relative;
4008
+ &::before {
4009
+ content: '';
4010
+ position: absolute;
4011
+ top: 0;
4012
+ bottom: 0;
4013
+ left: 0;
4014
+ width: 2px;
4015
+ background-color: ${props.accentColor};
4016
+ }` : ""}
4006
4017
 
4007
4018
  &:hover {
4008
4019
  ${(props) => props.hoverable ? "box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, 0.025);" : `background-color: ${props.backgroundColor ? props.backgroundColor + "aa" : "#eaeaea"};`}
package/dist/index.mjs CHANGED
@@ -3853,7 +3853,8 @@ var shouldForwardPropTableRow = (prop) => ![
3853
3853
  "borderTop",
3854
3854
  "height",
3855
3855
  "isClickable",
3856
- "hoverable"
3856
+ "hoverable",
3857
+ "accentColor"
3857
3858
  ].includes(prop);
3858
3859
  var StyledTableRow = styled32.div.withConfig({
3859
3860
  shouldForwardProp: shouldForwardPropTableRow
@@ -3866,6 +3867,16 @@ var StyledTableRow = styled32.div.withConfig({
3866
3867
  border-top: ${(props) => props.borderTop || "none"};
3867
3868
  height: ${(props) => props.height || ""};
3868
3869
  transition: box-shadow 0.12s ease;
3870
+ ${(props) => props.accentColor ? `position: relative;
3871
+ &::before {
3872
+ content: '';
3873
+ position: absolute;
3874
+ top: 0;
3875
+ bottom: 0;
3876
+ left: 0;
3877
+ width: 2px;
3878
+ background-color: ${props.accentColor};
3879
+ }` : ""}
3869
3880
 
3870
3881
  &:hover {
3871
3882
  ${(props) => props.hoverable ? "box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, 0.025);" : `background-color: ${props.backgroundColor ? props.backgroundColor + "aa" : "#eaeaea"};`}
@@ -757,6 +757,8 @@ interface IconTabItem {
757
757
  icon: string;
758
758
  iconFamily?: IconFamily;
759
759
  label?: string;
760
+ /** Texte court sous l'icône, visible sur chaque onglet (ex. le prix du choix). */
761
+ caption?: string;
760
762
  }
761
763
  interface IconTabsProps {
762
764
  items: IconTabItem[];
@@ -757,6 +757,8 @@ interface IconTabItem {
757
757
  icon: string;
758
758
  iconFamily?: IconFamily;
759
759
  label?: string;
760
+ /** Texte court sous l'icône, visible sur chaque onglet (ex. le prix du choix). */
761
+ caption?: string;
760
762
  }
761
763
  interface IconTabsProps {
762
764
  items: IconTabItem[];
package/dist/ui/index.js CHANGED
@@ -3791,7 +3791,7 @@ var IconTabs = ({
3791
3791
  var _a2;
3792
3792
  const disabled = disabledIndexes.includes(index);
3793
3793
  const active = value === index;
3794
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
3794
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
3795
3795
  "button",
3796
3796
  {
3797
3797
  type: "button",
@@ -3799,19 +3799,33 @@ var IconTabs = ({
3799
3799
  tabRefs.current[index] = el;
3800
3800
  },
3801
3801
  disabled,
3802
+ "aria-label": item.caption ? `${item.label} ${item.caption}` : item.label,
3803
+ "aria-pressed": active,
3802
3804
  onClick: () => !disabled && (onChange == null ? void 0 : onChange(index)),
3803
3805
  className: cn(
3804
- "relative z-[1] m-[5px] flex items-center justify-center rounded-xl px-4 py-2 transition-colors",
3806
+ "relative z-[1] m-[5px] flex flex-col items-center justify-center gap-0.5 rounded-xl px-4 py-2 transition-colors",
3805
3807
  active ? "text-blue-700" : "text-grey-500",
3806
3808
  disabled ? "cursor-not-allowed opacity-50" : "cursor-pointer"
3807
3809
  ),
3808
- children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
3809
- "i",
3810
- {
3811
- className: `fa-${(_a2 = item.iconFamily) != null ? _a2 : "regular"} fa-${item.icon}`,
3812
- style: { fontSize: 16 }
3813
- }
3814
- )
3810
+ children: [
3811
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
3812
+ "i",
3813
+ {
3814
+ className: `fa-${(_a2 = item.iconFamily) != null ? _a2 : "regular"} fa-${item.icon}`,
3815
+ style: { fontSize: 16 }
3816
+ }
3817
+ ),
3818
+ item.caption && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
3819
+ "span",
3820
+ {
3821
+ className: cn(
3822
+ "text-[10px] leading-none",
3823
+ active && "font-semibold"
3824
+ ),
3825
+ children: item.caption
3826
+ }
3827
+ )
3828
+ ]
3815
3829
  },
3816
3830
  index
3817
3831
  );
package/dist/ui/index.mjs CHANGED
@@ -3634,7 +3634,7 @@ var IconTabs = ({
3634
3634
  var _a2;
3635
3635
  const disabled = disabledIndexes.includes(index);
3636
3636
  const active = value === index;
3637
- return /* @__PURE__ */ jsx51(
3637
+ return /* @__PURE__ */ jsxs25(
3638
3638
  "button",
3639
3639
  {
3640
3640
  type: "button",
@@ -3642,19 +3642,33 @@ var IconTabs = ({
3642
3642
  tabRefs.current[index] = el;
3643
3643
  },
3644
3644
  disabled,
3645
+ "aria-label": item.caption ? `${item.label} ${item.caption}` : item.label,
3646
+ "aria-pressed": active,
3645
3647
  onClick: () => !disabled && (onChange == null ? void 0 : onChange(index)),
3646
3648
  className: cn(
3647
- "relative z-[1] m-[5px] flex items-center justify-center rounded-xl px-4 py-2 transition-colors",
3649
+ "relative z-[1] m-[5px] flex flex-col items-center justify-center gap-0.5 rounded-xl px-4 py-2 transition-colors",
3648
3650
  active ? "text-blue-700" : "text-grey-500",
3649
3651
  disabled ? "cursor-not-allowed opacity-50" : "cursor-pointer"
3650
3652
  ),
3651
- children: /* @__PURE__ */ jsx51(
3652
- "i",
3653
- {
3654
- className: `fa-${(_a2 = item.iconFamily) != null ? _a2 : "regular"} fa-${item.icon}`,
3655
- style: { fontSize: 16 }
3656
- }
3657
- )
3653
+ children: [
3654
+ /* @__PURE__ */ jsx51(
3655
+ "i",
3656
+ {
3657
+ className: `fa-${(_a2 = item.iconFamily) != null ? _a2 : "regular"} fa-${item.icon}`,
3658
+ style: { fontSize: 16 }
3659
+ }
3660
+ ),
3661
+ item.caption && /* @__PURE__ */ jsx51(
3662
+ "span",
3663
+ {
3664
+ className: cn(
3665
+ "text-[10px] leading-none",
3666
+ active && "font-semibold"
3667
+ ),
3668
+ children: item.caption
3669
+ }
3670
+ )
3671
+ ]
3658
3672
  },
3659
3673
  index
3660
3674
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "design-zystem",
3
- "version": "1.0.336",
3
+ "version": "1.0.337",
4
4
  "description": "A React design system of importable components",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",