@websublime/line-components 0.2.0 → 0.2.2

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.
package/README.md CHANGED
@@ -1,3 +1,39 @@
1
1
  # @websublime/line-components
2
2
 
3
- Headless web component implementations for the line://ui design system. Empty in Phase 00 — the build pipeline is wired and smoke-tested, but no components ship until Phase 1.
3
+ Headless web component implementations for the line://ui design system. Each component ships as its own subpath
4
+ that registers one tag, and the root entry registers nothing.
5
+
6
+ | Subpath | Registers |
7
+ |---------|-----------|
8
+ | `@websublime/line-components/button` | `<line-button>` |
9
+ | `@websublime/line-components/stack` | `<line-stack>` |
10
+
11
+ ```js
12
+ import '@websublime/line-components/button';
13
+ ```
14
+
15
+ The package ships `custom-elements.json`, the Custom Elements Manifest of every component.
16
+
17
+ ## Stack
18
+
19
+ `<line-stack>` lays out its children in one row or one column with a gap between them. The host is the flex
20
+ container, it adds no role, and it exposes no `::part()`; style it directly with `line-stack { … }`.
21
+
22
+ | Attribute | Values | Default |
23
+ |-----------|--------|---------|
24
+ | `orientation` | `vertical`, `horizontal` | `vertical` |
25
+ | `justify` | `start`, `center`, `end`, `spaceBetween`, `spaceAround`, `spaceEvenly`, `stretch` (every item grows) | `start` |
26
+ | `align` | `start`, `center`, `end`, `stretch` | `stretch` |
27
+ | `gap` | `0`–`5` on the `--line-layout-gap-*` scale | step `2` |
28
+ | `wrap` | boolean | off |
29
+
30
+ ```html
31
+ <line-stack orientation="horizontal" justify="spaceBetween" align="center" gap="3">
32
+ <span>Title</span>
33
+ <line-button>Edit</line-button>
34
+ </line-stack>
35
+ ```
36
+
37
+ The gap reads `--line-stack-gap`, so load `@websublime/line-tokens/sizing` and `@websublime/line-tokens/layouts`
38
+ or set `--line-stack-gap` yourself; without them the gap is `0`. For a list, put `role="list"` on the host and
39
+ `role="listitem"` on each child.