Website for showcasing all features of Tesseract Web.
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

philosophy.md 5.0 KiB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. # Tesseract Web
  2. ## Rationale
  3. - Every component library makes their own conventions of component organization
  4. - Graceful degradation through backwards compatibility with HTML controls is not the main focus
  5. - In return, aspects such as accessibility may suffer since HTML controls are generally compliant to accessibility
  6. considerations suggested by approved standards
  7. - Emerging Web applications are at risk of deviating through said standards which can fragment the Web platform
  8. implementation
  9. - Hopefully we can inspire component development through the component organization we are proposing;
  10. everyone can have their own implementations
  11. - cf. Authoring (publishing interfaces) vs Dependency (coercing consumers to adapt to concrete implementations)
  12. ## Ground Rules
  13. - Each component is an enhanced version of an HTML control (see [HTML enhancement](#html-enhancement))
  14. - Each component should only do one thing and one thing only in terms of purpose and appearance (contrast to HTML's
  15. `<input>` where its function is overloaded depending on its `type` attribute)
  16. - Each component has decoupled styling, wherein each styling has their own API
  17. - This styling API is then made cross-framework compatible
  18. - This styling API allows use of dynamic styles (which then requires CSS-in-JS way of application)
  19. ## HTML enhancement
  20. | HTML element | Tesseract counterpart | Remarks |
  21. |----------------------------------------------------------------------------|-------------------------------|------------------------------------------------------------------------------|
  22. | `<button>` | `action/ActionButton` | |
  23. | `<input type="button">` | `action/ActionButton` | |
  24. | `<input type="reset">` | `action/ActionButton` | |
  25. | `<input type="submit">` | `action/ActionButton` | |
  26. | `<textarea>` | `freeform/MultilineTextInput` | |
  27. | `<input type="text">` | `freeform/TextInput` | |
  28. | `<input type="search">` | `freeform/TextInput` | The consumer may choose to add a search icon (magnifying glass) as indicator |
  29. | `<input type="password">` | `freeform/MaskedTextInput` | |
  30. | `<a>` with button appearance | `navigation/LinkButton` | |
  31. | `<select>` without `multiple` attribute and with dropdown appearance | `option/DropdownSelect` | |
  32. | `<select>` with list box appearance | `option/MenuSelect` | The `multiple` prop can be set here. |
  33. | `<input type="checkbox">` with `indeterminate` state | `option/ToggleTickBox` | |
  34. | `<input type="checkbox">` with `indeterminate` state and button appearance | `option/ToggleButton` | |
  35. | `<input type="checkbox">` without `indeterminate` state | `option/ToggleSwitch` | Prefer using this component when indeterminate state is not expected. |
  36. | `<input type="radio">` | `option/RadioTickBox` | |
  37. | `<input type="radio">` with button appearance | `option/RadioButton` | |
  38. | `<input type="number">` | `number/Spinner` | Use this component for discrete values. |
  39. | `<input type="range">` | `number/Slider` | Use this component for continuous values. |