@samline/forms 2.10.0 → 2.11.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/CHANGELOG.md +8 -2
- package/README.md +1 -1
- package/dist/browser/global.d.ts +1 -1
- package/dist/browser/global.global.js +13 -13
- package/dist/browser/global.global.js.map +1 -1
- package/dist/browser/index.d.cts +1 -1
- package/dist/browser/index.d.ts +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/{registry-CPe_lf8-.d.cts → registry-Bzd3unBb.d.cts} +1 -1
- package/dist/{registry-CPe_lf8-.d.ts → registry-Bzd3unBb.d.ts} +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,7 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@samline/forms` are documented in this file. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and the project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
4
4
|
|
|
5
|
-
## [
|
|
5
|
+
## [2.11.0] - 2026-11-13
|
|
6
|
+
|
|
7
|
+
No breaking API changes.
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- `FormatType` accepts `'text'` and `'slug'`, the format types added in `@samline/formatter` 3.1.0. `text` applies a casing mode (`options.case`: `'upper'`, `'lower'`, `'title'`, `'sentence'` or `'capitalize'`); `slug` keeps a trailing separator in the visible input while the user types and submits the trimmed slug in the hidden input. Both need formatter 3.1.0 or newer; the optional peer range stays `^2.1.0 || ^3.0.0`.
|
|
12
|
+
- The standalone script bundles formatter 3.1.0.
|
|
6
13
|
|
|
7
14
|
## [2.10.0] - 2026-11-12
|
|
8
15
|
|
|
@@ -303,7 +310,6 @@ No breaking API changes. The behavior changes below fix incorrect or surprising
|
|
|
303
310
|
|
|
304
311
|
- Initial release of `@samline/forms`. Vanilla JS form controller with framework-specific variants (React, Vue, Svelte) initially included; bundled `.local/` agent docs at the repo root.
|
|
305
312
|
|
|
306
|
-
[Unreleased]: https://github.com/samline/forms/compare/v2.10.0...HEAD
|
|
307
313
|
[2.10.0]: https://github.com/samline/forms/compare/v2.9.0...v2.10.0
|
|
308
314
|
[2.9.0]: https://github.com/samline/forms/compare/v2.8.0...v2.9.0
|
|
309
315
|
[2.8.0]: https://github.com/samline/forms/compare/v2.7.2...v2.8.0
|
package/README.md
CHANGED
|
@@ -78,7 +78,7 @@ Invalid submits are always prevented and focus moves to the first invalid field.
|
|
|
78
78
|
The standalone build defines `window.Forms` and already includes `@samline/formatter`. Pin the version.
|
|
79
79
|
|
|
80
80
|
```html
|
|
81
|
-
<script src="https://unpkg.com/@samline/forms@2.
|
|
81
|
+
<script src="https://unpkg.com/@samline/forms@2.11.0/dist/browser/global.global.js"></script>
|
|
82
82
|
<script>
|
|
83
83
|
const signup = window.Forms.form('signup', {
|
|
84
84
|
validators: { email: { required: true, pattern: /^[^\s@]+@[^\s@]+\.[^\s@]+$/ } },
|
package/dist/browser/global.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
type FormatType = 'general' | 'phone' | 'numeral' | 'date' | 'time' | 'creditCard' | 'creditCardType';
|
|
1
|
+
type FormatType = 'general' | 'phone' | 'numeral' | 'date' | 'time' | 'creditCard' | 'creditCardType' | 'text' | 'slug';
|
|
2
2
|
interface FieldFormatConfig {
|
|
3
3
|
/** One of the supported `@samline/formatter` `FormatType` values. */
|
|
4
4
|
type: FormatType;
|