@ramme-io/ui 5.0.3 → 5.2.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.
@@ -0,0 +1 @@
1
+ export {};
@@ -1578,6 +1578,53 @@ const e = {
1578
1578
  humanLabel: "FileUpload",
1579
1579
  humanDescription: "A modern drag-and-drop file upload area with visual feedback and file listing."
1580
1580
  },
1581
+ {
1582
+ id: "font-select",
1583
+ name: "FontSelect",
1584
+ version: "1.0.0",
1585
+ description: "A searchable picker over every Google Fonts family with Latin letters, most popular first. Only the matches for what has been typed reach the menu, at most 50, so it stays quick on a phone. It picks a name; loading the font is the theme's job.",
1586
+ tags: [
1587
+ "form",
1588
+ "select",
1589
+ "font",
1590
+ "typography",
1591
+ "google fonts",
1592
+ "theme"
1593
+ ],
1594
+ category: "form",
1595
+ props: [
1596
+ {
1597
+ name: "value",
1598
+ type: "string",
1599
+ description: "The chosen family name, or undefined for none."
1600
+ },
1601
+ {
1602
+ name: "onChange",
1603
+ type: "function",
1604
+ description: "Called with the chosen family, or undefined when cleared."
1605
+ },
1606
+ {
1607
+ name: "label",
1608
+ type: "string",
1609
+ description: "Optional label above the control."
1610
+ },
1611
+ {
1612
+ name: "placeholder",
1613
+ type: "string",
1614
+ description: "Shown when nothing is chosen. Say what is used instead."
1615
+ },
1616
+ {
1617
+ name: "isClearable",
1618
+ type: "boolean",
1619
+ description: "If true, the choice can be cleared back to none. Defaults to false."
1620
+ }
1621
+ ],
1622
+ importPath: "./components/forms/FontSelect",
1623
+ filePath: "src/components/forms/FontSelect.tsx",
1624
+ sku: "@atom/form/font-select",
1625
+ humanLabel: "FontSelect",
1626
+ humanDescription: "A searchable picker over every Google Fonts family with Latin letters, most popular first. Only the matches for what has been typed reach the menu, at most 50, so it stays quick on a phone. It picks a name; loading the font is the theme's job."
1627
+ },
1581
1628
  {
1582
1629
  id: "form-template",
1583
1630
  name: "FormTemplate",
@@ -1880,7 +1927,7 @@ const e = {
1880
1927
  {
1881
1928
  id: "select",
1882
1929
  name: "Select",
1883
- version: "1.0.0",
1930
+ version: "1.0.1",
1884
1931
  description: "A fully theme-aware single-value dropdown selector built on react-select. Strategic purpose: replaces the native select element with a searchable, clearable atom that stays visually consistent across all Ramme themes via CSS variables, requiring no additional styling from the consumer.",
1885
1932
  tags: [
1886
1933
  "form",
@@ -1936,6 +1983,11 @@ const e = {
1936
1983
  type: "boolean",
1937
1984
  description: "If true, allows the user to type to filter options. Defaults to true."
1938
1985
  },
1986
+ {
1987
+ name: "onInputChange",
1988
+ type: "function",
1989
+ description: "Called with the search text as the user types. Use it to narrow a very long list yourself and pass only the matches as options, so the menu never renders thousands of rows."
1990
+ },
1939
1991
  {
1940
1992
  name: "error",
1941
1993
  type: "boolean",
@@ -2915,18 +2967,21 @@ const e = {
2915
2967
  {
2916
2968
  id: "badge",
2917
2969
  name: "Badge",
2918
- version: "1.0.0",
2919
- description: "A small component to display a status, count, or label.",
2970
+ version: "1.0.1",
2971
+ 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.",
2920
2972
  tags: [
2921
2973
  "ui",
2922
2974
  "label",
2923
- "indicator"
2975
+ "indicator",
2976
+ "price",
2977
+ "gain",
2978
+ "loss"
2924
2979
  ],
2925
2980
  category: "ui",
2926
2981
  props: [
2927
2982
  {
2928
2983
  name: "variant",
2929
- type: `"'primary' | 'secondary' | 'danger' | 'success' | 'warning' | 'outline'"`,
2984
+ type: `"'primary' | 'secondary' | 'danger' | 'success' | 'warning' | 'outline' | 'gain' | 'loss'"`,
2930
2985
  description: "The visual style of the badge."
2931
2986
  },
2932
2987
  {
@@ -2944,7 +2999,7 @@ const e = {
2944
2999
  filePath: "src/components/ui/Badge.tsx",
2945
3000
  sku: "@atom/primitive/badge",
2946
3001
  humanLabel: "Badge",
2947
- humanDescription: "A small component to display a status, count, or label."
3002
+ 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."
2948
3003
  },
2949
3004
  {
2950
3005
  id: "brand-logo",
@@ -4342,7 +4397,7 @@ const e = {
4342
4397
  {
4343
4398
  id: "user-nav",
4344
4399
  name: "UserNav",
4345
- version: "1.0.0",
4400
+ version: "1.0.1",
4346
4401
  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.",
4347
4402
  tags: [
4348
4403
  "layout",
@@ -4380,6 +4435,11 @@ const e = {
4380
4435
  type: "boolean",
4381
4436
  description: "Adds a theme switcher inside the menu."
4382
4437
  },
4438
+ {
4439
+ name: "themeOptions",
4440
+ type: "Array<ThemeMode>",
4441
+ 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."
4442
+ },
4383
4443
  {
4384
4444
  name: "trigger",
4385
4445
  type: "ReactNode",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ramme-io/ui",
3
- "version": "5.0.3",
3
+ "version": "5.2.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.2.0"
61
+ "@ramme-io/shared": "4.4.0"
62
62
  },
63
63
  "devDependencies": {
64
64
  "@storybook/addon-links": "^10.5.9",
@@ -93,6 +93,7 @@
93
93
  "test": "vitest run",
94
94
  "generate:manifest": "node scripts/generate-manifest.js",
95
95
  "generate:registry": "node scripts/generate-registry.js",
96
+ "generate:fonts": "node scripts/generate-google-fonts.mjs",
96
97
  "generate": "npm run generate:manifest && npm run generate:registry",
97
98
  "build": "npm run generate && vite build && tsc --declaration --emitDeclarationOnly --outDir dist --noEmit false",
98
99
  "bundle:ai": "repomix --ignore '**/*.lock,**/dist/**,**/storybook-static/**' --output 'ramme-ui-context.txt'",
@@ -1582,6 +1582,53 @@ export const wizardManifest: WizardManifest = {
1582
1582
  "humanLabel": "FileUpload",
1583
1583
  "humanDescription": "A modern drag-and-drop file upload area with visual feedback and file listing."
1584
1584
  },
1585
+ {
1586
+ "id": "font-select",
1587
+ "name": "FontSelect",
1588
+ "version": "1.0.0",
1589
+ "description": "A searchable picker over every Google Fonts family with Latin letters, most popular first. Only the matches for what has been typed reach the menu, at most 50, so it stays quick on a phone. It picks a name; loading the font is the theme's job.",
1590
+ "tags": [
1591
+ "form",
1592
+ "select",
1593
+ "font",
1594
+ "typography",
1595
+ "google fonts",
1596
+ "theme"
1597
+ ],
1598
+ "category": "form",
1599
+ "props": [
1600
+ {
1601
+ "name": "value",
1602
+ "type": "string",
1603
+ "description": "The chosen family name, or undefined for none."
1604
+ },
1605
+ {
1606
+ "name": "onChange",
1607
+ "type": "function",
1608
+ "description": "Called with the chosen family, or undefined when cleared."
1609
+ },
1610
+ {
1611
+ "name": "label",
1612
+ "type": "string",
1613
+ "description": "Optional label above the control."
1614
+ },
1615
+ {
1616
+ "name": "placeholder",
1617
+ "type": "string",
1618
+ "description": "Shown when nothing is chosen. Say what is used instead."
1619
+ },
1620
+ {
1621
+ "name": "isClearable",
1622
+ "type": "boolean",
1623
+ "description": "If true, the choice can be cleared back to none. Defaults to false."
1624
+ }
1625
+ ],
1626
+ "importPath": "./components/forms/FontSelect",
1627
+ "filePath": "src/components/forms/FontSelect.tsx",
1628
+ "sku": "@atom/form/font-select",
1629
+ "humanLabel": "FontSelect",
1630
+ "humanDescription": "A searchable picker over every Google Fonts family with Latin letters, most popular first. Only the matches for what has been typed reach the menu, at most 50, so it stays quick on a phone. It picks a name; loading the font is the theme's job."
1631
+ },
1585
1632
  {
1586
1633
  "id": "form-template",
1587
1634
  "name": "FormTemplate",
@@ -1884,7 +1931,7 @@ export const wizardManifest: WizardManifest = {
1884
1931
  {
1885
1932
  "id": "select",
1886
1933
  "name": "Select",
1887
- "version": "1.0.0",
1934
+ "version": "1.0.1",
1888
1935
  "description": "A fully theme-aware single-value dropdown selector built on react-select. Strategic purpose: replaces the native select element with a searchable, clearable atom that stays visually consistent across all Ramme themes via CSS variables, requiring no additional styling from the consumer.",
1889
1936
  "tags": [
1890
1937
  "form",
@@ -1940,6 +1987,11 @@ export const wizardManifest: WizardManifest = {
1940
1987
  "type": "boolean",
1941
1988
  "description": "If true, allows the user to type to filter options. Defaults to true."
1942
1989
  },
1990
+ {
1991
+ "name": "onInputChange",
1992
+ "type": "function",
1993
+ "description": "Called with the search text as the user types. Use it to narrow a very long list yourself and pass only the matches as options, so the menu never renders thousands of rows."
1994
+ },
1943
1995
  {
1944
1996
  "name": "error",
1945
1997
  "type": "boolean",
@@ -2919,18 +2971,21 @@ export const wizardManifest: WizardManifest = {
2919
2971
  {
2920
2972
  "id": "badge",
2921
2973
  "name": "Badge",
2922
- "version": "1.0.0",
2923
- "description": "A small component to display a status, count, or label.",
2974
+ "version": "1.0.1",
2975
+ "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.",
2924
2976
  "tags": [
2925
2977
  "ui",
2926
2978
  "label",
2927
- "indicator"
2979
+ "indicator",
2980
+ "price",
2981
+ "gain",
2982
+ "loss"
2928
2983
  ],
2929
2984
  "category": "ui",
2930
2985
  "props": [
2931
2986
  {
2932
2987
  "name": "variant",
2933
- "type": "\"'primary' | 'secondary' | 'danger' | 'success' | 'warning' | 'outline'\"",
2988
+ "type": "\"'primary' | 'secondary' | 'danger' | 'success' | 'warning' | 'outline' | 'gain' | 'loss'\"",
2934
2989
  "description": "The visual style of the badge."
2935
2990
  },
2936
2991
  {
@@ -2948,7 +3003,7 @@ export const wizardManifest: WizardManifest = {
2948
3003
  "filePath": "src/components/ui/Badge.tsx",
2949
3004
  "sku": "@atom/primitive/badge",
2950
3005
  "humanLabel": "Badge",
2951
- "humanDescription": "A small component to display a status, count, or label."
3006
+ "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."
2952
3007
  },
2953
3008
  {
2954
3009
  "id": "brand-logo",
@@ -4346,7 +4401,7 @@ export const wizardManifest: WizardManifest = {
4346
4401
  {
4347
4402
  "id": "user-nav",
4348
4403
  "name": "UserNav",
4349
- "version": "1.0.0",
4404
+ "version": "1.0.1",
4350
4405
  "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.",
4351
4406
  "tags": [
4352
4407
  "layout",
@@ -4384,6 +4439,11 @@ export const wizardManifest: WizardManifest = {
4384
4439
  "type": "boolean",
4385
4440
  "description": "Adds a theme switcher inside the menu."
4386
4441
  },
4442
+ {
4443
+ "name": "themeOptions",
4444
+ "type": "Array<ThemeMode>",
4445
+ "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."
4446
+ },
4387
4447
  {
4388
4448
  "name": "trigger",
4389
4449
  "type": "ReactNode",
@@ -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`: