design-zystem 1.0.249 → 1.0.251

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
@@ -742,6 +742,8 @@ interface TabItem {
742
742
  id: string | number;
743
743
  label: string;
744
744
  disabled?: boolean;
745
+ dot?: boolean;
746
+ dotColor?: string;
745
747
  }
746
748
  type TabsVariant = 'line' | 'pills';
747
749
  interface TabsProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {
@@ -821,13 +823,15 @@ interface MetricCardProps {
821
823
  title: string;
822
824
  value: string | number;
823
825
  valueColor?: string;
826
+ /** Muted secondary text shown right after the value (e.g. "17 pénalités"). */
827
+ subtitle?: string;
824
828
  iconBackgroundColor?: string;
825
829
  iconColor?: string;
826
830
  contentLayout?: 'col' | 'row';
827
831
  onClick?: () => void;
828
832
  checked?: boolean;
829
833
  }
830
- declare const MetricCard: ({ icon, title, value, valueColor, iconBackgroundColor, iconColor, contentLayout, onClick, checked, }: MetricCardProps) => react_jsx_runtime.JSX.Element;
834
+ declare const MetricCard: ({ icon, title, value, valueColor, subtitle, iconBackgroundColor, iconColor, contentLayout, onClick, checked, }: MetricCardProps) => react_jsx_runtime.JSX.Element;
831
835
 
832
836
  interface TooltipProps {
833
837
  children?: ReactNode;
package/dist/index.d.ts CHANGED
@@ -742,6 +742,8 @@ interface TabItem {
742
742
  id: string | number;
743
743
  label: string;
744
744
  disabled?: boolean;
745
+ dot?: boolean;
746
+ dotColor?: string;
745
747
  }
746
748
  type TabsVariant = 'line' | 'pills';
747
749
  interface TabsProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {
@@ -821,13 +823,15 @@ interface MetricCardProps {
821
823
  title: string;
822
824
  value: string | number;
823
825
  valueColor?: string;
826
+ /** Muted secondary text shown right after the value (e.g. "17 pénalités"). */
827
+ subtitle?: string;
824
828
  iconBackgroundColor?: string;
825
829
  iconColor?: string;
826
830
  contentLayout?: 'col' | 'row';
827
831
  onClick?: () => void;
828
832
  checked?: boolean;
829
833
  }
830
- declare const MetricCard: ({ icon, title, value, valueColor, iconBackgroundColor, iconColor, contentLayout, onClick, checked, }: MetricCardProps) => react_jsx_runtime.JSX.Element;
834
+ declare const MetricCard: ({ icon, title, value, valueColor, subtitle, iconBackgroundColor, iconColor, contentLayout, onClick, checked, }: MetricCardProps) => react_jsx_runtime.JSX.Element;
831
835
 
832
836
  interface TooltipProps {
833
837
  children?: ReactNode;
package/dist/index.js CHANGED
@@ -3890,6 +3890,10 @@ var TabButton = import_styled_components38.default.button.withConfig({
3890
3890
  shouldForwardProp: shouldForwardTab
3891
3891
  })`
3892
3892
  appearance: none;
3893
+ display: inline-flex;
3894
+ align-items: center;
3895
+ justify-content: center;
3896
+ gap: 6px;
3893
3897
  border: 0;
3894
3898
  background: ${(p) => {
3895
3899
  if (p.$variant !== "pills") return "transparent";
@@ -3931,6 +3935,14 @@ var TabButton = import_styled_components38.default.button.withConfig({
3931
3935
  opacity: 0.6;
3932
3936
  }
3933
3937
  `;
3938
+ var TabDot = import_styled_components38.default.span`
3939
+ display: inline-block;
3940
+ width: 8px;
3941
+ height: 8px;
3942
+ border-radius: 50%;
3943
+ flex: none;
3944
+ background: ${(p) => p.$color || colors.red_950};
3945
+ `;
3934
3946
  var Tab = (_a) => {
3935
3947
  var _b = _a, {
3936
3948
  id,
@@ -4021,7 +4033,7 @@ var Tabs = (_a) => {
4021
4033
  const isPillsFullWidth = variant === "pills" && align === "start";
4022
4034
  const rendered = (0, import_react20.useMemo)(() => {
4023
4035
  if (items && items.length) {
4024
- return items.map((it) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
4036
+ return items.map((it) => /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
4025
4037
  Tab,
4026
4038
  {
4027
4039
  id: it.id,
@@ -4031,7 +4043,10 @@ var Tabs = (_a) => {
4031
4043
  fullWidth: isPillsFullWidth,
4032
4044
  onClick: () => handleSelect(it.id),
4033
4045
  innerRef: setTabRef(it.id),
4034
- children: it.label
4046
+ children: [
4047
+ it.label,
4048
+ it.dot && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(TabDot, { $color: it.dotColor })
4049
+ ]
4035
4050
  },
4036
4051
  it.id
4037
4052
  ));
@@ -4637,6 +4652,7 @@ var MetricCard = ({
4637
4652
  title,
4638
4653
  value,
4639
4654
  valueColor,
4655
+ subtitle,
4640
4656
  iconBackgroundColor = "blue_50",
4641
4657
  iconColor = "blue_950",
4642
4658
  contentLayout = "col",
@@ -4674,7 +4690,10 @@ var MetricCard = ({
4674
4690
  /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Text, { size: "s", variant: "grey_600", children: title })
4675
4691
  ] }) : /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Col, { gap: "4", children: [
4676
4692
  /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Text, { size: "s", variant: "grey_600", children: title }),
4677
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Text, { size: "s", weight: "bold", variant: valueColor || "grey_600", children: value })
4693
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Row, { gap: "6", alignItems: "baseline", children: [
4694
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Text, { size: "s", weight: "bold", variant: valueColor || "grey_600", children: value }),
4695
+ subtitle && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Text, { size: "xs", variant: "grey_600", children: subtitle })
4696
+ ] })
4678
4697
  ] })
4679
4698
  ] })
4680
4699
  }
package/dist/index.mjs CHANGED
@@ -3808,6 +3808,10 @@ var TabButton = styled38.button.withConfig({
3808
3808
  shouldForwardProp: shouldForwardTab
3809
3809
  })`
3810
3810
  appearance: none;
3811
+ display: inline-flex;
3812
+ align-items: center;
3813
+ justify-content: center;
3814
+ gap: 6px;
3811
3815
  border: 0;
3812
3816
  background: ${(p) => {
3813
3817
  if (p.$variant !== "pills") return "transparent";
@@ -3849,6 +3853,14 @@ var TabButton = styled38.button.withConfig({
3849
3853
  opacity: 0.6;
3850
3854
  }
3851
3855
  `;
3856
+ var TabDot = styled38.span`
3857
+ display: inline-block;
3858
+ width: 8px;
3859
+ height: 8px;
3860
+ border-radius: 50%;
3861
+ flex: none;
3862
+ background: ${(p) => p.$color || colors.red_950};
3863
+ `;
3852
3864
  var Tab = (_a) => {
3853
3865
  var _b = _a, {
3854
3866
  id,
@@ -3939,7 +3951,7 @@ var Tabs = (_a) => {
3939
3951
  const isPillsFullWidth = variant === "pills" && align === "start";
3940
3952
  const rendered = useMemo(() => {
3941
3953
  if (items && items.length) {
3942
- return items.map((it) => /* @__PURE__ */ jsx45(
3954
+ return items.map((it) => /* @__PURE__ */ jsxs20(
3943
3955
  Tab,
3944
3956
  {
3945
3957
  id: it.id,
@@ -3949,7 +3961,10 @@ var Tabs = (_a) => {
3949
3961
  fullWidth: isPillsFullWidth,
3950
3962
  onClick: () => handleSelect(it.id),
3951
3963
  innerRef: setTabRef(it.id),
3952
- children: it.label
3964
+ children: [
3965
+ it.label,
3966
+ it.dot && /* @__PURE__ */ jsx45(TabDot, { $color: it.dotColor })
3967
+ ]
3953
3968
  },
3954
3969
  it.id
3955
3970
  ));
@@ -4560,6 +4575,7 @@ var MetricCard = ({
4560
4575
  title,
4561
4576
  value,
4562
4577
  valueColor,
4578
+ subtitle,
4563
4579
  iconBackgroundColor = "blue_50",
4564
4580
  iconColor = "blue_950",
4565
4581
  contentLayout = "col",
@@ -4597,7 +4613,10 @@ var MetricCard = ({
4597
4613
  /* @__PURE__ */ jsx50(Text, { size: "s", variant: "grey_600", children: title })
4598
4614
  ] }) : /* @__PURE__ */ jsxs25(Col, { gap: "4", children: [
4599
4615
  /* @__PURE__ */ jsx50(Text, { size: "s", variant: "grey_600", children: title }),
4600
- /* @__PURE__ */ jsx50(Text, { size: "s", weight: "bold", variant: valueColor || "grey_600", children: value })
4616
+ /* @__PURE__ */ jsxs25(Row, { gap: "6", alignItems: "baseline", children: [
4617
+ /* @__PURE__ */ jsx50(Text, { size: "s", weight: "bold", variant: valueColor || "grey_600", children: value }),
4618
+ subtitle && /* @__PURE__ */ jsx50(Text, { size: "xs", variant: "grey_600", children: subtitle })
4619
+ ] })
4601
4620
  ] })
4602
4621
  ] })
4603
4622
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "design-zystem",
3
- "version": "1.0.249",
3
+ "version": "1.0.251",
4
4
  "description": "A React design system of importable components",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",