design-zystem 1.0.273 → 1.0.275

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.css CHANGED
@@ -277,3 +277,161 @@
277
277
  color: #646b73;
278
278
  border-color: #cbd5e1;
279
279
  }
280
+
281
+ /* src/Components/Gantt/Gantt.css */
282
+ .dz-gantt {
283
+ border: 1px solid #e2e8f0;
284
+ border-radius: 10px;
285
+ overflow: hidden;
286
+ background: #fff;
287
+ color: #343a40;
288
+ width: 100%;
289
+ }
290
+ .dz-gantt__axis {
291
+ display: grid;
292
+ grid-template-columns: var(--dz-gantt-label-w) minmax(0, 1fr);
293
+ border-bottom: 1px solid #e2e8f0;
294
+ background: #f8fafc;
295
+ }
296
+ .dz-gantt__axis-label {
297
+ display: flex;
298
+ align-items: center;
299
+ height: 30px;
300
+ padding: 0 12px;
301
+ border-right: 1px solid #e2e8f0;
302
+ font-size: 10px;
303
+ font-weight: 700;
304
+ letter-spacing: 0.05em;
305
+ color: #94a3b8;
306
+ }
307
+ .dz-gantt__axis-days {
308
+ position: relative;
309
+ height: 30px;
310
+ }
311
+ .dz-gantt__axis-day {
312
+ position: absolute;
313
+ top: 0;
314
+ height: 100%;
315
+ display: flex;
316
+ align-items: center;
317
+ padding-left: 8px;
318
+ border-right: 1px solid #f1f5f9;
319
+ box-sizing: border-box;
320
+ font-size: 10px;
321
+ font-weight: 600;
322
+ color: #94a3b8;
323
+ white-space: nowrap;
324
+ }
325
+ .dz-gantt__body {
326
+ display: grid;
327
+ grid-template-columns: var(--dz-gantt-label-w) minmax(0, 1fr);
328
+ max-height: var(--dz-gantt-max-h);
329
+ overflow-y: auto;
330
+ overflow-x: hidden;
331
+ }
332
+ .dz-gantt__labels {
333
+ min-width: 0;
334
+ border-right: 1px solid #e2e8f0;
335
+ }
336
+ .dz-gantt__dot {
337
+ display: inline-block;
338
+ width: 9px;
339
+ height: 9px;
340
+ border-radius: 3px;
341
+ flex-shrink: 0;
342
+ }
343
+ .dz-gantt__labelrow {
344
+ height: var(--dz-gantt-row-h);
345
+ padding: 0 12px;
346
+ display: flex;
347
+ flex-direction: column;
348
+ justify-content: center;
349
+ gap: 2px;
350
+ min-width: 0;
351
+ overflow: hidden;
352
+ box-sizing: border-box;
353
+ transition: background 0.12s ease;
354
+ }
355
+ .dz-gantt__labelrow--alt {
356
+ background: #f8fafc;
357
+ }
358
+ .dz-gantt__labelrow--clickable {
359
+ cursor: pointer;
360
+ }
361
+ .dz-gantt__labelrow--clickable:hover {
362
+ background: #f1f5f9;
363
+ }
364
+ .dz-gantt__timeline-col {
365
+ min-width: 0;
366
+ overflow: hidden;
367
+ }
368
+ .dz-gantt__timeline {
369
+ position: relative;
370
+ width: 100%;
371
+ }
372
+ .dz-gantt__day {
373
+ position: absolute;
374
+ top: 0;
375
+ bottom: 0;
376
+ background: #fff;
377
+ border-right: 1px solid #f1f5f9;
378
+ box-sizing: border-box;
379
+ }
380
+ .dz-gantt__day--alt {
381
+ background: #f8fafc;
382
+ }
383
+ .dz-gantt__band {
384
+ position: absolute;
385
+ top: 0;
386
+ bottom: 0;
387
+ background: rgba(244, 70, 73, 0.1);
388
+ border-left: 1.5px solid #f44649;
389
+ border-right: 1.5px solid #f44649;
390
+ box-sizing: border-box;
391
+ pointer-events: none;
392
+ }
393
+ .dz-gantt__track {
394
+ position: absolute;
395
+ left: 0;
396
+ right: 0;
397
+ box-sizing: border-box;
398
+ }
399
+ .dz-gantt__track:not(:first-child) {
400
+ border-top: 1px solid #f1f5f9;
401
+ }
402
+ .dz-gantt__bar {
403
+ position: absolute;
404
+ top: 50%;
405
+ transform: translateY(-50%);
406
+ height: 22px;
407
+ min-width: 8px;
408
+ border-radius: 6px;
409
+ display: flex;
410
+ align-items: center;
411
+ padding: 0 8px;
412
+ box-sizing: border-box;
413
+ overflow: hidden;
414
+ background: var(--dz-gantt-bar-color, #94a3b8);
415
+ border: 1.5px solid var(--dz-gantt-bar-color, #94a3b8);
416
+ box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
417
+ }
418
+ .dz-gantt__bar--approx {
419
+ border-style: dashed;
420
+ opacity: 0.9;
421
+ }
422
+ .dz-gantt__bar-label {
423
+ font-size: 10px;
424
+ font-weight: 600;
425
+ color: var(--dz-gantt-bar-text, #fff);
426
+ white-space: nowrap;
427
+ overflow: hidden;
428
+ text-overflow: ellipsis;
429
+ }
430
+ .dz-gantt__swatch {
431
+ display: inline-block;
432
+ width: 18px;
433
+ height: 12px;
434
+ border-radius: 3px;
435
+ flex-shrink: 0;
436
+ box-sizing: border-box;
437
+ }
package/dist/index.d.mts CHANGED
@@ -774,6 +774,8 @@ interface TabItem {
774
774
  disabled?: boolean;
775
775
  dot?: boolean;
776
776
  dotColor?: string;
777
+ bubbleActive?: boolean;
778
+ bubbleNumber?: number | null;
777
779
  }
778
780
  type TabsVariant = 'line' | 'pills';
779
781
  interface TabsProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {
@@ -1070,6 +1072,52 @@ interface TimelineProps {
1070
1072
  */
1071
1073
  declare const Timeline: ({ items, lineColor, emptyLabel, }: TimelineProps) => react_jsx_runtime.JSX.Element;
1072
1074
 
1075
+ interface GanttDay {
1076
+ key: string | number;
1077
+ leftPct: number;
1078
+ widthPct: number;
1079
+ label: string;
1080
+ }
1081
+ interface GanttBar {
1082
+ leftPct: number;
1083
+ widthPct: number;
1084
+ color: string;
1085
+ textColor?: string;
1086
+ label?: string | null;
1087
+ title?: string;
1088
+ dashed?: boolean;
1089
+ }
1090
+ interface GanttRow<T = unknown> {
1091
+ key: string | number;
1092
+ bar?: GanttBar | null;
1093
+ data: T;
1094
+ }
1095
+ interface GanttBand {
1096
+ key: string | number;
1097
+ leftPct: number;
1098
+ widthPct: number;
1099
+ title?: string;
1100
+ }
1101
+ interface GanttProps<T = unknown> {
1102
+ days: GanttDay[];
1103
+ rows: GanttRow<T>[];
1104
+ bands?: GanttBand[];
1105
+ labelHeader?: string;
1106
+ renderLabel: (row: GanttRow<T>, index: number) => ReactNode;
1107
+ onRowClick?: (row: GanttRow<T>, index: number) => void;
1108
+ labelWidth?: number;
1109
+ rowHeight?: number;
1110
+ maxHeight?: number;
1111
+ }
1112
+ declare const Gantt: <T>({ days, rows, bands, labelHeader, renderLabel, onRowClick, labelWidth, rowHeight, maxHeight, }: GanttProps<T>) => react_jsx_runtime.JSX.Element;
1113
+ declare const GanttDot: ({ color }: {
1114
+ color: string;
1115
+ }) => react_jsx_runtime.JSX.Element;
1116
+ declare const GanttSwatch: ({ color, filled, }: {
1117
+ color: string;
1118
+ filled?: boolean;
1119
+ }) => react_jsx_runtime.JSX.Element;
1120
+
1073
1121
  /**
1074
1122
  * formatDate(date, type?, language?)
1075
1123
  * - language : fr/en/es/... (locale inferred), default "en"
@@ -1199,4 +1247,4 @@ declare const formatKM: (value: string | number | null | undefined) => string;
1199
1247
 
1200
1248
  declare const parseAmount: (value: string) => number | null;
1201
1249
 
1202
- export { Accordion, type AccordionItem, Avatar, Banner, type BannerAction, type BannerProps, Box, Bubble, Bulk, Button, Card, type CardProps, CardSkeleton, Checkbox, Col, Collapse, ColorPicker, DatePicker, type DatePickerProps, type DatePreset, Divider, Drawer, EmptyState, FileUploadZone, type FloatingAction, FloatingButton, type FloatingButtonProps, Grid, Icon, IconTabs, Image, Input, Link, List, ListItem, MetricCard, Modal, ModalConfirmation, MultiSelect, NewModal, Options, PageContainer, Pagination, Popover, ProgressBar, Radio, Row, Select, type SelectOption, type SelectProps, SkeletonRow, SliderInput, type SortOrder, Spinner, Stepper, Switch, Table, TableBody, TableCell, TableFooter, TableFooterCell, TableFooterRow, TableHeader, TableHeaderCell, type TableHeaderCellProps, TableHeaderRow, TableRow, Tabs, TagBubble, Text, Timeline, type TimelineItem, type ToastOptions, type ToastType, Toaster, Tooltip, addBusinessDays, appendCacheBuster, appendQueryParam, capitalizeFirstLetter, colors, easterDate, formatAddress, formatCityFromFormattedAddress, formatCityWithPostalCode, formatDate, formatDateWithTime, formatDistance, formatDuration, formatEuro, formatKM, formatLocality, formatName, formatNameWithInitial, formatPhoneNumber, formatPlate, formatPlateWithoutDashes, formatPostalCodeFromFormattedAddress, formatRegionCode, formatTime, formatVin, generateHexColor, getAvatarColor, getCleanFileName, getFileIconByMimeType, getFileKind, getFileNameFromUrl, getInitials, getMimeCategory, getRelativeTime, isHoliday, isSameDay, isolateCity, optimizeImage, parseAmount, parseIsoDate, toast, truncateFileName, truncateText };
1250
+ export { Accordion, type AccordionItem, Avatar, Banner, type BannerAction, type BannerProps, Box, Bubble, Bulk, Button, Card, type CardProps, CardSkeleton, Checkbox, Col, Collapse, ColorPicker, DatePicker, type DatePickerProps, type DatePreset, Divider, Drawer, EmptyState, FileUploadZone, type FloatingAction, FloatingButton, type FloatingButtonProps, Gantt, type GanttBand, type GanttBar, type GanttDay, GanttDot, type GanttProps, type GanttRow, GanttSwatch, Grid, Icon, IconTabs, Image, Input, Link, List, ListItem, MetricCard, Modal, ModalConfirmation, MultiSelect, NewModal, Options, PageContainer, Pagination, Popover, ProgressBar, Radio, Row, Select, type SelectOption, type SelectProps, SkeletonRow, SliderInput, type SortOrder, Spinner, Stepper, Switch, Table, TableBody, TableCell, TableFooter, TableFooterCell, TableFooterRow, TableHeader, TableHeaderCell, type TableHeaderCellProps, TableHeaderRow, TableRow, Tabs, TagBubble, Text, Timeline, type TimelineItem, type ToastOptions, type ToastType, Toaster, Tooltip, addBusinessDays, appendCacheBuster, appendQueryParam, capitalizeFirstLetter, colors, easterDate, formatAddress, formatCityFromFormattedAddress, formatCityWithPostalCode, formatDate, formatDateWithTime, formatDistance, formatDuration, formatEuro, formatKM, formatLocality, formatName, formatNameWithInitial, formatPhoneNumber, formatPlate, formatPlateWithoutDashes, formatPostalCodeFromFormattedAddress, formatRegionCode, formatTime, formatVin, generateHexColor, getAvatarColor, getCleanFileName, getFileIconByMimeType, getFileKind, getFileNameFromUrl, getInitials, getMimeCategory, getRelativeTime, isHoliday, isSameDay, isolateCity, optimizeImage, parseAmount, parseIsoDate, toast, truncateFileName, truncateText };
package/dist/index.d.ts CHANGED
@@ -774,6 +774,8 @@ interface TabItem {
774
774
  disabled?: boolean;
775
775
  dot?: boolean;
776
776
  dotColor?: string;
777
+ bubbleActive?: boolean;
778
+ bubbleNumber?: number | null;
777
779
  }
778
780
  type TabsVariant = 'line' | 'pills';
779
781
  interface TabsProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {
@@ -1070,6 +1072,52 @@ interface TimelineProps {
1070
1072
  */
1071
1073
  declare const Timeline: ({ items, lineColor, emptyLabel, }: TimelineProps) => react_jsx_runtime.JSX.Element;
1072
1074
 
1075
+ interface GanttDay {
1076
+ key: string | number;
1077
+ leftPct: number;
1078
+ widthPct: number;
1079
+ label: string;
1080
+ }
1081
+ interface GanttBar {
1082
+ leftPct: number;
1083
+ widthPct: number;
1084
+ color: string;
1085
+ textColor?: string;
1086
+ label?: string | null;
1087
+ title?: string;
1088
+ dashed?: boolean;
1089
+ }
1090
+ interface GanttRow<T = unknown> {
1091
+ key: string | number;
1092
+ bar?: GanttBar | null;
1093
+ data: T;
1094
+ }
1095
+ interface GanttBand {
1096
+ key: string | number;
1097
+ leftPct: number;
1098
+ widthPct: number;
1099
+ title?: string;
1100
+ }
1101
+ interface GanttProps<T = unknown> {
1102
+ days: GanttDay[];
1103
+ rows: GanttRow<T>[];
1104
+ bands?: GanttBand[];
1105
+ labelHeader?: string;
1106
+ renderLabel: (row: GanttRow<T>, index: number) => ReactNode;
1107
+ onRowClick?: (row: GanttRow<T>, index: number) => void;
1108
+ labelWidth?: number;
1109
+ rowHeight?: number;
1110
+ maxHeight?: number;
1111
+ }
1112
+ declare const Gantt: <T>({ days, rows, bands, labelHeader, renderLabel, onRowClick, labelWidth, rowHeight, maxHeight, }: GanttProps<T>) => react_jsx_runtime.JSX.Element;
1113
+ declare const GanttDot: ({ color }: {
1114
+ color: string;
1115
+ }) => react_jsx_runtime.JSX.Element;
1116
+ declare const GanttSwatch: ({ color, filled, }: {
1117
+ color: string;
1118
+ filled?: boolean;
1119
+ }) => react_jsx_runtime.JSX.Element;
1120
+
1073
1121
  /**
1074
1122
  * formatDate(date, type?, language?)
1075
1123
  * - language : fr/en/es/... (locale inferred), default "en"
@@ -1199,4 +1247,4 @@ declare const formatKM: (value: string | number | null | undefined) => string;
1199
1247
 
1200
1248
  declare const parseAmount: (value: string) => number | null;
1201
1249
 
1202
- export { Accordion, type AccordionItem, Avatar, Banner, type BannerAction, type BannerProps, Box, Bubble, Bulk, Button, Card, type CardProps, CardSkeleton, Checkbox, Col, Collapse, ColorPicker, DatePicker, type DatePickerProps, type DatePreset, Divider, Drawer, EmptyState, FileUploadZone, type FloatingAction, FloatingButton, type FloatingButtonProps, Grid, Icon, IconTabs, Image, Input, Link, List, ListItem, MetricCard, Modal, ModalConfirmation, MultiSelect, NewModal, Options, PageContainer, Pagination, Popover, ProgressBar, Radio, Row, Select, type SelectOption, type SelectProps, SkeletonRow, SliderInput, type SortOrder, Spinner, Stepper, Switch, Table, TableBody, TableCell, TableFooter, TableFooterCell, TableFooterRow, TableHeader, TableHeaderCell, type TableHeaderCellProps, TableHeaderRow, TableRow, Tabs, TagBubble, Text, Timeline, type TimelineItem, type ToastOptions, type ToastType, Toaster, Tooltip, addBusinessDays, appendCacheBuster, appendQueryParam, capitalizeFirstLetter, colors, easterDate, formatAddress, formatCityFromFormattedAddress, formatCityWithPostalCode, formatDate, formatDateWithTime, formatDistance, formatDuration, formatEuro, formatKM, formatLocality, formatName, formatNameWithInitial, formatPhoneNumber, formatPlate, formatPlateWithoutDashes, formatPostalCodeFromFormattedAddress, formatRegionCode, formatTime, formatVin, generateHexColor, getAvatarColor, getCleanFileName, getFileIconByMimeType, getFileKind, getFileNameFromUrl, getInitials, getMimeCategory, getRelativeTime, isHoliday, isSameDay, isolateCity, optimizeImage, parseAmount, parseIsoDate, toast, truncateFileName, truncateText };
1250
+ export { Accordion, type AccordionItem, Avatar, Banner, type BannerAction, type BannerProps, Box, Bubble, Bulk, Button, Card, type CardProps, CardSkeleton, Checkbox, Col, Collapse, ColorPicker, DatePicker, type DatePickerProps, type DatePreset, Divider, Drawer, EmptyState, FileUploadZone, type FloatingAction, FloatingButton, type FloatingButtonProps, Gantt, type GanttBand, type GanttBar, type GanttDay, GanttDot, type GanttProps, type GanttRow, GanttSwatch, Grid, Icon, IconTabs, Image, Input, Link, List, ListItem, MetricCard, Modal, ModalConfirmation, MultiSelect, NewModal, Options, PageContainer, Pagination, Popover, ProgressBar, Radio, Row, Select, type SelectOption, type SelectProps, SkeletonRow, SliderInput, type SortOrder, Spinner, Stepper, Switch, Table, TableBody, TableCell, TableFooter, TableFooterCell, TableFooterRow, TableHeader, TableHeaderCell, type TableHeaderCellProps, TableHeaderRow, TableRow, Tabs, TagBubble, Text, Timeline, type TimelineItem, type ToastOptions, type ToastType, Toaster, Tooltip, addBusinessDays, appendCacheBuster, appendQueryParam, capitalizeFirstLetter, colors, easterDate, formatAddress, formatCityFromFormattedAddress, formatCityWithPostalCode, formatDate, formatDateWithTime, formatDistance, formatDuration, formatEuro, formatKM, formatLocality, formatName, formatNameWithInitial, formatPhoneNumber, formatPlate, formatPlateWithoutDashes, formatPostalCodeFromFormattedAddress, formatRegionCode, formatTime, formatVin, generateHexColor, getAvatarColor, getCleanFileName, getFileIconByMimeType, getFileKind, getFileNameFromUrl, getInitials, getMimeCategory, getRelativeTime, isHoliday, isSameDay, isolateCity, optimizeImage, parseAmount, parseIsoDate, toast, truncateFileName, truncateText };
package/dist/index.js CHANGED
@@ -78,6 +78,9 @@ __export(index_exports, {
78
78
  EmptyState: () => EmptyState,
79
79
  FileUploadZone: () => FileUploadZone,
80
80
  FloatingButton: () => FloatingButton,
81
+ Gantt: () => Gantt,
82
+ GanttDot: () => GanttDot,
83
+ GanttSwatch: () => GanttSwatch,
81
84
  Grid: () => Grid,
82
85
  Icon: () => Icon,
83
86
  IconTabs: () => IconTabs,
@@ -4225,6 +4228,15 @@ var TabDot = import_styled_components40.default.span`
4225
4228
  flex: none;
4226
4229
  background: ${(p) => p.$color || colors.red_950};
4227
4230
  `;
4231
+ var TabBubble = (0, import_styled_components40.default)(Bubble)`
4232
+ display: flex;
4233
+ align-items: center;
4234
+ justify-content: center;
4235
+ min-width: 20px;
4236
+ height: 18px;
4237
+ font-size: 10px;
4238
+ line-height: 1;
4239
+ `;
4228
4240
  var Tab = (_a) => {
4229
4241
  var _b = _a, {
4230
4242
  id,
@@ -4327,7 +4339,17 @@ var Tabs = (_a) => {
4327
4339
  innerRef: setTabRef(it.id),
4328
4340
  children: [
4329
4341
  it.label,
4330
- it.dot && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TabDot, { $color: it.dotColor })
4342
+ it.dot && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TabDot, { $color: it.dotColor }),
4343
+ Boolean(it.bubbleActive || it.bubbleNumber) && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
4344
+ TabBubble,
4345
+ {
4346
+ size: "xs",
4347
+ color: colors.white,
4348
+ backgroundColor: colors.red_950,
4349
+ padding: "0 6px",
4350
+ children: it.bubbleNumber
4351
+ }
4352
+ )
4331
4353
  ]
4332
4354
  },
4333
4355
  it.id
@@ -6108,6 +6130,121 @@ var Timeline = ({
6108
6130
  }) });
6109
6131
  };
6110
6132
 
6133
+ // src/Components/Gantt/Gantt.tsx
6134
+ var import_jsx_runtime63 = require("react/jsx-runtime");
6135
+ var Gantt = ({
6136
+ days,
6137
+ rows,
6138
+ bands = [],
6139
+ labelHeader,
6140
+ renderLabel,
6141
+ onRowClick,
6142
+ labelWidth = 220,
6143
+ rowHeight = 44,
6144
+ maxHeight = 380
6145
+ }) => {
6146
+ const bodyHeight = rows.length * rowHeight;
6147
+ const clickable = Boolean(onRowClick);
6148
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
6149
+ "div",
6150
+ {
6151
+ className: "dz-gantt",
6152
+ style: {
6153
+ ["--dz-gantt-label-w"]: `${labelWidth}px`,
6154
+ ["--dz-gantt-row-h"]: `${rowHeight}px`,
6155
+ ["--dz-gantt-max-h"]: `${maxHeight}px`
6156
+ },
6157
+ children: [
6158
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "dz-gantt__axis", children: [
6159
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "dz-gantt__axis-label", children: labelHeader }),
6160
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "dz-gantt__axis-days", children: days.map((day) => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
6161
+ "div",
6162
+ {
6163
+ className: "dz-gantt__axis-day",
6164
+ style: { left: `${day.leftPct}%`, width: `${day.widthPct}%` },
6165
+ children: day.label
6166
+ },
6167
+ day.key
6168
+ )) })
6169
+ ] }),
6170
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "dz-gantt__body", children: [
6171
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "dz-gantt__labels", children: rows.map((row, i) => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
6172
+ "div",
6173
+ {
6174
+ className: [
6175
+ "dz-gantt__labelrow",
6176
+ i % 2 === 1 ? "dz-gantt__labelrow--alt" : "",
6177
+ clickable ? "dz-gantt__labelrow--clickable" : ""
6178
+ ].filter(Boolean).join(" "),
6179
+ onClick: onRowClick ? () => onRowClick(row, i) : void 0,
6180
+ children: renderLabel(row, i)
6181
+ },
6182
+ row.key
6183
+ )) }),
6184
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "dz-gantt__timeline-col", children: /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "dz-gantt__timeline", style: { height: bodyHeight }, children: [
6185
+ days.map((day, i) => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
6186
+ "div",
6187
+ {
6188
+ className: `dz-gantt__day ${i % 2 === 1 ? "dz-gantt__day--alt" : ""}`,
6189
+ style: { left: `${day.leftPct}%`, width: `${day.widthPct}%` }
6190
+ },
6191
+ day.key
6192
+ )),
6193
+ bands.map((band) => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
6194
+ "div",
6195
+ {
6196
+ className: "dz-gantt__band",
6197
+ title: band.title,
6198
+ style: { left: `${band.leftPct}%`, width: `${band.widthPct}%` }
6199
+ },
6200
+ band.key
6201
+ )),
6202
+ rows.map((row, i) => {
6203
+ var _a, _b, _c;
6204
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
6205
+ "div",
6206
+ {
6207
+ className: "dz-gantt__track",
6208
+ style: { top: i * rowHeight, height: rowHeight },
6209
+ children: row.bar && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
6210
+ "div",
6211
+ {
6212
+ className: `dz-gantt__bar ${row.bar.dashed ? "dz-gantt__bar--approx" : ""}`,
6213
+ title: (_b = (_a = row.bar.title) != null ? _a : row.bar.label) != null ? _b : void 0,
6214
+ style: {
6215
+ left: `${row.bar.leftPct}%`,
6216
+ width: `${row.bar.widthPct}%`,
6217
+ ["--dz-gantt-bar-color"]: row.bar.color,
6218
+ ["--dz-gantt-bar-text"]: (_c = row.bar.textColor) != null ? _c : "#fff"
6219
+ },
6220
+ children: row.bar.label && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { className: "dz-gantt__bar-label", children: row.bar.label })
6221
+ }
6222
+ )
6223
+ },
6224
+ row.key
6225
+ );
6226
+ })
6227
+ ] }) })
6228
+ ] })
6229
+ ]
6230
+ }
6231
+ );
6232
+ };
6233
+ var GanttDot = ({ color }) => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { className: "dz-gantt__dot", style: { background: color } });
6234
+ var GanttSwatch = ({
6235
+ color,
6236
+ filled = true
6237
+ }) => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
6238
+ "span",
6239
+ {
6240
+ className: "dz-gantt__swatch",
6241
+ style: {
6242
+ background: filled ? color : "transparent",
6243
+ border: `1.5px solid ${color}`
6244
+ }
6245
+ }
6246
+ );
6247
+
6111
6248
  // src/data/globalMethods.ts
6112
6249
  var formatDate = (dateString, type = "date", language = "en") => {
6113
6250
  if (!dateString) return "";
@@ -6762,6 +6899,9 @@ var parseAmount = (value) => {
6762
6899
  EmptyState,
6763
6900
  FileUploadZone,
6764
6901
  FloatingButton,
6902
+ Gantt,
6903
+ GanttDot,
6904
+ GanttSwatch,
6765
6905
  Grid,
6766
6906
  Icon,
6767
6907
  IconTabs,
package/dist/index.mjs CHANGED
@@ -4104,6 +4104,15 @@ var TabDot = styled40.span`
4104
4104
  flex: none;
4105
4105
  background: ${(p) => p.$color || colors.red_950};
4106
4106
  `;
4107
+ var TabBubble = styled40(Bubble)`
4108
+ display: flex;
4109
+ align-items: center;
4110
+ justify-content: center;
4111
+ min-width: 20px;
4112
+ height: 18px;
4113
+ font-size: 10px;
4114
+ line-height: 1;
4115
+ `;
4107
4116
  var Tab = (_a) => {
4108
4117
  var _b = _a, {
4109
4118
  id,
@@ -4206,7 +4215,17 @@ var Tabs = (_a) => {
4206
4215
  innerRef: setTabRef(it.id),
4207
4216
  children: [
4208
4217
  it.label,
4209
- it.dot && /* @__PURE__ */ jsx47(TabDot, { $color: it.dotColor })
4218
+ it.dot && /* @__PURE__ */ jsx47(TabDot, { $color: it.dotColor }),
4219
+ Boolean(it.bubbleActive || it.bubbleNumber) && /* @__PURE__ */ jsx47(
4220
+ TabBubble,
4221
+ {
4222
+ size: "xs",
4223
+ color: colors.white,
4224
+ backgroundColor: colors.red_950,
4225
+ padding: "0 6px",
4226
+ children: it.bubbleNumber
4227
+ }
4228
+ )
4210
4229
  ]
4211
4230
  },
4212
4231
  it.id
@@ -5992,6 +6011,121 @@ var Timeline = ({
5992
6011
  }) });
5993
6012
  };
