@luscii-healthtech/web-ui 59.1.0 → 59.2.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/esm/components/RangeTriggerIcon/RangeTriggerIcon.js +45 -0
- package/dist/esm/components/RangeTriggerIcon/RangeTriggerIcon.js.map +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.development.js +41 -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/RangeTriggerIcon/RangeTriggerIcon.d.ts +39 -0
- package/dist/src/components/RangeTriggerIcon/index.d.ts +1 -0
- package/dist/src/generated/components/RangeTriggerIcon/RangeTriggerIcon.d.ts +39 -0
- package/dist/src/generated/components/RangeTriggerIcon/index.d.ts +1 -0
- package/dist/src/generated/index.d.ts +1 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/stories/RangeTriggerIcon.stories.d.ts +56 -0
- package/dist/web-ui-tailwind.css +8 -0
- package/package.json +1 -1
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { ComponentPropsWithoutRef, FC } from "react";
|
|
2
|
+
export declare const RANGE_TRIGGER_ICON_SHAPES: readonly ["upper", "lower", "middle", "full", "exact"];
|
|
3
|
+
export type RangeTriggerIconShape = (typeof RANGE_TRIGGER_ICON_SHAPES)[number];
|
|
4
|
+
export declare const RANGE_TRIGGER_ICON_COLORS: readonly ["alerts-high-salmon", "alerts-high-crimson", "alerts-high-red", "alerts-medium-sun", "alerts-medium-oak", "alerts-medium-amber", "alerts-low-mint", "alerts-low-leaf", "alerts-low-green", "alerts-neutral-fog", "alerts-neutral-neutral", "alerts-neutral-graphite"];
|
|
5
|
+
/**
|
|
6
|
+
* One of the alert colours of a priority (`alerts-<priority>-<name>`, from
|
|
7
|
+
* `color/icon/alerts/<priority>/<name>`).
|
|
8
|
+
*/
|
|
9
|
+
export type RangeTriggerIconColor = (typeof RANGE_TRIGGER_ICON_COLORS)[number];
|
|
10
|
+
export type RangeTriggerIconProps = Omit<ComponentPropsWithoutRef<"svg">, "color" | "children" | "fill" | "role" | "aria-hidden"> & {
|
|
11
|
+
/**
|
|
12
|
+
* Which part of the track the range covers: its `upper` or `lower` end, the
|
|
13
|
+
* `middle`, the `full` track, or `exact`ly one value (a dot in the middle).
|
|
14
|
+
*/
|
|
15
|
+
shape: RangeTriggerIconShape;
|
|
16
|
+
/**
|
|
17
|
+
* The colour of the range, one of the design system's alert colours.
|
|
18
|
+
* Without it, the range is brand primary (`color/icon/brand/primary/default`).
|
|
19
|
+
* The track's colour isn't configurable.
|
|
20
|
+
*/
|
|
21
|
+
color?: RangeTriggerIconColor;
|
|
22
|
+
/**
|
|
23
|
+
* Shows the range in the disabled colour, whatever its `color`.
|
|
24
|
+
* @default false
|
|
25
|
+
*/
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Shows which part of a range triggers an alert: a 40 × 24 track with the
|
|
30
|
+
* range drawn on it.
|
|
31
|
+
*
|
|
32
|
+
* Like other icons, it's decorative and hidden from assistive technology
|
|
33
|
+
* unless it has an accessible name (`aria-label` or `aria-labelledby`).
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
*
|
|
37
|
+
* <RangeTriggerIcon shape="upper" color="alerts-high-crimson" />
|
|
38
|
+
*/
|
|
39
|
+
export declare const RangeTriggerIcon: FC<RangeTriggerIconProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./RangeTriggerIcon";
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { ComponentPropsWithoutRef, FC } from "react";
|
|
2
|
+
export declare const RANGE_TRIGGER_ICON_SHAPES: readonly ["upper", "lower", "middle", "full", "exact"];
|
|
3
|
+
export type RangeTriggerIconShape = (typeof RANGE_TRIGGER_ICON_SHAPES)[number];
|
|
4
|
+
export declare const RANGE_TRIGGER_ICON_COLORS: readonly ["alerts-high-salmon", "alerts-high-crimson", "alerts-high-red", "alerts-medium-sun", "alerts-medium-oak", "alerts-medium-amber", "alerts-low-mint", "alerts-low-leaf", "alerts-low-green", "alerts-neutral-fog", "alerts-neutral-neutral", "alerts-neutral-graphite"];
|
|
5
|
+
/**
|
|
6
|
+
* One of the alert colours of a priority (`alerts-<priority>-<name>`, from
|
|
7
|
+
* `color/icon/alerts/<priority>/<name>`).
|
|
8
|
+
*/
|
|
9
|
+
export type RangeTriggerIconColor = (typeof RANGE_TRIGGER_ICON_COLORS)[number];
|
|
10
|
+
export type RangeTriggerIconProps = Omit<ComponentPropsWithoutRef<"svg">, "color" | "children" | "fill" | "role" | "aria-hidden"> & {
|
|
11
|
+
/**
|
|
12
|
+
* Which part of the track the range covers: its `upper` or `lower` end, the
|
|
13
|
+
* `middle`, the `full` track, or `exact`ly one value (a dot in the middle).
|
|
14
|
+
*/
|
|
15
|
+
shape: RangeTriggerIconShape;
|
|
16
|
+
/**
|
|
17
|
+
* The colour of the range, one of the design system's alert colours.
|
|
18
|
+
* Without it, the range is brand primary (`color/icon/brand/primary/default`).
|
|
19
|
+
* The track's colour isn't configurable.
|
|
20
|
+
*/
|
|
21
|
+
color?: RangeTriggerIconColor;
|
|
22
|
+
/**
|
|
23
|
+
* Shows the range in the disabled colour, whatever its `color`.
|
|
24
|
+
* @default false
|
|
25
|
+
*/
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Shows which part of a range triggers an alert: a 40 × 24 track with the
|
|
30
|
+
* range drawn on it.
|
|
31
|
+
*
|
|
32
|
+
* Like other icons, it's decorative and hidden from assistive technology
|
|
33
|
+
* unless it has an accessible name (`aria-label` or `aria-labelledby`).
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
*
|
|
37
|
+
* <RangeTriggerIcon shape="upper" color="alerts-high-crimson" />
|
|
38
|
+
*/
|
|
39
|
+
export declare const RangeTriggerIcon: FC<RangeTriggerIconProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./RangeTriggerIcon";
|
|
@@ -126,6 +126,7 @@ export { HoverIndicatorControl } from "./components/HoverIndicatorControl/HoverI
|
|
|
126
126
|
export { ActionController } from "./components/ActionController/ActionController";
|
|
127
127
|
export { Collapse } from "./components/Collapse/Collapse";
|
|
128
128
|
export { RangeCoverage } from "./components/RangeCoverage/RangeCoverage";
|
|
129
|
+
export { RangeTriggerIcon, type RangeTriggerIconProps, type RangeTriggerIconShape, type RangeTriggerIconColor, } from "./components/RangeTriggerIcon";
|
|
129
130
|
export { Skeleton } from "./components/Skeleton/Skeleton";
|
|
130
131
|
export { DetailsDisclosure } from "./components/DetailsDisclosure/DetailsDisclosure";
|
|
131
132
|
export { ModalDialog } from "./components/ModalDialog/ModalDialog";
|
package/dist/src/index.d.ts
CHANGED
|
@@ -126,6 +126,7 @@ export { HoverIndicatorControl } from "./components/HoverIndicatorControl/HoverI
|
|
|
126
126
|
export { ActionController } from "./components/ActionController/ActionController";
|
|
127
127
|
export { Collapse } from "./components/Collapse/Collapse";
|
|
128
128
|
export { RangeCoverage } from "./components/RangeCoverage/RangeCoverage";
|
|
129
|
+
export { RangeTriggerIcon, type RangeTriggerIconProps, type RangeTriggerIconShape, type RangeTriggerIconColor, } from "./components/RangeTriggerIcon";
|
|
129
130
|
export { Skeleton } from "./components/Skeleton/Skeleton";
|
|
130
131
|
export { DetailsDisclosure } from "./components/DetailsDisclosure/DetailsDisclosure";
|
|
131
132
|
export { ModalDialog } from "./components/ModalDialog/ModalDialog";
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { type StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import RangeTriggerIconDocumentation from "./RangeTriggerIcon.docs.mdx";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: import("react").FC<import("../src").RangeTriggerIconProps>;
|
|
6
|
+
args: {
|
|
7
|
+
shape: "upper";
|
|
8
|
+
disabled: false;
|
|
9
|
+
};
|
|
10
|
+
argTypes: {
|
|
11
|
+
shape: {
|
|
12
|
+
control: "inline-radio";
|
|
13
|
+
options: readonly ["upper", "lower", "middle", "full", "exact"];
|
|
14
|
+
};
|
|
15
|
+
color: {
|
|
16
|
+
control: "select";
|
|
17
|
+
options: readonly ["alerts-high-salmon", "alerts-high-crimson", "alerts-high-red", "alerts-medium-sun", "alerts-medium-oak", "alerts-medium-amber", "alerts-low-mint", "alerts-low-leaf", "alerts-low-green", "alerts-neutral-fog", "alerts-neutral-neutral", "alerts-neutral-graphite"];
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
parameters: {
|
|
21
|
+
docs: {
|
|
22
|
+
page: typeof RangeTriggerIconDocumentation;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
export default meta;
|
|
27
|
+
type Story = StoryObj<typeof meta>;
|
|
28
|
+
export declare const Default: Story;
|
|
29
|
+
/**
|
|
30
|
+
* Every variant from the Figma component set, in its default and disabled
|
|
31
|
+
* state.
|
|
32
|
+
*/
|
|
33
|
+
export declare const FigmaVariants: Story;
|
|
34
|
+
/**
|
|
35
|
+
* Shape and colour are separate props, so every shape works in every colour,
|
|
36
|
+
* including combinations the Figma component set doesn't show.
|
|
37
|
+
*/
|
|
38
|
+
export declare const AllShapesAndColors: Story;
|
|
39
|
+
/**
|
|
40
|
+
* The alert colours of each priority. Use the `shape` control to see them in
|
|
41
|
+
* another shape.
|
|
42
|
+
*/
|
|
43
|
+
export declare const ColorsByPriority: Story;
|
|
44
|
+
export declare const Disabled: Story;
|
|
45
|
+
/**
|
|
46
|
+
* The track is grey, not blue, so the icons keep their contrast on the
|
|
47
|
+
* background of a selected `LabeledRadioCard`.
|
|
48
|
+
*/
|
|
49
|
+
export declare const OnSelectedBackground: Story;
|
|
50
|
+
/**
|
|
51
|
+
* Give the icon an accessible name (`aria-label` or `aria-labelledby`) when it
|
|
52
|
+
* conveys information that isn't available elsewhere. It's then exposed as an
|
|
53
|
+
* image with that name.
|
|
54
|
+
*/
|
|
55
|
+
export declare const WithAccessibleName: Story;
|
|
56
|
+
export declare const WithAccessibleNameFromLabelledBy: Story;
|
package/dist/web-ui-tailwind.css
CHANGED
|
@@ -2035,6 +2035,10 @@ button, input:where([type='button'], [type='reset'], [type='submit']), ::file-se
|
|
|
2035
2035
|
--tw-border-spacing-y: 0px;
|
|
2036
2036
|
border-spacing: var(--tw-border-spacing-x) var(--tw-border-spacing-y);
|
|
2037
2037
|
}
|
|
2038
|
+
.ui\:border-spacing-x-f_base {
|
|
2039
|
+
--tw-border-spacing-x: var(--ui-semantic-spacing-base);
|
|
2040
|
+
border-spacing: var(--tw-border-spacing-x) var(--tw-border-spacing-y);
|
|
2041
|
+
}
|
|
2038
2042
|
.ui\:border-spacing-x-f_xl {
|
|
2039
2043
|
--tw-border-spacing-x: var(--ui-semantic-spacing-xl);
|
|
2040
2044
|
border-spacing: var(--tw-border-spacing-x) var(--tw-border-spacing-y);
|
|
@@ -2043,6 +2047,10 @@ button, input:where([type='button'], [type='reset'], [type='submit']), ::file-se
|
|
|
2043
2047
|
--tw-border-spacing-y: var(--ui-semantic-spacing-base);
|
|
2044
2048
|
border-spacing: var(--tw-border-spacing-x) var(--tw-border-spacing-y);
|
|
2045
2049
|
}
|
|
2050
|
+
.ui\:border-spacing-y-f_s {
|
|
2051
|
+
--tw-border-spacing-y: var(--ui-semantic-spacing-s);
|
|
2052
|
+
border-spacing: var(--tw-border-spacing-x) var(--tw-border-spacing-y);
|
|
2053
|
+
}
|
|
2046
2054
|
.ui\:origin-\[0_55\%\] {
|
|
2047
2055
|
transform-origin: 0 55%;
|
|
2048
2056
|
}
|