@nxgt/material 1.0.4 → 1.1.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.
Files changed (115) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +447 -51
  3. package/dist/components.js +3 -2
  4. package/dist/{dist-BVcMAlfA.js → dist-CwhEp6Y-.js} +4 -4
  5. package/dist/dnd.js +2 -2
  6. package/dist/{hooks-BPv0i6YN.js → hooks-CHmfdtMs.js} +81 -47
  7. package/dist/hooks.js +3 -3
  8. package/dist/{i18n-1Eg35q8-.js → i18n-D4R3sSqT.js} +102 -0
  9. package/dist/i18n.js +1 -1
  10. package/dist/lib/components/index.d.ts +15 -0
  11. package/dist/lib/components/ui/anchor-heading.d.ts +9 -0
  12. package/dist/lib/components/ui/anchor-heading.stories.d.ts +13 -0
  13. package/dist/lib/components/ui/anchor-heading.utils.d.ts +2 -0
  14. package/dist/lib/components/ui/api-endpoint.d.ts +9 -0
  15. package/dist/lib/components/ui/api-endpoint.stories.d.ts +14 -0
  16. package/dist/lib/components/ui/api-operation.d.ts +13 -0
  17. package/dist/lib/components/ui/api-operation.stories.d.ts +13 -0
  18. package/dist/lib/components/ui/cards/cards.stories.d.ts +20 -0
  19. package/dist/lib/components/ui/cards/cards.stories.data.d.ts +8 -0
  20. package/dist/lib/components/ui/cards/index.d.ts +9 -0
  21. package/dist/lib/components/ui/cards/partials/crew-card.d.ts +2 -0
  22. package/dist/lib/components/ui/cards/partials/feature-card.d.ts +2 -0
  23. package/dist/lib/components/ui/cards/partials/media-card.d.ts +2 -0
  24. package/dist/lib/components/ui/cards/partials/overlay-card.d.ts +2 -0
  25. package/dist/lib/components/ui/cards/partials/pricing-card.d.ts +2 -0
  26. package/dist/lib/components/ui/cards/partials/profile-card.d.ts +2 -0
  27. package/dist/lib/components/ui/cards/partials/quote-card.d.ts +2 -0
  28. package/dist/lib/components/ui/cards/partials/spotlight-card.d.ts +2 -0
  29. package/dist/lib/components/ui/cards/types.d.ts +56 -0
  30. package/dist/lib/components/ui/code/code-group.d.ts +13 -0
  31. package/dist/lib/components/ui/code/code-group.stories.d.ts +14 -0
  32. package/dist/lib/components/ui/code/index.d.ts +2 -0
  33. package/dist/lib/components/ui/copy-button/copy-button.d.ts +5 -3
  34. package/dist/lib/components/ui/doc/doc-api.stories.d.ts +13 -0
  35. package/dist/lib/components/ui/doc/doc-blocks.stories.d.ts +13 -0
  36. package/dist/lib/components/ui/doc/doc-context.d.ts +61 -0
  37. package/dist/lib/components/ui/doc/doc.d.ts +11 -0
  38. package/dist/lib/components/ui/doc/doc.keyboard.d.ts +20 -0
  39. package/dist/lib/components/ui/doc/doc.keyboard.test.d.ts +1 -0
  40. package/dist/lib/components/ui/doc/doc.slice.d.ts +97 -0
  41. package/dist/lib/components/ui/doc/doc.stories.d.ts +15 -0
  42. package/dist/lib/components/ui/doc/doc.stories.data.d.ts +7 -0
  43. package/dist/lib/components/ui/doc/doc.utils.d.ts +29 -0
  44. package/dist/lib/components/ui/doc/doc.utils.test.d.ts +1 -0
  45. package/dist/lib/components/ui/doc/index.d.ts +36 -0
  46. package/dist/lib/components/ui/doc/partials/doc-article.d.ts +6 -0
  47. package/dist/lib/components/ui/doc/partials/doc-child-cards.d.ts +4 -0
  48. package/dist/lib/components/ui/doc/partials/doc-copy-actions.d.ts +7 -0
  49. package/dist/lib/components/ui/doc/partials/doc-empty.d.ts +3 -0
  50. package/dist/lib/components/ui/doc/partials/doc-header.d.ts +18 -0
  51. package/dist/lib/components/ui/doc/partials/doc-link.d.ts +3 -0
  52. package/dist/lib/components/ui/doc/partials/doc-nav.d.ts +4 -0
  53. package/dist/lib/components/ui/doc/partials/doc-page.d.ts +6 -0
  54. package/dist/lib/components/ui/doc/partials/doc-pager.d.ts +4 -0
  55. package/dist/lib/components/ui/doc/partials/doc-progress.d.ts +3 -0
  56. package/dist/lib/components/ui/doc/partials/doc-search.d.ts +1 -0
  57. package/dist/lib/components/ui/doc/partials/doc-see-also.d.ts +4 -0
  58. package/dist/lib/components/ui/doc/partials/doc-sidebar.d.ts +4 -0
  59. package/dist/lib/components/ui/doc/partials/doc-skip-link.d.ts +2 -0
  60. package/dist/lib/components/ui/doc/partials/doc-toc.d.ts +6 -0
  61. package/dist/lib/components/ui/doc/partials/doc-topbar.d.ts +4 -0
  62. package/dist/lib/components/ui/doc/types.d.ts +46 -0
  63. package/dist/lib/components/ui/doc/use-doc.d.ts +43 -0
  64. package/dist/lib/components/ui/feedback/empty-state.stories.d.ts +1 -0
  65. package/dist/lib/components/ui/feedback/index.d.ts +1 -0
  66. package/dist/lib/components/ui/feedback/scroll-progress.d.ts +6 -0
  67. package/dist/lib/components/ui/feedback/scroll-progress.stories.d.ts +13 -0
  68. package/dist/lib/components/ui/figure.d.ts +7 -0
  69. package/dist/lib/components/ui/figure.stories.d.ts +13 -0
  70. package/dist/lib/components/ui/forms/index.d.ts +1 -0
  71. package/dist/lib/components/ui/hero.d.ts +10 -0
  72. package/dist/lib/components/ui/hero.stories.d.ts +13 -0
  73. package/dist/lib/components/ui/highlight-text.d.ts +6 -0
  74. package/dist/lib/components/ui/highlight-text.stories.d.ts +12 -0
  75. package/dist/lib/components/ui/list-tile.d.ts +2 -1
  76. package/dist/lib/components/ui/list-tile.stories.d.ts +1 -0
  77. package/dist/lib/components/ui/metrics/index.d.ts +6 -0
  78. package/dist/lib/components/ui/metrics/metrics.stories.d.ts +16 -0
  79. package/dist/lib/components/ui/metrics/metrics.stories.data.d.ts +5 -0
  80. package/dist/lib/components/ui/metrics/partials/breakdown-card.d.ts +2 -0
  81. package/dist/lib/components/ui/metrics/partials/goal-card.d.ts +2 -0
  82. package/dist/lib/components/ui/metrics/partials/rank-card.d.ts +2 -0
  83. package/dist/lib/components/ui/metrics/partials/sparkline.d.ts +5 -0
  84. package/dist/lib/components/ui/metrics/partials/trend-card.d.ts +2 -0
  85. package/dist/lib/components/ui/metrics/types.d.ts +35 -0
  86. package/dist/lib/components/ui/pager.d.ts +20 -0
  87. package/dist/lib/components/ui/pager.stories.d.ts +13 -0
  88. package/dist/lib/components/ui/param-table.d.ts +13 -0
  89. package/dist/lib/components/ui/param-table.stories.d.ts +13 -0
  90. package/dist/lib/components/ui/see-also.d.ts +17 -0
  91. package/dist/lib/components/ui/see-also.stories.d.ts +12 -0
  92. package/dist/lib/components/ui/skip-link.d.ts +3 -0
  93. package/dist/lib/components/ui/skip-link.stories.d.ts +12 -0
  94. package/dist/lib/components/ui/steps.d.ts +13 -0
  95. package/dist/lib/components/ui/steps.stories.d.ts +13 -0
  96. package/dist/lib/components/ui/tabs.d.ts +4 -1
  97. package/dist/lib/components/ui/tabs.stories.d.ts +1 -0
  98. package/dist/lib/components/ui/toc.d.ts +21 -0
  99. package/dist/lib/components/ui/toc.stories.d.ts +13 -0
  100. package/dist/lib/hooks/index.d.ts +1 -0
  101. package/dist/lib/hooks/use-heading-spy.d.ts +6 -0
  102. package/dist/lib/i18n/resources/en/index.d.ts +57 -0
  103. package/dist/lib/i18n/resources/en/material.json.d.ts +57 -0
  104. package/dist/lib/i18n/resources/fr/index.d.ts +57 -0
  105. package/dist/lib/i18n/resources/fr/material.json.d.ts +57 -0
  106. package/dist/lib/i18n/resources/index.d.ts +114 -0
  107. package/dist/lib/i18n/translator.d.ts +1 -1
  108. package/dist/lib/lib/string.utils.d.ts +9 -0
  109. package/dist/lib/lib/url.utils.d.ts +2 -0
  110. package/dist/{lib-CaKARQ-7.js → lib-Rq5clPUe.js} +620 -584
  111. package/dist/lib.js +3 -3
  112. package/dist/{main-B-cRR76_.js → main-D7WtUVbv.js} +35341 -33380
  113. package/dist/main.js +6 -6
  114. package/dist/material.css +1 -1
  115. package/package.json +2 -1
