panelui-native 0.71.0 → 0.75.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 +5 -2
- package/lib/module/components/accordion/index.js +10 -4
- package/lib/module/components/accordion/index.js.map +1 -1
- package/lib/module/components/area-chart/index.js +1 -0
- package/lib/module/components/area-chart/index.js.map +1 -1
- package/lib/module/components/avatar/avatar-group.js +64 -0
- package/lib/module/components/avatar/avatar-group.js.map +1 -0
- package/lib/module/components/avatar/index.js +84 -2
- package/lib/module/components/avatar/index.js.map +1 -1
- package/lib/module/components/breadcrumb/index.js +2 -1
- package/lib/module/components/breadcrumb/index.js.map +1 -1
- package/lib/module/components/button/index.js +7 -5
- package/lib/module/components/button/index.js.map +1 -1
- package/lib/module/components/carousel/index.js +1 -1
- package/lib/module/components/carousel/index.js.map +1 -1
- package/lib/module/components/chip/index.js +2 -2
- package/lib/module/components/chip/index.js.map +1 -1
- package/lib/module/components/code-block/index.js.map +1 -1
- package/lib/module/components/collapsible/index.js +5 -1
- package/lib/module/components/collapsible/index.js.map +1 -1
- package/lib/module/components/color-picker/color-picker-accessibility.js +12 -0
- package/lib/module/components/color-picker/color-picker-accessibility.js.map +1 -0
- package/lib/module/components/color-picker/index.js +9 -5
- package/lib/module/components/color-picker/index.js.map +1 -1
- package/lib/module/components/date-time-picker/index.js +11 -3
- package/lib/module/components/date-time-picker/index.js.map +1 -1
- package/lib/module/components/drawer/index.js +58 -13
- package/lib/module/components/drawer/index.js.map +1 -1
- package/lib/module/components/fab/index.js +7 -6
- package/lib/module/components/fab/index.js.map +1 -1
- package/lib/module/components/flow/index.js +1 -1
- package/lib/module/components/flow/index.js.map +1 -1
- package/lib/module/components/frame/index.js +2 -2
- package/lib/module/components/frame/index.js.map +1 -1
- package/lib/module/components/grid-item/index.js +2 -2
- package/lib/module/components/grid-item/index.js.map +1 -1
- package/lib/module/components/heatmap-chart/index.js +1 -0
- package/lib/module/components/heatmap-chart/index.js.map +1 -1
- package/lib/module/components/hex-chart/index.js +1 -0
- package/lib/module/components/hex-chart/index.js.map +1 -1
- package/lib/module/components/input/index.js +7 -4
- package/lib/module/components/input/index.js.map +1 -1
- package/lib/module/components/input/input-content-padding.js +6 -0
- package/lib/module/components/input/input-content-padding.js.map +1 -0
- package/lib/module/components/input-group/index.js +21 -11
- package/lib/module/components/input-group/index.js.map +1 -1
- package/lib/module/components/input-group/input-group-measurements.js +60 -0
- package/lib/module/components/input-group/input-group-measurements.js.map +1 -0
- package/lib/module/components/item/index.js +2 -2
- package/lib/module/components/item/index.js.map +1 -1
- package/lib/module/components/line-chart/index.js +1 -0
- package/lib/module/components/line-chart/index.js.map +1 -1
- package/lib/module/components/marker/index.js +2 -2
- package/lib/module/components/marker/index.js.map +1 -1
- package/lib/module/components/marquee/index.js +9 -12
- package/lib/module/components/marquee/index.js.map +1 -1
- package/lib/module/components/marquee/marquee-math.js +39 -0
- package/lib/module/components/marquee/marquee-math.js.map +1 -0
- package/lib/module/components/menu/index.js +11 -3
- package/lib/module/components/menu/index.js.map +1 -1
- package/lib/module/components/otp-input/index.js +3 -1
- package/lib/module/components/otp-input/index.js.map +1 -1
- package/lib/module/components/otp-input/otp-input-state.js +7 -0
- package/lib/module/components/otp-input/otp-input-state.js.map +1 -0
- package/lib/module/components/pagination/index.js +27 -11
- package/lib/module/components/pagination/index.js.map +1 -1
- package/lib/module/components/panelside/index.js +7 -2
- package/lib/module/components/panelside/index.js.map +1 -1
- package/lib/module/components/planner/index.js +46 -11
- package/lib/module/components/planner/index.js.map +1 -1
- package/lib/module/components/planner/planner-today.js +8 -0
- package/lib/module/components/planner/planner-today.js.map +1 -0
- package/lib/module/components/plot/index.js +113 -53
- package/lib/module/components/plot/index.js.map +1 -1
- package/lib/module/components/plot/plot-series-registry.js +32 -0
- package/lib/module/components/plot/plot-series-registry.js.map +1 -0
- package/lib/module/components/post/index.js +4 -4
- package/lib/module/components/post/index.js.map +1 -1
- package/lib/module/components/radio-group/index.js +2 -1
- package/lib/module/components/radio-group/index.js.map +1 -1
- package/lib/module/components/radio-group/radio-group-value.js +8 -0
- package/lib/module/components/radio-group/radio-group-value.js.map +1 -0
- package/lib/module/components/rating/index.js +7 -4
- package/lib/module/components/rating/index.js.map +1 -1
- package/lib/module/components/rating/rating-inputs.js +15 -0
- package/lib/module/components/rating/rating-inputs.js.map +1 -0
- package/lib/module/components/search-bar/index.js +331 -0
- package/lib/module/components/search-bar/index.js.map +1 -0
- package/lib/module/components/search-bar/search-bar-debounce.js +23 -0
- package/lib/module/components/search-bar/search-bar-debounce.js.map +1 -0
- package/lib/module/components/select/index.js +9 -1
- package/lib/module/components/select/index.js.map +1 -1
- package/lib/module/components/select/native-select-contract.js +11 -0
- package/lib/module/components/select/native-select-contract.js.map +1 -0
- package/lib/module/components/split-view/index.js +439 -0
- package/lib/module/components/split-view/index.js.map +1 -0
- package/lib/module/components/split-view/split-view-math.js +132 -0
- package/lib/module/components/split-view/split-view-math.js.map +1 -0
- package/lib/module/components/splitter/index.js +433 -0
- package/lib/module/components/splitter/index.js.map +1 -0
- package/lib/module/components/splitter/splitter-math.js +206 -0
- package/lib/module/components/splitter/splitter-math.js.map +1 -0
- package/lib/module/components/steps/index.js +16 -5
- package/lib/module/components/steps/index.js.map +1 -1
- package/lib/module/components/steps/steps-trigger.js +6 -0
- package/lib/module/components/steps/steps-trigger.js.map +1 -0
- package/lib/module/components/table/index.js +3 -4
- package/lib/module/components/table/index.js.map +1 -1
- package/lib/module/components/tag-input/index.js +15 -10
- package/lib/module/components/tag-input/index.js.map +1 -1
- package/lib/module/components/tag-input/tag-input-state.js +14 -0
- package/lib/module/components/tag-input/tag-input-state.js.map +1 -0
- package/lib/module/components/textarea/index.js +9 -4
- package/lib/module/components/textarea/index.js.map +1 -1
- package/lib/module/components/textarea/textarea-disabled.js +6 -0
- package/lib/module/components/textarea/textarea-disabled.js.map +1 -0
- package/lib/module/components/timeline/index.js +352 -47
- package/lib/module/components/timeline/index.js.map +1 -1
- package/lib/module/components/timeline/timeline-geometry.js +11 -0
- package/lib/module/components/timeline/timeline-geometry.js.map +1 -0
- package/lib/module/components/toast/index.js +18 -1
- package/lib/module/components/toast/index.js.map +1 -1
- package/lib/module/components/toast/toast-store.js +36 -4
- package/lib/module/components/toast/toast-store.js.map +1 -1
- package/lib/module/components/toggle-button/index.js +1 -1
- package/lib/module/components/toggle-button/index.js.map +1 -1
- package/lib/module/components/tour/index.js +4 -2
- package/lib/module/components/tour/index.js.map +1 -1
- package/lib/module/components/tour/tour-card-measurement.js +24 -0
- package/lib/module/components/tour/tour-card-measurement.js.map +1 -0
- package/lib/module/components/tree/index.js +13 -8
- package/lib/module/components/tree/index.js.map +1 -1
- package/lib/module/hooks/use-keyboard-avoidance.js.map +1 -1
- package/lib/module/index.js +3 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/utils/chart.js +50 -7
- package/lib/module/utils/chart.js.map +1 -1
- package/lib/typescript/src/components/accordion/index.d.ts +2 -2
- package/lib/typescript/src/components/accordion/index.d.ts.map +1 -1
- package/lib/typescript/src/components/area-chart/index.d.ts.map +1 -1
- package/lib/typescript/src/components/avatar/avatar-group.d.ts +46 -0
- package/lib/typescript/src/components/avatar/avatar-group.d.ts.map +1 -0
- package/lib/typescript/src/components/avatar/index.d.ts +23 -1
- package/lib/typescript/src/components/avatar/index.d.ts.map +1 -1
- package/lib/typescript/src/components/breadcrumb/index.d.ts.map +1 -1
- package/lib/typescript/src/components/button/index.d.ts.map +1 -1
- package/lib/typescript/src/components/code-block/index.d.ts +3 -3
- package/lib/typescript/src/components/code-block/index.d.ts.map +1 -1
- package/lib/typescript/src/components/collapsible/index.d.ts +2 -2
- package/lib/typescript/src/components/collapsible/index.d.ts.map +1 -1
- package/lib/typescript/src/components/color-picker/color-picker-accessibility.d.ts +8 -0
- package/lib/typescript/src/components/color-picker/color-picker-accessibility.d.ts.map +1 -0
- package/lib/typescript/src/components/color-picker/index.d.ts.map +1 -1
- package/lib/typescript/src/components/date-time-picker/index.d.ts.map +1 -1
- package/lib/typescript/src/components/drawer/index.d.ts.map +1 -1
- package/lib/typescript/src/components/fab/index.d.ts +4 -2
- package/lib/typescript/src/components/fab/index.d.ts.map +1 -1
- package/lib/typescript/src/components/heatmap-chart/index.d.ts.map +1 -1
- package/lib/typescript/src/components/hex-chart/index.d.ts.map +1 -1
- package/lib/typescript/src/components/input/index.d.ts.map +1 -1
- package/lib/typescript/src/components/input/input-content-padding.d.ts +2 -0
- package/lib/typescript/src/components/input/input-content-padding.d.ts.map +1 -0
- package/lib/typescript/src/components/input-group/index.d.ts.map +1 -1
- package/lib/typescript/src/components/input-group/input-group-measurements.d.ts +16 -0
- package/lib/typescript/src/components/input-group/input-group-measurements.d.ts.map +1 -0
- package/lib/typescript/src/components/line-chart/index.d.ts.map +1 -1
- package/lib/typescript/src/components/marquee/index.d.ts +1 -1
- package/lib/typescript/src/components/marquee/index.d.ts.map +1 -1
- package/lib/typescript/src/components/marquee/marquee-math.d.ts +21 -0
- package/lib/typescript/src/components/marquee/marquee-math.d.ts.map +1 -0
- package/lib/typescript/src/components/menu/index.d.ts +1 -1
- package/lib/typescript/src/components/menu/index.d.ts.map +1 -1
- package/lib/typescript/src/components/otp-input/index.d.ts.map +1 -1
- package/lib/typescript/src/components/otp-input/otp-input-state.d.ts +3 -0
- package/lib/typescript/src/components/otp-input/otp-input-state.d.ts.map +1 -0
- package/lib/typescript/src/components/pagination/index.d.ts.map +1 -1
- package/lib/typescript/src/components/panelside/index.d.ts +1 -1
- package/lib/typescript/src/components/panelside/index.d.ts.map +1 -1
- package/lib/typescript/src/components/plan/index.d.ts +2 -2
- package/lib/typescript/src/components/planner/index.d.ts.map +1 -1
- package/lib/typescript/src/components/planner/planner-today.d.ts +2 -0
- package/lib/typescript/src/components/planner/planner-today.d.ts.map +1 -0
- package/lib/typescript/src/components/plot/index.d.ts +60 -6
- package/lib/typescript/src/components/plot/index.d.ts.map +1 -1
- package/lib/typescript/src/components/plot/plot-series-registry.d.ts +8 -0
- package/lib/typescript/src/components/plot/plot-series-registry.d.ts.map +1 -0
- package/lib/typescript/src/components/radio-group/index.d.ts.map +1 -1
- package/lib/typescript/src/components/radio-group/radio-group-value.d.ts +2 -0
- package/lib/typescript/src/components/radio-group/radio-group-value.d.ts.map +1 -0
- package/lib/typescript/src/components/rating/index.d.ts.map +1 -1
- package/lib/typescript/src/components/rating/rating-inputs.d.ts +4 -0
- package/lib/typescript/src/components/rating/rating-inputs.d.ts.map +1 -0
- package/lib/typescript/src/components/search-bar/index.d.ts +216 -0
- package/lib/typescript/src/components/search-bar/index.d.ts.map +1 -0
- package/lib/typescript/src/components/search-bar/search-bar-debounce.d.ts +7 -0
- package/lib/typescript/src/components/search-bar/search-bar-debounce.d.ts.map +1 -0
- package/lib/typescript/src/components/select/index.d.ts.map +1 -1
- package/lib/typescript/src/components/select/native-select-contract.d.ts +11 -0
- package/lib/typescript/src/components/select/native-select-contract.d.ts.map +1 -0
- package/lib/typescript/src/components/split-view/index.d.ts +159 -0
- package/lib/typescript/src/components/split-view/index.d.ts.map +1 -0
- package/lib/typescript/src/components/split-view/split-view-math.d.ts +54 -0
- package/lib/typescript/src/components/split-view/split-view-math.d.ts.map +1 -0
- package/lib/typescript/src/components/splitter/index.d.ts +78 -0
- package/lib/typescript/src/components/splitter/index.d.ts.map +1 -0
- package/lib/typescript/src/components/splitter/splitter-math.d.ts +67 -0
- package/lib/typescript/src/components/splitter/splitter-math.d.ts.map +1 -0
- package/lib/typescript/src/components/steps/index.d.ts +2 -2
- package/lib/typescript/src/components/steps/index.d.ts.map +1 -1
- package/lib/typescript/src/components/steps/steps-trigger.d.ts +2 -0
- package/lib/typescript/src/components/steps/steps-trigger.d.ts.map +1 -0
- package/lib/typescript/src/components/tag-input/index.d.ts.map +1 -1
- package/lib/typescript/src/components/tag-input/tag-input-state.d.ts +12 -0
- package/lib/typescript/src/components/tag-input/tag-input-state.d.ts.map +1 -0
- package/lib/typescript/src/components/textarea/index.d.ts.map +1 -1
- package/lib/typescript/src/components/textarea/textarea-disabled.d.ts +2 -0
- package/lib/typescript/src/components/textarea/textarea-disabled.d.ts.map +1 -0
- package/lib/typescript/src/components/timeline/index.d.ts +36 -2
- package/lib/typescript/src/components/timeline/index.d.ts.map +1 -1
- package/lib/typescript/src/components/timeline/timeline-geometry.d.ts +4 -0
- package/lib/typescript/src/components/timeline/timeline-geometry.d.ts.map +1 -0
- package/lib/typescript/src/components/toast/index.d.ts.map +1 -1
- package/lib/typescript/src/components/toast/toast-store.d.ts +7 -2
- package/lib/typescript/src/components/toast/toast-store.d.ts.map +1 -1
- package/lib/typescript/src/components/tour/index.d.ts.map +1 -1
- package/lib/typescript/src/components/tour/tour-card-measurement.d.ts +14 -0
- package/lib/typescript/src/components/tour/tour-card-measurement.d.ts.map +1 -0
- package/lib/typescript/src/components/tree/index.d.ts +3 -4
- package/lib/typescript/src/components/tree/index.d.ts.map +1 -1
- package/lib/typescript/src/hooks/use-keyboard-avoidance.d.ts +2 -2
- package/lib/typescript/src/hooks/use-keyboard-avoidance.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +5 -2
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/utils/chart.d.ts +28 -3
- package/lib/typescript/src/utils/chart.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/accordion/index.tsx +17 -7
- package/src/components/area-chart/index.tsx +8 -0
- package/src/components/avatar/avatar-group.ts +78 -0
- package/src/components/avatar/index.tsx +121 -1
- package/src/components/breadcrumb/index.tsx +2 -1
- package/src/components/button/index.tsx +3 -2
- package/src/components/carousel/index.tsx +1 -1
- package/src/components/chip/index.tsx +2 -2
- package/src/components/code-block/index.tsx +3 -3
- package/src/components/collapsible/index.tsx +13 -4
- package/src/components/color-picker/color-picker-accessibility.ts +12 -0
- package/src/components/color-picker/index.tsx +30 -10
- package/src/components/date-time-picker/index.tsx +11 -3
- package/src/components/drawer/index.tsx +42 -14
- package/src/components/fab/index.tsx +21 -11
- package/src/components/flow/index.tsx +1 -1
- package/src/components/frame/index.tsx +2 -2
- package/src/components/grid-item/index.tsx +2 -2
- package/src/components/heatmap-chart/index.tsx +7 -1
- package/src/components/hex-chart/index.tsx +7 -1
- package/src/components/input/index.tsx +6 -2
- package/src/components/input/input-content-padding.ts +3 -0
- package/src/components/input-group/index.tsx +45 -12
- package/src/components/input-group/input-group-measurements.ts +98 -0
- package/src/components/item/index.tsx +2 -2
- package/src/components/line-chart/index.tsx +9 -0
- package/src/components/marker/index.tsx +2 -2
- package/src/components/marquee/index.tsx +14 -12
- package/src/components/marquee/marquee-math.ts +37 -0
- package/src/components/menu/index.tsx +11 -3
- package/src/components/otp-input/index.tsx +3 -1
- package/src/components/otp-input/otp-input-state.ts +7 -0
- package/src/components/pagination/index.tsx +26 -13
- package/src/components/panelside/index.tsx +7 -2
- package/src/components/plan/index.tsx +2 -2
- package/src/components/planner/index.tsx +44 -11
- package/src/components/planner/planner-today.ts +5 -0
- package/src/components/plot/index.tsx +199 -51
- package/src/components/plot/plot-series-registry.ts +41 -0
- package/src/components/post/index.tsx +4 -4
- package/src/components/radio-group/index.tsx +4 -1
- package/src/components/radio-group/radio-group-value.ts +9 -0
- package/src/components/rating/index.tsx +11 -4
- package/src/components/rating/rating-inputs.ts +19 -0
- package/src/components/search-bar/index.tsx +441 -0
- package/src/components/search-bar/search-bar-debounce.ts +35 -0
- package/src/components/select/index.tsx +10 -1
- package/src/components/select/native-select-contract.ts +12 -0
- package/src/components/split-view/index.tsx +565 -0
- package/src/components/split-view/split-view-math.ts +146 -0
- package/src/components/splitter/index.tsx +589 -0
- package/src/components/splitter/splitter-math.ts +244 -0
- package/src/components/steps/index.tsx +35 -9
- package/src/components/steps/steps-trigger.ts +6 -0
- package/src/components/table/index.tsx +2 -2
- package/src/components/tag-input/index.tsx +13 -11
- package/src/components/tag-input/tag-input-state.ts +18 -0
- package/src/components/textarea/index.tsx +8 -4
- package/src/components/textarea/textarea-disabled.ts +6 -0
- package/src/components/timeline/index.tsx +405 -46
- package/src/components/timeline/timeline-geometry.ts +9 -0
- package/src/components/toast/index.tsx +26 -1
- package/src/components/toast/toast-store.ts +43 -8
- package/src/components/toggle-button/index.tsx +1 -1
- package/src/components/tour/index.tsx +11 -3
- package/src/components/tour/tour-card-measurement.ts +29 -0
- package/src/components/tree/index.tsx +17 -12
- package/src/hooks/use-keyboard-avoidance.ts +7 -2
- package/src/index.ts +19 -0
- package/src/utils/chart.ts +66 -7
|
@@ -122,7 +122,7 @@ export interface PlotGeometry {
|
|
|
122
122
|
/** Every mark that registered itself, as `[dataKey, colour]`. */
|
|
123
123
|
series: [string, string][];
|
|
124
124
|
registerSeries: (key: string, color: string) => void;
|
|
125
|
-
unregisterSeries: (key: string) => void;
|
|
125
|
+
unregisterSeries: (key: string, color?: string) => void;
|
|
126
126
|
/** Row under the cursor, or `-1`. On the UI thread. */
|
|
127
127
|
activeIndex: SharedValue<number>;
|
|
128
128
|
/** The same index on the JS thread, for anything that has to re-render. */
|
|
@@ -172,6 +172,17 @@ export interface PlotProps extends ViewProps {
|
|
|
172
172
|
* arrives.
|
|
173
173
|
*/
|
|
174
174
|
yDomain?: [PlotBound, PlotBound];
|
|
175
|
+
/**
|
|
176
|
+
* Round the derived ends of the y-domain out to whole numbers.
|
|
177
|
+
*
|
|
178
|
+
* Left off, an axis ends a tenth of the span past the largest value, so it
|
|
179
|
+
* gets labelled 34,650 — true, and not a number anybody was looking for. On,
|
|
180
|
+
* the ends move out to a step of 1, 2 or 5 times a power of ten, and the
|
|
181
|
+
* labels become values a reader can measure against.
|
|
182
|
+
*
|
|
183
|
+
* It only ever widens the axis, and a pinned end is left alone.
|
|
184
|
+
*/
|
|
185
|
+
nice?: boolean;
|
|
175
186
|
/**
|
|
176
187
|
* How an index becomes an x. Derived from the marks when left out: a plot
|
|
177
188
|
* with bars in it is banded, and anything else is on points.
|
|
@@ -257,6 +268,18 @@ export interface PlotBarsProps extends PlotSeriesProps {
|
|
|
257
268
|
/** Rounds the end the bar grows towards, in points. */
|
|
258
269
|
radius?: number;
|
|
259
270
|
opacity?: number;
|
|
271
|
+
/**
|
|
272
|
+
* The value the columns grow from. Zero by default, and zero is nearly always
|
|
273
|
+
* right — a bar is a length, and a length has to start where the quantity
|
|
274
|
+
* does.
|
|
275
|
+
*
|
|
276
|
+
* Set it for the case where the reader is being shown movement rather than
|
|
277
|
+
* size: temperatures against a seasonal average, a score against a pass mark.
|
|
278
|
+
* Columns then run up and down from that line instead of all standing on the
|
|
279
|
+
* floor. It is clamped into the axis, so a baseline the domain does not cover
|
|
280
|
+
* falls back to the nearer edge.
|
|
281
|
+
*/
|
|
282
|
+
baseline?: number;
|
|
260
283
|
}
|
|
261
284
|
/**
|
|
262
285
|
* A series as columns.
|
|
@@ -267,7 +290,7 @@ export interface PlotBarsProps extends PlotSeriesProps {
|
|
|
267
290
|
* A bar has width, so its presence puts the whole plot on a band scale unless
|
|
268
291
|
* the root was told otherwise — see `xScale`.
|
|
269
292
|
*/
|
|
270
|
-
declare function PlotBars({ dataKey, color, colorIndex, gap, radius, opacity, }: PlotBarsProps): import("react").JSX.Element | null;
|
|
293
|
+
declare function PlotBars({ dataKey, color, colorIndex, gap, radius, opacity, baseline, }: PlotBarsProps): import("react").JSX.Element | null;
|
|
271
294
|
declare namespace PlotBars {
|
|
272
295
|
var displayName: string;
|
|
273
296
|
var layer: Layer;
|
|
@@ -318,21 +341,52 @@ declare namespace PlotOverlay {
|
|
|
318
341
|
var layer: Layer;
|
|
319
342
|
}
|
|
320
343
|
export interface PlotRuleProps {
|
|
321
|
-
/**
|
|
322
|
-
|
|
344
|
+
/**
|
|
345
|
+
* Where to draw it, in the data's own units. Omit it and pass `x` instead for
|
|
346
|
+
* a rule down the plot rather than across it.
|
|
347
|
+
*/
|
|
348
|
+
y?: number;
|
|
349
|
+
/**
|
|
350
|
+
* A row to draw a vertical rule at, by index — the release the numbers are
|
|
351
|
+
* read against, the day a change landed.
|
|
352
|
+
*
|
|
353
|
+
* The x axis here carries positions rather than quantities, so this is which
|
|
354
|
+
* row rather than what value. Exactly one of `y` and `x` is drawn; `y` wins
|
|
355
|
+
* if both are given.
|
|
356
|
+
*/
|
|
357
|
+
x?: number;
|
|
323
358
|
/** A name for what the line means. Nothing is drawn without one. */
|
|
324
359
|
label?: string;
|
|
360
|
+
/** Overrides the line *and* its caption, so the two cannot drift apart. */
|
|
325
361
|
color?: string;
|
|
362
|
+
/** Thickness in points. */
|
|
363
|
+
strokeWidth?: number;
|
|
364
|
+
/**
|
|
365
|
+
* Break the line into dashes, for a rule that should read as an annotation
|
|
366
|
+
* rather than as a series the chart is drawing.
|
|
367
|
+
*/
|
|
368
|
+
dashed?: boolean;
|
|
369
|
+
/** Fades the line and its caption together. */
|
|
370
|
+
opacity?: number;
|
|
371
|
+
/** Which end of the rule the caption sits at. */
|
|
372
|
+
labelPlacement?: 'start' | 'end';
|
|
373
|
+
labelClassName?: string;
|
|
326
374
|
className?: string;
|
|
327
375
|
}
|
|
328
376
|
/**
|
|
329
377
|
* A reference line across the plot — a target, a limit, an average.
|
|
330
378
|
*
|
|
331
379
|
* A view rather than an SVG line, so its label is real text and follows the
|
|
332
|
-
* theme. Its
|
|
380
|
+
* theme. Its thickness is a border and its position is a transform, so it costs
|
|
333
381
|
* no more than the SVG line would while gaining a legible caption.
|
|
382
|
+
*
|
|
383
|
+
* It is drawn at full strength in the foreground colour, and it is meant to be.
|
|
384
|
+
* A reference line is the number the series is being judged against — a target
|
|
385
|
+
* nobody can read is a target the chart is not actually stating — so what keeps
|
|
386
|
+
* it from being mistaken for a series is that it is neutral and optionally
|
|
387
|
+
* dashed, not that it is faint.
|
|
334
388
|
*/
|
|
335
|
-
declare function PlotRule({ y, label, color, className }: PlotRuleProps): import("react").JSX.Element | null;
|
|
389
|
+
declare function PlotRule({ y, x, label, color, strokeWidth, dashed, opacity, labelPlacement, labelClassName, className, }: PlotRuleProps): import("react").JSX.Element | null;
|
|
336
390
|
declare namespace PlotRule {
|
|
337
391
|
var displayName: string;
|
|
338
392
|
var layer: Layer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/plot/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8DG;AACH,OAAO,EAYL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAA4C,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAExF,OAAiB,EAQf,KAAK,WAAW,EACjB,MAAM,yBAAyB,CAAC;AAYjC,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/plot/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8DG;AACH,OAAO,EAYL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAA4C,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAExF,OAAiB,EAQf,KAAK,WAAW,EACjB,MAAM,yBAAyB,CAAC;AAYjC,OAAO,EAWL,KAAK,IAAI,IAAI,OAAO,EACrB,MAAM,sBAAmB,CAAC;AAgB3B,OAAO,EACL,QAAQ,EACR,MAAM,EACN,OAAO,EACP,aAAa,EACb,QAAQ,EACR,OAAO,EACP,GAAG,EACH,GAAG,EACH,GAAG,GACJ,MAAM,sBAAmB,CAAC;AAC3B,YAAY,EAAE,IAAI,IAAI,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAmB,CAAC;AAwBrE;;;;GAIG;AACH,KAAK,KAAK,GAAG,KAAK,GAAG,SAAS,GAAG,QAAQ,CAAC;AAE1C,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,OAAO,CAAC;AAC7C,MAAM,MAAM,SAAS,GAAG,UAAU,GAAG,QAAQ,CAAC;AAC9C,MAAM,MAAM,SAA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AAM,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,sCAsBnE;kBAtBQ,UAAU;;;;AA0BnB,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;CAef,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface PlotSeriesRegistration {
|
|
2
|
+
key: string;
|
|
3
|
+
colors: readonly string[];
|
|
4
|
+
}
|
|
5
|
+
export declare function registerPlotSeries(current: readonly PlotSeriesRegistration[], key: string, color: string): PlotSeriesRegistration[];
|
|
6
|
+
export declare function unregisterPlotSeries(current: readonly PlotSeriesRegistration[], key: string, color?: string): PlotSeriesRegistration[];
|
|
7
|
+
export declare function visiblePlotSeries(registrations: readonly PlotSeriesRegistration[]): [string, string][];
|
|
8
|
+
//# sourceMappingURL=plot-series-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plot-series-registry.d.ts","sourceRoot":"","sources":["../../../../../src/components/plot/plot-series-registry.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,sBAAsB;IACrC,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;CAC3B;AAED,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,SAAS,sBAAsB,EAAE,EAC1C,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,GACZ,sBAAsB,EAAE,CAO1B;AAED,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,SAAS,sBAAsB,EAAE,EAC1C,GAAG,EAAE,MAAM,EACX,KAAK,CAAC,EAAE,MAAM,GACb,sBAAsB,EAAE,CAY1B;AAED,wBAAgB,iBAAiB,CAC/B,aAAa,EAAE,SAAS,sBAAsB,EAAE,GAC/C,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAEpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/radio-group/index.tsx"],"names":[],"mappings":"AAA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-0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"radio-group-value.d.ts","sourceRoot":"","sources":["../../../../../src/components/radio-group/radio-group-value.ts"],"names":[],"mappings":"AAAA,wBAAgB,uBAAuB,CACrC,YAAY,EAAE,MAAM,GAAG,SAAS,EAChC,SAAS,EAAE,MAAM,EACjB,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,QAKvC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/rating/index.tsx"],"names":[],"mappings":"AA0BA,OAAO,EACL,IAAI,EAGL,MAAM,cAAc,CAAC;AAStB,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/rating/index.tsx"],"names":[],"mappings":"AA0BA,OAAO,EACL,IAAI,EAGL,MAAM,cAAc,CAAC;AAStB,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAe1D,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CAqBlB,CAAC;AAEH,KAAK,kBAAkB,GAAG,YAAY,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,MAAM,MAAM,UAAU,GAAG,WAAW,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC,CAAC;AACjE,MAAM,MAAM,WAAW,GACnB,SAAS,GACT,SAAS,GACT,SAAS,GACT,aAAa,GACb,MAAM,GACN,YAAY,CAAC;AA0BjB,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,kBAAkB,EAAE,UAAU,CAAC;IACvE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iFAAiF;IACjF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wCAAwC;IACxC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,sBAAsB;IACtB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iEAAiE;IACjE,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,iFAAiF;IACjF,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,6EAA6E;IAC7E,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,qDAAqD;IACrD,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,qEAAqE;IACrE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qEAAqE;IACrE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,iEAAiE;IACjE,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACxC;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,yCAAyC;IACzC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,0CAA0C;IAC1C,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AA0CD,eAAO,MAAM,MAAM,8FAgOlB,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare function normalizeRatingMax(max: number | undefined): number;
|
|
2
|
+
export declare function normalizeRatingPrecision(precision: number | undefined): number;
|
|
3
|
+
export declare function normalizeRatingValue(value: number | undefined, max: number): number;
|
|
4
|
+
//# sourceMappingURL=rating-inputs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rating-inputs.d.ts","sourceRoot":"","sources":["../../../../../src/components/rating/rating-inputs.ts"],"names":[],"mappings":"AAGA,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAIlE;AAED,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAI9E;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAGnF"}
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SearchBar — a text field for querying a list, with the two controls a search
|
|
3
|
+
* needs and an ordinary field does not.
|
|
4
|
+
*
|
|
5
|
+
* ```tsx
|
|
6
|
+
* <SearchBar placeholder="Search orders" onSubmit={run} />
|
|
7
|
+
* <SearchBar variant="filled" shape="pill" cancel="focus" />
|
|
8
|
+
* <SearchBar debounce={250} onDebouncedChange={filter} loading={pending} />
|
|
9
|
+
* ```
|
|
10
|
+
*
|
|
11
|
+
* ## The clear button, and why it is not the platform's
|
|
12
|
+
*
|
|
13
|
+
* A ✕ appears inside the field as soon as there is something to clear, and
|
|
14
|
+
* takes it back to empty without dismissing the keyboard — clearing a query is
|
|
15
|
+
* the start of the next one, not the end of the search. It is drawn here
|
|
16
|
+
* rather than left to `clearButtonMode`, which exists on iOS only, cannot be
|
|
17
|
+
* labelled for a screen reader and cannot be swapped for a spinner while
|
|
18
|
+
* results are in flight.
|
|
19
|
+
*
|
|
20
|
+
* The glyph is 24 points and its touch box is 48, made up with slop rather
|
|
21
|
+
* than with size. A 48-point circle inside a 40-point field either overflows
|
|
22
|
+
* it or forces every search bar in an app to be as tall as the largest one.
|
|
23
|
+
*
|
|
24
|
+
* ## Cancel is a row, not a decoration
|
|
25
|
+
*
|
|
26
|
+
* `cancel="focus"` puts a Cancel button beside the field and slides it in
|
|
27
|
+
* while the field is being edited, which is the platform's own answer to
|
|
28
|
+
* "how do I get out of this search". It is a sibling of the field rather than
|
|
29
|
+
* something inside it, because it acts on the search as a whole: it empties
|
|
30
|
+
* the query, drops focus and calls `onCancel`, and a control that ends the
|
|
31
|
+
* thing it sits inside reads as part of the query it is about to discard.
|
|
32
|
+
*
|
|
33
|
+
* Its width is measured once and animated on the UI thread. The button is
|
|
34
|
+
* always mounted when `cancel` is not `never`, so the measurement is already
|
|
35
|
+
* there the first time the field is touched and the first slide is as smooth
|
|
36
|
+
* as the tenth.
|
|
37
|
+
*
|
|
38
|
+
* ## Debouncing belongs to the caller's search, not to the field
|
|
39
|
+
*
|
|
40
|
+
* `onChangeText` always fires on every keystroke — a controlled field that
|
|
41
|
+
* lags its own input is unusable. `debounce` is about the *query*: it holds
|
|
42
|
+
* `onDebouncedChange` until typing pauses, so a network search runs once per
|
|
43
|
+
* pause instead of once per letter. Submitting flushes it immediately, since
|
|
44
|
+
* a return key is somebody saying they are done waiting.
|
|
45
|
+
*/
|
|
46
|
+
import { type ReactNode } from 'react';
|
|
47
|
+
import { type TextInput } from 'react-native';
|
|
48
|
+
import { type VariantProps } from 'tailwind-variants';
|
|
49
|
+
import { type InputProps } from '../input/index.js';
|
|
50
|
+
declare const searchBarVariants: import("tailwind-variants").TVReturnType<{
|
|
51
|
+
size: {
|
|
52
|
+
sm: {
|
|
53
|
+
cancelLabel: string;
|
|
54
|
+
clear: string;
|
|
55
|
+
};
|
|
56
|
+
md: {
|
|
57
|
+
cancelLabel: string;
|
|
58
|
+
clear: string;
|
|
59
|
+
};
|
|
60
|
+
lg: {
|
|
61
|
+
cancelLabel: string;
|
|
62
|
+
clear: string;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* The field's corner. `pill` is the shape a search field takes when it is
|
|
67
|
+
* chrome — sitting above a list, in a header — and `rounded` the one it
|
|
68
|
+
* takes inside a form beside other fields.
|
|
69
|
+
*/
|
|
70
|
+
shape: {
|
|
71
|
+
rounded: {
|
|
72
|
+
field: string;
|
|
73
|
+
};
|
|
74
|
+
pill: {
|
|
75
|
+
field: string;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
}, {
|
|
79
|
+
row: string;
|
|
80
|
+
field: string;
|
|
81
|
+
cancelClip: string;
|
|
82
|
+
cancelButton: string;
|
|
83
|
+
cancelLabel: string;
|
|
84
|
+
clear: string;
|
|
85
|
+
}, undefined, {
|
|
86
|
+
size: {
|
|
87
|
+
sm: {
|
|
88
|
+
cancelLabel: string;
|
|
89
|
+
clear: string;
|
|
90
|
+
};
|
|
91
|
+
md: {
|
|
92
|
+
cancelLabel: string;
|
|
93
|
+
clear: string;
|
|
94
|
+
};
|
|
95
|
+
lg: {
|
|
96
|
+
cancelLabel: string;
|
|
97
|
+
clear: string;
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
/**
|
|
101
|
+
* The field's corner. `pill` is the shape a search field takes when it is
|
|
102
|
+
* chrome — sitting above a list, in a header — and `rounded` the one it
|
|
103
|
+
* takes inside a form beside other fields.
|
|
104
|
+
*/
|
|
105
|
+
shape: {
|
|
106
|
+
rounded: {
|
|
107
|
+
field: string;
|
|
108
|
+
};
|
|
109
|
+
pill: {
|
|
110
|
+
field: string;
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
}, {
|
|
114
|
+
row: string;
|
|
115
|
+
field: string;
|
|
116
|
+
cancelClip: string;
|
|
117
|
+
cancelButton: string;
|
|
118
|
+
cancelLabel: string;
|
|
119
|
+
clear: string;
|
|
120
|
+
}, import("tailwind-variants").TVReturnType<{
|
|
121
|
+
size: {
|
|
122
|
+
sm: {
|
|
123
|
+
cancelLabel: string;
|
|
124
|
+
clear: string;
|
|
125
|
+
};
|
|
126
|
+
md: {
|
|
127
|
+
cancelLabel: string;
|
|
128
|
+
clear: string;
|
|
129
|
+
};
|
|
130
|
+
lg: {
|
|
131
|
+
cancelLabel: string;
|
|
132
|
+
clear: string;
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
/**
|
|
136
|
+
* The field's corner. `pill` is the shape a search field takes when it is
|
|
137
|
+
* chrome — sitting above a list, in a header — and `rounded` the one it
|
|
138
|
+
* takes inside a form beside other fields.
|
|
139
|
+
*/
|
|
140
|
+
shape: {
|
|
141
|
+
rounded: {
|
|
142
|
+
field: string;
|
|
143
|
+
};
|
|
144
|
+
pill: {
|
|
145
|
+
field: string;
|
|
146
|
+
};
|
|
147
|
+
};
|
|
148
|
+
}, {
|
|
149
|
+
row: string;
|
|
150
|
+
field: string;
|
|
151
|
+
cancelClip: string;
|
|
152
|
+
cancelButton: string;
|
|
153
|
+
cancelLabel: string;
|
|
154
|
+
clear: string;
|
|
155
|
+
}, undefined, unknown, unknown, undefined>>;
|
|
156
|
+
type SearchBarVariantProps = VariantProps<typeof searchBarVariants>;
|
|
157
|
+
/**
|
|
158
|
+
* What SearchBar takes from Input, minus everything it owns itself. The form
|
|
159
|
+
* furniture is dropped along with it: a label and an error line stack above
|
|
160
|
+
* and below the field, and Cancel sits beside the whole stack rather than
|
|
161
|
+
* beside the field it belongs to. Use `Field` for a search that is one answer
|
|
162
|
+
* in a form.
|
|
163
|
+
*/
|
|
164
|
+
type InheritedInputProps = Omit<InputProps, 'defaultValue' | 'description' | 'endContent' | 'errorMessage' | 'interactiveContent' | 'isRequired' | 'label' | 'multiline' | 'onChangeText' | 'size' | 'startContent' | 'value'>;
|
|
165
|
+
export interface SearchBarProps extends InheritedInputProps, SearchBarVariantProps {
|
|
166
|
+
/**
|
|
167
|
+
* The field's background, from `Input`. `outline` draws its own edge, for a
|
|
168
|
+
* search bar sitting on the page; `filled` drops it, for one inside a card
|
|
169
|
+
* or a header where a second border reads as a seam. Defaults to `outline`.
|
|
170
|
+
*/
|
|
171
|
+
variant?: InputProps['variant'];
|
|
172
|
+
/** The query, when the caller holds it. Leave unset to let the field keep it. */
|
|
173
|
+
value?: string;
|
|
174
|
+
/** Starting query for an uncontrolled field. Ignored once `value` is passed. */
|
|
175
|
+
defaultValue?: string;
|
|
176
|
+
/** Fires on every keystroke. For a search that costs something, see `debounce`. */
|
|
177
|
+
onChangeText?: (value: string) => void;
|
|
178
|
+
/** The return key, which is labelled Search. Flushes `onDebouncedChange` first. */
|
|
179
|
+
onSubmit?: (value: string) => void;
|
|
180
|
+
/**
|
|
181
|
+
* How long typing has to pause before `onDebouncedChange` runs, in
|
|
182
|
+
* milliseconds. `0` runs it on every keystroke, which is only right for a
|
|
183
|
+
* filter over a list already in memory.
|
|
184
|
+
*/
|
|
185
|
+
debounce?: number;
|
|
186
|
+
/** The query, once typing has paused for `debounce` milliseconds. */
|
|
187
|
+
onDebouncedChange?: (value: string) => void;
|
|
188
|
+
/** Fires after the ✕ empties the field. The field keeps focus. */
|
|
189
|
+
onClear?: () => void;
|
|
190
|
+
/** Fires after Cancel empties the field and drops focus. */
|
|
191
|
+
onCancel?: () => void;
|
|
192
|
+
/** Whether the ✕ appears once there is a query. */
|
|
193
|
+
isClearable?: boolean;
|
|
194
|
+
/**
|
|
195
|
+
* When the Cancel button is beside the field. `focus` slides it in while the
|
|
196
|
+
* field is being edited and away again when it is not, which is what a
|
|
197
|
+
* search bar above a list wants. `always` keeps it out, for a screen that is
|
|
198
|
+
* nothing but the search.
|
|
199
|
+
*/
|
|
200
|
+
cancel?: 'never' | 'focus' | 'always';
|
|
201
|
+
/** The Cancel button's word. */
|
|
202
|
+
cancelLabel?: string;
|
|
203
|
+
/** How the ✕ announces itself. */
|
|
204
|
+
clearLabel?: string;
|
|
205
|
+
/**
|
|
206
|
+
* Results are on their way. A spinner takes the ✕'s place, because the two
|
|
207
|
+
* would otherwise sit on top of one another at exactly the moment a query is
|
|
208
|
+
* both non-empty and running.
|
|
209
|
+
*/
|
|
210
|
+
loading?: boolean;
|
|
211
|
+
/** The leading glyph, for a search over something with a symbol of its own. */
|
|
212
|
+
icon?: ReactNode;
|
|
213
|
+
}
|
|
214
|
+
export declare const SearchBar: import("react").ForwardRefExoticComponent<SearchBarProps & import("react").RefAttributes<TextInput>>;
|
|
215
|
+
export {};
|
|
216
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/search-bar/index.tsx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BAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,kEAAkE;IAClE,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,mDAAmD;IACnD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,QAAQ,CAAC;IACtC,gCAAgC;IAChC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kCAAkC;IAClC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,+EAA+E;IAC/E,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB;AAED,eAAO,MAAM,SAAS,sGAwOrB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export interface SearchBarDebounceTimer {
|
|
2
|
+
current: ReturnType<typeof setTimeout> | null;
|
|
3
|
+
}
|
|
4
|
+
export declare function cancelSearchBarDebounce(timer: SearchBarDebounceTimer): void;
|
|
5
|
+
export declare function scheduleSearchBarDebounce(timer: SearchBarDebounceTimer, callback: ((value: string) => void) | undefined, value: string, delay: number): void;
|
|
6
|
+
export declare function flushSearchBarDebounce(timer: SearchBarDebounceTimer, callback: ((value: string) => void) | undefined, value: string): void;
|
|
7
|
+
//# sourceMappingURL=search-bar-debounce.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search-bar-debounce.d.ts","sourceRoot":"","sources":["../../../../../src/components/search-bar/search-bar-debounce.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,UAAU,CAAC,OAAO,UAAU,CAAC,GAAG,IAAI,CAAC;CAC/C;AAED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,sBAAsB,GAAG,IAAI,CAI3E;AAED,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,sBAAsB,EAC7B,QAAQ,EAAE,CAAC,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,SAAS,EAC/C,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,GACZ,IAAI,CAUN;AAED,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,sBAAsB,EAC7B,QAAQ,EAAE,CAAC,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,SAAS,EAC/C,KAAK,EAAE,MAAM,GACZ,IAAI,CAGN"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/select/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,OAAO,EAWL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/select/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,OAAO,EAWL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AA+Df,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,CAAC;AAShE,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,2EAA2E;AAC3E,iBAAS,UAAU,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,eAAe,+BAgC9D;kBAhCQ,UAAU;;;AAkCnB,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2CAA2C;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB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ClB,iBAA4B,EAC5B,YAA2B,EAC3B,MAAM,EACN,gBAAyB,EACzB,QAAQ,GACT,EAAE,WAAW,+BAgVb;AAKD,eAAO,MAAM,MAAM;;;CAGjB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
interface NativeSelectOption {
|
|
2
|
+
disabled?: boolean;
|
|
3
|
+
}
|
|
4
|
+
/**
|
|
5
|
+
* The portable @expo/ui picker can disable the whole control, but not one
|
|
6
|
+
* option. Keep the styled Select when an item needs that distinction rather
|
|
7
|
+
* than silently turning a disabled choice back into a selectable one.
|
|
8
|
+
*/
|
|
9
|
+
export declare function nativeSelectSupportsOptions(options: NativeSelectOption[]): boolean;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=native-select-contract.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"native-select-contract.d.ts","sourceRoot":"","sources":["../../../../../src/components/select/native-select-contract.ts"],"names":[],"mappings":"AAAA,UAAU,kBAAkB;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;GAIG;AACH,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,kBAAkB,EAAE,GAAG,OAAO,CAElF"}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SplitView — two stacked panes whose seam settles on one of a few named
|
|
3
|
+
* heights rather than wherever the finger stopped.
|
|
4
|
+
*
|
|
5
|
+
* ```tsx
|
|
6
|
+
* <SplitView className="h-96" snapPoints={[0.25, 0.6]} minHeight={80}>
|
|
7
|
+
* <SplitView.Top>{map}</SplitView.Top>
|
|
8
|
+
* <SplitView.DragArea>
|
|
9
|
+
* <SplitView.Handle />
|
|
10
|
+
* </SplitView.DragArea>
|
|
11
|
+
* <SplitView.Bottom>{list}</SplitView.Bottom>
|
|
12
|
+
* </SplitView>
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* The snapping is the difference between this and a free-resize split. A layout
|
|
16
|
+
* with a few right answers — a map over a list, a preview over an editor — is
|
|
17
|
+
* better served by a control that lands on one of them than by one that lets
|
|
18
|
+
* the reader stop three points short of it and live with the result.
|
|
19
|
+
*
|
|
20
|
+
* Snap points are ratios of the room the two panes share, so they mean the same
|
|
21
|
+
* thing on any screen and a rotation costs no re-measuring. That room is the
|
|
22
|
+
* container minus the drag area, which takes real layout height: half means
|
|
23
|
+
* half of what is actually divisible rather than half of a number the seam then
|
|
24
|
+
* eats into.
|
|
25
|
+
*
|
|
26
|
+
* The split view has no height of its own — give it one, or put it in something
|
|
27
|
+
* that has one, or it collapses and takes its panes with it.
|
|
28
|
+
*
|
|
29
|
+
* Dragging runs on the UI thread. `onSnap` fires once the pane has settled
|
|
30
|
+
* rather than on every frame, because a layout that round-trips through React
|
|
31
|
+
* sixty times a second is the one thing that makes this feel slow.
|
|
32
|
+
*/
|
|
33
|
+
import { type ReactNode } from 'react';
|
|
34
|
+
import { type ViewProps } from 'react-native';
|
|
35
|
+
import { type SharedValue } from 'react-native-reanimated';
|
|
36
|
+
interface SplitViewContextValue {
|
|
37
|
+
/** The top pane's height in points. Written by drags, read by both panes. */
|
|
38
|
+
topHeight: SharedValue<number>;
|
|
39
|
+
/** True while a finger is on the seam. */
|
|
40
|
+
dragging: SharedValue<boolean>;
|
|
41
|
+
/** Snap heights in points, in order. Empty until the container is measured. */
|
|
42
|
+
points: number[];
|
|
43
|
+
minPx: number;
|
|
44
|
+
maxPx: number;
|
|
45
|
+
room: number;
|
|
46
|
+
measured: boolean;
|
|
47
|
+
disabled: boolean;
|
|
48
|
+
snapIndex: number;
|
|
49
|
+
animate: boolean;
|
|
50
|
+
snapTo: (index: number) => void;
|
|
51
|
+
measureDragArea: (height: number) => void;
|
|
52
|
+
dragAreaHeight: number;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Reads the live layout from inside a split view, and moves the seam.
|
|
56
|
+
*
|
|
57
|
+
* `topHeight` is a shared value on the UI thread — read it in a worklet, not in
|
|
58
|
+
* render, where it is only ever the number the last commit happened to see.
|
|
59
|
+
*/
|
|
60
|
+
export declare function useSplitView(): SplitViewContextValue;
|
|
61
|
+
export interface SplitViewProps extends ViewProps {
|
|
62
|
+
className?: string;
|
|
63
|
+
/**
|
|
64
|
+
* Heights the seam settles on. A number at or below `1` is a fraction of the
|
|
65
|
+
* room the panes share; anything larger is points. Defaults to
|
|
66
|
+
* `[0.2, 0.5, 0.8]`.
|
|
67
|
+
*/
|
|
68
|
+
snapPoints?: readonly number[];
|
|
69
|
+
/** Smallest the top pane may get, as a fraction or in points. Defaults to `100`. */
|
|
70
|
+
minHeight?: number;
|
|
71
|
+
/**
|
|
72
|
+
* Largest the top pane may get, as a fraction or in points. A negative number
|
|
73
|
+
* is measured back from the bottom — `-80` leaves eighty points for the other
|
|
74
|
+
* pane. Defaults to all the room there is.
|
|
75
|
+
*/
|
|
76
|
+
maxHeight?: number;
|
|
77
|
+
/** Which snap point the seam starts at when uncontrolled. Defaults to `1`. */
|
|
78
|
+
defaultSnapIndex?: number;
|
|
79
|
+
/** Controlled snap index. Pair it with `onSnapIndexChange`. */
|
|
80
|
+
snapIndex?: number;
|
|
81
|
+
/** Called with the index the seam settled on. */
|
|
82
|
+
onSnapIndexChange?: (index: number) => void;
|
|
83
|
+
/** Called once the pane has settled, with the index and its height in points. */
|
|
84
|
+
onSnap?: (index: number, topHeight: number) => void;
|
|
85
|
+
/** Freezes the seam. The panes keep the heights they have. */
|
|
86
|
+
disabled?: boolean;
|
|
87
|
+
/** Springs to the starting snap point on mount instead of opening at it. */
|
|
88
|
+
animateOnMount?: boolean;
|
|
89
|
+
children?: ReactNode;
|
|
90
|
+
}
|
|
91
|
+
declare function SplitViewRoot({ className, snapPoints, minHeight, maxHeight, defaultSnapIndex, snapIndex: snapIndexProp, onSnapIndexChange, onSnap, disabled, animateOnMount, children, onLayout, ...props }: SplitViewProps): import("react").JSX.Element;
|
|
92
|
+
declare namespace SplitViewRoot {
|
|
93
|
+
var displayName: string;
|
|
94
|
+
}
|
|
95
|
+
export interface SplitViewPaneProps extends ViewProps {
|
|
96
|
+
className?: string;
|
|
97
|
+
children?: ReactNode;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* The upper pane.
|
|
101
|
+
*
|
|
102
|
+
* It clips what is inside it, so a pane dragged short hides its content rather
|
|
103
|
+
* than pushing it through the seam. Content that outgrows it is the caller's to
|
|
104
|
+
* scroll — put a `ScrollView` in here and it behaves like any other scroller in
|
|
105
|
+
* a box whose height changes.
|
|
106
|
+
*/
|
|
107
|
+
declare function SplitViewTop({ className, children, style, ...props }: SplitViewPaneProps): import("react").JSX.Element;
|
|
108
|
+
declare namespace SplitViewTop {
|
|
109
|
+
var displayName: string;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* The lower pane. It takes exactly the room the upper one gave up, with no
|
|
113
|
+
* second measurement — which is what keeps the two adding to the container on
|
|
114
|
+
* every frame of a drag rather than only at rest.
|
|
115
|
+
*/
|
|
116
|
+
declare function SplitViewBottom({ className, children, ...props }: SplitViewPaneProps): import("react").JSX.Element;
|
|
117
|
+
declare namespace SplitViewBottom {
|
|
118
|
+
var displayName: string;
|
|
119
|
+
}
|
|
120
|
+
export interface SplitViewDragAreaProps extends ViewProps {
|
|
121
|
+
className?: string;
|
|
122
|
+
/** What a screen reader calls the seam. Defaults to "Resize panes". */
|
|
123
|
+
accessibilityLabel?: string;
|
|
124
|
+
children?: ReactNode;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* The seam, and the target for the drag.
|
|
128
|
+
*
|
|
129
|
+
* It takes real layout height rather than floating over the panes, because that
|
|
130
|
+
* height is what the snap points are fractions of: a finger-sized target that
|
|
131
|
+
* did not take room would make `0.5` mean half of a number the seam then ate
|
|
132
|
+
* into. Give it padding to make the target larger — the room it takes is
|
|
133
|
+
* measured, so the arithmetic follows.
|
|
134
|
+
*/
|
|
135
|
+
declare function SplitViewDragArea({ className, accessibilityLabel, children, onLayout, ...props }: SplitViewDragAreaProps): import("react").JSX.Element;
|
|
136
|
+
declare namespace SplitViewDragArea {
|
|
137
|
+
var displayName: string;
|
|
138
|
+
}
|
|
139
|
+
export interface SplitViewHandleProps extends ViewProps {
|
|
140
|
+
className?: string;
|
|
141
|
+
children?: ReactNode;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* The grip inside the drag area. It grows a little while the seam is moving,
|
|
145
|
+
* which is the only thing on screen saying the gesture was received before the
|
|
146
|
+
* panes have moved far enough to say it themselves.
|
|
147
|
+
*/
|
|
148
|
+
declare function SplitViewHandle({ className, children, style, ...props }: SplitViewHandleProps): import("react").JSX.Element;
|
|
149
|
+
declare namespace SplitViewHandle {
|
|
150
|
+
var displayName: string;
|
|
151
|
+
}
|
|
152
|
+
export declare const SplitView: typeof SplitViewRoot & {
|
|
153
|
+
Top: typeof SplitViewTop;
|
|
154
|
+
Bottom: typeof SplitViewBottom;
|
|
155
|
+
DragArea: typeof SplitViewDragArea;
|
|
156
|
+
Handle: typeof SplitViewHandle;
|
|
157
|
+
};
|
|
158
|
+
export { DEFAULT_MIN_HEIGHT, DEFAULT_SNAP_POINTS, nearestSnapIndex, normalizeSnapIndex, resolveLength, resolveSnapPoints, } from './split-view-math.js';
|
|
159
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/split-view/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,OAAO,EAQL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAAgC,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAE5E,OAAiB,EAMf,KAAK,WAAW,EACjB,MAAM,yBAAyB,CAAC;AAmCjC,UAAU,qBAAqB;IAC7B,6EAA6E;IAC7E,SAAS,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;I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