@luscii-healthtech/web-ui 42.8.7 → 42.9.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/index.development.js +154 -0
- package/dist/index.development.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/src/components/RangeCoverage/RangeCoverage.d.ts +56 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/stories/RangeCoverage.stories.d.ts +24 -0
- package/dist/web-ui-tailwind.css +2 -0
- package/dist/web-ui.esm.js +1 -1
- package/dist/web-ui.esm.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { type FC } from "react";
|
|
2
|
+
type Color = string | readonly [string, string];
|
|
3
|
+
export interface RangeCoverageSection {
|
|
4
|
+
from: number;
|
|
5
|
+
to: number;
|
|
6
|
+
color: Color;
|
|
7
|
+
}
|
|
8
|
+
export interface Props {
|
|
9
|
+
/**
|
|
10
|
+
* Each section defines a colored range within the overall start-end range.
|
|
11
|
+
*/
|
|
12
|
+
sections: RangeCoverageSection[];
|
|
13
|
+
/**
|
|
14
|
+
* Optional custom tick marks to display along the range bar, between the
|
|
15
|
+
* start and end values.
|
|
16
|
+
*/
|
|
17
|
+
ticks?: number[];
|
|
18
|
+
/**
|
|
19
|
+
* The start of the range, which will be shown at the left side of the bar.
|
|
20
|
+
*/
|
|
21
|
+
start: number;
|
|
22
|
+
/**
|
|
23
|
+
* The end of the range, which will be shown at the right side of the bar.
|
|
24
|
+
*/
|
|
25
|
+
end: number;
|
|
26
|
+
title?: string;
|
|
27
|
+
className?: string;
|
|
28
|
+
legendSwatches?: Array<{
|
|
29
|
+
label: string;
|
|
30
|
+
/**
|
|
31
|
+
* @example "red" // single color
|
|
32
|
+
* @example ["green", "lightgreen"] // striped
|
|
33
|
+
*/
|
|
34
|
+
color: Color;
|
|
35
|
+
}>;
|
|
36
|
+
}
|
|
37
|
+
export declare const COLOR_RED = "var(--ui-color-red-800)";
|
|
38
|
+
export declare const COLOR_AMBER = "var(--ui-color-amber-700)";
|
|
39
|
+
export declare const COLOR_GREY_DARK = "var(--ui-color-slate-700)";
|
|
40
|
+
export declare const COLOR_GREY_LIGHT = "var(--ui-color-slate-300)";
|
|
41
|
+
export declare const COLOR_BLUE = "var(--ui-color-blue-200)";
|
|
42
|
+
export declare const RangeCoverage: FC<Props> & {
|
|
43
|
+
Colors: {
|
|
44
|
+
RED: string;
|
|
45
|
+
AMBER: string;
|
|
46
|
+
GREY_DARK: string;
|
|
47
|
+
GREY_LIGHT: string;
|
|
48
|
+
BLUE: string;
|
|
49
|
+
};
|
|
50
|
+
generateIntermediateTicks: (args: {
|
|
51
|
+
start: number;
|
|
52
|
+
end: number;
|
|
53
|
+
step: number;
|
|
54
|
+
}) => number[];
|
|
55
|
+
};
|
|
56
|
+
export {};
|
package/dist/src/index.d.ts
CHANGED
|
@@ -119,6 +119,7 @@ export { StyledUnorderedList } from "./components/StyledLists/StyledUnorderedLis
|
|
|
119
119
|
export { StyledOrderedList } from "./components/StyledLists/StyledOrderedList";
|
|
120
120
|
export { HoverIndicatorControl } from "./components/HoverIndicatorControl/HoverIndicatorControl";
|
|
121
121
|
export { Collapse } from "./components/Collapse/Collapse";
|
|
122
|
+
export { RangeCoverage } from "./components/RangeCoverage/RangeCoverage";
|
|
122
123
|
export { Skeleton } from "./components/Skeleton/Skeleton";
|
|
123
124
|
export { DetailsDisclosure } from "./components/DetailsDisclosure/DetailsDisclosure";
|
|
124
125
|
export { ModalDialog } from "./components/ModalDialog/ModalDialog";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type StoryObj } from "@storybook/react-webpack5";
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: import("react").FC<import("../src/components/RangeCoverage/RangeCoverage").Props> & {
|
|
5
|
+
Colors: {
|
|
6
|
+
RED: string;
|
|
7
|
+
AMBER: string;
|
|
8
|
+
GREY_DARK: string;
|
|
9
|
+
GREY_LIGHT: string;
|
|
10
|
+
BLUE: string;
|
|
11
|
+
};
|
|
12
|
+
generateIntermediateTicks: (args: {
|
|
13
|
+
start: number;
|
|
14
|
+
end: number;
|
|
15
|
+
step: number;
|
|
16
|
+
}) => number[];
|
|
17
|
+
};
|
|
18
|
+
parameters: {};
|
|
19
|
+
};
|
|
20
|
+
export default meta;
|
|
21
|
+
type Story = StoryObj<typeof meta>;
|
|
22
|
+
export declare const Base: Story;
|
|
23
|
+
export declare const Reversed: Story;
|
|
24
|
+
export declare const EdgeCases: Story;
|
package/dist/web-ui-tailwind.css
CHANGED
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
--ui-color-amber-500: #f59e0b;
|
|
18
18
|
--ui-color-amber-700: #b45309;
|
|
19
19
|
--ui-color-amber-800: #92400e;
|
|
20
|
+
--ui-color-amber-900: #78350f;
|
|
20
21
|
--ui-color-yellow-200: oklch(94.5% 0.129 101.54);
|
|
21
22
|
--ui-color-yellow-400: oklch(85.2% 0.199 91.936);
|
|
22
23
|
--ui-color-yellow-800: oklch(47.6% 0.114 61.907);
|
|
@@ -35,6 +36,7 @@
|
|
|
35
36
|
--ui-color-blue-800: #1e40af;
|
|
36
37
|
--ui-color-blue-900: #1e3a8a;
|
|
37
38
|
--ui-color-purple-400: oklch(71.4% 0.203 305.504);
|
|
39
|
+
--ui-color-purple-900: oklch(38.1% 0.176 304.987);
|
|
38
40
|
--ui-color-pink-400: oklch(71.8% 0.202 349.761);
|
|
39
41
|
--ui-color-slate-50: #f8fafc;
|
|
40
42
|
--ui-color-slate-100: #f1f5f9;
|