@@ -0,0 +1,36 @@
1
+ export type { DocProps } from './doc';
2
+ export { Doc } from './doc';
3
+ export { handleDocKeyDown, isDocSearchHotkey, isTypingTarget, } from './doc.keyboard';
4
+ export { docActions, docSelectors, docSlice } from './doc.slice';
5
+ export { filterDocNav, findActiveDocHref, findDocChildren, findDocPager, findDocSiblings, flattenDocNav, headingText, isDocPathActive, isExternalHref, navLabel, slugify, } from './doc.utils';
6
+ export { DocProvider, useDocContext, useOptionalDocContext, } from './doc-context';
7
+ export type { DocArticleProps } from './partials/doc-article';
8
+ export { DocArticle } from './partials/doc-article';
9
+ export { DocChildCards } from './partials/doc-child-cards';
10
+ export { DocCopyMarkdown, DocCopyPage } from './partials/doc-copy-actions';
11
+ export type { DocEmptyProps } from './partials/doc-empty';
12
+ export { DocEmpty } from './partials/doc-empty';
13
+ export type { DocHeaderCrumb, DocHeaderProps } from './partials/doc-header';
14
+ export { DocHeader } from './partials/doc-header';
15
+ export { DefaultDocLink, DocLink } from './partials/doc-link';
16
+ export type { DocNavProps } from './partials/doc-nav';
17
+ export { DocNav } from './partials/doc-nav';
18
+ export type { DocPageProps } from './partials/doc-page';
19
+ export { DocPage } from './partials/doc-page';
20
+ export type { DocPagerProps } from './partials/doc-pager';
21
+ export { DocPager } from './partials/doc-pager';
22
+ export type { DocProgressProps } from './partials/doc-progress';
23
+ export { DocProgress } from './partials/doc-progress';
24
+ export { DocSearch } from './partials/doc-search';
25
+ export type { DocSeeAlsoProps } from './partials/doc-see-also';
26
+ export { DocSeeAlso } from './partials/doc-see-also';
27
+ export type { DocSidebarProps } from './partials/doc-sidebar';
28
+ export { DocSidebar } from './partials/doc-sidebar';
29
+ export { DocSkipLink } from './partials/doc-skip-link';
30
+ export type { DocTocProps } from './partials/doc-toc';
31
+ export { DocToc } from './partials/doc-toc';
32
+ export type { DocTopbarProps } from './partials/doc-topbar';
33
+ export { DocTopbar } from './partials/doc-topbar';
34
+ export type { DocChromeState, DocLinkComponent, DocLinkProps, DocNavItem, DocPagerLink, DocSearchHit, DocTocItem, } from './types';
35
+ export type { DocModel, UseDocOptions } from './use-doc';
36
+ export { useDoc } from './use-doc';
@@ -0,0 +1,6 @@
1
+ import { ReactNode } from 'react';
2
+ export type DocArticleProps = {
3
+ children?: ReactNode;
4
+ className?: string;
5
+ };
6
+ export declare function DocArticle({ children, className }: DocArticleProps): import("react").JSX.Element;
@@ -0,0 +1,4 @@
1
+ export type DocChildCardsProps = {
2
+ className?: string;
3
+ };
4
+ export declare function DocChildCards({ className }: DocChildCardsProps): import("react").JSX.Element | null;
@@ -0,0 +1,7 @@
1
+ import { ReactNode } from 'react';
2
+ export declare function DocCopyPage({ title }: {
3
+ title: ReactNode;
4
+ }): import("react").JSX.Element;
5
+ export declare function DocCopyMarkdown({ markdown }: {
6
+ markdown?: string;
7
+ }): import("react").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { EmptyStateProps } from '../../feedback/empty-state';
2
+ export type DocEmptyProps = EmptyStateProps;
3
+ export declare function DocEmpty({ variant, className, ...props }: DocEmptyProps): import("react").JSX.Element;
@@ -0,0 +1,18 @@
1
+ import { ReactNode } from 'react';
2
+ export type DocHeaderCrumb = {
3
+ title: ReactNode;
4
+ href?: string;
5
+ };
6
+ export type DocHeaderProps = {
7
+ title: ReactNode;
8
+ description?: ReactNode;
9
+ badge?: ReactNode;
10
+ crumbs?: DocHeaderCrumb[];
11
+ editHref?: string;
12
+ updatedAt?: ReactNode | Date;
13
+ copyPage?: boolean;
14
+ copyMarkdown?: boolean;
15
+ markdown?: string;
16
+ className?: string;
17
+ };
18
+ export declare function DocHeader({ title, description, badge, crumbs, editHref, updatedAt, copyPage, copyMarkdown, markdown, className, }: DocHeaderProps): import("react").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { DocLinkProps } from '../types';
2
+ export declare function DefaultDocLink({ href, className, children, onClick, ...props }: DocLinkProps): import("react").JSX.Element;
3
+ export declare function DocLink({ href, className, onClick, children, ...props }: DocLinkProps): import("react").JSX.Element;
@@ -0,0 +1,4 @@
1
+ export type DocNavProps = {
2
+ className?: string;
3
+ };
4
+ export declare function DocNav({ className }: DocNavProps): import("react").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { ReactNode } from 'react';
2
+ import { DocHeaderProps } from './doc-header';
3
+ export type DocPageProps = DocHeaderProps & {
4
+ children?: ReactNode;
5
+ };
6
+ export declare function DocPage({ children, className, ...header }: DocPageProps): import("react").JSX.Element;
@@ -0,0 +1,4 @@
1
+ export type DocPagerProps = {
2
+ className?: string;
3
+ };
4
+ export declare function DocPager({ className }: DocPagerProps): import("react").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { ScrollProgressProps } from '../../feedback/scroll-progress';
2
+ export type DocProgressProps = ScrollProgressProps;
3
+ export declare function DocProgress(props: DocProgressProps): import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function DocSearch(): import("react").JSX.Element | null;
@@ -0,0 +1,4 @@
1
+ export type DocSeeAlsoProps = {
2
+ className?: string;
3
+ };
4
+ export declare function DocSeeAlso({ className }: DocSeeAlsoProps): import("react").JSX.Element;
@@ -0,0 +1,4 @@
1
+ export type DocSidebarProps = {
2
+ className?: string;
3
+ };
4
+ export declare function DocSidebar({ className }: DocSidebarProps): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { SkipLinkProps } from '../../skip-link';
2
+ export declare function DocSkipLink(props: SkipLinkProps): import("react").JSX.Element;
@@ -0,0 +1,6 @@
1
+ export type DocTocProps = {
2
+ className?: string;
3
+ /** `rail` is the xl+ column. `panel` is the in-page collapsible used below xl. */
4
+ placement?: 'rail' | 'panel';
5
+ };
6
+ export declare function DocToc({ className, placement }: DocTocProps): import("react").JSX.Element;
@@ -0,0 +1,4 @@
1
+ export type DocTopbarProps = {
2
+ className?: string;
3
+ };
4
+ export declare function DocTopbar({ className }: DocTopbarProps): import("react").JSX.Element;
@@ -0,0 +1,46 @@
1
+ import { ComponentType, MouseEventHandler, ReactNode } from 'react';
2
+ export type DocLinkProps = {
3
+ href: string;
4
+ className?: string;
5
+ children?: ReactNode;
6
+ onClick?: MouseEventHandler<HTMLAnchorElement>;
7
+ };
8
+ export type DocLinkComponent = ComponentType<DocLinkProps>;
9
+ export type DocNavItem = {
10
+ id: string;
11
+ title: ReactNode;
12
+ /** Plain-text label for search and aria. Defaults to `title` when it is a string. */
13
+ label?: string;
14
+ href?: string;
15
+ icon?: ReactNode;
16
+ badge?: ReactNode;
17
+ description?: ReactNode;
18
+ items?: DocNavItem[];
19
+ disabled?: boolean;
20
+ };
21
+ export type DocTocItem = {
22
+ id: string;
23
+ title: ReactNode;
24
+ level: 2 | 3 | 4;
25
+ };
26
+ export type DocPagerLink = {
27
+ title: ReactNode;
28
+ href: string;
29
+ description?: ReactNode;
30
+ };
31
+ export type DocSearchHit = {
32
+ id: string;
33
+ title: string;
34
+ href: string;
35
+ group?: string;
36
+ icon?: ReactNode;
37
+ description?: string;
38
+ disabled?: boolean;
39
+ };
40
+ export type DocChromeState = {
41
+ sidebarOpen: boolean;
42
+ searchOpen: boolean;
43
+ query: string;
44
+ activeHeadingId: string | null;
45
+ collapsedIds: string[];
46
+ };
@@ -0,0 +1,43 @@
1
+ import { ReactNode } from 'react';
2
+ import { DocLinkComponent, DocNavItem, DocPagerLink, DocTocItem } from './types';
3
+ export type UseDocOptions = {
4
+ items: DocNavItem[];
5
+ pathname: string;
6
+ toc?: DocTocItem[];
7
+ brand?: ReactNode;
8
+ actions?: ReactNode;
9
+ searchable?: boolean;
10
+ onNavigate?: (href: string) => void;
11
+ linkComponent?: DocLinkComponent;
12
+ previous?: DocPagerLink | null;
13
+ next?: DocPagerLink | null;
14
+ defaultCollapsedIds?: string[];
15
+ };
16
+ export declare function useDoc({ items, pathname, toc, brand, actions, searchable, onNavigate, linkComponent, previous, next, defaultCollapsedIds, }: UseDocOptions): {
17
+ items: DocNavItem[];
18
+ pathname: string;
19
+ toc: DocTocItem[];
20
+ brand: ReactNode;
21
+ actions: ReactNode;
22
+ searchable: boolean;
23
+ linkComponent: DocLinkComponent | undefined;
24
+ chrome: import('./types').DocChromeState;
25
+ chromeActions: {
26
+ setSidebarOpen: (payload: boolean) => void;
27
+ setSearchOpen: (payload: boolean) => void;
28
+ setQuery: (payload: string) => void;
29
+ setActiveHeadingId: (payload: string | null) => void;
30
+ toggleCollapsed: (payload: string) => void;
31
+ setCollapsedIds: (payload: string[]) => void;
32
+ };
33
+ navigate: (href: string) => void;
34
+ onNavigate: ((href: string) => void) | undefined;
35
+ pager: {
36
+ previous?: DocPagerLink;
37
+ next?: DocPagerLink;
38
+ };
39
+ hits: import('./types').DocSearchHit[];
40
+ activeHref: string | undefined;
41
+ articleRef: import('react').RefObject<HTMLElement | null>;
42
+ };
43
+ export type DocModel = ReturnType<typeof useDoc>;
@@ -8,4 +8,5 @@ export declare const Empty: Story;
8
8
  export declare const NotFound: Story;
