panelui-native 0.65.0 → 0.68.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 +21 -1
- package/lib/module/components/area-chart/index.js +18 -1
- package/lib/module/components/area-chart/index.js.map +1 -1
- package/lib/module/components/bar-chart/index.js +18 -1
- package/lib/module/components/bar-chart/index.js.map +1 -1
- package/lib/module/components/bottom-sheet/index.js.map +1 -1
- package/lib/module/components/candlestick-chart/index.js +18 -1
- package/lib/module/components/candlestick-chart/index.js.map +1 -1
- package/lib/module/components/carousel/carousel-lifecycle.js +51 -0
- package/lib/module/components/carousel/carousel-lifecycle.js.map +1 -0
- package/lib/module/components/carousel/index.js +61 -24
- package/lib/module/components/carousel/index.js.map +1 -1
- package/lib/module/components/context-menu/context-menu-invocation.js +23 -0
- package/lib/module/components/context-menu/context-menu-invocation.js.map +1 -0
- package/lib/module/components/context-menu/index.js +78 -9
- package/lib/module/components/context-menu/index.js.map +1 -1
- package/lib/module/components/dialog/index.js.map +1 -1
- package/lib/module/components/drawer/index.js.map +1 -1
- package/lib/module/components/flow/flow-accessibility.js +18 -2
- package/lib/module/components/flow/flow-accessibility.js.map +1 -1
- package/lib/module/components/flow/flow-identifiers.js +81 -0
- package/lib/module/components/flow/flow-identifiers.js.map +1 -0
- package/lib/module/components/flow/index.js +12 -18
- package/lib/module/components/flow/index.js.map +1 -1
- package/lib/module/components/form/index.js +7 -5
- package/lib/module/components/form/index.js.map +1 -1
- package/lib/module/components/form/typed-form.js +11 -0
- package/lib/module/components/form/typed-form.js.map +1 -0
- package/lib/module/components/form/use-form.js +4 -0
- package/lib/module/components/form/use-form.js.map +1 -1
- package/lib/module/components/heatmap-chart/index.js +27 -1
- package/lib/module/components/heatmap-chart/index.js.map +1 -1
- package/lib/module/components/line-chart/index.js +18 -1
- package/lib/module/components/line-chart/index.js.map +1 -1
- package/lib/module/components/message-scroller/index.js +187 -17
- package/lib/module/components/message-scroller/index.js.map +1 -1
- package/lib/module/components/message-scroller/message-scroller-math.js +43 -0
- package/lib/module/components/message-scroller/message-scroller-math.js.map +1 -0
- package/lib/module/components/meter/index.js +250 -0
- package/lib/module/components/meter/index.js.map +1 -0
- package/lib/module/components/meter/meter-scale.js +88 -0
- package/lib/module/components/meter/meter-scale.js.map +1 -0
- package/lib/module/components/planner/index.js +714 -0
- package/lib/module/components/planner/index.js.map +1 -0
- package/lib/module/components/planner/planner-entries.js +124 -0
- package/lib/module/components/planner/planner-entries.js.map +1 -0
- package/lib/module/components/popover/index.js.map +1 -1
- package/lib/module/components/radar-chart/index.js +18 -1
- package/lib/module/components/radar-chart/index.js.map +1 -1
- package/lib/module/components/scatter-chart/index.js +18 -1
- package/lib/module/components/scatter-chart/index.js.map +1 -1
- package/lib/module/components/selection-mode/index.js +26 -31
- package/lib/module/components/selection-mode/index.js.map +1 -1
- package/lib/module/components/selection-mode/selection-mode-contracts.js +48 -0
- package/lib/module/components/selection-mode/selection-mode-contracts.js.map +1 -0
- package/lib/module/components/signature/index.js +62 -20
- package/lib/module/components/signature/index.js.map +1 -1
- package/lib/module/components/signature/signature-accessibility.js +58 -0
- package/lib/module/components/signature/signature-accessibility.js.map +1 -0
- package/lib/module/components/skeleton/index.js +45 -7
- package/lib/module/components/skeleton/index.js.map +1 -1
- package/lib/module/components/slider/index.js +22 -18
- package/lib/module/components/slider/index.js.map +1 -1
- package/lib/module/components/spinner/index.js +63 -14
- package/lib/module/components/spinner/index.js.map +1 -1
- package/lib/module/components/time-picker/index.js +46 -21
- package/lib/module/components/time-picker/index.js.map +1 -1
- package/lib/module/components/time-picker/ruler-window.js +25 -0
- package/lib/module/components/time-picker/ruler-window.js.map +1 -0
- package/lib/module/hooks/breakpoint-contract.js +29 -0
- package/lib/module/hooks/breakpoint-contract.js.map +1 -0
- package/lib/module/hooks/index.js +1 -1
- package/lib/module/hooks/index.js.map +1 -1
- package/lib/module/hooks/use-breakpoint.js +46 -1
- package/lib/module/hooks/use-breakpoint.js.map +1 -1
- package/lib/module/index.js +3 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/primitives/chart-accessibility.js +68 -0
- package/lib/module/primitives/chart-accessibility.js.map +1 -0
- package/lib/module/primitives/scrim.js +94 -3
- package/lib/module/primitives/scrim.js.map +1 -1
- package/lib/typescript/src/components/area-chart/index.d.ts +2 -1
- package/lib/typescript/src/components/area-chart/index.d.ts.map +1 -1
- package/lib/typescript/src/components/bar-chart/index.d.ts +2 -1
- package/lib/typescript/src/components/bar-chart/index.d.ts.map +1 -1
- package/lib/typescript/src/components/bottom-sheet/index.d.ts +3 -0
- package/lib/typescript/src/components/bottom-sheet/index.d.ts.map +1 -1
- package/lib/typescript/src/components/candlestick-chart/index.d.ts +2 -1
- package/lib/typescript/src/components/candlestick-chart/index.d.ts.map +1 -1
- package/lib/typescript/src/components/carousel/carousel-lifecycle.d.ts +23 -0
- package/lib/typescript/src/components/carousel/carousel-lifecycle.d.ts.map +1 -0
- package/lib/typescript/src/components/carousel/index.d.ts +5 -2
- package/lib/typescript/src/components/carousel/index.d.ts.map +1 -1
- package/lib/typescript/src/components/context-menu/context-menu-invocation.d.ts +20 -0
- package/lib/typescript/src/components/context-menu/context-menu-invocation.d.ts.map +1 -0
- package/lib/typescript/src/components/context-menu/index.d.ts +18 -8
- package/lib/typescript/src/components/context-menu/index.d.ts.map +1 -1
- package/lib/typescript/src/components/dialog/index.d.ts +3 -0
- package/lib/typescript/src/components/dialog/index.d.ts.map +1 -1
- package/lib/typescript/src/components/drawer/index.d.ts +3 -0
- package/lib/typescript/src/components/drawer/index.d.ts.map +1 -1
- package/lib/typescript/src/components/flow/flow-accessibility.d.ts +8 -0
- package/lib/typescript/src/components/flow/flow-accessibility.d.ts.map +1 -1
- package/lib/typescript/src/components/flow/flow-identifiers.d.ts +24 -0
- package/lib/typescript/src/components/flow/flow-identifiers.d.ts.map +1 -0
- package/lib/typescript/src/components/flow/index.d.ts +6 -5
- package/lib/typescript/src/components/flow/index.d.ts.map +1 -1
- package/lib/typescript/src/components/form/index.d.ts +18 -5
- package/lib/typescript/src/components/form/index.d.ts.map +1 -1
- package/lib/typescript/src/components/form/typed-form.d.ts +7 -0
- package/lib/typescript/src/components/form/typed-form.d.ts.map +1 -0
- package/lib/typescript/src/components/form/use-form.d.ts +4 -0
- package/lib/typescript/src/components/form/use-form.d.ts.map +1 -1
- package/lib/typescript/src/components/heatmap-chart/index.d.ts +2 -1
- package/lib/typescript/src/components/heatmap-chart/index.d.ts.map +1 -1
- package/lib/typescript/src/components/line-chart/index.d.ts +2 -1
- package/lib/typescript/src/components/line-chart/index.d.ts.map +1 -1
- package/lib/typescript/src/components/message-scroller/index.d.ts +30 -2
- package/lib/typescript/src/components/message-scroller/index.d.ts.map +1 -1
- package/lib/typescript/src/components/message-scroller/message-scroller-math.d.ts +18 -0
- package/lib/typescript/src/components/message-scroller/message-scroller-math.d.ts.map +1 -0
- package/lib/typescript/src/components/meter/index.d.ts +270 -0
- package/lib/typescript/src/components/meter/index.d.ts.map +1 -0
- package/lib/typescript/src/components/meter/meter-scale.d.ts +57 -0
- package/lib/typescript/src/components/meter/meter-scale.d.ts.map +1 -0
- package/lib/typescript/src/components/planner/index.d.ts +274 -0
- package/lib/typescript/src/components/planner/index.d.ts.map +1 -0
- package/lib/typescript/src/components/planner/planner-entries.d.ts +75 -0
- package/lib/typescript/src/components/planner/planner-entries.d.ts.map +1 -0
- package/lib/typescript/src/components/popover/index.d.ts +3 -0
- package/lib/typescript/src/components/popover/index.d.ts.map +1 -1
- package/lib/typescript/src/components/radar-chart/index.d.ts +4 -0
- package/lib/typescript/src/components/radar-chart/index.d.ts.map +1 -1
- package/lib/typescript/src/components/scatter-chart/index.d.ts +2 -1
- package/lib/typescript/src/components/scatter-chart/index.d.ts.map +1 -1
- package/lib/typescript/src/components/selection-mode/index.d.ts +6 -4
- package/lib/typescript/src/components/selection-mode/index.d.ts.map +1 -1
- package/lib/typescript/src/components/selection-mode/selection-mode-contracts.d.ts +18 -0
- package/lib/typescript/src/components/selection-mode/selection-mode-contracts.d.ts.map +1 -0
- package/lib/typescript/src/components/signature/index.d.ts +6 -0
- package/lib/typescript/src/components/signature/index.d.ts.map +1 -1
- package/lib/typescript/src/components/signature/signature-accessibility.d.ts +27 -0
- package/lib/typescript/src/components/signature/signature-accessibility.d.ts.map +1 -0
- package/lib/typescript/src/components/skeleton/index.d.ts +25 -2
- package/lib/typescript/src/components/skeleton/index.d.ts.map +1 -1
- package/lib/typescript/src/components/slider/index.d.ts.map +1 -1
- package/lib/typescript/src/components/spinner/index.d.ts +25 -2
- package/lib/typescript/src/components/spinner/index.d.ts.map +1 -1
- package/lib/typescript/src/components/time-picker/index.d.ts +5 -6
- package/lib/typescript/src/components/time-picker/index.d.ts.map +1 -1
- package/lib/typescript/src/components/time-picker/ruler-window.d.ts +12 -0
- package/lib/typescript/src/components/time-picker/ruler-window.d.ts.map +1 -0
- package/lib/typescript/src/hooks/breakpoint-contract.d.ts +6 -0
- package/lib/typescript/src/hooks/breakpoint-contract.d.ts.map +1 -0
- package/lib/typescript/src/hooks/index.d.ts +1 -1
- package/lib/typescript/src/hooks/index.d.ts.map +1 -1
- package/lib/typescript/src/hooks/use-breakpoint.d.ts +22 -0
- package/lib/typescript/src/hooks/use-breakpoint.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +4 -2
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/primitives/chart-accessibility.d.ts +33 -0
- package/lib/typescript/src/primitives/chart-accessibility.d.ts.map +1 -0
- package/lib/typescript/src/primitives/scrim.d.ts +5 -3
- package/lib/typescript/src/primitives/scrim.d.ts.map +1 -1
- package/lib/typescript/types/form-api.type-test.d.ts +2 -0
- package/lib/typescript/types/form-api.type-test.d.ts.map +1 -0
- package/package.json +34 -5
- package/src/components/area-chart/index.tsx +27 -2
- package/src/components/bar-chart/index.tsx +27 -2
- package/src/components/bottom-sheet/index.tsx +3 -0
- package/src/components/candlestick-chart/index.tsx +30 -2
- package/src/components/carousel/carousel-lifecycle.ts +74 -0
- package/src/components/carousel/index.tsx +80 -25
- package/src/components/context-menu/context-menu-invocation.ts +44 -0
- package/src/components/context-menu/index.tsx +113 -13
- package/src/components/dialog/index.tsx +3 -0
- package/src/components/drawer/index.tsx +3 -0
- package/src/components/flow/flow-accessibility.ts +16 -2
- package/src/components/flow/flow-identifiers.ts +98 -0
- package/src/components/flow/index.tsx +29 -19
- package/src/components/form/index.tsx +32 -5
- package/src/components/form/typed-form.ts +13 -0
- package/src/components/form/use-form.ts +9 -0
- package/src/components/heatmap-chart/index.tsx +49 -3
- package/src/components/line-chart/index.tsx +27 -2
- package/src/components/message-scroller/index.tsx +273 -13
- package/src/components/message-scroller/message-scroller-math.ts +62 -0
- package/src/components/meter/index.tsx +318 -0
- package/src/components/meter/meter-scale.ts +109 -0
- package/src/components/planner/index.tsx +886 -0
- package/src/components/planner/planner-entries.ts +146 -0
- package/src/components/popover/index.tsx +3 -0
- package/src/components/radar-chart/index.tsx +24 -0
- package/src/components/scatter-chart/index.tsx +27 -2
- package/src/components/selection-mode/index.tsx +37 -30
- package/src/components/selection-mode/selection-mode-contracts.ts +53 -0
- package/src/components/signature/index.tsx +107 -20
- package/src/components/signature/signature-accessibility.ts +67 -0
- package/src/components/skeleton/index.tsx +59 -5
- package/src/components/slider/index.tsx +28 -18
- package/src/components/spinner/index.tsx +80 -13
- package/src/components/time-picker/index.tsx +57 -29
- package/src/components/time-picker/ruler-window.ts +24 -0
- package/src/hooks/breakpoint-contract.ts +31 -0
- package/src/hooks/index.ts +4 -0
- package/src/hooks/use-breakpoint.ts +61 -10
- package/src/index.ts +32 -0
- package/src/primitives/chart-accessibility.ts +102 -0
- package/src/primitives/scrim.tsx +127 -7
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Planner — a month of days, each carrying what falls on it.
|
|
3
|
+
*
|
|
4
|
+
* ```tsx
|
|
5
|
+
* const [month, setMonth] = useState(new Date());
|
|
6
|
+
*
|
|
7
|
+
* <Planner
|
|
8
|
+
* month={month}
|
|
9
|
+
* onMonthChange={setMonth}
|
|
10
|
+
* entries={renewals}
|
|
11
|
+
* categories={[
|
|
12
|
+
* { id: 'monthly', label: 'Monthly' },
|
|
13
|
+
* { id: 'yearly', label: 'Yearly', colorIndex: 4 },
|
|
14
|
+
* ]}
|
|
15
|
+
* >
|
|
16
|
+
* <Planner.Header>
|
|
17
|
+
* <Planner.Title />
|
|
18
|
+
* <Planner.Today />
|
|
19
|
+
* <Planner.Nav />
|
|
20
|
+
* </Planner.Header>
|
|
21
|
+
* <Planner.Grid />
|
|
22
|
+
* <Planner.Legend />
|
|
23
|
+
* <Planner.Details>
|
|
24
|
+
* {(date, entries) => <Text>{entries.length} on {date.toDateString()}</Text>}
|
|
25
|
+
* </Planner.Details>
|
|
26
|
+
* </Planner>
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* ## How it differs from Calendar
|
|
30
|
+
*
|
|
31
|
+
* `Calendar` picks a date and answers with one. This shows what is already on
|
|
32
|
+
* the days and answers with the day you asked about — the selection exists to
|
|
33
|
+
* open something, not to be submitted.
|
|
34
|
+
*
|
|
35
|
+
* ## Why it draws its own Frame
|
|
36
|
+
*
|
|
37
|
+
* A month at a glance is a widget: a boundary, a strip along the top carrying
|
|
38
|
+
* the month and the way through it, and a footer that holds still while the
|
|
39
|
+
* middle changes. That is `Frame`, so the root renders one instead of leaving
|
|
40
|
+
* every caller to assemble the same shell. Pass `frame={false}` to drop it,
|
|
41
|
+
* for a planner in a sheet or a card that already draws its own edge.
|
|
42
|
+
*
|
|
43
|
+
* ## Why the grid is always six weeks
|
|
44
|
+
*
|
|
45
|
+
* A month can span five weeks or six. Drawn at its natural height the panel
|
|
46
|
+
* jumps as you page through the year and the days appear to move under your
|
|
47
|
+
* thumb, so the grid is always six rows and the last one is sometimes all
|
|
48
|
+
* next month. `Calendar` fixes its height for the same reason.
|
|
49
|
+
*
|
|
50
|
+
* ## Why a day says more than its date
|
|
51
|
+
*
|
|
52
|
+
* The marker on a day is a coloured dot, and colour is a signal that does not
|
|
53
|
+
* reach everyone looking at it. So the legend prints its label beside every
|
|
54
|
+
* swatch, and a day is spoken as its date, how many entries it carries and
|
|
55
|
+
* which categories they belong to. Neither is decoration: between them they
|
|
56
|
+
* are the whole content of the grid for somebody who cannot see it.
|
|
57
|
+
*/
|
|
58
|
+
import { type ReactNode } from 'react';
|
|
59
|
+
import { View, type ViewProps } from 'react-native';
|
|
60
|
+
import { type TextProps } from '../../primitives/text.js';
|
|
61
|
+
import { type CalendarSystem, type DateLocale } from '../../utils/date.js';
|
|
62
|
+
import { type PlannerCountedCategory } from './planner-entries.js';
|
|
63
|
+
/** One thing that falls on a day. */
|
|
64
|
+
export interface PlannerEntry {
|
|
65
|
+
/** Stable across renders; it keys the cell's contents. */
|
|
66
|
+
id: string;
|
|
67
|
+
/** When it falls. The time of day is kept but not read by the grid. */
|
|
68
|
+
date: Date;
|
|
69
|
+
/** Named in the dialog and, through its category, in the day's spoken label. */
|
|
70
|
+
label: string;
|
|
71
|
+
/** Matches a `PlannerCategory` id. Without one the entry is still counted. */
|
|
72
|
+
category?: string;
|
|
73
|
+
/** Drawn in the cell — a brand mark, an avatar, a glyph. */
|
|
74
|
+
icon?: ReactNode;
|
|
75
|
+
}
|
|
76
|
+
/** A group of entries: the key to a colour, and a line in the legend. */
|
|
77
|
+
export interface PlannerCategory {
|
|
78
|
+
id: string;
|
|
79
|
+
/** Printed beside the swatch, and spoken as part of a day that carries it. */
|
|
80
|
+
label: string;
|
|
81
|
+
/**
|
|
82
|
+
* Which `--color-chart-*` token the dot takes, 1 to 5. Categories without
|
|
83
|
+
* one are numbered in the order they are declared.
|
|
84
|
+
*/
|
|
85
|
+
colorIndex?: number;
|
|
86
|
+
/** An explicit colour, for a brand that is not the theme's to choose. */
|
|
87
|
+
color?: string;
|
|
88
|
+
}
|
|
89
|
+
export interface PlannerProps extends Omit<ViewProps, 'children'> {
|
|
90
|
+
className?: string;
|
|
91
|
+
/** The month on show. Leave it out for an uncontrolled planner. */
|
|
92
|
+
month?: Date;
|
|
93
|
+
defaultMonth?: Date;
|
|
94
|
+
onMonthChange?: (month: Date) => void;
|
|
95
|
+
/** Everything the planner knows about, in any order and any month. */
|
|
96
|
+
entries?: PlannerEntry[];
|
|
97
|
+
/** The colour key. Declaration order is legend order and palette order. */
|
|
98
|
+
categories?: PlannerCategory[];
|
|
99
|
+
/** The open day. `null` is none. Leave it out for an uncontrolled planner. */
|
|
100
|
+
selected?: Date | null;
|
|
101
|
+
defaultSelected?: Date | null;
|
|
102
|
+
onSelectedChange?: (date: Date | null) => void;
|
|
103
|
+
/** Runs before the selection moves, whether or not `Details` is present. */
|
|
104
|
+
onDayPress?: (date: Date, entries: PlannerEntry[]) => void;
|
|
105
|
+
/** How many entries a cell draws before it counts the rest. Default `2`. */
|
|
106
|
+
entryLimit?: number;
|
|
107
|
+
/** First day of the week, 0 is Sunday. Defaults to the locale's. */
|
|
108
|
+
weekStartsOn?: number | 'auto';
|
|
109
|
+
locale?: DateLocale;
|
|
110
|
+
calendar?: CalendarSystem;
|
|
111
|
+
/** Draw the surrounding `Frame`. Off for a planner in a sheet or a card. */
|
|
112
|
+
frame?: boolean;
|
|
113
|
+
children?: ReactNode;
|
|
114
|
+
}
|
|
115
|
+
export interface PlannerHeaderProps {
|
|
116
|
+
children?: ReactNode;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* The strip along the top of the frame. Put `Title`, `Today` and `Nav` in it.
|
|
120
|
+
*
|
|
121
|
+
* The strip has two ends rather than an even spread. What the month *is* —
|
|
122
|
+
* its name, and the way back to today — reads from the leading edge; what
|
|
123
|
+
* *moves* it sits at the trailing edge, under the thumb that reaches for it.
|
|
124
|
+
* Spaced evenly across a full-width strip they read as three unrelated
|
|
125
|
+
* controls instead of a label and a pair of buttons.
|
|
126
|
+
*/
|
|
127
|
+
declare function PlannerHeader({ children }: PlannerHeaderProps): import("react").JSX.Element;
|
|
128
|
+
declare namespace PlannerHeader {
|
|
129
|
+
var displayName: string;
|
|
130
|
+
}
|
|
131
|
+
export interface PlannerTitleProps extends Omit<TextProps, 'children'> {
|
|
132
|
+
/** Replaces the month name, for a title that says something else. */
|
|
133
|
+
children?: ReactNode;
|
|
134
|
+
}
|
|
135
|
+
/** The month on show, in the calendar system and locale the grid uses. */
|
|
136
|
+
declare function PlannerTitle({ children, className, ...props }: PlannerTitleProps): import("react").JSX.Element;
|
|
137
|
+
declare namespace PlannerTitle {
|
|
138
|
+
var displayName: string;
|
|
139
|
+
}
|
|
140
|
+
export interface PlannerTodayProps {
|
|
141
|
+
/** Replaces the word on the pill. */
|
|
142
|
+
children?: ReactNode;
|
|
143
|
+
}
|
|
144
|
+
/** Jumps back to the month today is in, and selects nothing. */
|
|
145
|
+
declare function PlannerToday({ children }: PlannerTodayProps): import("react").JSX.Element;
|
|
146
|
+
declare namespace PlannerToday {
|
|
147
|
+
var displayName: string;
|
|
148
|
+
}
|
|
149
|
+
export interface PlannerNavProps {
|
|
150
|
+
className?: string;
|
|
151
|
+
}
|
|
152
|
+
/** Back and forward a month. */
|
|
153
|
+
declare function PlannerNav({ className }: PlannerNavProps): import("react").JSX.Element;
|
|
154
|
+
declare namespace PlannerNav {
|
|
155
|
+
var displayName: string;
|
|
156
|
+
}
|
|
157
|
+
export interface PlannerActionProps {
|
|
158
|
+
children?: ReactNode;
|
|
159
|
+
}
|
|
160
|
+
/** The trailing end of the header strip, for a button of the caller's. */
|
|
161
|
+
declare function PlannerAction({ children }: PlannerActionProps): import("react").JSX.Element;
|
|
162
|
+
declare namespace PlannerAction {
|
|
163
|
+
var displayName: string;
|
|
164
|
+
}
|
|
165
|
+
/** What a custom cell is handed. Everything the default cell draws from. */
|
|
166
|
+
export interface PlannerDayState {
|
|
167
|
+
date: Date;
|
|
168
|
+
entries: PlannerEntry[];
|
|
169
|
+
isToday: boolean;
|
|
170
|
+
isSelected: boolean;
|
|
171
|
+
isInMonth: boolean;
|
|
172
|
+
}
|
|
173
|
+
export type PlannerDayRenderer = (state: PlannerDayState) => ReactNode;
|
|
174
|
+
export interface PlannerGridProps {
|
|
175
|
+
className?: string;
|
|
176
|
+
/** Draws a cell yourself. It is handed the day and what falls on it. */
|
|
177
|
+
renderDay?: PlannerDayRenderer;
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* The weekday row and the six weeks below it.
|
|
181
|
+
*
|
|
182
|
+
* React Native has no per-cell grid vocabulary — no `gridcell`, no `row` — so
|
|
183
|
+
* a screen reader never hears "row three, column five" and cannot fall back on
|
|
184
|
+
* position for context. Every day therefore carries its own full date, and the
|
|
185
|
+
* weekday headings are hidden rather than read out 42 times over.
|
|
186
|
+
*/
|
|
187
|
+
declare function PlannerGrid({ className, renderDay }: PlannerGridProps): import("react").JSX.Element;
|
|
188
|
+
declare namespace PlannerGrid {
|
|
189
|
+
var displayName: string;
|
|
190
|
+
}
|
|
191
|
+
export interface PlannerDayProps {
|
|
192
|
+
date: Date;
|
|
193
|
+
renderDay?: PlannerDayRenderer;
|
|
194
|
+
}
|
|
195
|
+
/** One cell. Pressing it selects the day and opens whatever is bound to it. */
|
|
196
|
+
declare function PlannerDay({ date, renderDay }: PlannerDayProps): import("react").JSX.Element;
|
|
197
|
+
declare namespace PlannerDay {
|
|
198
|
+
var displayName: string;
|
|
199
|
+
}
|
|
200
|
+
export interface PlannerLegendProps {
|
|
201
|
+
className?: string;
|
|
202
|
+
/** Print each category's count for the month beside its label. */
|
|
203
|
+
counts?: boolean;
|
|
204
|
+
/** Sits at the trailing end — a total, a currency, whatever the month adds to. */
|
|
205
|
+
children?: ReactNode;
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* The key to the dots.
|
|
209
|
+
*
|
|
210
|
+
* It prints the label beside every swatch, because a column of coloured dots
|
|
211
|
+
* with nothing to read them against is a quiz.
|
|
212
|
+
*/
|
|
213
|
+
declare function PlannerLegend({ className, counts, children }: PlannerLegendProps): import("react").JSX.Element;
|
|
214
|
+
declare namespace PlannerLegend {
|
|
215
|
+
var displayName: string;
|
|
216
|
+
}
|
|
217
|
+
export interface PlannerSummaryProps extends Omit<TextProps, 'children'> {
|
|
218
|
+
/** Replaces the count, for a total that is money rather than entries. */
|
|
219
|
+
children?: ReactNode;
|
|
220
|
+
}
|
|
221
|
+
/** What the month adds up to. Counts this month only, never the days either side. */
|
|
222
|
+
declare function PlannerSummary({ children, ...props }: PlannerSummaryProps): import("react").JSX.Element;
|
|
223
|
+
declare namespace PlannerSummary {
|
|
224
|
+
var displayName: string;
|
|
225
|
+
}
|
|
226
|
+
export interface PlannerFooterProps {
|
|
227
|
+
className?: string;
|
|
228
|
+
children?: ReactNode;
|
|
229
|
+
}
|
|
230
|
+
/** The strip along the bottom, for tools that act on the month. */
|
|
231
|
+
declare function PlannerFooter({ className, children }: PlannerFooterProps): import("react").JSX.Element;
|
|
232
|
+
declare namespace PlannerFooter {
|
|
233
|
+
var displayName: string;
|
|
234
|
+
}
|
|
235
|
+
export interface PlannerDetailsProps {
|
|
236
|
+
className?: string;
|
|
237
|
+
/** Title above the children. Defaults to the day's full date. */
|
|
238
|
+
title?: ReactNode;
|
|
239
|
+
/**
|
|
240
|
+
* The line under the title. Defaults to how many entries the day carries,
|
|
241
|
+
* so the dialog answers "how much of this is there" before it is read.
|
|
242
|
+
* Pass `null` to drop it.
|
|
243
|
+
*/
|
|
244
|
+
description?: ReactNode;
|
|
245
|
+
/** Given the open day and what falls on it. */
|
|
246
|
+
children: (date: Date, entries: PlannerEntry[]) => ReactNode;
|
|
247
|
+
}
|
|
248
|
+
/**
|
|
249
|
+
* A dialog bound to the open day.
|
|
250
|
+
*
|
|
251
|
+
* The planner owns the grid and the binding; what the dialog says is the
|
|
252
|
+
* application's, because the contents of a day are its data and not the
|
|
253
|
+
* component's. Leave it out and `onDayPress` is still called — a planner that
|
|
254
|
+
* pushes a screen instead of opening a dialog wants that and nothing else.
|
|
255
|
+
*/
|
|
256
|
+
declare function PlannerDetails({ className, title, description, children }: PlannerDetailsProps): import("react").JSX.Element;
|
|
257
|
+
declare namespace PlannerDetails {
|
|
258
|
+
var displayName: string;
|
|
259
|
+
}
|
|
260
|
+
export declare const Planner: import("react").ForwardRefExoticComponent<PlannerProps & import("react").RefAttributes<View>> & {
|
|
261
|
+
Header: typeof PlannerHeader;
|
|
262
|
+
Title: typeof PlannerTitle;
|
|
263
|
+
Today: typeof PlannerToday;
|
|
264
|
+
Nav: typeof PlannerNav;
|
|
265
|
+
Action: typeof PlannerAction;
|
|
266
|
+
Grid: typeof PlannerGrid;
|
|
267
|
+
Day: typeof PlannerDay;
|
|
268
|
+
Legend: typeof PlannerLegend;
|
|
269
|
+
Summary: typeof PlannerSummary;
|
|
270
|
+
Footer: typeof PlannerFooter;
|
|
271
|
+
Details: typeof PlannerDetails;
|
|
272
|
+
};
|
|
273
|
+
export type { PlannerCountedCategory };
|
|
274
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/planner/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AACH,OAAO,EAWL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAIL,IAAI,EACJ,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAItB,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,0BAAuB,CAAC;AAE7D,OAAO,EAcL,KAAK,cAAc,EACnB,KAAK,UAAU,EAChB,MAAM,qBAAkB,CAAC;AAG1B,OAAO,EAML,KAAK,sBAAsB,EAC5B,MAAM,sBAAmB,CAAC;AAwD3B,qCAAqC;AACrC,MAAM,WAAW,YAAY;IAC3B,0DAA0D;IAC1D,EAAE,EAAE,MAAM,CAAC;IACX,uEAAuE;IACvE,IAAI,EAAE,IAAI,CAAC;IACX,gFAAgF;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AAS,EAAE,QAAQ,EAAE,EAAE,kBAAkB,+BAMjE;kBANQ,aAAa;;;AAatB,MAAM,WAAW,mBAAmB;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iEAAiE;IACjE,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;;OAIG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,+CAA+C;IAC/C,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,YAAY,EAAE,KAAK,SAAS,CAAC;CAC9D;AAED;;;;;;;GAOG;AACH,iBAAS,cAAc,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,EAAE,mBAAmB,+BAwBvF;kBAxBQ,cAAc;;;AA2BvB,eAAO,MAAM,OAAO;;;;;;;;;;;;CAYlB,CAAC;AAEH,YAAY,EAAE,sBAAsB,EAAE,CAAC"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The parts of a planner that are arithmetic rather than rendering: which
|
|
3
|
+
* entries fall on which day, which category an entry belongs to, what a day
|
|
4
|
+
* says to a screen reader, and what the month adds up to.
|
|
5
|
+
*
|
|
6
|
+
* Kept out of the component so they can be tested without a renderer, and so
|
|
7
|
+
* the day cell stays a function of its inputs rather than of when it ran.
|
|
8
|
+
*
|
|
9
|
+
* Nothing here imports anything. The tests run this file through `node --test`
|
|
10
|
+
* with type stripping rather than a bundler, so an extensionless import of a
|
|
11
|
+
* sibling module — which is how the rest of the library is written — does not
|
|
12
|
+
* resolve. That is why the one line of date arithmetic below is here instead
|
|
13
|
+
* of coming from `utils/date`.
|
|
14
|
+
*/
|
|
15
|
+
/** The minimum an entry has to be for the grid to place it. */
|
|
16
|
+
export interface PlannerDatedEntry {
|
|
17
|
+
date: Date;
|
|
18
|
+
/** Matches a `PlannerCategory` id. An entry without one is uncategorised. */
|
|
19
|
+
category?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface PlannerCountedCategory {
|
|
22
|
+
id: string;
|
|
23
|
+
label: string;
|
|
24
|
+
count: number;
|
|
25
|
+
}
|
|
26
|
+
/** A day's key: local midnight, so two times on the same day agree. */
|
|
27
|
+
export declare function dayKey(date: Date): number;
|
|
28
|
+
/**
|
|
29
|
+
* Entries grouped by the day they fall on, each day in the order it was given.
|
|
30
|
+
*
|
|
31
|
+
* A map rather than a lookup per cell: a month draws 42 cells, and asking each
|
|
32
|
+
* of them to filter the whole list is 42 passes over it every render.
|
|
33
|
+
*/
|
|
34
|
+
export declare function bucketByDay<T extends PlannerDatedEntry>(entries: readonly T[]): Map<number, T[]>;
|
|
35
|
+
/** What falls on one day. Always an array, so a cell has nothing to guard. */
|
|
36
|
+
export declare function entriesOn<T extends PlannerDatedEntry>(days: Map<number, T[]>, date: Date): T[];
|
|
37
|
+
/**
|
|
38
|
+
* How many entries a cell draws before it stops and says how many are left.
|
|
39
|
+
*
|
|
40
|
+
* `limit` of 0 means draw none of them — the day still carries its marker and
|
|
41
|
+
* its spoken label, which is the whole content of a compact planner.
|
|
42
|
+
*/
|
|
43
|
+
export declare function visibleEntries<T>(entries: readonly T[], limit: number): {
|
|
44
|
+
shown: T[];
|
|
45
|
+
overflow: number;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* What a day says when it is read out.
|
|
49
|
+
*
|
|
50
|
+
* The date on its own is what a date picker says, and it is not enough here: a
|
|
51
|
+
* day in a planner differs from the one beside it by what is on it, and a
|
|
52
|
+
* marker that carries that difference in colour alone carries it to nobody who
|
|
53
|
+
* cannot see the colour. So the count and the categories are spoken.
|
|
54
|
+
*
|
|
55
|
+
* `dateLabel` is passed in rather than formatted here, so the grid and the
|
|
56
|
+
* label agree about the calendar system and the locale.
|
|
57
|
+
*/
|
|
58
|
+
export declare function dayAccessibilityLabel<T extends PlannerDatedEntry>(dateLabel: string, entries: readonly T[], categoryLabels: ReadonlyMap<string, string>): string;
|
|
59
|
+
/**
|
|
60
|
+
* What the month adds up to, per category, in the order the categories were
|
|
61
|
+
* declared — so the legend and the totals beside it never disagree about which
|
|
62
|
+
* one comes first.
|
|
63
|
+
*
|
|
64
|
+
* Entries outside `month` are left out. The grid draws the days either side of
|
|
65
|
+
* the month it is showing, and counting those would make a total that changes
|
|
66
|
+
* with the week the month happens to start on.
|
|
67
|
+
*/
|
|
68
|
+
export declare function summariseMonth<T extends PlannerDatedEntry>(entries: readonly T[], categories: readonly {
|
|
69
|
+
id: string;
|
|
70
|
+
label: string;
|
|
71
|
+
}[], isInMonth: (date: Date) => boolean): {
|
|
72
|
+
total: number;
|
|
73
|
+
categories: PlannerCountedCategory[];
|
|
74
|
+
};
|
|
75
|
+
//# sourceMappingURL=planner-entries.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"planner-entries.d.ts","sourceRoot":"","sources":["../../../../../src/components/planner/planner-entries.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,+DAA+D;AAC/D,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,IAAI,CAAC;IACX,6EAA6E;IAC7E,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,sBAAsB;IACrC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED,uEAAuE;AACvE,wBAAgB,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAEzC;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS,iBAAiB,EACrD,OAAO,EAAE,SAAS,CAAC,EAAE,GACpB,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC,CASlB;AAED,8EAA8E;AAC9E,wBAAgB,SAAS,CAAC,CAAC,SAAS,iBAAiB,EACnD,IAAI,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC,EACtB,IAAI,EAAE,IAAI,GACT,CAAC,EAAE,CAEL;AASD;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,OAAO,EAAE,SAAS,CAAC,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG;IACvE,KAAK,EAAE,CAAC,EAAE,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;CAClB,CAIA;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,SAAS,iBAAiB,EAC/D,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,SAAS,CAAC,EAAE,EACrB,cAAc,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,GAC1C,MAAM,CAaR;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,iBAAiB,EACxD,OAAO,EAAE,SAAS,CAAC,EAAE,EACrB,UAAU,EAAE,SAAS;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,EAAE,EACpD,SAAS,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,GACjC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,sBAAsB,EAAE,CAAA;CAAE,CAoBzD"}
|
|
@@ -163,6 +163,9 @@ export interface PopoverContentProps extends ViewProps {
|
|
|
163
163
|
* Frost the background behind the panel instead of dimming it. Uses
|
|
164
164
|
* `expo-blur` when installed and falls back to the dimmed scrim when it is
|
|
165
165
|
* not, so it is safe to pass either way.
|
|
166
|
+
*
|
|
167
|
+
* Someone who has Reduce Transparency switched on gets an opaque
|
|
168
|
+
* backdrop instead, which is the whole point of the setting.
|
|
166
169
|
*/
|
|
167
170
|
blur?: boolean;
|
|
168
171
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/popover/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,OAAO,EAUL,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,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,YAAY,CAAC;QAAE,OAAO,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAA;KAAE,CAAC,CAAC;CACpE;AAED;;;;;;GAMG;AACH,iBAAS,cAAc,CAAC,EAAE,QAAQ,EAAE,EAAE,mBAAmB,+BA4BxD;AAED,MAAM,WAAW,mBAAoB,SAAQ,SAAS;IACpD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0EAA0E;IAC1E,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAC7B,2DAA2D;IAC3D,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,wDAAwD;IACxD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,iDAAiD;IACjD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,aAAa,CAAC;IACpD;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;;;;OASG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;;;;OAQG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,qDAAqD;IACrD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/popover/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,OAAO,EAUL,KAAK,YAAY,EACjB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAML,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AActB,OAAO,EAAQ,KAAK,SAAS,EAAgB,MAAM,0BAAu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,EACL,GAAG,KAAK,EACT,EAAE,mBAAmB,sCA0PrB;AAED,MAAM,WAAW,iBAAkB,SAAQ,SAAS;IAClD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;GAQG;AACH,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,sCA2CtE;AAiBD,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,YAAY,CAAC;QAAE,OAAO,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAA;KAAE,CAAC,CAAC;CACpE;AAED,uDAAuD;AACvD,iBAAS,YAAY,CAAC,EAAE,QAAQ,EAAE,EAAE,iBAAiB;cAJhB,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI;wDAchE;AA2GD,eAAO,MAAM,OAAO;;;;;kCAzI2B,SAAS;;;;kCAUH,SAAS;;;;CAsI5D,CAAC"}
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
import { type ReactNode } from 'react';
|
|
29
29
|
import { type ViewProps } from 'react-native';
|
|
30
30
|
import { type SharedValue } from 'react-native-reanimated';
|
|
31
|
+
import { type ChartAccessibilityProps } from '../../primitives/chart-accessibility.js';
|
|
31
32
|
import { type SeriesColorIndex } from '../../utils/chart.js';
|
|
32
33
|
export type RadarChartStatus = 'loading' | 'ready';
|
|
33
34
|
/** One row is one axis: its label, and one value per series. */
|
|
@@ -95,6 +96,9 @@ export interface RadarChartProps extends Omit<ViewProps, 'children'> {
|
|
|
95
96
|
/** Drop the room reserved for axis labels, for a radar with none. */
|
|
96
97
|
compact?: boolean;
|
|
97
98
|
children?: ReactNode;
|
|
99
|
+
/** Accessible data labels and optional activation for each axis row. */
|
|
100
|
+
accessibilityLabelForDatum?: ChartAccessibilityProps<RadarChartDatum>['accessibilityLabelForDatum'];
|
|
101
|
+
onAccessibilityDatumPress?: ChartAccessibilityProps<RadarChartDatum>['onAccessibilityDatumPress'];
|
|
98
102
|
}
|
|
99
103
|
/** Imperative handle: re-run the reveal on demand, for a "replay" control. */
|
|
100
104
|
export interface RadarChartHandle {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/radar-chart/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,OAAO,EAYL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAA4C,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AASxF,OAAiB,EAOf,KAAK,WAAW,EACjB,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/radar-chart/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,OAAO,EAYL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAA4C,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AASxF,OAAiB,EAOf,KAAK,WAAW,EACjB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EAA0B,KAAK,uBAAuB,EAAE,MAAM,yCAAsC,CAAC;AAE5G,OAAO,EAIL,KAAK,gBAAgB,EACtB,MAAM,sBAAmB,CAAC;AAkC3B,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,OAAO,CAAC;AAEnD,gEAAgE;AAChE,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;AAEjF,UAAU,sBAAsB;IAC9B,IAAI,EAAE,eAAe,EAAE,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,gDAAgD;IAChD,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,oCAAoC;IACpC,MAAM,EAAE,MAAM,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,CAAC;IACrB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,mBAAmB;AACnB,iBAAS,gBAAgB,CAAC,EACxB,OAAO,EACP,IAAI,EACJ,KAAK,EACL,UAAc,EACd,WAAe,EACf,WAAkB,EAClB,QAAgB,GACjB,EAAE,qBAAqB,+BA6HvB;kBArIQ,gBAAgB;;;AA2LzB,MAAM,WAAW,qBAAqB;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qCAAqC;IACrC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4CAA4C;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8BAA8B;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,+DAA+D;IAC/D,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,iCAAiC;AACjC,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,KAAK,EACL,KAAK,EACL,OAAO,EACP,MAAc,EACd,QAAQ,GACT,EAAE,qBAAqB,+BAwCvB;kBA/CQ,gBAAgB;;;AAiDzB,MAAM,WAAW,qBAAqB;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4EAA4E;IAC5E,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;CACtC;AAED;;;;;;GAMG;AACH,iBAAS,gBAAgB,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,EAAE,qBAAqB,sCAmBzE;kBAnBQ,gBAAgB;;;AAoCzB,eAAO,MAAM,UAAU;;;;;;CAMrB,CAAC"}
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
*/
|
|
41
41
|
import { type ReactNode } from 'react';
|
|
42
42
|
import { type ViewProps } from 'react-native';
|
|
43
|
+
import { type ChartAccessibilityProps } from '../../primitives/chart-accessibility.js';
|
|
43
44
|
type Layer = 'svg' | 'overlay' | 'header';
|
|
44
45
|
export type ScatterChartStatus = 'loading' | 'ready';
|
|
45
46
|
export type ScatterChartDatum = Record<string, string | number | null | undefined>;
|
|
@@ -64,7 +65,7 @@ export declare function useScatterChart(): {
|
|
|
64
65
|
activePoint: ScatterChartPoint | null;
|
|
65
66
|
xDataKey: string;
|
|
66
67
|
};
|
|
67
|
-
export interface ScatterChartProps extends ViewProps {
|
|
68
|
+
export interface ScatterChartProps extends ViewProps, ChartAccessibilityProps<ScatterChartDatum> {
|
|
68
69
|
className?: string;
|
|
69
70
|
/** The rows. Each one is a point, placed by two of its values. */
|
|
70
71
|
data: ScatterChartDatum[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/scatter-chart/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,OAAO,EAWL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAA4C,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/scatter-chart/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,OAAO,EAWL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAA4C,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAgBxF,OAAO,EAA0B,KAAK,uBAAuB,EAAE,MAAM,yCAAsC,CAAC;AA+D5G,KAAK,KAAK,GAAG,KAAK,GAAG,SAAS,GAAG,QAAQ,CAAC;AAE1C,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG,OAAO,CAAC;AACrD,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI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M,WAAW,uBAAwB,SAAQ,SAAS;IACxD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8EAA8E;IAC9E,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC;AAED;;;GAGG;AACH,iBAAS,kBAAkB,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,KAAK,EAAE,EAAE,uBAAuB,sCAenF;kBAfQ,kBAAkB;;;;AAmC3B,MAAM,WAAW,uBAAwB,SAAQ,SAAS;IACxD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yDAAyD;IACzD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4EAA4E;IAC5E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wEAAwE;IACxE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,+DAA+D;IAC/D,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;;;;;;;GAQG;AACH,iBAAS,kBAAkB,CAAC,EAC1B,SAAS,EACT,KAAK,EACL,KAAK,EACL,OAAO,EACP,MAAM,EACN,MAAc,EACd,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,uBAAuB,+BAqCzB;kBA9CQ,kBAAkB;;;;AAkD3B,eAAO,MAAM,YAAY;;;;;;;;;CASvB,CAAC"}
|
|
@@ -326,10 +326,11 @@ export interface SelectionModeItemProps extends Omit<ViewProps, 'children'> {
|
|
|
326
326
|
className?: string;
|
|
327
327
|
/** This row's id. What ends up in `selected`. */
|
|
328
328
|
value: string;
|
|
329
|
-
/** What the row does
|
|
329
|
+
/** What the row does whenever selection does not own its press. */
|
|
330
330
|
onPress?: () => void;
|
|
331
331
|
/**
|
|
332
|
-
* Stop this row entering selection mode, and being picked once in it.
|
|
332
|
+
* Stop this row entering selection mode, and being picked once in it. Its
|
|
333
|
+
* ordinary `onPress` still runs, including while selection is active. For a
|
|
333
334
|
* header row, an advert, a "load more" — anything in the list that is not one
|
|
334
335
|
* of the things being chosen between.
|
|
335
336
|
*/
|
|
@@ -353,8 +354,9 @@ export interface SelectionModeItemProps extends Omit<ViewProps, 'children'> {
|
|
|
353
354
|
*
|
|
354
355
|
* The press behaviour is the whole component: off mode, a press is the row's
|
|
355
356
|
* own and a long press turns the mode on with this row picked; in it, a press
|
|
356
|
-
* picks and unpicks
|
|
357
|
-
* one gesture is exactly why the mode has to be
|
|
357
|
+
* picks and unpicks. A row excluded from selection keeps its ordinary press in
|
|
358
|
+
* both states. Two meanings for one gesture is exactly why the mode has to be
|
|
359
|
+
* visible from the header.
|
|
358
360
|
*/
|
|
359
361
|
declare function SelectionModeItem({ className, value, onPress, disabled, alwaysShowIndicator, indicator, children, ...props }: SelectionModeItemProps): import("react").JSX.Element;
|
|
360
362
|
declare namespace SelectionModeItem {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/selection-mode/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AACH,OAAO,EAUL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAA+B,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAY3E,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/selection-mode/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AACH,OAAO,EAUL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAA+B,KAAK,SAAS,EAAE,MAAM,c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B,CAAC,EAC3B,SAAS,EACT,IAAI,EACJ,OAAO,EACP,WAAmB,EACnB,QAAgB,EAChB,WAAW,EACX,cAAc,EACd,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,wBAAwB,+BA+B1B;kBAzCQ,mBAAmB;;;AA+C5B,MAAM,WAAW,uBAAuB;IACtC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0CAA0C;IAC1C,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,sCAAsC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mCAAmC;IACnC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;;;;;;;;;;OAYG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;IAChC;;;OAGG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,iBAAS,kBAAkB,CAAC,EAC1B,SAAS,EACT,IAAI,EACJ,WAAW,EACX,YAAY,EACZ,KAAgB,EAChB,aAAqB,EACrB,IAAa,EACb,QAAQ,GACT,EAAE,uBAAuB,+BA6DzB;kBAtEQ,kBAAkB;;;AAiF3B,eAAO,MAAM,aAAa;;;;;;;;CAQxB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** Add one value without duplicating it or crossing the configured cap. */
|
|
2
|
+
export declare function selectValue(selected: string[], value: string, max?: number): string[];
|
|
3
|
+
/** Remove an existing value, or add it under the same contract used by entry. */
|
|
4
|
+
export declare function toggleValue(selected: string[], value: string, max?: number): string[];
|
|
5
|
+
/** The values produced by select-all, capped by the same normalized limit. */
|
|
6
|
+
export declare function selectAllValues(values: string[], max?: number): string[];
|
|
7
|
+
/** How many selections constitute all selectable values. */
|
|
8
|
+
export declare function selectionTarget(total: number, max?: number): number;
|
|
9
|
+
/**
|
|
10
|
+
* A selection-ineligible row keeps its ordinary action in every mode. Only an
|
|
11
|
+
* active, eligible row gives its press to selection.
|
|
12
|
+
*/
|
|
13
|
+
export declare function selectionOwnsPress(active: boolean, disabled: boolean): boolean;
|
|
14
|
+
/** Execute the one action owned by a row press under the interaction contract. */
|
|
15
|
+
export declare function handleSelectionItemPress(active: boolean, disabled: boolean, toggle: () => void, action?: () => void): void;
|
|
16
|
+
/** Long press enters only from an inactive screen row that can be selected. */
|
|
17
|
+
export declare function canEnterSelection(active: boolean, disabled: boolean, sheet: boolean): boolean;
|
|
18
|
+
//# sourceMappingURL=selection-mode-contracts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selection-mode-contracts.d.ts","sourceRoot":"","sources":["../../../../../src/components/selection-mode/selection-mode-contracts.ts"],"names":[],"mappings":"AAMA,2EAA2E;AAC3E,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAGrF;AAED,iFAAiF;AACjF,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAIrF;AAED,8EAA8E;AAC9E,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAGxE;AAED,4DAA4D;AAC5D,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAEnE;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,GAAG,OAAO,CAE9E;AAED,kFAAkF;AAClF,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,OAAO,EACf,QAAQ,EAAE,OAAO,EACjB,MAAM,EAAE,MAAM,IAAI,EAClB,MAAM,CAAC,EAAE,MAAM,IAAI,GAClB,IAAI,CAGN;AAED,+EAA+E;AAC/E,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAE7F"}
|
|
@@ -158,6 +158,12 @@ export interface SignatureProps extends Omit<ViewProps, 'children'>, Omit<Signat
|
|
|
158
158
|
placeholder?: ReactNode;
|
|
159
159
|
/** Take no input. The strokes already there stay visible. */
|
|
160
160
|
disabled?: boolean;
|
|
161
|
+
/**
|
|
162
|
+
* Opens a product-provided non-drawing method, such as typing a legal name,
|
|
163
|
+
* uploading an image, or asking for assisted signing. Exposed as a screen
|
|
164
|
+
* reader action; provide the same choice as a visible control too.
|
|
165
|
+
*/
|
|
166
|
+
onRequestAlternative?: () => void;
|
|
161
167
|
/** A stroke has started. */
|
|
162
168
|
onBegin?: () => void;
|
|
163
169
|
/** A stroke has finished. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/signature/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AACH,OAAO,EASL,KAAK,SAAS,EAEf,MAAM,OAAO,CAAC;AACf,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/signature/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AACH,OAAO,EASL,KAAK,SAAS,EAEf,MAAM,OAAO,CAAC;AACf,OAAO,EAIL,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAStB,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAQ1D,OAAO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tB;AAED,8DAA8D;AAC9D,iBAAS,gBAAgB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,qBAAqB,+BAOvE;kBAPQ,gBAAgB;;;AAUzB,MAAM,WAAW,oBACf,SAAQ,IAAI,CAAC,sBAAsB,EAAE,UAAU,CAAC;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wCAAwC;IACxC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iCAAiC;IACjC,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAiDD,eAAO,MAAM,SAAS;;;0EAhCjB,oBAAoB;;;;0EAApB,oBAAoB;;;;0EAApB,oBAAoB;;;CAqCvB,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export type SignatureChangeKind = 'draw' | 'undo' | 'redo' | 'clear';
|
|
2
|
+
export interface SignatureAccessibilityAction {
|
|
3
|
+
name: string;
|
|
4
|
+
label: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* What the pad reads as when it is focused.
|
|
8
|
+
*
|
|
9
|
+
* It counts strokes and says nothing about whether the signature is finished,
|
|
10
|
+
* because the component cannot know that — one mark may be the whole signature
|
|
11
|
+
* or the first letter of it. Announcing "complete" after the first stroke tells
|
|
12
|
+
* somebody who cannot see the pad that they are done when they may not be.
|
|
13
|
+
*/
|
|
14
|
+
export declare function signatureAccessibilityValue(strokeCount: number): {
|
|
15
|
+
text: string;
|
|
16
|
+
};
|
|
17
|
+
export declare function signatureAccessibilityActions(strokeCount: number, undoneCount: number, alternative: boolean, disabled: boolean): SignatureAccessibilityAction[];
|
|
18
|
+
/**
|
|
19
|
+
* Spoken when the pad crosses between empty and not, and nowhere else.
|
|
20
|
+
*
|
|
21
|
+
* Every stroke is silent on purpose: a running commentary during drawing is
|
|
22
|
+
* noise over the one gesture the reader is concentrating on. The two crossings
|
|
23
|
+
* are the ones that cannot be felt — that the pad now holds something, and that
|
|
24
|
+
* it no longer does.
|
|
25
|
+
*/
|
|
26
|
+
export declare function signatureAnnouncement(previousCount: number, strokeCount: number, change: SignatureChangeKind): string | null;
|
|
27
|
+
//# sourceMappingURL=signature-accessibility.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signature-accessibility.d.ts","sourceRoot":"","sources":["../../../../../src/components/signature/signature-accessibility.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAErE,MAAM,WAAW,4BAA4B;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,CAAC,WAAW,EAAE,MAAM;;EAO9D;AAED,wBAAgB,6BAA6B,CAC3C,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,OAAO,EACpB,QAAQ,EAAE,OAAO,GAChB,4BAA4B,EAAE,CAiBhC;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CACnC,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,mBAAmB,GAC1B,MAAM,GAAG,IAAI,CAMf"}
|