@ramme-io/ui 5.1.0 → 5.3.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 +1 -1
- package/dist/components/data-display/LineChart.d.ts +16 -1
- package/dist/components/data-display/LineChart.js +36 -31
- package/dist/components/layout/UserNav.d.ts +4 -0
- package/dist/components/layout/UserNav.js +28 -27
- package/dist/components/ui/Badge.d.ts +4 -4
- package/dist/components/ui/Badge.js +8 -5
- package/dist/contexts/ThemeContext.d.ts +1 -1
- package/dist/contexts/ThemeContext.js +45 -37
- package/dist/index.css +1 -1
- package/dist/markets-theme.test.d.ts +1 -0
- package/dist/wizardManifest.js +64 -10
- package/package.json +2 -2
- package/src/wizardManifest.ts +64 -10
- package/tailwind.preset.js +12 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/wizardManifest.js
CHANGED
|
@@ -930,20 +930,66 @@ const e = {
|
|
|
930
930
|
{
|
|
931
931
|
id: "line-chart",
|
|
932
932
|
name: "LineChart",
|
|
933
|
-
version: "1.0.
|
|
934
|
-
description: "A theme-aware line chart component
|
|
933
|
+
version: "1.0.2",
|
|
934
|
+
description: "A theme-aware line chart component for one or more series over a shared x-axis. Set `dot={false}` for long or many series, `emphasis` to draw the series a reader should follow thicker, and `dashed` for a reference level such as a long-run average.",
|
|
935
935
|
tags: [
|
|
936
936
|
"charts",
|
|
937
937
|
"data-visualization",
|
|
938
938
|
"rechart"
|
|
939
939
|
],
|
|
940
940
|
category: "charts",
|
|
941
|
-
props: [
|
|
941
|
+
props: [
|
|
942
|
+
{
|
|
943
|
+
name: "data",
|
|
944
|
+
type: "Array<any>",
|
|
945
|
+
description: "One object per x value, with a key per series."
|
|
946
|
+
},
|
|
947
|
+
{
|
|
948
|
+
name: "dataKeyX",
|
|
949
|
+
type: "string",
|
|
950
|
+
description: "The key holding the x value."
|
|
951
|
+
},
|
|
952
|
+
{
|
|
953
|
+
name: "lineKeys",
|
|
954
|
+
type: "Array<string>",
|
|
955
|
+
description: "The keys of the series to draw."
|
|
956
|
+
},
|
|
957
|
+
{
|
|
958
|
+
name: "colors",
|
|
959
|
+
type: "Array<string>",
|
|
960
|
+
description: "Stroke colours by series order; defaults to the theme's chart palette."
|
|
961
|
+
},
|
|
962
|
+
{
|
|
963
|
+
name: "dot",
|
|
964
|
+
type: "boolean",
|
|
965
|
+
description: "Draw a dot on every point (default true)."
|
|
966
|
+
},
|
|
967
|
+
{
|
|
968
|
+
name: "emphasis",
|
|
969
|
+
type: "Array<string>",
|
|
970
|
+
description: "Series keys drawn thicker than the rest."
|
|
971
|
+
},
|
|
972
|
+
{
|
|
973
|
+
name: "dashed",
|
|
974
|
+
type: "Array<string>",
|
|
975
|
+
description: "Series keys drawn dotted, for a reference level such as a long-run average."
|
|
976
|
+
},
|
|
977
|
+
{
|
|
978
|
+
name: "xAxisProps",
|
|
979
|
+
type: "XAxisProps",
|
|
980
|
+
description: "Passed to the x-axis: label, domain, tick formatter."
|
|
981
|
+
},
|
|
982
|
+
{
|
|
983
|
+
name: "yAxisProps",
|
|
984
|
+
type: "YAxisProps",
|
|
985
|
+
description: "Passed to the y-axis: label, domain, tick formatter."
|
|
986
|
+
}
|
|
987
|
+
],
|
|
942
988
|
importPath: "./components/data-display/LineChart",
|
|
943
989
|
filePath: "src/components/data-display/LineChart.tsx",
|
|
944
990
|
sku: "@atom/charts/line-chart",
|
|
945
991
|
humanLabel: "LineChart",
|
|
946
|
-
humanDescription: "A theme-aware line chart component
|
|
992
|
+
humanDescription: "A theme-aware line chart component for one or more series over a shared x-axis. Set `dot={false}` for long or many series, `emphasis` to draw the series a reader should follow thicker, and `dashed` for a reference level such as a long-run average."
|
|
947
993
|
},
|
|
948
994
|
{
|
|
949
995
|
id: "pie-chart",
|
|
@@ -2967,18 +3013,21 @@ const e = {
|
|
|
2967
3013
|
{
|
|
2968
3014
|
id: "badge",
|
|
2969
3015
|
name: "Badge",
|
|
2970
|
-
version: "1.0.
|
|
2971
|
-
description: "A small component to display a status, count, or label.",
|
|
3016
|
+
version: "1.0.1",
|
|
3017
|
+
description: "A small component to display a status, count, or label. The `gain` and `loss` variants are price chips, as on a watchlist: a move up or down, in the theme's direction colours rather than success or danger, because a fall is not an error.",
|
|
2972
3018
|
tags: [
|
|
2973
3019
|
"ui",
|
|
2974
3020
|
"label",
|
|
2975
|
-
"indicator"
|
|
3021
|
+
"indicator",
|
|
3022
|
+
"price",
|
|
3023
|
+
"gain",
|
|
3024
|
+
"loss"
|
|
2976
3025
|
],
|
|
2977
3026
|
category: "ui",
|
|
2978
3027
|
props: [
|
|
2979
3028
|
{
|
|
2980
3029
|
name: "variant",
|
|
2981
|
-
type: `"'primary' | 'secondary' | 'danger' | 'success' | 'warning' | 'outline'"`,
|
|
3030
|
+
type: `"'primary' | 'secondary' | 'danger' | 'success' | 'warning' | 'outline' | 'gain' | 'loss'"`,
|
|
2982
3031
|
description: "The visual style of the badge."
|
|
2983
3032
|
},
|
|
2984
3033
|
{
|
|
@@ -2996,7 +3045,7 @@ const e = {
|
|
|
2996
3045
|
filePath: "src/components/ui/Badge.tsx",
|
|
2997
3046
|
sku: "@atom/primitive/badge",
|
|
2998
3047
|
humanLabel: "Badge",
|
|
2999
|
-
humanDescription: "A small component to display a status, count, or label."
|
|
3048
|
+
humanDescription: "A small component to display a status, count, or label. The `gain` and `loss` variants are price chips, as on a watchlist: a move up or down, in the theme's direction colours rather than success or danger, because a fall is not an error."
|
|
3000
3049
|
},
|
|
3001
3050
|
{
|
|
3002
3051
|
id: "brand-logo",
|
|
@@ -4394,7 +4443,7 @@ const e = {
|
|
|
4394
4443
|
{
|
|
4395
4444
|
id: "user-nav",
|
|
4396
4445
|
name: "UserNav",
|
|
4397
|
-
version: "1.0.
|
|
4446
|
+
version: "1.0.1",
|
|
4398
4447
|
description: "The signed-in user's avatar menu — identity plus account actions. Strategic purpose: the standard account affordance for the app shell's header, with logout, settings, profile, and an optional theme toggle already wired. Compose extra entries with ButtonItem rather than rebuilding the menu.",
|
|
4399
4448
|
tags: [
|
|
4400
4449
|
"layout",
|
|
@@ -4432,6 +4481,11 @@ const e = {
|
|
|
4432
4481
|
type: "boolean",
|
|
4433
4482
|
description: "Adds a theme switcher inside the menu."
|
|
4434
4483
|
},
|
|
4484
|
+
{
|
|
4485
|
+
name: "themeOptions",
|
|
4486
|
+
type: "Array<ThemeMode>",
|
|
4487
|
+
description: "The themes the switcher offers, in order. Defaults to light, dark and system; an app with its own theme names it here (the terminal: markets, light, dark, system), or a viewer who taps another can never get back to it."
|
|
4488
|
+
},
|
|
4435
4489
|
{
|
|
4436
4490
|
name: "trigger",
|
|
4437
4491
|
type: "ReactNode",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ramme-io/ui",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.3.0",
|
|
4
4
|
"description": "The structural component library for the Ramme Framework.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"private": false,
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"tailwind-merge": "^3.3.1",
|
|
59
59
|
"tippy.js": "^6.3.7",
|
|
60
60
|
"zod": "^3.23.8",
|
|
61
|
-
"@ramme-io/shared": "4.
|
|
61
|
+
"@ramme-io/shared": "4.4.0"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
64
|
"@storybook/addon-links": "^10.5.9",
|
package/src/wizardManifest.ts
CHANGED
|
@@ -934,20 +934,66 @@ export const wizardManifest: WizardManifest = {
|
|
|
934
934
|
{
|
|
935
935
|
"id": "line-chart",
|
|
936
936
|
"name": "LineChart",
|
|
937
|
-
"version": "1.0.
|
|
938
|
-
"description": "A theme-aware line chart component
|
|
937
|
+
"version": "1.0.2",
|
|
938
|
+
"description": "A theme-aware line chart component for one or more series over a shared x-axis. Set `dot={false}` for long or many series, `emphasis` to draw the series a reader should follow thicker, and `dashed` for a reference level such as a long-run average.",
|
|
939
939
|
"tags": [
|
|
940
940
|
"charts",
|
|
941
941
|
"data-visualization",
|
|
942
942
|
"rechart"
|
|
943
943
|
],
|
|
944
944
|
"category": "charts",
|
|
945
|
-
"props": [
|
|
945
|
+
"props": [
|
|
946
|
+
{
|
|
947
|
+
"name": "data",
|
|
948
|
+
"type": "Array<any>",
|
|
949
|
+
"description": "One object per x value, with a key per series."
|
|
950
|
+
},
|
|
951
|
+
{
|
|
952
|
+
"name": "dataKeyX",
|
|
953
|
+
"type": "string",
|
|
954
|
+
"description": "The key holding the x value."
|
|
955
|
+
},
|
|
956
|
+
{
|
|
957
|
+
"name": "lineKeys",
|
|
958
|
+
"type": "Array<string>",
|
|
959
|
+
"description": "The keys of the series to draw."
|
|
960
|
+
},
|
|
961
|
+
{
|
|
962
|
+
"name": "colors",
|
|
963
|
+
"type": "Array<string>",
|
|
964
|
+
"description": "Stroke colours by series order; defaults to the theme's chart palette."
|
|
965
|
+
},
|
|
966
|
+
{
|
|
967
|
+
"name": "dot",
|
|
968
|
+
"type": "boolean",
|
|
969
|
+
"description": "Draw a dot on every point (default true)."
|
|
970
|
+
},
|
|
971
|
+
{
|
|
972
|
+
"name": "emphasis",
|
|
973
|
+
"type": "Array<string>",
|
|
974
|
+
"description": "Series keys drawn thicker than the rest."
|
|
975
|
+
},
|
|
976
|
+
{
|
|
977
|
+
"name": "dashed",
|
|
978
|
+
"type": "Array<string>",
|
|
979
|
+
"description": "Series keys drawn dotted, for a reference level such as a long-run average."
|
|
980
|
+
},
|
|
981
|
+
{
|
|
982
|
+
"name": "xAxisProps",
|
|
983
|
+
"type": "XAxisProps",
|
|
984
|
+
"description": "Passed to the x-axis: label, domain, tick formatter."
|
|
985
|
+
},
|
|
986
|
+
{
|
|
987
|
+
"name": "yAxisProps",
|
|
988
|
+
"type": "YAxisProps",
|
|
989
|
+
"description": "Passed to the y-axis: label, domain, tick formatter."
|
|
990
|
+
}
|
|
991
|
+
],
|
|
946
992
|
"importPath": "./components/data-display/LineChart",
|
|
947
993
|
"filePath": "src/components/data-display/LineChart.tsx",
|
|
948
994
|
"sku": "@atom/charts/line-chart",
|
|
949
995
|
"humanLabel": "LineChart",
|
|
950
|
-
"humanDescription": "A theme-aware line chart component
|
|
996
|
+
"humanDescription": "A theme-aware line chart component for one or more series over a shared x-axis. Set `dot={false}` for long or many series, `emphasis` to draw the series a reader should follow thicker, and `dashed` for a reference level such as a long-run average."
|
|
951
997
|
},
|
|
952
998
|
{
|
|
953
999
|
"id": "pie-chart",
|
|
@@ -2971,18 +3017,21 @@ export const wizardManifest: WizardManifest = {
|
|
|
2971
3017
|
{
|
|
2972
3018
|
"id": "badge",
|
|
2973
3019
|
"name": "Badge",
|
|
2974
|
-
"version": "1.0.
|
|
2975
|
-
"description": "A small component to display a status, count, or label.",
|
|
3020
|
+
"version": "1.0.1",
|
|
3021
|
+
"description": "A small component to display a status, count, or label. The `gain` and `loss` variants are price chips, as on a watchlist: a move up or down, in the theme's direction colours rather than success or danger, because a fall is not an error.",
|
|
2976
3022
|
"tags": [
|
|
2977
3023
|
"ui",
|
|
2978
3024
|
"label",
|
|
2979
|
-
"indicator"
|
|
3025
|
+
"indicator",
|
|
3026
|
+
"price",
|
|
3027
|
+
"gain",
|
|
3028
|
+
"loss"
|
|
2980
3029
|
],
|
|
2981
3030
|
"category": "ui",
|
|
2982
3031
|
"props": [
|
|
2983
3032
|
{
|
|
2984
3033
|
"name": "variant",
|
|
2985
|
-
"type": "\"'primary' | 'secondary' | 'danger' | 'success' | 'warning' | 'outline'\"",
|
|
3034
|
+
"type": "\"'primary' | 'secondary' | 'danger' | 'success' | 'warning' | 'outline' | 'gain' | 'loss'\"",
|
|
2986
3035
|
"description": "The visual style of the badge."
|
|
2987
3036
|
},
|
|
2988
3037
|
{
|
|
@@ -3000,7 +3049,7 @@ export const wizardManifest: WizardManifest = {
|
|
|
3000
3049
|
"filePath": "src/components/ui/Badge.tsx",
|
|
3001
3050
|
"sku": "@atom/primitive/badge",
|
|
3002
3051
|
"humanLabel": "Badge",
|
|
3003
|
-
"humanDescription": "A small component to display a status, count, or label."
|
|
3052
|
+
"humanDescription": "A small component to display a status, count, or label. The `gain` and `loss` variants are price chips, as on a watchlist: a move up or down, in the theme's direction colours rather than success or danger, because a fall is not an error."
|
|
3004
3053
|
},
|
|
3005
3054
|
{
|
|
3006
3055
|
"id": "brand-logo",
|
|
@@ -4398,7 +4447,7 @@ export const wizardManifest: WizardManifest = {
|
|
|
4398
4447
|
{
|
|
4399
4448
|
"id": "user-nav",
|
|
4400
4449
|
"name": "UserNav",
|
|
4401
|
-
"version": "1.0.
|
|
4450
|
+
"version": "1.0.1",
|
|
4402
4451
|
"description": "The signed-in user's avatar menu — identity plus account actions. Strategic purpose: the standard account affordance for the app shell's header, with logout, settings, profile, and an optional theme toggle already wired. Compose extra entries with ButtonItem rather than rebuilding the menu.",
|
|
4403
4452
|
"tags": [
|
|
4404
4453
|
"layout",
|
|
@@ -4436,6 +4485,11 @@ export const wizardManifest: WizardManifest = {
|
|
|
4436
4485
|
"type": "boolean",
|
|
4437
4486
|
"description": "Adds a theme switcher inside the menu."
|
|
4438
4487
|
},
|
|
4488
|
+
{
|
|
4489
|
+
"name": "themeOptions",
|
|
4490
|
+
"type": "Array<ThemeMode>",
|
|
4491
|
+
"description": "The themes the switcher offers, in order. Defaults to light, dark and system; an app with its own theme names it here (the terminal: markets, light, dark, system), or a viewer who taps another can never get back to it."
|
|
4492
|
+
},
|
|
4439
4493
|
{
|
|
4440
4494
|
"name": "trigger",
|
|
4441
4495
|
"type": "ReactNode",
|
package/tailwind.preset.js
CHANGED
|
@@ -77,6 +77,18 @@ module.exports = {
|
|
|
77
77
|
DEFAULT: 'rgb(var(--app-danger-color) / <alpha-value>)',
|
|
78
78
|
foreground: 'rgb(var(--app-danger-foreground-color) / <alpha-value>)',
|
|
79
79
|
},
|
|
80
|
+
// A price's direction, apart from status: `text-gain-strong` for a
|
|
81
|
+
// move written as text, `bg-gain` + `text-gain-foreground` for a chip.
|
|
82
|
+
gain: {
|
|
83
|
+
DEFAULT: 'rgb(var(--app-gain-color) / <alpha-value>)',
|
|
84
|
+
foreground: 'rgb(var(--app-gain-foreground-color) / <alpha-value>)',
|
|
85
|
+
strong: 'rgb(var(--app-gain-text-color) / <alpha-value>)',
|
|
86
|
+
},
|
|
87
|
+
loss: {
|
|
88
|
+
DEFAULT: 'rgb(var(--app-loss-color) / <alpha-value>)',
|
|
89
|
+
foreground: 'rgb(var(--app-loss-foreground-color) / <alpha-value>)',
|
|
90
|
+
strong: 'rgb(var(--app-loss-text-color) / <alpha-value>)',
|
|
91
|
+
},
|
|
80
92
|
|
|
81
93
|
// ─── Specialized Sub-Systems ───
|
|
82
94
|
// Categorical accents for colour-coded content. Distinct from `chart`:
|