9
9
  export declare const Unauthorized: Story;
10
10
  export declare const WithAction: Story;
11
+ export declare const Dark: Story;
11
12
  export declare const FullyCustom: Story;
@@ -8,6 +8,7 @@ export * from './custom-dialog';
8
8
  export * from './empty-state';
9
9
  export * from './progress';
10
10
  export * from './progress-field';
11
+ export * from './scroll-progress';
11
12
  export * from './spinner';
12
13
  export * from './toast';
13
14
  export * from './toasts';
@@ -0,0 +1,6 @@
1
+ import { ComponentProps, RefObject } from 'react';
2
+ export type ScrollProgressProps = ComponentProps<'div'> & {
3
+ /** Scrollable element. Defaults to the window. */
4
+ target?: RefObject<HTMLElement | null>;
5
+ };
6
+ export declare function ScrollProgress({ className, target, 'aria-label': ariaLabel, ...props }: ScrollProgressProps): import("react").JSX.Element;
@@ -0,0 +1,13 @@
1
+ import { StoryObj } from '@storybook/react';
2
+ import { ScrollProgress } from './scroll-progress';
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof ScrollProgress;
6
+ parameters: {
7
+ layout: string;
8
+ };
9
+ };
10
+ export default meta;
11
+ type Story = StoryObj<typeof meta>;
12
+ export declare const Window: Story;
13
+ export declare const InContainer: Story;
@@ -0,0 +1,7 @@
1
+ import { ComponentProps, ReactNode } from 'react';
2
+ export type FigureProps = {
3
+ caption?: ReactNode;
4
+ children?: ReactNode;
5
+ className?: string;
6
+ } & Omit<ComponentProps<'figure'>, 'children'>;
7
+ export declare function Figure({ caption, children, className, ...props }: FigureProps): import("react").JSX.Element;
@@ -0,0 +1,13 @@
1
+ import { StoryObj } from '@storybook/react';
2
+ import { Figure } from '..';
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof Figure;
6
+ parameters: {
7
+ layout: string;
8
+ };
9
+ tags: string[];
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ export declare const Default: Story;
@@ -41,4 +41,5 @@ export * from './textarea-form-field';
41
41
  export * from './time-form-field';
