@jfrader/ui 0.6.0 → 0.7.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/README.md +10 -6
- package/dist/{avatar-group-DvP8mAE-.js → avatar-group-BlMLNw4J.js} +1 -1
- package/dist/avatar-group.js +1 -1
- package/dist/avatar-sPxDqFiZ.js +133 -0
- package/dist/avatar.js +1 -1
- package/dist/{chat-thread-DVa17BRC.js → chat-thread-DkB-WMWJ.js} +1 -1
- package/dist/chat-thread.js +1 -1
- package/dist/{comment-thread-BnUHxviq.js → comment-thread-DXfqgRNI.js} +1 -1
- package/dist/comment-thread.js +1 -1
- package/dist/emblem-DnXmpZCh.js +166 -0
- package/dist/emblem.js +2 -0
- package/dist/game-card-Oeu74giK.js +194 -0
- package/dist/game-card.js +2 -0
- package/dist/{hover-card-DN1EAlQA.js → hover-card-Dgu2CwMD.js} +1 -1
- package/dist/hover-card.js +1 -1
- package/dist/in-view-title-BUZCMqge.js +225 -0
- package/dist/in-view-title.js +2 -0
- package/dist/index.js +69 -65
- package/dist/initials-DEdwNe9_.js +18 -0
- package/dist/locale-switcher-DTkySKsM.js +375 -0
- package/dist/locale-switcher.js +1 -1
- package/dist/{thread-parts-DfZNz70v.js → thread-parts-Cpktor6D.js} +1 -1
- package/dist/{timeline-DaldDMX7.js → timeline-BcF46lG9.js} +1 -1
- package/dist/timeline.js +1 -1
- package/dist/types/components/activity-rings/activity-rings.d.ts +7 -9
- package/dist/types/components/avatar-group/avatar-group.d.ts +3 -3
- package/dist/types/components/button/button.d.ts +7 -7
- package/dist/types/components/card/card.d.ts +4 -1
- package/dist/types/components/chip-group/chip-group.d.ts +2 -2
- package/dist/types/components/combobox/combobox.d.ts +2 -2
- package/dist/types/components/command-palette/command-palette.d.ts +1 -1
- package/dist/types/components/comment-thread/comment-thread.d.ts +4 -4
- package/dist/types/components/copy-button/copy-button.d.ts +6 -6
- package/dist/types/components/countdown/countdown.d.ts +2 -2
- package/dist/types/components/dialog/dialog.d.ts +18 -20
- package/dist/types/components/drawer/drawer.d.ts +2 -2
- package/dist/types/components/emblem/emblem.d.ts +59 -0
- package/dist/types/components/emblem/index.d.ts +2 -0
- package/dist/types/components/empty-state/empty-state.d.ts +2 -2
- package/dist/types/components/file-dropzone/file-dropzone.d.ts +3 -4
- package/dist/types/components/filter-toolbar/filter-toolbar.d.ts +2 -2
- package/dist/types/components/game-card/card-frame.d.ts +16 -0
- package/dist/types/components/game-card/decks.d.ts +27 -0
- package/dist/types/components/game-card/game-card.d.ts +37 -0
- package/dist/types/components/game-card/index.d.ts +4 -0
- package/dist/types/components/hold-to-confirm/hold-to-confirm.d.ts +1 -1
- package/dist/types/components/hover-card/hover-card.d.ts +5 -5
- package/dist/types/components/in-view-title/in-view-title.d.ts +23 -0
- package/dist/types/components/in-view-title/index.d.ts +1 -0
- package/dist/types/components/inline-edit/inline-edit.d.ts +6 -6
- package/dist/types/components/json-viewer/json-viewer.d.ts +7 -9
- package/dist/types/components/keycap-keyboard/keycap-keyboard.d.ts +1 -1
- package/dist/types/components/link-unfurl/link-unfurl.d.ts +17 -7
- package/dist/types/components/locale-switcher/locale-switcher.d.ts +17 -11
- package/dist/types/components/mention-input/mention-input.d.ts +7 -7
- package/dist/types/components/metric-card/metric-card.d.ts +2 -2
- package/dist/types/components/navigation/navigation.d.ts +1 -1
- package/dist/types/components/next/emotion-registry.d.ts +3 -5
- package/dist/types/components/now-playing/now-playing.d.ts +2 -2
- package/dist/types/components/password-field/password-field.d.ts +1 -1
- package/dist/types/components/progress/progress.d.ts +1 -1
- package/dist/types/components/select/select.d.ts +1 -1
- package/dist/types/components/sheet-stack/sheet-stack.d.ts +19 -16
- package/dist/types/components/signature-pad/signature-pad.d.ts +2 -2
- package/dist/types/components/split-button/split-button.d.ts +3 -4
- package/dist/types/components/swipe-actions/swipe-actions.d.ts +1 -2
- package/dist/types/components/tag-input/tag-input.d.ts +2 -3
- package/dist/types/components/theme-root/theme-root.d.ts +5 -6
- package/dist/types/components/theme-switch/theme-switch.d.ts +3 -3
- package/dist/types/components/time-picker/time-picker.d.ts +2 -2
- package/dist/types/components/timeline/timeline.d.ts +4 -4
- package/dist/types/components/toast/toast.d.ts +3 -3
- package/dist/types/components/tree-view/tree-view.d.ts +4 -3
- package/dist/types/components/typewriter-terminal/index.d.ts +2 -0
- package/dist/types/components/typewriter-terminal/typewriter-terminal.d.ts +87 -0
- package/dist/types/components/usage-meter/usage-meter.d.ts +4 -4
- package/dist/types/components/usage-meter/usage-model.d.ts +1 -1
- package/dist/types/components/user-menu/user-menu.d.ts +3 -4
- package/dist/types/index.d.ts +4 -0
- package/dist/types/styling/motion-timings.d.ts +5 -0
- package/dist/types/styling/sx.d.ts +1 -1
- package/dist/types/styling/theme.d.ts +10 -0
- package/dist/types/utils/initials.d.ts +2 -0
- package/dist/typewriter-terminal-BUEsMzo3.js +588 -0
- package/dist/typewriter-terminal.js +2 -0
- package/dist/{user-menu-DzELTg1x.js → user-menu-MctRu_Lh.js} +1 -1
- package/dist/user-menu.js +1 -1
- package/package.json +18 -2
- package/dist/avatar-B6idYC59.js +0 -146
- package/dist/locale-switcher-CZF7XNYG.js +0 -295
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
2
|
export interface EmotionRegistryProps {
|
|
3
|
-
/**
|
|
3
|
+
/** Sets the Emotion class name prefix and `data-emotion` cache key. Defaults to `'css'`. */
|
|
4
4
|
cacheKey?: string;
|
|
5
5
|
children?: ReactNode;
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* match on hydration. Without it, Emotion inserts <style> nodes inline during SSR
|
|
11
|
-
* and the hydration diff mismatches.
|
|
8
|
+
* Shares one Emotion cache and emits new styles on each App Router server render pass.
|
|
9
|
+
* Without it, Emotion inserts inline `<style>` nodes during SSR that cause hydration mismatches.
|
|
12
10
|
*/
|
|
13
11
|
export declare function EmotionRegistry({ cacheKey, children }: EmotionRegistryProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
14
12
|
export declare namespace EmotionRegistry {
|
|
@@ -66,8 +66,8 @@ export interface NowPlayingProps extends Omit<ComponentPropsWithRef<'section'>,
|
|
|
66
66
|
labels?: Partial<NowPlayingLabels>;
|
|
67
67
|
locale?: Intl.LocalesArgument;
|
|
68
68
|
/**
|
|
69
|
-
* Seconds per arrow step.
|
|
70
|
-
* step that does not divide it is rounded to the nearest one that does (180s with 7 → 180/26).
|
|
69
|
+
* Seconds per arrow step. Duration must be a whole number of steps.
|
|
70
|
+
* A step that does not divide it is rounded to the nearest one that does (180s with 7 → 180/26).
|
|
71
71
|
* Defaults to the largest step of at most one second that divides the duration.
|
|
72
72
|
*/
|
|
73
73
|
seekStep?: number;
|
|
@@ -24,7 +24,7 @@ export interface PasswordFieldProps extends Omit<ComponentPropsWithRef<'input'>,
|
|
|
24
24
|
error?: ReactNode;
|
|
25
25
|
size?: PasswordFieldSize;
|
|
26
26
|
messages?: Partial<PasswordFieldMessages>;
|
|
27
|
-
/** Replaces the
|
|
27
|
+
/** Replaces the eye icon inside the toggle; hidden from assistive technology. */
|
|
28
28
|
revealIcon?: (revealed: boolean) => ReactNode;
|
|
29
29
|
slotProps?: PasswordFieldSlotProps;
|
|
30
30
|
}
|
|
@@ -11,7 +11,7 @@ export interface ProgressProps extends Omit<ComponentPropsWithRef<'div'>, 'child
|
|
|
11
11
|
max?: number;
|
|
12
12
|
/** Accessible name, rendered visually hidden. */
|
|
13
13
|
label?: ReactNode;
|
|
14
|
-
/**
|
|
14
|
+
/** Value text for assistive technology (aria-valuetext). */
|
|
15
15
|
getValueLabel?: (value: number, max: number) => string;
|
|
16
16
|
slotProps?: {
|
|
17
17
|
indicator?: ProgressPartProps;
|
|
@@ -11,7 +11,7 @@ export interface SelectProps {
|
|
|
11
11
|
onOpenChange?: (open: boolean) => void;
|
|
12
12
|
placement?: Placement;
|
|
13
13
|
disabled?: boolean;
|
|
14
|
-
/**
|
|
14
|
+
/** Adds a hidden input to submit the value with a native form. */
|
|
15
15
|
name?: string;
|
|
16
16
|
children?: ReactNode;
|
|
17
17
|
}
|
|
@@ -3,33 +3,36 @@ import { type SxProps } from '../../styling/sx';
|
|
|
3
3
|
export type SheetStackVariant = 'auto' | 'sheet' | 'dialog';
|
|
4
4
|
export type SheetStackHeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
|
|
5
5
|
export interface SheetStackProps {
|
|
6
|
-
/**
|
|
6
|
+
/** Controls the open panel keys, bottom first. */
|
|
7
7
|
value?: readonly string[];
|
|
8
|
+
/** Sets the initial uncontrolled stack, bottom first. Defaults to `[]`. */
|
|
8
9
|
defaultValue?: readonly string[];
|
|
10
|
+
/** Requests a changed ordered stack. Controlled panels change only when `value` updates. */
|
|
9
11
|
onValueChange?: (value: string[]) => void;
|
|
10
|
-
/**
|
|
12
|
+
/** Sets the layout. Defaults to `'auto'`: a sheet below `breakpoint`, a centered dialog at or above it. */
|
|
11
13
|
variant?: SheetStackVariant;
|
|
12
|
-
/**
|
|
14
|
+
/** Sets the layer width in CSS pixels where `'auto'` switches to a dialog. Defaults to the `sheetStackBreakpoint` token. */
|
|
13
15
|
breakpoint?: number;
|
|
14
|
-
/** Draws
|
|
16
|
+
/** Draws inside the nearest positioned ancestor. Modality stays document-wide, without a page scroll lock. Defaults to `false`. */
|
|
15
17
|
contained?: boolean;
|
|
16
18
|
children: ReactNode;
|
|
17
19
|
}
|
|
18
20
|
export interface SheetStackTriggerProps extends ComponentPropsWithRef<'button'>, SxProps {
|
|
19
|
-
/**
|
|
21
|
+
/** Opens this panel key. An open key removes the panels above it. */
|
|
20
22
|
value: string;
|
|
21
23
|
}
|
|
22
24
|
export interface SheetStackContentProps extends Omit<ComponentPropsWithRef<'div'>, 'onCancel'>, SxProps {
|
|
23
|
-
/**
|
|
25
|
+
/** Identifies this panel. Keep the key stable and unique within the stack. */
|
|
24
26
|
value: string;
|
|
25
|
-
/**
|
|
27
|
+
/** Allows Escape, backdrop, and drag dismissal. Defaults to `true`. When `false`, Back and Close still work. */
|
|
26
28
|
dismissible?: boolean;
|
|
27
|
-
/**
|
|
29
|
+
/** Receives Escape, backdrop, or drag dismissal requests while this panel is on top. Call `preventDefault()` to keep it open. */
|
|
28
30
|
onCancel?: (event: Event) => void;
|
|
29
|
-
/**
|
|
31
|
+
/** Includes `Description` in the accessible description. Defaults to `true`. Use `false` for structured content. */
|
|
30
32
|
withDescription?: boolean;
|
|
31
33
|
}
|
|
32
34
|
export interface SheetStackTitleProps extends ComponentPropsWithRef<'h2'>, SxProps {
|
|
35
|
+
/** Sets the heading level. Defaults to `2`. */
|
|
33
36
|
level?: SheetStackHeadingLevel;
|
|
34
37
|
}
|
|
35
38
|
export interface SheetStackDescriptionProps extends ComponentPropsWithRef<'p'>, SxProps {
|
|
@@ -37,26 +40,26 @@ export interface SheetStackDescriptionProps extends ComponentPropsWithRef<'p'>,
|
|
|
37
40
|
export interface SheetStackFooterProps extends ComponentPropsWithRef<'div'>, SxProps {
|
|
38
41
|
}
|
|
39
42
|
export interface SheetStackBackProps extends Omit<ComponentPropsWithRef<'button'>, 'aria-label'>, SxProps {
|
|
40
|
-
/**
|
|
43
|
+
/** Names the Back button for assistive technology. Supply a localized name, such as "Back to Settings". */
|
|
41
44
|
label: string;
|
|
42
45
|
}
|
|
43
46
|
export interface SheetStackCloseProps extends Omit<ComponentPropsWithRef<'button'>, 'aria-label'>, SxProps {
|
|
44
|
-
/**
|
|
47
|
+
/** Names the Close button for assistive technology. Supply a localized name, such as "Close all". */
|
|
45
48
|
label: string;
|
|
46
49
|
}
|
|
47
50
|
export interface SheetStackActions {
|
|
48
51
|
/** The open keys, bottom first. */
|
|
49
52
|
value: readonly string[];
|
|
50
|
-
/**
|
|
53
|
+
/** Requests opening `key` on top. An open key removes the panels above it. */
|
|
51
54
|
push: (key: string) => void;
|
|
52
|
-
/**
|
|
55
|
+
/** Requests closing the top panel. Does nothing on an empty stack. */
|
|
53
56
|
pop: () => void;
|
|
54
|
-
/**
|
|
57
|
+
/** Requests removing the panels above an open `key`. A closed key is ignored with a development warning. */
|
|
55
58
|
popTo: (key: string) => void;
|
|
56
|
-
/**
|
|
59
|
+
/** Requests closing every panel. Does nothing on an empty stack. */
|
|
57
60
|
close: () => void;
|
|
58
61
|
}
|
|
59
|
-
/**
|
|
62
|
+
/** Returns the stack's state and actions. Throws outside `<SheetStack>`. */
|
|
60
63
|
export declare function useSheetStack(): SheetStackActions;
|
|
61
64
|
declare function SheetStackRoot({ value: valueProp, defaultValue, onValueChange, variant, breakpoint, contained, children, }: SheetStackProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
62
65
|
declare function SheetStackTrigger({ ref, value, onClick, className, sx, ...rest }: SheetStackTriggerProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -94,10 +94,10 @@ export declare class SignatureExportError extends Error {
|
|
|
94
94
|
export declare function signatureToPng(strokes: SignatureStroke[], options?: SignatureExportOptions): Promise<Blob>;
|
|
95
95
|
/** The same midpoint-quadratic segments and round caps used by Canvas, with fixed print ink. */
|
|
96
96
|
export declare function signatureToSvg(strokes: SignatureStroke[], options?: SignatureExportOptions): string;
|
|
97
|
-
/**
|
|
97
|
+
/** Draw a signature with a pointer. Forms must offer typed-name or upload alternatives.
|
|
98
98
|
* Canvas shortcuts: Mod+Z undo, Shift+Mod+Z/Mod+Y redo, Delete clear, Escape cancel/stop.
|
|
99
99
|
* Samples use 600×260 coordinates; pressure changes round line widths, not speed-based taper.
|
|
100
|
-
*
|
|
100
|
+
* The drawing does not establish identity, consent or legal validity. */
|
|
101
101
|
export declare function SignaturePad({ ref, apiRef, value: valueProp, defaultValue, onValueChange, color: colorProp, defaultColor, onColorChange, width: widthProp, defaultWidth, onWidthChange, label, description, error, signer, hint, disabled, readOnly, required, replay: showReplay, download, fileName, historyLimit, messages, icons, exportOptions, slotProps, className, sx, dir, style, onPointerDown, onPointerMove, onPointerUp, onPointerCancel, onLostPointerCapture, onKeyDown, 'aria-labelledby': labelledBy, 'aria-describedby': describedBy, ...rest }: SignaturePadProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
102
102
|
export declare namespace SignaturePad {
|
|
103
103
|
var displayName: string;
|
|
@@ -9,7 +9,7 @@ export interface SplitButtonProps extends Omit<ComponentPropsWithRef<'div'>, 'ro
|
|
|
9
9
|
variant?: ButtonVariant;
|
|
10
10
|
tone?: ButtonTone;
|
|
11
11
|
size?: ButtonSize;
|
|
12
|
-
/** Disables Action, Trigger and items
|
|
12
|
+
/** Disables Action, Trigger and items. Requests closure once if the menu is open. */
|
|
13
13
|
disabled?: boolean;
|
|
14
14
|
open?: boolean;
|
|
15
15
|
defaultOpen?: boolean;
|
|
@@ -20,13 +20,12 @@ export interface SplitButtonProps extends Omit<ComponentPropsWithRef<'div'>, 'ro
|
|
|
20
20
|
}
|
|
21
21
|
export interface SplitButtonActionProps extends Omit<ButtonProps, 'render'> {
|
|
22
22
|
/**
|
|
23
|
-
* Labels
|
|
24
|
-
* longest one while its label changes; a label swap fades in.
|
|
23
|
+
* Labels Action may show. Reserves the width of the longest label; changed labels fade in.
|
|
25
24
|
*/
|
|
26
25
|
reserveLabels?: readonly string[];
|
|
27
26
|
}
|
|
28
27
|
type SplitButtonTriggerBaseProps = Omit<ButtonProps, 'render' | 'variant' | 'tone' | 'size' | 'loading' | 'startIcon' | 'endIcon' | 'aria-haspopup' | 'aria-expanded' | 'aria-controls'>;
|
|
29
|
-
/**
|
|
28
|
+
/** Trigger has no text. Supply a translated `aria-label` or `aria-labelledby`. */
|
|
30
29
|
export type SplitButtonTriggerProps = SplitButtonTriggerBaseProps & ({
|
|
31
30
|
'aria-label': string;
|
|
32
31
|
} | {
|
|
@@ -13,8 +13,7 @@ export interface SwipeAction {
|
|
|
13
13
|
tone?: 'neutral' | 'accent' | 'danger';
|
|
14
14
|
disabled?: boolean;
|
|
15
15
|
onSelect: () => void;
|
|
16
|
-
/** Caller
|
|
17
|
-
* never deletes data itself, so this is metadata for the caller's `onSelect`. */
|
|
16
|
+
/** Caller metadata indicating the row should stay. Commands close the rail but never delete data. */
|
|
18
17
|
keepRow?: boolean;
|
|
19
18
|
}
|
|
20
19
|
type Slot = {
|
|
@@ -29,8 +29,7 @@ export interface TagInputSlotProps extends FieldSlotProps<TagInputPartProps> {
|
|
|
29
29
|
}
|
|
30
30
|
export interface TagInputProps extends Omit<ComponentPropsWithRef<'input'>, 'size' | 'value' | 'defaultValue' | 'type' | 'children'>, SxProps {
|
|
31
31
|
/**
|
|
32
|
-
*
|
|
33
|
-
* component renders them as given and never rewrites a provided list.
|
|
32
|
+
* Tokens in order. Entries must be unique, nonempty and normalized. The list renders as supplied.
|
|
34
33
|
*/
|
|
35
34
|
value?: readonly string[];
|
|
36
35
|
defaultValue?: readonly string[];
|
|
@@ -51,7 +50,7 @@ export interface TagInputProps extends Omit<ComponentPropsWithRef<'input'>, 'siz
|
|
|
51
50
|
normalize?: (draft: string) => string;
|
|
52
51
|
/** Returns a rejection message, or `null` to accept the token. */
|
|
53
52
|
validateToken?: (token: string) => string | null;
|
|
54
|
-
/**
|
|
53
|
+
/** Maximum token count for additions. Initial and controlled lists beyond this count are kept. */
|
|
55
54
|
maxTokens?: number;
|
|
56
55
|
/** Locale for duplicate comparison and default number formatting. */
|
|
57
56
|
locale?: Intl.LocalesArgument;
|
|
@@ -4,17 +4,16 @@ import { type SxProps } from '../../styling/sx';
|
|
|
4
4
|
import { type ThemeName } from '../../styling/theme-scope';
|
|
5
5
|
export type { ThemeName };
|
|
6
6
|
export interface ThemeRootProps extends ComponentPropsWithRef<'div'>, SxProps {
|
|
7
|
-
/**
|
|
7
|
+
/** Base palette for this scope. `tokens` overrides its values. */
|
|
8
8
|
theme?: ThemeName;
|
|
9
9
|
/**
|
|
10
|
-
* Token overrides
|
|
11
|
-
*
|
|
12
|
-
* root's tokens; a root naming another theme drops them.
|
|
10
|
+
* Token overrides, applied as inline custom properties. Use `createTheme()` to derive them from
|
|
11
|
+
* an accent. Omit to inherit the enclosing root's tokens when the themes match; otherwise none carry over.
|
|
13
12
|
*/
|
|
14
13
|
tokens?: ThemeTokens;
|
|
15
14
|
/**
|
|
16
|
-
*
|
|
17
|
-
*
|
|
15
|
+
* Container for this root's overlays. Omit to inherit the enclosing container or use `body`.
|
|
16
|
+
* With `null`, overlays wait until the host element is set.
|
|
18
17
|
*/
|
|
19
18
|
portalContainer?: HTMLElement | null;
|
|
20
19
|
children?: ReactNode;
|
|
@@ -23,9 +23,9 @@ export interface ThemeSwitchProps extends Omit<SwitchProps, 'value' | 'defaultVa
|
|
|
23
23
|
darkIcon?: SwitchPartProps;
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
|
-
/**
|
|
27
|
-
*
|
|
28
|
-
* The
|
|
26
|
+
/** Requests light or dark appearance; the app applies the theme.
|
|
27
|
+
* Space and clicking the icon toggle Switch. Keep its accessible name the same in both states.
|
|
28
|
+
* The ref points to Switch's input. The icon frame is a hidden label for that input.
|
|
29
29
|
*/
|
|
30
30
|
export declare function ThemeSwitch({ value: valueProp, defaultValue, onValueChange, label, iconOnly, lightIcon, darkIcon, transition, loading, className, sx, slotProps, onChange, onClick, dir, id: idProp, ...rest }: ThemeSwitchProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
31
31
|
export declare namespace ThemeSwitch {
|
|
@@ -27,7 +27,7 @@ export interface TimePickerProps extends Omit<ComponentPropsWithRef<'button'>, '
|
|
|
27
27
|
minuteStep?: TimePickerMinuteStep;
|
|
28
28
|
min?: string;
|
|
29
29
|
max?: string;
|
|
30
|
-
/** Supply a locale
|
|
30
|
+
/** Supply a locale so server and client text match. */
|
|
31
31
|
locale?: string;
|
|
32
32
|
hourCycle?: TimePickerHourCycle;
|
|
33
33
|
label?: ReactNode;
|
|
@@ -36,7 +36,7 @@ export interface TimePickerProps extends Omit<ComponentPropsWithRef<'button'>, '
|
|
|
36
36
|
placeholder?: ReactNode;
|
|
37
37
|
size?: TimePickerSize;
|
|
38
38
|
readOnly?: boolean;
|
|
39
|
-
/**
|
|
39
|
+
/** Announces required state; the hidden form field does not enforce browser validation. */
|
|
40
40
|
required?: boolean;
|
|
41
41
|
icon?: ReactNode;
|
|
42
42
|
slotProps?: TimePickerSlotProps;
|
|
@@ -11,10 +11,10 @@ export interface TimelineEvent {
|
|
|
11
11
|
at: string | number | Date;
|
|
12
12
|
/** Who acted; shown as text next to the title. */
|
|
13
13
|
actor?: string;
|
|
14
|
-
/**
|
|
14
|
+
/** Outcome text, such as "Deploy failed", to show state alongside tone. */
|
|
15
15
|
title: ReactNode;
|
|
16
16
|
meta?: ReactNode;
|
|
17
|
-
/**
|
|
17
|
+
/** Panel content. Makes the title a disclosure button; 0 counts as content, false/null/'' do not. */
|
|
18
18
|
detail?: ReactNode;
|
|
19
19
|
/** Actor portrait URL; takes precedence over `icon`. */
|
|
20
20
|
avatar?: string;
|
|
@@ -47,12 +47,12 @@ export interface TimelineProps extends Omit<ComponentPropsWithRef<'div'>, 'defau
|
|
|
47
47
|
defaultValue?: readonly string[];
|
|
48
48
|
/** Requested open ids after a disclosure interaction. */
|
|
49
49
|
onValueChange?: (ids: string[]) => void;
|
|
50
|
-
/** Formatting locale
|
|
50
|
+
/** Formatting locale. Supply one so server and client output match. */
|
|
51
51
|
locale?: Intl.LocalesArgument;
|
|
52
52
|
/** IANA zone used for day grouping and every displayed date. */
|
|
53
53
|
timeZone?: string;
|
|
54
54
|
headingLevel?: TimelineHeadingLevel;
|
|
55
|
-
/**
|
|
55
|
+
/** Height limit for the timeline's scroller. Without it, the timeline grows with the page. */
|
|
56
56
|
maxHeight?: CSSProperties['maxHeight'];
|
|
57
57
|
/** Scroll to an event newer than any shown before. Never moves focus. */
|
|
58
58
|
scrollToNew?: boolean;
|
|
@@ -10,7 +10,7 @@ export interface ToastOptions {
|
|
|
10
10
|
title?: ReactNode;
|
|
11
11
|
description?: ReactNode;
|
|
12
12
|
tone?: ToastTone;
|
|
13
|
-
/** Milliseconds before
|
|
13
|
+
/** Milliseconds before dismissal. `null` keeps the toast open; omitted uses the provider's delay. */
|
|
14
14
|
duration?: number | null;
|
|
15
15
|
action?: ToastAction;
|
|
16
16
|
/** Decorative spinner; an omitted duration persists while loading. */
|
|
@@ -18,9 +18,9 @@ export interface ToastOptions {
|
|
|
18
18
|
}
|
|
19
19
|
export interface ToastProviderProps {
|
|
20
20
|
children?: ReactNode;
|
|
21
|
-
/** Maximum toasts kept
|
|
21
|
+
/** Maximum toasts kept. Adding beyond this count removes the oldest immediately. */
|
|
22
22
|
max?: number;
|
|
23
|
-
/** Default delay
|
|
23
|
+
/** Default delay when a toast is added. Changes do not affect existing toasts. */
|
|
24
24
|
duration?: number;
|
|
25
25
|
/** Accessible label for each toast's close button. */
|
|
26
26
|
dismissLabel?: string;
|
|
@@ -38,9 +38,10 @@ export interface TreeViewProps extends Omit<ComponentPropsWithRef<'div'>, 'child
|
|
|
38
38
|
locale?: Intl.LocalesArgument;
|
|
39
39
|
slotProps?: TreeViewSlotProps;
|
|
40
40
|
}
|
|
41
|
-
/**
|
|
42
|
-
*
|
|
43
|
-
*
|
|
41
|
+
/** APG tree with one selection and roving focus.
|
|
42
|
+
* Right expands or enters; Left collapses or moves to the parent, including in RTL.
|
|
43
|
+
* Up/Down stop at the ends; Home/End jump; Enter/Space select. Typeahead resets after 500ms.
|
|
44
|
+
* Loaded children are cached per instance. Remount with a new key to replace the cache. */
|
|
44
45
|
export declare function TreeView({ nodes, value, defaultValue, onValueChange, open, defaultOpen, onOpenChange, loadChildren, onLoadError, label, messages: messageProps, empty, treeRef, locale, slotProps, ref, className, sx, onKeyDown, onClick, onBlur, 'aria-label': ariaLabel, 'aria-labelledby': labelledBy, 'aria-describedby': describedBy, ...rest }: TreeViewProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
45
46
|
export declare namespace TreeView {
|
|
46
47
|
var displayName: string;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef, type ComponentPropsWithoutRef, type JSX, type ReactNode } from 'react';
|
|
2
|
+
import { type Interpolation, type Theme } from '../../styling/css';
|
|
3
|
+
import { type SxProps } from '../../styling/sx';
|
|
4
|
+
export type TerminalTone = 'neutral' | 'muted' | 'success' | 'warning' | 'danger' | 'accent';
|
|
5
|
+
export interface TerminalLine {
|
|
6
|
+
text: string;
|
|
7
|
+
tone?: TerminalTone;
|
|
8
|
+
delayMs?: number;
|
|
9
|
+
href?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface TerminalProgress {
|
|
12
|
+
kind: 'progress';
|
|
13
|
+
label: string;
|
|
14
|
+
durationMs?: number;
|
|
15
|
+
}
|
|
16
|
+
export interface TerminalTask {
|
|
17
|
+
kind: 'task';
|
|
18
|
+
label: string;
|
|
19
|
+
durationMs?: number;
|
|
20
|
+
doneLabel?: string;
|
|
21
|
+
}
|
|
22
|
+
export type TerminalOutput = string | TerminalLine | TerminalProgress | TerminalTask;
|
|
23
|
+
export interface TerminalStep {
|
|
24
|
+
command: string;
|
|
25
|
+
output?: readonly TerminalOutput[];
|
|
26
|
+
cwd?: string;
|
|
27
|
+
pauseMs?: number;
|
|
28
|
+
}
|
|
29
|
+
export interface TypewriterTerminalLabels {
|
|
30
|
+
play: string;
|
|
31
|
+
pause: string;
|
|
32
|
+
replay: string;
|
|
33
|
+
copy: string;
|
|
34
|
+
seek: string;
|
|
35
|
+
copied: string;
|
|
36
|
+
copyError: string;
|
|
37
|
+
playing: string;
|
|
38
|
+
paused: string;
|
|
39
|
+
replayed: string;
|
|
40
|
+
step: (step: number, command: string) => string;
|
|
41
|
+
tones: Record<TerminalTone, string>;
|
|
42
|
+
completed: string;
|
|
43
|
+
}
|
|
44
|
+
type Slot<E extends keyof JSX.IntrinsicElements> = ComponentPropsWithoutRef<E> & {
|
|
45
|
+
css?: Interpolation<Theme>;
|
|
46
|
+
};
|
|
47
|
+
export interface TypewriterTerminalSlotProps {
|
|
48
|
+
header?: Slot<'header'>;
|
|
49
|
+
screen?: Slot<'div'>;
|
|
50
|
+
transcript?: Slot<'ol'>;
|
|
51
|
+
controls?: Slot<'div'>;
|
|
52
|
+
scrubber?: Slot<'input'>;
|
|
53
|
+
playButton?: Slot<'button'>;
|
|
54
|
+
replayButton?: Slot<'button'>;
|
|
55
|
+
copyButton?: Slot<'button'>;
|
|
56
|
+
caption?: Slot<'figcaption'>;
|
|
57
|
+
status?: Slot<'div'>;
|
|
58
|
+
}
|
|
59
|
+
export interface TypewriterTerminalProps extends Omit<ComponentPropsWithRef<'figure'>, 'children' | 'onChange'>, SxProps {
|
|
60
|
+
steps: readonly TerminalStep[];
|
|
61
|
+
title?: string;
|
|
62
|
+
cwd?: string;
|
|
63
|
+
symbol?: string;
|
|
64
|
+
value?: number;
|
|
65
|
+
defaultValue?: number;
|
|
66
|
+
onValueChange?: (value: number) => void;
|
|
67
|
+
paused?: boolean;
|
|
68
|
+
defaultPaused?: boolean;
|
|
69
|
+
onPausedChange?: (paused: boolean) => void;
|
|
70
|
+
speed?: number;
|
|
71
|
+
loop?: boolean;
|
|
72
|
+
rows?: number;
|
|
73
|
+
copyable?: boolean;
|
|
74
|
+
caption?: ReactNode;
|
|
75
|
+
label?: string;
|
|
76
|
+
labels?: Partial<Omit<TypewriterTerminalLabels, 'tones'>> & {
|
|
77
|
+
tones?: Partial<Record<TerminalTone, string>>;
|
|
78
|
+
};
|
|
79
|
+
locale?: Intl.LocalesArgument;
|
|
80
|
+
slotProps?: TypewriterTerminalSlotProps;
|
|
81
|
+
}
|
|
82
|
+
/** Scripted playback only. Native buttons; slider arrows/Page keys jump command boundaries. */
|
|
83
|
+
export declare function TypewriterTerminal({ ref, steps, title, cwd, symbol, value, defaultValue, onValueChange, paused, defaultPaused, onPausedChange, speed, loop, rows, copyable, caption, label, labels: labelsProp, locale, slotProps, className, sx, style, 'aria-labelledby': labelledBy, 'aria-describedby': describedBy, ...rest }: TypewriterTerminalProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
84
|
+
export declare namespace TypewriterTerminal {
|
|
85
|
+
var displayName: string;
|
|
86
|
+
}
|
|
87
|
+
export {};
|
|
@@ -41,7 +41,7 @@ export interface UsageMeterProps extends Omit<ComponentPropsWithRef<'div'>, 'chi
|
|
|
41
41
|
locale?: Intl.LocalesArgument;
|
|
42
42
|
numberFormatOptions?: Intl.NumberFormatOptions;
|
|
43
43
|
unitLabel?: ReactNode;
|
|
44
|
-
/** English
|
|
44
|
+
/** Defaults to English. Use the value-label callbacks to translate comparison text too. */
|
|
45
45
|
labels?: Partial<UsageMeterLabels>;
|
|
46
46
|
getValueLabel?: (summary: UsageMeterSummary) => string;
|
|
47
47
|
getItemLabel?: (item: UsageMeterItem, summary: UsageMeterSummary) => string;
|
|
@@ -64,9 +64,9 @@ export interface UsageMeterProps extends Omit<ComponentPropsWithRef<'div'>, 'chi
|
|
|
64
64
|
item?: UsageMeterPartProps<'button'>;
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
|
-
/**
|
|
68
|
-
* move focus
|
|
69
|
-
* allowance
|
|
67
|
+
/** Shows usage against an allowance, not task progress. The meter cannot receive focus.
|
|
68
|
+
* Legend arrows/Home/End move focus; Enter/Space toggle a pin; Escape clears it.
|
|
69
|
+
* Numeric ARIA stops at the allowance. Displayed text and aria-valuetext include overuse. */
|
|
70
70
|
export declare function UsageMeter({ ref, label, segments, limit, warnAt, size, locale, numberFormatOptions, unitLabel, labels: labelsProp, getValueLabel, getItemLabel, interactive, value, defaultValue, onValueChange, announceChanges, statusIcon, slotProps, className, sx, 'aria-labelledby': labelledBy, 'aria-describedby': describedBy, 'aria-label': ariaLabel, ...rest }: UsageMeterProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
71
71
|
export declare namespace UsageMeter {
|
|
72
72
|
var displayName: string;
|
|
@@ -25,6 +25,6 @@ interface SummarizeOptions {
|
|
|
25
25
|
/** Formats amounts instead of `formats.amount` (consumer unit formatters). */
|
|
26
26
|
formatAmount?: (amount: number) => string;
|
|
27
27
|
}
|
|
28
|
-
/**
|
|
28
|
+
/** Compares `total` with `limit`. Limits at or below 0, or nonfinite limits, are `unavailable`. */
|
|
29
29
|
export declare function summarizeUsage(total: number, limit: number, { warnAt, formats, unavailable, formatAmount }: SummarizeOptions): UsageMeterSummary;
|
|
30
30
|
export {};
|
|
@@ -13,7 +13,7 @@ export type UserMenuItemTone = MenuItemTone;
|
|
|
13
13
|
export interface UserMenuUser {
|
|
14
14
|
name: string;
|
|
15
15
|
email: string;
|
|
16
|
-
/** Plan or role
|
|
16
|
+
/** Plan or role shown next to the email. `0` renders. */
|
|
17
17
|
plan?: ReactNode;
|
|
18
18
|
avatarSrc?: string;
|
|
19
19
|
}
|
|
@@ -59,14 +59,13 @@ export type UserMenuContentProps = UserMenuContentBaseProps & ({
|
|
|
59
59
|
export interface UserMenuIdentityProps extends ComponentPropsWithRef<'div'>, SxProps {
|
|
60
60
|
}
|
|
61
61
|
export interface UserMenuItemProps extends Omit<ComponentPropsWithRef<'button'>, 'onSelect'>, SxProps {
|
|
62
|
-
/** Called once
|
|
63
|
-
* `event.preventDefault()`. */
|
|
62
|
+
/** Called once on activation. The menu closes unless a click handler called `event.preventDefault()`. */
|
|
64
63
|
onSelect?: () => void;
|
|
65
64
|
disabled?: boolean;
|
|
66
65
|
tone?: UserMenuItemTone;
|
|
67
66
|
/** Decorative icon before the label. */
|
|
68
67
|
icon?: ReactNode;
|
|
69
|
-
/**
|
|
68
|
+
/** Displays shortcut keys without registering a shortcut. */
|
|
70
69
|
keys?: readonly string[];
|
|
71
70
|
}
|
|
72
71
|
export interface UserMenuGroupSlotProps {
|
package/dist/types/index.d.ts
CHANGED
|
@@ -29,14 +29,17 @@ export * from './components/date-range-picker';
|
|
|
29
29
|
export * from './components/dialog';
|
|
30
30
|
export * from './components/divider';
|
|
31
31
|
export * from './components/drawer';
|
|
32
|
+
export * from './components/emblem';
|
|
32
33
|
export * from './components/empty-state';
|
|
33
34
|
export * from './components/expandable-card';
|
|
34
35
|
export * from './components/expanding-search';
|
|
35
36
|
export * from './components/file-dropzone';
|
|
36
37
|
export * from './components/filter-toolbar';
|
|
37
38
|
export * from './components/flex';
|
|
39
|
+
export * from './components/game-card';
|
|
38
40
|
export * from './components/hold-to-confirm';
|
|
39
41
|
export * from './components/image-compare';
|
|
42
|
+
export * from './components/in-view-title';
|
|
40
43
|
export * from './components/inline-edit';
|
|
41
44
|
export * from './components/hover-card';
|
|
42
45
|
export * from './components/json-viewer';
|
|
@@ -91,6 +94,7 @@ export * from './components/toast-stack';
|
|
|
91
94
|
export * from './components/toggle-group';
|
|
92
95
|
export * from './components/tooltip';
|
|
93
96
|
export * from './components/tree-view';
|
|
97
|
+
export * from './components/typewriter-terminal';
|
|
94
98
|
export * from './components/usage-meter';
|
|
95
99
|
export * from './components/user-menu';
|
|
96
100
|
export { styled } from './styling/styled';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
import { type Interpolation, type Theme } from './css';
|
|
3
3
|
export interface SxProps {
|
|
4
|
-
/**
|
|
4
|
+
/** Style overrides. Accepts the same values as `css` and applies after it. */
|
|
5
5
|
sx?: Interpolation<Theme>;
|
|
6
6
|
}
|
|
7
7
|
interface ClassNameProps {
|
|
@@ -37,6 +37,9 @@ export declare const theme: {
|
|
|
37
37
|
readonly signatureInkBlack: "var(--ui-color-signature-ink-black)";
|
|
38
38
|
readonly signatureInkBlue: "var(--ui-color-signature-ink-blue)";
|
|
39
39
|
readonly signatureInkViolet: "var(--ui-color-signature-ink-violet)";
|
|
40
|
+
readonly cardFace: "var(--ui-color-card-face)";
|
|
41
|
+
readonly cardInk: "var(--ui-color-card-ink)";
|
|
42
|
+
readonly cardRed: "var(--ui-color-card-red)";
|
|
40
43
|
readonly scrim: "var(--ui-color-scrim)";
|
|
41
44
|
readonly syntaxKeyword: "var(--ui-color-syntax-keyword)";
|
|
42
45
|
readonly syntaxString: "var(--ui-color-syntax-string)";
|
|
@@ -103,6 +106,13 @@ export declare const theme: {
|
|
|
103
106
|
readonly easeStandard: "var(--ui-motion-ease-standard)";
|
|
104
107
|
};
|
|
105
108
|
readonly size: {
|
|
109
|
+
readonly emblemSm: "var(--ui-size-emblem-sm)";
|
|
110
|
+
readonly emblemMd: "var(--ui-size-emblem-md)";
|
|
111
|
+
readonly emblemLg: "var(--ui-size-emblem-lg)";
|
|
112
|
+
readonly emblemXl: "var(--ui-size-emblem-xl)";
|
|
113
|
+
readonly gameCardSm: "var(--ui-size-game-card-sm)";
|
|
114
|
+
readonly gameCardMd: "var(--ui-size-game-card-md)";
|
|
115
|
+
readonly gameCardLg: "var(--ui-size-game-card-lg)";
|
|
106
116
|
readonly sheetStackBreakpoint: "var(--ui-size-sheet-stack-breakpoint)";
|
|
107
117
|
readonly sheetStackSheetPeek: "var(--ui-size-sheet-stack-sheet-peek)";
|
|
108
118
|
readonly sheetStackDialogPeek: "var(--ui-size-sheet-stack-dialog-peek)";
|