panelui-native 0.57.0 → 0.60.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 +4 -1
- package/lib/module/components/fab/index.js +63 -30
- package/lib/module/components/fab/index.js.map +1 -1
- package/lib/module/components/funnel-chart/index.js +828 -0
- package/lib/module/components/funnel-chart/index.js.map +1 -0
- package/lib/module/components/progress/index.js +67 -13
- package/lib/module/components/progress/index.js.map +1 -1
- package/lib/module/components/selection-mode/index.js +805 -0
- package/lib/module/components/selection-mode/index.js.map +1 -0
- package/lib/module/components/tabs/index.js +384 -341
- package/lib/module/components/tabs/index.js.map +1 -1
- package/lib/module/index.js +2 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/utils/chart.js +36 -0
- package/lib/module/utils/chart.js.map +1 -1
- package/lib/typescript/src/components/fab/index.d.ts +11 -5
- package/lib/typescript/src/components/fab/index.d.ts.map +1 -1
- package/lib/typescript/src/components/funnel-chart/index.d.ts +289 -0
- package/lib/typescript/src/components/funnel-chart/index.d.ts.map +1 -0
- package/lib/typescript/src/components/progress/index.d.ts +9 -1
- package/lib/typescript/src/components/progress/index.d.ts.map +1 -1
- package/lib/typescript/src/components/selection-mode/index.d.ts +498 -0
- package/lib/typescript/src/components/selection-mode/index.d.ts.map +1 -0
- package/lib/typescript/src/components/tabs/index.d.ts +64 -46
- package/lib/typescript/src/components/tabs/index.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +3 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/utils/chart.d.ts +19 -0
- package/lib/typescript/src/utils/chart.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/fab/index.tsx +66 -31
- package/src/components/funnel-chart/index.tsx +1121 -0
- package/src/components/progress/index.tsx +64 -11
- package/src/components/selection-mode/index.tsx +1027 -0
- package/src/components/tabs/index.tsx +452 -413
- package/src/index.ts +29 -0
- package/src/utils/chart.ts +52 -0
package/src/index.ts
CHANGED
|
@@ -216,6 +216,22 @@ export {
|
|
|
216
216
|
type FlowRect,
|
|
217
217
|
type FlowPoint,
|
|
218
218
|
} from './components/flow';
|
|
219
|
+
export {
|
|
220
|
+
FunnelChart,
|
|
221
|
+
useFunnelChart,
|
|
222
|
+
type FunnelChartProps,
|
|
223
|
+
type FunnelChartHandle,
|
|
224
|
+
type FunnelChartHeaderProps,
|
|
225
|
+
type FunnelChartStagesProps,
|
|
226
|
+
type FunnelChartLabelsProps,
|
|
227
|
+
type FunnelChartLegendProps,
|
|
228
|
+
type FunnelChartSkeletonProps,
|
|
229
|
+
type FunnelChartStatus,
|
|
230
|
+
type FunnelDatum,
|
|
231
|
+
type FunnelEdges,
|
|
232
|
+
type FunnelLegendLayout,
|
|
233
|
+
type FunnelShare,
|
|
234
|
+
} from './components/funnel-chart';
|
|
219
235
|
export {
|
|
220
236
|
Frame,
|
|
221
237
|
type FrameProps,
|
|
@@ -316,6 +332,16 @@ export {
|
|
|
316
332
|
type SelectGroupProps,
|
|
317
333
|
type SelectPresentation,
|
|
318
334
|
} from './components/select';
|
|
335
|
+
export {
|
|
336
|
+
SelectionMode,
|
|
337
|
+
useSelectionMode,
|
|
338
|
+
type SelectionModeProps,
|
|
339
|
+
type SelectionModeItemProps,
|
|
340
|
+
type SelectionModeIndicatorProps,
|
|
341
|
+
type SelectionModeHeaderProps,
|
|
342
|
+
type SelectionModeBarProps,
|
|
343
|
+
type SelectionModeActionProps,
|
|
344
|
+
} from './components/selection-mode';
|
|
319
345
|
export {
|
|
320
346
|
SectionRail,
|
|
321
347
|
type SectionRailProps,
|
|
@@ -332,6 +358,9 @@ export {
|
|
|
332
358
|
type TabsListProps,
|
|
333
359
|
type TabsTriggerProps,
|
|
334
360
|
type TabsContentProps,
|
|
361
|
+
type TabsVariant,
|
|
362
|
+
type TabsKeepMounted,
|
|
363
|
+
type TabsAnimation,
|
|
335
364
|
} from './components/tabs';
|
|
336
365
|
export {
|
|
337
366
|
Table,
|
package/src/utils/chart.ts
CHANGED
|
@@ -751,3 +751,55 @@ export function columnValues(
|
|
|
751
751
|
return typeof value === 'number' && !Number.isNaN(value) ? value : null;
|
|
752
752
|
});
|
|
753
753
|
}
|
|
754
|
+
|
|
755
|
+
/**
|
|
756
|
+
* One length of a funnel: a band symmetrical about a centre line, `head` wide
|
|
757
|
+
* at one end and `tail` wide at the other.
|
|
758
|
+
*
|
|
759
|
+
* Given as two half-extents about a middle rather than as four corners, because
|
|
760
|
+
* that is the shape of the data — a stage knows what it is worth and what the
|
|
761
|
+
* next one is worth, and the taper between them is the drop.
|
|
762
|
+
*
|
|
763
|
+
* `curve` is how far along the band the control points reach, as a fraction of
|
|
764
|
+
* its length. Past `0.5` the two reach beyond each other, which is what turns
|
|
765
|
+
* the join from a diagonal into the S the eye reads as a single continuous
|
|
766
|
+
* funnel rather than a stack of separate trapezoids; `0` gives the straight
|
|
767
|
+
* diagonal. The sides are the only curved part — the ends stay square, so a
|
|
768
|
+
* band's end lines up exactly with the next band's start.
|
|
769
|
+
*
|
|
770
|
+
* The run goes across, so `offset` and `length` are horizontal and the band is
|
|
771
|
+
* `head` and `tail` tall about `middle`.
|
|
772
|
+
*/
|
|
773
|
+
export function ribbonPath(
|
|
774
|
+
offset: number,
|
|
775
|
+
length: number,
|
|
776
|
+
head: number,
|
|
777
|
+
tail: number,
|
|
778
|
+
middle: number,
|
|
779
|
+
curve: number
|
|
780
|
+
): string {
|
|
781
|
+
'worklet';
|
|
782
|
+
if (length <= 0 || (head <= 0 && tail <= 0)) return '';
|
|
783
|
+
|
|
784
|
+
const start = offset;
|
|
785
|
+
const end = offset + length;
|
|
786
|
+
const topStart = middle - head;
|
|
787
|
+
const topEnd = middle - tail;
|
|
788
|
+
const bottomStart = middle + head;
|
|
789
|
+
const bottomEnd = middle + tail;
|
|
790
|
+
|
|
791
|
+
if (!(curve > 0)) {
|
|
792
|
+
return `M${start},${topStart}L${end},${topEnd}L${end},${bottomEnd}L${start},${bottomStart}Z`;
|
|
793
|
+
}
|
|
794
|
+
|
|
795
|
+
const near = start + length * curve;
|
|
796
|
+
const far = end - length * curve;
|
|
797
|
+
|
|
798
|
+
return (
|
|
799
|
+
`M${start},${topStart}` +
|
|
800
|
+
`C${near},${topStart},${far},${topEnd},${end},${topEnd}` +
|
|
801
|
+
`L${end},${bottomEnd}` +
|
|
802
|
+
`C${far},${bottomEnd},${near},${bottomStart},${start},${bottomStart}` +
|
|
803
|
+
`Z`
|
|
804
|
+
);
|
|
805
|
+
}
|