gitoria

components

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Branchvendor-day727e428ba6Re-vendor Hybriel day72 (day73 withdrawn: minifier breaks write sets)Atlasvendor-day72/components/range-picker/README.md

1.7 KB

  1. # Date range picker
  2. HTML has no date range field. This is one text field for a period: click it, a month opens under it; click a
  3. day for the start, click another for the end. The start and end are marked, the days between are highlighted.
  4. The value is `YYYY-MM-DD – YYYY-MM-DD` (start – end). If the second day is before the first, they swap.
  5. Typing works too (`2028-02-01 – 2028-02-29`); text that is not two real days marks the field (`aria-invalid="true"`).
  6. Escape, Enter, or focusing the field again while only the start is picked drops that start and keeps the old range.
  7. Live demo: https://components.hybriel.worldapi.org/range-picker
  8. Pure Hybriel: one file, no JavaScript file. The browser's today is read, and the names follow the page language (`<html lang>`, English when none), when the field gets focus.
  9. ## Use it in an app
  10. Copy `components/range-picker/range-picker.hl` (optionally `shared/tokens.hl` for the app's own accent; it carries its own `Style`), then:
  11. ```
  12. import RangePicker from './range-picker.hl'
  13. View {
  14. form { method = "get" action = "/search"
  15. RangePicker { }
  16. }
  17. }
  18. ```
  19. - The field is named `range` (member `name`); it posts as `range=YYYY-MM-DD – YYYY-MM-DD`.
  20. - Do not wrap the picker in a `<label>`.
  21. - One per page (a composed component's members are the page's state).
  22. - Colours are the semantic tokens only, each with a black/white/grey fallback: the base look is black, white and greys (no frames; root README "Look"); an app that declares the WorldAPI tokens (layouts.worldapi.org's theme) restyles it.
  23. ## Not yet
  24. Setting the range from the page, reading start and end as separate members in the host (a composed component's members
  25. cannot be read by its host, hybriel#87), a second picker on one page.

Branches

Latest commits

  • 7e428ba6Re-vendor Hybriel day72 (day73 withdrawn: minifier breaks write sets)Atlas
  • a06fc778Reset virtual-list window when the host changes resetKeyAtlas
  • 3aab598cRe-vendor complete Hybriel day73 set for virtual-list resetAtlas
  • 337ca075MD1 gate check measures frames in the page, not milliseconds from outside, and takes the middle load (components#30)mre
  • f5f131c5Record AP29 autoplay comparisons and passing gatesmre
  • 51c38187Gate media autoplay on first load and after client mountmre
  • a3f2223dRecord successful B44 deployment and live proofmre
  • 06c1e021Record passing B44 browser rerunmre
  • c9861533Record B44 component proof and browser gate blockermre
  • 1b7413beIgnore detached media events and space demo option outputsmre
  • ca3b4959Re-vendor complete Hybriel plugins and runtime to day44mre
  • df9e7df9Last-item checks run in the browser gate (components#26 fixed on day41); media-player loop is a plain Booleanmre
  • 895a5afcRe-vendor complete Hybriel plugins and runtime to day41mre
  • 16006bb3Backup tar: --hard-dereference, so mpackdb sidecars are never stored as hard links (Tracker's finding)mre
  • 88397fc3Re-vendor complete Hybriel plugins and runtime to day39mre
  • 9b872cedRecord IC28 deployment and live icon verificationmre
  • 46fefaa7Count the icons entry in the offline home-page checkmre
  • c7e14cabRecord IC28 rerun and unchanged-main baseline comparisonmre
  • 5e090ffdRecord IC28 review evidence and gate resultsmre
  • adfe2c4dAdd shuffle, repeat and repeatOne shared iconsmre