Website for showcasing all features of Tesseract Web.
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

philosophy.md 7.7 KiB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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">` | `numeric/Spinner` | Use this component for discrete values. |
  39. | `<input type="range">` | `numeric/Slider` | Use this component for continuous values. |
  40. | `<input type="date">` with dropdown calendar | `temporal/DateDropdown` | |
  41. | `<input type="date">` as inline calendar | `temporal/Calendar` | Falls back to native date input. |
  42. | `<input type="time">` with spinners for hour, minute, seconds, and milliseconds; switch for (AM/PM) selection | `temporal/TimeSpinner` | Optional seconds and milliseconds. |
  43. | `<input type="time">` with clock face | `temporal/Clock` | Falls back to native time input. |
  44. ## Additional components
  45. | Component | Tesseract implementation | Remarks |
  46. |-----------------------|--------------------------|------------------------------------------------------------------------------------------------------------------------------|
  47. | Tag input | `option/TagInput` | Can specify predefined options (like `<input>` with `list` attribute). |
  48. | X-Y select (2D range) | `numeric/Range2D` | |
  49. | Knob | `numeric/Knob` | |
  50. | Duration input | `temporal/DurationInput` | Can specify precision up to milliseconds, falls back to native number input (always returns milliseconds for compatibility). |