foldkit-mixins-ui 0.8.0 → 0.10.0
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 +7 -0
- package/dist/index.d.mts +789 -11360
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +183 -19
- package/dist/index.mjs.map +1 -1
- package/package.json +12 -12
package/README.md
CHANGED
|
@@ -26,6 +26,12 @@ foldkit-mixins
|
|
|
26
26
|
This package adds **no component state and no renderer**. It is only a bridge
|
|
27
27
|
between an existing `@foldkit/ui` render seam and the Mixins resolver.
|
|
28
28
|
|
|
29
|
+
Every shipped recipe is on the website's
|
|
30
|
+
[component pages](https://foldkit-plus.pages.dev/components), each with its
|
|
31
|
+
variants to pick and the code that draws it, and
|
|
32
|
+
[Create a theme](https://foldkit-plus.pages.dev/create) turns the theme's knobs
|
|
33
|
+
over all of them at once.
|
|
34
|
+
|
|
29
35
|
## The mental model
|
|
30
36
|
|
|
31
37
|
An `@foldkit/ui` component commonly hands its caller one or more attribute
|
|
@@ -432,6 +438,7 @@ A `label` makes the icon `role="img"`. Without one the glyph is `aria-hidden`.
|
|
|
432
438
|
| `Breadcrumb` | `{ steps: { label, href?, current? }[] }`. `current` is text with `aria-current="page"`; the others are links. | No axis. Slots `root`, `list`, `item`, `link`, `current`. |
|
|
433
439
|
| `ButtonGroup` | `{ label, items }`. `role="group"`. The buttons stay the caller's. `Segmented` is the control that selects. | No axis. Slot `root`. |
|
|
434
440
|
| `Card` | `{ content, title?, description?, footer?, action? }`. | `padding`: `comfortable` (default), `roomy`, `flush`. Slots `root`, `header`, `title`, `description`, `content`, `footer`, `action`. |
|
|
441
|
+
| `CodeBlock` | `{ code, tokens?, language?, title?, lineNumbers?, copy? }`. `tokens` are `{ from, to, kind }`, as `foldkit-richtext-code` and `foldkit-richtext-code-shiki` tokenizers return them; each is drawn with `data-kind`, and a token out of order or outside the code throws. The block's text is the code exactly. `copy: { onCopy?, copied? }`: `onCopy` gets the code, so run `copyText` from `foldkit-primitives`; without it the button has no handler, for a page whose script copies. `CodeBlock.linesOf` is the cut. | No axis. Colors each kind from the theme's `syntax` group; `data-line-numbers` numbers lines, `data-copied` marks a copy done. Slots `root`, `header`, `title`, `copy`, `body`, `code`, `line`, `token`. |
|
|
435
442
|
| `Empty` | `{ title, description?, icon?, action? }`. | No axis. Slots `root`, `icon`, `title`, `description`, `action`. |
|
|
436
443
|
| `Icon` | `{ content, label? }`. A `label` is `role="img"`; without one the glyph is `aria-hidden`. | `size`: `sm`, `md` (default), `lg`. Slot `glyph`. |
|
|
437
444
|
| `Item` | `{ content, media?, title?, description?, actions? }`. | `density`: `comfortable` (default), `compact`. Slots `root`, `media`, `content`, `title`, `description`, `actions`. |
|