@agregio-solutions/design-system 1.101.3 → 1.102.0
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/design-system.cjs +410 -388
- package/dist/design-system.js +5101 -5049
- package/dist/packages/components/Timeline/Timeline.d.ts +13 -1
- package/dist/packages/components/Timeline/Timeline.styled.d.ts +12 -0
- package/dist/packages/components/Timeline/utils/getGridLineDates/getGridLineDates.d.ts +11 -0
- package/dist/packages/components/Timeline/utils/getGridLineDates/getGridLineDates.test.d.ts +1 -0
- package/dist/packages/components/Timeline/utils/getUnitMode/getUnitMode.d.ts +9 -0
- package/package.json +1 -1
|
@@ -29,6 +29,18 @@ export type TimelineProps = {
|
|
|
29
29
|
* collapsed, so it can be passed straight to a state setter.
|
|
30
30
|
*/
|
|
31
31
|
onExpandedGroupsChange?: (expandedGroups: ExpandedGroups) => void;
|
|
32
|
+
/**
|
|
33
|
+
* Corner style of the timeline blocks. "rounded" keeps the pill shape,
|
|
34
|
+
* "squared" applies a minimal radius.
|
|
35
|
+
* @default "rounded"
|
|
36
|
+
*/
|
|
37
|
+
shape?: "rounded" | "squared";
|
|
38
|
+
/**
|
|
39
|
+
* Draw a dashed vertical line over the whole timeline at every unit boundary
|
|
40
|
+
* of the range header (each hour, or each day).
|
|
41
|
+
* @default false
|
|
42
|
+
*/
|
|
43
|
+
showGridLines?: boolean;
|
|
32
44
|
/**
|
|
33
45
|
* The class name of the timeline
|
|
34
46
|
*/
|
|
@@ -38,4 +50,4 @@ export type TimelineProps = {
|
|
|
38
50
|
*/
|
|
39
51
|
style?: CSSProperties;
|
|
40
52
|
};
|
|
41
|
-
export default function Timeline({ emptyPlaceholder, lines, startDate, endDate, expandedGroups, onExpandedGroupsChange, ...props }: TimelineProps): import("react").JSX.Element;
|
|
53
|
+
export default function Timeline({ emptyPlaceholder, lines, startDate, endDate, expandedGroups, onExpandedGroupsChange, shape, showGridLines, ...props }: TimelineProps): import("react").JSX.Element;
|
|
@@ -10,3 +10,15 @@ export declare const LinesContainer: import('@emotion/styled').StyledComponent<{
|
|
|
10
10
|
theme?: import('@emotion/react').Theme;
|
|
11
11
|
as?: React.ElementType;
|
|
12
12
|
}, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
13
|
+
/**
|
|
14
|
+
* Overlays the plotting area only — the names column is excluded, so its width
|
|
15
|
+
* matches the one every line positions its blocks against.
|
|
16
|
+
*/
|
|
17
|
+
export declare const GridLines: import('@emotion/styled').StyledComponent<{
|
|
18
|
+
theme?: import('@emotion/react').Theme;
|
|
19
|
+
as?: React.ElementType;
|
|
20
|
+
}, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
21
|
+
export declare const GridLine: import('@emotion/styled').StyledComponent<{
|
|
22
|
+
theme?: import('@emotion/react').Theme;
|
|
23
|
+
as?: React.ElementType;
|
|
24
|
+
}, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The dates of every unit boundary strictly inside the timeline range, in the
|
|
3
|
+
* same unit as the timeline range header (hours or days).
|
|
4
|
+
*
|
|
5
|
+
* Boundaries are counted from the range start, so a line always falls on a
|
|
6
|
+
* block edge. They match the header cell borders as well, except when the range
|
|
7
|
+
* is not a whole number of units: the header rounds its cell count up, this
|
|
8
|
+
* does not. The range edges are left out: they already carry the timeline
|
|
9
|
+
* borders.
|
|
10
|
+
*/
|
|
11
|
+
export declare function getGridLineDates(startDate: Date, endDate: Date): Date[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type UnitsMode = "hours" | "week" | "two-weeks" | "month";
|
|
2
|
+
export declare const ONE_HOUR_IN_MS: number;
|
|
3
|
+
export declare const ONE_DAY_IN_MS: number;
|
|
4
|
+
export declare const ONE_WEEK_IN_MS: number;
|
|
5
|
+
export declare const ONE_TWO_WEEKS_IN_MS: number;
|
|
6
|
+
/**
|
|
7
|
+
* The unit the timeline range is split into, derived from its duration.
|
|
8
|
+
*/
|
|
9
|
+
export declare function getUnitMode(datesDiffInMs: number): UnitsMode;
|
package/package.json
CHANGED