42
42
  export * from './timezone-form-field';
43
43
  export * from './transfer-list-form-field';
44
+ export * from './upload-form-field';
44
45
  export * from './url-form-field';
@@ -0,0 +1,10 @@
1
+ import { ReactNode } from 'react';
2
+ export type HeroProps = {
3
+ eyebrow?: ReactNode;
4
+ title: ReactNode;
5
+ description?: ReactNode;
6
+ actions?: ReactNode;
7
+ children?: ReactNode;
8
+ className?: string;
9
+ };
10
+ export declare function Hero({ eyebrow, title, description, actions, children, className, }: HeroProps): import("react").JSX.Element;
@@ -0,0 +1,13 @@
1
+ import { StoryObj } from '@storybook/react';
2
+ import { Hero } from '..';
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof Hero;
6
+ parameters: {
7
+ layout: string;
8
+ };
9
+ tags: string[];
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ export declare const Default: Story;
@@ -0,0 +1,6 @@
1
+ export type HighlightTextProps = {
2
+ text: string;
3
+ query?: string;
4
+ className?: string;
5
+ };
6
+ export declare function HighlightText({ text, query, className, }: HighlightTextProps): import("react").JSX.Element;
@@ -0,0 +1,12 @@
1
+ import { StoryObj } from '@storybook/react';
2
+ import { HighlightText } from './highlight-text';
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof HighlightText;
6
+ parameters: {
7
+ layout: string;
8
+ };
9
+ };
10
+ export default meta;
11
+ type Story = StoryObj<typeof meta>;
12
+ export declare const Default: Story;
@@ -5,8 +5,9 @@ export type ListTileProps = {
5
5
  title: ReactNode;
6
6
  subtitle?: ReactNode;
7
7
  selected?: boolean;
8
+ size?: 'sm' | 'md';
8
9
  href?: string;
9
10
  disabled?: boolean;
10
11
  onClick?: MouseEventHandler<HTMLButtonElement | HTMLAnchorElement>;
11
12
  } & Omit<HTMLAttributes<HTMLElement>, 'children' | 'title' | 'onClick'>;
