@maggioli-design-system/magma-react 2.4.1 → 2.5.1
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/AGENTS.md +1 -1
- package/CHANGELOG.md +39 -0
- package/LICENSE +21 -0
- package/agents/assets.md +10 -0
- package/agents/components.md +2 -1
- package/agents/conventions.md +12 -0
- package/dist/components.js +1 -0
- package/dist/components.server.js +1 -0
- package/dist/mds-link.js +12 -0
- package/dist/mds-link.server.js +21 -0
- package/dist/types/components.d.ts +1 -0
- package/dist/types/components.server.d.ts +1 -0
- package/dist/types/mds-link.d.ts +9 -0
- package/dist/types/mds-link.server.d.ts +11 -0
- package/package.json +3 -2
package/AGENTS.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
-->
|
|
6
6
|
# @maggioli-design-system/magma-react - agent install guide
|
|
7
7
|
|
|
8
|
-
> Version 2.
|
|
8
|
+
> Version 2.5.1. You (the agent) are installing Magma into THIS project. Do not
|
|
9
9
|
> assume the setup - detect it from the project, then ask the user only for what you
|
|
10
10
|
> cannot infer. The detailed steps live in [`agents/install.md`](agents/install.md)
|
|
11
11
|
> (this target) and [`agents/assets.md`](agents/assets.md) (shared styles, fonts,
|
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,45 @@ package.
|
|
|
7
7
|
It is released together with `magma`, at the same version: the sections are the
|
|
8
8
|
releases of `magma`.
|
|
9
9
|
|
|
10
|
+
## [magma@2.5.1] - 2026-10-22
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
- *(mds-stepper-bar-item)* Show the status of the step in its badge
|
|
15
|
+
- *(mds-input-range)* Draw a light thumb in dark, apart from the progress
|
|
16
|
+
- *(mds-input-range)* Keep the disabled colours in dark
|
|
17
|
+
- *(mds-input)* Show the validation messages in the language of the page
|
|
18
|
+
- *(mds-input-select)* Emit no change on load, before any selection
|
|
19
|
+
- *(mds-status-bar)* Keep the bar inside its area at 480px and less
|
|
20
|
+
- *(mds-keyboard)* Start the test with Enter without failing it at once
|
|
21
|
+
- *(mds-input)* Wait for the first blur to validate a required field
|
|
22
|
+
- *(mds-emoji)* Draw the emoji in Firefox, keep the inner svg flat
|
|
23
|
+
- *(mds-input)* Report maxlength and minlength under their own error keys
|
|
24
|
+
- *(stencil)* Give a page language with a region the texts of its base language
|
|
25
|
+
|
|
26
|
+
## [magma@2.5.0] - 2026-10-21
|
|
27
|
+
|
|
28
|
+
### Bug Fixes
|
|
29
|
+
|
|
30
|
+
- *(mds-card)* Keep the footer at the bottom of the card without a content
|
|
31
|
+
|
|
32
|
+
### Documentation
|
|
33
|
+
|
|
34
|
+
- *(magma,mds-button,mds-text)* Point links inside a sentence to mds-link
|
|
35
|
+
- *(stencil)* Require Magma tokens for the values of component sheets
|
|
36
|
+
- *(mds-input-switch)* Write the input tag and the type values as code
|
|
37
|
+
- *(mds-button,mds-link,mds-text)* Regenerate the readmes from the usage docs
|
|
38
|
+
- *(magma)* Write spacing with the numeric steps, a t-shirt size is a container size
|
|
39
|
+
|
|
40
|
+
### Features
|
|
41
|
+
|
|
42
|
+
- *(mds-link)* Add the inline link for running text
|
|
43
|
+
- *(mds-entity)* Expose the infos part, 2px between the name and the detail
|
|
44
|
+
|
|
45
|
+
### Refactor
|
|
46
|
+
|
|
47
|
+
- *(stencil)* Take the lengths and durations of the component sheets from the tokens
|
|
48
|
+
|
|
10
49
|
## [magma@2.4.1] - 2026-10-21
|
|
11
50
|
|
|
12
51
|
### Bug Fixes
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020-2026 Maggioli S.p.A.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/agents/assets.md
CHANGED
|
@@ -102,6 +102,16 @@ With Tailwind 4, import Magma's Tailwind layer in your Tailwind entry point (the
|
|
|
102
102
|
the `text-title-*` / `text-info-*` / `text-read-*` / `text-code-*` utilities,
|
|
103
103
|
`utilities.css` the `focus-bounce` / `focus-zoom` helpers.
|
|
104
104
|
|
|
105
|
+
Spacing and sizes:
|
|
106
|
+
|
|
107
|
+
- write spacing with the numeric steps, the step times `--spacing` (0.0025rem):
|
|
108
|
+
`p-600` is 1.5rem, `gap-400` 1rem;
|
|
109
|
+
- a t-shirt name on `w-*`, `min-w-*`, `max-w-*` and `basis-*` is a container size:
|
|
110
|
+
`max-w-2xl` is 640px, `w-xs` 320px, `basis-md` 448px, and `max-w-none` sets no limit;
|
|
111
|
+
- the logical `inline-*`, `min-inline-*` and `max-inline-*` still read the spacing step of
|
|
112
|
+
that name (`inline-2xl` is 48px): for a container width write
|
|
113
|
+
`inline-(--container-2xl)`.
|
|
114
|
+
|
|
105
115
|
Do not use the JS preset (`presets: [require('@maggioli-design-system/styles')]`) with
|
|
106
116
|
Tailwind 4: it is the Tailwind 3 path (with the layers in
|
|
107
117
|
`@maggioli-design-system/styles/dist/tailwind3/`), its colours are Tailwind 3 colour
|
package/agents/components.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Source of truth: docs/agents/ in the magma monorepo.
|
|
4
4
|
Regenerate with: npm run sync.agent-docs (from the stencil package).
|
|
5
5
|
-->
|
|
6
|
-
# Magma components catalogue (
|
|
6
|
+
# Magma components catalogue (116 components)
|
|
7
7
|
|
|
8
8
|
> Generated from each component's usage description. Each tag links the component's
|
|
9
9
|
> own `AGENTS.md` (its API, with `pattern.md` and `antipattern.md` beside it) in
|
|
@@ -70,6 +70,7 @@
|
|
|
70
70
|
| [`mds-kpi`](../../magma/dist/collection/components/mds-kpi/AGENTS.md) | The `<mds-kpi>` web component is the layout container of the Magma Design System for presenting groups of key performance indicators |
|
|
71
71
|
| [`mds-kpi-item`](../../magma/dist/collection/components/mds-kpi-item/AGENTS.md) | The `<mds-kpi-item>` web component is a compound child that represents a single key-performance-indicator entry - a prominent numeric `label` with an optional `description` and `icon` - inside its parent container `<mds-kpi>` |
|
|
72
72
|
| [`mds-label`](../../magma/dist/collection/components/mds-label/AGENTS.md) | The `<mds-label>` web component is the Magma Design System tag/chip used to display a short, non-interactive piece of text such as a status, a category, or a removable selection. |
|
|
73
|
+
| [`mds-link`](../../magma/dist/collection/components/mds-link/AGENTS.md) | The `<mds-link>` web component is the inline link of Magma: a word or a phrase inside running text, usually inside an `<mds-text>`, that opens a URL or runs an inline action |
|
|
73
74
|
| [`mds-list`](../../magma/dist/collection/components/mds-list/AGENTS.md) | The `<mds-list>` web component is the structural container of the Magma Design System list family |
|
|
74
75
|
| [`mds-list-item`](../../magma/dist/collection/components/mds-list-item/AGENTS.md) | The `<mds-list-item>` web component is the single entry of a Magma list, designed to be slotted exclusively inside its parent `<mds-list>` |
|
|
75
76
|
| [`mds-mention`](../../magma/dist/collection/components/mds-mention/AGENTS.md) | The `<mds-mention>` web component renders a compact inline chip that references a person or entity - the kind of token produced when you type `@name` in an editor or comment field |
|
package/agents/conventions.md
CHANGED
|
@@ -126,6 +126,11 @@ Maggioli):
|
|
|
126
126
|
(`mi/baseline/send` -> "send"), which names the icon, not the action. Other components
|
|
127
127
|
that accept `icon` without a label require `aria-label` (or `title`) on the host
|
|
128
128
|
element: they do not synthesize one.
|
|
129
|
+
- Links: a word or a phrase inside running text is an `mds-link` inside the `mds-text`,
|
|
130
|
+
never an `mds-button` (a block-level control with its own typography) nor a raw `<a>`
|
|
131
|
+
styled by hand. `mds-button` with `href` is for a standalone action that navigates, such
|
|
132
|
+
as a call to action. `mds-link` with `target="blank"` already tells the assistive
|
|
133
|
+
technology that it opens a new tab: do not write it in the text.
|
|
129
134
|
- Form components (`mds-input`, `mds-input-date`, `mds-input-date-range`, `mds-input-otp`,
|
|
130
135
|
`mds-input-range`, `mds-input-select`, `mds-input-switch`, `mds-input-upload`) are
|
|
131
136
|
form-associated (`formAssociated`) and behave like the native controls they replace:
|
|
@@ -168,6 +173,13 @@ Maggioli):
|
|
|
168
173
|
- Use the preference components / classes for high contrast and reduced motion - do not
|
|
169
174
|
hard-code those styles (see [`theming.md`](theming.md)).
|
|
170
175
|
|
|
176
|
+
## Language
|
|
177
|
+
|
|
178
|
+
- The texts of the components (labels, tooltips, validation messages) follow the language of
|
|
179
|
+
the page, `<html lang>`: Magma has them in `el`, `en`, `es` and `it`. A language with a
|
|
180
|
+
region gets the texts of its base language (`it-IT` and `it-CH` get `it`), and any other
|
|
181
|
+
language gets English. To let the user choose, add `mds-pref-language`.
|
|
182
|
+
|
|
171
183
|
## Styling components from outside
|
|
172
184
|
|
|
173
185
|
A component's styling API is what its `AGENTS.md` documents:
|
package/dist/components.js
CHANGED
|
@@ -60,6 +60,7 @@ export { MdsKeyboard } from "./mds-keyboard.js";
|
|
|
60
60
|
export { MdsKpiItem } from "./mds-kpi-item.js";
|
|
61
61
|
export { MdsKpi } from "./mds-kpi.js";
|
|
62
62
|
export { MdsLabel } from "./mds-label.js";
|
|
63
|
+
export { MdsLink } from "./mds-link.js";
|
|
63
64
|
export { MdsListItem } from "./mds-list-item.js";
|
|
64
65
|
export { MdsList } from "./mds-list.js";
|
|
65
66
|
export { MdsMention } from "./mds-mention.js";
|
|
@@ -60,6 +60,7 @@ export { MdsKeyboard } from "./mds-keyboard.server.js";
|
|
|
60
60
|
export { MdsKpiItem } from "./mds-kpi-item.server.js";
|
|
61
61
|
export { MdsKpi } from "./mds-kpi.server.js";
|
|
62
62
|
export { MdsLabel } from "./mds-label.server.js";
|
|
63
|
+
export { MdsLink } from "./mds-link.server.js";
|
|
63
64
|
export { MdsListItem } from "./mds-list-item.server.js";
|
|
64
65
|
export { MdsList } from "./mds-list.server.js";
|
|
65
66
|
export { MdsMention } from "./mds-mention.server.js";
|
package/dist/mds-link.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { createComponent } from '@stencil/react-output-target/runtime';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { MdsLink as MdsLinkElement, defineCustomElement as defineMdsLink } from "@maggioli-design-system/magma/dist/components/mds-link.js";
|
|
5
|
+
export const MdsLink = /*@__PURE__*/ createComponent({
|
|
6
|
+
tagName: 'mds-link',
|
|
7
|
+
elementClass: MdsLinkElement,
|
|
8
|
+
// @ts-ignore - ignore potential React type mismatches between the Stencil Output Target and your project.
|
|
9
|
+
react: React,
|
|
10
|
+
events: {},
|
|
11
|
+
defineCustomElement: defineMdsLink
|
|
12
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { createComponent } from '@stencil/react-output-target/ssr';
|
|
3
|
+
// @ts-ignore - ignore potential type issues as the project is importing itself
|
|
4
|
+
import * as clientComponents from "@maggioli-design-system/magma-react";
|
|
5
|
+
export const serializeShadowRoot = "declarative-shadow-dom";
|
|
6
|
+
export const MdsLink = /*@__PURE__*/ createComponent({
|
|
7
|
+
tagName: 'mds-link',
|
|
8
|
+
properties: {
|
|
9
|
+
label: 'label',
|
|
10
|
+
href: 'href',
|
|
11
|
+
target: 'target',
|
|
12
|
+
icon: 'icon',
|
|
13
|
+
iconPosition: 'icon-position',
|
|
14
|
+
variant: 'variant',
|
|
15
|
+
tone: 'tone',
|
|
16
|
+
underline: 'underline'
|
|
17
|
+
},
|
|
18
|
+
hydrateModule: typeof window === 'undefined' ? import('@maggioli-design-system/magma/hydrate') : undefined,
|
|
19
|
+
clientModule: clientComponents.MdsLink,
|
|
20
|
+
serializeShadowRoot
|
|
21
|
+
});
|
|
@@ -59,6 +59,7 @@ export { MdsKeyboard } from "./mds-keyboard.js";
|
|
|
59
59
|
export { MdsKpiItem } from "./mds-kpi-item.js";
|
|
60
60
|
export { MdsKpi } from "./mds-kpi.js";
|
|
61
61
|
export { MdsLabel } from "./mds-label.js";
|
|
62
|
+
export { MdsLink } from "./mds-link.js";
|
|
62
63
|
export { MdsListItem } from "./mds-list-item.js";
|
|
63
64
|
export { MdsList } from "./mds-list.js";
|
|
64
65
|
export { MdsMention } from "./mds-mention.js";
|
|
@@ -61,6 +61,7 @@ export { MdsKeyboard } from "./mds-keyboard.server.js";
|
|
|
61
61
|
export { MdsKpiItem } from "./mds-kpi-item.server.js";
|
|
62
62
|
export { MdsKpi } from "./mds-kpi.server.js";
|
|
63
63
|
export { MdsLabel } from "./mds-label.server.js";
|
|
64
|
+
export { MdsLink } from "./mds-link.server.js";
|
|
64
65
|
export { MdsListItem } from "./mds-list-item.server.js";
|
|
65
66
|
export { MdsList } from "./mds-list.server.js";
|
|
66
67
|
export { MdsMention } from "./mds-mention.server.js";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was automatically generated by the Stencil React Output Target.
|
|
3
|
+
* Changes to this file may cause incorrect behavior and will be lost if the code is regenerated.
|
|
4
|
+
*/
|
|
5
|
+
import type { StencilReactComponent } from '@stencil/react-output-target/runtime';
|
|
6
|
+
import type { Components } from "@maggioli-design-system/magma/dist/components";
|
|
7
|
+
import { MdsLink as MdsLinkElement } from "@maggioli-design-system/magma/dist/components/mds-link.js";
|
|
8
|
+
export type MdsLinkEvents = NonNullable<unknown>;
|
|
9
|
+
export declare const MdsLink: StencilReactComponent<MdsLinkElement, MdsLinkEvents, Components.MdsLink>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was automatically generated by the Stencil React Output Target.
|
|
3
|
+
* Changes to this file may cause incorrect behavior and will be lost if the code is regenerated.
|
|
4
|
+
*/
|
|
5
|
+
import type { StencilReactComponent } from '@stencil/react-output-target/runtime';
|
|
6
|
+
import { type SerializeShadowRootOptions } from '@stencil/react-output-target/ssr';
|
|
7
|
+
import type { Components } from "@maggioli-design-system/magma/dist/components";
|
|
8
|
+
import { MdsLink as MdsLinkElement } from "@maggioli-design-system/magma/dist/components/mds-link.js";
|
|
9
|
+
export declare const serializeShadowRoot: SerializeShadowRootOptions;
|
|
10
|
+
export type MdsLinkEvents = NonNullable<unknown>;
|
|
11
|
+
export declare const MdsLink: StencilReactComponent<MdsLinkElement, MdsLinkEvents, Components.MdsLink>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maggioli-design-system/magma-react",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.1",
|
|
4
|
+
"license": "MIT",
|
|
4
5
|
"main": "dist/components.js",
|
|
5
6
|
"module": "dist/components.js",
|
|
6
7
|
"types": "dist/types/components.d.ts",
|
|
@@ -34,7 +35,7 @@
|
|
|
34
35
|
"access": "public"
|
|
35
36
|
},
|
|
36
37
|
"dependencies": {
|
|
37
|
-
"@maggioli-design-system/magma": "2.
|
|
38
|
+
"@maggioli-design-system/magma": "2.5.1",
|
|
38
39
|
"@stencil/react-output-target": "1.6.5"
|
|
39
40
|
},
|
|
40
41
|
"repository": {
|