@jfrader/ui 0.4.0 → 0.5.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 +2 -0
- package/dist/{accordion-Bd-j04hW.js → accordion-xCI_u0BV.js} +2 -2
- package/dist/accordion.js +1 -1
- package/dist/{alert-BBqaKI4k.js → alert-DS_einpy.js} +1 -1
- package/dist/alert.js +1 -1
- package/dist/announcement-bar-B58xempt.js +382 -0
- package/dist/announcement-bar.js +2 -0
- package/dist/avatar-group-DOQQuV51.js +138 -0
- package/dist/avatar-group.js +2 -0
- package/dist/bottom-sheet-DPJBFkie.js +673 -0
- package/dist/bottom-sheet.js +2 -0
- package/dist/{breadcrumbs-DVAOxfvL.js → breadcrumbs-Cfw_hgt2.js} +1 -1
- package/dist/breadcrumbs.js +1 -1
- package/dist/{button-P2e7_44z.js → button-C92uYFJW.js} +1 -1
- package/dist/button.js +1 -1
- package/dist/calendar-B3Svu0X2.js +447 -0
- package/dist/calendar.js +1 -1
- package/dist/carousel-IvPqN-oM.js +472 -0
- package/dist/carousel.js +2 -0
- package/dist/{checkbox-COYG6L7d.js → checkbox-cFquiSdy.js} +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/chip-group-DTQd_M-G.js +289 -0
- package/dist/chip-group.js +2 -0
- package/dist/code-block/shiki.js +147 -0
- package/dist/code-block-ahnRi-g8.js +292 -0
- package/dist/code-block.js +2 -0
- package/dist/collection-registry-k6JcD3Jr.js +44 -0
- package/dist/combobox-Bhzvu9ma.js +334 -0
- package/dist/combobox.js +1 -1
- package/dist/command-palette-BQ5LleGb.js +384 -0
- package/dist/command-palette.js +1 -1
- package/dist/copy-button-ByiA6D3R.js +252 -0
- package/dist/copy-button.js +2 -0
- package/dist/countdown-Dp_TD1VP.js +293 -0
- package/dist/countdown.js +2 -0
- package/dist/date-picker-5zKSSuFF.js +255 -0
- package/dist/date-picker.js +1 -1
- package/dist/date-range-picker-B5uFWsm-.js +562 -0
- package/dist/date-range-picker.js +2 -0
- package/dist/{dialog-xaydbXl2.js → dialog-ciiv9H2b.js} +19 -19
- package/dist/dialog.js +1 -1
- package/dist/drawer-DsASTiP-.js +553 -0
- package/dist/drawer.js +2 -0
- package/dist/empty-state-CDgrjPPf.js +142 -0
- package/dist/empty-state.js +2 -0
- package/dist/expandable-card-C-qJcZ14.js +340 -0
- package/dist/expandable-card.js +2 -0
- package/dist/field-anatomy-COVdNpf5.js +84 -0
- package/dist/file-dropzone-pR4v7owg.js +457 -0
- package/dist/file-dropzone.js +2 -0
- package/dist/filter-toolbar-D5KEKTSe.js +312 -0
- package/dist/filter-toolbar.js +2 -0
- package/dist/hold-to-confirm-DjB2EVjM.js +294 -0
- package/dist/hold-to-confirm.js +2 -0
- package/dist/hover-card-B-nrCIy2.js +347 -0
- package/dist/hover-card.js +2 -0
- package/dist/image-compare-ciuhPtQZ.js +415 -0
- package/dist/image-compare.js +2 -0
- package/dist/index.js +79 -38
- package/dist/inline-edit-C0eeml65.js +535 -0
- package/dist/inline-edit.js +2 -0
- package/dist/input-control-DmMuAuPS.js +34 -0
- package/dist/json-viewer-BcySQfjZ.js +798 -0
- package/dist/json-viewer.js +2 -0
- package/dist/listbox-style-WX-RASp1.js +59 -0
- package/dist/{media-D_eA_I-e.js → media-8yrN85VT.js} +2 -2
- package/dist/mention-input-BcQKX2EJ.js +599 -0
- package/dist/mention-input.js +2 -0
- package/dist/menu-xwOOUtWP.js +275 -0
- package/dist/menu.js +1 -1
- package/dist/metric-card-Bh9K4fZs.js +118 -0
- package/dist/metric-card.js +2 -0
- package/dist/multi-select-Pce_IYnz.js +590 -0
- package/dist/multi-select.js +2 -0
- package/dist/{navigation-DhnKriOp.js → navigation-sP5fiuQS.js} +4 -4
- package/dist/navigation.js +1 -1
- package/dist/overlay-layer-SeUyyEPD.js +64 -0
- package/dist/overlay-portal-C4JZFq2M.js +15 -0
- package/dist/{pagination-DYdwsxwe.js → pagination-DmXZ8E85.js} +1 -1
- package/dist/pagination.js +1 -1
- package/dist/password-field-03pWRkuY.js +250 -0
- package/dist/password-field.js +2 -0
- package/dist/popover-QHcEvf9c.js +119 -0
- package/dist/popover.js +1 -1
- package/dist/{progress-BpJswTG4.js → progress-CbOWBUdA.js} +4 -4
- package/dist/progress.js +1 -1
- package/dist/radio-cards-D2QZENI_.js +455 -0
- package/dist/radio-cards.js +2 -0
- package/dist/{radio-group-Ce0_IWQr.js → radio-group-E6mMRgo7.js} +4 -4
- package/dist/radio-group.js +1 -1
- package/dist/resizable-panels-BhjUVXZZ.js +519 -0
- package/dist/resizable-panels.js +2 -0
- package/dist/scroll-area-CcZyiSOQ.js +371 -0
- package/dist/scroll-area.js +2 -0
- package/dist/search-field-IxF0IJXm.js +274 -0
- package/dist/search-field.js +2 -0
- package/dist/segmented-control-yO1K1nbi.js +326 -0
- package/dist/segmented-control.js +2 -0
- package/dist/select-n_H52W1Z.js +292 -0
- package/dist/select.js +1 -1
- package/dist/signature-pad-q2SAsrdD.js +640 -0
- package/dist/signature-pad.js +2 -0
- package/dist/{skeleton-OoFlOEXO.js → skeleton-XQQDkCHd.js} +1 -1
- package/dist/skeleton.js +1 -1
- package/dist/slider-t0B5cecO.js +477 -0
- package/dist/slider.js +2 -0
- package/dist/sortable-data-table-tirqlLY2.js +365 -0
- package/dist/sortable-data-table.js +2 -0
- package/dist/{spinner-C2YDoiMn.js → spinner-DtxvDPdM.js} +1 -1
- package/dist/spinner.js +1 -1
- package/dist/split-button-Cb3EHs64.js +268 -0
- package/dist/split-button.js +2 -0
- package/dist/stepper-CruHbXxX.js +480 -0
- package/dist/stepper.js +2 -0
- package/dist/swipe-actions-DiZC57-3.js +418 -0
- package/dist/swipe-actions.js +2 -0
- package/dist/{switch-Dr-qjmT4.js → switch-qwv8jQnR.js} +1 -1
- package/dist/switch.js +1 -1
- package/dist/{tabs-CK_g1RKa.js → tabs-CAVJndX1.js} +2 -2
- package/dist/tabs.js +1 -1
- package/dist/tag-input-DSRCyrX2.js +418 -0
- package/dist/tag-input.js +2 -0
- package/dist/{text-field-D60ok14S.js → text-field-C8TWG-tY.js} +6 -5
- package/dist/text-field.js +1 -1
- package/dist/{textarea-DyfjtP0A.js → textarea-BrW0XcG_.js} +6 -5
- package/dist/textarea.js +1 -1
- package/dist/time-picker-Db8D49cP.js +305 -0
- package/dist/time-picker.js +2 -0
- package/dist/timeline-k3nURuCP.js +618 -0
- package/dist/timeline.js +2 -0
- package/dist/toast-BHxI32ZA.js +352 -0
- package/dist/toast-stack-DqrAzdg5.js +183 -0
- package/dist/toast-stack.js +2 -0
- package/dist/toast.js +1 -1
- package/dist/{toggle-group-CI0e7hFm.js → toggle-group-fcjzpifI.js} +4 -4
- package/dist/toggle-group.js +1 -1
- package/dist/tooltip-CkeiW9C1.js +113 -0
- package/dist/tooltip.js +1 -1
- package/dist/tree-view-C2liIxqy.js +360 -0
- package/dist/tree-view.js +2 -0
- package/dist/types/components/announcement-bar/announcement-bar.d.ts +75 -0
- package/dist/types/components/announcement-bar/index.d.ts +2 -0
- package/dist/types/components/avatar-group/avatar-group.d.ts +43 -0
- package/dist/types/components/avatar-group/index.d.ts +2 -0
- package/dist/types/components/bottom-sheet/bottom-sheet.d.ts +60 -0
- package/dist/types/components/bottom-sheet/index.d.ts +2 -0
- package/dist/types/components/calendar/calendar.d.ts +25 -1
- package/dist/types/components/calendar/index.d.ts +1 -1
- package/dist/types/components/carousel/carousel.d.ts +73 -0
- package/dist/types/components/carousel/index.d.ts +2 -0
- package/dist/types/components/chip-group/chip-group.d.ts +54 -0
- package/dist/types/components/chip-group/index.d.ts +1 -0
- package/dist/types/components/code-block/code-block.d.ts +58 -0
- package/dist/types/components/code-block/index.d.ts +1 -0
- package/dist/types/components/code-block/shiki.d.ts +3 -0
- package/dist/types/components/combobox/combobox.d.ts +1 -1
- package/dist/types/components/command-palette/command-palette.d.ts +1 -1
- package/dist/types/components/copy-button/copy-button.d.ts +49 -0
- package/dist/types/components/copy-button/index.d.ts +2 -0
- package/dist/types/components/countdown/countdown.d.ts +37 -0
- package/dist/types/components/countdown/index.d.ts +1 -0
- package/dist/types/components/date-picker/date-picker.d.ts +1 -1
- package/dist/types/components/date-range-picker/date-range-picker.d.ts +103 -0
- package/dist/types/components/date-range-picker/index.d.ts +2 -0
- package/dist/types/components/drawer/drawer.d.ts +59 -0
- package/dist/types/components/drawer/index.d.ts +2 -0
- package/dist/types/components/empty-state/empty-state.d.ts +36 -0
- package/dist/types/components/empty-state/index.d.ts +2 -0
- package/dist/types/components/expandable-card/expandable-card.d.ts +28 -0
- package/dist/types/components/expandable-card/index.d.ts +2 -0
- package/dist/types/components/field/field-anatomy.d.ts +4 -2
- package/dist/types/components/file-dropzone/file-dropzone.d.ts +93 -0
- package/dist/types/components/file-dropzone/index.d.ts +2 -0
- package/dist/types/components/filter-toolbar/filter-toolbar.d.ts +70 -0
- package/dist/types/components/filter-toolbar/index.d.ts +1 -0
- package/dist/types/components/hold-to-confirm/hold-to-confirm.d.ts +32 -0
- package/dist/types/components/hold-to-confirm/index.d.ts +2 -0
- package/dist/types/components/hover-card/hover-card.d.ts +97 -0
- package/dist/types/components/hover-card/index.d.ts +2 -0
- package/dist/types/components/image-compare/image-compare.d.ts +54 -0
- package/dist/types/components/image-compare/index.d.ts +1 -0
- package/dist/types/components/inline-edit/index.d.ts +2 -0
- package/dist/types/components/inline-edit/inline-edit.d.ts +93 -0
- package/dist/types/components/json-viewer/index.d.ts +2 -0
- package/dist/types/components/json-viewer/json-viewer.d.ts +82 -0
- package/dist/types/components/mention-input/index.d.ts +2 -0
- package/dist/types/components/mention-input/mention-input.d.ts +87 -0
- package/dist/types/components/menu/menu.d.ts +23 -5
- package/dist/types/components/metric-card/index.d.ts +1 -0
- package/dist/types/components/metric-card/metric-card.d.ts +37 -0
- package/dist/types/components/multi-select/index.d.ts +2 -0
- package/dist/types/components/multi-select/multi-select.d.ts +73 -0
- package/dist/types/components/password-field/index.d.ts +2 -0
- package/dist/types/components/password-field/password-field.d.ts +34 -0
- package/dist/types/components/popover/popover.d.ts +1 -1
- package/dist/types/components/radio-cards/index.d.ts +1 -0
- package/dist/types/components/radio-cards/radio-cards.d.ts +42 -0
- package/dist/types/components/resizable-panels/index.d.ts +2 -0
- package/dist/types/components/resizable-panels/resizable-panels.d.ts +42 -0
- package/dist/types/components/scroll-area/index.d.ts +2 -0
- package/dist/types/components/scroll-area/scroll-area.d.ts +34 -0
- package/dist/types/components/search-field/index.d.ts +1 -0
- package/dist/types/components/search-field/search-field.d.ts +31 -0
- package/dist/types/components/segmented-control/index.d.ts +2 -0
- package/dist/types/components/segmented-control/segmented-control.d.ts +32 -0
- package/dist/types/components/select/select.d.ts +1 -1
- package/dist/types/components/signature-pad/index.d.ts +2 -0
- package/dist/types/components/signature-pad/signature-pad.d.ts +104 -0
- package/dist/types/components/slider/index.d.ts +1 -0
- package/dist/types/components/slider/slider.d.ts +70 -0
- package/dist/types/components/sortable-data-table/index.d.ts +1 -0
- package/dist/types/components/sortable-data-table/sortable-data-table.d.ts +76 -0
- package/dist/types/components/split-button/index.d.ts +2 -0
- package/dist/types/components/split-button/split-button.d.ts +55 -0
- package/dist/types/components/stepper/index.d.ts +2 -0
- package/dist/types/components/stepper/stepper.d.ts +85 -0
- package/dist/types/components/swipe-actions/index.d.ts +2 -0
- package/dist/types/components/swipe-actions/swipe-actions.d.ts +44 -0
- package/dist/types/components/tag-input/index.d.ts +2 -0
- package/dist/types/components/tag-input/tag-input.d.ts +66 -0
- package/dist/types/components/time-picker/index.d.ts +2 -0
- package/dist/types/components/time-picker/time-picker.d.ts +48 -0
- package/dist/types/components/timeline/index.d.ts +2 -0
- package/dist/types/components/timeline/timeline.d.ts +66 -0
- package/dist/types/components/toast/toast.d.ts +37 -2
- package/dist/types/components/toast-stack/index.d.ts +2 -0
- package/dist/types/components/toast-stack/toast-stack.d.ts +28 -0
- package/dist/types/components/tooltip/tooltip.d.ts +1 -1
- package/dist/types/components/tree-view/index.d.ts +1 -0
- package/dist/types/components/tree-view/tree-view.d.ts +47 -0
- package/dist/types/components/usage-meter/index.d.ts +2 -0
- package/dist/types/components/usage-meter/usage-meter.d.ts +83 -0
- package/dist/types/index.d.ts +40 -0
- package/dist/types/overlay/overlay-layer.d.ts +33 -0
- package/dist/types/overlay/use-overlay-floating.d.ts +11 -1
- package/dist/types/styling/media.d.ts +1 -0
- package/dist/types/styling/theme.d.ts +12 -0
- package/dist/types/utils/use-controlled-state.d.ts +2 -1
- package/dist/usage-meter-qyQ3rYVv.js +463 -0
- package/dist/usage-meter.js +2 -0
- package/dist/use-controlled-state-DpeVQZNR.js +20 -0
- package/dist/use-latest-callback-cj1OOQL6.js +11 -0
- package/dist/use-overlay-floating-DvJifLpF.js +31 -0
- package/package.json +175 -3
- package/dist/calendar-C9Yad_-w.js +0 -394
- package/dist/collection-registry-BTYi6zGh.js +0 -98
- package/dist/combobox-DiMC2g_u.js +0 -327
- package/dist/command-palette-V_2pEay7.js +0 -379
- package/dist/date-picker-C29Uo4Tx.js +0 -250
- package/dist/field-anatomy-D2ToMeRa.js +0 -109
- package/dist/menu-CGPTNRnF.js +0 -216
- package/dist/popover-CdRXjQqI.js +0 -113
- package/dist/select-BgG7WgSh.js +0 -286
- package/dist/toast-CjmELMZZ.js +0 -283
- package/dist/tooltip-CaL3rKbV.js +0 -108
- package/dist/use-controlled-state-CVXDa-qM.js +0 -21
- package/dist/use-overlay-floating-Bit-f0FU.js +0 -31
|
@@ -0,0 +1,83 @@
|
|
|
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
|
+
export type UsageMeterState = 'normal' | 'near-limit' | 'over-limit' | 'unavailable';
|
|
5
|
+
export type UsageMeterSize = 'sm' | 'md' | 'lg';
|
|
6
|
+
export type UsageMeterSelection = {
|
|
7
|
+
kind: 'segment';
|
|
8
|
+
id: string;
|
|
9
|
+
} | {
|
|
10
|
+
kind: 'remainder';
|
|
11
|
+
};
|
|
12
|
+
export interface UsageMeterSegment {
|
|
13
|
+
/** Stable, nonempty, unique identity. */
|
|
14
|
+
id: string;
|
|
15
|
+
label: string;
|
|
16
|
+
value: number;
|
|
17
|
+
tone?: 'accent' | 'info' | 'success' | 'warning';
|
|
18
|
+
}
|
|
19
|
+
export type UsageMeterItem = UsageMeterSelection & {
|
|
20
|
+
label: string;
|
|
21
|
+
value: number;
|
|
22
|
+
};
|
|
23
|
+
export interface UsageMeterSummary {
|
|
24
|
+
total: number;
|
|
25
|
+
limit: number;
|
|
26
|
+
free: number;
|
|
27
|
+
over: number;
|
|
28
|
+
ratio: number;
|
|
29
|
+
state: UsageMeterState;
|
|
30
|
+
formattedTotal: string;
|
|
31
|
+
formattedLimit: string;
|
|
32
|
+
formattedPercent: string;
|
|
33
|
+
}
|
|
34
|
+
export interface UsageMeterLabels {
|
|
35
|
+
free: string;
|
|
36
|
+
near: string;
|
|
37
|
+
over: string;
|
|
38
|
+
normal: string;
|
|
39
|
+
unavailable: string;
|
|
40
|
+
legend: string;
|
|
41
|
+
}
|
|
42
|
+
export type UsageMeterPartProps<T extends 'div' | 'span' | 'p' | 'ul' | 'button' = 'span'> = Omit<ComponentPropsWithoutRef<T>, 'children'> & {
|
|
43
|
+
css?: Interpolation<Theme>;
|
|
44
|
+
};
|
|
45
|
+
export interface UsageMeterProps extends Omit<ComponentPropsWithRef<'div'>, 'children' | 'defaultValue'>, SxProps {
|
|
46
|
+
label: ReactNode;
|
|
47
|
+
segments: readonly UsageMeterSegment[];
|
|
48
|
+
limit: number;
|
|
49
|
+
warnAt?: number;
|
|
50
|
+
size?: UsageMeterSize;
|
|
51
|
+
locale?: Intl.LocalesArgument;
|
|
52
|
+
numberFormatOptions?: Intl.NumberFormatOptions;
|
|
53
|
+
unitLabel?: ReactNode;
|
|
54
|
+
/** English defaults; translation callbacks also localize relational value copy. */
|
|
55
|
+
labels?: Partial<UsageMeterLabels>;
|
|
56
|
+
getValueLabel?: (summary: UsageMeterSummary) => string;
|
|
57
|
+
getItemLabel?: (item: UsageMeterItem, summary: UsageMeterSummary) => string;
|
|
58
|
+
interactive?: boolean;
|
|
59
|
+
value?: UsageMeterSelection | null;
|
|
60
|
+
defaultValue?: UsageMeterSelection | null;
|
|
61
|
+
onValueChange?: (selection: UsageMeterSelection | null) => void;
|
|
62
|
+
announceChanges?: boolean;
|
|
63
|
+
statusIcon?: (state: UsageMeterState) => ReactNode;
|
|
64
|
+
slotProps?: {
|
|
65
|
+
root?: UsageMeterPartProps<'div'>;
|
|
66
|
+
title?: UsageMeterPartProps;
|
|
67
|
+
status?: UsageMeterPartProps;
|
|
68
|
+
total?: UsageMeterPartProps<'p'>;
|
|
69
|
+
track?: UsageMeterPartProps<'div'>;
|
|
70
|
+
segment?: UsageMeterPartProps;
|
|
71
|
+
overage?: UsageMeterPartProps;
|
|
72
|
+
limit?: UsageMeterPartProps;
|
|
73
|
+
legend?: UsageMeterPartProps<'ul'>;
|
|
74
|
+
item?: UsageMeterPartProps<'button'>;
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
/** Finite allowance, not task progress. The meter is not focusable; legend arrows/Home/End
|
|
78
|
+
* move focus, Enter/Space toggle a pin, and Escape clears it. Numeric ARIA saturates at the
|
|
79
|
+
* allowance while visible text and aria-valuetext retain actual overuse. */
|
|
80
|
+
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;
|
|
81
|
+
export declare namespace UsageMeter {
|
|
82
|
+
var displayName: string;
|
|
83
|
+
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,40 +1,80 @@
|
|
|
1
1
|
export * from './components/accordion';
|
|
2
2
|
export * from './components/alert';
|
|
3
|
+
export * from './components/announcement-bar';
|
|
3
4
|
export * from './components/avatar';
|
|
5
|
+
export * from './components/avatar-group';
|
|
4
6
|
export * from './components/badge';
|
|
7
|
+
export * from './components/bottom-sheet';
|
|
5
8
|
export * from './components/breadcrumbs';
|
|
6
9
|
export * from './components/button';
|
|
7
10
|
export * from './components/calendar';
|
|
8
11
|
export * from './components/card';
|
|
12
|
+
export * from './components/carousel';
|
|
9
13
|
export * from './components/checkbox';
|
|
14
|
+
export * from './components/chip-group';
|
|
15
|
+
export * from './components/code-block';
|
|
10
16
|
export * from './components/command-palette';
|
|
11
17
|
export * from './components/combobox';
|
|
12
18
|
export * from './components/container';
|
|
19
|
+
export * from './components/copy-button';
|
|
20
|
+
export * from './components/countdown';
|
|
13
21
|
export * from './components/date-picker';
|
|
22
|
+
export * from './components/date-range-picker';
|
|
14
23
|
export * from './components/dialog';
|
|
15
24
|
export * from './components/divider';
|
|
25
|
+
export * from './components/drawer';
|
|
26
|
+
export * from './components/empty-state';
|
|
27
|
+
export * from './components/expandable-card';
|
|
28
|
+
export * from './components/file-dropzone';
|
|
29
|
+
export * from './components/filter-toolbar';
|
|
16
30
|
export * from './components/flex';
|
|
31
|
+
export * from './components/hold-to-confirm';
|
|
32
|
+
export * from './components/image-compare';
|
|
33
|
+
export * from './components/inline-edit';
|
|
34
|
+
export * from './components/hover-card';
|
|
35
|
+
export * from './components/json-viewer';
|
|
17
36
|
export * from './components/kbd';
|
|
37
|
+
export * from './components/mention-input';
|
|
18
38
|
export * from './components/menu';
|
|
39
|
+
export * from './components/metric-card';
|
|
40
|
+
export * from './components/multi-select';
|
|
19
41
|
export * from './components/navigation';
|
|
20
42
|
export * from './components/pagination';
|
|
43
|
+
export * from './components/password-field';
|
|
21
44
|
export * from './components/pill';
|
|
22
45
|
export * from './components/popover';
|
|
23
46
|
export * from './components/progress';
|
|
47
|
+
export * from './components/radio-cards';
|
|
24
48
|
export * from './components/radio-group';
|
|
49
|
+
export * from './components/resizable-panels';
|
|
50
|
+
export * from './components/scroll-area';
|
|
51
|
+
export * from './components/search-field';
|
|
52
|
+
export * from './components/segmented-control';
|
|
25
53
|
export * from './components/select';
|
|
54
|
+
export * from './components/signature-pad';
|
|
26
55
|
export * from './components/skeleton';
|
|
56
|
+
export * from './components/slider';
|
|
57
|
+
export * from './components/sortable-data-table';
|
|
27
58
|
export * from './components/spinner';
|
|
59
|
+
export * from './components/split-button';
|
|
28
60
|
export * from './components/stack';
|
|
61
|
+
export * from './components/stepper';
|
|
62
|
+
export * from './components/swipe-actions';
|
|
29
63
|
export * from './components/switch';
|
|
30
64
|
export * from './components/tabs';
|
|
65
|
+
export * from './components/tag-input';
|
|
31
66
|
export * from './components/text-field';
|
|
32
67
|
export * from './components/textarea';
|
|
33
68
|
export { ThemeProvider, useTheme, type ThemeProviderProps } from './components/theme-provider/theme-provider';
|
|
34
69
|
export * from './components/theme-root';
|
|
70
|
+
export * from './components/time-picker';
|
|
71
|
+
export * from './components/timeline';
|
|
35
72
|
export * from './components/toast';
|
|
73
|
+
export * from './components/toast-stack';
|
|
36
74
|
export * from './components/toggle-group';
|
|
37
75
|
export * from './components/tooltip';
|
|
76
|
+
export * from './components/tree-view';
|
|
77
|
+
export * from './components/usage-meter';
|
|
38
78
|
export { styled } from './styling/styled';
|
|
39
79
|
export type { SxProps } from './styling/sx';
|
|
40
80
|
export { theme, type JfraderTheme } from './styling/theme';
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { type ElementProps, type FloatingContext } from '@floating-ui/react';
|
|
3
|
+
/**
|
|
4
|
+
* `container`: a layer whose content holds focus and may host other layers (Popover,
|
|
5
|
+
* DateRangePicker). Escape and outside press are ignored by the layer itself while a child
|
|
6
|
+
* layer is open.
|
|
7
|
+
* `leaf`: a layer that hosts none (HoverCard). Focus usually stays outside it (e.g. in the
|
|
8
|
+
* parent's content, whose own key handling stops the event from bubbling), so Escape is
|
|
9
|
+
* handled in the capture phase and stops at its target once the leaf closes.
|
|
10
|
+
*/
|
|
11
|
+
export type LayerKind = 'container' | 'leaf';
|
|
12
|
+
/** Escape and outside-press dismissal for one layer; pass the result into `useInteractions`. */
|
|
13
|
+
export declare function useLayerDismiss(context: FloatingContext, kind: LayerKind): ElementProps[];
|
|
14
|
+
/**
|
|
15
|
+
* Registers one overlay layer and renders `children` with its node id, which the layer passes
|
|
16
|
+
* to `useOverlayFloating`. Layers rendered inside `children` become its children in the tree.
|
|
17
|
+
*/
|
|
18
|
+
export declare function OverlayLayer({ children }: {
|
|
19
|
+
children: (nodeId: string | undefined) => ReactNode;
|
|
20
|
+
}): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
21
|
+
export declare namespace OverlayLayer {
|
|
22
|
+
var displayName: string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Root boundary for an overlay that does not take part in layer nesting. Inside a layer it gets
|
|
26
|
+
* its own empty tree and no parent node, so it never reads the enclosing layer as its parent.
|
|
27
|
+
*/
|
|
28
|
+
export declare function IsolatedOverlay({ children }: {
|
|
29
|
+
children: ReactNode;
|
|
30
|
+
}): string | number | bigint | boolean | import("@emotion/react/jsx-runtime").JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | Iterable<ReactNode> | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | import("react").ReactPortal | null | undefined> | null | undefined;
|
|
31
|
+
export declare namespace IsolatedOverlay {
|
|
32
|
+
var displayName: string;
|
|
33
|
+
}
|
|
@@ -3,9 +3,19 @@ export interface OverlayFloatingOptions {
|
|
|
3
3
|
open: boolean;
|
|
4
4
|
onOpenChange: (open: boolean, event?: Event, reason?: OpenChangeReason) => void;
|
|
5
5
|
placement: Placement;
|
|
6
|
+
/** Node id from `OverlayLayer`, for overlays that take part in nested dismissal. */
|
|
7
|
+
nodeId?: string;
|
|
8
|
+
/** Collision boundary for flip/shift/size. Defaults to the clipping ancestors (and viewport). */
|
|
9
|
+
boundary?: Element | null;
|
|
10
|
+
/** Receives the space left for the surface inside the boundary after each positioning pass. */
|
|
11
|
+
onAvailableSize?: (size: OverlayAvailableSize) => void;
|
|
12
|
+
}
|
|
13
|
+
export interface OverlayAvailableSize {
|
|
14
|
+
width: number;
|
|
15
|
+
height: number;
|
|
6
16
|
}
|
|
7
17
|
/**
|
|
8
18
|
* Shared positioning for Popover, Tooltip and Menu. `autoUpdate` only runs while both
|
|
9
19
|
* elements are mounted, so a closed (unmounted) surface does no positioning work.
|
|
10
20
|
*/
|
|
11
|
-
export declare function useOverlayFloating({ open, onOpenChange, placement, }: OverlayFloatingOptions): UseFloatingReturn<HTMLButtonElement>;
|
|
21
|
+
export declare function useOverlayFloating({ open, onOpenChange, placement, nodeId, boundary, onAvailableSize, }: OverlayFloatingOptions): UseFloatingReturn<HTMLButtonElement>;
|
|
@@ -34,7 +34,19 @@ export declare const theme: {
|
|
|
34
34
|
readonly info: "var(--ui-color-info)";
|
|
35
35
|
readonly infoSoft: "var(--ui-color-info-soft)";
|
|
36
36
|
readonly focusRing: "var(--ui-color-focus-ring)";
|
|
37
|
+
readonly signatureInkBlack: "var(--ui-color-signature-ink-black)";
|
|
38
|
+
readonly signatureInkBlue: "var(--ui-color-signature-ink-blue)";
|
|
39
|
+
readonly signatureInkViolet: "var(--ui-color-signature-ink-violet)";
|
|
37
40
|
readonly scrim: "var(--ui-color-scrim)";
|
|
41
|
+
readonly syntaxKeyword: "var(--ui-color-syntax-keyword)";
|
|
42
|
+
readonly syntaxString: "var(--ui-color-syntax-string)";
|
|
43
|
+
readonly syntaxConstant: "var(--ui-color-syntax-constant)";
|
|
44
|
+
readonly syntaxFunction: "var(--ui-color-syntax-function)";
|
|
45
|
+
readonly syntaxType: "var(--ui-color-syntax-type)";
|
|
46
|
+
readonly syntaxTag: "var(--ui-color-syntax-tag)";
|
|
47
|
+
readonly syntaxProperty: "var(--ui-color-syntax-property)";
|
|
48
|
+
readonly syntaxComment: "var(--ui-color-syntax-comment)";
|
|
49
|
+
readonly syntaxPunctuation: "var(--ui-color-syntax-punctuation)";
|
|
38
50
|
};
|
|
39
51
|
readonly shadow: {
|
|
40
52
|
readonly raised: "var(--ui-shadow-raised)";
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* One state authority for controlled/uncontrolled components.
|
|
3
3
|
* `value === undefined` means uncontrolled; internal state seeds from `defaultValue`.
|
|
4
4
|
* Requests dedupe against the current value and notify only through `onChange`.
|
|
5
|
+
* `resetToDefault` restores the uncontrolled seed without notifying (native form reset).
|
|
5
6
|
* Do not switch modes during an instance's lifetime (see SKILL.md §5).
|
|
6
7
|
*/
|
|
7
|
-
export declare function useControlledState<T>(value: T | undefined, defaultValue: T | undefined, onChange?: (next: T) => void): readonly [T | undefined, (next: T) => void];
|
|
8
|
+
export declare function useControlledState<T>(value: T | undefined, defaultValue: T | undefined, onChange?: (next: T) => void): readonly [T | undefined, (next: T) => void, () => void];
|