@jfrader/ui 0.7.1 → 0.7.3

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 (30) hide show
  1. package/README.md +13 -28
  2. package/dist/editable-details-BndqEnYF.js +365 -0
  3. package/dist/editable-details.js +2 -0
  4. package/dist/{flip-game-card-xmcR_QSq.js → flip-game-card-BOJIhBrh.js} +8 -4
  5. package/dist/flip-game-card.js +1 -1
  6. package/dist/index.js +92 -93
  7. package/dist/{locale-switcher-DTkySKsM.js → locale-switcher-Ce_tN4Gb.js} +2 -2
  8. package/dist/locale-switcher.js +1 -1
  9. package/dist/{billing-toggle-CgC7yxxo.js → toggle-subscription-Ytz7ew1q.js} +19 -19
  10. package/dist/toggle-subscription.js +2 -0
  11. package/dist/types/components/editable-details/editable-details.d.ts +58 -0
  12. package/dist/types/components/editable-details/index.d.ts +2 -0
  13. package/dist/types/components/locale-switcher/locale-switcher.d.ts +2 -2
  14. package/dist/types/components/toggle-subscription/index.d.ts +2 -0
  15. package/dist/types/components/toggle-subscription/toggle-subscription.d.ts +57 -0
  16. package/dist/types/index.d.ts +2 -3
  17. package/dist/types/styling/motion-timings.d.ts +8 -0
  18. package/dist/types/styling/theme.d.ts +2 -0
  19. package/package.json +10 -14
  20. package/dist/billing-toggle.js +0 -2
  21. package/dist/in-view-title-BUZCMqge.js +0 -225
  22. package/dist/in-view-title.js +0 -2
  23. package/dist/shortcut-recorder-VgTQdjjn.js +0 -688
  24. package/dist/shortcut-recorder.js +0 -2
  25. package/dist/types/components/billing-toggle/billing-toggle.d.ts +0 -57
  26. package/dist/types/components/billing-toggle/index.d.ts +0 -2
  27. package/dist/types/components/in-view-title/in-view-title.d.ts +0 -23
  28. package/dist/types/components/in-view-title/index.d.ts +0 -1
  29. package/dist/types/components/shortcut-recorder/index.d.ts +0 -2
  30. package/dist/types/components/shortcut-recorder/shortcut-recorder.d.ts +0 -117
