@dodopayments/ui 1.0.1 → 1.0.2
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/ai/component-registry.json +431 -88
- package/ai/components/app-top-bar.md +18 -10
- package/ai/components/bar-chart.md +5 -3
- package/ai/components/button.md +1 -1
- package/ai/components/chart-legend.md +3 -1
- package/ai/components/chart-tooltip.md +2 -2
- package/ai/components/composed-chart.md +5 -6
- package/ai/components/data-grid.md +11 -23
- package/ai/components/date-picker.md +1 -1
- package/ai/components/details-panel.md +1 -1
- package/ai/components/funnel-chart.md +12 -5
- package/ai/components/gauge-chart.md +9 -4
- package/ai/components/line-chart.md +1 -0
- package/ai/components/list-item.md +146 -6
- package/ai/components/pie-chart.md +1 -0
- package/ai/components/quantity-stepper.md +34 -2
- package/ai/components/radio-group.md +2 -2
- package/ai/components/retention-matrix.md +20 -5
- package/ai/components/ring-chart.md +7 -4
- package/ai/components/sankey-chart.md +18 -8
- package/ai/components/scatter-chart.md +4 -2
- package/ai/components/settings-section.md +1 -62
- package/ai/components/setup-guide.md +114 -118
- package/ai/components/sidebar.md +5 -0
- package/ai/components/stat-card.md +13 -14
- package/ai/components/sunburst-chart.md +138 -18
- package/ai/components/value-flash.md +74 -15
- package/ai/skills/dodo-charts/SKILL.md +3 -2
- package/ai/skills/dodo-design/SKILL.md +2 -2
- package/dist/components/button/button.d.ts +1 -1
- package/dist/components/button/button.d.ts.map +1 -1
- package/dist/components/button/button.js +5 -3
- package/dist/components/button/button.js.map +1 -1
- package/dist/components/data-grid/data-grid.d.ts +16 -13
- package/dist/components/data-grid/data-grid.d.ts.map +1 -1
- package/dist/components/data-grid/data-grid.js +17 -110
- package/dist/components/data-grid/data-grid.js.map +1 -1
- package/dist/components/data-grid/index.d.ts.map +1 -1
- package/dist/components/data-grid/index.js +1 -0
- package/dist/components/data-grid/index.js.map +1 -1
- package/dist/components/data-grid/table.d.ts +3 -6
- package/dist/components/data-grid/table.d.ts.map +1 -1
- package/dist/components/data-grid/table.js +10 -12
- package/dist/components/data-grid/table.js.map +1 -1
- package/dist/components/funnel-chart/funnel-chart.d.ts +3 -1
- package/dist/components/funnel-chart/funnel-chart.d.ts.map +1 -1
- package/dist/components/funnel-chart/funnel-chart.js +3 -1
- package/dist/components/funnel-chart/funnel-chart.js.map +1 -1
- package/dist/components/gauge-chart/gauge-chart.d.ts +3 -1
- package/dist/components/gauge-chart/gauge-chart.d.ts.map +1 -1
- package/dist/components/gauge-chart/gauge-chart.js +3 -1
- package/dist/components/gauge-chart/gauge-chart.js.map +1 -1
- package/dist/components/icon-morph/icon-morph.d.ts.map +1 -1
- package/dist/components/icon-morph/icon-morph.js +7 -4
- package/dist/components/icon-morph/icon-morph.js.map +1 -1
- package/dist/components/list-item/list-item.d.ts +21 -2
- package/dist/components/list-item/list-item.d.ts.map +1 -1
- package/dist/components/list-item/list-item.js +18 -4
- package/dist/components/list-item/list-item.js.map +1 -1
- package/dist/components/plan-picker/plan-picker.js +1 -1
- package/dist/components/plan-picker/plan-picker.js.map +1 -1
- package/dist/components/product-card/product-card.d.ts.map +1 -1
- package/dist/components/product-card/product-card.js +10 -3
- package/dist/components/product-card/product-card.js.map +1 -1
- package/dist/components/quantity-stepper/index.d.ts +1 -1
- package/dist/components/quantity-stepper/index.d.ts.map +1 -1
- package/dist/components/quantity-stepper/index.js +1 -1
- package/dist/components/quantity-stepper/index.js.map +1 -1
- package/dist/components/quantity-stepper/quantity-stepper.d.ts +33 -3
- package/dist/components/quantity-stepper/quantity-stepper.d.ts.map +1 -1
- package/dist/components/quantity-stepper/quantity-stepper.js +41 -8
- package/dist/components/quantity-stepper/quantity-stepper.js.map +1 -1
- package/dist/components/radio-group/radio-group.d.ts +6 -6
- package/dist/components/radio-group/radio-group.d.ts.map +1 -1
- package/dist/components/radio-group/radio-group.js +11 -10
- package/dist/components/radio-group/radio-group.js.map +1 -1
- package/dist/components/retention-matrix/index.d.ts +1 -1
- package/dist/components/retention-matrix/index.d.ts.map +1 -1
- package/dist/components/retention-matrix/index.js +1 -1
- package/dist/components/retention-matrix/index.js.map +1 -1
- package/dist/components/retention-matrix/retention-matrix.d.ts +32 -16
- package/dist/components/retention-matrix/retention-matrix.d.ts.map +1 -1
- package/dist/components/retention-matrix/retention-matrix.js +42 -19
- package/dist/components/retention-matrix/retention-matrix.js.map +1 -1
- package/dist/components/sankey-chart/sankey-chart.d.ts +4 -1
- package/dist/components/sankey-chart/sankey-chart.d.ts.map +1 -1
- package/dist/components/sankey-chart/sankey-chart.js +4 -1
- package/dist/components/sankey-chart/sankey-chart.js.map +1 -1
- package/dist/components/settings-section/index.d.ts.map +1 -1
- package/dist/components/settings-section/index.js +1 -0
- package/dist/components/settings-section/index.js.map +1 -1
- package/dist/components/settings-section/settings-section.d.ts +8 -5
- package/dist/components/settings-section/settings-section.d.ts.map +1 -1
- package/dist/components/settings-section/settings-section.js +8 -11
- package/dist/components/settings-section/settings-section.js.map +1 -1
- package/dist/components/setup-guide/index.d.ts +1 -1
- package/dist/components/setup-guide/index.d.ts.map +1 -1
- package/dist/components/setup-guide/index.js +1 -1
- package/dist/components/setup-guide/index.js.map +1 -1
- package/dist/components/setup-guide/setup-guide.d.ts +41 -16
- package/dist/components/setup-guide/setup-guide.d.ts.map +1 -1
- package/dist/components/setup-guide/setup-guide.js +53 -30
- package/dist/components/setup-guide/setup-guide.js.map +1 -1
- package/dist/components/sidebar/sidebar.d.ts +12 -5
- package/dist/components/sidebar/sidebar.d.ts.map +1 -1
- package/dist/components/sidebar/sidebar.js +127 -16
- package/dist/components/sidebar/sidebar.js.map +1 -1
- package/dist/components/stat-card/stat-card.d.ts +18 -11
- package/dist/components/stat-card/stat-card.d.ts.map +1 -1
- package/dist/components/stat-card/stat-card.js +18 -12
- package/dist/components/stat-card/stat-card.js.map +1 -1
- package/dist/components/sunburst-chart/index.d.ts +1 -0
- package/dist/components/sunburst-chart/index.d.ts.map +1 -1
- package/dist/components/sunburst-chart/index.js +1 -0
- package/dist/components/sunburst-chart/index.js.map +1 -1
- package/dist/components/sunburst-chart/sunburst-chart.d.ts +7 -5
- package/dist/components/sunburst-chart/sunburst-chart.d.ts.map +1 -1
- package/dist/components/sunburst-chart/sunburst-chart.js +7 -5
- package/dist/components/sunburst-chart/sunburst-chart.js.map +1 -1
- package/dist/components/value-flash/index.d.ts +1 -1
- package/dist/components/value-flash/index.d.ts.map +1 -1
- package/dist/components/value-flash/index.js +1 -1
- package/dist/components/value-flash/index.js.map +1 -1
- package/dist/components/value-flash/value-flash.d.ts +52 -0
- package/dist/components/value-flash/value-flash.d.ts.map +1 -1
- package/dist/components/value-flash/value-flash.js +37 -1
- package/dist/components/value-flash/value-flash.js.map +1 -1
- package/dist/icons/index.d.ts +6 -0
- package/dist/icons/index.js +6 -0
- package/dist/icons/ui/arrow-door-out-3.d.ts +3 -0
- package/dist/icons/ui/arrow-door-out-3.js +5 -0
- package/dist/icons/ui/circle-check-outline-duo.d.ts +3 -0
- package/dist/icons/ui/circle-check-outline-duo.d.ts.map +1 -0
- package/dist/icons/ui/circle-check-outline-duo.js +5 -0
- package/dist/icons/ui/circle-check-outline-duo.js.map +1 -0
- package/dist/icons/ui/circle-dashed-outline-duo.d.ts +3 -0
- package/dist/icons/ui/circle-dashed-outline-duo.d.ts.map +1 -0
- package/dist/icons/ui/circle-dashed-outline-duo.js +5 -0
- package/dist/icons/ui/circle-dashed-outline-duo.js.map +1 -0
- package/dist/icons/ui/circle-warning-outline-duo.d.ts +3 -0
- package/dist/icons/ui/circle-warning-outline-duo.d.ts.map +1 -0
- package/dist/icons/ui/circle-warning-outline-duo.js +5 -0
- package/dist/icons/ui/circle-warning-outline-duo.js.map +1 -0
- package/dist/icons/ui/circle-xmark-outline-duo.d.ts +3 -0
- package/dist/icons/ui/circle-xmark-outline-duo.d.ts.map +1 -0
- package/dist/icons/ui/circle-xmark-outline-duo.js +5 -0
- package/dist/icons/ui/circle-xmark-outline-duo.js.map +1 -0
- package/dist/icons/ui/clock-outline-duo.d.ts +3 -0
- package/dist/icons/ui/clock-outline-duo.d.ts.map +1 -0
- package/dist/icons/ui/clock-outline-duo.js +5 -0
- package/dist/icons/ui/clock-outline-duo.js.map +1 -0
- package/dist/lib/cn-tables.js +5 -5
- package/dist/lib/cn-tables.js.map +1 -1
- package/dist/lib/locale-messages.d.ts +6 -3
- package/dist/lib/locale-messages.d.ts.map +1 -1
- package/dist/lib/locale-messages.js +6 -3
- package/dist/lib/locale-messages.js.map +1 -1
- package/dist/locales/ar.d.ts.map +1 -1
- package/dist/locales/ar.js +1 -0
- package/dist/locales/ar.js.map +1 -1
- package/dist/locales/de.d.ts.map +1 -1
- package/dist/locales/de.js +1 -0
- package/dist/locales/de.js.map +1 -1
- package/dist/locales/es.d.ts.map +1 -1
- package/dist/locales/es.js +1 -0
- package/dist/locales/es.js.map +1 -1
- package/dist/locales/fr.d.ts.map +1 -1
- package/dist/locales/fr.js +1 -0
- package/dist/locales/fr.js.map +1 -1
- package/dist/locales/he.d.ts.map +1 -1
- package/dist/locales/he.js +1 -0
- package/dist/locales/he.js.map +1 -1
- package/dist/locales/hi.d.ts.map +1 -1
- package/dist/locales/hi.js +1 -0
- package/dist/locales/hi.js.map +1 -1
- package/dist/locales/ja.d.ts.map +1 -1
- package/dist/locales/ja.js +1 -0
- package/dist/locales/ja.js.map +1 -1
- package/dist/locales/pt-BR.d.ts.map +1 -1
- package/dist/locales/pt-BR.js +1 -0
- package/dist/locales/pt-BR.js.map +1 -1
- package/dist/locales/zh-CN.d.ts.map +1 -1
- package/dist/locales/zh-CN.js +1 -0
- package/dist/locales/zh-CN.js.map +1 -1
- package/dist/primitives/charts/bar.d.ts +11 -0
- package/dist/primitives/charts/bar.d.ts.map +1 -1
- package/dist/primitives/charts/bar.js +65 -11
- package/dist/primitives/charts/bar.js.map +1 -1
- package/dist/primitives/charts/funnel-chart.d.ts +22 -3
- package/dist/primitives/charts/funnel-chart.d.ts.map +1 -1
- package/dist/primitives/charts/funnel-chart.js +122 -110
- package/dist/primitives/charts/funnel-chart.js.map +1 -1
- package/dist/primitives/charts/gauge.d.ts +7 -0
- package/dist/primitives/charts/gauge.d.ts.map +1 -1
- package/dist/primitives/charts/gauge.js +37 -9
- package/dist/primitives/charts/gauge.js.map +1 -1
- package/dist/primitives/charts/index.d.ts +1 -0
- package/dist/primitives/charts/index.d.ts.map +1 -1
- package/dist/primitives/charts/index.js +1 -0
- package/dist/primitives/charts/index.js.map +1 -1
- package/dist/primitives/charts/legend/legend-marker.d.ts +7 -2
- package/dist/primitives/charts/legend/legend-marker.d.ts.map +1 -1
- package/dist/primitives/charts/legend/legend-marker.js +9 -3
- package/dist/primitives/charts/legend/legend-marker.js.map +1 -1
- package/dist/primitives/charts/legend/legend-progress.d.ts +6 -1
- package/dist/primitives/charts/legend/legend-progress.d.ts.map +1 -1
- package/dist/primitives/charts/legend/legend-progress.js +7 -2
- package/dist/primitives/charts/legend/legend-progress.js.map +1 -1
- package/dist/primitives/charts/loading-sweep.d.ts.map +1 -1
- package/dist/primitives/charts/loading-sweep.js +11 -2
- package/dist/primitives/charts/loading-sweep.js.map +1 -1
- package/dist/primitives/charts/pie-slice.d.ts +6 -1
- package/dist/primitives/charts/pie-slice.d.ts.map +1 -1
- package/dist/primitives/charts/pie-slice.js +26 -16
- package/dist/primitives/charts/pie-slice.js.map +1 -1
- package/dist/primitives/charts/ring.d.ts +12 -3
- package/dist/primitives/charts/ring.d.ts.map +1 -1
- package/dist/primitives/charts/ring.js +46 -9
- package/dist/primitives/charts/ring.js.map +1 -1
- package/dist/primitives/charts/sankey/sankey-link.d.ts +14 -5
- package/dist/primitives/charts/sankey/sankey-link.d.ts.map +1 -1
- package/dist/primitives/charts/sankey/sankey-link.js +34 -10
- package/dist/primitives/charts/sankey/sankey-link.js.map +1 -1
- package/dist/primitives/charts/sankey/sankey-node.d.ts +8 -2
- package/dist/primitives/charts/sankey/sankey-node.d.ts.map +1 -1
- package/dist/primitives/charts/sankey/sankey-node.js +13 -7
- package/dist/primitives/charts/sankey/sankey-node.js.map +1 -1
- package/dist/primitives/charts/scatter-chart.d.ts.map +1 -1
- package/dist/primitives/charts/scatter-chart.js +22 -8
- package/dist/primitives/charts/scatter-chart.js.map +1 -1
- package/dist/primitives/charts/scatter.d.ts +8 -3
- package/dist/primitives/charts/scatter.d.ts.map +1 -1
- package/dist/primitives/charts/scatter.js +9 -4
- package/dist/primitives/charts/scatter.js.map +1 -1
- package/dist/primitives/charts/series-bar.d.ts +5 -1
- package/dist/primitives/charts/series-bar.d.ts.map +1 -1
- package/dist/primitives/charts/series-bar.js +30 -11
- package/dist/primitives/charts/series-bar.js.map +1 -1
- package/dist/primitives/charts/series-markers.d.ts +6 -1
- package/dist/primitives/charts/series-markers.d.ts.map +1 -1
- package/dist/primitives/charts/series-markers.js +19 -8
- package/dist/primitives/charts/series-markers.js.map +1 -1
- package/dist/primitives/charts/sunburst-center.d.ts +10 -3
- package/dist/primitives/charts/sunburst-center.d.ts.map +1 -1
- package/dist/primitives/charts/sunburst-center.js +20 -12
- package/dist/primitives/charts/sunburst-center.js.map +1 -1
- package/dist/primitives/charts/sunburst-chart.d.ts +1 -1
- package/dist/primitives/charts/sunburst-chart.d.ts.map +1 -1
- package/dist/primitives/charts/sunburst-chart.js +27 -7
- package/dist/primitives/charts/sunburst-chart.js.map +1 -1
- package/dist/primitives/charts/sunburst-context.d.ts +2 -0
- package/dist/primitives/charts/sunburst-context.d.ts.map +1 -1
- package/dist/primitives/charts/sunburst-context.js +2 -0
- package/dist/primitives/charts/sunburst-context.js.map +1 -1
- package/dist/primitives/charts/sunburst-labels.d.ts.map +1 -1
- package/dist/primitives/charts/sunburst-labels.js +2 -2
- package/dist/primitives/charts/sunburst-labels.js.map +1 -1
- package/dist/primitives/charts/sunburst-legend.d.ts +19 -0
- package/dist/primitives/charts/sunburst-legend.d.ts.map +1 -0
- package/dist/primitives/charts/sunburst-legend.js +52 -0
- package/dist/primitives/charts/sunburst-legend.js.map +1 -0
- package/dist/primitives/charts/sunburst-segment.d.ts +7 -1
- package/dist/primitives/charts/sunburst-segment.d.ts.map +1 -1
- package/dist/primitives/charts/sunburst-segment.js +35 -10
- package/dist/primitives/charts/sunburst-segment.js.map +1 -1
- package/dist/primitives/charts/sunburst.d.ts +7 -5
- package/dist/primitives/charts/sunburst.d.ts.map +1 -1
- package/dist/primitives/charts/sunburst.js +24 -25
- package/dist/primitives/charts/sunburst.js.map +1 -1
- package/dist/primitives/ui/button.d.ts.map +1 -1
- package/dist/primitives/ui/button.js +3 -1
- package/dist/primitives/ui/button.js.map +1 -1
- package/dist/primitives/ui/sidebar.d.ts.map +1 -1
- package/dist/primitives/ui/sidebar.js +4 -2
- package/dist/primitives/ui/sidebar.js.map +1 -1
- package/dist/styles/theme.css +4 -0
- package/dist/styles/tokens.css +3 -1
- package/dist/styles/tokens.test.tsx +5 -2
- package/eslint/restricted-classes.js +46 -5
- package/package.json +1 -2
- package/dist/icons/ui/refresh-clockwise.d.ts.map +0 -1
- package/dist/icons/ui/refresh-clockwise.js.map +0 -1
|
@@ -1,30 +1,32 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
/**
|
|
3
|
-
* The
|
|
4
|
-
* `--chart-scale-
|
|
5
|
-
*
|
|
3
|
+
* The levels of a retention cell, drawn like the Heatmap chart: grey (`--chart-scale-01`) only for 0%, as the heatmap
|
|
4
|
+
* keeps grey for "nothing", and four lime steps (`--chart-scale-02` to `--chart-scale-05`) for every value above 0%,
|
|
5
|
+
* split across the matrix's own values (see {@link retentionThresholds}), so 100% is always the darkest. Text is
|
|
6
|
+
* Content/Primary on the two lightest steps and `--brand-foreground` (Grey 950 in both themes) on the three darker
|
|
7
|
+
* lime steps, so it keeps 4.5:1 in dark mode.
|
|
6
8
|
*/
|
|
7
9
|
export declare const DODO_RETENTION_CELL_VARIANTS: {
|
|
8
10
|
readonly level: {
|
|
9
11
|
readonly "0": {
|
|
10
12
|
readonly classes: "bg-chart-scale-01 text-muted-foreground";
|
|
11
|
-
readonly description: "0
|
|
13
|
+
readonly description: "0%: nobody of the cohort is still active. The grey step, the value still shown.";
|
|
12
14
|
};
|
|
13
15
|
readonly "1": {
|
|
14
16
|
readonly classes: "bg-chart-scale-02 text-foreground";
|
|
15
|
-
readonly description: "
|
|
17
|
+
readonly description: "The lowest quarter of the values above 0%: the lightest lime.";
|
|
16
18
|
};
|
|
17
19
|
readonly "2": {
|
|
18
20
|
readonly classes: "bg-chart-scale-03 text-brand-foreground";
|
|
19
|
-
readonly description: "
|
|
21
|
+
readonly description: "The second quarter.";
|
|
20
22
|
};
|
|
21
23
|
readonly "3": {
|
|
22
24
|
readonly classes: "bg-chart-scale-04 text-brand-foreground";
|
|
23
|
-
readonly description: "
|
|
25
|
+
readonly description: "The third quarter.";
|
|
24
26
|
};
|
|
25
27
|
readonly "4": {
|
|
26
28
|
readonly classes: "bg-chart-scale-05 text-brand-foreground";
|
|
27
|
-
readonly description: "
|
|
29
|
+
readonly description: "The highest quarter, and 100% (Month 0) always: the darkest lime.";
|
|
28
30
|
};
|
|
29
31
|
};
|
|
30
32
|
};
|
|
@@ -36,28 +38,41 @@ export declare const retentionCellVariants: import("../../index.ts").VariantFn<{
|
|
|
36
38
|
readonly level: {
|
|
37
39
|
readonly "0": {
|
|
38
40
|
readonly classes: "bg-chart-scale-01 text-muted-foreground";
|
|
39
|
-
readonly description: "0
|
|
41
|
+
readonly description: "0%: nobody of the cohort is still active. The grey step, the value still shown.";
|
|
40
42
|
};
|
|
41
43
|
readonly "1": {
|
|
42
44
|
readonly classes: "bg-chart-scale-02 text-foreground";
|
|
43
|
-
readonly description: "
|
|
45
|
+
readonly description: "The lowest quarter of the values above 0%: the lightest lime.";
|
|
44
46
|
};
|
|
45
47
|
readonly "2": {
|
|
46
48
|
readonly classes: "bg-chart-scale-03 text-brand-foreground";
|
|
47
|
-
readonly description: "
|
|
49
|
+
readonly description: "The second quarter.";
|
|
48
50
|
};
|
|
49
51
|
readonly "3": {
|
|
50
52
|
readonly classes: "bg-chart-scale-04 text-brand-foreground";
|
|
51
|
-
readonly description: "
|
|
53
|
+
readonly description: "The third quarter.";
|
|
52
54
|
};
|
|
53
55
|
readonly "4": {
|
|
54
56
|
readonly classes: "bg-chart-scale-05 text-brand-foreground";
|
|
55
|
-
readonly description: "
|
|
57
|
+
readonly description: "The highest quarter, and 100% (Month 0) always: the darkest lime.";
|
|
56
58
|
};
|
|
57
59
|
};
|
|
58
60
|
}>;
|
|
59
|
-
/** The
|
|
60
|
-
export
|
|
61
|
+
/** The three cut points between the four lime levels: a value at or above a cut point moves up one level. */
|
|
62
|
+
export type RetentionThresholds = readonly [number, number, number];
|
|
63
|
+
/**
|
|
64
|
+
* Splits the distinct retention values above 0% of Month 1 onward into four groups, one per lime level, as the
|
|
65
|
+
* Heatmap chart spreads its counts over its lime levels, so every shade is used and close values still differ. The
|
|
66
|
+
* cut points are always distinct, so repeated values never collapse two levels. Month 0
|
|
67
|
+
* is left out (it is always 100%, the darkest level, and would push the cut points up). With fewer than four distinct values it falls back to fixed quarters
|
|
68
|
+
* (25, 50, 75%).
|
|
69
|
+
*/
|
|
70
|
+
export declare function retentionThresholds(cohorts: readonly RetentionCohort[]): RetentionThresholds;
|
|
71
|
+
/**
|
|
72
|
+
* The level of a retention percentage: 0 (grey) for 0%, otherwise 1 to 4 (lightest to darkest lime) by how many of the
|
|
73
|
+
* `thresholds` it reaches. Without `thresholds` it uses fixed quarters (below 25%, 25–49%, 50–74%, 75% and more).
|
|
74
|
+
*/
|
|
75
|
+
export declare function retentionLevel(percent: number, thresholds?: RetentionThresholds): "0" | "1" | "2" | "3" | "4";
|
|
61
76
|
/** One monthly cohort of a {@link RetentionMatrix}: the customers who joined in that month. */
|
|
62
77
|
export interface RetentionCohort {
|
|
63
78
|
/** Stable key. Falls back to the index. */
|
|
@@ -125,7 +140,8 @@ export interface RetentionMatrixProps extends Omit<React.ComponentProps<"div">,
|
|
|
125
140
|
/**
|
|
126
141
|
* How many customers of each monthly cohort are still active in the months after they joined, drawn the way the
|
|
127
142
|
* Heatmap chart draws its cells. One row per cohort (cohort, size, Month 0 to Month 6); each cell writes its
|
|
128
|
-
* retention % and is shaded on one of
|
|
143
|
+
* retention % and is shaded on one of four lime levels (`--chart-scale-02..05`), split across the matrix's own values
|
|
144
|
+
* like the heatmap's (see {@link retentionThresholds}); only 0% is grey and 100% (Month 0) is the darkest lime. Hovering a cell fades the others
|
|
129
145
|
* and shows the cohort, the month and how many customers that is. Months a cohort has not reached are blank.
|
|
130
146
|
* The matrix keeps a 560px minimum width and scrolls sideways in a narrower parent. Put it in a `Card` titled
|
|
131
147
|
* "User retention".
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retention-matrix.d.ts","sourceRoot":"","sources":["../../../src/components/retention-matrix/retention-matrix.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAS/B
|
|
1
|
+
{"version":3,"file":"retention-matrix.d.ts","sourceRoot":"","sources":["../../../src/components/retention-matrix/retention-matrix.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAS/B;;;;;;GAMG;AACH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;CAwB/B,CAAC;AAEX,eAAO,MAAM,oCAAoC;;CAA0B,CAAC;AAE5E,wDAAwD;AACxD,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;EAIhC,CAAC;AAEH,6GAA6G;AAC7G,MAAM,MAAM,mBAAmB,GAAG,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAKpE;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,SAAS,eAAe,EAAE,GAAG,mBAAmB,CAU5F;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,MAAM,EACf,UAAU,GAAE,mBAAsC,GACjD,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GA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;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,wDAAwD;IACxD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,8BAA8B;IAC9B,MAAM,CAAC,EAAE,qBAAqB,CAAC;CAChC;AAqBD;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,EAC9B,OAAO,EACP,MAAM,EACN,aAA8B,EAC9B,WAAgC,EAChC,UAAiB,EACjB,OAAe,EACf,MAAM,EACN,SAAS,EACT,GAAG,KAAK,EACT,EAAE,oBAAoB,qBAwJtB"}
|
|
@@ -9,31 +9,33 @@ import { Empty } from "../empty/empty.js";
|
|
|
9
9
|
import { Skeleton } from "../skeleton/skeleton.js";
|
|
10
10
|
import { TooltipGroup, TooltipGroupTrigger } from "../tooltip/tooltip.js";
|
|
11
11
|
/**
|
|
12
|
-
* The
|
|
13
|
-
* `--chart-scale-
|
|
14
|
-
*
|
|
12
|
+
* The levels of a retention cell, drawn like the Heatmap chart: grey (`--chart-scale-01`) only for 0%, as the heatmap
|
|
13
|
+
* keeps grey for "nothing", and four lime steps (`--chart-scale-02` to `--chart-scale-05`) for every value above 0%,
|
|
14
|
+
* split across the matrix's own values (see {@link retentionThresholds}), so 100% is always the darkest. Text is
|
|
15
|
+
* Content/Primary on the two lightest steps and `--brand-foreground` (Grey 950 in both themes) on the three darker
|
|
16
|
+
* lime steps, so it keeps 4.5:1 in dark mode.
|
|
15
17
|
*/
|
|
16
18
|
export const DODO_RETENTION_CELL_VARIANTS = {
|
|
17
19
|
level: {
|
|
18
20
|
"0": {
|
|
19
21
|
classes: "bg-chart-scale-01 text-muted-foreground",
|
|
20
|
-
description: "0
|
|
22
|
+
description: "0%: nobody of the cohort is still active. The grey step, the value still shown.",
|
|
21
23
|
},
|
|
22
24
|
"1": {
|
|
23
25
|
classes: "bg-chart-scale-02 text-foreground",
|
|
24
|
-
description: "
|
|
26
|
+
description: "The lowest quarter of the values above 0%: the lightest lime.",
|
|
25
27
|
},
|
|
26
28
|
"2": {
|
|
27
29
|
classes: "bg-chart-scale-03 text-brand-foreground",
|
|
28
|
-
description: "
|
|
30
|
+
description: "The second quarter.",
|
|
29
31
|
},
|
|
30
32
|
"3": {
|
|
31
33
|
classes: "bg-chart-scale-04 text-brand-foreground",
|
|
32
|
-
description: "
|
|
34
|
+
description: "The third quarter.",
|
|
33
35
|
},
|
|
34
36
|
"4": {
|
|
35
37
|
classes: "bg-chart-scale-05 text-brand-foreground",
|
|
36
|
-
description: "
|
|
38
|
+
description: "The highest quarter, and 100% (Month 0) always: the darkest lime.",
|
|
37
39
|
},
|
|
38
40
|
},
|
|
39
41
|
};
|
|
@@ -44,17 +46,35 @@ export const retentionCellVariants = createVariants({
|
|
|
44
46
|
variants: DODO_RETENTION_CELL_VARIANTS,
|
|
45
47
|
defaultVariants: DODO_RETENTION_CELL_DEFAULT_VARIANTS,
|
|
46
48
|
});
|
|
47
|
-
/**
|
|
48
|
-
|
|
49
|
+
/** Fixed quarters, for a matrix with too few values to split: below 25%, 25–49%, 50–74%, 75% and more. */
|
|
50
|
+
const FIXED_THRESHOLDS = [25, 50, 75];
|
|
51
|
+
/**
|
|
52
|
+
* Splits the distinct retention values above 0% of Month 1 onward into four groups, one per lime level, as the
|
|
53
|
+
* Heatmap chart spreads its counts over its lime levels, so every shade is used and close values still differ. The
|
|
54
|
+
* cut points are always distinct, so repeated values never collapse two levels. Month 0
|
|
55
|
+
* is left out (it is always 100%, the darkest level, and would push the cut points up). With fewer than four distinct values it falls back to fixed quarters
|
|
56
|
+
* (25, 50, 75%).
|
|
57
|
+
*/
|
|
58
|
+
export function retentionThresholds(cohorts) {
|
|
59
|
+
const values = cohorts
|
|
60
|
+
.flatMap((cohort) => cohort.retention.slice(1))
|
|
61
|
+
.filter((value) => value != null && Number.isFinite(value) && value > 0)
|
|
62
|
+
.sort((a, b) => a - b);
|
|
63
|
+
// Cut on the distinct values, so repeated values (ten cells at 10%) cannot collapse two cut points into one.
|
|
64
|
+
const distinct = [...new Set(values)];
|
|
65
|
+
if (distinct.length < 4)
|
|
66
|
+
return FIXED_THRESHOLDS;
|
|
67
|
+
const at = (quarter) => distinct[Math.ceil((quarter * distinct.length) / 4)];
|
|
68
|
+
return [at(1), at(2), at(3)];
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* The level of a retention percentage: 0 (grey) for 0%, otherwise 1 to 4 (lightest to darkest lime) by how many of the
|
|
72
|
+
* `thresholds` it reaches. Without `thresholds` it uses fixed quarters (below 25%, 25–49%, 50–74%, 75% and more).
|
|
73
|
+
*/
|
|
74
|
+
export function retentionLevel(percent, thresholds = FIXED_THRESHOLDS) {
|
|
49
75
|
if (!(percent > 0))
|
|
50
76
|
return "0";
|
|
51
|
-
|
|
52
|
-
return "1";
|
|
53
|
-
if (percent < 50)
|
|
54
|
-
return "2";
|
|
55
|
-
if (percent < 75)
|
|
56
|
-
return "3";
|
|
57
|
-
return "4";
|
|
77
|
+
return String(1 + thresholds.filter((cut) => percent >= cut).length);
|
|
58
78
|
}
|
|
59
79
|
const DEFAULT_LABELS = {
|
|
60
80
|
cohort: "Cohort",
|
|
@@ -76,7 +96,8 @@ const LEVELS = ["0", "1", "2", "3", "4"];
|
|
|
76
96
|
/**
|
|
77
97
|
* How many customers of each monthly cohort are still active in the months after they joined, drawn the way the
|
|
78
98
|
* Heatmap chart draws its cells. One row per cohort (cohort, size, Month 0 to Month 6); each cell writes its
|
|
79
|
-
* retention % and is shaded on one of
|
|
99
|
+
* retention % and is shaded on one of four lime levels (`--chart-scale-02..05`), split across the matrix's own values
|
|
100
|
+
* like the heatmap's (see {@link retentionThresholds}); only 0% is grey and 100% (Month 0) is the darkest lime. Hovering a cell fades the others
|
|
80
101
|
* and shows the cohort, the month and how many customers that is. Months a cohort has not reached are blank.
|
|
81
102
|
* The matrix keeps a 560px minimum width and scrolls sideways in a narrower parent. Put it in a `Card` titled
|
|
82
103
|
* "User retention".
|
|
@@ -90,13 +111,15 @@ export function RetentionMatrix({ cohorts, months, formatPercent = defaultPercen
|
|
|
90
111
|
const state = loading ? "loading" : cohorts.length === 0 ? "empty" : "default";
|
|
91
112
|
const scroller = React.useRef(null);
|
|
92
113
|
const scrollable = useScrollable(scroller, `${state}:${cohorts.length}:${columnCount}`);
|
|
114
|
+
const thresholds = React.useMemo(() => retentionThresholds(cohorts), [cohorts]);
|
|
93
115
|
return (_jsxs("div", { "data-slot": "retention-matrix", "data-state": state, className: cn("flex w-full min-w-0 flex-col gap-3", className), ...props, children: [_jsx(TooltipGroup, { children: _jsxs("div", { ref: scroller, "data-slot": "retention-matrix-scroller", className: "relative -mx-0.5 overflow-x-auto rounded-lg outline-none focus-visible:inset-ring focus-visible:inset-ring-brand-border focus-visible:ring-2 focus-visible:ring-brand-subtle", ...(scrollable ? { tabIndex: 0, role: "region", "aria-label": text.region } : {}), children: [_jsxs("table", { className: "w-full min-w-140 border-separate border-spacing-0.5", children: [_jsx("thead", { children: _jsxs("tr", { children: [_jsx("th", { scope: "col", className: "w-24 pb-2 text-start text-body-secondary text-muted-foreground", children: text.cohort }), _jsx("th", { scope: "col", className: "w-20 pe-3 pb-2 text-end text-body-secondary text-muted-foreground", children: text.size }), monthIndexes.map((month) => (_jsx("th", { scope: "col", className: "pb-2 text-center text-body-secondary text-muted-foreground", children: text.month(month) }, month)))] }) }), state === "default" ? (_jsx("tbody", { onPointerLeave: () => setHovered(null), children: cohorts.map((cohort, row) => (_jsxs("tr", { "data-slot": "retention-matrix-row", children: [_jsx("th", { scope: "row", className: "max-w-24 truncate pe-3 text-start text-foreground text-label-primary", children: cohort.label }), _jsx("td", { className: "pe-3 text-end text-body-primary text-muted-foreground tabular-nums", children: formatCount(cohort.size) }), monthIndexes.map((month) => {
|
|
94
116
|
const percent = cohort.retention[month];
|
|
95
117
|
if (percent == null || !Number.isFinite(percent))
|
|
96
118
|
return _jsx("td", { "data-slot": "retention-matrix-blank" }, month);
|
|
97
119
|
const key = `${String(cohort.id ?? row)}:${month}`;
|
|
98
120
|
const active = Math.round((cohort.size * percent) / 100);
|
|
99
|
-
|
|
121
|
+
const level = retentionLevel(percent, thresholds);
|
|
122
|
+
return (_jsx("td", { className: "p-0", children: _jsx(TooltipGroupTrigger, { label: _jsxs("span", { className: "flex flex-col", children: [_jsxs("span", { children: [cohort.label, " \u00B7 ", text.month(month)] }), _jsxs("span", { className: "text-muted-foreground tabular-nums", children: [formatPercent(percent), " \u00B7 ", formatCount(active), " of", " ", formatCount(cohort.size)] })] }), render: _jsx("div", {}), "data-slot": "retention-matrix-cell", "data-level": level, "data-dimmed": hovered !== null && hovered !== key ? "" : undefined, className: retentionCellVariants({ level }), onPointerEnter: () => setHovered(key), onPointerLeave: () => setHovered((current) => (current === key ? null : current)), children: formatPercent(percent) }) }, month));
|
|
100
123
|
})] }, cohort.id ?? row))) })) : null, state === "loading" ? (_jsx("tbody", { "aria-hidden": "true", children: Array.from({ length: LOADING_ROWS }, (_, row) => (_jsx("tr", { children: _jsx("td", { colSpan: columnCount + 2, className: "py-1", children: _jsx(Skeleton, { shape: "line", className: "w-full" }) }) }, row))) })) : null] }), state === "loading" ? (_jsx("span", { className: "sr-only", role: "status", children: text.loading })) : null] }) }), state === "empty" ? (_jsx(Empty, { className: "py-8", icon: _jsx(CalendarIcon, { "aria-hidden": "true" }), title: text.emptyTitle, description: text.emptyDescription, titleAs: "p" })) : null, state === "default" && showLegend ? (_jsxs("div", { "data-slot": "retention-matrix-legend", "aria-hidden": "true", className: "flex items-center justify-end gap-1 text-body-secondary text-muted-foreground", children: [_jsx("span", { className: "me-1", children: text.less }), LEVELS.map((level) => (_jsx("span", { className: cn(retentionCellVariants({ level }), "size-3 min-w-0 px-0") }, level))), _jsx("span", { className: "ms-1", children: text.more })] })) : null] }));
|
|
101
124
|
}
|
|
102
125
|
//# sourceMappingURL=retention-matrix.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retention-matrix.js","sourceRoot":"","sources":["../../../src/components/retention-matrix/retention-matrix.tsx"],"names":[],"mappings":"AA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,eAEE,SAAS,EAAE,EAAE,CAAC,qBAAqB,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,qBAAqB,CAAC,IADjE,KAAK,CAEV,CACH,CAAC,EACF,eAAM,SAAS,EAAC,MAAM,YAAE,IAAI,CAAC,IAAI,GAAQ,IACrC,CACP,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -13,7 +13,10 @@ export interface SankeyChartProps extends PrimitiveSankeyChartProps {
|
|
|
13
13
|
* refunds and payouts. Compose it from children: `SankeyLink` (the bands), `SankeyNode` (the bars
|
|
14
14
|
* and their labels) and `SankeyTooltip`. `data` is `{ nodes, links }`: each node has a `name`, each
|
|
15
15
|
* link a `source` and `target` node index and a `value`. Nodes and bands grow in on mount over
|
|
16
|
-
* `animationDuration`.
|
|
16
|
+
* `animationDuration`. Nodes and bands use the tint look of the other charts by default (nodes a 20%
|
|
17
|
+
* wash with a solid edge on their label side, bands a lighter 12% wash in their source node's colour, 24% while
|
|
18
|
+
* highlighted); set
|
|
19
|
+
* `variant="solid"` on `SankeyLink` / `SankeyNode` for full colour. The chart is as wide as its container; height comes from `aspectRatio`
|
|
17
20
|
* (default `"2 / 1"`). The default `margin` keeps 180px on each side for node labels.
|
|
18
21
|
*/
|
|
19
22
|
export declare function SankeyChart({ label, className, ...props }: SankeyChartProps): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sankey-chart.d.ts","sourceRoot":"","sources":["../../../src/components/sankey-chart/sankey-chart.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,gBAAgB,IAAI,yBAAyB,EACnD,MAAM,iDAAiD,CAAC;AAGzD,8BAA8B;AAC9B,MAAM,WAAW,gBAAiB,SAAQ,yBAAyB;IACjE;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;AAED
|
|
1
|
+
{"version":3,"file":"sankey-chart.d.ts","sourceRoot":"","sources":["../../../src/components/sankey-chart/sankey-chart.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,gBAAgB,IAAI,yBAAyB,EACnD,MAAM,iDAAiD,CAAC;AAGzD,8BAA8B;AAC9B,MAAM,WAAW,gBAAiB,SAAQ,yBAAyB;IACjE;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,WAAW,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,gBAAgB,+BAM3E"}
|
|
@@ -8,7 +8,10 @@ import { ChartFigure } from "../chart/chart.js";
|
|
|
8
8
|
* refunds and payouts. Compose it from children: `SankeyLink` (the bands), `SankeyNode` (the bars
|
|
9
9
|
* and their labels) and `SankeyTooltip`. `data` is `{ nodes, links }`: each node has a `name`, each
|
|
10
10
|
* link a `source` and `target` node index and a `value`. Nodes and bands grow in on mount over
|
|
11
|
-
* `animationDuration`.
|
|
11
|
+
* `animationDuration`. Nodes and bands use the tint look of the other charts by default (nodes a 20%
|
|
12
|
+
* wash with a solid edge on their label side, bands a lighter 12% wash in their source node's colour, 24% while
|
|
13
|
+
* highlighted); set
|
|
14
|
+
* `variant="solid"` on `SankeyLink` / `SankeyNode` for full colour. The chart is as wide as its container; height comes from `aspectRatio`
|
|
12
15
|
* (default `"2 / 1"`). The default `margin` keeps 180px on each side for node labels.
|
|
13
16
|
*/
|
|
14
17
|
export function SankeyChart({ label, className, ...props }) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sankey-chart.js","sourceRoot":"","sources":["../../../src/components/sankey-chart/sankey-chart.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EACL,WAAW,IAAI,oBAAoB,GAEpC,MAAM,gDAAiD,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAoB,CAAC;AAWjD
|
|
1
|
+
{"version":3,"file":"sankey-chart.js","sourceRoot":"","sources":["../../../src/components/sankey-chart/sankey-chart.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EACL,WAAW,IAAI,oBAAoB,GAEpC,MAAM,gDAAiD,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAoB,CAAC;AAWjD;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,WAAW,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,KAAK,EAAoB;IAC1E,OAAO,CACL,KAAC,WAAW,IAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,eAAY,cAAc,YACvE,KAAC,oBAAoB,OAAK,KAAK,GAAI,GACvB,CACf,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/settings-section/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/settings-section/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,UAAU,EACV,KAAK,eAAe,EACpB,gBAAgB,EAChB,KAAK,qBAAqB,EAC1B,eAAe,EACf,KAAK,oBAAoB,EACzB,gBAAgB,EAChB,KAAK,qBAAqB,GAC3B,MAAM,wBAAwB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/settings-section/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EAEV,gBAAgB,EAEhB,eAAe,EAEf,gBAAgB,GAEjB,MAAM,uBAAwB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/settings-section/index.ts"],"names":[],"mappings":"AAAA,0HAA0H;AAC1H,OAAO,EACL,UAAU,EAEV,gBAAgB,EAEhB,eAAe,EAEf,gBAAgB,GAEjB,MAAM,uBAAwB,CAAC"}
|
|
@@ -67,7 +67,10 @@ export type SettingToggleRowProps = Omit<SettingRowProps, "control" | "controlId
|
|
|
67
67
|
* label (clicking it toggles the switch) and the description is its accessible description.
|
|
68
68
|
*/
|
|
69
69
|
export declare function SettingToggleRow({ checked, defaultChecked, onCheckedChange, disabled, name, switchProps, description, ...props }: SettingToggleRowProps): React.JSX.Element;
|
|
70
|
-
/**
|
|
70
|
+
/**
|
|
71
|
+
* Props of {@link SettingsLinkCard}.
|
|
72
|
+
* @deprecated Use `ListItem` with `layout="tile"`. Removed in 2.0.
|
|
73
|
+
*/
|
|
71
74
|
export interface SettingsLinkCardProps extends Omit<ListItemProps, "title" | "description" | "layout" | "leading" | "trailing" | "corner" | "divider"> {
|
|
72
75
|
/** Name of the settings page, e.g. "Payouts". */
|
|
73
76
|
title: React.ReactNode;
|
|
@@ -84,9 +87,9 @@ export interface SettingsLinkCardProps extends Omit<ListItemProps, "title" | "de
|
|
|
84
87
|
disabled?: boolean;
|
|
85
88
|
}
|
|
86
89
|
/**
|
|
87
|
-
* A navigation tile for a settings index page,
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
+
* A navigation tile for a settings index page: an icon tile, a title and a description with a trailing chevron.
|
|
91
|
+
* @deprecated Use `<ListItem layout="tile" leading={<FeaturedIcon icon={icon} />} title description href />`, which
|
|
92
|
+
* draws the same tile. This wrapper renders exactly that and is removed in 2.0.
|
|
90
93
|
*/
|
|
91
|
-
export declare function SettingsLinkCard({
|
|
94
|
+
export declare function SettingsLinkCard({ icon, ...props }: SettingsLinkCardProps): React.JSX.Element;
|
|
92
95
|
//# sourceMappingURL=settings-section.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings-section.d.ts","sourceRoot":"","sources":["../../../src/components/settings-section/settings-section.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAOL,KAAK,aAAa,EAEnB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAY,KAAK,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC1E,O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ACvB,qFAAqF;IACrF,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,WAAW,EACX,OAAO,EACP,YAAiC,EACjC,OAAO,EACP,SAAS,EACT,aAAa,EACb,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,eAAe,qBAyDjB;AAED,4FAA4F;AAC5F,MAAM,MAAM,qBAAqB,GAAG,IAAI,CACtC,eAAe,EACf,SAAS,GAAG,WAAW,GAAG,eAAe,GAAG,gBAAgB,CAC7D,GACC,IAAI,CAAC,WAAW,EAAE,SAAS,GAAG,gBAAgB,GAAG,iBAAiB,GAAG,UAAU,GAAG,MAAM,CAAC,GAAG;IAC1F,8DAA8D;IAC9D,WAAW,CAAC,EAAE,IAAI,CAChB,WAAW,EACX,SAAS,GAAG,gBAAgB,GAAG,iBAAiB,GAAG,UAAU,GAAG,MAAM,GAAG,IAAI,CAC9E,CAAC;CACH,CAAC;AAEJ;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,OAAO,EACP,cAAc,EACd,eAAe,EACf,QAAQ,EACR,IAAI,EACJ,WAAW,EACX,WAAW,EACX,GAAG,KAAK,EACT,EAAE,qBAAqB,qBA0BvB;AAED
|
|
1
|
+
{"version":3,"file":"settings-section.d.ts","sourceRoot":"","sources":["../../../src/components/settings-section/settings-section.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAOL,KAAK,aAAa,EAEnB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAY,KAAK,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC1E,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAGhE,wCAAwC;AACxC,MAAM,WAAW,oBAAqB,SAAQ,IAAI,CAAC,aAAa,EAAE,OAAO,GAAG,QAAQ,CAAC;IACnF,wCAAwC;I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|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
import { ChevronRightIcon } from "../../icons/ui/chevron-right.js";
|
|
5
4
|
import { CircleInfoIcon } from "../../icons/ui/circle-info.js";
|
|
6
5
|
import { cn } from "../../lib/cn.js";
|
|
6
|
+
import { warnDeprecated } from "../../lib/deprecation.js";
|
|
7
7
|
import { hasContent } from "../../lib/has-content.js";
|
|
8
8
|
import { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, } from "../card/card.js";
|
|
9
9
|
import { FeaturedIcon } from "../featured-icon/featured-icon.js";
|
|
@@ -42,16 +42,13 @@ export function SettingToggleRow({ checked, defaultChecked, onCheckedChange, dis
|
|
|
42
42
|
return (_jsx(SettingRow, { "data-slot": "setting-toggle-row", "data-disabled": disabled || undefined, description: description, controlId: switchId, descriptionId: described ? descriptionId : undefined, control: _jsx(Switch, { ...switchProps, id: switchId, checked: checked, defaultChecked: defaultChecked, onCheckedChange: onCheckedChange, disabled: disabled, name: name, "aria-describedby": described ? descriptionId : undefined }), ...props }));
|
|
43
43
|
}
|
|
44
44
|
/**
|
|
45
|
-
* A navigation tile for a settings index page,
|
|
46
|
-
*
|
|
47
|
-
*
|
|
45
|
+
* A navigation tile for a settings index page: an icon tile, a title and a description with a trailing chevron.
|
|
46
|
+
* @deprecated Use `<ListItem layout="tile" leading={<FeaturedIcon icon={icon} />} title description href />`, which
|
|
47
|
+
* draws the same tile. This wrapper renders exactly that and is removed in 2.0.
|
|
48
48
|
*/
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
// A List item row (Dodo Nest Dashboard rows: the settings link, chevron trailing, the whole row opens the page) in
|
|
54
|
-
// a tile of its own. Like every List item it has no hover state.
|
|
55
|
-
return (_jsx(ListItem, { render: link, "data-slot": "settings-link-card", "data-disabled": disabled || undefined, divider: false, className: cn("rounded-xl border border-border bg-card px-4 outline-none focus-visible:border-brand-border focus-visible:ring-2 focus-visible:ring-brand-subtle", className), leading: hasContent(icon) ? _jsx(FeaturedIcon, { icon: icon }) : undefined, title: title, description: description, trailing: link === undefined ? undefined : (_jsx("span", { "data-slot": "settings-link-card-chevron", className: "flex text-muted-foreground", children: _jsx(ChevronRightIcon, { "aria-hidden": "true", className: "size-4 rtl:rotate-180" }) })), ...props }));
|
|
49
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated -- the deprecated wrapper takes its deprecated props
|
|
50
|
+
export function SettingsLinkCard({ icon, ...props }) {
|
|
51
|
+
warnDeprecated("SettingsLinkCard", 'Use <ListItem layout="tile"> with the icon in a FeaturedIcon as `leading`. It is removed in 2.0.');
|
|
52
|
+
return (_jsx(ListItem, { layout: "tile", "data-slot": "settings-link-card", leading: hasContent(icon) ? _jsx(FeaturedIcon, { icon: icon }) : undefined, ...props }));
|
|
56
53
|
}
|
|
57
54
|
//# sourceMappingURL=settings-section.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings-section.js","sourceRoot":"","sources":["../../../src/components/settings-section/settings-section.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"settings-section.js","sourceRoot":"","sources":["../../../src/components/settings-section/settings-section.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EACL,IAAI,EACJ,UAAU,EACV,WAAW,EACX,eAAe,EACf,UAAU,EACV,UAAU,EAEV,SAA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BAAgB,CAAC,EAAE,IAAI,EAAE,GAAG,KAAK,EAAyB;IACxE,cAAc,CACZ,kBAAkB,EAClB,kGAAkG,CACnG,CAAC;IACF,OAAO,CACL,KAAC,QAAQ,IACP,MAAM,EAAC,MAAM,eACH,oBAAoB,EAC9B,OAAO,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAC,YAAY,IAAC,IAAI,EAAE,IAAI,GAAI,CAAC,CAAC,CAAC,SAAS,KAChE,KAAK,GACT,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { DODO_SETUP_GUIDE_TASK_DOT_DEFAULT_VARIANTS, DODO_SETUP_GUIDE_TASK_DOT_VARIANTS, SetupGuide, type SetupGuideItem, type SetupGuideLabels, type SetupGuideProps, type SetupGuideTask, type SetupGuideTaskState, } from "./setup-guide.tsx";
|
|
1
|
+
export { DODO_SETUP_GUIDE_TASK_DOT_DEFAULT_VARIANTS, DODO_SETUP_GUIDE_TASK_DOT_VARIANTS, SetupGuide, SetupGuideIntro, type SetupGuideIntroProps, type SetupGuideItem, type SetupGuideLabels, type SetupGuideProps, type SetupGuideTask, type SetupGuideTaskState, } from "./setup-guide.tsx";
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/setup-guide/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,0CAA0C,EAC1C,kCAAkC,EAClC,UAAU,EACV,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,mBAAmB,GACzB,MAAM,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/setup-guide/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,0CAA0C,EAC1C,kCAAkC,EAClC,UAAU,EACV,eAAe,EACf,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,mBAAmB,GACzB,MAAM,mBAAmB,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { DODO_SETUP_GUIDE_TASK_DOT_DEFAULT_VARIANTS, DODO_SETUP_GUIDE_TASK_DOT_VARIANTS, SetupGuide, } from "./setup-guide.js";
|
|
1
|
+
export { DODO_SETUP_GUIDE_TASK_DOT_DEFAULT_VARIANTS, DODO_SETUP_GUIDE_TASK_DOT_VARIANTS, SetupGuide, SetupGuideIntro, } from "./setup-guide.js";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/setup-guide/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,0CAA0C,EAC1C,kCAAkC,EAClC,UAAU,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/setup-guide/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,0CAA0C,EAC1C,kCAAkC,EAClC,UAAU,EACV,eAAe,GAOhB,MAAM,kBAAmB,CAAC"}
|
|
@@ -23,7 +23,10 @@ export interface SetupGuideItem {
|
|
|
23
23
|
title: string;
|
|
24
24
|
/** A line under the title, for link and locked rows, e.g. "Unlocks once verification is approved". */
|
|
25
25
|
hint?: string;
|
|
26
|
-
/**
|
|
26
|
+
/**
|
|
27
|
+
* The tasks of a group row. The row opens to list them and, while open, counts the done ones ("1/4"); once every
|
|
28
|
+
* task is done a green check shows instead, open or closed, and the row still opens.
|
|
29
|
+
*/
|
|
27
30
|
tasks?: readonly SetupGuideTask[];
|
|
28
31
|
/** A finished row: the title and a green check, nothing to open. */
|
|
29
32
|
done?: boolean;
|
|
@@ -38,7 +41,7 @@ export interface SetupGuideItem {
|
|
|
38
41
|
export interface SetupGuideLabels {
|
|
39
42
|
/** @default "Setup guide" */
|
|
40
43
|
title?: string;
|
|
41
|
-
/** Shown before the next task while the guide is collapsed. @default "Up next" */
|
|
44
|
+
/** Shown before the next task while the guide is collapsed. @default "Up next:" */
|
|
42
45
|
upNext?: string;
|
|
43
46
|
/** @default "Collapse setup guide" */
|
|
44
47
|
collapse?: string;
|
|
@@ -58,31 +61,35 @@ export interface SetupGuideLabels {
|
|
|
58
61
|
pending?: string;
|
|
59
62
|
/** What a screen reader hears after a locked item (the lock icon only shows it). @default "Locked" */
|
|
60
63
|
locked?: string;
|
|
61
|
-
/**
|
|
64
|
+
/**
|
|
65
|
+
* Labels of the status Badges on submitted and blocked tasks (pending and done have none).
|
|
66
|
+
* @default { "in-review": "In review", "on-hold": "On hold", failed: "Failed" }
|
|
67
|
+
*/
|
|
62
68
|
states?: Partial<Record<"in-review" | "on-hold" | "failed", string>>;
|
|
63
69
|
}
|
|
64
|
-
/** The 16px status
|
|
70
|
+
/** The 16px status icon before a task: a Nucleo outline-duo circle icon, its outline in the state's content colour and
|
|
71
|
+
* its inside the tone's subtle tint (`--*-subtle`, the same as the status Badge beside it) (the verification page's colours). */
|
|
65
72
|
export declare const DODO_SETUP_GUIDE_TASK_DOT_VARIANTS: {
|
|
66
73
|
readonly state: {
|
|
67
74
|
readonly pending: {
|
|
68
|
-
readonly description: "Not started:
|
|
69
|
-
readonly classes: "
|
|
75
|
+
readonly description: "Not started: a dashed circle in Content/Tertiary, empty inside.";
|
|
76
|
+
readonly classes: "text-tertiary-foreground **:data-[color=color-2]:fill-transparent";
|
|
70
77
|
};
|
|
71
78
|
readonly done: {
|
|
72
|
-
readonly description: "Done:
|
|
73
|
-
readonly classes: "
|
|
79
|
+
readonly description: "Done: a circled check in Content/Success on the success subtle tint.";
|
|
80
|
+
readonly classes: "text-success-foreground **:data-[color=color-2]:fill-success-subtle **:data-[color=color-2]:opacity-100";
|
|
74
81
|
};
|
|
75
82
|
readonly "in-review": {
|
|
76
|
-
readonly description: "Submitted:
|
|
77
|
-
readonly classes: "
|
|
83
|
+
readonly description: "Submitted, in review: a clock in Content/Accent on the info subtle tint.";
|
|
84
|
+
readonly classes: "text-info-foreground **:data-[color=color-2]:fill-info-subtle **:data-[color=color-2]:opacity-100";
|
|
78
85
|
};
|
|
79
86
|
readonly "on-hold": {
|
|
80
|
-
readonly description: "On hold:
|
|
81
|
-
readonly classes: "
|
|
87
|
+
readonly description: "On hold: a circled warning in Content/Error on the error subtle tint.";
|
|
88
|
+
readonly classes: "text-destructive-foreground **:data-[color=color-2]:fill-destructive-subtle **:data-[color=color-2]:opacity-100";
|
|
82
89
|
};
|
|
83
90
|
readonly failed: {
|
|
84
|
-
readonly description: "Failed:
|
|
85
|
-
readonly classes: "
|
|
91
|
+
readonly description: "Failed: a circled cross in Content/Error on the error subtle tint.";
|
|
92
|
+
readonly classes: "text-destructive-foreground **:data-[color=color-2]:fill-destructive-subtle **:data-[color=color-2]:opacity-100";
|
|
86
93
|
};
|
|
87
94
|
};
|
|
88
95
|
};
|
|
@@ -110,11 +117,29 @@ export interface SetupGuideProps extends Omit<React.ComponentProps<"aside">, "ch
|
|
|
110
117
|
}
|
|
111
118
|
/**
|
|
112
119
|
* The setup guide a new business follows (the dashboard's Setup guide, opened from the top bar's Setup guide
|
|
113
|
-
* button): a 320 wide
|
|
114
|
-
*
|
|
120
|
+
* button): a 320 wide grey tray (Direction 1) with the title, the percent done and a progress bar on its strip, then
|
|
121
|
+
* one white panel per step, 4 apart. A
|
|
122
|
+
* group row opens (one at a time) to its tasks, each with a status dot, a status Badge when submitted or blocked and an
|
|
115
123
|
* optional "Mark as done"; a link row goes straight to a page; a locked row waits behind a padlock; a finished row
|
|
116
124
|
* shows a green check. Collapsed, it keeps the header and bar and says what is up next. Place it yourself (the
|
|
117
125
|
* dashboard pins it to the bottom-right corner).
|
|
118
126
|
*/
|
|
119
127
|
export declare function SetupGuide({ className, items, progress, upNext, collapsed: collapsedProp, defaultCollapsed, onCollapsedChange, defaultOpenItem, onClose, labels, ...props }: SetupGuideProps): React.JSX.Element;
|
|
128
|
+
/** Props of {@link SetupGuideIntro}. */
|
|
129
|
+
export interface SetupGuideIntroProps extends Omit<React.ComponentProps<"div">, "title" | "children"> {
|
|
130
|
+
/** @default "Your setup lives here" */
|
|
131
|
+
title?: React.ReactNode;
|
|
132
|
+
/** @default "Pick up right where you left off." */
|
|
133
|
+
description?: React.ReactNode;
|
|
134
|
+
/** The dismiss button's label. @default "Got it" */
|
|
135
|
+
actionLabel?: string;
|
|
136
|
+
/** Called by the dismiss button. Hide the intro and remember it, so it shows only once. */
|
|
137
|
+
onDismiss: () => void;
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* The first-time hint above the setup guide (the Design File's "Your setup lives here"): a 320 wide lime card with
|
|
141
|
+
* a title, a line and a "Got it" button, shown once when the guide first opens. Place it 8 above the guide; the
|
|
142
|
+
* dashboard also dims the page behind both until it is dismissed.
|
|
143
|
+
*/
|
|
144
|
+
export declare function SetupGuideIntro({ title, description, actionLabel, onDismiss, className, ...props }: SetupGuideIntroProps): React.JSX.Element;
|
|
120
145
|
//# sourceMappingURL=setup-guide.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup-guide.d.ts","sourceRoot":"","sources":["../../../src/components/setup-guide/setup-guide.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"setup-guide.d.ts","sourceRoot":"","sources":["../../../src/components/setup-guide/setup-guide.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAsB/B;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,MAAM,GAAG,WAAW,GAAG,SAAS,GAAG,QAAQ,CAAC;AAE1F,6DAA6D;AAC7D,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KA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