design-zystem 1.0.423 → 1.0.425

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
@@ -1270,6 +1270,7 @@ declare const GanttSwatch: ({ color, filled, }: {
1270
1270
  * - "weekdayTime": weekday/date + time (24h)
1271
1271
  * - "longDate": day + full month + year, no weekday (ex: 16 mai 2024)
1272
1272
  * - "dayMonth": day + full month, no weekday (year only if different)
1273
+ * - "shortDayMonth": DD/MM, year only if different (ex: 16/05, 16/05/2024)
1273
1274
  * - "dateISO": ISO format YYYY-MM-DD (timezone-safe for backend)
1274
1275
  */
1275
1276
  declare const formatDate: (dateString: Date | string | number | null | undefined, type?: string, language?: string) => string;
package/dist/index.d.ts CHANGED
@@ -1270,6 +1270,7 @@ declare const GanttSwatch: ({ color, filled, }: {
1270
1270
  * - "weekdayTime": weekday/date + time (24h)
1271
1271
  * - "longDate": day + full month + year, no weekday (ex: 16 mai 2024)
1272
1272
  * - "dayMonth": day + full month, no weekday (year only if different)
1273
+ * - "shortDayMonth": DD/MM, year only if different (ex: 16/05, 16/05/2024)
1273
1274
  * - "dateISO": ISO format YYYY-MM-DD (timezone-safe for backend)
1274
1275
  */
1275
1276
  declare const formatDate: (dateString: Date | string | number | null | undefined, type?: string, language?: string) => string;
package/dist/index.js CHANGED
@@ -6899,6 +6899,14 @@ var formatDate = (dateString, type = "date", language = "en") => {
6899
6899
  month: "long"
6900
6900
  }, dateYear !== currentYear && { year: "numeric" }));
6901
6901
  }
6902
+ case "shortDayMonth": {
6903
+ const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
6904
+ const dateYear = date.getFullYear();
6905
+ return format(__spreadValues({
6906
+ day: "2-digit",
6907
+ month: "2-digit"
6908
+ }, dateYear !== currentYear && { year: "numeric" }));
6909
+ }
6902
6910
  case "monthYear":
6903
6911
  return format({ month: "long", year: "numeric" });
6904
6912
  default:
package/dist/index.mjs CHANGED
@@ -6776,6 +6776,14 @@ var formatDate = (dateString, type = "date", language = "en") => {
6776
6776
  month: "long"
6777
6777
  }, dateYear !== currentYear && { year: "numeric" }));
6778
6778
  }
6779
+ case "shortDayMonth": {
6780
+ const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
6781
+ const dateYear = date.getFullYear();
6782
+ return format(__spreadValues({
6783
+ day: "2-digit",
6784
+ month: "2-digit"
6785
+ }, dateYear !== currentYear && { year: "numeric" }));
6786
+ }
6779
6787
  case "monthYear":
6780
6788
  return format({ month: "long", year: "numeric" });
6781
6789
  default:
@@ -10,6 +10,7 @@ import * as RadixAvatar from '@radix-ui/react-avatar';
10
10
  import * as RadixCollapsible from '@radix-ui/react-collapsible';
11
11
  import { Drawer as Drawer$1 } from 'vaul';
12
12
  import * as RadixTooltip from '@radix-ui/react-tooltip';
13
+ import { ToasterProps } from 'sonner';
13
14
  import * as RadixToggle from '@radix-ui/react-toggle';
14
15
  import { DocumentProps } from 'react-pdf';
15
16
  import * as RadixScrollArea from '@radix-ui/react-scroll-area';
@@ -1119,6 +1120,8 @@ interface ToastOptions {
1119
1120
  timeOut?: number;
1120
1121
  /** Remplace le toast déjà affiché sous cet id (ex. celui renvoyé par `toast.loading`) au lieu d'en ouvrir un nouveau. */
1121
1122
  id?: ToastId;
1123
+ /** Coin d'affichage de ce toast seul, ex. `bottom-left` pour ne pas couvrir le pied d'un drawer ouvert à droite. */
1124
+ position?: ToasterProps['position'];
1122
1125
  }
1123
1126
  /** API impérative, appelable hors composant React. Monte `<Toaster />` une fois à la racine de l'app. */
