@lekoala/date-picker 0.3.0 → 0.5.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.
Files changed (41) hide show
  1. package/README.md +281 -263
  2. package/custom-elements.json +30 -0
  3. package/dist/date-picker.css +51 -46
  4. package/dist/date-picker.js +685 -204
  5. package/dist/date-picker.min.css +1 -1
  6. package/dist/date-picker.min.js +13 -13
  7. package/dist/date-picker.standalone.min.js +65 -60
  8. package/dist/types/control-classes.d.ts +30 -0
  9. package/dist/types/control-classes.d.ts.map +1 -0
  10. package/dist/types/date-calendar.d.ts +49 -3
  11. package/dist/types/date-calendar.d.ts.map +1 -1
  12. package/dist/types/date-field.d.ts +12 -4
  13. package/dist/types/date-field.d.ts.map +1 -1
  14. package/dist/types/date-picker.d.ts +106 -9
  15. package/dist/types/date-picker.d.ts.map +1 -1
  16. package/dist/types/date-range.d.ts +102 -20
  17. package/dist/types/date-range.d.ts.map +1 -1
  18. package/dist/types/date.d.ts +14 -2
  19. package/dist/types/date.d.ts.map +1 -1
  20. package/dist/types/index.d.ts +1 -0
  21. package/dist/types/index.d.ts.map +1 -1
  22. package/dist/types/intl.d.ts.map +1 -1
  23. package/dist/types/source.d.ts +1 -0
  24. package/dist/types/source.d.ts.map +1 -1
  25. package/docs/ACCESSIBILITY.md +6 -2
  26. package/docs/API.md +430 -358
  27. package/docs/DECISIONS.md +68 -49
  28. package/docs/MIGRATION-FLATPICKR.md +1 -1
  29. package/docs/TESTING.md +1 -1
  30. package/docs/USE_CASES.md +156 -141
  31. package/package.json +8 -8
  32. package/src/control-classes.js +50 -0
  33. package/src/date-calendar.js +188 -54
  34. package/src/date-field.js +9 -5
  35. package/src/date-picker.css +51 -46
  36. package/src/date-picker.js +392 -83
  37. package/src/date-range.js +184 -30
  38. package/src/date.js +57 -3
  39. package/src/index.js +1 -0
  40. package/src/intl.js +52 -17
  41. package/src/source.js +14 -4
@@ -38,7 +38,11 @@ Weekday headings use visible short labels plus a full `abbr` value.
38
38
  | Shift+PageDown | same/clamped day in next year |
39
39
  | Enter / Space | activate focused date |
40
40
 
41
- Moving focus never changes selection.
41
+ Moving focus never changes selection. Each cell that actually receives focus dispatches `datefocus`, so an application can follow keyboard navigation without reading internal DOM classes; hover never dispatches it, and assigning `focusedDate` without moving focus stays silent.
42
+
43
+ A range preview projected onto the band is visual only: it never contributes a range start/end to a day's accessible name, so a proposal is never announced as a committed selection.
44
+
45
+ Endpoint dragging is a pointer enhancement. Every adjustment it offers is also reachable from the keyboard: activating before or after a complete range moves the corresponding bound.
42
46
 
43
47
  ## Month/year controls
44
48
 
@@ -110,7 +114,7 @@ Guard: re-run the `color-contrast` review and the forced-colors screenshot bundl
110
114
 
111
115
  ## Visible focus
112
116
 
113
- The default focus language uses `--dp-accent`, so the picker holds together without a consumer stylesheet (`outline: none` plus an accent border and a light halo). Only the focus state is normalized: the resting input appearance stays consumer-owned.
117
+ Fields (including native time companions), calendar header controls and day cells use an inner solid outline. `--dp-focus` defaults to `var(--dp-accent)` and `--dp-focus-width` defaults to `2px`; the inward offset follows the width. This replaces the previous accent border and soft halo on fields and header controls. The resting input appearance stays consumer-owned.
114
118
 
115
119
  Focus is only ever drawn on a real box. The calendar trigger is a real button painted inside the date field's own box, so the field's focus ring naturally wraps the affordance too — no host-level ring, no pseudo-element. When the trigger itself is focused it shows a small inner ring, like the native `input[type=time]` indicator, instead of pretending the whole field is focused.
116
120