5994
6013
 
6014
+ // src/Components/Gantt/Gantt.tsx
6015
+ import { jsx as jsx63, jsxs as jsxs36 } from "react/jsx-runtime";
6016
+ var Gantt = ({
6017
+ days,
6018
+ rows,
6019
+ bands = [],
6020
+ labelHeader,
6021
+ renderLabel,
6022
+ onRowClick,
6023
+ labelWidth = 220,
6024
+ rowHeight = 44,
6025
+ maxHeight = 380
6026
+ }) => {
6027
+ const bodyHeight = rows.length * rowHeight;
6028
+ const clickable = Boolean(onRowClick);
6029
+ return /* @__PURE__ */ jsxs36(
6030
+ "div",
6031
+ {
6032
+ className: "dz-gantt",
6033
+ style: {
6034
+ ["--dz-gantt-label-w"]: `${labelWidth}px`,
6035
+ ["--dz-gantt-row-h"]: `${rowHeight}px`,
6036
+ ["--dz-gantt-max-h"]: `${maxHeight}px`
6037
+ },
6038
+ children: [
6039
+ /* @__PURE__ */ jsxs36("div", { className: "dz-gantt__axis", children: [
6040
+ /* @__PURE__ */ jsx63("div", { className: "dz-gantt__axis-label", children: labelHeader }),
6041
+ /* @__PURE__ */ jsx63("div", { className: "dz-gantt__axis-days", children: days.map((day) => /* @__PURE__ */ jsx63(
6042
+ "div",
6043
+ {
6044
+ className: "dz-gantt__axis-day",
6045
+ style: { left: `${day.leftPct}%`, width: `${day.widthPct}%` },
6046
+ children: day.label
6047
+ },
6048
+ day.key
6049
+ )) })
6050
+ ] }),
6051
+ /* @__PURE__ */ jsxs36("div", { className: "dz-gantt__body", children: [
6052
+ /* @__PURE__ */ jsx63("div", { className: "dz-gantt__labels", children: rows.map((row, i) => /* @__PURE__ */ jsx63(
6053
+ "div",
6054
+ {
6055
+ className: [
6056
+ "dz-gantt__labelrow",
6057
+ i % 2 === 1 ? "dz-gantt__labelrow--alt" : "",
6058
+ clickable ? "dz-gantt__labelrow--clickable" : ""
6059
+ ].filter(Boolean).join(" "),
6060
+ onClick: onRowClick ? () => onRowClick(row, i) : void 0,
6061
+ children: renderLabel(row, i)
6062
+ },
6063
+ row.key
6064
+ )) }),
6065
+ /* @__PURE__ */ jsx63("div", { className: "dz-gantt__timeline-col", children: /* @__PURE__ */ jsxs36("div", { className: "dz-gantt__timeline", style: { height: bodyHeight }, children: [
6066
+ days.map((day, i) => /* @__PURE__ */ jsx63(
6067
+ "div",
6068
+ {
6069
+ className: `dz-gantt__day ${i % 2 === 1 ? "dz-gantt__day--alt" : ""}`,
6070
+ style: { left: `${day.leftPct}%`, width: `${day.widthPct}%` }
6071
+ },
6072
+ day.key
6073
+ )),
6074
+ bands.map((band) => /* @__PURE__ */ jsx63(
6075
+ "div",
6076
+ {
6077
+ className: "dz-gantt__band",
6078
+ title: band.title,
6079
+ style: { left: `${band.leftPct}%`, width: `${band.widthPct}%` }
6080
+ },
6081
+ band.key
6082
+ )),
6083
+ rows.map((row, i) => {
6084
+ var _a, _b, _c;
6085
+ return /* @__PURE__ */ jsx63(
6086
+ "div",
6087
+ {
6088
+ className: "dz-gantt__track",
6089
+ style: { top: i * rowHeight, height: rowHeight },
6090
+ children: row.bar && /* @__PURE__ */ jsx63(
6091
+ "div",
6092
+ {
6093
+ className: `dz-gantt__bar ${row.bar.dashed ? "dz-gantt__bar--approx" : ""}`,
6094
+ title: (_b = (_a = row.bar.title) != null ? _a : row.bar.label) != null ? _b : void 0,
6095
+ style: {
6096
+ left: `${row.bar.leftPct}%`,
6097
+ width: `${row.bar.widthPct}%`,
6098
+ ["--dz-gantt-bar-color"]: row.bar.color,
6099
+ ["--dz-gantt-bar-text"]: (_c = row.bar.textColor) != null ? _c : "#fff"
6100
+ },
6101
+ children: row.bar.label && /* @__PURE__ */ jsx63("span", { className: "dz-gantt__bar-label", children: row.bar.label })
6102
+ }
6103
+ )
6104
+ },
6105
+ row.key
6106
+ );
6107
+ })
6108
+ ] }) })
6109
+ ] })
6110
+ ]
6111
+ }
6112
+ );
6113
+ };
6114
+ var GanttDot = ({ color }) => /* @__PURE__ */ jsx63("span", { className: "dz-gantt__dot", style: { background: color } });
6115
+ var GanttSwatch = ({
6116
+ color,
6117
+ filled = true
6118
+ }) => /* @__PURE__ */ jsx63(
6119
+ "span",
6120
+ {
6121
+ className: "dz-gantt__swatch",
6122
+ style: {
6123
+ background: filled ? color : "transparent",
6124
+ border: `1.5px solid ${color}`
6125
+ }
6126
+ }
6127
+ );
6128
+
5995
6129
  // src/data/globalMethods.ts
5996
6130
  var formatDate = (dateString, type = "date", language = "en") => {
5997
6131
  if (!dateString) return "";
@@ -6645,6 +6779,9 @@ export {
6645
6779
  EmptyState,
6646
6780
  FileUploadZone,
6647
6781
  FloatingButton,
6782
+ Gantt,
6783
+ GanttDot,
6784
+ GanttSwatch,
6648
6785
  Grid,
6649
6786
  Icon,
6650
6787
  IconTabs,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "design-zystem",
3
- "version": "1.0.273",
3
+ "version": "1.0.275",
4
4
  "description": "A React design system of importable components",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",