@tonycodes-ui/mortar 0.18.0 → 0.19.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/CHANGELOG.md +3 -3
- package/catalog.json +119 -119
- package/dist/agent-data.json +1 -1
- package/docs/email.md +2 -0
- package/docs/native.md +14 -10
- package/package.json +1 -1
package/docs/email.md
CHANGED
|
@@ -104,6 +104,8 @@ Every template takes `productName`, and optionally `theme`, `logo`, `footer` (re
|
|
|
104
104
|
| `Receipt` | An order confirmation or receipt | `orderNumber`, `date`, `items`, `total`; optional `lines`, `paymentMethod`, `href` ("View order"), `title` |
|
|
105
105
|
| `Notification` | A product notification | `title`, `children` (a string becomes a paragraph); optional `action` (`{ label, href }`), `preview`, `preferencesHref` |
|
|
106
106
|
|
|
107
|
+
To see every template rendered, at phone and desktop widths and in three brands, with its plain-text part, open the playground's **Email preview** (`?page=email`).
|
|
108
|
+
|
|
107
109
|
Send a password reset only to an address that has an account, and show the same "check your email" page either way, so the form never reveals whether an account exists.
|
|
108
110
|
|
|
109
111
|
## Rules
|
package/docs/native.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Mortar is coming to iPhone, iPad and Android as a SwiftUI package and a Jetpack Compose library, tracked in [#95](https://github.com/tonycodes/mortar/issues/95). This page covers what exists so far: the design tokens both libraries are built on, and the first SwiftUI and Jetpack Compose components.
|
|
4
4
|
|
|
5
|
+
The playground's **Native gallery** (`?page=native`) shows each component on the web beside its SwiftUI and Compose snapshot references, in light, dark and large text.
|
|
6
|
+
|
|
5
7
|
## Tokens
|
|
6
8
|
|
|
7
9
|
SwiftUI and Compose cannot read `tokens.css`, so each library gets its tokens as literal values in a generated file:
|
|
@@ -47,16 +49,18 @@ Button("Cancel", action: cancel).buttonStyle(.mortar(.ghost))
|
|
|
47
49
|
|
|
48
50
|
A brand is a `MortarTheme`: its light and dark `MortarPalette`s, font family names (registered by the app) and density. Every component reads the palette that matches the colour scheme, and scales its text with Dynamic Type.
|
|
49
51
|
|
|
50
|
-
| Component | Web equivalent | Notes
|
|
51
|
-
| ---------------------------------------------------------- | -------------- |
|
|
52
|
-
| `MortarButton`, `.buttonStyle(.mortar(_:size:isLoading:))` | Button | `primary
|
|
53
|
-
| `MortarBadge` | Badge | Tones `neutral`, `info`, `success`, `warning`, `danger`.
|
|
54
|
-
| `MortarCard` | Card | Title, description, header actions, footer, `compact` or `none` padding, `muted` tone.
|
|
55
|
-
| `MortarTextField` | Input | Label, prompt, hint, error, required marker, secure entry. VoiceOver reads the label as its name, then "required", the error and the hint.
|
|
56
|
-
| `MortarSwitch`, `.toggleStyle(.mortar)` | Switch | The whole row toggles; VoiceOver sees a standard switch.
|
|
57
|
-
| `MortarAvatar` | Avatar | Image URL with initials while loading or on failure, five sizes, circle or square, online or offline status, decorative.
|
|
58
|
-
| `MortarNotice` | Notice | Tone, message, actions, dismiss button, VoiceOver announcement.
|
|
59
|
-
| `MortarEmptyState` | EmptyState | SF Symbol, description, action, dashed, centred or leading.
|
|
52
|
+
| Component | Web equivalent | Notes |
|
|
53
|
+
| ---------------------------------------------------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
54
|
+
| `MortarButton`, `.buttonStyle(.mortar(_:size:isLoading:))` | Button | `primary` (the default, as on the web), `secondary`, `ghost`, `danger`, `accent`; `sm`, `md`, `lg`; loading; SF Symbol, icon-only with the title as its accessible name. Medium is at least 44pt tall. |
|
|
55
|
+
| `MortarBadge` | Badge | Tones `neutral`, `info`, `success`, `warning`, `danger`. |
|
|
56
|
+
| `MortarCard` | Card | Title, description, header actions, footer, `compact` or `none` padding, `muted` tone. |
|
|
57
|
+
| `MortarTextField` | Input | Label, prompt, hint, error, required marker, secure entry. VoiceOver reads the label as its name, then "required", the error and the hint. |
|
|
58
|
+
| `MortarSwitch`, `.toggleStyle(.mortar)` | Switch | The whole row toggles; VoiceOver sees a standard switch. |
|
|
59
|
+
| `MortarAvatar` | Avatar | Image URL with initials while loading or on failure, five sizes, circle or square, online or offline status, decorative. |
|
|
60
|
+
| `MortarNotice` | Notice | Tone, message, actions, dismiss button, VoiceOver announcement. |
|
|
61
|
+
| `MortarEmptyState` | EmptyState | SF Symbol, description, action, dashed, centred or leading. |
|
|
62
|
+
|
|
63
|
+
On both platforms the switch sits at the end of its row, after the label, as in iOS and Android settings; on the web it comes first.
|
|
60
64
|
|
|
61
65
|
### Snapshot tests
|
|
62
66
|
|