@agregio-solutions/design-system 1.102.3 → 1.102.5

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.
@@ -1419,6 +1419,120 @@ export const GroupControlledExpansion: Story = {
1419
1419
  expect(canvas.getByText("Agrégat MA 1")).toBeInTheDocument();
1420
1420
  },
1421
1421
  };
1422
+
1423
+ export const Squared: Story = {
1424
+ args: {
1425
+ ...GroupExpandedLanePacking.args,
1426
+ shape: "squared",
1427
+ },
1428
+ play: async ({ canvasElement, mount }) => {
1429
+ MockDate.set("2024-01-01T12:00:00.000Z");
1430
+ await mount();
1431
+ const canvas = within(canvasElement);
1432
+ const user = userEvent.setup();
1433
+
1434
+ await user.click(canvas.getByText("PSN"));
1435
+ await canvas.findByText("Agrégat A");
1436
+
1437
+ expect(canvas.getByTestId("timeline")).toHaveAttribute(
1438
+ "data-shape",
1439
+ "squared",
1440
+ );
1441
+ expect(canvas.getByTestId("Sub-line - azure")).toHaveStyle({
1442
+ borderRadius: "2px",
1443
+ });
1444
+ },
1445
+ };
1446
+
1447
+ export const GridLinesHours: Story = {
1448
+ args: {
1449
+ ...GroupExpandedLanePacking.args,
1450
+ showGridLines: true,
1451
+ },
1452
+ play: async ({ canvasElement, mount }) => {
1453
+ MockDate.set("2024-01-01T12:00:00.000Z");
1454
+ await mount();
1455
+ const canvas = within(canvasElement);
1456
+ const user = userEvent.setup();
1457
+
1458
+ await user.click(canvas.getByText("PSN"));
1459
+ await canvas.findByText("Agrégat A");
1460
+
1461
+ // One line per hour boundary, both range edges excluded.
1462
+ expect(
1463
+ within(canvas.getByTestId("timeline-grid-lines")).getAllByTestId(
1464
+ /^grid-line-/,
1465
+ ),
1466
+ ).toHaveLength(23);
1467
+
1468
+ // A block starting at 10:00 is flush against the 10:00 line.
1469
+ const gridLine = canvas.getByTestId("grid-line-2024-01-01T10:00:00.000Z");
1470
+ const block = canvas.getByTestId("Sub-line - azure");
1471
+ expect(
1472
+ Math.abs(
1473
+ gridLine.getBoundingClientRect().right -
1474
+ block.getBoundingClientRect().left,
1475
+ ),
1476
+ ).toBeLessThanOrEqual(1);
1477
+ },
1478
+ };
1479
+
1480
+ export const GridLinesWeek: Story = {
1481
+ args: {
1482
+ ...Week.args,
1483
+ showGridLines: true,
1484
+ },
1485
+ play: async ({ canvasElement, mount }) => {
1486
+ MockDate.set("2024-01-01T12:00:00.000Z");
1487
+ await mount();
1488
+ const canvas = within(canvasElement);
1489
+
1490
+ // Week mode: one line per day boundary over a 7-day range.
1491
+ expect(
1492
+ within(canvas.getByTestId("timeline-grid-lines")).getAllByTestId(
1493
+ /^grid-line-/,
1494
+ ),
1495
+ ).toHaveLength(6);
1496
+
1497
+ // A block starting on 02/01 at midnight is flush against that day's line.
1498
+ const gridLine = canvas.getByTestId("grid-line-2024-01-02T00:00:00.000Z");
1499
+ const block = canvas.getAllByTestId("block-2")[0];
1500
+ expect(
1501
+ Math.abs(
1502
+ gridLine.getBoundingClientRect().right -
1503
+ block.getBoundingClientRect().left,
1504
+ ),
1505
+ ).toBeLessThanOrEqual(1);
1506
+ },
1507
+ };
1508
+
1509
+ export const GridLinesMonth: Story = {
1510
+ args: {
1511
+ ...Month.args,
1512
+ showGridLines: true,
1513
+ },
1514
+ play: async ({ canvasElement, mount }) => {
1515
+ MockDate.set("2024-01-11T12:00:00.000Z");
1516
+ await mount();
1517
+ const canvas = within(canvasElement);
1518
+
1519
+ // Month mode: still one line per day, 31 days means 30 inner boundaries.
1520
+ expect(
1521
+ within(canvas.getByTestId("timeline-grid-lines")).getAllByTestId(
1522
+ /^grid-line-/,
1523
+ ),
1524
+ ).toHaveLength(30);
1525
+
1526
+ const gridLine = canvas.getByTestId("grid-line-2024-01-10T00:00:00.000Z");
1527
+ const block = canvas.getAllByTestId("block-2")[0];
1528
+ expect(
1529
+ Math.abs(
1530
+ gridLine.getBoundingClientRect().right -
1531
+ block.getBoundingClientRect().left,
1532
+ ),
1533
+ ).toBeLessThanOrEqual(1);
1534
+ },
1535
+ };
1422
1536
  ```
1423
1537
 
1424
1538
  ## Developer notes
@@ -4,4 +4,4 @@ export declare const CoreTextInput: import('styled-components/dist/types').IStyl
4
4
  }) => import('react').CSSProperties | undefined) | undefined;
5
5
  }, {
6
6
  hasIcon: boolean;
7
- }>> & string & Omit<(props: import('react-aria-components').InputProps & React.RefAttributes<HTMLInputElement>) => React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | null, keyof import('react').Component<any, {}, any>>;
7
+ }>> & string & Omit<(props: import('react-aria-components').InputProps & React.RefAttributes<HTMLInputElement>) => React.ReactElement | null, keyof import('react').Component<any, {}, any>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agregio-solutions/design-system",
3
- "version": "1.102.3",
3
+ "version": "1.102.5",
4
4
  "description": "React Component library and Storybook that is part of the Design System for Agregio Solutions",
5
5
  "type": "module",
6
6
  "module": "dist/design-system.js",
@@ -87,13 +87,12 @@
87
87
  "typescript-eslint": "8.70.0",
88
88
  "vite": "8.3.0",
89
89
  "vite-plugin-dts": "5.1.0",
90
- "vite-tsconfig-paths": "6.1.1",
91
90
  "vitest": "4.1.11"
92
91
  },
93
92
  "dependencies": {
94
93
  "clsx": "2.1.1",
95
94
  "normalize.css": "8.0.1",
96
- "react-aria-components": "1.17.0",
95
+ "react-aria-components": "1.21.1",
97
96
  "sonner": "2.0.8",
98
97
  "styled-components": "6.5.3"
99
98
  },