ShtukbaseStandard
страница пакета→ /design/components.md

pages/design/components.md

58 строк, 2.4 КБ. Как страница.

Этот текст ещё не переведён. Ниже английский оригинал.

  1. ---
  2. type: Collection
  3. title: Components
  4. icon: "🧩"
  5. description: "The components of the design, by level: primitive, composite, block, page. One record per component id; the HTML and the React implementations are joined on it."
  6. itemType: Component
  7. items: {mode: path, path: /design/components, recursive: false}
  8. writeTo: /design/components
  9. sources: []
  10. properties:
  11. level:
  12. kind: select
  13. label: "Level"
  14. options:
  15. - {name: primitive, label: "Primitive (registry:ui)", color: blue}
  16. - {name: composite, label: "Composite (registry:component)", color: green}
  17. - {name: block, label: "Block (registry:block)", color: orange}
  18. - {name: page, label: "Page (registry:page)", color: purple}
  19. uses: {kind: relation, collection: /design/components, multiple: true, label: "Uses"}
  20. parts: {kind: text, label: "Parts (data-slot names)"}
  21. states: {kind: text, label: "Interaction states"}
  22. status: {kind: text, label: "Data states (data-status)"}
  23. html: {kind: text, label: "HTML implementation"}
  24. react: {kind: text, label: "React implementation"}
  25. source: {kind: text, label: "Source file with the header"}
  26. views:
  27. - id: components--by-level
  28. name: By level
  29. layout: board
  30. fields: {}
  31. board:
  32. preview: page-content
  33. cardSize: small
  34. wrap: true
  35. grouping:
  36. by: level
  37. colorBy: level
  38. properties:
  39. - {name: title, visible: true}
  40. - {name: states, visible: true}
  41. - {name: html, visible: false}
  42. - id: components--table
  43. name: All components
  44. layout: table
  45. fields: {}
  46. properties:
  47. - {name: title, visible: true, width: 260}
  48. - {name: level, visible: true}
  49. - {name: uses, visible: true}
  50. - {name: states, visible: true}
  51. - {name: status, visible: true}
  52. - {name: html, visible: true}
  53. - {name: react, visible: true}
  54. ---
  55. The components of the design. A component is described once, in the header of its code file (see [the component header](/design/components-header.md)); the action `sync` of the package `design-components` turns every header into one page here. Do not edit the header of these pages: edit the header in the code file and run `shtuk run design-components sync`. The text under the header of a page is yours: write there what the component is for and when to use it.
  56. `sources:` in the header of this page lists extra folders that hold component files, besides `/design/<library>/components/`.