1124
1127
  declare const toast: {
@@ -1356,13 +1359,15 @@ interface TagBubbleProps extends Omit<ComponentPropsWithoutRef<typeof RadixToggl
1356
1359
  activeFill?: boolean;
1357
1360
  /** Forme pilule (`rounded-full`) à la place du rectangle arrondi par défaut. */
1358
1361
  pill?: boolean;
1362
+ /** `m` : hauteur fixe de 36 px, alignée sur les champs et boutons d'une barre de filtres. */
1363
+ size?: 's' | 'm';
1359
1364
  count?: number | string | null;
1360
1365
  countColor?: ColorToken;
1361
1366
  onClick?: (event: MouseEvent<HTMLButtonElement>) => void;
1362
1367
  className?: string;
1363
1368
  }
1364
1369
  /** Construit sur `@radix-ui/react-toggle` (comme le `Toggle` de shadcn) — chip filtre à deux états, pressable au clavier. */
1365
- declare const TagBubble: ({ label, hideDot, active, activeColor, inactiveColor, activeFill, pill, count, countColor, onClick, className, ...rest }: TagBubbleProps) => react.JSX.Element;
1370
+ declare const TagBubble: ({ label, hideDot, active, activeColor, inactiveColor, activeFill, pill, size, count, countColor, onClick, className, ...rest }: TagBubbleProps) => react.JSX.Element;
1366
1371
 
