@jack.winter/pancake-ui 0.0.0-stage → 0.1.1
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/CHANGELOG.md +73 -0
- package/LICENSE +21 -0
- package/README.md +93 -2
- package/dist/components/Button/Button.d.ts +7 -0
- package/dist/components/Button/ButtonLink.d.ts +8 -0
- package/dist/components/Button/IconButton.d.ts +7 -0
- package/dist/components/Checkbox/Checkbox.d.ts +6 -0
- package/dist/components/Dialog/Dialog.d.ts +9 -0
- package/dist/components/Disclosure/Disclosure.d.ts +17 -0
- package/dist/components/DropdownMenu/DropdownMenu.d.ts +25 -0
- package/dist/components/DropdownMenu/menuKeyboard.d.ts +3 -0
- package/dist/components/FileField/FileField.d.ts +7 -0
- package/dist/components/Pagination/Pagination.d.ts +22 -0
- package/dist/components/Pagination/paginationPages.d.ts +5 -0
- package/dist/components/Popover/Popover.d.ts +7 -0
- package/dist/components/RadioGroup/RadioGroup.d.ts +18 -0
- package/dist/components/Select/Select.d.ts +9 -0
- package/dist/components/Surface/Surface.d.ts +3 -0
- package/dist/components/Switch/Switch.d.ts +6 -0
- package/dist/components/Table/Table.d.ts +6 -0
- package/dist/components/Tabs/Tabs.d.ts +17 -0
- package/dist/components/TextField/TextField.d.ts +8 -0
- package/dist/components/Textarea/Textarea.d.ts +7 -0
- package/dist/components/Tooltip/Tooltip.d.ts +7 -0
- package/dist/components/Tooltip/useTooltip.d.ts +12 -0
- package/dist/components/feedback/BannerToast.d.ts +8 -0
- package/dist/components/feedback/EmptyState.d.ts +8 -0
- package/dist/components/feedback/StatusChip.d.ts +6 -0
- package/dist/components/identity/Avatar.d.ts +9 -0
- package/dist/components/identity/AvatarGroup.d.ts +13 -0
- package/dist/components/layout/Inline.d.ts +5 -0
- package/dist/components/layout/Stack.d.ts +10 -0
- package/dist/components/layout/Text.d.ts +8 -0
- package/dist/components/layout/layout.shared.d.ts +16 -0
- package/dist/components/navigation/AppHeader.d.ts +11 -0
- package/dist/components/navigation/BottomNavigation.d.ts +12 -0
- package/dist/components/navigation/SectionHeader.d.ts +11 -0
- package/dist/components/navigation/SegmentedControl.d.ts +15 -0
- package/dist/components/navigation/StepProgress.d.ts +6 -0
- package/dist/components/progress/LoadingIndicator.d.ts +5 -0
- package/dist/components/progress/Progress.d.ts +8 -0
- package/dist/fonts/Inter-Bold.ttf +0 -0
- package/dist/fonts/Inter-Regular.ttf +0 -0
- package/dist/fonts/Inter-SemiBold.ttf +0 -0
- package/dist/fonts/OFL.txt +92 -0
- package/dist/fonts/inter-4.1.provenance.json +41 -0
- package/dist/fonts.css +21 -0
- package/dist/foundations/tokens.d.ts +168 -0
- package/dist/index.d.ts +36 -0
- package/dist/index.js +1121 -0
- package/dist/styles.css +3 -0
- package/dist/theme.css +97 -0
- package/docs/components.md +182 -0
- package/docs/installation.md +145 -0
- package/docs/styling.md +92 -0
- package/docs/verification.md +80 -0
- package/package.json +107 -4
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.1.1
|
|
4
|
+
|
|
5
|
+
- Clarify registry installation and the first trusted-publisher release deadline.
|
|
6
|
+
- Validate GitHub trusted publishing using the verified package archive. No runtime component changes.
|
|
7
|
+
|
|
8
|
+
## 0.1.0
|
|
9
|
+
|
|
10
|
+
- Publish the first npm release as `@jack.winter/pancake-ui@0.1.0`, with MIT code licensing and retained SIL Open Font License notices for Inter. Migrate consumer imports to the scoped name.
|
|
11
|
+
- Add a manual trusted-publishing workflow that publishes the exact verified main-branch archive, with source, checksum, package metadata, and license checks.
|
|
12
|
+
|
|
13
|
+
- Run CI once per PR revision, cancel superseded PR runs, share build outputs across parallel browser jobs, and retain a required gate for all checks.
|
|
14
|
+
|
|
15
|
+
- Pin the macOS CI locale for native date/time screenshots and await settled Tooltip toggle callbacks in keyboard verification.
|
|
16
|
+
|
|
17
|
+
- Document installation from verified GitHub Actions package artifacts and upload the tested archive after successful main-branch verification. Add repository metadata for consumers.
|
|
18
|
+
|
|
19
|
+
- Coordinate form-control borders and focus outlines with olive theme tokens, use a warm invalid-field border, and style native radios to match checkbox and switch selection.
|
|
20
|
+
|
|
21
|
+
- Soften button hover fills and decorative borders; use underlined selected tabs and segments while retaining keyboard focus indicators.
|
|
22
|
+
- Remove unused bottom-navigation height and keep balanced spacing with icons, long labels, and narrow layouts.
|
|
23
|
+
|
|
24
|
+
- Add dedicated autodocs and state examples for every public component, with source, built-index and browser-rendering gates in verification.
|
|
25
|
+
|
|
26
|
+
- Add native Table presentation and controlled/link Pagination with responsive, keyboard, compatibility and visual coverage.
|
|
27
|
+
|
|
28
|
+
- Add text-only Tooltip descriptions for existing focusable controls, with keyboard, pointer, compatibility and visual coverage.
|
|
29
|
+
|
|
30
|
+
- Add DropdownMenu actions and native links with menu keyboard navigation, focus management, compatibility and visual coverage.
|
|
31
|
+
|
|
32
|
+
- Add native anchored Popover regions with dismissal, focus, positioning, compatibility and visual coverage.
|
|
33
|
+
- Prevent Storybook and Playwright accessibility scans from overlapping; verify explicit scans reject an unnamed control.
|
|
34
|
+
|
|
35
|
+
- Add native numeric/temporal TextField modes and FileField selection with form, compatibility and visual coverage.
|
|
36
|
+
|
|
37
|
+
- Add labelled native Progress and LoadingIndicator status feedback with behaviour and package verification.
|
|
38
|
+
|
|
39
|
+
- Add accessible Tabs and native Disclosure with keyboard, state, compatibility and visual verification.
|
|
40
|
+
|
|
41
|
+
- Add native RadioGroup choices and Switch settings with behaviour, accessibility, visual and installed-package coverage.
|
|
42
|
+
|
|
43
|
+
- Add a controlled native Dialog with keyboard, focus, lifecycle, visual and hydration verification.
|
|
44
|
+
|
|
45
|
+
- Add labelled IconButton actions and native ButtonLink navigation with shared button styling and verification.
|
|
46
|
+
|
|
47
|
+
- Add labelled Textarea and native Select controls with colocated behaviour tests, visual states, and installed-package compatibility coverage.
|
|
48
|
+
|
|
49
|
+
- Organise runtime components, foundations, and stories into separate directories; extract contract fixtures and checker policy/helpers.
|
|
50
|
+
- Enforce source placement, component boundaries, dependency direction, and a runtime-file size budget in verification.
|
|
51
|
+
|
|
52
|
+
- Require behavioural contracts and accessibility state checks for every public component.
|
|
53
|
+
- Verify production builds in Chromium, Firefox, and WebKit with shared browser-error checks and type-aware linting.
|
|
54
|
+
- Check installed public types and SSR/hydration against minimum/current React; keep Text’s return declaration compatible with React 19.2 types.
|
|
55
|
+
- Add negative verification probes and contributor review rules for test/checker changes.
|
|
56
|
+
|
|
57
|
+
- Add a shared component comparison story, public-component coverage checks, and desktop/mobile screenshot regression tests.
|
|
58
|
+
|
|
59
|
+
- Add styling guardrails to verification, with regression tests and component styling guidance.
|
|
60
|
+
|
|
61
|
+
- Reframe documentation, package metadata, stories, and the example around reuse across web apps.
|
|
62
|
+
- Document app ownership, theme overrides, and the component contribution workflow.
|
|
63
|
+
- Add GitHub Actions verification of builds and the installed package consumer.
|
|
64
|
+
|
|
65
|
+
## 0.1.0
|
|
66
|
+
|
|
67
|
+
Initial local archive release candidate. No registry publication.
|
|
68
|
+
|
|
69
|
+
- React and Tailwind package with TypeScript declarations, compiled styles, theme tokens, and optional licensed Inter fonts.
|
|
70
|
+
- Button, TextField, Checkbox, Surface, Stack, Inline, and Text.
|
|
71
|
+
- Avatars, status chips, notifications, empty states, headers, navigation, segmented selection, and step progress.
|
|
72
|
+
- Web Storybook and a consuming application with package-installation and Chromium behaviour checks.
|
|
73
|
+
- Local release command with archive checksum and source-state metadata.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Jack Winter
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,94 @@
|
|
|
1
|
-
#
|
|
1
|
+
# pancake ui
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
a component library i can reach for whenever i want to build something. the buttons, forms, spacing, and everyday bits are already here, so i can get on with the app.
|
|
4
|
+
|
|
5
|
+
built with React, shared design tokens, and a familiar bit of lime green. bring your own ideas. pancakes optional.
|
|
6
|
+
|
|
7
|
+
## try it out
|
|
8
|
+
|
|
9
|
+
you’ll need a React 19.2+ app (within React 19), Node 22.18+, and an ESM bundler such as Vite. you don’t need Tailwind.
|
|
10
|
+
|
|
11
|
+
install the public package in your app:
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
npm install @jack.winter/pancake-ui
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
for an unpublished change, download `pancake-ui-package` from a successful main-branch [Verify run](https://github.com/j4ckwinter/pancake-ui/actions/workflows/verify.yml). extract the ZIP into your app’s `vendor/pancake-ui/` folder, then install the archive:
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
npm install ./vendor/pancake-ui/jack.winter-pancake-ui-0.1.1.tgz
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
use the filename you downloaded, and commit the archive, manifest, and app lockfile alongside `package.json`. see [installation and releases](docs/installation.md) for local builds, upgrades, and registry release setup.
|
|
24
|
+
|
|
25
|
+
## use it
|
|
26
|
+
|
|
27
|
+
import the styles once in your app entry point. the bundled Inter fonts are optional.
|
|
28
|
+
|
|
29
|
+
```tsx
|
|
30
|
+
import { Button, Stack, Surface, Text } from "@jack.winter/pancake-ui";
|
|
31
|
+
import "@jack.winter/pancake-ui/styles.css";
|
|
32
|
+
import "@jack.winter/pancake-ui/fonts.css";
|
|
33
|
+
|
|
34
|
+
export function Example() {
|
|
35
|
+
return (
|
|
36
|
+
<Surface>
|
|
37
|
+
<Stack gap="space16">
|
|
38
|
+
<Text as="h1" variant="title">
|
|
39
|
+
Your next project
|
|
40
|
+
</Text>
|
|
41
|
+
<Text>Start with the useful bits already built.</Text>
|
|
42
|
+
<Button>Get started</Button>
|
|
43
|
+
</Stack>
|
|
44
|
+
</Surface>
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
your app owns routing, data, and validation. components take native props, refs, and your own content.
|
|
50
|
+
|
|
51
|
+
## what’s in the stack
|
|
52
|
+
|
|
53
|
+
| Area | Components |
|
|
54
|
+
| ----------------------- | ------------------------------------------------------------------------------------------------------ |
|
|
55
|
+
| Layout and typography | `Stack`, `Inline`, `Text`, `Surface` |
|
|
56
|
+
| Actions | `Button`, `ButtonLink`, `IconButton` |
|
|
57
|
+
| Forms | `TextField`, `Textarea`, `Select`, `FileField`, `Checkbox`, `RadioGroup`, `Switch`, `SegmentedControl` |
|
|
58
|
+
| Navigation | `AppHeader`, `SectionHeader`, `BottomNavigation`, `Tabs`, `Pagination` |
|
|
59
|
+
| Overlays and disclosure | `Dialog`, `Popover`, `DropdownMenu`, `Tooltip`, `Disclosure` |
|
|
60
|
+
| Data and identity | `Table`, `Avatar`, `AvatarGroup` |
|
|
61
|
+
| Feedback and progress | `StatusChip`, `BannerToast`, `EmptyState`, `Progress`, `LoadingIndicator`, `StepProgress` |
|
|
62
|
+
|
|
63
|
+
run `npm run storybook` in this repo for examples and controls, or look up the details in the [component reference](docs/components.md).
|
|
64
|
+
|
|
65
|
+
## make it yours
|
|
66
|
+
|
|
67
|
+
override the CSS variables in your app’s stylesheet, loaded after the library styles:
|
|
68
|
+
|
|
69
|
+
```css
|
|
70
|
+
:root {
|
|
71
|
+
--color-pancake-accent: #b9e96f;
|
|
72
|
+
--color-pancake-surface-accent: #d1f28a;
|
|
73
|
+
--font-pancake: Inter, sans-serif;
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
set page layout and body styles in your app. see [theming](docs/installation.md#theming) for Tailwind integration and [styling](docs/styling.md) for the shared rules.
|
|
78
|
+
|
|
79
|
+
## work on it
|
|
80
|
+
|
|
81
|
+
from a local checkout:
|
|
82
|
+
|
|
83
|
+
```sh
|
|
84
|
+
npm ci
|
|
85
|
+
npm run storybook
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
`npm run example` opens the consuming app. before sharing changes, install the test browsers with `npx playwright install chromium firefox webkit`, then run `npm run verify`.
|
|
89
|
+
|
|
90
|
+
## a bit more
|
|
91
|
+
|
|
92
|
+
[installation and releases](docs/installation.md) · [component reference](docs/components.md) · [styling](docs/styling.md) · [verification](docs/verification.md) · [changelog](CHANGELOG.md)
|
|
93
|
+
|
|
94
|
+
code is licensed under [MIT](LICENSE). bundled Inter fonts retain their [SIL Open Font License](assets/fonts/OFL.txt).
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ComponentPropsWithRef } from "react";
|
|
2
|
+
export type ButtonProps = ComponentPropsWithRef<"button"> & {
|
|
3
|
+
variant?: "primary" | "secondary" | "destructive" | "ghost";
|
|
4
|
+
size?: 40 | 48;
|
|
5
|
+
loading?: boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare function Button({ variant, size, loading, disabled, type, className, children, ...props }: ButtonProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ComponentPropsWithRef } from "react";
|
|
2
|
+
import type { ButtonProps } from "./Button";
|
|
3
|
+
export type ButtonLinkProps = Omit<ComponentPropsWithRef<"a">, "href"> & {
|
|
4
|
+
href: string;
|
|
5
|
+
variant?: ButtonProps["variant"];
|
|
6
|
+
size?: ButtonProps["size"];
|
|
7
|
+
};
|
|
8
|
+
export declare function ButtonLink({ variant, size, className, ...props }: ButtonLinkProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import { type ButtonProps } from "./Button";
|
|
3
|
+
export type IconButtonProps = Omit<ButtonProps, "aria-label" | "aria-labelledby" | "children"> & {
|
|
4
|
+
label: string;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
};
|
|
7
|
+
export declare function IconButton({ label, children, loading, className, ...props }: IconButtonProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef, type ReactNode } from "react";
|
|
2
|
+
export type CheckboxProps = Omit<ComponentPropsWithRef<"input">, "type" | "children"> & {
|
|
3
|
+
label: ReactNode;
|
|
4
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
5
|
+
};
|
|
6
|
+
export declare function Checkbox({ label, onCheckedChange, onChange, id, className, ...props }: CheckboxProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef, type ReactNode } from "react";
|
|
2
|
+
export type DialogProps = Omit<ComponentPropsWithRef<"dialog">, "open" | "title" | "role" | "aria-label" | "aria-labelledby" | "aria-modal"> & {
|
|
3
|
+
open: boolean;
|
|
4
|
+
onOpenChange: (open: boolean) => void;
|
|
5
|
+
title: ReactNode;
|
|
6
|
+
description?: ReactNode;
|
|
7
|
+
closeLabel?: string;
|
|
8
|
+
};
|
|
9
|
+
export declare function Dialog({ open, onOpenChange, title, description, closeLabel, children, ref, className, onCancel, onClose, "aria-describedby": describedBy, ...props }: DialogProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef, type ReactNode } from "react";
|
|
2
|
+
type DisclosureState = {
|
|
3
|
+
open: boolean;
|
|
4
|
+
onOpenChange: (open: boolean) => void;
|
|
5
|
+
defaultOpen?: never;
|
|
6
|
+
name?: never;
|
|
7
|
+
} | {
|
|
8
|
+
open?: never;
|
|
9
|
+
defaultOpen?: boolean;
|
|
10
|
+
onOpenChange?: (open: boolean) => void;
|
|
11
|
+
name?: string;
|
|
12
|
+
};
|
|
13
|
+
export type DisclosureProps = Omit<ComponentPropsWithRef<"details">, "open" | "name" | "defaultOpen"> & {
|
|
14
|
+
summary: ReactNode;
|
|
15
|
+
} & DisclosureState;
|
|
16
|
+
export declare function Disclosure({ summary, children, open, defaultOpen, onOpenChange, onToggle, onClick, className, ...props }: DisclosureProps): import("react").JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef } from "react";
|
|
2
|
+
import { type ButtonProps } from "../Button/Button";
|
|
3
|
+
type MenuItemBase = Readonly<{
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
}>;
|
|
8
|
+
export type DropdownMenuItem = MenuItemBase & ({
|
|
9
|
+
type: "action";
|
|
10
|
+
onSelect: () => void;
|
|
11
|
+
href?: never;
|
|
12
|
+
} | ({
|
|
13
|
+
type: "link";
|
|
14
|
+
href: string;
|
|
15
|
+
onSelect?: never;
|
|
16
|
+
download?: string | boolean;
|
|
17
|
+
} & Pick<ComponentPropsWithRef<"a">, "target" | "rel">));
|
|
18
|
+
export type DropdownMenuProps = Omit<ComponentPropsWithRef<"div">, "children" | "id" | "popover" | "role" | "aria-label"> & {
|
|
19
|
+
label: string;
|
|
20
|
+
items: readonly DropdownMenuItem[];
|
|
21
|
+
onOpenChange?: (open: boolean) => void;
|
|
22
|
+
triggerProps?: Omit<ButtonProps, "children" | "type" | "popoverTarget" | "popoverTargetAction" | "aria-haspopup" | "aria-expanded" | "aria-controls">;
|
|
23
|
+
};
|
|
24
|
+
export declare function DropdownMenu({ label, items, triggerProps, onOpenChange, onToggle, onKeyDown, ref, className, ...props }: DropdownMenuProps): import("react").JSX.Element;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef, type ReactNode } from "react";
|
|
2
|
+
export type FileFieldProps = Omit<ComponentPropsWithRef<"input">, "type" | "children" | "value" | "defaultValue" | "readOnly"> & {
|
|
3
|
+
label: ReactNode;
|
|
4
|
+
helperText?: string;
|
|
5
|
+
error?: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function FileField({ label, helperText, error, id, className, required, "aria-describedby": describedBy, "aria-invalid": invalid, ...props }: FileFieldProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ComponentPropsWithRef } from "react";
|
|
2
|
+
type PaginationMode = {
|
|
3
|
+
onPageChange: (page: number) => void;
|
|
4
|
+
getPageHref?: never;
|
|
5
|
+
linkProps?: never;
|
|
6
|
+
} | {
|
|
7
|
+
getPageHref: (page: number) => string;
|
|
8
|
+
onPageChange?: never;
|
|
9
|
+
linkProps?: Pick<ComponentPropsWithRef<"a">, "target" | "rel">;
|
|
10
|
+
};
|
|
11
|
+
export type PaginationProps = Omit<ComponentPropsWithRef<"nav">, "children" | "role" | "aria-label"> & PaginationMode & {
|
|
12
|
+
label: string;
|
|
13
|
+
page: number;
|
|
14
|
+
pageCount: number;
|
|
15
|
+
labels?: {
|
|
16
|
+
previous?: string;
|
|
17
|
+
next?: string;
|
|
18
|
+
page?: (page: number) => string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export declare function Pagination({ label, page, pageCount, labels, getPageHref, onPageChange, linkProps, className, ...props }: PaginationProps): import("react").JSX.Element;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef } from "react";
|
|
2
|
+
export type PopoverProps = Omit<ComponentPropsWithRef<"div">, "id" | "popover" | "role" | "aria-label"> & {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
onOpenChange?: (open: boolean) => void;
|
|
6
|
+
};
|
|
7
|
+
export declare function Popover({ label, onOpenChange, onToggle, className, ...props }: PopoverProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef, type ReactNode } from "react";
|
|
2
|
+
export type RadioOption = Readonly<{
|
|
3
|
+
value: string;
|
|
4
|
+
label: ReactNode;
|
|
5
|
+
description?: ReactNode;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
}>;
|
|
8
|
+
export type RadioGroupProps = Omit<ComponentPropsWithRef<"fieldset">, "children" | "onChange"> & {
|
|
9
|
+
label: ReactNode;
|
|
10
|
+
options: readonly RadioOption[];
|
|
11
|
+
value?: string;
|
|
12
|
+
defaultValue?: string;
|
|
13
|
+
onValueChange?: (value: string) => void;
|
|
14
|
+
required?: boolean;
|
|
15
|
+
helperText?: ReactNode;
|
|
16
|
+
error?: string;
|
|
17
|
+
};
|
|
18
|
+
export declare function RadioGroup({ label, options, value, defaultValue, onValueChange, required, helperText, error, name, disabled, className, "aria-describedby": describedBy, "aria-invalid": invalid, ...props }: RadioGroupProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef, type ReactNode } from "react";
|
|
2
|
+
export type SelectProps = Omit<ComponentPropsWithRef<"select">, "multiple" | "size" | "value" | "defaultValue"> & {
|
|
3
|
+
label: ReactNode;
|
|
4
|
+
value?: string | number;
|
|
5
|
+
defaultValue?: string | number;
|
|
6
|
+
helperText?: string;
|
|
7
|
+
error?: string;
|
|
8
|
+
};
|
|
9
|
+
export declare function Select({ label, helperText, error, id, className, required, "aria-describedby": describedBy, "aria-invalid": invalid, ...props }: SelectProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef, type ReactNode } from "react";
|
|
2
|
+
export type SwitchProps = Omit<ComponentPropsWithRef<"input">, "type" | "children" | "role"> & {
|
|
3
|
+
label: ReactNode;
|
|
4
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
5
|
+
};
|
|
6
|
+
export declare function Switch({ label, onChange, onCheckedChange, id, className, ...props }: SwitchProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef, type ReactNode } from "react";
|
|
2
|
+
export type TableProps = Omit<ComponentPropsWithRef<"table">, "children"> & {
|
|
3
|
+
caption: string;
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
};
|
|
6
|
+
export declare function Table({ caption, children, className, ...props }: TableProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef, type ReactNode } from "react";
|
|
2
|
+
export type TabItem = Readonly<{
|
|
3
|
+
value: string;
|
|
4
|
+
label: ReactNode;
|
|
5
|
+
content: ReactNode;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
}>;
|
|
8
|
+
export type TabsProps = Omit<ComponentPropsWithRef<"div">, "children" | "defaultValue"> & {
|
|
9
|
+
label: string;
|
|
10
|
+
items: readonly TabItem[];
|
|
11
|
+
value?: string;
|
|
12
|
+
defaultValue?: string;
|
|
13
|
+
onValueChange?: (value: string) => void;
|
|
14
|
+
orientation?: "horizontal" | "vertical";
|
|
15
|
+
activation?: "automatic" | "manual";
|
|
16
|
+
};
|
|
17
|
+
export declare function Tabs({ label, items, value, defaultValue, onValueChange, orientation, activation, className, ...props }: TabsProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef, type ReactNode } from "react";
|
|
2
|
+
export type TextFieldProps = Omit<ComponentPropsWithRef<"input">, "type" | "children"> & {
|
|
3
|
+
label: ReactNode;
|
|
4
|
+
type?: "text" | "email" | "password" | "search" | "tel" | "url" | "number" | "date" | "time" | "datetime-local";
|
|
5
|
+
helperText?: string;
|
|
6
|
+
error?: string;
|
|
7
|
+
};
|
|
8
|
+
export declare function TextField({ label, type, helperText, error, id, className, required, "aria-describedby": describedBy, "aria-invalid": invalid, ...props }: TextFieldProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef, type ReactNode } from "react";
|
|
2
|
+
export type TextareaProps = Omit<ComponentPropsWithRef<"textarea">, "children"> & {
|
|
3
|
+
label: ReactNode;
|
|
4
|
+
helperText?: string;
|
|
5
|
+
error?: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function Textarea({ label, rows, helperText, error, id, className, required, "aria-describedby": describedBy, "aria-invalid": invalid, ...props }: TextareaProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef, type HTMLAttributes, type ReactElement } from "react";
|
|
2
|
+
export type TooltipProps = Omit<ComponentPropsWithRef<"span">, "children" | "content" | "id" | "popover" | "role" | "tabIndex" | "autoFocus"> & {
|
|
3
|
+
content: string;
|
|
4
|
+
children: ReactElement<HTMLAttributes<HTMLElement>>;
|
|
5
|
+
onOpenChange?: (open: boolean) => void;
|
|
6
|
+
};
|
|
7
|
+
export declare function Tooltip({ content, children, onOpenChange, onToggle, ref, className, ...props }: TooltipProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type FocusEvent, type PointerEvent } from "react";
|
|
2
|
+
export declare function useTooltip(): {
|
|
3
|
+
anchor: import("react").RefObject<HTMLSpanElement | null>;
|
|
4
|
+
panel: import("react").RefObject<HTMLSpanElement | null>;
|
|
5
|
+
handlers: {
|
|
6
|
+
onFocus: (event: FocusEvent<HTMLSpanElement>) => void;
|
|
7
|
+
onBlur: (event: FocusEvent<HTMLSpanElement>) => void;
|
|
8
|
+
onPointerEnter: (event: PointerEvent<HTMLSpanElement>) => void;
|
|
9
|
+
onPointerLeave: (event: PointerEvent<HTMLSpanElement>) => void;
|
|
10
|
+
onPointerDown: (event: PointerEvent<HTMLSpanElement>) => void;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ComponentPropsWithRef, ReactNode } from "react";
|
|
2
|
+
export type BannerToastProps = Omit<ComponentPropsWithRef<"div">, "title" | "role" | "aria-live"> & {
|
|
3
|
+
title: ReactNode;
|
|
4
|
+
tone?: "success" | "warning" | "error" | "info";
|
|
5
|
+
onDismiss?: () => void;
|
|
6
|
+
dismissLabel?: string;
|
|
7
|
+
};
|
|
8
|
+
export declare function BannerToast({ title, children, tone, onDismiss, dismissLabel, className, ...props }: BannerToastProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ComponentPropsWithRef, ReactNode } from "react";
|
|
2
|
+
export type EmptyStateProps = Omit<ComponentPropsWithRef<"div">, "title" | "children"> & {
|
|
3
|
+
title: ReactNode;
|
|
4
|
+
description?: ReactNode;
|
|
5
|
+
icon?: ReactNode;
|
|
6
|
+
action?: ReactNode;
|
|
7
|
+
};
|
|
8
|
+
export declare function EmptyState({ title, description, icon, action, className, ...props }: EmptyStateProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ComponentPropsWithRef } from "react";
|
|
2
|
+
export type StatusChipTone = "neutral" | "success" | "warning" | "danger" | "info";
|
|
3
|
+
export type StatusChipProps = ComponentPropsWithRef<"span"> & {
|
|
4
|
+
tone?: StatusChipTone;
|
|
5
|
+
};
|
|
6
|
+
export declare function StatusChip({ tone, className, ...props }: StatusChipProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef } from "react";
|
|
2
|
+
export type AvatarSize = 32 | 40 | 48 | 64;
|
|
3
|
+
export type AvatarProps = Omit<ComponentPropsWithRef<"span">, "children"> & {
|
|
4
|
+
name: string;
|
|
5
|
+
src?: string;
|
|
6
|
+
size?: AvatarSize;
|
|
7
|
+
decorative?: boolean;
|
|
8
|
+
};
|
|
9
|
+
export declare function Avatar({ name, src, size, decorative, className, style, ...props }: AvatarProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ComponentPropsWithRef } from "react";
|
|
2
|
+
import { type AvatarSize } from "./Avatar";
|
|
3
|
+
export type AvatarGroupItem = {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
src?: string;
|
|
7
|
+
};
|
|
8
|
+
export type AvatarGroupProps = Omit<ComponentPropsWithRef<"ul">, "children"> & {
|
|
9
|
+
items: readonly AvatarGroupItem[];
|
|
10
|
+
max?: number;
|
|
11
|
+
size?: AvatarSize;
|
|
12
|
+
};
|
|
13
|
+
export declare function AvatarGroup({ items, max, size, className, "aria-label": label, ...props }: AvatarGroupProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ComponentPropsWithRef } from "react";
|
|
2
|
+
import type { SpacingToken } from "../../foundations/tokens";
|
|
3
|
+
import { type Alignment, type Justification } from "./layout.shared";
|
|
4
|
+
export type StackProps = ComponentPropsWithRef<"div"> & {
|
|
5
|
+
gap?: SpacingToken;
|
|
6
|
+
padding?: SpacingToken;
|
|
7
|
+
align?: Alignment;
|
|
8
|
+
justify?: Justification;
|
|
9
|
+
};
|
|
10
|
+
export declare function Stack({ gap, padding, align, justify, className, style, ...props }: StackProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef, type ReactElement } from "react";
|
|
2
|
+
import type { TypographyToken, ColorToken } from "../../foundations/tokens";
|
|
3
|
+
export type TextProps = ComponentPropsWithRef<"span"> & {
|
|
4
|
+
as?: "span" | "p" | "h1" | "h2" | "h3" | "h4";
|
|
5
|
+
variant?: TypographyToken;
|
|
6
|
+
color?: ColorToken;
|
|
7
|
+
};
|
|
8
|
+
export declare function Text({ as, variant, color, className, style, ...props }: TextProps): ReactElement;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type SpacingToken } from "../../foundations/tokens";
|
|
2
|
+
export type Alignment = "start" | "center" | "end" | "stretch";
|
|
3
|
+
export type Justification = "start" | "center" | "end" | "space-between";
|
|
4
|
+
export declare const alignment: {
|
|
5
|
+
readonly start: "flex-start";
|
|
6
|
+
readonly center: "center";
|
|
7
|
+
readonly end: "flex-end";
|
|
8
|
+
readonly stretch: "stretch";
|
|
9
|
+
};
|
|
10
|
+
export declare const justification: {
|
|
11
|
+
readonly start: "flex-start";
|
|
12
|
+
readonly center: "center";
|
|
13
|
+
readonly end: "flex-end";
|
|
14
|
+
readonly "space-between": "space-between";
|
|
15
|
+
};
|
|
16
|
+
export declare const space: (token: SpacingToken) => string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ComponentPropsWithRef, ReactNode } from "react";
|
|
2
|
+
type HeaderContent = {
|
|
3
|
+
title: ReactNode;
|
|
4
|
+
description?: ReactNode;
|
|
5
|
+
};
|
|
6
|
+
export type AppHeaderProps = Omit<ComponentPropsWithRef<"header">, "title" | "children"> & HeaderContent & {
|
|
7
|
+
leading?: ReactNode;
|
|
8
|
+
trailing?: ReactNode;
|
|
9
|
+
};
|
|
10
|
+
export declare function AppHeader({ title, description, leading, trailing, className, ...props }: AppHeaderProps): import("react").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ComponentPropsWithRef, ReactNode } from "react";
|
|
2
|
+
export type NavigationItem = Readonly<{
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
href: string;
|
|
6
|
+
icon?: ReactNode;
|
|
7
|
+
}>;
|
|
8
|
+
export type BottomNavigationProps = Omit<ComponentPropsWithRef<"nav">, "children"> & {
|
|
9
|
+
items: readonly NavigationItem[];
|
|
10
|
+
activeId?: string;
|
|
11
|
+
};
|
|
12
|
+
export declare function BottomNavigation({ items, activeId, className, "aria-label": label, ...props }: BottomNavigationProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ComponentPropsWithRef, ReactNode } from "react";
|
|
2
|
+
type HeaderContent = {
|
|
3
|
+
title: ReactNode;
|
|
4
|
+
description?: ReactNode;
|
|
5
|
+
};
|
|
6
|
+
export type SectionHeaderProps = Omit<ComponentPropsWithRef<"div">, "title" | "children"> & HeaderContent & {
|
|
7
|
+
action?: ReactNode;
|
|
8
|
+
headingLevel?: 2 | 3 | 4;
|
|
9
|
+
};
|
|
10
|
+
export declare function SectionHeader({ title, description, action, headingLevel, className, ...props }: SectionHeaderProps): import("react").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef, type ReactNode } from "react";
|
|
2
|
+
export type SegmentOption = Readonly<{
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
}>;
|
|
7
|
+
export type SegmentedControlProps = Omit<ComponentPropsWithRef<"fieldset">, "children" | "onChange"> & {
|
|
8
|
+
label: ReactNode;
|
|
9
|
+
options: readonly SegmentOption[];
|
|
10
|
+
value?: string;
|
|
11
|
+
defaultValue?: string;
|
|
12
|
+
onValueChange?: (value: string) => void;
|
|
13
|
+
required?: boolean;
|
|
14
|
+
};
|
|
15
|
+
export declare function SegmentedControl({ label, options, value, defaultValue, onValueChange, name, disabled, required, className, ...props }: SegmentedControlProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ComponentPropsWithRef } from "react";
|
|
2
|
+
export type StepProgressProps = Omit<ComponentPropsWithRef<"ol">, "children"> & {
|
|
3
|
+
steps: readonly string[];
|
|
4
|
+
currentStep: number;
|
|
5
|
+
};
|
|
6
|
+
export declare function StepProgress({ steps, currentStep, className, "aria-label": label, ...props }: StepProgressProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ComponentPropsWithRef } from "react";
|
|
2
|
+
export type LoadingIndicatorProps = Omit<ComponentPropsWithRef<"div">, "children" | "role"> & {
|
|
3
|
+
label: string;
|
|
4
|
+
};
|
|
5
|
+
export declare function LoadingIndicator({ label, className, ...props }: LoadingIndicatorProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef } from "react";
|
|
2
|
+
export type ProgressProps = Omit<ComponentPropsWithRef<"progress">, "children" | "value" | "max"> & {
|
|
3
|
+
label: string;
|
|
4
|
+
value?: number;
|
|
5
|
+
max?: number;
|
|
6
|
+
};
|
|
7
|
+
/** Native progress; ref, className and style target the progress element. */
|
|
8
|
+
export declare function Progress({ label, value, max, id, className, ...props }: ProgressProps): import("react").JSX.Element;
|