design-zystem 1.0.234 → 1.0.236

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
@@ -186,8 +186,9 @@ interface DrawerProps {
186
186
  isLoading?: boolean;
187
187
  leftVariant?: string;
188
188
  variant?: string;
189
+ footer?: ReactNode;
189
190
  }
190
- declare const Drawer: ({ showDrawer, closeDrawer, title, width, children, leftButtonLabel, leftButtonAction, rightButtonLabel, rightButtonAction, isLoading, leftVariant, variant, }: DrawerProps) => react_jsx_runtime.JSX.Element | null;
191
+ declare const Drawer: ({ showDrawer, closeDrawer, title, width, children, leftButtonLabel, leftButtonAction, rightButtonLabel, rightButtonAction, isLoading, leftVariant, variant, footer, }: DrawerProps) => react_jsx_runtime.JSX.Element | null;
191
192
 
192
193
  type SizeKey = 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl';
193
194
  interface TagBubbleProps extends HTMLAttributes<HTMLDivElement> {
@@ -224,6 +225,7 @@ interface BubbleProps {
224
225
  maxChars?: number;
225
226
  borderRadius?: string;
226
227
  width?: string;
228
+ style?: CSSProperties;
227
229
  }
228
230
  declare const Bubble: ({ children, ...otherProps }: BubbleProps) => react_jsx_runtime.JSX.Element;
229
231
 
@@ -510,6 +512,8 @@ interface AccordionProps {
510
512
  items?: AccordionItem[];
511
513
  /** Mode single — titre du panneau */
512
514
  title?: ReactNode;
515
+ /** Slot à droite du titre, avant le chevron (badge, action, counter…) */
516
+ titleEnd?: ReactNode;
513
517
  /** Mode single — contenu */
514
518
  children?: ReactNode;
515
519
  defaultOpen?: boolean;
@@ -527,7 +531,7 @@ interface AccordionProps {
527
531
  maxHeight?: number;
528
532
  backgroundHeader?: keyof typeof colors | string;
529
533
  }
530
- declare const Accordion: ({ items, title, children, defaultOpen, open: controlledOpen, onToggle, openItemId: controlledItemId, onItemToggle, needCheckbox, checkboxValue, onCheck, bordered, disabled, maxHeight, backgroundHeader, }: AccordionProps) => react_jsx_runtime.JSX.Element;
534
+ declare const Accordion: ({ items, title, titleEnd, children, defaultOpen, open: controlledOpen, onToggle, openItemId: controlledItemId, onItemToggle, needCheckbox, checkboxValue, onCheck, bordered, disabled, maxHeight, backgroundHeader, }: AccordionProps) => react_jsx_runtime.JSX.Element;
531
535
 
532
536
  interface ColorPickerProps {
533
537
  label?: string;
package/dist/index.d.ts CHANGED
@@ -186,8 +186,9 @@ interface DrawerProps {
186
186
  isLoading?: boolean;
187
187
  leftVariant?: string;
188
188
  variant?: string;
189
+ footer?: ReactNode;
189
190
  }
190
- declare const Drawer: ({ showDrawer, closeDrawer, title, width, children, leftButtonLabel, leftButtonAction, rightButtonLabel, rightButtonAction, isLoading, leftVariant, variant, }: DrawerProps) => react_jsx_runtime.JSX.Element | null;
191
+ declare const Drawer: ({ showDrawer, closeDrawer, title, width, children, leftButtonLabel, leftButtonAction, rightButtonLabel, rightButtonAction, isLoading, leftVariant, variant, footer, }: DrawerProps) => react_jsx_runtime.JSX.Element | null;
191
192
 
192
193
  type SizeKey = 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl';
193
194
  interface TagBubbleProps extends HTMLAttributes<HTMLDivElement> {
@@ -224,6 +225,7 @@ interface BubbleProps {
224
225
  maxChars?: number;
225
226
  borderRadius?: string;
226
227
  width?: string;
228
+ style?: CSSProperties;
227
229
  }
228
230
  declare const Bubble: ({ children, ...otherProps }: BubbleProps) => react_jsx_runtime.JSX.Element;
229
231
 
@@ -510,6 +512,8 @@ interface AccordionProps {
510
512
  items?: AccordionItem[];
511
513
  /** Mode single — titre du panneau */
512
514
  title?: ReactNode;
515
+ /** Slot à droite du titre, avant le chevron (badge, action, counter…) */
516
+ titleEnd?: ReactNode;
513
517
  /** Mode single — contenu */
514
518
  children?: ReactNode;
515
519
  defaultOpen?: boolean;
@@ -527,7 +531,7 @@ interface AccordionProps {
527
531
  maxHeight?: number;
528
532
  backgroundHeader?: keyof typeof colors | string;
529
533
  }
530
- declare const Accordion: ({ items, title, children, defaultOpen, open: controlledOpen, onToggle, openItemId: controlledItemId, onItemToggle, needCheckbox, checkboxValue, onCheck, bordered, disabled, maxHeight, backgroundHeader, }: AccordionProps) => react_jsx_runtime.JSX.Element;
534
+ declare const Accordion: ({ items, title, titleEnd, children, defaultOpen, open: controlledOpen, onToggle, openItemId: controlledItemId, onItemToggle, needCheckbox, checkboxValue, onCheck, bordered, disabled, maxHeight, backgroundHeader, }: AccordionProps) => react_jsx_runtime.JSX.Element;
531
535
 
532
536
  interface ColorPickerProps {
533
537
  label?: string;
package/dist/index.js CHANGED
@@ -1493,7 +1493,8 @@ var Drawer = ({
1493
1493
  rightButtonAction,
1494
1494
  isLoading = false,
1495
1495
  leftVariant,
1496
- variant = "blue_700"
1496
+ variant = "blue_700",
1497
+ footer
1497
1498
  }) => {
1498
1499
  const [isRendered, setIsRendered] = (0, import_react6.useState)(showDrawer);
1499
1500
  const [isVisible, setIsVisible] = (0, import_react6.useState)(false);
@@ -1535,6 +1536,7 @@ var Drawer = ({
1535
1536
  title && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Divider, { orientation: "horizontal", thickness: "1px" }),
1536
1537
  /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ScrollableContent, { children: children && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Col, { fullWidth: true, children }) }),
1537
1538
  /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Divider, { orientation: "horizontal", thickness: "1px" }),
1539
+ footer,
1538
1540
  (leftButtonLabel || rightButtonLabel) && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(Row, { gap: "12", fullWidth: true, children: [
1539
1541
  leftButtonLabel && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1540
1542
  Button,
@@ -2758,6 +2760,7 @@ var ContentPadding = import_styled_components21.default.div`
2758
2760
  var Accordion = ({
2759
2761
  items,
2760
2762
  title,
2763
+ titleEnd,
2761
2764
  children,
2762
2765
  defaultOpen = false,
2763
2766
  open: controlledOpen,
@@ -2813,6 +2816,7 @@ var Accordion = ({
2813
2816
  onClick: () => toggleItem(item.id),
2814
2817
  children: [
2815
2818
  /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(TriggerRow, { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { size: "s", weight: "600", children: item.title }) }),
2819
+ titleEnd,
2816
2820
  /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2817
2821
  Icon,
2818
2822
  {
@@ -2845,6 +2849,7 @@ var Accordion = ({
2845
2849
  }
2846
2850
  ),
2847
2851
  /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(TriggerRow, { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text, { size: "s", weight: "600", children: title }) }),
2852
+ titleEnd,
2848
2853
  /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Icon, { name: isOpen ? "chevron-up" : "chevron-down", size: "m" })
2849
2854
  ]
2850
2855
  }
@@ -3844,28 +3849,23 @@ var TabButton = import_styled_components38.default.button.withConfig({
3844
3849
  position: relative;
3845
3850
  cursor: ${(p) => p.$disabled ? "not-allowed" : "pointer"};
3846
3851
  color: ${(p) => {
3847
- if (p.$variant === "pills") {
3848
- return p.$active ? colors.grey_600 : colors.grey_500;
3849
- }
3852
+ if (p.$variant === "pills") return colors.dark;
3850
3853
  return p.$active ? colors.blue_700 : colors.grey_400;
3851
3854
  }};
3852
3855
  font-family: ${TOKENS.fontFamily};
3853
- font-size: 16px;
3856
+ font-size: ${(p) => p.$variant === "pills" ? "14px" : "16px"};
3854
3857
  font-weight: ${(p) => {
3855
- if (p.$variant === "pills") return 600;
3858
+ if (p.$variant === "pills") return p.$active ? 700 : 500;
3856
3859
  return p.$active ? 700 : 600;
3857
3860
  }};
3858
3861
  line-height: 1.2;
3859
3862
  white-space: nowrap;
3860
3863
  outline: none;
3861
3864
  text-align: center;
3862
- box-shadow: ${(p) => p.$variant === "pills" && p.$active ? "0 1px 2px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04)" : "none"};
3865
+ box-shadow: none;
3863
3866
  transition:
3864
3867
  background-color 150ms ease,
3865
- color 150ms ease,
3866
- box-shadow 150ms ease;
3867
-
3868
- ${(p) => p.$variant === "pills" && !p.$active && `&:hover:not(:disabled) { background: ${colors.grey_300}; }`}
3868
+ color 150ms ease;
3869
3869
 
3870
3870
  &:focus-visible {
3871
3871
  outline: 2px solid
package/dist/index.mjs CHANGED
@@ -1400,7 +1400,8 @@ var Drawer = ({
1400
1400
  rightButtonAction,
1401
1401
  isLoading = false,
1402
1402
  leftVariant,
1403
- variant = "blue_700"
1403
+ variant = "blue_700",
1404
+ footer
1404
1405
  }) => {
1405
1406
  const [isRendered, setIsRendered] = useState3(showDrawer);
1406
1407
  const [isVisible, setIsVisible] = useState3(false);
@@ -1442,6 +1443,7 @@ var Drawer = ({
1442
1443
  title && /* @__PURE__ */ jsx16(Divider, { orientation: "horizontal", thickness: "1px" }),
1443
1444
  /* @__PURE__ */ jsx16(ScrollableContent, { children: children && /* @__PURE__ */ jsx16(Col, { fullWidth: true, children }) }),
1444
1445
  /* @__PURE__ */ jsx16(Divider, { orientation: "horizontal", thickness: "1px" }),
1446
+ footer,
1445
1447
  (leftButtonLabel || rightButtonLabel) && /* @__PURE__ */ jsxs6(Row, { gap: "12", fullWidth: true, children: [
1446
1448
  leftButtonLabel && /* @__PURE__ */ jsx16(
1447
1449
  Button,
@@ -2671,6 +2673,7 @@ var ContentPadding = styled21.div`
2671
2673
  var Accordion = ({
2672
2674
  items,
2673
2675
  title,
2676
+ titleEnd,
2674
2677
  children,
2675
2678
  defaultOpen = false,
2676
2679
  open: controlledOpen,
@@ -2726,6 +2729,7 @@ var Accordion = ({
2726
2729
  onClick: () => toggleItem(item.id),
2727
2730
  children: [
2728
2731
  /* @__PURE__ */ jsx25(TriggerRow, { children: /* @__PURE__ */ jsx25(Text, { size: "s", weight: "600", children: item.title }) }),
2732
+ titleEnd,
2729
2733
  /* @__PURE__ */ jsx25(
2730
2734
  Icon,
2731
2735
  {
@@ -2758,6 +2762,7 @@ var Accordion = ({
2758
2762
  }
2759
2763
  ),
2760
2764
  /* @__PURE__ */ jsx25(TriggerRow, { children: /* @__PURE__ */ jsx25(Text, { size: "s", weight: "600", children: title }) }),
2765
+ titleEnd,
2761
2766
  /* @__PURE__ */ jsx25(Icon, { name: isOpen ? "chevron-up" : "chevron-down", size: "m" })
2762
2767
  ]
2763
2768
  }
@@ -3766,28 +3771,23 @@ var TabButton = styled38.button.withConfig({
3766
3771
  position: relative;
3767
3772
  cursor: ${(p) => p.$disabled ? "not-allowed" : "pointer"};
3768
3773
  color: ${(p) => {
3769
- if (p.$variant === "pills") {
3770
- return p.$active ? colors.grey_600 : colors.grey_500;
3771
- }
3774
+ if (p.$variant === "pills") return colors.dark;
3772
3775
  return p.$active ? colors.blue_700 : colors.grey_400;
3773
3776
  }};
3774
3777
  font-family: ${TOKENS.fontFamily};
3775
- font-size: 16px;
3778
+ font-size: ${(p) => p.$variant === "pills" ? "14px" : "16px"};
3776
3779
  font-weight: ${(p) => {
3777
- if (p.$variant === "pills") return 600;
3780
+ if (p.$variant === "pills") return p.$active ? 700 : 500;
3778
3781
  return p.$active ? 700 : 600;
3779
3782
  }};
3780
3783
  line-height: 1.2;
3781
3784
  white-space: nowrap;
3782
3785
  outline: none;
3783
3786
  text-align: center;
3784
- box-shadow: ${(p) => p.$variant === "pills" && p.$active ? "0 1px 2px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04)" : "none"};
3787
+ box-shadow: none;
3785
3788
  transition:
3786
3789
  background-color 150ms ease,
3787
- color 150ms ease,
3788
- box-shadow 150ms ease;
3789
-
3790
- ${(p) => p.$variant === "pills" && !p.$active && `&:hover:not(:disabled) { background: ${colors.grey_300}; }`}
3790
+ color 150ms ease;
3791
3791
 
3792
3792
  &:focus-visible {
3793
3793
  outline: 2px solid
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "design-zystem",
3
- "version": "1.0.234",
3
+ "version": "1.0.236",
4
4
  "description": "A React design system of importable components",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -10,6 +10,7 @@
10
10
  "prepublishOnly": "npm run build",
11
11
  "prepare": "husky",
12
12
  "test": "vitest run --project unit",
13
+ "typecheck": "tsc --noEmit",
13
14
  "storybook": "storybook dev -p 6006",
14
15
  "build-storybook": "storybook build",
15
16
  "lint": "eslint . --ext js,jsx,ts,tsx --report-unused-disable-directives --max-warnings 0",