@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 +37 -1
- package/custom-elements.json +2013 -241
- package/dist/button/button.d.ts +84 -0
- package/dist/button/button.d.ts.map +1 -0
- package/dist/button/button.types.d.ts +13 -0
- package/dist/button/button.types.d.ts.map +1 -0
- package/dist/button/index.d.ts +3 -0
- package/dist/button/index.d.ts.map +1 -0
- package/dist/button/index.js +333 -0
- package/dist/button/index.js.map +1 -0
- package/dist/shared/button-machine.d.ts +71 -0
- package/dist/shared/button-machine.d.ts.map +1 -0
- package/dist/stack/index.d.ts +3 -0
- package/dist/stack/index.d.ts.map +1 -0
- package/dist/stack/index.js +155 -0
- package/dist/stack/index.js.map +1 -0
- package/dist/stack/stack.d.ts +37 -0
- package/dist/stack/stack.d.ts.map +1 -0
- package/dist/stack/stack.types.d.ts +9 -0
- package/dist/stack/stack.types.d.ts.map +1 -0
- package/package.json +13 -4
- package/src/button/button.ts +372 -0
- package/src/button/button.types.ts +16 -0
- package/src/button/index.ts +9 -0
- package/src/shared/button-machine.ts +140 -0
- package/src/stack/index.ts +3 -0
- package/src/stack/stack.ts +169 -0
- package/src/stack/stack.types.ts +11 -0
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.
|
|
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.
|