@duro-app/ui 5.4.0 → 5.5.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-Cm5cCnZD.js → Table-DYN-bp0e.js} +388 -387
- package/dist/Table-DYN-bp0e.js.map +1 -0
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +37 -0
- package/dist/components/Breadcrumb/Breadcrumb.d.ts.map +1 -0
- package/dist/components/Breadcrumb/Breadcrumb.meta.d.ts +3 -0
- package/dist/components/Breadcrumb/Breadcrumb.meta.d.ts.map +1 -0
- package/dist/components/Breadcrumb/Breadcrumb.stories.d.ts +18 -0
- package/dist/components/Breadcrumb/Breadcrumb.stories.d.ts.map +1 -0
- package/dist/components/Breadcrumb/styles.css.d.ts +46 -0
- package/dist/components/Breadcrumb/styles.css.d.ts.map +1 -0
- package/dist/components/Inline/Inline.meta.d.ts.map +1 -1
- package/dist/components/LinkButton/LinkButton.d.ts +8 -1
- package/dist/components/LinkButton/LinkButton.d.ts.map +1 -1
- package/dist/components/LinkButton/LinkButton.stories.d.ts +9 -0
- package/dist/components/LinkButton/LinkButton.stories.d.ts.map +1 -1
- package/dist/components/PageNav/PageNav.d.ts +30 -0
- package/dist/components/PageNav/PageNav.d.ts.map +1 -0
- package/dist/components/PageNav/PageNav.meta.d.ts +3 -0
- package/dist/components/PageNav/PageNav.meta.d.ts.map +1 -0
- package/dist/components/PageNav/PageNav.stories.d.ts +16 -0
- package/dist/components/PageNav/PageNav.stories.d.ts.map +1 -0
- package/dist/components/PageNav/styles.css.d.ts +51 -0
- package/dist/components/PageNav/styles.css.d.ts.map +1 -0
- package/dist/components/TableOfContents/TableOfContents.d.ts +53 -0
- package/dist/components/TableOfContents/TableOfContents.d.ts.map +1 -0
- package/dist/components/TableOfContents/TableOfContents.meta.d.ts +3 -0
- package/dist/components/TableOfContents/TableOfContents.meta.d.ts.map +1 -0
- package/dist/components/TableOfContents/TableOfContents.stories.d.ts +21 -0
- package/dist/components/TableOfContents/TableOfContents.stories.d.ts.map +1 -0
- package/dist/components/TableOfContents/TableOfContentsContext.d.ts +11 -0
- package/dist/components/TableOfContents/TableOfContentsContext.d.ts.map +1 -0
- package/dist/components/TableOfContents/styles.css.d.ts +114 -0
- package/dist/components/TableOfContents/styles.css.d.ts.map +1 -0
- package/dist/components/TextLink/TextLink.d.ts +8 -1
- package/dist/components/TextLink/TextLink.d.ts.map +1 -1
- package/dist/components/TextLink/TextLink.stories.d.ts +9 -0
- package/dist/components/TextLink/TextLink.stories.d.ts.map +1 -1
- package/dist/components/Tree/Tree.d.ts +13 -1
- package/dist/components/Tree/Tree.d.ts.map +1 -1
- package/dist/components/Tree/Tree.meta.d.ts.map +1 -1
- package/dist/components/Tree/Tree.stories.d.ts +9 -0
- package/dist/components/Tree/Tree.stories.d.ts.map +1 -1
- package/dist/components/Tree/styles.css.d.ts +5 -0
- package/dist/components/Tree/styles.css.d.ts.map +1 -1
- package/dist/docs/clickLink.d.ts +4 -0
- package/dist/docs/clickLink.d.ts.map +1 -0
- package/dist/docs/coarsePointer.d.ts +15 -0
- package/dist/docs/coarsePointer.d.ts.map +1 -0
- package/dist/docs/themedSurface.d.ts +8 -0
- package/dist/docs/themedSurface.d.ts.map +1 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2945 -2484
- package/dist/index.js.map +1 -1
- package/dist/shared/navigate.d.ts +25 -0
- package/dist/shared/navigate.d.ts.map +1 -0
- package/dist/table.js +1 -1
- package/package.json +2 -2
- package/src/components/Breadcrumb/Breadcrumb.meta.ts +37 -0
- package/src/components/Breadcrumb/Breadcrumb.stories.tsx +110 -0
- package/src/components/Breadcrumb/Breadcrumb.tsx +95 -0
- package/src/components/Breadcrumb/styles.css.ts +76 -0
- package/src/components/Inline/Inline.meta.ts +2 -1
- package/src/components/LinkButton/LinkButton.meta.ts +1 -1
- package/src/components/LinkButton/LinkButton.stories.tsx +42 -1
- package/src/components/LinkButton/LinkButton.tsx +9 -0
- package/src/components/PageNav/PageNav.meta.ts +35 -0
- package/src/components/PageNav/PageNav.stories.tsx +146 -0
- package/src/components/PageNav/PageNav.tsx +93 -0
- package/src/components/PageNav/styles.css.ts +100 -0
- package/src/components/TableOfContents/TableOfContents.meta.ts +41 -0
- package/src/components/TableOfContents/TableOfContents.stories.tsx +222 -0
- package/src/components/TableOfContents/TableOfContents.tsx +173 -0
- package/src/components/TableOfContents/TableOfContentsContext.ts +20 -0
- package/src/components/TableOfContents/styles.css.ts +147 -0
- package/src/components/TextLink/TextLink.meta.ts +1 -1
- package/src/components/TextLink/TextLink.stories.tsx +42 -1
- package/src/components/TextLink/TextLink.tsx +9 -0
- package/src/components/Tree/Tree.meta.ts +2 -1
- package/src/components/Tree/Tree.stories.tsx +93 -1
- package/src/components/Tree/Tree.tsx +69 -27
- package/src/components/Tree/styles.css.ts +6 -0
- package/src/docs/clickLink.ts +24 -0
- package/src/docs/coarsePointer.ts +42 -0
- package/src/docs/themedSurface.tsx +23 -0
- package/src/index.ts +9 -0
- package/src/shared/linkParts.typecheck.tsx +47 -0
- package/src/shared/navigate.ts +62 -0
- package/dist/Table-Cm5cCnZD.js.map +0 -1
- package/dist/shared/length.typecheck.d.ts +0 -31
- package/dist/shared/length.typecheck.d.ts.map +0 -1
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { OnNavigate } from '../../shared/navigate';
|
|
3
|
+
interface RootProps {
|
|
4
|
+
/** Names the landmark ("Pages"); required, from your text catalog. */
|
|
5
|
+
'aria-label': string;
|
|
6
|
+
/** A `PageNav.Prev` and/or a `PageNav.Next`. */
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
}
|
|
9
|
+
declare function Root({ 'aria-label': ariaLabel, children }: RootProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
interface LinkProps {
|
|
11
|
+
href: string;
|
|
12
|
+
/** The page's title. */
|
|
13
|
+
title: ReactNode;
|
|
14
|
+
/** The direction label above the title ("Previous", "Next"), from your text catalog. */
|
|
15
|
+
label: ReactNode;
|
|
16
|
+
/**
|
|
17
|
+
* Client-side navigation: called for a plain primary click (no modifier
|
|
18
|
+
* key). Call `event.preventDefault()`, then your router's navigate.
|
|
19
|
+
*/
|
|
20
|
+
onNavigate?: OnNavigate;
|
|
21
|
+
}
|
|
22
|
+
declare function Prev({ href, title, label, onNavigate }: LinkProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
declare function Next({ href, title, label, onNavigate }: LinkProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export declare const PageNav: {
|
|
25
|
+
Root: typeof Root;
|
|
26
|
+
Prev: typeof Prev;
|
|
27
|
+
Next: typeof Next;
|
|
28
|
+
};
|
|
29
|
+
export {};
|
|
30
|
+
//# sourceMappingURL=PageNav.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PageNav.d.ts","sourceRoot":"","sources":["../../../src/components/PageNav/PageNav.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,SAAS,EAAa,MAAM,OAAO,CAAA;AAG/D,OAAO,EAAmB,KAAK,UAAU,EAAC,MAAM,uBAAuB,CAAA;AAqBvE,UAAU,SAAS;IACjB,sEAAsE;IACtE,YAAY,EAAE,MAAM,CAAA;IACpB,gDAAgD;IAChD,QAAQ,EAAE,SAAS,CAAA;CACpB;AAED,iBAAS,IAAI,CAAC,EAAC,YAAY,EAAE,SAAS,EAAE,QAAQ,EAAC,EAAE,SAAS,2CAQ3D;AAID,UAAU,SAAS;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,wBAAwB;IACxB,KAAK,EAAE,SAAS,CAAA;IAChB,wFAAwF;IACxF,KAAK,EAAE,SAAS,CAAA;IAChB;;;OAGG;IACH,UAAU,CAAC,EAAE,UAAU,CAAA;CACxB;AAED,iBAAS,IAAI,CAAC,EAAC,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAC,EAAE,SAAS,2CAcxD;AAED,iBAAS,IAAI,CAAC,EAAC,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAC,EAAE,SAAS,2CAcxD;AAED,eAAO,MAAM,OAAO;;;;CAInB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PageNav.meta.d.ts","sourceRoot":"","sources":["../../../src/components/PageNav/PageNav.meta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,mBAAmB,CAAA;AAEpD,eAAO,MAAM,IAAI,EAAE,aAgClB,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { OnNavigate } from '../../shared/navigate';
|
|
3
|
+
declare const meta: Meta;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
/** The first page of a section: no Prev, and Next keeps the right half. */
|
|
8
|
+
export declare const OnlyNext: Story;
|
|
9
|
+
/** The last page of a section: no Next, and Prev keeps the left half. */
|
|
10
|
+
export declare const OnlyPrev: Story;
|
|
11
|
+
/** Below the xs container width the cards stack, Prev first. */
|
|
12
|
+
export declare const Stacked: Story;
|
|
13
|
+
export declare const ClientNavigation: StoryObj<{
|
|
14
|
+
onNavigate: OnNavigate;
|
|
15
|
+
}>;
|
|
16
|
+
//# sourceMappingURL=PageNav.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PageNav.stories.d.ts","sourceRoot":"","sources":["../../../src/components/PageNav/PageNav.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,IAAI,EAAE,QAAQ,EAAC,MAAM,kBAAkB,CAAA;AAMpD,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,uBAAuB,CAAA;AAErD,QAAA,MAAM,IAAI,EAAE,IAIX,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAA;AA+BrB,eAAO,MAAM,OAAO,EAAE,KAoBrB,CAAA;AAED,2EAA2E;AAC3E,eAAO,MAAM,QAAQ,EAAE,KAetB,CAAA;AAED,yEAAyE;AACzE,eAAO,MAAM,QAAQ,EAAE,KAgBtB,CAAA;AAED,gEAAgE;AAChE,eAAO,MAAM,OAAO,EAAE,KAgBrB,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC;IAAC,UAAU,EAAE,UAAU,CAAA;CAAC,CAoB/D,CAAA"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { css } from 'react-strict-dom';
|
|
2
|
+
export declare const styles: Readonly<{
|
|
3
|
+
readonly root: Readonly<{
|
|
4
|
+
readonly containerType: css.StyleXClassNameFor<"containerType", "inline-size">;
|
|
5
|
+
readonly minWidth: css.StyleXClassNameFor<"minWidth", 0>;
|
|
6
|
+
}>;
|
|
7
|
+
readonly grid: Readonly<{
|
|
8
|
+
readonly display: css.StyleXClassNameFor<"display", "grid">;
|
|
9
|
+
readonly gridTemplateColumns: css.StyleXClassNameFor<"gridTemplateColumns", "minmax(0, 1fr) minmax(0, 1fr)" | "minmax(0, 1fr)">;
|
|
10
|
+
readonly gap: css.StyleXClassNameFor<"gap", string>;
|
|
11
|
+
}>;
|
|
12
|
+
readonly card: Readonly<{
|
|
13
|
+
readonly display: css.StyleXClassNameFor<"display", "flex">;
|
|
14
|
+
readonly flexDirection: css.StyleXClassNameFor<"flexDirection", "column">;
|
|
15
|
+
readonly padding: css.StyleXClassNameFor<"padding", string>;
|
|
16
|
+
readonly fontFamily: css.StyleXClassNameFor<"fontFamily", string>;
|
|
17
|
+
readonly color: css.StyleXClassNameFor<"color", string>;
|
|
18
|
+
readonly textDecorationLine: css.StyleXClassNameFor<"textDecorationLine", "none">;
|
|
19
|
+
readonly backgroundColor: css.StyleXClassNameFor<"backgroundColor", string>;
|
|
20
|
+
readonly borderWidth: css.StyleXClassNameFor<"borderWidth", string>;
|
|
21
|
+
readonly borderStyle: css.StyleXClassNameFor<"borderStyle", "solid">;
|
|
22
|
+
readonly borderColor: css.StyleXClassNameFor<"borderColor", string>;
|
|
23
|
+
readonly borderRadius: css.StyleXClassNameFor<"borderRadius", string>;
|
|
24
|
+
readonly cursor: css.StyleXClassNameFor<"cursor", "pointer">;
|
|
25
|
+
readonly transitionProperty: css.StyleXClassNameFor<"transitionProperty", "background-color">;
|
|
26
|
+
readonly transitionDuration: css.StyleXClassNameFor<"transitionDuration", string>;
|
|
27
|
+
readonly transitionTimingFunction: css.StyleXClassNameFor<"transitionTimingFunction", string>;
|
|
28
|
+
readonly outlineWidth: css.StyleXClassNameFor<"outlineWidth", string | 0>;
|
|
29
|
+
readonly outlineStyle: css.StyleXClassNameFor<"outlineStyle", "none" | "solid">;
|
|
30
|
+
readonly outlineColor: css.StyleXClassNameFor<"outlineColor", string>;
|
|
31
|
+
readonly outlineOffset: css.StyleXClassNameFor<"outlineOffset", string | 0>;
|
|
32
|
+
}>;
|
|
33
|
+
readonly prev: Readonly<{
|
|
34
|
+
readonly gridColumn: css.StyleXClassNameFor<"gridColumn", "1" | "auto">;
|
|
35
|
+
readonly gridRow: css.StyleXClassNameFor<"gridRow", "1" | "auto">;
|
|
36
|
+
}>;
|
|
37
|
+
readonly next: Readonly<{
|
|
38
|
+
readonly gridColumn: css.StyleXClassNameFor<"gridColumn", "auto" | "2">;
|
|
39
|
+
readonly gridRow: css.StyleXClassNameFor<"gridRow", "1" | "auto">;
|
|
40
|
+
readonly textAlign: css.StyleXClassNameFor<"textAlign", "left" | "right">;
|
|
41
|
+
}>;
|
|
42
|
+
readonly label: Readonly<{
|
|
43
|
+
readonly fontSize: css.StyleXClassNameFor<"fontSize", string>;
|
|
44
|
+
readonly color: css.StyleXClassNameFor<"color", string>;
|
|
45
|
+
}>;
|
|
46
|
+
readonly title: Readonly<{
|
|
47
|
+
readonly fontSize: css.StyleXClassNameFor<"fontSize", string>;
|
|
48
|
+
readonly overflowWrap: css.StyleXClassNameFor<"overflowWrap", "anywhere">;
|
|
49
|
+
}>;
|
|
50
|
+
}>;
|
|
51
|
+
//# sourceMappingURL=styles.css.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.css.d.ts","sourceRoot":"","sources":["../../../src/components/PageNav/styles.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,kBAAkB,CAAA;AAgBpC,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmFjB,CAAA"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { OnNavigate } from '../../shared/navigate';
|
|
3
|
+
import { TableOfContentsVariant } from './TableOfContentsContext';
|
|
4
|
+
/**
|
|
5
|
+
* The disclosure state (`open`, `defaultOpen`, `onOpenChange`) exists only on
|
|
6
|
+
* the menu: the list variant has no button, so it takes none of them.
|
|
7
|
+
*/
|
|
8
|
+
type RootProps = {
|
|
9
|
+
/** Names the landmark ("On this page"); required, from your text catalog. */
|
|
10
|
+
'aria-label': string;
|
|
11
|
+
/** The id of the section being read; the Item whose href is `#<value>` is active. */
|
|
12
|
+
value?: string | null;
|
|
13
|
+
/**
|
|
14
|
+
* Visible title: the caption above the list, or the menu button's text.
|
|
15
|
+
* The menu button falls back to `aria-label`; the list shows none without it.
|
|
16
|
+
*/
|
|
17
|
+
label?: ReactNode;
|
|
18
|
+
children: ReactNode;
|
|
19
|
+
} & ({
|
|
20
|
+
/** `list` (default) for a sidebar; `menu` for a narrow screen, behind a disclosure button (only `menu` takes open / defaultOpen / onOpenChange). */
|
|
21
|
+
variant?: 'list';
|
|
22
|
+
open?: never;
|
|
23
|
+
defaultOpen?: never;
|
|
24
|
+
onOpenChange?: never;
|
|
25
|
+
} | {
|
|
26
|
+
/** `list` (default) for a sidebar; `menu` for a narrow screen, behind a disclosure button (only `menu` takes open / defaultOpen / onOpenChange). */
|
|
27
|
+
variant: 'menu';
|
|
28
|
+
/** Whether the list is shown (controlled). */
|
|
29
|
+
open?: boolean;
|
|
30
|
+
/** Whether the list starts shown (uncontrolled; default false). */
|
|
31
|
+
defaultOpen?: boolean;
|
|
32
|
+
onOpenChange?: (open: boolean) => void;
|
|
33
|
+
});
|
|
34
|
+
declare function Root({ 'aria-label': ariaLabel, value, variant, label, open: openProp, defaultOpen, onOpenChange, children, }: RootProps): import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
interface ItemProps {
|
|
36
|
+
/** The section's anchor, `#<heading id>`. */
|
|
37
|
+
href: string;
|
|
38
|
+
/** The heading's level: 2, or 3 (indented under the 2 before it). */
|
|
39
|
+
level?: 2 | 3;
|
|
40
|
+
/**
|
|
41
|
+
* Client-side navigation: called for a plain primary click (no modifier
|
|
42
|
+
* key). Call `event.preventDefault()`, then scroll or navigate yourself.
|
|
43
|
+
*/
|
|
44
|
+
onNavigate?: OnNavigate;
|
|
45
|
+
children: ReactNode;
|
|
46
|
+
}
|
|
47
|
+
declare function Item({ href, level, onNavigate, children }: ItemProps): import("react/jsx-runtime").JSX.Element;
|
|
48
|
+
export declare const TableOfContents: {
|
|
49
|
+
Root: typeof Root;
|
|
50
|
+
Item: typeof Item;
|
|
51
|
+
};
|
|
52
|
+
export type { TableOfContentsVariant };
|
|
53
|
+
//# sourceMappingURL=TableOfContents.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableOfContents.d.ts","sourceRoot":"","sources":["../../../src/components/TableOfContents/TableOfContents.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,SAAS,EAAsC,MAAM,OAAO,CAAA;AAIzE,OAAO,EAAoC,KAAK,UAAU,EAAC,MAAM,uBAAuB,CAAA;AACxF,OAAO,EAGL,KAAK,sBAAsB,EAC5B,MAAM,0BAA0B,CAAA;AAejC;;;GAGG;AACH,KAAK,SAAS,GAAG;IACf,6EAA6E;IAC7E,YAAY,EAAE,MAAM,CAAA;IACpB,qFAAqF;IACrF,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,QAAQ,EAAE,SAAS,CAAA;CACpB,GAAG,CACA;IACE,oJAAoJ;IACpJ,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,KAAK,CAAA;IACZ,WAAW,CAAC,EAAE,KAAK,CAAA;IACnB,YAAY,CAAC,EAAE,KAAK,CAAA;CACrB,GACD;IACE,oJAAoJ;IACpJ,OAAO,EAAE,MAAM,CAAA;IACf,8CAA8C;IAC9C,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,mEAAmE;IACnE,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;CACvC,CACJ,CAAA;AAED,iBAAS,IAAI,CAAC,EACZ,YAAY,EAAE,SAAS,EACvB,KAAY,EACZ,OAAgB,EAChB,KAAK,EACL,IAAI,EAAE,QAAQ,EACd,WAAmB,EACnB,YAAY,EACZ,QAAQ,GACT,EAAE,SAAS,2CAwDX;AAID,UAAU,SAAS;IACjB,6CAA6C;IAC7C,IAAI,EAAE,MAAM,CAAA;IACZ,qEAAqE;IACrE,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,CAAA;IACb;;;OAGG;IACH,UAAU,CAAC,EAAE,UAAU,CAAA;IACvB,QAAQ,EAAE,SAAS,CAAA;CACpB;AAED,iBAAS,IAAI,CAAC,EAAC,IAAI,EAAE,KAAS,EAAE,UAAU,EAAE,QAAQ,EAAC,EAAE,SAAS,2CAyB/D;AAED,eAAO,MAAM,eAAe;;;CAG3B,CAAA;AAED,YAAY,EAAC,sBAAsB,EAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableOfContents.meta.d.ts","sourceRoot":"","sources":["../../../src/components/TableOfContents/TableOfContents.meta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,mBAAmB,CAAA;AAEpD,eAAO,MAAM,IAAI,EAAE,aAsClB,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { OnNavigate } from '../../shared/navigate';
|
|
3
|
+
declare const meta: Meta;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj;
|
|
6
|
+
export declare const List: Story;
|
|
7
|
+
export declare const KeyboardOrder: Story;
|
|
8
|
+
/** The app owns the scroll-spy and passes the section being read as `value`. */
|
|
9
|
+
export declare const ControlledValue: Story;
|
|
10
|
+
export declare const Menu: Story;
|
|
11
|
+
export declare const ClientNavigation: StoryObj<{
|
|
12
|
+
onNavigate: OnNavigate;
|
|
13
|
+
}>;
|
|
14
|
+
/**
|
|
15
|
+
* A touch screen gets 44px items in the list variant too (coarse pointer); a
|
|
16
|
+
* mouse keeps the artboard's compact rail.
|
|
17
|
+
* It drives Chrome's touch emulation through Vitest's CDP session, so it runs
|
|
18
|
+
* as a test and stays out of the dev sidebar (there is no Vitest there).
|
|
19
|
+
*/
|
|
20
|
+
export declare const TouchTargets: Story;
|
|
21
|
+
//# sourceMappingURL=TableOfContents.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableOfContents.stories.d.ts","sourceRoot":"","sources":["../../../src/components/TableOfContents/TableOfContents.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,IAAI,EAAE,QAAQ,EAAC,MAAM,kBAAkB,CAAA;AASpD,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,uBAAuB,CAAA;AAErD,QAAA,MAAM,IAAI,EAAE,IAIX,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAA;AAsCrB,eAAO,MAAM,IAAI,EAAE,KAyBlB,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,KAkB3B,CAAA;AAED,gFAAgF;AAChF,eAAO,MAAM,eAAe,EAAE,KAyB7B,CAAA;AAED,eAAO,MAAM,IAAI,EAAE,KAuClB,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC;IAAC,UAAU,EAAE,UAAU,CAAA;CAAC,CAkB/D,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,YAAY,EAAE,KAqB1B,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type TableOfContentsVariant = 'list' | 'menu';
|
|
2
|
+
export interface TableOfContentsContextValue {
|
|
3
|
+
/** the id of the section being read (an Item is active when its href is `#<value>`) */
|
|
4
|
+
value: string | null;
|
|
5
|
+
variant: TableOfContentsVariant;
|
|
6
|
+
/** closes the menu variant's disclosure (no-op for the list) */
|
|
7
|
+
close: () => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const TableOfContentsContext: import('react').Context<TableOfContentsContextValue | null>;
|
|
10
|
+
export declare function useTableOfContents(): TableOfContentsContextValue;
|
|
11
|
+
//# sourceMappingURL=TableOfContentsContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableOfContentsContext.d.ts","sourceRoot":"","sources":["../../../src/components/TableOfContents/TableOfContentsContext.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,sBAAsB,GAAG,MAAM,GAAG,MAAM,CAAA;AAEpD,MAAM,WAAW,2BAA2B;IAC1C,uFAAuF;IACvF,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,OAAO,EAAE,sBAAsB,CAAA;IAC/B,gEAAgE;IAChE,KAAK,EAAE,MAAM,IAAI,CAAA;CAClB;AAED,eAAO,MAAM,sBAAsB,6DAA0D,CAAA;AAE7F,wBAAgB,kBAAkB,gCAKjC"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { css } from 'react-strict-dom';
|
|
2
|
+
export declare const styles: Readonly<{
|
|
3
|
+
readonly root: Readonly<{
|
|
4
|
+
readonly display: css.StyleXClassNameFor<"display", "flex">;
|
|
5
|
+
readonly flexDirection: css.StyleXClassNameFor<"flexDirection", "column">;
|
|
6
|
+
readonly minWidth: css.StyleXClassNameFor<"minWidth", 0>;
|
|
7
|
+
readonly fontFamily: css.StyleXClassNameFor<"fontFamily", string>;
|
|
8
|
+
}>;
|
|
9
|
+
readonly caption: Readonly<{
|
|
10
|
+
readonly marginBottom: css.StyleXClassNameFor<"marginBottom", string>;
|
|
11
|
+
readonly fontSize: css.StyleXClassNameFor<"fontSize", string>;
|
|
12
|
+
readonly fontWeight: css.StyleXClassNameFor<"fontWeight", string>;
|
|
13
|
+
readonly letterSpacing: css.StyleXClassNameFor<"letterSpacing", string>;
|
|
14
|
+
readonly textTransform: css.StyleXClassNameFor<"textTransform", "uppercase">;
|
|
15
|
+
readonly color: css.StyleXClassNameFor<"color", string>;
|
|
16
|
+
}>;
|
|
17
|
+
readonly list: Readonly<{
|
|
18
|
+
readonly display: css.StyleXClassNameFor<"display", "flex">;
|
|
19
|
+
readonly flexDirection: css.StyleXClassNameFor<"flexDirection", "column">;
|
|
20
|
+
readonly gap: css.StyleXClassNameFor<"gap", string>;
|
|
21
|
+
readonly margin: css.StyleXClassNameFor<"margin", 0>;
|
|
22
|
+
readonly padding: css.StyleXClassNameFor<"padding", 0>;
|
|
23
|
+
readonly listStyleType: css.StyleXClassNameFor<"listStyleType", "none">;
|
|
24
|
+
readonly borderLeftWidth: css.StyleXClassNameFor<"borderLeftWidth", string>;
|
|
25
|
+
readonly borderLeftStyle: css.StyleXClassNameFor<"borderLeftStyle", "solid">;
|
|
26
|
+
readonly borderLeftColor: css.StyleXClassNameFor<"borderLeftColor", string>;
|
|
27
|
+
}>;
|
|
28
|
+
readonly listMenu: Readonly<{
|
|
29
|
+
readonly gap: css.StyleXClassNameFor<"gap", 0>;
|
|
30
|
+
readonly marginTop: css.StyleXClassNameFor<"marginTop", string>;
|
|
31
|
+
readonly paddingTop: css.StyleXClassNameFor<"paddingTop", string>;
|
|
32
|
+
readonly paddingBottom: css.StyleXClassNameFor<"paddingBottom", string>;
|
|
33
|
+
readonly borderWidth: css.StyleXClassNameFor<"borderWidth", string>;
|
|
34
|
+
readonly borderStyle: css.StyleXClassNameFor<"borderStyle", "solid">;
|
|
35
|
+
readonly borderColor: css.StyleXClassNameFor<"borderColor", string>;
|
|
36
|
+
readonly borderRadius: css.StyleXClassNameFor<"borderRadius", string>;
|
|
37
|
+
readonly backgroundColor: css.StyleXClassNameFor<"backgroundColor", string>;
|
|
38
|
+
}>;
|
|
39
|
+
readonly item: Readonly<{
|
|
40
|
+
readonly display: css.StyleXClassNameFor<"display", "flex">;
|
|
41
|
+
readonly flexDirection: css.StyleXClassNameFor<"flexDirection", "column">;
|
|
42
|
+
}>;
|
|
43
|
+
readonly link: Readonly<{
|
|
44
|
+
readonly display: css.StyleXClassNameFor<"display", "flex" | "block">;
|
|
45
|
+
readonly alignItems: css.StyleXClassNameFor<"alignItems", "center" | null>;
|
|
46
|
+
readonly minHeight: css.StyleXClassNameFor<"minHeight", string | null>;
|
|
47
|
+
readonly paddingTop: css.StyleXClassNameFor<"paddingTop", string>;
|
|
48
|
+
readonly paddingBottom: css.StyleXClassNameFor<"paddingBottom", string>;
|
|
49
|
+
readonly paddingLeft: css.StyleXClassNameFor<"paddingLeft", string>;
|
|
50
|
+
readonly paddingRight: css.StyleXClassNameFor<"paddingRight", string>;
|
|
51
|
+
readonly fontSize: css.StyleXClassNameFor<"fontSize", string>;
|
|
52
|
+
readonly fontWeight: css.StyleXClassNameFor<"fontWeight", string>;
|
|
53
|
+
readonly textDecorationLine: css.StyleXClassNameFor<"textDecorationLine", "none">;
|
|
54
|
+
readonly color: css.StyleXClassNameFor<"color", string>;
|
|
55
|
+
readonly cursor: css.StyleXClassNameFor<"cursor", "pointer">;
|
|
56
|
+
readonly transitionProperty: css.StyleXClassNameFor<"transitionProperty", "color">;
|
|
57
|
+
readonly transitionDuration: css.StyleXClassNameFor<"transitionDuration", string>;
|
|
58
|
+
readonly transitionTimingFunction: css.StyleXClassNameFor<"transitionTimingFunction", string>;
|
|
59
|
+
}>;
|
|
60
|
+
readonly linkMenu: Readonly<{
|
|
61
|
+
readonly display: css.StyleXClassNameFor<"display", "flex">;
|
|
62
|
+
readonly alignItems: css.StyleXClassNameFor<"alignItems", "center">;
|
|
63
|
+
readonly minHeight: css.StyleXClassNameFor<"minHeight", string>;
|
|
64
|
+
}>;
|
|
65
|
+
readonly level3: Readonly<{
|
|
66
|
+
readonly paddingLeft: css.StyleXClassNameFor<"paddingLeft", `calc(${css.StyleXVar<string>} + ${css.StyleXVar<string>})`>;
|
|
67
|
+
}>;
|
|
68
|
+
readonly linkActive: Readonly<{
|
|
69
|
+
readonly color: css.StyleXClassNameFor<"color", string>;
|
|
70
|
+
readonly fontWeight: css.StyleXClassNameFor<"fontWeight", string>;
|
|
71
|
+
readonly boxShadow: css.StyleXClassNameFor<"boxShadow", `inset ${css.StyleXVar<string>} 0 0 ${css.StyleXVar<string>}`>;
|
|
72
|
+
}>;
|
|
73
|
+
readonly trigger: Readonly<{
|
|
74
|
+
readonly display: css.StyleXClassNameFor<"display", "flex">;
|
|
75
|
+
readonly alignItems: css.StyleXClassNameFor<"alignItems", "center">;
|
|
76
|
+
readonly justifyContent: css.StyleXClassNameFor<"justifyContent", "space-between">;
|
|
77
|
+
readonly gap: css.StyleXClassNameFor<"gap", string>;
|
|
78
|
+
readonly width: css.StyleXClassNameFor<"width", "100%">;
|
|
79
|
+
readonly minHeight: css.StyleXClassNameFor<"minHeight", string>;
|
|
80
|
+
readonly paddingTop: css.StyleXClassNameFor<"paddingTop", string>;
|
|
81
|
+
readonly paddingBottom: css.StyleXClassNameFor<"paddingBottom", string>;
|
|
82
|
+
readonly paddingLeft: css.StyleXClassNameFor<"paddingLeft", string>;
|
|
83
|
+
readonly paddingRight: css.StyleXClassNameFor<"paddingRight", string>;
|
|
84
|
+
readonly fontFamily: css.StyleXClassNameFor<"fontFamily", string>;
|
|
85
|
+
readonly fontSize: css.StyleXClassNameFor<"fontSize", string>;
|
|
86
|
+
readonly color: css.StyleXClassNameFor<"color", string>;
|
|
87
|
+
readonly textAlign: css.StyleXClassNameFor<"textAlign", "left">;
|
|
88
|
+
readonly backgroundColor: css.StyleXClassNameFor<"backgroundColor", string>;
|
|
89
|
+
readonly borderWidth: css.StyleXClassNameFor<"borderWidth", string>;
|
|
90
|
+
readonly borderStyle: css.StyleXClassNameFor<"borderStyle", "solid">;
|
|
91
|
+
readonly borderColor: css.StyleXClassNameFor<"borderColor", string>;
|
|
92
|
+
readonly borderRadius: css.StyleXClassNameFor<"borderRadius", string>;
|
|
93
|
+
readonly cursor: css.StyleXClassNameFor<"cursor", "pointer">;
|
|
94
|
+
readonly transitionProperty: css.StyleXClassNameFor<"transitionProperty", "background-color">;
|
|
95
|
+
readonly transitionDuration: css.StyleXClassNameFor<"transitionDuration", string>;
|
|
96
|
+
readonly transitionTimingFunction: css.StyleXClassNameFor<"transitionTimingFunction", string>;
|
|
97
|
+
}>;
|
|
98
|
+
readonly focusable: Readonly<{
|
|
99
|
+
readonly outlineWidth: css.StyleXClassNameFor<"outlineWidth", string | 0>;
|
|
100
|
+
readonly outlineStyle: css.StyleXClassNameFor<"outlineStyle", "none" | "solid">;
|
|
101
|
+
readonly outlineColor: css.StyleXClassNameFor<"outlineColor", string>;
|
|
102
|
+
readonly outlineOffset: css.StyleXClassNameFor<"outlineOffset", 0 | `calc(-1 * ${css.StyleXVar<string>})`>;
|
|
103
|
+
}>;
|
|
104
|
+
readonly chevron: Readonly<{
|
|
105
|
+
readonly color: css.StyleXClassNameFor<"color", string>;
|
|
106
|
+
readonly transitionProperty: css.StyleXClassNameFor<"transitionProperty", "transform">;
|
|
107
|
+
readonly transitionDuration: css.StyleXClassNameFor<"transitionDuration", string>;
|
|
108
|
+
readonly transitionTimingFunction: css.StyleXClassNameFor<"transitionTimingFunction", string>;
|
|
109
|
+
}>;
|
|
110
|
+
readonly chevronOpen: Readonly<{
|
|
111
|
+
readonly transform: css.StyleXClassNameFor<"transform", "rotate(180deg)">;
|
|
112
|
+
}>;
|
|
113
|
+
}>;
|
|
114
|
+
//# sourceMappingURL=styles.css.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.css.d.ts","sourceRoot":"","sources":["../../../src/components/TableOfContents/styles.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,kBAAkB,CAAA;AAWpC,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuIjB,CAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
import { OnNavigate } from '../../shared/navigate';
|
|
2
3
|
export type TextLinkVariant = 'default' | 'subtle';
|
|
3
4
|
interface TextLinkProps {
|
|
4
5
|
href: string;
|
|
@@ -13,12 +14,18 @@ interface TextLinkProps {
|
|
|
13
14
|
variant?: TextLinkVariant;
|
|
14
15
|
/** Accessible name, when the visible text alone does not say where it goes. */
|
|
15
16
|
'aria-label'?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Client-side navigation: called for a plain primary click (no modifier
|
|
19
|
+
* key, no `target`); the browser default runs for every other click. Call
|
|
20
|
+
* `event.preventDefault()`, then your router's navigate.
|
|
21
|
+
*/
|
|
22
|
+
onNavigate?: OnNavigate;
|
|
16
23
|
children: ReactNode;
|
|
17
24
|
}
|
|
18
25
|
/**
|
|
19
26
|
* An inline hyperlink in running text or a standalone "View all" link. For a
|
|
20
27
|
* link that looks like a button, use LinkButton.
|
|
21
28
|
*/
|
|
22
|
-
export declare function TextLink({ href, target, rel, variant, 'aria-label': ariaLabel, children, }: TextLinkProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export declare function TextLink({ href, target, rel, variant, 'aria-label': ariaLabel, onNavigate, children, }: TextLinkProps): import("react/jsx-runtime").JSX.Element;
|
|
23
30
|
export {};
|
|
24
31
|
//# sourceMappingURL=TextLink.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextLink.d.ts","sourceRoot":"","sources":["../../../src/components/TextLink/TextLink.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"TextLink.d.ts","sourceRoot":"","sources":["../../../src/components/TextLink/TextLink.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,OAAO,CAAA;AAGpC,OAAO,EAAmB,KAAK,UAAU,EAAC,MAAM,uBAAuB,CAAA;AAEvE,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,QAAQ,CAAA;AAElD,UAAU,aAAa;IACrB,IAAI,EAAE,MAAM,CAAA;IACZ,8EAA8E;IAC9E,MAAM,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAA;IAC3B,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ;;;;OAIG;IACH,OAAO,CAAC,EAAE,eAAe,CAAA;IACzB,+EAA+E;IAC/E,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB;;;;OAIG;IACH,UAAU,CAAC,EAAE,UAAU,CAAA;IACvB,QAAQ,EAAE,SAAS,CAAA;CACpB;AAED;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,EACvB,IAAI,EACJ,MAAM,EACN,GAAG,EACH,OAAmB,EACnB,YAAY,EAAE,SAAS,EACvB,UAAU,EACV,QAAQ,GACT,EAAE,aAAa,2CAaf"}
|
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
import { Meta, StoryObj } from '@storybook/react';
|
|
2
2
|
import { TextLink } from './TextLink';
|
|
3
|
+
import { OnNavigate } from '../../shared/navigate';
|
|
3
4
|
declare const meta: Meta<typeof TextLink>;
|
|
4
5
|
export default meta;
|
|
5
6
|
type Story = StoryObj<typeof TextLink>;
|
|
6
7
|
export declare const InRunningText: Story;
|
|
7
8
|
export declare const Standalone: Story;
|
|
8
9
|
export declare const KeyboardFocus: Story;
|
|
10
|
+
/**
|
|
11
|
+
* Client-side navigation: `onNavigate` gets a plain primary click (the app
|
|
12
|
+
* calls `event.preventDefault()`, then its router's navigate); a modified
|
|
13
|
+
* click, or a link with `target`, keeps the browser default.
|
|
14
|
+
*/
|
|
15
|
+
export declare const ClientNavigation: StoryObj<{
|
|
16
|
+
onNavigate: OnNavigate;
|
|
17
|
+
}>;
|
|
9
18
|
//# sourceMappingURL=TextLink.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextLink.stories.d.ts","sourceRoot":"","sources":["../../../src/components/TextLink/TextLink.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,IAAI,EAAE,QAAQ,EAAC,MAAM,kBAAkB,CAAA;AAEpD,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"TextLink.stories.d.ts","sourceRoot":"","sources":["../../../src/components/TextLink/TextLink.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,IAAI,EAAE,QAAQ,EAAC,MAAM,kBAAkB,CAAA;AAEpD,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAA;AAGnC,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,uBAAuB,CAAA;AAIrD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,QAAQ,CAI/B,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,QAAQ,CAAC,CAAA;AAEtC,eAAO,MAAM,aAAa,EAAE,KAkB3B,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KAiBxB,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,KAQ3B,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC;IAAC,UAAU,EAAE,UAAU,CAAA;CAAC,CA+B/D,CAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
import { OnNavigate } from '../../shared/navigate';
|
|
2
3
|
interface RootProps {
|
|
3
4
|
children: ReactNode;
|
|
4
5
|
/** accessible name of the tree (or give `aria-labelledby`) */
|
|
@@ -25,8 +26,19 @@ interface ItemProps {
|
|
|
25
26
|
children?: ReactNode;
|
|
26
27
|
/** trailing content on the row (a count, a status) */
|
|
27
28
|
meta?: ReactNode;
|
|
29
|
+
/**
|
|
30
|
+
* Makes the row a link to this URL. A plain click (or Enter / Space)
|
|
31
|
+
* selects the item and calls `onNavigate`; a modified click keeps the
|
|
32
|
+
* browser default (new tab, new window) and does not select.
|
|
33
|
+
*/
|
|
34
|
+
href?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Client-side navigation for `href`: called for a plain primary click. Call
|
|
37
|
+
* `event.preventDefault()`, then your router's navigate.
|
|
38
|
+
*/
|
|
39
|
+
onNavigate?: OnNavigate;
|
|
28
40
|
}
|
|
29
|
-
declare function Item({ value, label, textValue, children, meta }: ItemProps): import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
declare function Item({ value, label, textValue, children, meta, href, onNavigate }: ItemProps): import("react/jsx-runtime").JSX.Element;
|
|
30
42
|
export declare const Tree: {
|
|
31
43
|
Root: typeof Root;
|
|
32
44
|
Item: typeof Item;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tree.d.ts","sourceRoot":"","sources":["../../../src/components/Tree/Tree.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,SAAS,EAQf,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"Tree.d.ts","sourceRoot":"","sources":["../../../src/components/Tree/Tree.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,SAAS,EAQf,MAAM,OAAO,CAAA;AAId,OAAO,EAAoC,KAAK,UAAU,EAAC,MAAM,uBAAuB,CAAA;AAgBxF,UAAU,SAAS;IACjB,QAAQ,EAAE,SAAS,CAAA;IACnB,8DAA8D;IAC9D,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,qCAAqC;IACrC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACvC,qCAAqC;IACrC,QAAQ,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAA;IAChC,eAAe,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAA;IACvC,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,IAAI,CAAA;CAChD;AAID,iBAAS,IAAI,CAAC,EACZ,QAAQ,EACR,YAAY,EAAE,SAAS,EACvB,iBAAiB,EAAE,cAAc,EACjC,KAAK,EACL,YAAmB,EACnB,aAAa,EACb,QAAQ,EACR,eAAoB,EACpB,gBAAgB,GACjB,EAAE,SAAS,2CAkLX;AAID,UAAU,SAAS;IACjB,6BAA6B;IAC7B,KAAK,EAAE,MAAM,CAAA;IACb,yBAAyB;IACzB,KAAK,EAAE,SAAS,CAAA;IAChB,2DAA2D;IAC3D,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,sDAAsD;IACtD,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;;OAGG;IACH,UAAU,CAAC,EAAE,UAAU,CAAA;CACxB;AAED,iBAAS,IAAI,CAAC,EAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAC,EAAE,SAAS,2CA6EnF;AAED,eAAO,MAAM,IAAI;;;CAGhB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tree.meta.d.ts","sourceRoot":"","sources":["../../../src/components/Tree/Tree.meta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,mBAAmB,CAAA;AAEpD,eAAO,MAAM,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"Tree.meta.d.ts","sourceRoot":"","sources":["../../../src/components/Tree/Tree.meta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,mBAAmB,CAAA;AAEpD,eAAO,MAAM,IAAI,EAAE,aAuClB,CAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { OnNavigate } from '../../shared/navigate';
|
|
2
3
|
declare const meta: Meta;
|
|
3
4
|
export default meta;
|
|
4
5
|
type Story = StoryObj;
|
|
@@ -6,4 +7,12 @@ export declare const Default: Story;
|
|
|
6
7
|
export declare const KeyboardNavigation: Story;
|
|
7
8
|
export declare const Typeahead: Story;
|
|
8
9
|
export declare const Controlled: Story;
|
|
10
|
+
/**
|
|
11
|
+
* Items with `href`: each row is a real link (cmd-click opens a tab, "Copy
|
|
12
|
+
* link" works) that stays out of the tab order, so the tree keeps one tab stop
|
|
13
|
+
* and its keyboard. Enter follows the link through `onNavigate`.
|
|
14
|
+
*/
|
|
15
|
+
export declare const WithLinks: StoryObj<{
|
|
16
|
+
onNavigate: OnNavigate;
|
|
17
|
+
}>;
|
|
9
18
|
//# sourceMappingURL=Tree.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tree.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Tree/Tree.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,IAAI,EAAE,QAAQ,EAAC,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"Tree.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Tree/Tree.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,IAAI,EAAE,QAAQ,EAAC,MAAM,kBAAkB,CAAA;AAKpD,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,uBAAuB,CAAA;AAErD,QAAA,MAAM,IAAI,EAAE,IAEX,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAA;AA8BrB,eAAO,MAAM,OAAO,EAAE,KAyBrB,CAAA;AAED,eAAO,MAAM,kBAAkB,EAAE,KAwChC,CAAA;AAED,eAAO,MAAM,SAAS,EAAE,KAgBvB,CAAA;AAcD,eAAO,MAAM,UAAU,EAAE,KAUxB,CAAA;AAiCD;;;;GAIG;AACH,eAAO,MAAM,SAAS,EAAE,QAAQ,CAAC;IAAC,UAAU,EAAE,UAAU,CAAA;CAAC,CAmDxD,CAAA"}
|
|
@@ -37,6 +37,11 @@ export declare const styles: Readonly<{
|
|
|
37
37
|
readonly transitionDuration: css.StyleXClassNameFor<"transitionDuration", string>;
|
|
38
38
|
readonly transitionTimingFunction: css.StyleXClassNameFor<"transitionTimingFunction", string>;
|
|
39
39
|
}>;
|
|
40
|
+
readonly rowLink: Readonly<{
|
|
41
|
+
readonly textDecorationLine: css.StyleXClassNameFor<"textDecorationLine", "none">;
|
|
42
|
+
readonly outlineWidth: css.StyleXClassNameFor<"outlineWidth", 0>;
|
|
43
|
+
readonly outlineStyle: css.StyleXClassNameFor<"outlineStyle", "none">;
|
|
44
|
+
}>;
|
|
40
45
|
readonly indent: (level: number) => readonly [Readonly<{
|
|
41
46
|
paddingLeft: css.StyleXClassNameFor<"paddingLeft", string>;
|
|
42
47
|
}>, css.InlineStyles];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.css.d.ts","sourceRoot":"","sources":["../../../src/components/Tree/styles.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,kBAAkB,CAAA;AAQpC,eAAO,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"styles.css.d.ts","sourceRoot":"","sources":["../../../src/components/Tree/styles.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,kBAAkB,CAAA;AAQpC,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+FjB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clickLink.d.ts","sourceRoot":"","sources":["../../src/docs/clickLink.ts"],"names":[],"mappings":"AAKA,wBAAgB,SAAS,CACvB,IAAI,EAAE,OAAO,EACb,IAAI,GAAE,IAAI,CAAC,cAAc,EAAE,SAAS,GAAG,SAAS,GAAG,UAAU,GAAG,QAAQ,GAAG,QAAQ,CAAM,GACxF;IAAC,gBAAgB,EAAE,OAAO,CAAA;CAAC,CAe7B"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Runs `check` with Chrome's touch emulation on, so `(pointer: coarse)` matches
|
|
3
|
+
* (as DrawerScroll's CoarsePointerRows does), then turns it off again so the
|
|
4
|
+
* stories after this one see a mouse.
|
|
5
|
+
*/
|
|
6
|
+
export declare function withCoarsePointer(check: () => Promise<void>): Promise<void>;
|
|
7
|
+
/**
|
|
8
|
+
* Turns touch emulation off and waits for a mouse. A story that measures the
|
|
9
|
+
* fine-pointer layout calls it first: the browser is shared by every story
|
|
10
|
+
* file, and one that times out mid-emulation (DrawerScroll's, under load)
|
|
11
|
+
* leaves `(pointer: coarse)` on for whatever runs next.
|
|
12
|
+
* holds-until: #81 (DrawerScroll turns emulation off in a `finally`).
|
|
13
|
+
*/
|
|
14
|
+
export declare function withFinePointer(): Promise<void>;
|
|
15
|
+
//# sourceMappingURL=coarsePointer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coarsePointer.d.ts","sourceRoot":"","sources":["../../src/docs/coarsePointer.ts"],"names":[],"mappings":"AAeA;;;;GAIG;AACH,wBAAsB,iBAAiB,CAAC,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,iBASjE;AAED;;;;;;GAMG;AACH,wBAAsB,eAAe,kBAGpC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Decorator } from '@storybook/react';
|
|
2
|
+
/**
|
|
3
|
+
* Paints the theme's page background behind a story. The vitest browser frame
|
|
4
|
+
* has a white page whatever the theme, so axe would measure the dark theme's
|
|
5
|
+
* text against white; on this surface `color-contrast` checks the real pair.
|
|
6
|
+
*/
|
|
7
|
+
export declare const onThemeSurface: Decorator;
|
|
8
|
+
//# sourceMappingURL=themedSurface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"themedSurface.d.ts","sourceRoot":"","sources":["../../src/docs/themedSurface.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,kBAAkB,CAAA;AAa/C;;;;GAIG;AACH,eAAO,MAAM,cAAc,EAAE,SAI5B,CAAA"}
|