12
- export declare function ListTile({ title, subtitle, leading, trailing, className, selected, href, disabled, onClick, ...props }: ListTileProps): import("react").JSX.Element;
13
+ export declare function ListTile({ title, subtitle, leading, trailing, className, selected, size, href, disabled, onClick, ...props }: ListTileProps): import("react").JSX.Element;
@@ -12,6 +12,7 @@ export default meta;
12
12
  type Story = StoryObj<typeof meta>;
13
13
  export declare const Default: Story;
14
14
  export declare const Leading: Story;
15
+ export declare const Small: Story;
15
16
  export declare const Selected: Story;
16
17
  export declare const Clickable: Story;
17
18
  export declare const AsLink: Story;
@@ -0,0 +1,6 @@
1
+ export { BreakdownCard } from './partials/breakdown-card';
2
+ export { GoalCard } from './partials/goal-card';
3
+ export { RankCard } from './partials/rank-card';
4
+ export { Sparkline } from './partials/sparkline';
5
+ export { TrendCard } from './partials/trend-card';
6
+ export type { BreakdownCardProps, BreakdownItem, GoalCardProps, RankCardProps, RankItem, TrendCardProps, } from './types';
@@ -0,0 +1,16 @@
1
+ import { StoryObj } from '@storybook/react';
2
+ declare const meta: {
3
+ title: string;
4
+ parameters: {
5
+ layout: string;
6
+ };
7
+ };
8
+ export default meta;
9
+ type Story = StoryObj<typeof meta>;
10
+ export declare const Trend: Story;
11
+ export declare const Goal: Story;
12
+ export declare const Breakdown: Story;
13
+ export declare const Rank: Story;
14
+ export declare const Dashboard: Story;
15
+ export declare const Phone: Story;
16
+ export declare const Dark: Story;
@@ -0,0 +1,5 @@
1
+ export declare const SERIES: number[];
2
+ export declare function TrendDemo(): import("react").JSX.Element;
3
+ export declare function GoalDemo(): import("react").JSX.Element;
4
+ export declare function BreakdownDemo(): import("react").JSX.Element;
5
+ export declare function RankDemo(): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { BreakdownCardProps } from '../types';
2
+ export declare function BreakdownCard({ label, items, className, ...props }: BreakdownCardProps): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { GoalCardProps } from '../types';
2
+ export declare function GoalCard({ label, value, target, unit, className, ...props }: GoalCardProps): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { RankCardProps } from '../types';
2
+ export declare function RankCard({ label, items, className, ...props }: RankCardProps): import("react").JSX.Element;
@@ -0,0 +1,5 @@
1
+ export type SparklineProps = {
2
+ series: number[];
3
+ className?: string;
4
+ };
5
+ export declare function Sparkline({ series, className }: SparklineProps): import("react").JSX.Element | null;
@@ -0,0 +1,2 @@
1
+ import { TrendCardProps } from '../types';
2
+ export declare function TrendCard({ label, value, delta, deltaTone, series, className, ...props }: TrendCardProps): import("react").JSX.Element;
@@ -0,0 +1,35 @@
1
+ import { ComponentProps, ReactNode } from 'react';
2
+ import { Card } from '../card';
3
+ import { StatDeltaTone } from '../stat-card/format-stat-delta';
4
+ export type TrendCardProps = Omit<ComponentProps<typeof Card>, 'title'> & {
5
+ label: ReactNode;
6
+ value: ReactNode;
7
+ delta?: number | ReactNode;
8
+ deltaTone?: StatDeltaTone;
9
+ series?: number[];
10
+ };
11
+ export type GoalCardProps = Omit<ComponentProps<typeof Card>, 'title'> & {
12
+ label: ReactNode;
13
+ value: number;
14
+ target: number;
15
+ unit?: ReactNode;
16
+ };
17
+ export type BreakdownItem = {
18
+ label: ReactNode;
19
+ value?: ReactNode;
20
+ percent: number;
21
+ };
22
+ export type BreakdownCardProps = Omit<ComponentProps<typeof Card>, 'title'> & {
23
+ label: ReactNode;
24
+ items: BreakdownItem[];
25
+ };
26
+ export type RankItem = {
27
+ title: ReactNode;
28
+ subtitle?: ReactNode;
29
+ trailing?: ReactNode;
30
+ rank?: number;
31
+ };
32
+ export type RankCardProps = Omit<ComponentProps<typeof Card>, 'title'> & {
33
+ label: ReactNode;
34
+ items: RankItem[];
35
+ };
@@ -0,0 +1,20 @@
1
+ import { ComponentProps, ComponentType, ReactNode } from 'react';
2
+ export type PagerItem = {
3
+ title: ReactNode;
4
+ href: string;
5
+ description?: ReactNode;
6
+ };
7
+ export type PagerLinkComponent = ComponentType<{
8
+ href: string;
9
+ className?: string;
10
+ children?: ReactNode;
11
+ }>;
12
+ export type PagerProps = Omit<ComponentProps<'nav'>, 'children'> & {
13
+ previous?: PagerItem;
14
+ next?: PagerItem;
15
+ previousLabel?: string;
16
+ nextLabel?: string;
17
+ shortcuts?: boolean;
18
+ linkComponent?: PagerLinkComponent;
19
+ };
20
+ export declare function Pager({ previous, next, previousLabel, nextLabel, shortcuts, linkComponent: Link, className, ...props }: PagerProps): import("react").JSX.Element | null;
@@ -0,0 +1,13 @@
1
+ import { StoryObj } from '@storybook/react';
2
+ import { Pager } from './pager';
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof Pager;
6
+ parameters: {
7
+ layout: string;
8
+ };
9
+ };
10
+ export default meta;
11
+ type Story = StoryObj<typeof meta>;
12
+ export declare const Default: Story;
13
+ export declare const Outbound: Story;
@@ -0,0 +1,13 @@
1
+ import { ReactNode } from 'react';
2
+ export type ParamTableRow = {
3
+ name: string;
4
+ type?: ReactNode;
5
+ defaultValue?: ReactNode;
6
+ required?: boolean;
7
+ description?: ReactNode;
8
+ };
9
+ export type ParamTableProps = {
10
+ params: ParamTableRow[];
11
+ className?: string;
12
+ };
13
+ export declare function ParamTable({ params, className }: ParamTableProps): import("react").JSX.Element | null;
@@ -0,0 +1,13 @@
1
+ import { StoryObj } from '@storybook/react';
2
+ import { ParamTable } from '..';
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof ParamTable;
6
+ parameters: {
7
+ layout: string;
8
+ };
9
+ tags: string[];
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ export declare const Default: Story;
@@ -0,0 +1,17 @@
1
+ import { ComponentProps, ComponentType, ReactNode } from 'react';
2
+ export type SeeAlsoItem = {
3
+ id?: string;
4
+ title: ReactNode;
5
+ href: string;
6
+ };
7
+ export type SeeAlsoLinkComponent = ComponentType<{
8
+ href: string;
9
+ className?: string;
10
+ children?: ReactNode;
11
+ }>;
12
+ export type SeeAlsoProps = Omit<ComponentProps<'nav'>, 'children'> & {
13
+ items: SeeAlsoItem[];
14
+ label?: string;
15
+ linkComponent?: SeeAlsoLinkComponent;
16
+ };
17
+ export declare function SeeAlso({ items, label, linkComponent: Link, className, ...props }: SeeAlsoProps): import("react").JSX.Element | null;
@@ -0,0 +1,12 @@
1
+ import { StoryObj } from '@storybook/react';
2
+ import { SeeAlso } from './see-also';
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof SeeAlso;
6
+ parameters: {
7
+ layout: string;
8
+ };
9
+ };
10
+ export default meta;
11
+ type Story = StoryObj<typeof meta>;
12
+ export declare const Default: Story;
@@ -0,0 +1,3 @@
1
+ import { ComponentProps } from 'react';
2
+ export type SkipLinkProps = ComponentProps<'a'>;
3
+ export declare function SkipLink({ href, className, children, ...props }: SkipLinkProps): import("react").JSX.Element;
@@ -0,0 +1,12 @@
1
+ import { StoryObj } from '@storybook/react';
2
+ import { SkipLink } from './skip-link';
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof SkipLink;
6
+ parameters: {
7
+ layout: string;
8
+ };
9
+ };
10
+ export default meta;
11
+ type Story = StoryObj<typeof meta>;
12
+ export declare const Default: Story;
@@ -0,0 +1,13 @@
1
+ import { ReactNode } from 'react';
2
+ export type StepsProps = {
3
+ children?: ReactNode;
4
+ className?: string;
5
+ };
6
+ export declare function Steps({ children, className }: StepsProps): import("react").JSX.Element;
7
+ export type StepsItemProps = {
8
+ title?: ReactNode;
9
+ index?: number;
10
+ children?: ReactNode;
11
+ className?: string;
12
+ };
13
+ export declare function StepsItem({ title, index, children, className, }: StepsItemProps): import("react").JSX.Element;
@@ -0,0 +1,13 @@
1
+ import { StoryObj } from '@storybook/react';
2
+ import { Steps } from '..';
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof Steps;
6
+ parameters: {
7
+ layout: string;
8
+ };
9
+ tags: string[];
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ export declare const Default: Story;
@@ -1,6 +1,9 @@
1
1
  import { Tabs as TabsPrimitive } from 'radix-ui';
2
2
  import { ComponentProps, ReactNode } from 'react';
3
- declare function Tabs({ className, ...props }: ComponentProps<typeof TabsPrimitive.Root>): import("react").JSX.Element;
3
+ export type TabsVariant = 'bar' | 'line';
4
+ declare function Tabs({ className, variant, ...props }: ComponentProps<typeof TabsPrimitive.Root> & {
5
+ variant?: TabsVariant;
6
+ }): import("react").JSX.Element;
4
7
  declare function TabsList({ className, ...props }: ComponentProps<typeof TabsPrimitive.List>): import("react").JSX.Element;
5
8
  declare function TabsTrigger({ className, children, icon, ...props }: {
6
9
  icon?: ReactNode;
@@ -12,3 +12,4 @@ declare const meta: {
12
12
  export default meta;
13
13
  type Story = StoryObj<typeof meta>;
14
14
  export declare const Default: Story;
15
+ export declare const Line: Story;