design-zystem 1.0.370 → 1.0.372

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.
@@ -1135,13 +1135,17 @@ interface TagBubbleProps {
1135
1135
  active?: boolean;
1136
1136
  activeColor?: ColorToken;
1137
1137
  inactiveColor?: ColorToken;
1138
+ /** Actif : fond plein `activeColor` + texte blanc, au lieu du simple point de couleur. */
1139
+ activeFill?: boolean;
1140
+ /** Forme pilule (`rounded-full`) à la place du rectangle arrondi par défaut. */
1141
+ pill?: boolean;
1138
1142
  count?: number | string | null;
1139
1143
  countColor?: ColorToken;
1140
1144
  onClick?: (event: MouseEvent<HTMLButtonElement>) => void;
1141
1145
  className?: string;
1142
1146
  }
1143
1147
  /** Construit sur `@radix-ui/react-toggle` (comme le `Toggle` de shadcn) — chip filtre à deux états, pressable au clavier. */
1144
- declare const TagBubble: ({ label, hideDot, active, activeColor, inactiveColor, count, countColor, onClick, className, }: TagBubbleProps) => react.JSX.Element;
1148
+ declare const TagBubble: ({ label, hideDot, active, activeColor, inactiveColor, activeFill, pill, count, countColor, onClick, className, }: TagBubbleProps) => react.JSX.Element;
1145
1149
 