@@ -1,57 +0,0 @@
1
- import { type ComponentPropsWithRef, type ComponentPropsWithoutRef, type ReactNode } from 'react';
2
- import { type Interpolation, type Theme } from '../../styling/css';
3
- import { type SxProps } from '../../styling/sx';
4
- import { type SegmentedControlItemProps } from '../segmented-control';
5
- export type BillingToggleSize = 'md' | 'lg';
6
- export type BillingToggleTone = 'neutral' | 'accent' | 'success';
7
- type SlotProps<Element extends 'span' | 'del'> = ComponentPropsWithoutRef<Element> & {
8
- css?: Interpolation<Theme>;
9
- };
10
- export interface BillingToggleProps extends Omit<ComponentPropsWithRef<'div'>, 'defaultValue' | 'onChange'>, SxProps {
11
- value?: string;
12
- defaultValue?: string;
13
- onValueChange?: (value: string) => void;
14
- disabled?: boolean;
15
- size?: BillingToggleSize;
16
- tone?: BillingToggleTone;
17
- locale?: Intl.LocalesArgument;
18
- }
19
- export interface BillingToggleListProps extends Omit<ComponentPropsWithRef<'div'>, 'defaultValue' | 'onChange'>, SxProps {
20
- }
21
- export interface BillingToggleLabelProps extends ComponentPropsWithRef<'span'>, SxProps {
22
- }
23
- export interface BillingToggleItemProps extends Omit<SegmentedControlItemProps, 'accessory'> {
24
- badge?: ReactNode;
25
- activeBadge?: ReactNode;
26
- slotProps?: {
27
- label?: SlotProps<'span'>;
28
- badge?: SlotProps<'span'>;
29
- selection?: SlotProps<'span'>;
30
- };
31
- }
32
- export interface BillingTogglePriceProps extends Omit<ComponentPropsWithRef<'span'>, 'children'>, SxProps {
33
- amount: number;
34
- currency: string;
35
- locale?: Intl.LocalesArgument;
36
- formatOptions?: Omit<Intl.NumberFormatOptions, 'style' | 'currency'>;
37
- was?: number;
38
- period?: ReactNode;
39
- previousLabel?: string;
40
- slotProps?: {
41
- amount?: SlotProps<'span'>;
42
- previous?: SlotProps<'del'>;
43
- period?: SlotProps<'span'>;
44
- };
45
- }
46
- declare function BillingToggleRoot({ ref, value: valueProp, defaultValue, onValueChange, disabled, size, tone, locale, className, sx, children, ...rest }: BillingToggleProps): import("@emotion/react/jsx-runtime").JSX.Element;
47
- declare function BillingToggleLabel({ ref, id: idProp, className, sx, children, ...rest }: BillingToggleLabelProps): import("@emotion/react/jsx-runtime").JSX.Element | null;
48
- declare function BillingToggleList({ ref, className, sx, children, ...rest }: BillingToggleListProps): import("@emotion/react/jsx-runtime").JSX.Element;
49
- declare function BillingToggleItem({ badge, activeBadge, slotProps, children, className, sx, ...rest }: BillingToggleItemProps): import("@emotion/react/jsx-runtime").JSX.Element;
50
- declare function BillingTogglePrice({ ref, amount, currency, locale: localeProp, formatOptions, was, period, previousLabel, slotProps, className, sx, ...rest }: BillingTogglePriceProps): import("@emotion/react/jsx-runtime").JSX.Element;
51
- export declare const BillingToggle: typeof BillingToggleRoot & {
52
- List: typeof BillingToggleList;
53
- Item: typeof BillingToggleItem;
54
- Label: typeof BillingToggleLabel;
55
- Price: typeof BillingTogglePrice;
56
- };
57
- export {};
@@ -1,2 +0,0 @@
1
- export { BillingToggle } from './billing-toggle';
2
- export type { BillingToggleProps, BillingToggleListProps, BillingToggleItemProps, BillingToggleLabelProps, BillingTogglePriceProps, BillingToggleSize, BillingToggleTone, } from './billing-toggle';
@@ -1,23 +0,0 @@
1
- import { type ComponentPropsWithRef } from 'react';
2
- import { type Interpolation, type Theme } from '../../styling/css';
3
- import { type SxProps } from '../../styling/sx';
4
- export type InViewTitleVariant = 'word' | 'line' | 'blur' | 'tracking' | 'wipe';
5
- export interface InViewTitlePartProps {
6
- className?: string;
7
- css?: Interpolation<Theme>;
8
- }
9
- export interface InViewTitleProps extends Omit<ComponentPropsWithRef<'h2'>, 'children'>, SxProps {
10
- text: string;
11
- level?: 1 | 2 | 3 | 4 | 5 | 6;
12
- variant?: InViewTitleVariant;
13
- once?: boolean;
14
- locale?: Intl.LocalesArgument;
15
- slotProps?: {
16
- visual?: InViewTitlePartProps;
17
- segment?: InViewTitlePartProps;
18
- };
19
- }
20
- export declare function InViewTitle({ text, level, variant, once, locale, slotProps, ref, className, sx, ...rest }: InViewTitleProps): import("@emotion/react/jsx-runtime").JSX.Element;
21
- export declare namespace InViewTitle {
22
- var displayName: string;
23
- }
@@ -1 +0,0 @@
1
- export { InViewTitle, type InViewTitleProps, type InViewTitleVariant, type InViewTitlePartProps } from './in-view-title';
@@ -1,2 +0,0 @@
1
- export { ShortcutRecorder, normalizeShortcut, matchesShortcut, formatShortcut, useShortcutPlatform, usePressedShortcutKeys, defaultShortcutMessages, } from './shortcut-recorder';
2
- export type { ShortcutRecorderProps, ShortcutKeysProps, ShortcutListProps, ShortcutPlatform, ShortcutBinding, ShortcutListGroup, ShortcutMessages, KeyboardEventLike, } from './shortcut-recorder';
@@ -1,117 +0,0 @@
1
- import { type ComponentPropsWithRef, type ReactNode } from 'react';
2
- import { type SxProps } from '../../styling/sx';
3
- import { type FieldPartProps } from '../field/field-anatomy';
4
- export type ShortcutPlatform = 'mac' | 'other';
5
- export interface ShortcutBinding {
6
- shortcut: string;
7
- label: string;
8
- }
9
- export interface ShortcutListGroup {
10
- label: string;
11
- items: readonly {
12
- label: string;
13
- shortcut: string;
14
- keywords?: string;
15
- }[];
16
- }
17
- export interface ShortcutMessages {
18
- placeholder: string;
19
- recording: string;
20
- canceled: string;
21
- cleared: string;
22
- noShortcut: string;
23
- clearLabel: string;
24
- cancelLabel: string;
25
- confirmLabel: string;
26
- reset: (spoken: string) => string;
27
- set: (spoken: string) => string;
28
- requireModifier: (platform: ShortcutPlatform) => string;
29
- conflict: (spoken: string, binding: ShortcutBinding, reserved: boolean) => string;
30
- listLabel: string;
31
- searchLabel: string;
32
- searchPlaceholder: string;
33
- empty: string;
34
- results: (count: number) => string;
35
- keyName: (id: string, platform: ShortcutPlatform) => {
36
- label: string;
37
- spoken: string;
38
- };
39
- }
40
- export interface KeyboardEventLike {
41
- code: string;
42
- key: string;
43
- ctrlKey: boolean;
44
- altKey: boolean;
45
- shiftKey: boolean;
46
- metaKey: boolean;
47
- repeat?: boolean;
48
- isComposing?: boolean;
49
- getModifierState?: (key: string) => boolean;
50
- }
51
- export declare function normalizeShortcut(shortcut: string, platform: ShortcutPlatform): string | null;
52
- export declare function matchesShortcut(event: KeyboardEventLike, shortcut: string, platform: ShortcutPlatform): boolean;
53
- export declare const defaultShortcutMessages: ShortcutMessages;
54
- export declare function formatShortcut(shortcut: string, platform: ShortcutPlatform, messages?: ShortcutMessages): {
55
- text: string;
56
- spoken: string;
57
- };
58
- export declare function useShortcutPlatform(override?: ShortcutPlatform): ShortcutPlatform;
59
- export declare function usePressedShortcutKeys(enabled?: boolean): ReadonlySet<string>;
60
- export interface ShortcutKeysProps extends ComponentPropsWithRef<'span'>, SxProps {
61
- shortcut: string;
62
- platform?: ShortcutPlatform;
63
- pressed?: ReadonlySet<string>;
64
- size?: 'sm' | 'md';
65
- messages?: ShortcutMessages;
66
- locale?: Intl.LocalesArgument;
67
- slotProps?: {
68
- key?: FieldPartProps;
69
- };
70
- }
71
- declare function ShortcutKeys({ shortcut, platform: platformProp, pressed, size, messages, locale: _locale, slotProps, className, sx, ...rest }: ShortcutKeysProps): import("@emotion/react/jsx-runtime").JSX.Element;
72
- type RecorderSlot = 'root' | 'label' | 'control' | 'recorder' | 'actions' | 'reset' | 'clear' | 'message' | 'confirm' | 'cancel' | 'description' | 'error' | 'status' | 'key';
73
- export interface ShortcutRecorderProps extends Omit<ComponentPropsWithRef<'button'>, 'value' | 'defaultValue'>, SxProps {
74
- value?: string | null;
75
- defaultValue?: string | null;
76
- onValueChange?: (value: string | null, details: {
77
- replaced?: ShortcutBinding;
78
- }) => void;
79
- recording?: boolean;
80
- defaultRecording?: boolean;
81
- onRecordingChange?: (recording: boolean) => void;
82
- resetValue?: string | null;
83
- bindings?: readonly ShortcutBinding[];
84
- reservedBindings?: readonly ShortcutBinding[];
85
- warnReserved?: boolean;
86
- requireModifier?: boolean;
87
- platform?: ShortcutPlatform;
88
- label?: ReactNode;
89
- description?: ReactNode;
90
- error?: ReactNode;
91
- hideLabel?: boolean;
92
- size?: 'sm' | 'md' | 'lg';
93
- locale?: Intl.LocalesArgument;
94
- messages?: ShortcutMessages;
95
- readOnly?: boolean;
96
- slotProps?: Partial<Record<RecorderSlot, FieldPartProps>>;
97
- }
98
- declare function ShortcutRecorderRoot({ ref, value, defaultValue, onValueChange, recording, defaultRecording, onRecordingChange, resetValue, bindings, reservedBindings, warnReserved, requireModifier, platform: platformProp, label, description, error, hideLabel, size, locale, messages, readOnly, disabled, name, dir, slotProps, className, sx, onClick, onKeyDown, onKeyUp, onBlur, onFocus, 'aria-labelledby': labelledBy, 'aria-describedby': describedBy, 'aria-invalid': invalid, id, children: _children, ...rest }: ShortcutRecorderProps): import("@emotion/react/jsx-runtime").JSX.Element;
99
- type ListSlot = 'root' | 'search' | 'groups' | 'group' | 'heading' | 'item' | 'keys' | 'empty' | 'status';
100
- export interface ShortcutListProps extends ComponentPropsWithRef<'section'>, SxProps {
101
- groups: readonly ShortcutListGroup[];
102
- searchable?: boolean;
103
- highlightPressed?: boolean;
104
- platform?: ShortcutPlatform;
105
- locale?: Intl.LocalesArgument;
106
- messages?: ShortcutMessages;
107
- inputValue?: string;
108
- defaultInputValue?: string;
109
- onInputChange?: (value: string) => void;
110
- slotProps?: Partial<Record<ListSlot, FieldPartProps>>;
111
- }
112
- declare function ShortcutList({ groups, searchable, highlightPressed, platform, locale, messages, inputValue, defaultInputValue, onInputChange, slotProps, className, sx, ref, ...rest }: ShortcutListProps): import("@emotion/react/jsx-runtime").JSX.Element;
113
- export declare const ShortcutRecorder: typeof ShortcutRecorderRoot & {
114
- Keys: typeof ShortcutKeys;
115
- List: typeof ShortcutList;
116
- };
117
- export {};