@duro-app/ui 5.6.0 → 5.8.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/{Table-B1sWL3GA.js → Table-CAjPFgTX.js} +398 -394
- package/dist/Table-CAjPFgTX.js.map +1 -0
- package/dist/{compiler-runtime-B2IcI8_O.js → compiler-runtime-BuugS4D0.js} +67 -59
- package/dist/{compiler-runtime-B2IcI8_O.js.map → compiler-runtime-BuugS4D0.js.map} +1 -1
- package/dist/components/AppShell/AppShell.d.ts +74 -0
- package/dist/components/AppShell/AppShell.d.ts.map +1 -0
- package/dist/components/AppShell/AppShell.meta.d.ts +3 -0
- package/dist/components/AppShell/AppShell.meta.d.ts.map +1 -0
- package/dist/components/AppShell/AppShell.stories.d.ts +186 -0
- package/dist/components/AppShell/AppShell.stories.d.ts.map +1 -0
- package/dist/components/AppShell/styles.css.d.ts +187 -0
- package/dist/components/AppShell/styles.css.d.ts.map +1 -0
- package/dist/components/Aside/Aside.d.ts +23 -0
- package/dist/components/Aside/Aside.d.ts.map +1 -0
- package/dist/components/Aside/Aside.meta.d.ts +3 -0
- package/dist/components/Aside/Aside.meta.d.ts.map +1 -0
- package/dist/components/Aside/Aside.stories.d.ts +45 -0
- package/dist/components/Aside/Aside.stories.d.ts.map +1 -0
- package/dist/components/Aside/styles.css.d.ts +44 -0
- package/dist/components/Aside/styles.css.d.ts.map +1 -0
- package/dist/components/Button/styles.css.d.ts +2 -0
- package/dist/components/Button/styles.css.d.ts.map +1 -1
- package/dist/components/ButtonGroup/ButtonGroup.stories.d.ts +3 -3
- package/dist/components/ButtonGroup/ButtonGroup.stories.d.ts.map +1 -1
- package/dist/components/CodeBlock/CodeBlock.d.ts +29 -0
- package/dist/components/CodeBlock/CodeBlock.d.ts.map +1 -0
- package/dist/components/CodeBlock/CodeBlock.meta.d.ts +3 -0
- package/dist/components/CodeBlock/CodeBlock.meta.d.ts.map +1 -0
- package/dist/components/CodeBlock/CodeBlock.stories.d.ts +67 -0
- package/dist/components/CodeBlock/CodeBlock.stories.d.ts.map +1 -0
- package/dist/components/CodeBlock/styles.css.d.ts +32 -0
- package/dist/components/CodeBlock/styles.css.d.ts.map +1 -0
- package/dist/components/DragDrop/DragDrop.d.ts +95 -14
- package/dist/components/DragDrop/DragDrop.d.ts.map +1 -1
- package/dist/components/DragDrop/DragDrop.meta.d.ts.map +1 -1
- package/dist/components/DragDrop/DragDropBoard.stories.d.ts +69 -0
- package/dist/components/DragDrop/DragDropBoard.stories.d.ts.map +1 -0
- package/dist/components/DragDrop/styles.css.d.ts +80 -3
- package/dist/components/DragDrop/styles.css.d.ts.map +1 -1
- package/dist/components/Grid/Grid.d.ts +13 -4
- package/dist/components/Grid/Grid.d.ts.map +1 -1
- package/dist/components/Grid/Grid.meta.d.ts.map +1 -1
- package/dist/components/Grid/Grid.stories.d.ts +28 -0
- package/dist/components/Grid/Grid.stories.d.ts.map +1 -1
- package/dist/components/Grid/styles.css.d.ts +3 -0
- package/dist/components/Grid/styles.css.d.ts.map +1 -1
- package/dist/components/Heading/Heading.d.ts +3 -1
- package/dist/components/Heading/Heading.d.ts.map +1 -1
- package/dist/components/Heading/Heading.stories.d.ts +9 -0
- package/dist/components/Heading/Heading.stories.d.ts.map +1 -0
- package/dist/components/LinkButton/LinkButton.stories.d.ts +7 -0
- package/dist/components/LinkButton/LinkButton.stories.d.ts.map +1 -1
- package/dist/components/LinkButton/styles.css.d.ts +2 -0
- package/dist/components/LinkButton/styles.css.d.ts.map +1 -1
- package/dist/components/LiveRegion/LiveRegion.d.ts +28 -0
- package/dist/components/LiveRegion/LiveRegion.d.ts.map +1 -0
- package/dist/components/LiveRegion/LiveRegion.meta.d.ts +3 -0
- package/dist/components/LiveRegion/LiveRegion.meta.d.ts.map +1 -0
- package/dist/components/LiveRegion/LiveRegion.stories.d.ts +66 -0
- package/dist/components/LiveRegion/LiveRegion.stories.d.ts.map +1 -0
- package/dist/components/Menu/Menu.stories.d.ts +7 -0
- package/dist/components/Menu/Menu.stories.d.ts.map +1 -1
- package/dist/components/Menu/styles.css.d.ts +2 -0
- package/dist/components/Menu/styles.css.d.ts.map +1 -1
- package/dist/components/Meter/Meter.d.ts +17 -0
- package/dist/components/Meter/Meter.d.ts.map +1 -0
- package/dist/components/Meter/Meter.meta.d.ts +3 -0
- package/dist/components/Meter/Meter.meta.d.ts.map +1 -0
- package/dist/components/Meter/Meter.stories.d.ts +12 -0
- package/dist/components/Meter/Meter.stories.d.ts.map +1 -0
- package/dist/components/Meter/styles.css.d.ts +34 -0
- package/dist/components/Meter/styles.css.d.ts.map +1 -0
- package/dist/components/PageNav/styles.css.d.ts +1 -1
- package/dist/components/Prose/Prose.d.ts +17 -0
- package/dist/components/Prose/Prose.d.ts.map +1 -0
- package/dist/components/Prose/Prose.meta.d.ts +3 -0
- package/dist/components/Prose/Prose.meta.d.ts.map +1 -0
- package/dist/components/Prose/Prose.stories.d.ts +63 -0
- package/dist/components/Prose/Prose.stories.d.ts.map +1 -0
- package/dist/components/SideNav/SideNav.d.ts +7 -1
- package/dist/components/SideNav/SideNav.d.ts.map +1 -1
- package/dist/components/SideNav/SideNav.stories.d.ts +3 -0
- package/dist/components/SideNav/SideNav.stories.d.ts.map +1 -1
- package/dist/components/Time/Time.d.ts +26 -0
- package/dist/components/Time/Time.d.ts.map +1 -0
- package/dist/components/Time/Time.meta.d.ts +3 -0
- package/dist/components/Time/Time.meta.d.ts.map +1 -0
- package/dist/components/Time/Time.stories.d.ts +77 -0
- package/dist/components/Time/Time.stories.d.ts.map +1 -0
- package/dist/components/Time/relative.d.ts +27 -0
- package/dist/components/Time/relative.d.ts.map +1 -0
- package/dist/components/Timeline/Timeline.d.ts +71 -0
- package/dist/components/Timeline/Timeline.d.ts.map +1 -0
- package/dist/components/Timeline/Timeline.meta.d.ts +3 -0
- package/dist/components/Timeline/Timeline.meta.d.ts.map +1 -0
- package/dist/components/Timeline/Timeline.stories.d.ts +26 -0
- package/dist/components/Timeline/Timeline.stories.d.ts.map +1 -0
- package/dist/components/Timeline/styles.css.d.ts +158 -0
- package/dist/components/Timeline/styles.css.d.ts.map +1 -0
- package/dist/components/Toast/Toast.meta.d.ts.map +1 -1
- package/dist/components/Toast/Toast.stories.d.ts +9 -0
- package/dist/components/Toast/Toast.stories.d.ts.map +1 -1
- package/dist/components/Toast/ToastProvider.d.ts +11 -5
- package/dist/components/Toast/ToastProvider.d.ts.map +1 -1
- package/dist/components/Toast/index.d.ts +1 -1
- package/dist/components/Toast/index.d.ts.map +1 -1
- package/dist/components/Toast/styles.css.d.ts +6 -0
- package/dist/components/Toast/styles.css.d.ts.map +1 -1
- package/dist/form.js +1 -1
- package/dist/hooks/useContainerBelow.d.ts +18 -0
- package/dist/hooks/useContainerBelow.d.ts.map +1 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +13 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7316 -5536
- package/dist/index.js.map +1 -1
- package/dist/table.js +2 -2
- package/package.json +2 -2
- package/src/components/AppShell/AppShell.meta.ts +62 -0
- package/src/components/AppShell/AppShell.stories.tsx +770 -0
- package/src/components/AppShell/AppShell.tsx +346 -0
- package/src/components/AppShell/styles.css.ts +219 -0
- package/src/components/Aside/Aside.meta.ts +33 -0
- package/src/components/Aside/Aside.stories.tsx +106 -0
- package/src/components/Aside/Aside.tsx +42 -0
- package/src/components/Aside/styles.css.ts +60 -0
- package/src/components/Button/styles.css.ts +7 -2
- package/src/components/ButtonGroup/ButtonGroup.stories.tsx +4 -5
- package/src/components/CodeBlock/CodeBlock.meta.ts +29 -0
- package/src/components/CodeBlock/CodeBlock.stories.tsx +162 -0
- package/src/components/CodeBlock/CodeBlock.tsx +99 -0
- package/src/components/CodeBlock/styles.css.ts +36 -0
- package/src/components/DragDrop/DragDrop.meta.ts +22 -21
- package/src/components/DragDrop/DragDrop.tsx +1147 -246
- package/src/components/DragDrop/DragDropBoard.stories.tsx +668 -0
- package/src/components/DragDrop/styles.css.ts +74 -4
- package/src/components/Grid/Grid.meta.ts +2 -1
- package/src/components/Grid/Grid.stories.tsx +202 -3
- package/src/components/Grid/Grid.tsx +35 -6
- package/src/components/Grid/styles.css.ts +11 -0
- package/src/components/Heading/Heading.stories.tsx +51 -0
- package/src/components/Heading/Heading.tsx +38 -7
- package/src/components/LinkButton/LinkButton.stories.tsx +41 -1
- package/src/components/LinkButton/styles.css.ts +6 -2
- package/src/components/LiveRegion/LiveRegion.meta.ts +29 -0
- package/src/components/LiveRegion/LiveRegion.stories.tsx +139 -0
- package/src/components/LiveRegion/LiveRegion.tsx +48 -0
- package/src/components/Menu/Menu.stories.tsx +62 -0
- package/src/components/Menu/styles.css.ts +6 -3
- package/src/components/Meter/Meter.meta.ts +24 -0
- package/src/components/Meter/Meter.stories.tsx +64 -0
- package/src/components/Meter/Meter.tsx +55 -0
- package/src/components/Meter/styles.css.ts +30 -0
- package/src/components/Prose/Prose.meta.ts +32 -0
- package/src/components/Prose/Prose.stories.tsx +233 -0
- package/src/components/Prose/Prose.tsx +25 -0
- package/src/components/Prose/prose.css +177 -0
- package/src/components/SideNav/SideNav.stories.tsx +29 -0
- package/src/components/SideNav/SideNav.tsx +14 -2
- package/src/components/Time/Time.meta.ts +17 -0
- package/src/components/Time/Time.stories.tsx +173 -0
- package/src/components/Time/Time.tsx +33 -0
- package/src/components/Time/relative.ts +89 -0
- package/src/components/Timeline/Timeline.meta.ts +46 -0
- package/src/components/Timeline/Timeline.stories.tsx +238 -0
- package/src/components/Timeline/Timeline.tsx +332 -0
- package/src/components/Timeline/styles.css.ts +162 -0
- package/src/components/Toast/Toast.meta.ts +2 -1
- package/src/components/Toast/Toast.stories.tsx +84 -0
- package/src/components/Toast/ToastProvider.tsx +49 -11
- package/src/components/Toast/index.ts +7 -1
- package/src/components/Toast/styles.css.ts +2 -0
- package/src/hooks/useContainerBelow.ts +39 -0
- package/src/index.ts +29 -1
- package/src/strict.css +4 -1
- package/dist/Table-B1sWL3GA.js.map +0 -1
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
import { LiveRegionPoliteness } from './LiveRegion';
|
|
3
|
+
interface LiveRegionArgs {
|
|
4
|
+
/** `polite` (role="status") waits for a pause; `assertive` (role="alert") interrupts. */
|
|
5
|
+
politeness: LiveRegionPoliteness;
|
|
6
|
+
/** Off screen, still in the accessibility tree. */
|
|
7
|
+
visuallyHidden: boolean;
|
|
8
|
+
/** What the region announces when the trigger button is pressed. */
|
|
9
|
+
message: string;
|
|
10
|
+
/** The trigger button's label. */
|
|
11
|
+
triggerLabel: string;
|
|
12
|
+
/** The button that empties the region. */
|
|
13
|
+
clearLabel: string;
|
|
14
|
+
/** Called with the message the region now holds. */
|
|
15
|
+
onAnnounce: (message: string) => void;
|
|
16
|
+
}
|
|
17
|
+
declare const meta: {
|
|
18
|
+
title: string;
|
|
19
|
+
args: {
|
|
20
|
+
politeness: "polite";
|
|
21
|
+
visuallyHidden: false;
|
|
22
|
+
message: string;
|
|
23
|
+
triggerLabel: string;
|
|
24
|
+
clearLabel: string;
|
|
25
|
+
onAnnounce: import('storybook/test').Mock<(...args: any[]) => any>;
|
|
26
|
+
};
|
|
27
|
+
argTypes: {
|
|
28
|
+
politeness: {
|
|
29
|
+
control: "radio";
|
|
30
|
+
options: string[];
|
|
31
|
+
};
|
|
32
|
+
visuallyHidden: {
|
|
33
|
+
control: "boolean";
|
|
34
|
+
};
|
|
35
|
+
message: {
|
|
36
|
+
control: "text";
|
|
37
|
+
};
|
|
38
|
+
triggerLabel: {
|
|
39
|
+
control: "text";
|
|
40
|
+
};
|
|
41
|
+
clearLabel: {
|
|
42
|
+
control: "text";
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
parameters: {
|
|
46
|
+
a11y: {
|
|
47
|
+
test: string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
decorators: import('@storybook/react').Decorator[];
|
|
51
|
+
render: (args: LiveRegionArgs) => import("react/jsx-runtime").JSX.Element;
|
|
52
|
+
};
|
|
53
|
+
export default meta;
|
|
54
|
+
type Story = StoryObj<typeof meta>;
|
|
55
|
+
/**
|
|
56
|
+
* Press the trigger: the message appears in the region (unless
|
|
57
|
+
* `visuallyHidden`) and the Actions panel logs `onAnnounce`. Switch
|
|
58
|
+
* `politeness` to assertive for role="alert".
|
|
59
|
+
*/
|
|
60
|
+
export declare const Playground: Story;
|
|
61
|
+
/** Mounted empty from the start; a change of content is what gets announced. */
|
|
62
|
+
export declare const Polite: Story;
|
|
63
|
+
export declare const Assertive: Story;
|
|
64
|
+
/** Off screen, still in the accessibility tree. */
|
|
65
|
+
export declare const VisuallyHidden: Story;
|
|
66
|
+
//# sourceMappingURL=LiveRegion.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LiveRegion.stories.d.ts","sourceRoot":"","sources":["../../../src/components/LiveRegion/LiveRegion.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAO,QAAQ,EAAC,MAAM,kBAAkB,CAAA;AAEpD,OAAO,EAAa,KAAK,oBAAoB,EAAC,MAAM,cAAc,CAAA;AAMlE,UAAU,cAAc;IACtB,yFAAyF;IACzF,UAAU,EAAE,oBAAoB,CAAA;IAChC,mDAAmD;IACnD,cAAc,EAAE,OAAO,CAAA;IACvB,oEAAoE;IACpE,OAAO,EAAE,MAAM,CAAA;IACf,kCAAkC;IAClC,YAAY,EAAE,MAAM,CAAA;IACpB,0CAA0C;IAC1C,UAAU,EAAE,MAAM,CAAA;IAClB,oDAAoD;IACpD,UAAU,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;CACtC;AAsCD,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoBsB,CAAA;AAEhC,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAIlC;;;;GAIG;AACH,eAAO,MAAM,UAAU,EAAE,KAAU,CAAA;AAEnC,gFAAgF;AAChF,eAAO,MAAM,MAAM,EAAE,KAmBpB,CAAA;AAED,eAAO,MAAM,SAAS,EAAE,KAQvB,CAAA;AAED,mDAAmD;AACnD,eAAO,MAAM,cAAc,EAAE,KAW5B,CAAA"}
|
|
@@ -15,4 +15,11 @@ export declare const TypingElsewhereIsNotIntercepted: Story;
|
|
|
15
15
|
export declare const GhostIconTrigger: Story;
|
|
16
16
|
export declare const EnterActivatesOnce: Story;
|
|
17
17
|
export declare const TabInsideDialog: Story;
|
|
18
|
+
/**
|
|
19
|
+
* A touch screen gets 44px triggers (coarse pointer), the default and the
|
|
20
|
+
* ghost variant alike; a mouse keeps the compact control.
|
|
21
|
+
* It drives Chrome's touch emulation through Vitest's CDP session, so it runs
|
|
22
|
+
* as a test and stays out of the dev sidebar (there is no Vitest there).
|
|
23
|
+
*/
|
|
24
|
+
export declare const TouchTargets: Story;
|
|
18
25
|
//# sourceMappingURL=Menu.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Menu.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/Menu.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,IAAI,EAAE,QAAQ,EAAC,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"Menu.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/Menu.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,IAAI,EAAE,QAAQ,EAAC,MAAM,kBAAkB,CAAA;AAcpD,QAAA,MAAM,IAAI,EAAE,IAEX,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAA;AAErB,eAAO,MAAM,OAAO,EAAE,KAqCrB,CAAA;AAED,eAAO,MAAM,SAAS,EAAE,KAsBvB,CAAA;AAED,eAAO,MAAM,kBAAkB,EAAE,KAgChC,CAAA;AAED,eAAO,MAAM,SAAS,EAAE,KAqCvB,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,KAwB3B,CAAA;AAID,eAAO,MAAM,kBAAkB,EAAE,KAqBhC,CAAA;AAsCD,eAAO,MAAM,uBAAuB,EAAE,KAgCrC,CAAA;AAID,eAAO,MAAM,wBAAwB,EAAE,KAwBtC,CAAA;AAMD,eAAO,MAAM,kBAAkB,EAAE,KA0ChC,CAAA;AAID,eAAO,MAAM,+BAA+B,EAAE,KAyB7C,CAAA;AAGD,eAAO,MAAM,gBAAgB,EAAE,KAiB9B,CAAA;AAKD,eAAO,MAAM,kBAAkB,EAAE,KAoBhC,CAAA;AAMD,eAAO,MAAM,eAAe,EAAE,KAmC7B,CAAA;AAgBD;;;;;GAKG;AACH,eAAO,MAAM,YAAY,EAAE,KA+C1B,CAAA"}
|
|
@@ -20,6 +20,8 @@ export declare const styles: Readonly<{
|
|
|
20
20
|
readonly borderStyle: css.StyleXClassNameFor<"borderStyle", "solid">;
|
|
21
21
|
readonly borderColor: css.StyleXClassNameFor<"borderColor", string>;
|
|
22
22
|
readonly borderRadius: css.StyleXClassNameFor<"borderRadius", string>;
|
|
23
|
+
readonly minWidth: css.StyleXClassNameFor<"minWidth", string | null>;
|
|
24
|
+
readonly minHeight: css.StyleXClassNameFor<"minHeight", string | null>;
|
|
23
25
|
readonly cursor: css.StyleXClassNameFor<"cursor", "pointer">;
|
|
24
26
|
readonly transitionProperty: css.StyleXClassNameFor<"transitionProperty", "background-color, border-color">;
|
|
25
27
|
readonly transitionDuration: css.StyleXClassNameFor<"transitionDuration", string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.css.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/styles.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,kBAAkB,CAAA;AAUpC,eAAO,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"styles.css.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/styles.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,kBAAkB,CAAA;AAUpC,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+HjB,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type MeterTone = 'accent' | 'success' | 'warning' | 'error';
|
|
2
|
+
export interface MeterProps {
|
|
3
|
+
value: number;
|
|
4
|
+
/** Defaults to 0. */
|
|
5
|
+
min?: number;
|
|
6
|
+
/** Defaults to 1, so a fraction needs nothing else. */
|
|
7
|
+
max?: number;
|
|
8
|
+
/** The accessible name, e.g. "In progress WIP". */
|
|
9
|
+
label: string;
|
|
10
|
+
/** What screen readers read for the value, e.g. "4 of 3, over the limit".
|
|
11
|
+
* Defaults to the percentage. */
|
|
12
|
+
valueText?: string;
|
|
13
|
+
/** The fill's colour; defaults to accent. */
|
|
14
|
+
tone?: MeterTone;
|
|
15
|
+
}
|
|
16
|
+
export declare function Meter({ value, min, max, label, valueText, tone }: MeterProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
//# sourceMappingURL=Meter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Meter.d.ts","sourceRoot":"","sources":["../../../src/components/Meter/Meter.tsx"],"names":[],"mappings":"AAUA,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAA;AAElE,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAA;IACb,qBAAqB;IACrB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,uDAAuD;IACvD,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,mDAAmD;IACnD,KAAK,EAAE,MAAM,CAAA;IACb;sCACkC;IAClC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,6CAA6C;IAC7C,IAAI,CAAC,EAAE,SAAS,CAAA;CACjB;AASD,wBAAgB,KAAK,CAAC,EAAC,KAAK,EAAE,GAAO,EAAE,GAAO,EAAE,KAAK,EAAE,SAAS,EAAE,IAAe,EAAC,EAAE,UAAU,2CAoB7F"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Meter.meta.d.ts","sourceRoot":"","sources":["../../../src/components/Meter/Meter.meta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,mBAAmB,CAAA;AAEpD,eAAO,MAAM,IAAI,EAAE,aAqBlB,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Meter } from './Meter';
|
|
3
|
+
declare const meta: Meta<typeof Meter>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Meter>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
/** Tones for a level against a limit: under, at, over. */
|
|
8
|
+
export declare const Tones: Story;
|
|
9
|
+
/** Over the maximum, aria-valuenow stays in range and the text carries the
|
|
10
|
+
* true value; the bar fills, no further. */
|
|
11
|
+
export declare const OverTheLimit: Story;
|
|
12
|
+
//# sourceMappingURL=Meter.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Meter.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Meter/Meter.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,IAAI,EAAE,QAAQ,EAAC,MAAM,kBAAkB,CAAA;AAGpD,OAAO,EAAC,KAAK,EAAC,MAAM,SAAS,CAAA;AAU7B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,KAAK,CAK5B,CAAA;AACD,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,KAAK,CAAC,CAAA;AAEnC,eAAO,MAAM,OAAO,EAAE,KASrB,CAAA;AAED,0DAA0D;AAC1D,eAAO,MAAM,KAAK,EAAE,KAanB,CAAA;AAED;6CAC6C;AAC7C,eAAO,MAAM,YAAY,EAAE,KAY1B,CAAA"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { css } from 'react-strict-dom';
|
|
2
|
+
export declare const styles: Readonly<{
|
|
3
|
+
readonly track: Readonly<{
|
|
4
|
+
readonly position: css.StyleXClassNameFor<"position", "relative">;
|
|
5
|
+
readonly width: css.StyleXClassNameFor<"width", "100%">;
|
|
6
|
+
readonly height: css.StyleXClassNameFor<"height", string>;
|
|
7
|
+
readonly borderRadius: css.StyleXClassNameFor<"borderRadius", string>;
|
|
8
|
+
readonly backgroundColor: css.StyleXClassNameFor<"backgroundColor", string>;
|
|
9
|
+
readonly overflow: css.StyleXClassNameFor<"overflow", "hidden">;
|
|
10
|
+
}>;
|
|
11
|
+
readonly fill: Readonly<{
|
|
12
|
+
readonly height: css.StyleXClassNameFor<"height", "100%">;
|
|
13
|
+
readonly borderRadius: css.StyleXClassNameFor<"borderRadius", string>;
|
|
14
|
+
readonly transitionProperty: css.StyleXClassNameFor<"transitionProperty", "width">;
|
|
15
|
+
readonly transitionDuration: css.StyleXClassNameFor<"transitionDuration", string>;
|
|
16
|
+
readonly transitionTimingFunction: css.StyleXClassNameFor<"transitionTimingFunction", string>;
|
|
17
|
+
}>;
|
|
18
|
+
readonly accent: Readonly<{
|
|
19
|
+
readonly backgroundColor: css.StyleXClassNameFor<"backgroundColor", string>;
|
|
20
|
+
}>;
|
|
21
|
+
readonly success: Readonly<{
|
|
22
|
+
readonly backgroundColor: css.StyleXClassNameFor<"backgroundColor", string>;
|
|
23
|
+
}>;
|
|
24
|
+
readonly warning: Readonly<{
|
|
25
|
+
readonly backgroundColor: css.StyleXClassNameFor<"backgroundColor", string>;
|
|
26
|
+
}>;
|
|
27
|
+
readonly error: Readonly<{
|
|
28
|
+
readonly backgroundColor: css.StyleXClassNameFor<"backgroundColor", string>;
|
|
29
|
+
}>;
|
|
30
|
+
readonly fillAt: (percent: number) => readonly [Readonly<{
|
|
31
|
+
width: css.StyleXClassNameFor<"width", string>;
|
|
32
|
+
}>, css.InlineStyles];
|
|
33
|
+
}>;
|
|
34
|
+
//# sourceMappingURL=styles.css.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.css.d.ts","sourceRoot":"","sources":["../../../src/components/Meter/styles.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,kBAAkB,CAAA;AAMpC,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuBjB,CAAA"}
|
|
@@ -6,7 +6,7 @@ export declare const styles: Readonly<{
|
|
|
6
6
|
}>;
|
|
7
7
|
readonly grid: Readonly<{
|
|
8
8
|
readonly display: css.StyleXClassNameFor<"display", "grid">;
|
|
9
|
-
readonly gridTemplateColumns: css.StyleXClassNameFor<"gridTemplateColumns", "minmax(0, 1fr) minmax(0, 1fr)
|
|
9
|
+
readonly gridTemplateColumns: css.StyleXClassNameFor<"gridTemplateColumns", "minmax(0, 1fr)" | "minmax(0, 1fr) minmax(0, 1fr)">;
|
|
10
10
|
readonly gap: css.StyleXClassNameFor<"gap", string>;
|
|
11
11
|
}>;
|
|
12
12
|
readonly card: Readonly<{
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ReactNode, Ref } from 'react';
|
|
2
|
+
interface ProseProps {
|
|
3
|
+
/** HTML Duro does not author: the output of a Markdown renderer. */
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
/** The container element. */
|
|
6
|
+
ref?: Ref<HTMLDivElement>;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Prose — the container for HTML Duro does not author (rendered Markdown, CMS
|
|
10
|
+
* output): headings, paragraphs, lists, tables, blockquotes, inline code,
|
|
11
|
+
* links and images are styled from tokens by descendant rules scoped to it.
|
|
12
|
+
* Duro components inside it (a TextLink, a CodeBlock) keep their own styles,
|
|
13
|
+
* and an app's own CSS wins over every Prose rule. Web only.
|
|
14
|
+
*/
|
|
15
|
+
export declare function Prose({ children, ref }: ProseProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=Prose.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Prose.d.ts","sourceRoot":"","sources":["../../../src/components/Prose/Prose.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,SAAS,EAAE,GAAG,EAAC,MAAM,OAAO,CAAA;AAEzC,OAAO,aAAa,CAAA;AAEpB,UAAU,UAAU;IAClB,oEAAoE;IACpE,QAAQ,EAAE,SAAS,CAAA;IACnB,6BAA6B;IAC7B,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAA;CAC1B;AAED;;;;;;GAMG;AACH,wBAAgB,KAAK,CAAC,EAAC,QAAQ,EAAE,GAAG,EAAC,EAAE,UAAU,2CAMhD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Prose.meta.d.ts","sourceRoot":"","sources":["../../../src/components/Prose/Prose.meta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,mBAAmB,CAAA;AAEpD,eAAO,MAAM,IAAI,EAAE,aA6BlB,CAAA"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
declare const DOCUMENTS: {
|
|
3
|
+
readonly runbook: "\n<p>Flux reconciles every cluster from <code>kubernetes/</code>. Read the\n<a href=\"#bootstrap\">bootstrap notes</a> first.</p>\n<h2 id=\"bootstrap\" class=\"docs_title__a1b2\">Bootstrap</h2>\n<p>Each cluster starts from the same three steps:</p>\n<ol>\n <li>Install the operator.</li>\n <li>Seed the secrets:\n <ul>\n <li>the Vault token</li>\n <li>the registry pull secret</li>\n </ul>\n </li>\n <li>Point Flux at the repository.</li>\n</ol>\n<blockquote><p>Never commit a decrypted secret.</p></blockquote>\n<h3>Clusters</h3>\n<table>\n <thead><tr><th>Cluster</th><th>Nodes</th><th>Role</th></tr></thead>\n <tbody>\n <tr><td>homelab</td><td>5</td><td>Applications</td></tr>\n <tr><td>nas</td><td>1</td><td>Storage</td></tr>\n </tbody>\n</table>\n<pre><code>flux bootstrap git --url=ssh://git@forge/homelab</code></pre>\n<hr>\n<p><img alt=\"\" src=\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'/%3E\"></p>\n";
|
|
4
|
+
readonly 'release-notes': "\n<h2>5.6.0</h2>\n<p>Small controls line up: every <code>size=\"small\"</code> control is at least\n<code>controlSm</code> tall, whatever it holds.</p>\n<h3>Fixed</h3>\n<ul>\n <li>A small <code>Menu.Trigger</code> in a toolbar no longer shrinks.</li>\n <li>Toggle and Button share one small padding.</li>\n</ul>\n<blockquote><p>Upgrade with <code>pnpm add @duro-app/ui@5.6.0</code>.</p></blockquote>\n";
|
|
5
|
+
readonly reference: "\n<h2>relative(date, options)</h2>\n<p>Formats <code>date</code> against <code>options.now</code> with\n<a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat\">Intl.RelativeTimeFormat</a>.</p>\n<table>\n <thead><tr><th>Option</th><th>Type</th><th>Default</th></tr></thead>\n <tbody>\n <tr><td><code>now</code></td><td>Date | number</td><td>required</td></tr>\n <tr><td><code>locale</code></td><td>string</td><td>required</td></tr>\n <tr><td><code>numeric</code></td><td>'auto' | 'always'</td><td>'auto'</td></tr>\n </tbody>\n</table>\n<pre><code>relative(commit.date, {now, locale: 'fr'})</code></pre>\n";
|
|
6
|
+
};
|
|
7
|
+
type DocumentName = keyof typeof DOCUMENTS;
|
|
8
|
+
interface ProseArgs {
|
|
9
|
+
/** A sample of what a Markdown renderer hands over. */
|
|
10
|
+
document: DocumentName;
|
|
11
|
+
/** Your own HTML, in place of the sample; empty to show the sample. */
|
|
12
|
+
html: string;
|
|
13
|
+
}
|
|
14
|
+
declare const meta: {
|
|
15
|
+
title: string;
|
|
16
|
+
args: {
|
|
17
|
+
document: "runbook";
|
|
18
|
+
html: string;
|
|
19
|
+
};
|
|
20
|
+
argTypes: {
|
|
21
|
+
document: {
|
|
22
|
+
control: {
|
|
23
|
+
type: "select";
|
|
24
|
+
labels: {
|
|
25
|
+
runbook: string;
|
|
26
|
+
'release-notes': string;
|
|
27
|
+
reference: string;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
options: string[];
|
|
31
|
+
};
|
|
32
|
+
html: {
|
|
33
|
+
control: "text";
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
parameters: {
|
|
37
|
+
a11y: {
|
|
38
|
+
test: string;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
decorators: import('@storybook/react').Decorator[];
|
|
42
|
+
render: (args: ProseArgs) => import("react/jsx-runtime").JSX.Element;
|
|
43
|
+
};
|
|
44
|
+
export default meta;
|
|
45
|
+
type Story = StoryObj<typeof meta>;
|
|
46
|
+
/**
|
|
47
|
+
* Rendered Markdown styled by Prose. Pick another sample in `document`, or
|
|
48
|
+
* paste your own HTML in `html`.
|
|
49
|
+
*/
|
|
50
|
+
export declare const Playground: Story;
|
|
51
|
+
/** The runbook sample, measured: flow, headings, lists, tables, code, links. */
|
|
52
|
+
export declare const RenderedMarkdown: Story;
|
|
53
|
+
/**
|
|
54
|
+
* An app's own CSS wins over every Prose rule: a CSS Module class and even a
|
|
55
|
+
* bare element selector, loaded after Duro's stylesheet. Prose sits in its
|
|
56
|
+
* own cascade layer and weighs nothing (:where()).
|
|
57
|
+
*/
|
|
58
|
+
export declare const AppCssWins: Story;
|
|
59
|
+
/** A Duro component inside Prose keeps its own styles: Prose is below them. */
|
|
60
|
+
export declare const DuroComponentsInside: Story;
|
|
61
|
+
/** DuroComponentsInside's checks, kept off the visible story so a Control change cannot fail them. */
|
|
62
|
+
export declare const DuroComponentsInsideChecks: Story;
|
|
63
|
+
//# sourceMappingURL=Prose.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Prose.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Prose/Prose.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAO,QAAQ,EAAC,MAAM,kBAAkB,CAAA;AAiEpD,QAAA,MAAM,SAAS;;;;CAIL,CAAA;AAEV,KAAK,YAAY,GAAG,MAAM,OAAO,SAAS,CAAA;AAE1C,UAAU,SAAS;IACjB,uDAAuD;IACvD,QAAQ,EAAE,YAAY,CAAA;IACtB,uEAAuE;IACvE,IAAI,EAAE,MAAM,CAAA;CACb;AAeD,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgBiB,CAAA;AAE3B,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAgBlC;;;GAGG;AACH,eAAO,MAAM,UAAU,EAAE,KAAU,CAAA;AAEnC,gFAAgF;AAChF,eAAO,MAAM,gBAAgB,EAAE,KAyC9B,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,UAAU,EAAE,KAsBxB,CAAA;AAED,+EAA+E;AAC/E,eAAO,MAAM,oBAAoB,EAAE,KAYlC,CAAA;AAED,sGAAsG;AACtG,eAAO,MAAM,0BAA0B,EAAE,KASxC,CAAA"}
|
|
@@ -26,11 +26,17 @@ import { ReactNode } from 'react';
|
|
|
26
26
|
*/
|
|
27
27
|
interface RootProps {
|
|
28
28
|
children: ReactNode;
|
|
29
|
+
/**
|
|
30
|
+
* Names the navigation landmark ("Main", "Settings"). Give one whenever
|
|
31
|
+
* the page has another nav (a breadcrumb, a pager): screen readers list
|
|
32
|
+
* landmarks by name.
|
|
33
|
+
*/
|
|
34
|
+
'aria-label'?: string;
|
|
29
35
|
value?: string;
|
|
30
36
|
defaultValue?: string;
|
|
31
37
|
onValueChange?: (value: string) => void;
|
|
32
38
|
}
|
|
33
|
-
declare function Root({ children, value: controlledValue, defaultValue, onValueChange }: RootProps): import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
declare function Root({ children, 'aria-label': ariaLabel, value: controlledValue, defaultValue, onValueChange, }: RootProps): import("react/jsx-runtime").JSX.Element;
|
|
34
40
|
interface GroupProps {
|
|
35
41
|
children: ReactNode;
|
|
36
42
|
label: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SideNav.d.ts","sourceRoot":"","sources":["../../../src/components/SideNav/SideNav.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,SAAS,EAAkD,MAAM,OAAO,CAAA;AAMrF;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAIH,UAAU,SAAS;IACjB,QAAQ,EAAE,SAAS,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;CACxC;AAED,iBAAS,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"SideNav.d.ts","sourceRoot":"","sources":["../../../src/components/SideNav/SideNav.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,SAAS,EAAkD,MAAM,OAAO,CAAA;AAMrF;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAIH,UAAU,SAAS;IACjB,QAAQ,EAAE,SAAS,CAAA;IACnB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;CACxC;AAED,iBAAS,IAAI,CAAC,EACZ,QAAQ,EACR,YAAY,EAAE,SAAS,EACvB,KAAK,EAAE,eAAe,EACtB,YAAY,EACZ,aAAa,GACd,EAAE,SAAS,2CAgEX;AAID,UAAU,UAAU;IAClB,QAAQ,EAAE,SAAS,CAAA;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B;AAED,iBAAS,KAAK,CAAC,EAAC,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAC,EAAE,UAAU,2CAoEtE;AAID,UAAU,YAAY;IACpB,QAAQ,EAAE,SAAS,CAAA;IACnB,KAAK,EAAE,MAAM,CAAA;CACd;AAED;;;;;;;;;GASG;AACH,iBAAS,OAAO,CAAC,EAAC,QAAQ,EAAE,KAAK,EAAC,EAAE,YAAY,2CAY/C;AAID,UAAU,SAAS;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,SAAS,CAAA;IACnB;yEACqE;IACrE,IAAI,CAAC,EAAE,SAAS,CAAA;CACjB;AAED,iBAAS,IAAI,CAAC,EAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAC,EAAE,SAAS,2CAyB/C;AAED,eAAO,MAAM,OAAO;;;;;CAKnB,CAAA"}
|
|
@@ -9,4 +9,7 @@ export declare const Collapsed: Story;
|
|
|
9
9
|
export declare const DefaultExpandedWithActiveItem: Story;
|
|
10
10
|
export declare const Interactive: Story;
|
|
11
11
|
export declare const FlatWithIcons: Story;
|
|
12
|
+
/** `aria-label` names the landmark, so a page with a breadcrumb or a pager
|
|
13
|
+
* beside it still lists the side navigation by name. */
|
|
14
|
+
export declare const Named: Story;
|
|
12
15
|
//# sourceMappingURL=SideNav.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SideNav.stories.d.ts","sourceRoot":"","sources":["../../../src/components/SideNav/SideNav.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,IAAI,EAAE,QAAQ,EAAC,MAAM,kBAAkB,CAAA;AAEpD,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"SideNav.stories.d.ts","sourceRoot":"","sources":["../../../src/components/SideNav/SideNav.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,IAAI,EAAE,QAAQ,EAAC,MAAM,kBAAkB,CAAA;AAEpD,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAA;AAIjC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,OAAO,CAAC,IAAI,CAMnC,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,OAAO,CAAC,IAAI,CAAC,CAAA;AAK1C,eAAO,MAAM,OAAO,EAAE,KAgCrB,CAAA;AAKD,eAAO,MAAM,6BAA6B,EAAE,KAwC3C,CAAA;AAED,eAAO,MAAM,SAAS,EAAE,KAoBvB,CAAA;AAMD,eAAO,MAAM,6BAA6B,EAAE,KAgB3C,CAAA;AAED,eAAO,MAAM,WAAW,EAAE,KAgBzB,CAAA;AAKD,eAAO,MAAM,aAAa,EAAE,KAsC3B,CAAA;AAED;yDACyD;AACzD,eAAO,MAAM,KAAK,EAAE,KAwBnB,CAAA"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
interface TimeProps {
|
|
3
|
+
/**
|
|
4
|
+
* The instant, machine-readable: a `Date` (written as its ISO string) or an
|
|
5
|
+
* ISO 8601 string, which is passed through unchanged.
|
|
6
|
+
*/
|
|
7
|
+
dateTime: Date | string;
|
|
8
|
+
/**
|
|
9
|
+
* The exact date and time, shown on hover ("8 October 2026, 14:03 UTC"),
|
|
10
|
+
* formatted by you in the reader's locale.
|
|
11
|
+
*/
|
|
12
|
+
title?: string;
|
|
13
|
+
/** What the reader sees: a relative label from `relative()`, or a date. */
|
|
14
|
+
children: ReactNode;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Time — a date or time in running text as a `<time>` element: the visible
|
|
18
|
+
* text is yours (often `relative(date, {now, locale})`), the exact instant
|
|
19
|
+
* goes in `dateTime` for machines and `title` for people.
|
|
20
|
+
*
|
|
21
|
+
* Web only. A raw `<time>`: react-strict-dom has no `html.time`, and the
|
|
22
|
+
* element carries no style of its own (it inherits the text around it).
|
|
23
|
+
*/
|
|
24
|
+
export declare function Time({ dateTime, title, children }: TimeProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export {};
|
|
26
|
+
//# sourceMappingURL=Time.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Time.d.ts","sourceRoot":"","sources":["../../../src/components/Time/Time.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,OAAO,CAAA;AAEpC,UAAU,SAAS;IACjB;;;OAGG;IACH,QAAQ,EAAE,IAAI,GAAG,MAAM,CAAA;IACvB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,2EAA2E;IAC3E,QAAQ,EAAE,SAAS,CAAA;CACpB;AAED;;;;;;;GAOG;AACH,wBAAgB,IAAI,CAAC,EAAC,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAC,EAAE,SAAS,2CAO1D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Time.meta.d.ts","sourceRoot":"","sources":["../../../src/components/Time/Time.meta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,mBAAmB,CAAA;AAEpD,eAAO,MAAM,IAAI,EAAE,aAclB,CAAA"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
type Locale = 'en' | 'fr' | 'de';
|
|
3
|
+
interface TimeArgs {
|
|
4
|
+
/** The instant shown, in days from `now` (negative: in the past). */
|
|
5
|
+
offsetDays: number;
|
|
6
|
+
/** The locale `relative` and the title use. */
|
|
7
|
+
locale: Locale;
|
|
8
|
+
/** `auto` says "yesterday" where the locale has a word; `always` keeps the number. */
|
|
9
|
+
numeric: 'auto' | 'always';
|
|
10
|
+
/** The text before the date. */
|
|
11
|
+
label: string;
|
|
12
|
+
}
|
|
13
|
+
declare const meta: {
|
|
14
|
+
title: string;
|
|
15
|
+
args: {
|
|
16
|
+
offsetDays: number;
|
|
17
|
+
locale: "en";
|
|
18
|
+
numeric: "auto";
|
|
19
|
+
label: string;
|
|
20
|
+
};
|
|
21
|
+
argTypes: {
|
|
22
|
+
offsetDays: {
|
|
23
|
+
control: {
|
|
24
|
+
type: "range";
|
|
25
|
+
min: number;
|
|
26
|
+
max: number;
|
|
27
|
+
step: number;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
locale: {
|
|
31
|
+
control: {
|
|
32
|
+
type: "select";
|
|
33
|
+
labels: {
|
|
34
|
+
en: string;
|
|
35
|
+
fr: string;
|
|
36
|
+
de: string;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
options: string[];
|
|
40
|
+
};
|
|
41
|
+
numeric: {
|
|
42
|
+
control: "radio";
|
|
43
|
+
options: string[];
|
|
44
|
+
};
|
|
45
|
+
label: {
|
|
46
|
+
control: "text";
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
parameters: {
|
|
50
|
+
a11y: {
|
|
51
|
+
test: string;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
decorators: import('@storybook/react').Decorator[];
|
|
55
|
+
render: ({ offsetDays, locale, numeric, label }: TimeArgs) => import("react/jsx-runtime").JSX.Element;
|
|
56
|
+
};
|
|
57
|
+
export default meta;
|
|
58
|
+
type Story = StoryObj<typeof meta>;
|
|
59
|
+
/**
|
|
60
|
+
* A date relative to a fixed `now` (2026-10-08 12:00 UTC). Move `offsetDays`
|
|
61
|
+
* to walk through the units (days, weeks, months, years), switch `locale`, and
|
|
62
|
+
* `numeric` to always for "1 day ago" instead of "yesterday". Hover the date
|
|
63
|
+
* for the exact instant (title).
|
|
64
|
+
*/
|
|
65
|
+
export declare const Playground: Story;
|
|
66
|
+
/** Playground's checks, kept off the visible story so a Control change cannot fail them. */
|
|
67
|
+
export declare const PlaygroundChecks: Story;
|
|
68
|
+
/** The words come from the locale; the exact instant stays in dateTime and title. */
|
|
69
|
+
export declare const TwoLocales: Story;
|
|
70
|
+
/** TwoLocales' checks, kept off the visible story so a Control change cannot fail them. */
|
|
71
|
+
export declare const TwoLocalesChecks: Story;
|
|
72
|
+
/** A Date is written as its ISO string. */
|
|
73
|
+
export declare const FromDate: Story;
|
|
74
|
+
/** Server and client render the same text from the same `now`: hydration
|
|
75
|
+
* reports nothing. It replaces the canvas's content, so it runs as a test only. */
|
|
76
|
+
export declare const ServerRender: Story;
|
|
77
|
+
//# sourceMappingURL=Time.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Time.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Time/Time.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAO,QAAQ,EAAC,MAAM,kBAAkB,CAAA;AAgBpD,KAAK,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;AAEhC,UAAU,QAAQ;IAChB,qEAAqE;IACrE,UAAU,EAAE,MAAM,CAAA;IAClB,+CAA+C;IAC/C,MAAM,EAAE,MAAM,CAAA;IACd,sFAAsF;IACtF,OAAO,EAAE,MAAM,GAAG,QAAQ,CAAA;IAC1B,gCAAgC;IAChC,KAAK,EAAE,MAAM,CAAA;CACd;AAED,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyBgB,CAAA;AAE1B,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAuBlC;;;;;GAKG;AACH,eAAO,MAAM,UAAU,EAAE,KAAU,CAAA;AAEnC,4FAA4F;AAC5F,eAAO,MAAM,gBAAgB,EAAE,KAS9B,CAAA;AAED,qFAAqF;AACrF,eAAO,MAAM,UAAU,EAAE,KAOxB,CAAA;AAED,2FAA2F;AAC3F,eAAO,MAAM,gBAAgB,EAAE,KAc9B,CAAA;AAED,2CAA2C;AAC3C,eAAO,MAAM,QAAQ,EAAE,KAYtB,CAAA;AAED;oFACoF;AACpF,eAAO,MAAM,YAAY,EAAE,KA4B1B,CAAA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export interface RelativeOptions {
|
|
2
|
+
/**
|
|
3
|
+
* The instant to measure from. Required: read the clock once where the data
|
|
4
|
+
* is loaded (a route loader) and pass the same value to the server and the
|
|
5
|
+
* client render, so both produce the same text. Never `Date.now()` during a
|
|
6
|
+
* render — the client would hydrate a different string.
|
|
7
|
+
*/
|
|
8
|
+
now: Date | number;
|
|
9
|
+
/** BCP 47 locale(s) for the words ("3 days ago", "il y a 3 jours"). */
|
|
10
|
+
locale: string | readonly string[];
|
|
11
|
+
/**
|
|
12
|
+
* `auto` (default) says "yesterday" / "tomorrow" / "now" where the locale has
|
|
13
|
+
* a word for it; `always` keeps the number ("1 day ago").
|
|
14
|
+
*/
|
|
15
|
+
numeric?: 'auto' | 'always';
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* How far `date` is from `now`, in words, in the caller's locale:
|
|
19
|
+
* `relative(lastCommit, {now, locale: 'en'})` → "3 days ago". Built on
|
|
20
|
+
* `Intl.RelativeTimeFormat`; the largest unit that keeps the count at least 1
|
|
21
|
+
* is used, rounded to the nearest whole unit.
|
|
22
|
+
*
|
|
23
|
+
* An unparseable date throws a `RangeError` (as `Intl` does): check the data
|
|
24
|
+
* before rendering it.
|
|
25
|
+
*/
|
|
26
|
+
export declare function relative(date: Date | number | string, options: RelativeOptions): string;
|
|
27
|
+
//# sourceMappingURL=relative.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"relative.d.ts","sourceRoot":"","sources":["../../../src/components/Time/relative.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,eAAe;IAC9B;;;;;OAKG;IACH,GAAG,EAAE,IAAI,GAAG,MAAM,CAAA;IAClB,uEAAuE;IACvE,MAAM,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAAA;IAClC;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAA;CAC5B;AAgDD;;;;;;;;GAQG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,EAAE,OAAO,EAAE,eAAe,GAAG,MAAM,CAavF"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { DragDropItemData, DragDropVerdict } from '../DragDrop/DragDrop';
|
|
3
|
+
/** A calendar day, 'YYYY-MM-DD'. */
|
|
4
|
+
export type TimelineDate = string;
|
|
5
|
+
export interface TimelineRootProps {
|
|
6
|
+
/** First day on the axis. */
|
|
7
|
+
start: TimelineDate;
|
|
8
|
+
/** Last day on the axis (included). */
|
|
9
|
+
end: TimelineDate;
|
|
10
|
+
/** Draws the today marker when inside the range. */
|
|
11
|
+
today?: TimelineDate;
|
|
12
|
+
/** The timeline's accessible name. */
|
|
13
|
+
'aria-label': string;
|
|
14
|
+
/** Text above the row labels, e.g. "Milestones". */
|
|
15
|
+
heading?: ReactNode;
|
|
16
|
+
/** The today marker's text. */
|
|
17
|
+
todayLabel?: string;
|
|
18
|
+
/** BCP 47 locale for the default date format. */
|
|
19
|
+
locale?: string;
|
|
20
|
+
/** Formats a day for the axis and the edge sliders' value text. */
|
|
21
|
+
formatDate?: (date: TimelineDate) => string;
|
|
22
|
+
children: ReactNode;
|
|
23
|
+
}
|
|
24
|
+
declare function Root({ start, end, today, 'aria-label': ariaLabel, heading, todayLabel, locale, formatDate, children, }: TimelineRootProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export interface TimelineRowProps {
|
|
26
|
+
/** The row's name, shown in the label column. */
|
|
27
|
+
label: string;
|
|
28
|
+
/** A second line under the label, e.g. "4 of 7 done". */
|
|
29
|
+
description?: ReactNode;
|
|
30
|
+
children?: ReactNode;
|
|
31
|
+
}
|
|
32
|
+
declare function Row({ label, description, children }: TimelineRowProps): import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
export interface TimelineBarDropZone<T = unknown> {
|
|
34
|
+
/** The DragDrop zone id; drops arrive in the Root's onDrop with it. */
|
|
35
|
+
id: string;
|
|
36
|
+
/** Read to screen readers when an item moves or drops here. */
|
|
37
|
+
label: string;
|
|
38
|
+
accepts?: (item: DragDropItemData<T>) => DragDropVerdict;
|
|
39
|
+
}
|
|
40
|
+
export interface TimelineBarProps<T = unknown> {
|
|
41
|
+
start: TimelineDate;
|
|
42
|
+
end: TimelineDate;
|
|
43
|
+
/** The bar's accessible name. */
|
|
44
|
+
label: string;
|
|
45
|
+
/** Done fraction, 0–1, drawn as a fill from the start edge. */
|
|
46
|
+
progress?: number;
|
|
47
|
+
/** `planned` draws a dashed outline; `done` the success tone. */
|
|
48
|
+
tone?: 'default' | 'planned' | 'done';
|
|
49
|
+
/** Makes the bar a toggle button (aria-pressed). */
|
|
50
|
+
selected?: boolean;
|
|
51
|
+
onSelect?: () => void;
|
|
52
|
+
/** Adds the start-edge slider. */
|
|
53
|
+
onStartChange?: (date: TimelineDate) => void;
|
|
54
|
+
/** Adds the end-edge slider. */
|
|
55
|
+
onEndChange?: (date: TimelineDate) => void;
|
|
56
|
+
/** Names of the edge sliders; default "<label>, start" / "<label>, end". */
|
|
57
|
+
startLabel?: string;
|
|
58
|
+
endLabel?: string;
|
|
59
|
+
/** Makes the bar a DragDrop.Zone (needs a DragDrop.Root above). */
|
|
60
|
+
dropZone?: TimelineBarDropZone<T>;
|
|
61
|
+
/** Text inside the bar, e.g. "4/7". */
|
|
62
|
+
children?: ReactNode;
|
|
63
|
+
}
|
|
64
|
+
declare function Bar<T = unknown>({ start, end, label, progress, tone, selected, onSelect, onStartChange, onEndChange, startLabel, endLabel, dropZone, children, }: TimelineBarProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
65
|
+
export declare const Timeline: {
|
|
66
|
+
Root: typeof Root;
|
|
67
|
+
Row: typeof Row;
|
|
68
|
+
Bar: typeof Bar;
|
|
69
|
+
};
|
|
70
|
+
export {};
|
|
71
|
+
//# sourceMappingURL=Timeline.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Timeline.d.ts","sourceRoot":"","sources":["../../../src/components/Timeline/Timeline.tsx"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Timeline.meta.d.ts","sourceRoot":"","sources":["../../../src/components/Timeline/Timeline.meta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,mBAAmB,CAAA;AAEpD,eAAO,MAAM,IAAI,EAAE,aA2ClB,CAAA"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { DragDropEvent } from '../DragDrop/DragDrop';
|
|
3
|
+
interface Args {
|
|
4
|
+
onDrop?: (e: DragDropEvent<Task>) => void;
|
|
5
|
+
onSelect?: (id: string) => void;
|
|
6
|
+
}
|
|
7
|
+
declare const meta: Meta<Args>;
|
|
8
|
+
export default meta;
|
|
9
|
+
type Story = StoryObj<Args>;
|
|
10
|
+
interface Task {
|
|
11
|
+
id: string;
|
|
12
|
+
title: string;
|
|
13
|
+
}
|
|
14
|
+
/** Three milestones over seven weeks, with progress fills, today, a
|
|
15
|
+
* selectable bar and keyboard edge sliders. */
|
|
16
|
+
export declare const Default: Story;
|
|
17
|
+
/** Bar edges are sliders whose value is a date: arrows move a day, Page
|
|
18
|
+
* keys a week, Home/End to the limit. */
|
|
19
|
+
export declare const KeyboardEdges: Story;
|
|
20
|
+
/** Drag an unscheduled task onto a milestone bar (or pick it with Space and
|
|
21
|
+
* move it with the arrow keys). */
|
|
22
|
+
export declare const Droppable: Story;
|
|
23
|
+
/** Bars are DragDrop zones: drop a task on a milestone bar, by pointer or
|
|
24
|
+
* by keyboard. */
|
|
25
|
+
export declare const DropOnBar: Story;
|
|
26
|
+
//# sourceMappingURL=Timeline.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Timeline.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Timeline/Timeline.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,IAAI,EAAE,QAAQ,EAAC,MAAM,kBAAkB,CAAA;AAKpD,OAAO,EAAW,KAAK,aAAa,EAAC,MAAM,sBAAsB,CAAA;AAQjE,UAAU,IAAI;IACZ,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,aAAa,CAAC,IAAI,CAAC,KAAK,IAAI,CAAA;IACzC,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;CAChC;AAED,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,IAAI,CAIpB,CAAA;AACD,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAA;AAgC3B,UAAU,IAAI;IACZ,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;CACd;AAkFD;gDACgD;AAChD,eAAO,MAAM,OAAO,EAAE,KAYrB,CAAA;AAED;0CAC0C;AAC1C,eAAO,MAAM,aAAa,EAAE,KAmB3B,CAAA;AAED;oCACoC;AACpC,eAAO,MAAM,SAAS,EAAE,KAEvB,CAAA;AAED;mBACmB;AACnB,eAAO,MAAM,SAAS,EAAE,KAiDvB,CAAA"}
|