@ramme-io/ui 5.3.1 → 5.4.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.
@@ -2973,31 +2973,63 @@ const e = {
2973
2973
  {
2974
2974
  id: "avatar",
2975
2975
  name: "Avatar",
2976
- version: "1.0.0",
2977
- description: "Displays a user's profile picture or initials as a fallback, with different size options.",
2976
+ version: "1.0.1",
2977
+ description: `Displays a person's picture or a company's logo, with letters as the fallback. The letters paint first and the image fades in over them once loaded, so a slow, missing or broken image never moves or empties the tile. Use shape="square" fit="contain" plate for a company logo.`,
2978
2978
  tags: [
2979
2979
  "ui",
2980
2980
  "profile",
2981
- "user"
2981
+ "user",
2982
+ "logo",
2983
+ "company",
2984
+ "initials"
2982
2985
  ],
2983
2986
  category: "ui",
2984
2987
  props: [
2985
2988
  {
2986
2989
  name: "name",
2987
2990
  type: "string",
2988
- description: "The name of the user, used for generating initials if no `src` is provided."
2991
+ description: "The name, used for the image's alt text and for initials if none are given."
2989
2992
  },
2990
2993
  {
2991
2994
  name: "src",
2992
2995
  type: "string",
2993
- description: "The URL of the image to display as the avatar. If not provided, initials are shown."
2996
+ description: "The image to show. If absent or it fails to load, the letters stay."
2997
+ },
2998
+ {
2999
+ name: "initials",
3000
+ type: "string",
3001
+ description: "Letters to show instead of ones taken from the name, such as a ticker."
2994
3002
  },
2995
3003
  {
2996
3004
  name: "size",
2997
- type: "'sm' | 'md' | 'lg'",
3005
+ type: "'xs' | 'sm' | 'md' | 'lg'",
2998
3006
  description: "Controls the dimensions and font size of the avatar.",
2999
3007
  default: "'md'"
3000
3008
  },
3009
+ {
3010
+ name: "shape",
3011
+ type: "'circle' | 'square'",
3012
+ description: "A circle for a person, a square for a company or a product.",
3013
+ default: "'circle'"
3014
+ },
3015
+ {
3016
+ name: "fit",
3017
+ type: "'cover' | 'contain'",
3018
+ description: "cover fills the tile (a photo); contain keeps the whole image (a logo).",
3019
+ default: "'cover'"
3020
+ },
3021
+ {
3022
+ name: "plate",
3023
+ type: "boolean",
3024
+ description: "Draws a loaded image on the light logo-plate token, so logos made for a white page stay legible on dark themes.",
3025
+ default: "false"
3026
+ },
3027
+ {
3028
+ name: "decorative",
3029
+ type: "boolean",
3030
+ description: "Hides the avatar from screen readers when the name is already written beside it.",
3031
+ default: "false"
3032
+ },
3001
3033
  {
3002
3034
  name: "className",
3003
3035
  type: "string",
@@ -3008,7 +3040,7 @@ const e = {
3008
3040
  filePath: "src/components/ui/Avatar.tsx",
3009
3041
  sku: "@atom/primitive/avatar",
3010
3042
  humanLabel: "Avatar",
3011
- humanDescription: "Displays a user's profile picture or initials as a fallback, with different size options."
3043
+ humanDescription: `Displays a person's picture or a company's logo, with letters as the fallback. The letters paint first and the image fades in over them once loaded, so a slow, missing or broken image never moves or empties the tile. Use shape="square" fit="contain" plate for a company logo.`
3012
3044
  },
3013
3045
  {
3014
3046
  id: "badge",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ramme-io/ui",
3
- "version": "5.3.1",
3
+ "version": "5.4.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.5.0"
61
+ "@ramme-io/shared": "4.6.0"
62
62
  },
63
63
  "devDependencies": {
64
64
  "@storybook/addon-links": "^10.5.9",
@@ -2977,31 +2977,63 @@ export const wizardManifest: WizardManifest = {
2977
2977
  {
2978
2978
  "id": "avatar",
2979
2979
  "name": "Avatar",
2980
- "version": "1.0.0",
2981
- "description": "Displays a user's profile picture or initials as a fallback, with different size options.",
2980
+ "version": "1.0.1",
2981
+ "description": "Displays a person's picture or a company's logo, with letters as the fallback. The letters paint first and the image fades in over them once loaded, so a slow, missing or broken image never moves or empties the tile. Use shape=\"square\" fit=\"contain\" plate for a company logo.",
2982
2982
  "tags": [
2983
2983
  "ui",
2984
2984
  "profile",
2985
- "user"
2985
+ "user",
2986
+ "logo",
2987
+ "company",
2988
+ "initials"
2986
2989
  ],
2987
2990
  "category": "ui",
2988
2991
  "props": [
2989
2992
  {
2990
2993
  "name": "name",
2991
2994
  "type": "string",
2992
- "description": "The name of the user, used for generating initials if no `src` is provided."
2995
+ "description": "The name, used for the image's alt text and for initials if none are given."
2993
2996
  },
2994
2997
  {
2995
2998
  "name": "src",
2996
2999
  "type": "string",
2997
- "description": "The URL of the image to display as the avatar. If not provided, initials are shown."
3000
+ "description": "The image to show. If absent or it fails to load, the letters stay."
3001
+ },
3002
+ {
3003
+ "name": "initials",
3004
+ "type": "string",
3005
+ "description": "Letters to show instead of ones taken from the name, such as a ticker."
2998
3006
  },
2999
3007
  {
3000
3008
  "name": "size",
3001
- "type": "'sm' | 'md' | 'lg'",
3009
+ "type": "'xs' | 'sm' | 'md' | 'lg'",
3002
3010
  "description": "Controls the dimensions and font size of the avatar.",
3003
3011
  "default": "'md'"
3004
3012
  },
3013
+ {
3014
+ "name": "shape",
3015
+ "type": "'circle' | 'square'",
3016
+ "description": "A circle for a person, a square for a company or a product.",
3017
+ "default": "'circle'"
3018
+ },
3019
+ {
3020
+ "name": "fit",
3021
+ "type": "'cover' | 'contain'",
3022
+ "description": "cover fills the tile (a photo); contain keeps the whole image (a logo).",
3023
+ "default": "'cover'"
3024
+ },
3025
+ {
3026
+ "name": "plate",
3027
+ "type": "boolean",
3028
+ "description": "Draws a loaded image on the light logo-plate token, so logos made for a white page stay legible on dark themes.",
3029
+ "default": "false"
3030
+ },
3031
+ {
3032
+ "name": "decorative",
3033
+ "type": "boolean",
3034
+ "description": "Hides the avatar from screen readers when the name is already written beside it.",
3035
+ "default": "false"
3036
+ },
3005
3037
  {
3006
3038
  "name": "className",
3007
3039
  "type": "string",
@@ -3012,7 +3044,7 @@ export const wizardManifest: WizardManifest = {
3012
3044
  "filePath": "src/components/ui/Avatar.tsx",
3013
3045
  "sku": "@atom/primitive/avatar",
3014
3046
  "humanLabel": "Avatar",
3015
- "humanDescription": "Displays a user's profile picture or initials as a fallback, with different size options."
3047
+ "humanDescription": "Displays a person's picture or a company's logo, with letters as the fallback. The letters paint first and the image fades in over them once loaded, so a slow, missing or broken image never moves or empties the tile. Use shape=\"square\" fit=\"contain\" plate for a company logo."
3016
3048
  },
3017
3049
  {
3018
3050
  "id": "badge",
@@ -115,6 +115,7 @@ module.exports = {
115
115
  grid: 'rgb(var(--app-table-grid-line-color) / <alpha-value>)',
116
116
  },
117
117
  'chart-accent': 'rgb(var(--app-chart-accent) / <alpha-value>)',
118
+ 'logo-plate': 'rgb(var(--app-logo-plate) / <alpha-value>)',
118
119
  'chart-grid': 'rgb(var(--app-chart-grid-color) / <alpha-value>)',
119
120
  'input-surface': 'rgb(var(--app-input-bg-color) / <alpha-value>)',
120
121
  'input-border': 'rgb(var(--app-input-border-color) / <alpha-value>)',