1367
1372
  interface HistoryChange {
1368
1373
  label: string;
@@ -1837,6 +1842,7 @@ declare const DatePicker: ({ mode, value, onChange, startDate, endDate, onRangeC
1837
1842
  * - "time": heure seule (24h) (ex: 14:32)
1838
1843
  * - "longDate": jour + mois complet + année, sans jour de semaine (ex: 16 mai 2024)
1839
1844
  * - "dayMonth": jour + mois complet, sans jour de semaine (année si différente) (ex: 16 mai)
1845
+ * - "shortDayMonth": JJ/MM, année si différente (ex: 16/05, 16/05/2024)
1840
1846
  * - "dateISO": format ISO YYYY-MM-DD (safe timezone pour le backend)
1841
1847
  */
1842
1848
  declare const formatDate: (dateString: Date | string | number | null | undefined, type?: string, language?: string) => string;
@@ -10,6 +10,7 @@ import * as RadixAvatar from '@radix-ui/react-avatar';
10
10
  import * as RadixCollapsible from '@radix-ui/react-collapsible';
11
11
  import { Drawer as Drawer$1 } from 'vaul';
12
12
  import * as RadixTooltip from '@radix-ui/react-tooltip';
13
+ import { ToasterProps } from 'sonner';
13
14
  import * as RadixToggle from '@radix-ui/react-toggle';
14
15
  import { DocumentProps } from 'react-pdf';
15
16
  import * as RadixScrollArea from '@radix-ui/react-scroll-area';
@@ -1119,6 +1120,8 @@ interface ToastOptions {
1119
1120
  timeOut?: number;
1120
1121
  /** Remplace le toast déjà affiché sous cet id (ex. celui renvoyé par `toast.loading`) au lieu d'en ouvrir un nouveau. */
1121
1122
  id?: ToastId;
1123
+ /** Coin d'affichage de ce toast seul, ex. `bottom-left` pour ne pas couvrir le pied d'un drawer ouvert à droite. */
1124
+ position?: ToasterProps['position'];
1122
1125
  }
1123
1126
  /** API impérative, appelable hors composant React. Monte `<Toaster />` une fois à la racine de l'app. */
1124
1127
  declare const toast: {
@@ -1356,13 +1359,15 @@ interface TagBubbleProps extends Omit<ComponentPropsWithoutRef<typeof RadixToggl
1356
1359
  activeFill?: boolean;
1357
1360
  /** Forme pilule (`rounded-full`) à la place du rectangle arrondi par défaut. */
1358
1361
  pill?: boolean;
1362
+ /** `m` : hauteur fixe de 36 px, alignée sur les champs et boutons d'une barre de filtres. */
1363
+ size?: 's' | 'm';
1359
1364
  count?: number | string | null;
1360
1365
  countColor?: ColorToken;
1361
1366
  onClick?: (event: MouseEvent<HTMLButtonElement>) => void;
1362
1367
  className?: string;
1363
1368
  }
1364
1369
  /** Construit sur `@radix-ui/react-toggle` (comme le `Toggle` de shadcn) — chip filtre à deux états, pressable au clavier. */
1365
- declare const TagBubble: ({ label, hideDot, active, activeColor, inactiveColor, activeFill, pill, count, countColor, onClick, className, ...rest }: TagBubbleProps) => react.JSX.Element;
1370
+ declare const TagBubble: ({ label, hideDot, active, activeColor, inactiveColor, activeFill, pill, size, count, countColor, onClick, className, ...rest }: TagBubbleProps) => react.JSX.Element;
1366
1371
 
1367
1372
  interface HistoryChange {
1368
1373
  label: string;
@@ -1837,6 +1842,7 @@ declare const DatePicker: ({ mode, value, onChange, startDate, endDate, onRangeC
1837
1842
  * - "time": heure seule (24h) (ex: 14:32)
1838
1843
  * - "longDate": jour + mois complet + année, sans jour de semaine (ex: 16 mai 2024)
1839
1844
  * - "dayMonth": jour + mois complet, sans jour de semaine (année si différente) (ex: 16 mai)
1845
+ * - "shortDayMonth": JJ/MM, année si différente (ex: 16/05, 16/05/2024)
1840
1846
  * - "dateISO": format ISO YYYY-MM-DD (safe timezone pour le backend)
1841
1847
  */
1842
1848
  declare const formatDate: (dateString: Date | string | number | null | undefined, type?: string, language?: string) => string;
package/dist/ui/index.js CHANGED
@@ -5430,7 +5430,8 @@ var show = (type, message, options) => {
5430
5430
  ),
5431
5431
  {
5432
5432
  id: options == null ? void 0 : options.id,
5433
- duration: timeOut
5433
+ duration: timeOut,
5434
+ position: options == null ? void 0 : options.position
5434
5435
  }
5435
5436
  );
5436
5437
  };
@@ -6401,6 +6402,7 @@ var TagBubble = (_a) => {
6401
6402
  inactiveColor = "grey-600",
6402
6403
  activeFill = false,
6403
6404
  pill = false,
6405
+ size = "s",
6404
6406
  count,
6405
6407
  countColor = "green-700",
6406
6408
  onClick,
@@ -6413,6 +6415,7 @@ var TagBubble = (_a) => {
6413
6415
  "inactiveColor",
6414
6416
  "activeFill",
6415
6417
  "pill",
6418
+ "size",
6416
6419
  "count",
6417
6420
  "countColor",
6418
6421
  "onClick",
@@ -6432,6 +6435,7 @@ var TagBubble = (_a) => {
6432
6435
  className: cn(
6433
6436
  "inline-flex items-center justify-center gap-2 border px-2.5 py-1.5 outline-none",
6434
6437
  pill ? "rounded-full" : "rounded-[6px]",
6438
+ size === "m" && "h-9",
6435
6439
  filled ? cn(
6436
6440
  isHexColor(activeColor) ? "bg-white" : [LIGHT_BG_CLASS[activeColor], BORDER_CLASS[activeColor]],
6437
6441
  "border-2"
@@ -6554,6 +6558,14 @@ var formatDate = (dateString, type = "date", language = "en") => {
6554
6558
  }
6555
6559
  case "longDate":
6556
6560
  return format2({ day: "numeric", month: "long", year: "numeric" });
6561
+ case "shortDayMonth": {
6562
+ const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
6563
+ const dateYear = date.getFullYear();
6564
+ return format2(__spreadValues({
6565
+ day: "2-digit",
6566
+ month: "2-digit"
6567
+ }, dateYear !== currentYear && { year: "numeric" }));
6568
+ }
6557
6569
  case "monthYear":
6558
6570
  return format2({ month: "long", year: "numeric" });
6559
6571
  default:
@@ -8573,7 +8585,7 @@ var DatePicker = ({
8573
8585
  ] });
8574
8586
  }
8575
8587
  return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(RadixPopover6.Root, { open, onOpenChange: setOpen, children: [
8576
- /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(Layout, { column: true, gap: 1.5, align: "end", className, children: [
8588
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(Layout, { column: true, gap: 1.5, align, className, children: [
8577
8589
  /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(Layout, { align: "center", gap: 1.5, width: "auto", children: [
8578
8590
  /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(RadixPopover6.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
8579
8591
  "button",
@@ -8615,7 +8627,10 @@ var DatePicker = ({
8615
8627
  {
8616
8628
  type: "button",
8617
8629
  onClick: handleReset,
8618
- className: "ml-auto flex w-fit items-center gap-1.5 rounded-[6px] border border-blue-700 bg-blue-50 px-2.5 py-1 text-xs font-medium text-blue-700",
8630
+ className: cn(
8631
+ "flex w-fit items-center gap-1.5 rounded-[6px] border border-blue-700 bg-blue-50 px-2.5 py-1 text-xs font-medium text-blue-700",
8632
+ align === "end" && "ml-auto"
8633
+ ),
8619
8634
  children: displayText
8620
8635
  }
8621
8636
  )
package/dist/ui/index.mjs CHANGED
@@ -5246,7 +5246,8 @@ var show = (type, message, options) => {
5246
5246
  ),
5247
5247
  {
5248
5248
  id: options == null ? void 0 : options.id,
5249
- duration: timeOut
5249
+ duration: timeOut,
5250
+ position: options == null ? void 0 : options.position
5250
5251
  }
5251
5252
  );
5252
5253
  };
@@ -6223,6 +6224,7 @@ var TagBubble = (_a) => {
6223
6224
  inactiveColor = "grey-600",
6224
6225
  activeFill = false,
6225
6226
  pill = false,
6227
+ size = "s",
6226
6228
  count,
6227
6229
  countColor = "green-700",
6228
6230
  onClick,
@@ -6235,6 +6237,7 @@ var TagBubble = (_a) => {
6235
6237
  "inactiveColor",
6236
6238
  "activeFill",
6237
6239
  "pill",
6240
+ "size",
6238
6241
  "count",
6239
6242
  "countColor",
6240
6243
  "onClick",
@@ -6254,6 +6257,7 @@ var TagBubble = (_a) => {
6254
6257
  className: cn(
6255
6258
  "inline-flex items-center justify-center gap-2 border px-2.5 py-1.5 outline-none",
6256
6259
  pill ? "rounded-full" : "rounded-[6px]",
6260
+ size === "m" && "h-9",
6257
6261
  filled ? cn(
6258
6262
  isHexColor(activeColor) ? "bg-white" : [LIGHT_BG_CLASS[activeColor], BORDER_CLASS[activeColor]],
6259
6263
  "border-2"
@@ -6376,6 +6380,14 @@ var formatDate = (dateString, type = "date", language = "en") => {
6376
6380
  }
6377
6381
  case "longDate":
6378
6382
  return format2({ day: "numeric", month: "long", year: "numeric" });
6383
+ case "shortDayMonth": {
6384
+ const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
6385
+ const dateYear = date.getFullYear();
6386
+ return format2(__spreadValues({
6387
+ day: "2-digit",
6388
+ month: "2-digit"
6389
+ }, dateYear !== currentYear && { year: "numeric" }));
6390
+ }
6379
6391
  case "monthYear":
6380
6392
  return format2({ month: "long", year: "numeric" });
6381
6393
  default:
@@ -8410,7 +8422,7 @@ var DatePicker = ({
8410
8422
  ] });
8411
8423
  }
8412
8424
  return /* @__PURE__ */ jsxs58(RadixPopover6.Root, { open, onOpenChange: setOpen, children: [
8413
- /* @__PURE__ */ jsxs58(Layout, { column: true, gap: 1.5, align: "end", className, children: [
8425
+ /* @__PURE__ */ jsxs58(Layout, { column: true, gap: 1.5, align, className, children: [
8414
8426
  /* @__PURE__ */ jsxs58(Layout, { align: "center", gap: 1.5, width: "auto", children: [
8415
8427
  /* @__PURE__ */ jsx96(RadixPopover6.Trigger, { asChild: true, children: /* @__PURE__ */ jsx96(
8416
8428
  "button",
@@ -8452,7 +8464,10 @@ var DatePicker = ({
8452
8464
  {
8453
8465
  type: "button",
8454
8466
  onClick: handleReset,
8455
- className: "ml-auto flex w-fit items-center gap-1.5 rounded-[6px] border border-blue-700 bg-blue-50 px-2.5 py-1 text-xs font-medium text-blue-700",
8467
+ className: cn(
8468
+ "flex w-fit items-center gap-1.5 rounded-[6px] border border-blue-700 bg-blue-50 px-2.5 py-1 text-xs font-medium text-blue-700",
8469
+ align === "end" && "ml-auto"
8470
+ ),
8456
8471
  children: displayText
8457
8472
  }
8458
8473
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "design-zystem",
3
- "version": "1.0.423",
3
+ "version": "1.0.425",
4
4
  "description": "A React design system of importable components",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",