@privaty/ui-forms 0.2.0 → 0.3.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/README.md CHANGED
@@ -63,10 +63,10 @@ everywhere else.
63
63
  input the way typing does** (DOM value + a bubbling `input` event), so
64
64
  validation cadence, touch marking, and dirty tracking are identical to
65
65
  manual entry — one write path, no programmatic special case.
66
- - `min`/`max` flow to both the native input and the picker;
67
- `DatePickerInput` adds `isDateDisabled`, `showWeekNumbers`,
68
- `firstDayOfWeek`, and `locale` (all picker-side — constraints still
69
- belong in the schema, typing can produce anything).
66
+ - `min`/`max` flow to both the native input and the picker, and `locale`
67
+ is on all three; `DatePickerInput` adds `isDateDisabled`,
68
+ `showWeekNumbers`, and `firstDayOfWeek` (all picker-side — constraints
69
+ still belong in the schema, typing can produce anything).
70
70
  - The trigger's accessible name comes from `labels.calendar.open`; while
71
71
  the form submits, the input turns readonly and the trigger disables.
72
72
 
@@ -126,8 +126,7 @@ availableFrom: v.pipe(v.string(), v.nonEmpty("required"), v.regex(/^\d{4}-\d{2}$
126
126
  - No-JS submissions are out of scope for v1 (Submit renders its gate state
127
127
  into SSR HTML).
128
128
  - Browser support: Firefox has no `type="month"`/`"week"` pickers (falls
129
- back to a text input) — a library-owned cross-browser date picker is
130
- planned post-v1.
129
+ back to a text input) — the picker inputs above fill exactly that gap.
131
130
 
132
131
  ## Testing
133
132
 
@@ -192,7 +192,15 @@ special programmatic branch.
192
192
  <span class="sr-only">{config.labels.calendar.open}</span>
193
193
  </button>
194
194
  {/snippet}
195
- {@render picker({ value: currentValue, select })}
195
+ <!-- The panel renders inside the consumer's <form>, and the
196
+ pickers' unnamed header dropdowns fire bubbling input events —
197
+ which Kit's form-level listener and the Form's validate-on-
198
+ input would otherwise treat as edits (validation round-trips
199
+ from pure calendar navigation). The carrier input's own
200
+ synthetic pick event fires OUTSIDE this wrapper. -->
201
+ <div oninput={(event) => event.stopPropagation()}>
202
+ {@render picker({ value: currentValue, select })}
203
+ </div>
196
204
  </Popover>
197
205
  </span>
198
206
  {/snippet}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@privaty/ui-forms",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -40,8 +40,8 @@
40
40
  },
41
41
  "peerDependencies": {
42
42
  "@sveltejs/kit": "^3.0.0-next.0",
43
- "svelte": "^5.0.0",
44
- "@privaty/ui": "^0.2.0"
43
+ "svelte": "^5.29.0",
44
+ "@privaty/ui": "^0.3.0"
45
45
  },
46
46
  "dependencies": {
47
47
  "@lucide/svelte": "^1.34.0",
@@ -56,8 +56,8 @@
56
56
  "svelte-check": "^4.7.6",
57
57
  "typescript": "^6.0.3",
58
58
  "@config/eslint": "0.0.0",
59
- "@config/typescript": "0.0.0",
60
- "@privaty/ui": "0.2.0"
59
+ "@privaty/ui": "0.3.0",
60
+ "@config/typescript": "0.0.0"
61
61
  },
62
62
  "scripts": {
63
63
  "check": "svelte-check --tsconfig ./tsconfig.json",