@duro-app/ui 5.4.0 → 5.6.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-B1sWL3GA.js} +668 -650
- package/dist/Table-B1sWL3GA.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/Button/Button.d.ts +2 -1
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/Button/styles.css.d.ts +1 -0
- package/dist/components/Button/styles.css.d.ts.map +1 -1
- package/dist/components/ButtonGroup/ButtonGroup.stories.d.ts +14 -0
- package/dist/components/ButtonGroup/ButtonGroup.stories.d.ts.map +1 -1
- 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/LinkButton/styles.css.d.ts +1 -0
- package/dist/components/LinkButton/styles.css.d.ts.map +1 -1
- package/dist/components/Menu/Menu.d.ts +4 -1
- package/dist/components/Menu/Menu.d.ts.map +1 -1
- package/dist/components/Menu/styles.css.d.ts +14 -0
- package/dist/components/Menu/styles.css.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/Popover/Popover.d.ts +14 -2
- package/dist/components/Popover/Popover.d.ts.map +1 -1
- package/dist/components/Popover/Popover.meta.d.ts.map +1 -1
- package/dist/components/Popover/PopoverLayerContext.d.ts +3 -0
- package/dist/components/Popover/PopoverLayerContext.d.ts.map +1 -1
- package/dist/components/Popover/PopoverRaised.stories.d.ts +28 -0
- package/dist/components/Popover/PopoverRaised.stories.d.ts.map +1 -0
- package/dist/components/Popover/styles.css.d.ts +15 -0
- package/dist/components/Popover/styles.css.d.ts.map +1 -1
- package/dist/components/Select/Select.d.ts +4 -1
- package/dist/components/Select/Select.d.ts.map +1 -1
- package/dist/components/Select/styles.css.d.ts +9 -0
- package/dist/components/Select/styles.css.d.ts.map +1 -1
- 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/Toggle/Toggle.d.ts +2 -1
- package/dist/components/Toggle/Toggle.d.ts.map +1 -1
- package/dist/components/Toggle/styles.css.d.ts +1 -0
- package/dist/components/Toggle/styles.css.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 +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2718 -2212
- package/dist/index.js.map +1 -1
- package/dist/shared/ModalContext.d.ts +7 -0
- package/dist/shared/ModalContext.d.ts.map +1 -1
- package/dist/shared/exports.typecheck.d.ts +9 -0
- package/dist/shared/exports.typecheck.d.ts.map +1 -0
- package/dist/shared/navigate.d.ts +25 -0
- package/dist/shared/navigate.d.ts.map +1 -0
- package/dist/shared/types.d.ts +2 -0
- package/dist/shared/types.d.ts.map +1 -1
- 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/Button/Button.tsx +2 -1
- package/src/components/Button/styles.css.ts +3 -0
- package/src/components/ButtonGroup/ButtonGroup.stories.tsx +172 -14
- 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/LinkButton/styles.css.ts +4 -0
- package/src/components/Menu/Menu.meta.ts +1 -1
- package/src/components/Menu/Menu.tsx +17 -2
- package/src/components/Menu/styles.css.ts +18 -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/Popover/Popover.meta.ts +2 -1
- package/src/components/Popover/Popover.tsx +29 -4
- package/src/components/Popover/PopoverLayerContext.ts +3 -0
- package/src/components/Popover/PopoverRaised.stories.tsx +334 -0
- package/src/components/Popover/styles.css.ts +21 -0
- package/src/components/Select/Select.meta.ts +1 -1
- package/src/components/Select/Select.tsx +5 -1
- package/src/components/Select/styles.css.ts +12 -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/Toggle/Toggle.tsx +2 -1
- package/src/components/Toggle/styles.css.ts +2 -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 +11 -0
- package/src/shared/ModalContext.ts +8 -1
- package/src/shared/exports.typecheck.ts +16 -0
- package/src/shared/linkParts.typecheck.tsx +47 -0
- package/src/shared/navigate.ts +62 -0
- package/src/shared/types.ts +3 -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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonGroup.stories.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonGroup/ButtonGroup.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,IAAI,EAAE,QAAQ,EAAC,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"ButtonGroup.stories.d.ts","sourceRoot":"","sources":["../../../src/components/ButtonGroup/ButtonGroup.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,IAAI,EAAE,QAAQ,EAAC,MAAM,kBAAkB,CAAA;AAWpD,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAA;AAazC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,WAAW,CASlC,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,WAAW,CAAC,CAAA;AAEzC,eAAO,MAAM,OAAO,EAAE,KAcrB,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KActB,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KAaxB,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KAatB,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KAqBtB,CAAA;AA2ED,sEAAsE;AACtE,eAAO,MAAM,eAAe,EAAE,KAK7B,CAAA;AAED;yDACyD;AACzD,eAAO,MAAM,oBAAoB,EAAE,KAMlC,CAAA;AAID,eAAO,MAAM,qBAAqB,EAAE,KAkBnC,CAAA;AAED,2EAA2E;AAC3E,eAAO,MAAM,mBAAmB,EAAE,KAgBjC,CAAA;AAkDD;oCACoC;AACpC,eAAO,MAAM,aAAa,EAAE,KAM3B,CAAA;AAED;mCACmC;AACnC,eAAO,MAAM,qBAAqB,EAAE,KAWnC,CAAA;AAiBD,2EAA2E;AAC3E,eAAO,MAAM,wBAAwB,EAAE,KAwBtC,CAAA;AAED;sEACsE;AACtE,eAAO,MAAM,sBAAsB,EAAE,KAwBpC,CAAA;AAQD,6EAA6E;AAC7E,eAAO,MAAM,oBAAoB,EAAE,KASlC,CAAA;AAED;+BAC+B;AAC/B,eAAO,MAAM,kBAAkB,EAAE,KAMhC,CAAA;AAkDD;;;8EAG8E;AAC9E,eAAO,MAAM,gBAAgB,EAAE,KA4B9B,CAAA;AAED;;2CAE2C;AAC3C,eAAO,MAAM,6BAA6B,EAAE,KAmB3C,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Inline.meta.d.ts","sourceRoot":"","sources":["../../../src/components/Inline/Inline.meta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,mBAAmB,CAAA;AAEpD,eAAO,MAAM,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"Inline.meta.d.ts","sourceRoot":"","sources":["../../../src/components/Inline/Inline.meta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,mBAAmB,CAAA;AAEpD,eAAO,MAAM,IAAI,EAAE,aA4BlB,CAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
import { OnNavigate } from '../../shared/navigate';
|
|
2
3
|
export type LinkButtonVariant = 'primary' | 'secondary';
|
|
3
4
|
export type LinkButtonSize = 'default' | 'small';
|
|
4
5
|
interface LinkButtonProps {
|
|
@@ -8,8 +9,14 @@ interface LinkButtonProps {
|
|
|
8
9
|
fullWidth?: boolean;
|
|
9
10
|
target?: '_blank' | '_self';
|
|
10
11
|
rel?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Client-side navigation: called for a plain primary click (no modifier
|
|
14
|
+
* key, no `target`); the browser default runs for every other click. Call
|
|
15
|
+
* `event.preventDefault()`, then your router's navigate.
|
|
16
|
+
*/
|
|
17
|
+
onNavigate?: OnNavigate;
|
|
11
18
|
children: ReactNode;
|
|
12
19
|
}
|
|
13
|
-
export declare function LinkButton({ href, variant, size, fullWidth, target, rel, children, }: LinkButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare function LinkButton({ href, variant, size, fullWidth, target, rel, onNavigate, children, }: LinkButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
14
21
|
export {};
|
|
15
22
|
//# sourceMappingURL=LinkButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinkButton.d.ts","sourceRoot":"","sources":["../../../src/components/LinkButton/LinkButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"LinkButton.d.ts","sourceRoot":"","sources":["../../../src/components/LinkButton/LinkButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,OAAO,CAAA;AAGpC,OAAO,EAAmB,KAAK,UAAU,EAAC,MAAM,uBAAuB,CAAA;AAEvE,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,WAAW,CAAA;AACvD,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,OAAO,CAAA;AAEhD,UAAU,eAAe;IACvB,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,CAAC,EAAE,iBAAiB,CAAA;IAC3B,IAAI,CAAC,EAAE,cAAc,CAAA;IACrB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,MAAM,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAA;IAC3B,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ;;;;OAIG;IACH,UAAU,CAAC,EAAE,UAAU,CAAA;IACvB,QAAQ,EAAE,SAAS,CAAA;CACpB;AAOD,wBAAgB,UAAU,CAAC,EACzB,IAAI,EACJ,OAAmB,EACnB,IAAgB,EAChB,SAAiB,EACjB,MAAM,EACN,GAAG,EACH,UAAU,EACV,QAAQ,GACT,EAAE,eAAe,2CAYjB"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Meta, StoryObj } from '@storybook/react';
|
|
2
2
|
import { LinkButton } from './LinkButton';
|
|
3
|
+
import { OnNavigate } from '../../shared/navigate';
|
|
3
4
|
declare const meta: Meta<typeof LinkButton>;
|
|
4
5
|
export default meta;
|
|
5
6
|
type Story = StoryObj<typeof LinkButton>;
|
|
@@ -9,4 +10,12 @@ export declare const Small: Story;
|
|
|
9
10
|
export declare const FullWidth: Story;
|
|
10
11
|
export declare const ExternalLink: Story;
|
|
11
12
|
export declare const AllVariants: Story;
|
|
13
|
+
/**
|
|
14
|
+
* Client-side navigation: `onNavigate` gets a plain primary click (the app
|
|
15
|
+
* calls `event.preventDefault()`, then its router's navigate); a modified
|
|
16
|
+
* click, or a link with `target`, keeps the browser default.
|
|
17
|
+
*/
|
|
18
|
+
export declare const ClientNavigation: StoryObj<{
|
|
19
|
+
onNavigate: OnNavigate;
|
|
20
|
+
}>;
|
|
12
21
|
//# sourceMappingURL=LinkButton.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinkButton.stories.d.ts","sourceRoot":"","sources":["../../../src/components/LinkButton/LinkButton.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,IAAI,EAAE,QAAQ,EAAC,MAAM,kBAAkB,CAAA;AAGpD,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAA;AAGvC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,UAAU,CAcjC,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,UAAU,CAAC,CAAA;AAExC,eAAO,MAAM,OAAO,EAAE,KAOrB,CAAA;AAED,eAAO,MAAM,SAAS,EAAE,KAKvB,CAAA;AAED,eAAO,MAAM,KAAK,EAAE,KAEnB,CAAA;AAED,eAAO,MAAM,SAAS,EAAE,KAEvB,CAAA;AAED,eAAO,MAAM,YAAY,EAAE,KAY1B,CAAA;AAOD,eAAO,MAAM,WAAW,EAAE,KAuBzB,CAAA"}
|
|
1
|
+
{"version":3,"file":"LinkButton.stories.d.ts","sourceRoot":"","sources":["../../../src/components/LinkButton/LinkButton.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,IAAI,EAAE,QAAQ,EAAC,MAAM,kBAAkB,CAAA;AAGpD,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAA;AAGvC,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,uBAAuB,CAAA;AAGrD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,UAAU,CAcjC,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,UAAU,CAAC,CAAA;AAExC,eAAO,MAAM,OAAO,EAAE,KAOrB,CAAA;AAED,eAAO,MAAM,SAAS,EAAE,KAKvB,CAAA;AAED,eAAO,MAAM,KAAK,EAAE,KAEnB,CAAA;AAED,eAAO,MAAM,SAAS,EAAE,KAEvB,CAAA;AAED,eAAO,MAAM,YAAY,EAAE,KAY1B,CAAA;AAOD,eAAO,MAAM,WAAW,EAAE,KAuBzB,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC;IAAC,UAAU,EAAE,UAAU,CAAA;CAAC,CA+B/D,CAAA"}
|
|
@@ -28,6 +28,7 @@ export declare const styles: Readonly<{
|
|
|
28
28
|
readonly paddingLeft: css.StyleXClassNameFor<"paddingLeft", string>;
|
|
29
29
|
readonly paddingRight: css.StyleXClassNameFor<"paddingRight", string>;
|
|
30
30
|
readonly fontSize: css.StyleXClassNameFor<"fontSize", string>;
|
|
31
|
+
readonly minHeight: css.StyleXClassNameFor<"minHeight", string>;
|
|
31
32
|
}>;
|
|
32
33
|
readonly primary: Readonly<{
|
|
33
34
|
readonly backgroundColor: css.StyleXClassNameFor<"backgroundColor", string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.css.d.ts","sourceRoot":"","sources":["../../../src/components/LinkButton/styles.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"styles.css.d.ts","sourceRoot":"","sources":["../../../src/components/LinkButton/styles.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,kBAAkB,CAAA;AAQpC,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqDjB,CAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ReactNode, Ref } from 'react';
|
|
2
|
+
import { ControlSize } from '../../shared/types';
|
|
2
3
|
interface RootProps {
|
|
3
4
|
children: ReactNode;
|
|
4
5
|
/** Controlled open state. */
|
|
@@ -16,9 +17,11 @@ interface TriggerProps {
|
|
|
16
17
|
'aria-label'?: string;
|
|
17
18
|
/** `ghost`: no border or fill until hover, for toolbars. Default: `default`. */
|
|
18
19
|
variant?: MenuTriggerVariant;
|
|
20
|
+
/** `small` matches a small Toggle or Button beside it; a small ghost trigger is `iconButtonSm`. Default: `default`. */
|
|
21
|
+
size?: ControlSize;
|
|
19
22
|
ref?: Ref<HTMLButtonElement>;
|
|
20
23
|
}
|
|
21
|
-
declare function Trigger({ children, 'aria-label': ariaLabel, variant, ref }: TriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
declare function Trigger({ children, 'aria-label': ariaLabel, variant, size, ref, }: TriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
22
25
|
interface PopupProps {
|
|
23
26
|
children: ReactNode;
|
|
24
27
|
align?: 'start' | 'end';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/Menu.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,SAAS,EACd,KAAK,GAAG,EAOT,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/Menu.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,SAAS,EACd,KAAK,GAAG,EAOT,MAAM,OAAO,CAAA;AAQd,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,oBAAoB,CAAA;AAQnD,UAAU,SAAS;IACjB,QAAQ,EAAE,SAAS,CAAA;IACnB,6BAA6B;IAC7B,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,yCAAyC;IACzC,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,4CAA4C;IAC5C,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;CACvC;AAED,iBAAS,IAAI,CAAC,EAAC,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,YAAY,EAAC,EAAE,SAAS,2CAUnE;AAQD,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG,OAAO,CAAA;AAEpD,UAAU,YAAY;IACpB,QAAQ,EAAE,SAAS,CAAA;IACnB,iEAAiE;IACjE,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,gFAAgF;IAChF,OAAO,CAAC,EAAE,kBAAkB,CAAA;IAC5B,uHAAuH;IACvH,IAAI,CAAC,EAAE,WAAW,CAAA;IAClB,GAAG,CAAC,EAAE,GAAG,CAAC,iBAAiB,CAAC,CAAA;CAC7B;AAED,iBAAS,OAAO,CAAC,EACf,QAAQ,EACR,YAAY,EAAE,SAAS,EACvB,OAAmB,EACnB,IAAgB,EAChB,GAAG,GACJ,EAAE,YAAY,2CAiDd;AAGD,UAAU,UAAU;IAClB,QAAQ,EAAE,SAAS,CAAA;IACnB,KAAK,CAAC,EAAE,OAAO,GAAG,KAAK,CAAA;CACxB;AAKD,iBAAS,KAAK,CAAC,EAAC,QAAQ,EAAE,KAAe,EAAC,EAAE,UAAU,sCAkDrD;AAGD,UAAU,SAAS;IACjB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,QAAQ,EAAE,SAAS,CAAA;CACpB;AAED,iBAAS,IAAI,CAAC,EAAC,OAAO,EAAE,QAAQ,EAAC,EAAE,SAAS,2CA6B3C;AAGD,UAAU,aAAa;IACrB,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,SAAS,CAAA;CACpB;AAED,iBAAS,QAAQ,CAAC,EAAC,IAAI,EAAE,QAAQ,EAAC,EAAE,aAAa,2CAyBhD;AAMD,iBAAS,SAAS,4CAEjB;AAED,eAAO,MAAM,IAAI;;;;;;;CAOhB,CAAA"}
|
|
@@ -34,6 +34,20 @@ export declare const styles: Readonly<{
|
|
|
34
34
|
readonly paddingRight: css.StyleXClassNameFor<"paddingRight", string>;
|
|
35
35
|
readonly borderColor: css.StyleXClassNameFor<"borderColor", "transparent">;
|
|
36
36
|
}>;
|
|
37
|
+
readonly triggerSmall: Readonly<{
|
|
38
|
+
readonly gap: css.StyleXClassNameFor<"gap", string>;
|
|
39
|
+
readonly paddingTop: css.StyleXClassNameFor<"paddingTop", string>;
|
|
40
|
+
readonly paddingBottom: css.StyleXClassNameFor<"paddingBottom", string>;
|
|
41
|
+
readonly paddingLeft: css.StyleXClassNameFor<"paddingLeft", string>;
|
|
42
|
+
readonly paddingRight: css.StyleXClassNameFor<"paddingRight", string>;
|
|
43
|
+
readonly fontSize: css.StyleXClassNameFor<"fontSize", string>;
|
|
44
|
+
readonly minHeight: css.StyleXClassNameFor<"minHeight", string>;
|
|
45
|
+
}>;
|
|
46
|
+
readonly triggerGhostSmall: Readonly<{
|
|
47
|
+
readonly fontSize: css.StyleXClassNameFor<"fontSize", string>;
|
|
48
|
+
readonly minWidth: css.StyleXClassNameFor<"minWidth", string>;
|
|
49
|
+
readonly minHeight: css.StyleXClassNameFor<"minHeight", string>;
|
|
50
|
+
}>;
|
|
37
51
|
readonly popup: Readonly<{
|
|
38
52
|
readonly position: css.StyleXClassNameFor<"position", "fixed">;
|
|
39
53
|
readonly top: css.StyleXClassNameFor<"top", 0>;
|
|
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4HjB,CAAA"}
|
|
@@ -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"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ReactNode, Ref } from 'react';
|
|
2
2
|
import { PopoverAlign, PopoverSide } from './position';
|
|
3
|
+
import { ControlSize } from '../../shared/types';
|
|
3
4
|
type IgnoreEntry = Element | null | (() => Element | null);
|
|
4
5
|
export interface PopoverHandle {
|
|
5
6
|
/** Re-measure the anchor and re-place the popup. */
|
|
@@ -23,16 +24,27 @@ interface TriggerProps {
|
|
|
23
24
|
children: ReactNode;
|
|
24
25
|
/** Accessible name: required when the label is an icon only. */
|
|
25
26
|
'aria-label'?: string;
|
|
27
|
+
/** `small` matches a small Toggle or Button beside it. Default: `default`. */
|
|
28
|
+
size?: ControlSize;
|
|
26
29
|
/** The trigger <button>, e.g. to measure it or return focus to it. */
|
|
27
30
|
ref?: Ref<HTMLButtonElement>;
|
|
28
31
|
}
|
|
29
|
-
declare function Trigger({ children, 'aria-label': ariaLabel, ref }: TriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
declare function Trigger({ children, 'aria-label': ariaLabel, size, ref }: TriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
30
33
|
interface PopupProps {
|
|
31
34
|
children: ReactNode;
|
|
32
35
|
/** Accessible name for the dialog. */
|
|
33
36
|
label: string;
|
|
37
|
+
/**
|
|
38
|
+
* Draw over another floating surface: `layers.floatingRaised` outside a
|
|
39
|
+
* modal, `layers.popoverRaised` inside a Dialog or Drawer, instead of
|
|
40
|
+
* `floating` / `popover`. For one floating thing that must cover a sibling
|
|
41
|
+
* one (a link editor over a format bar), never for covering a modal: a
|
|
42
|
+
* Dialog opened later still covers it. A Popover nested inside a raised one
|
|
43
|
+
* is raised too. Default: inherited, else `false`.
|
|
44
|
+
*/
|
|
45
|
+
raised?: boolean;
|
|
34
46
|
}
|
|
35
|
-
declare function Popup({ children, label }: PopupProps): import('react').ReactPortal | null;
|
|
47
|
+
declare function Popup({ children, label, raised }: PopupProps): import('react').ReactPortal | null;
|
|
36
48
|
declare function Close({ children }: {
|
|
37
49
|
children: ReactNode;
|
|
38
50
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/Popover.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,SAAS,EACd,KAAK,GAAG,EAWT,MAAM,OAAO,CAAA;AAKd,OAAO,EAAyB,KAAK,YAAY,EAAE,KAAK,WAAW,EAAC,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/Popover.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,SAAS,EACd,KAAK,GAAG,EAWT,MAAM,OAAO,CAAA;AAKd,OAAO,EAAyB,KAAK,YAAY,EAAE,KAAK,WAAW,EAAC,MAAM,YAAY,CAAA;AAMtF,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,oBAAoB,CAAA;AAKnD,KAAK,WAAW,GAAG,OAAO,GAAG,IAAI,GAAG,CAAC,MAAM,OAAO,GAAG,IAAI,CAAC,CAAA;AA6B1D,MAAM,WAAW,aAAa;IAC5B,oDAAoD;IACpD,UAAU,EAAE,MAAM,IAAI,CAAA;CACvB;AAED,UAAU,SAAS;IACjB,QAAQ,EAAE,SAAS,CAAA;IACnB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACtC,IAAI,CAAC,EAAE,WAAW,CAAA;IAClB,KAAK,CAAC,EAAE,YAAY,CAAA;IACpB,2EAA2E;IAC3E,MAAM,CAAC,EAAE,MAAM,OAAO,CAAA;IACtB,kFAAkF;IAClF,MAAM,CAAC,EAAE,aAAa,CAAC,WAAW,CAAC,CAAA;IACnC,GAAG,CAAC,EAAE,GAAG,CAAC,aAAa,CAAC,CAAA;CACzB;AAED,iBAAS,IAAI,CAAC,EACZ,QAAQ,EACR,IAAI,EAAE,QAAQ,EACd,WAAmB,EACnB,YAAY,EACZ,IAAe,EACf,KAAe,EACf,MAAM,EACN,MAAM,EACN,GAAG,GACJ,EAAE,SAAS,2CA8GX;AAKD,UAAU,YAAY;IACpB,QAAQ,EAAE,SAAS,CAAA;IACnB,gEAAgE;IAChE,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,8EAA8E;IAC9E,IAAI,CAAC,EAAE,WAAW,CAAA;IAClB,sEAAsE;IACtE,GAAG,CAAC,EAAE,GAAG,CAAC,iBAAiB,CAAC,CAAA;CAC7B;AAED,iBAAS,OAAO,CAAC,EAAC,QAAQ,EAAE,YAAY,EAAE,SAAS,EAAE,IAAgB,EAAE,GAAG,EAAC,EAAE,YAAY,2CAoBxF;AAID,UAAU,UAAU;IAClB,QAAQ,EAAE,SAAS,CAAA;IACnB,sCAAsC;IACtC,KAAK,EAAE,MAAM,CAAA;IACb;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB;AAED,iBAAS,KAAK,CAAC,EAAC,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAC,EAAE,UAAU,sCA0EnD;AAID,iBAAS,KAAK,CAAC,EAAC,QAAQ,EAAC,EAAE;IAAC,QAAQ,EAAE,SAAS,CAAA;CAAC,2CAQ/C;AAED,eAAO,MAAM,OAAO;;;;;CAKnB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popover.meta.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/Popover.meta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,mBAAmB,CAAA;AAEpD,eAAO,MAAM,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"Popover.meta.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/Popover.meta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,mBAAmB,CAAA;AAEpD,eAAO,MAAM,IAAI,EAAE,aA0ElB,CAAA"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { RefObject } from 'react';
|
|
2
2
|
export interface PopoverLayerContextValue {
|
|
3
3
|
register: (el: Element) => () => void;
|
|
4
|
+
/** Set by a `raised` Popup for what it holds, so a Popover nested in it is
|
|
5
|
+
* raised too and is not drawn under its parent. */
|
|
6
|
+
raised?: boolean;
|
|
4
7
|
}
|
|
5
8
|
export declare const PopoverLayerContext: import('react').Context<PopoverLayerContextValue | null>;
|
|
6
9
|
/** Register the ref's element as part of the enclosing Popover's layer while `active`. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PopoverLayerContext.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/PopoverLayerContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,SAAS,EAA6C,MAAM,OAAO,CAAA;AAKhF,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,CAAC,EAAE,EAAE,OAAO,KAAK,MAAM,IAAI,CAAA;
|
|
1
|
+
{"version":3,"file":"PopoverLayerContext.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/PopoverLayerContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,SAAS,EAA6C,MAAM,OAAO,CAAA;AAKhF,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,CAAC,EAAE,EAAE,OAAO,KAAK,MAAM,IAAI,CAAA;IACrC;wDACoD;IACpD,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB;AAED,eAAO,MAAM,mBAAmB,0DAAuD,CAAA;AAEvF,0FAA0F;AAC1F,wBAAgB,eAAe,CAAC,GAAG,EAAE,SAAS,CAAC,OAAO,GAAG,IAAI,CAAC,EAAE,EAAC,MAAM,EAAC,EAAE;IAAC,MAAM,EAAE,OAAO,CAAA;CAAC,QAO1F"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
/**
|
|
3
|
+
* `Popover.Popup raised`: one floating surface over another (a link editor
|
|
4
|
+
* over a selection format bar). Outside a modal it is `floatingRaised` (60),
|
|
5
|
+
* inside a Dialog or Drawer `popoverRaised` (1041). The raised Popover renders
|
|
6
|
+
* first, so without the layer the plain one, portalled after it, would be on
|
|
7
|
+
* top.
|
|
8
|
+
*/
|
|
9
|
+
declare const meta: Meta;
|
|
10
|
+
export default meta;
|
|
11
|
+
type Story = StoryObj;
|
|
12
|
+
/** Outside a modal: the raised editor (60) is over the bar (50). */
|
|
13
|
+
export declare const RaisedOverFloating: Story;
|
|
14
|
+
/** Inside an open Dialog: the raised editor (1041) is over the bar (1040),
|
|
15
|
+
* and both are over the Dialog panel. */
|
|
16
|
+
export declare const RaisedInDialog: Story;
|
|
17
|
+
/** A raised Popover held open, then a Dialog: the Popover is still mounted
|
|
18
|
+
* and the Dialog covers it at the Dialog's centre. */
|
|
19
|
+
export declare const DialogOverRaised: Story;
|
|
20
|
+
export declare const NestedInRaised_NoModal: Story;
|
|
21
|
+
export declare const NestedInRaised_InDialog: Story;
|
|
22
|
+
/** A Select opened from a raised Popover in a Dialog: its listbox (popup,
|
|
23
|
+
* 1050) is on top. */
|
|
24
|
+
export declare const SelectInRaisedInDialog: Story;
|
|
25
|
+
/** `useInModal()`: true in a Dialog and a Drawer, false outside. Its export
|
|
26
|
+
* from the package root is checked by shared/exports.typecheck.ts. */
|
|
27
|
+
export declare const UseInModal: Story;
|
|
28
|
+
//# sourceMappingURL=PopoverRaised.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PopoverRaised.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/PopoverRaised.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,IAAI,EAAE,QAAQ,EAAC,MAAM,kBAAkB,CAAA;AAapD;;;;;;GAMG;AACH,QAAA,MAAM,IAAI,EAAE,IAEX,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAA;AA4FrB,oEAAoE;AACpE,eAAO,MAAM,kBAAkB,EAAE,KAMhC,CAAA;AAED;0CAC0C;AAC1C,eAAO,MAAM,cAAc,EAAE,KAwB5B,CAAA;AAqCD;uDACuD;AACvD,eAAO,MAAM,gBAAgB,EAAE,KAkB9B,CAAA;AAsCD,eAAO,MAAM,sBAAsB,EAAE,KAIpC,CAAA;AAED,eAAO,MAAM,uBAAuB,EAAE,KAQrC,CAAA;AAED;uBACuB;AACvB,eAAO,MAAM,sBAAsB,EAAE,KA2BpC,CAAA;AAMD;uEACuE;AACvE,eAAO,MAAM,UAAU,EAAE,KAgCxB,CAAA"}
|
|
@@ -20,9 +20,24 @@ export declare const styles: Readonly<{
|
|
|
20
20
|
readonly transitionProperty: css.StyleXClassNameFor<"transitionProperty", "background-color, border-color">;
|
|
21
21
|
readonly transitionDuration: css.StyleXClassNameFor<"transitionDuration", string>;
|
|
22
22
|
}>;
|
|
23
|
+
readonly triggerSmall: Readonly<{
|
|
24
|
+
readonly gap: css.StyleXClassNameFor<"gap", string>;
|
|
25
|
+
readonly paddingTop: css.StyleXClassNameFor<"paddingTop", string>;
|
|
26
|
+
readonly paddingBottom: css.StyleXClassNameFor<"paddingBottom", string>;
|
|
27
|
+
readonly paddingLeft: css.StyleXClassNameFor<"paddingLeft", string>;
|
|
28
|
+
readonly paddingRight: css.StyleXClassNameFor<"paddingRight", string>;
|
|
29
|
+
readonly fontSize: css.StyleXClassNameFor<"fontSize", string>;
|
|
30
|
+
readonly minHeight: css.StyleXClassNameFor<"minHeight", string>;
|
|
31
|
+
}>;
|
|
23
32
|
readonly popupInModal: Readonly<{
|
|
24
33
|
readonly zIndex: css.StyleXClassNameFor<"zIndex", number>;
|
|
25
34
|
}>;
|
|
35
|
+
readonly popupRaised: Readonly<{
|
|
36
|
+
readonly zIndex: css.StyleXClassNameFor<"zIndex", number>;
|
|
37
|
+
}>;
|
|
38
|
+
readonly popupInModalRaised: Readonly<{
|
|
39
|
+
readonly zIndex: css.StyleXClassNameFor<"zIndex", number>;
|
|
40
|
+
}>;
|
|
26
41
|
readonly popup: Readonly<{
|
|
27
42
|
readonly position: css.StyleXClassNameFor<"position", "fixed">;
|
|
28
43
|
readonly top: css.StyleXClassNameFor<"top", 0>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.css.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/styles.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"styles.css.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/styles.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,kBAAkB,CAAA;AAUpC,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8FjB,CAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
import { ControlSize } from '../../shared/types';
|
|
2
3
|
interface RootProps {
|
|
3
4
|
name?: string;
|
|
4
5
|
defaultValue?: string;
|
|
@@ -8,9 +9,11 @@ interface RootProps {
|
|
|
8
9
|
children: ReactNode;
|
|
9
10
|
}
|
|
10
11
|
declare function Root({ name, defaultValue, value, onValueChange, initialLabels, children }: RootProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
declare function Trigger({ children, 'aria-label': ariaLabel, }: {
|
|
12
|
+
declare function Trigger({ children, 'aria-label': ariaLabel, size, }: {
|
|
12
13
|
children: ReactNode;
|
|
13
14
|
'aria-label'?: string;
|
|
15
|
+
/** `small` matches a small Toggle or Button beside it. Default: `default`. */
|
|
16
|
+
size?: ControlSize;
|
|
14
17
|
}): import("react/jsx-runtime").JSX.Element;
|
|
15
18
|
declare function Value({ placeholder }: {
|
|
16
19
|
placeholder?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/components/Select/Select.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,SAAS,EAAsD,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/components/Select/Select.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,SAAS,EAAsD,MAAM,OAAO,CAAA;AAYzF,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,oBAAoB,CAAA;AAGnD,UAAU,SAAS;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAA;IAC9C,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACtC,QAAQ,EAAE,SAAS,CAAA;CACpB;AAED,iBAAS,IAAI,CAAC,EAAC,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,QAAQ,EAAC,EAAE,SAAS,2CAW3F;AAGD,iBAAS,OAAO,CAAC,EACf,QAAQ,EACR,YAAY,EAAE,SAAS,EACvB,IAAgB,GACjB,EAAE;IACD,QAAQ,EAAE,SAAS,CAAA;IACnB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,8EAA8E;IAC9E,IAAI,CAAC,EAAE,WAAW,CAAA;CACnB,2CAsCA;AAGD,iBAAS,KAAK,CAAC,EAAC,WAAW,EAAC,EAAE;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAC,2CASnD;AAGD,iBAAS,IAAI,CAAC,EAAC,QAAQ,EAAC,EAAE;IAAC,QAAQ,CAAC,EAAE,SAAS,CAAA;CAAC,2CAoB/C;AAQD,iBAAS,KAAK,CAAC,EAAC,QAAQ,EAAC,EAAE;IAAC,QAAQ,EAAE,SAAS,CAAA;CAAC,2CAqD/C;AAGD,UAAU,SAAS;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,SAAS,CAAA;CACpB;AAED,iBAAS,IAAI,CAAC,EAAC,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAC,EAAE,SAAS,2CAmDpD;AAGD,iBAAS,QAAQ,CAAC,EAAC,QAAQ,EAAC,EAAE;IAAC,QAAQ,EAAE,SAAS,CAAA;CAAC,2CAElD;AAED,eAAO,MAAM,MAAM;;;;;;;;CAQlB,CAAA"}
|
|
@@ -25,6 +25,15 @@ export declare const styles: Readonly<{
|
|
|
25
25
|
readonly transitionProperty: css.StyleXClassNameFor<"transitionProperty", "border-color">;
|
|
26
26
|
readonly transitionDuration: css.StyleXClassNameFor<"transitionDuration", string>;
|
|
27
27
|
}>;
|
|
28
|
+
readonly triggerSmall: Readonly<{
|
|
29
|
+
readonly gap: css.StyleXClassNameFor<"gap", string>;
|
|
30
|
+
readonly paddingTop: css.StyleXClassNameFor<"paddingTop", string>;
|
|
31
|
+
readonly paddingBottom: css.StyleXClassNameFor<"paddingBottom", string>;
|
|
32
|
+
readonly paddingLeft: css.StyleXClassNameFor<"paddingLeft", string>;
|
|
33
|
+
readonly paddingRight: css.StyleXClassNameFor<"paddingRight", string>;
|
|
34
|
+
readonly fontSize: css.StyleXClassNameFor<"fontSize", string>;
|
|
35
|
+
readonly minHeight: css.StyleXClassNameFor<"minHeight", string>;
|
|
36
|
+
}>;
|
|
28
37
|
readonly value: Readonly<{
|
|
29
38
|
readonly color: css.StyleXClassNameFor<"color", string>;
|
|
30
39
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.css.d.ts","sourceRoot":"","sources":["../../../src/components/Select/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/Select/styles.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,kBAAkB,CAAA;AAUpC,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoHjB,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"}
|