@momoi-labs/kiso 0.4.0 → 0.5.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
CHANGED
|
@@ -61,3 +61,12 @@ Code, config, and templates: **MIT**. Brand assets (name, logo, type):
|
|
|
61
61
|
**CC BY 4.0** — brand usage rules live in [`kiso/docs/brand.md`](kiso/docs/brand.md).
|
|
62
62
|
|
|
63
63
|
© 2026 Momoi Labs — [momoi-labs.dev](https://momoi-labs.dev)
|
|
64
|
+
|
|
65
|
+
## React components and releases
|
|
66
|
+
|
|
67
|
+
[`@momoi-labs/kiso-react`](packages/kiso-react/README.md) provides React components
|
|
68
|
+
using Kiso tokens and CSS. Run `npm ci` and `npm run prototype` to open the
|
|
69
|
+
Self Host simulation and the full component gallery.
|
|
70
|
+
|
|
71
|
+
See [Publishing Kiso](docs/publishing.md) for the first npm publication, trusted
|
|
72
|
+
publisher setup, release PRs, and version tags.
|
|
@@ -36,6 +36,7 @@ token consumption, and a Radix/shadcn behavioral reference where one exists.
|
|
|
36
36
|
|
|
37
37
|
## Navigation and structure
|
|
38
38
|
|
|
39
|
+
- [BrandMark](brand-mark.md): Decorative letter or icon beside a product name.
|
|
39
40
|
- [Breadcrumb](breadcrumb.md) — Shows the current location within a hierarchy.
|
|
40
41
|
- [Header](header.md) — Composes persistent application navigation and global actions.
|
|
41
42
|
- [Navigation](navigation.md) — Provides a generic semantic container for destination links.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# BrandMark
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
BrandMark is the small rounded square next to a product name in a sidebar or
|
|
6
|
+
login header. It holds a letter or a single inline SVG. The self-host console
|
|
7
|
+
uses the momoi-labs terminal prompt logo, as shown in
|
|
8
|
+
[self-host PR #48](https://github.com/momoi-labs/self-host/pull/48).
|
|
9
|
+
|
|
10
|
+
## Anatomy and variants
|
|
11
|
+
|
|
12
|
+
- A decorative `span` with the existing `.brand-mark` class.
|
|
13
|
+
- Letter content, such as "S", keeps the class's font weight and font size.
|
|
14
|
+
- Icon content uses `.icon.icon-sm`. The icon inherits `currentColor`, has no
|
|
15
|
+
fill, and uses a 1.75 stroke width with round caps and joins.
|
|
16
|
+
- The adjacent product name supplies the accessible name.
|
|
17
|
+
|
|
18
|
+
In React, pass either content through `children`, as with Button and Badge.
|
|
19
|
+
BrandMark adds the icon classes to an element child without an extra wrapper.
|
|
20
|
+
Custom icon components must forward `className` to their inline SVG.
|
|
21
|
+
|
|
22
|
+
`TerminalIcon` supplies the momoi-labs `>_` glyph on a 16 by 16 viewBox. Its
|
|
23
|
+
paths are `M4 4.5L8 8l-4 3.5` and `M9.5 11.5H13`.
|
|
24
|
+
|
|
25
|
+
## States and accessibility
|
|
26
|
+
|
|
27
|
+
BrandMark is static and always has `aria-hidden="true"`, including when a
|
|
28
|
+
consumer passes a different value. Keep the product name visible beside it.
|
|
29
|
+
Do not put interactive or focusable content inside the mark. If the brand
|
|
30
|
+
navigates, wrap the mark and product name together in a Link.
|
|
31
|
+
|
|
32
|
+
## Token consumption
|
|
33
|
+
|
|
34
|
+
The existing `.brand-mark` CSS remains unchanged. Grid placement centers the
|
|
35
|
+
content; `--size-control-sm` sets both dimensions and `--radius-lg` rounds the
|
|
36
|
+
corners. The background uses `--color-primary` and the foreground uses
|
|
37
|
+
`--color-primary-foreground`. Letter typography uses `--type-weight-bold` and
|
|
38
|
+
`--type-size-label`; icon dimensions use `--size-icon-sm`.
|
|
39
|
+
|
|
40
|
+
## Radix/shadcn mapping
|
|
41
|
+
|
|
42
|
+
There is no dedicated behavioral primitive. The React implementation uses
|
|
43
|
+
Radix Slot to merge icon classes onto the child SVG.
|
|
@@ -160,9 +160,9 @@ Map Kiso variants onto shadcn *by intent*, not by name:
|
|
|
160
160
|
|
|
161
161
|
| Kiso variant | shadcn `variant` |
|
|
162
162
|
| --- | --- |
|
|
163
|
-
| `primary` | `
|
|
163
|
+
| `primary` | `default`, restyled: `--color-primary` fill, `--color-primary-foreground` label. Do not restyle shadcn's `outline` into an accent-text primary — that treatment reads as a secondary control. |
|
|
164
164
|
| `default` | `outline` with `--color-foreground` / `--color-border` |
|
|
165
|
-
| `destructive` | `
|
|
165
|
+
| `destructive` | `destructive`, restyled: `--color-danger` fill, `--color-danger-foreground` label |
|
|
166
166
|
| `ghost` | `ghost` |
|
|
167
167
|
|
|
168
168
|
Do **not** use shadcn `variant="link"`. That style is [Link](link.md).
|
|
@@ -145,7 +145,7 @@ No dedicated Radix or shadcn `IconButton` primitive. Implement as shadcn
|
|
|
145
145
|
| IconButton `sm` | `size="icon-sm"` (or `icon-xs` only if it still uses `--spacing-xs` padding) |
|
|
146
146
|
| IconButton `md` | `size="icon"` |
|
|
147
147
|
| IconButton `lg` | `size="icon-lg"` |
|
|
148
|
-
| variants | Same Button mapping as [Button](button.md) (Kiso `primary`
|
|
148
|
+
| variants | Same Button mapping as [Button](button.md) (Kiso `primary` is a fill, `default` starts from shadcn `outline`) |
|
|
149
149
|
|
|
150
150
|
Always pass `aria-label`. Do not rely on the icon's title or a Tooltip
|
|
151
151
|
alone.
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@momoi-labs/kiso",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Kiso design-system contracts and generated design tokens",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
|
-
"url": "git+https://github.com/momoi-labs/blueprint.git"
|
|
8
|
+
"url": "git+https://github.com/momoi-labs/blueprint.git",
|
|
9
|
+
"directory": "packages/kiso"
|
|
9
10
|
},
|
|
10
11
|
"type": "module",
|
|
11
12
|
"files": [
|
|
@@ -22,23 +23,11 @@
|
|
|
22
23
|
"./contracts/*": "./kiso/*"
|
|
23
24
|
},
|
|
24
25
|
"scripts": {
|
|
25
|
-
"build": "
|
|
26
|
-
"
|
|
27
|
-
"check:generated": "git diff --exit-code -- tokens/build/",
|
|
28
|
-
"check:tokens": "node scripts/validate-dtcg.mjs && node scripts/check-contrast.mjs tokens/tokens.json && node scripts/check-component-token-refs.mjs",
|
|
29
|
-
"changeset": "changeset",
|
|
30
|
-
"release": "changeset publish"
|
|
26
|
+
"build": "node ../../scripts/build-kiso-package.mjs",
|
|
27
|
+
"prepack": "npm run build"
|
|
31
28
|
},
|
|
32
29
|
"publishConfig": {
|
|
33
30
|
"access": "public",
|
|
34
31
|
"provenance": true
|
|
35
|
-
},
|
|
36
|
-
"devDependencies": {
|
|
37
|
-
"@changesets/cli": "^2.29.7",
|
|
38
|
-
"ajv": "^8.17.1",
|
|
39
|
-
"style-dictionary": "^5.0.0"
|
|
40
|
-
},
|
|
41
|
-
"engines": {
|
|
42
|
-
"node": ">=24"
|
|
43
32
|
}
|
|
44
33
|
}
|