1146
1150
  interface GanttDay {
1147
1151
  key: string | number;
@@ -1534,6 +1538,7 @@ declare const DatePicker: ({ mode, value, onChange, startDate, endDate, onRangeC
1534
1538
  * - "weekdayTime": jour/date + heure (24h)
1535
1539
  * - "time": heure seule (24h) (ex: 14:32)
1536
1540
  * - "longDate": jour + mois complet + année, sans jour de semaine (ex: 16 mai 2024)
1541
+ * - "dayMonth": jour + mois complet, sans jour de semaine (année si différente) (ex: 16 mai)
1537
1542
  * - "dateISO": format ISO YYYY-MM-DD (safe timezone pour le backend)
1538
1543
  */
1539
1544
  declare const formatDate: (dateString: Date | string | number | null | undefined, type?: string, language?: string) => string;
@@ -1135,13 +1135,17 @@ interface TagBubbleProps {
1135
1135
  active?: boolean;
1136
1136
  activeColor?: ColorToken;
1137
1137
  inactiveColor?: ColorToken;
1138
+ /** Actif : fond plein `activeColor` + texte blanc, au lieu du simple point de couleur. */
1139
+ activeFill?: boolean;
1140
+ /** Forme pilule (`rounded-full`) à la place du rectangle arrondi par défaut. */
1141
+ pill?: boolean;
1138
1142
  count?: number | string | null;
1139
1143
  countColor?: ColorToken;
1140
1144
  onClick?: (event: MouseEvent<HTMLButtonElement>) => void;
1141
1145
  className?: string;
1142
1146
  }
1143
1147
  /** Construit sur `@radix-ui/react-toggle` (comme le `Toggle` de shadcn) — chip filtre à deux états, pressable au clavier. */
1144
- declare const TagBubble: ({ label, hideDot, active, activeColor, inactiveColor, count, countColor, onClick, className, }: TagBubbleProps) => react.JSX.Element;
1148
+ declare const TagBubble: ({ label, hideDot, active, activeColor, inactiveColor, activeFill, pill, count, countColor, onClick, className, }: TagBubbleProps) => react.JSX.Element;
1145
1149
 
1146
1150
  interface GanttDay {
1147
1151
  key: string | number;
@@ -1534,6 +1538,7 @@ declare const DatePicker: ({ mode, value, onChange, startDate, endDate, onRangeC
1534
1538
  * - "weekdayTime": jour/date + heure (24h)
1535
1539
  * - "time": heure seule (24h) (ex: 14:32)
1536
1540
  * - "longDate": jour + mois complet + année, sans jour de semaine (ex: 16 mai 2024)
1541
+ * - "dayMonth": jour + mois complet, sans jour de semaine (année si différente) (ex: 16 mai)
1537
1542
  * - "dateISO": format ISO YYYY-MM-DD (safe timezone pour le backend)
1538
1543
  */
1539
1544
  declare const formatDate: (dateString: Date | string | number | null | undefined, type?: string, language?: string) => string;
package/dist/ui/index.js CHANGED
@@ -5209,18 +5209,36 @@ var DOT_CLASS = {
5209
5209
  "orange-600": "bg-orange-600",
5210
5210
  "purple-700": "bg-purple-700"
5211
5211
  };
5212
+ var FILL_BG_CLASS = {
5213
+ "blue-700": "bg-blue-700",
5214
+ "blue-900": "bg-blue-900",
5215
+ "blue-950": "bg-blue-950",
5216
+ "red-900": "bg-red-900",
5217
+ "red-500": "bg-red-500",
5218
+ "green-700": "bg-green-700",
5219
+ "green-100": "bg-green-100",
5220
+ "grey-600": "bg-grey-600",
5221
+ "yellow-500": "bg-yellow-500",
5222
+ "yellow-300": "bg-yellow-300",
5223
+ "yellow-200": "bg-yellow-200",
5224
+ "orange-600": "bg-orange-600",
5225
+ "purple-700": "bg-purple-700"
5226
+ };
5212
5227
  var TagBubble = ({
5213
5228
  label,
5214
5229
  hideDot = false,
5215
5230
  active = false,
5216
5231
  activeColor = "blue-700",
5217
5232
  inactiveColor = "grey-600",
5233
+ activeFill = false,
5234
+ pill = false,
5218
5235
  count,
5219
5236
  countColor = "green-700",
5220
5237
  onClick,
5221
5238
  className
5222
5239
  }) => {
5223
5240
  const showCount = count !== void 0 && count !== null;
5241
+ const filled = activeFill && active;
5224
5242
  return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(
5225
5243
  RadixToggle.Root,
5226
5244
  {
@@ -5228,7 +5246,9 @@ var TagBubble = ({
5228
5246
  pressed: active,
5229
5247
  onClick,
5230
5248
  className: cn(
5231
- "inline-flex items-center gap-2 rounded-[6px] border border-grey-200 bg-white px-2.5 py-1.5 outline-none",
5249
+ "inline-flex items-center gap-2 border px-2.5 py-1.5 outline-none",
5250
+ pill ? "rounded-full" : "rounded-[6px]",
5251
+ filled ? cn(FILL_BG_CLASS[activeColor], "border-transparent") : "border-grey-200 bg-white",
5232
5252
  "focus-visible:ring-2 focus-visible:ring-blue-200",
5233
5253
  className
5234
5254
  ),
@@ -5238,11 +5258,20 @@ var TagBubble = ({
5238
5258
  {
5239
5259
  className: cn(
5240
5260
  "h-2 w-2 shrink-0 rounded-full",
5241
- DOT_CLASS[active ? activeColor : inactiveColor]
5261
+ filled ? "bg-white" : DOT_CLASS[active ? activeColor : inactiveColor]
5242
5262
  )
5243
5263
  }
5244
5264
  ),
5245
- /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { className: "whitespace-nowrap text-xs font-semibold text-neutral-800", children: label }),
5265
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
5266
+ "span",
5267
+ {
5268
+ className: cn(
5269
+ "whitespace-nowrap text-xs font-semibold",
5270
+ filled ? "text-white" : "text-neutral-800"
5271
+ ),
5272
+ children: label
5273
+ }
5274
+ ),
5246
5275
  showCount && /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(Badge, { theme: countColor, size: "s", children: count })
5247
5276
  ]
5248
5277
  }
@@ -7094,6 +7123,14 @@ var formatDate = (dateString, type = "date", language = "en") => {
7094
7123
  }
7095
7124
  case "time":
7096
7125
  return formatTime2();
7126
+ case "dayMonth": {
7127
+ const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
7128
+ const dateYear = date.getFullYear();
7129
+ return format2(__spreadValues({
7130
+ day: "numeric",
7131
+ month: "long"
7132
+ }, dateYear !== currentYear && { year: "numeric" }));
7133
+ }
7097
7134
  case "longDate":
7098
7135
  return format2({ day: "numeric", month: "long", year: "numeric" });
7099
7136
  default:
package/dist/ui/index.mjs CHANGED
@@ -5045,18 +5045,36 @@ var DOT_CLASS = {
5045
5045
  "orange-600": "bg-orange-600",
5046
5046
  "purple-700": "bg-purple-700"
5047
5047
  };
5048
+ var FILL_BG_CLASS = {
5049
+ "blue-700": "bg-blue-700",
5050
+ "blue-900": "bg-blue-900",
5051
+ "blue-950": "bg-blue-950",
5052
+ "red-900": "bg-red-900",
5053
+ "red-500": "bg-red-500",
5054
+ "green-700": "bg-green-700",
5055
+ "green-100": "bg-green-100",
5056
+ "grey-600": "bg-grey-600",
5057
+ "yellow-500": "bg-yellow-500",
5058
+ "yellow-300": "bg-yellow-300",
5059
+ "yellow-200": "bg-yellow-200",
5060
+ "orange-600": "bg-orange-600",
5061
+ "purple-700": "bg-purple-700"
5062
+ };
5048
5063
  var TagBubble = ({
5049
5064
  label,
5050
5065
  hideDot = false,
5051
5066
  active = false,
5052
5067
  activeColor = "blue-700",
5053
5068
  inactiveColor = "grey-600",
5069
+ activeFill = false,
5070
+ pill = false,
5054
5071
  count,
5055
5072
  countColor = "green-700",
5056
5073
  onClick,
5057
5074
  className
5058
5075
  }) => {
5059
5076
  const showCount = count !== void 0 && count !== null;
5077
+ const filled = activeFill && active;
5060
5078
  return /* @__PURE__ */ jsxs35(
5061
5079
  RadixToggle.Root,
5062
5080
  {
@@ -5064,7 +5082,9 @@ var TagBubble = ({
5064
5082
  pressed: active,
5065
5083
  onClick,
5066
5084
  className: cn(
5067
- "inline-flex items-center gap-2 rounded-[6px] border border-grey-200 bg-white px-2.5 py-1.5 outline-none",
5085
+ "inline-flex items-center gap-2 border px-2.5 py-1.5 outline-none",
5086
+ pill ? "rounded-full" : "rounded-[6px]",
5087
+ filled ? cn(FILL_BG_CLASS[activeColor], "border-transparent") : "border-grey-200 bg-white",
5068
5088
  "focus-visible:ring-2 focus-visible:ring-blue-200",
5069
5089
  className
5070
5090
  ),
@@ -5074,11 +5094,20 @@ var TagBubble = ({
5074
5094
  {
5075
5095
  className: cn(
5076
5096
  "h-2 w-2 shrink-0 rounded-full",
5077
- DOT_CLASS[active ? activeColor : inactiveColor]
5097
+ filled ? "bg-white" : DOT_CLASS[active ? activeColor : inactiveColor]
5078
5098
  )
5079
5099
  }
5080
5100
  ),
5081
- /* @__PURE__ */ jsx70("span", { className: "whitespace-nowrap text-xs font-semibold text-neutral-800", children: label }),
5101
+ /* @__PURE__ */ jsx70(
5102
+ "span",
5103
+ {
5104
+ className: cn(
5105
+ "whitespace-nowrap text-xs font-semibold",
5106
+ filled ? "text-white" : "text-neutral-800"
5107
+ ),
5108
+ children: label
5109
+ }
5110
+ ),
5082
5111
  showCount && /* @__PURE__ */ jsx70(Badge, { theme: countColor, size: "s", children: count })
5083
5112
  ]
5084
5113
  }
@@ -6944,6 +6973,14 @@ var formatDate = (dateString, type = "date", language = "en") => {
6944
6973
  }
6945
6974
  case "time":
6946
6975
  return formatTime2();
6976
+ case "dayMonth": {
6977
+ const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
6978
+ const dateYear = date.getFullYear();
6979
+ return format2(__spreadValues({
6980
+ day: "numeric",
6981
+ month: "long"
6982
+ }, dateYear !== currentYear && { year: "numeric" }));
6983
+ }
6947
6984
  case "longDate":
6948
6985
  return format2({ day: "numeric", month: "long", year: "numeric" });
6949
6986
  default:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "design-zystem",
3
- "version": "1.0.370",
3
+ "version": "1.0.372",
4
4
  "description": "A React design system of importable components",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",