@junoput01/junoui 0.2.0 → 0.4.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/CHANGELOG.md +251 -0
- package/README.md +23 -19
- package/dist/css/juno-custom-media.css +32 -0
- package/dist/css/juno.css +1355 -40
- package/dist/icons/inline.js +22 -0
- package/docs/accessibility.md +188 -0
- package/docs/boot-shell.md +295 -0
- package/docs/components/README.md +71 -0
- package/docs/components/accordion.md +49 -0
- package/docs/components/alert.md +46 -0
- package/docs/components/avatar.md +45 -0
- package/docs/components/badge.md +35 -0
- package/docs/components/breadcrumb.md +31 -0
- package/docs/components/button.md +32 -0
- package/docs/components/card.md +41 -0
- package/docs/components/checkbox.md +41 -0
- package/docs/components/chip.md +44 -0
- package/docs/components/divider.md +32 -0
- package/docs/components/dock.md +215 -0
- package/docs/components/drawer.md +100 -0
- package/docs/components/field.md +44 -0
- package/docs/components/fold-slot.md +31 -0
- package/docs/components/gauge.md +48 -0
- package/docs/components/icon-loader.md +122 -0
- package/docs/components/icon.md +70 -0
- package/docs/components/input.md +45 -0
- package/docs/components/list.md +76 -0
- package/docs/components/load-state.md +131 -0
- package/docs/components/loader.md +88 -0
- package/docs/components/menu.md +54 -0
- package/docs/components/modal.md +52 -0
- package/docs/components/navbar.md +53 -0
- package/docs/components/pagination.md +42 -0
- package/docs/components/pillbar.md +211 -0
- package/docs/components/popover.md +43 -0
- package/docs/components/rail.md +54 -0
- package/docs/components/readout.md +39 -0
- package/docs/components/reload.md +41 -0
- package/docs/components/segmented.md +46 -0
- package/docs/components/select.md +33 -0
- package/docs/components/skeleton.md +45 -0
- package/docs/components/slider.md +48 -0
- package/docs/components/spark.md +51 -0
- package/docs/components/status.md +30 -0
- package/docs/components/stepper.md +46 -0
- package/docs/components/switch.md +38 -0
- package/docs/components/table.md +126 -0
- package/docs/components/tabs.md +61 -0
- package/docs/components/thumb.md +81 -0
- package/docs/components/toast.md +48 -0
- package/docs/components/toggle-button.md +40 -0
- package/docs/components/tooltip.md +63 -0
- package/docs/design-guidelines.md +173 -0
- package/docs/flutter.md +42 -0
- package/docs/getting-started.md +93 -0
- package/docs/integration.md +95 -0
- package/docs/ios-conformance.md +224 -0
- package/docs/layout.md +271 -0
- package/docs/native.md +52 -0
- package/docs/roadmap.md +106 -0
- package/docs/tokens-reference.md +223 -0
- package/docs/web.md +95 -0
- package/package.json +7 -3
- package/src/css/base.css +171 -1
- package/src/css/components/dock.css +335 -0
- package/src/css/components/drawer.css +40 -3
- package/src/css/components/fold-slot.css +44 -0
- package/src/css/components/icon-loader.css +67 -0
- package/src/css/components/icon.css +6 -4
- package/src/css/components/load-state.css +136 -0
- package/src/css/components/loader.css +6 -0
- package/src/css/components/menu.css +4 -0
- package/src/css/components/modal.css +24 -3
- package/src/css/components/navbar.css +5 -1
- package/src/css/components/pillbar.css +222 -7
- package/src/css/components/rail.css +8 -0
- package/src/css/components/reload.css +48 -0
- package/src/css/components/skeleton.css +41 -13
- package/src/css/components/tabs.css +5 -0
- package/src/css/components/thumb.css +63 -1
- package/src/css/components/toast.css +5 -1
- package/src/css/density.css +22 -0
- package/src/css/layout.css +95 -5
- package/src/css/utilities.css +4 -1
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Components
|
|
2
|
+
|
|
3
|
+
Framework-agnostic elements built from tokens. On the web they're CSS classes in
|
|
4
|
+
`@junoput01/junoui/css`; on other platforms, build the same anatomy from
|
|
5
|
+
[tokens-reference.md](../tokens-reference.md).
|
|
6
|
+
|
|
7
|
+
## The role mechanism (web)
|
|
8
|
+
|
|
9
|
+
A component reads a single custom property, `--juno-role`. A role class sets it, so
|
|
10
|
+
**one class re-colors any component**:
|
|
11
|
+
|
|
12
|
+
```html
|
|
13
|
+
<span class="juno-badge juno--warning">…</span>
|
|
14
|
+
<!-- role = warning -->
|
|
15
|
+
<button class="juno-btn juno--nominal">…</button>
|
|
16
|
+
<!-- role = nominal -->
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Role classes: `.juno--nominal` `.juno--active` `.juno--target` `.juno--caution`
|
|
20
|
+
`.juno--warning` `.juno--muted`.
|
|
21
|
+
|
|
22
|
+
## Catalogue
|
|
23
|
+
|
|
24
|
+
| Component | Class | Spec |
|
|
25
|
+
| -------------------------------- | ------------------------------------------- | -------------------------------------- |
|
|
26
|
+
| Badge / status indicator | `.juno-badge` | [badge.md](./badge.md) |
|
|
27
|
+
| Button | `.juno-btn` | [button.md](./button.md) |
|
|
28
|
+
| Card / panel | `.juno-card` | [card.md](./card.md) |
|
|
29
|
+
| Data readout | `.juno-readout` | [readout.md](./readout.md) |
|
|
30
|
+
| Status dot | `.juno-status` | [status.md](./status.md) |
|
|
31
|
+
| Loaders (arc · beacon · bar) | `.juno-arc` `.juno-beacon` `.juno-bar` | [loader.md](./loader.md) |
|
|
32
|
+
| Gauge (metric ring) | `.juno-gauge` | [gauge.md](./gauge.md) |
|
|
33
|
+
| Spark (sparkline contract) | `.juno-spark` | [spark.md](./spark.md) |
|
|
34
|
+
| Field wrapper | `.juno-field` | [field.md](./field.md) |
|
|
35
|
+
| Input / textarea | `.juno-input` | [input.md](./input.md) |
|
|
36
|
+
| Select | `.juno-select` | [select.md](./select.md) |
|
|
37
|
+
| Checkbox / radio | `.juno-checkbox` `.juno-radio` | [checkbox.md](./checkbox.md) |
|
|
38
|
+
| Switch | `.juno-switch` | [switch.md](./switch.md) |
|
|
39
|
+
| Segmented control | `.juno-seg` | [segmented.md](./segmented.md) |
|
|
40
|
+
| Toggle button | `.juno-toggle-btn` | [toggle-button.md](./toggle-button.md) |
|
|
41
|
+
| Slider | `.juno-slider` | [slider.md](./slider.md) |
|
|
42
|
+
| Modal / dialog | `.juno-modal` | [modal.md](./modal.md) |
|
|
43
|
+
| Drawer | `.juno-drawer` | [drawer.md](./drawer.md) |
|
|
44
|
+
| Tooltip | `.juno-tooltip` | [tooltip.md](./tooltip.md) |
|
|
45
|
+
| Popover | `.juno-popover` | [popover.md](./popover.md) |
|
|
46
|
+
| Menu / dropdown | `.juno-menu` | [menu.md](./menu.md) |
|
|
47
|
+
| Table / data grid | `.juno-table` | [table.md](./table.md) |
|
|
48
|
+
| Alert / inline notification | `.juno-alert` | [alert.md](./alert.md) |
|
|
49
|
+
| Toast / snackbar | `.juno-toast` | [toast.md](./toast.md) |
|
|
50
|
+
| Tabs | `.juno-tabs` | [tabs.md](./tabs.md) |
|
|
51
|
+
| Accordion / disclosure | `.juno-accordion` | [accordion.md](./accordion.md) |
|
|
52
|
+
| Icon | `.juno-icon` | [icon.md](./icon.md) |
|
|
53
|
+
| Skeleton / loading placeholder | `.juno-skeleton` | [skeleton.md](./skeleton.md) |
|
|
54
|
+
| Load state (shimmer/fault/empty) | `.juno-shimmer` `.juno-fault` `.juno-empty` | [load-state.md](./load-state.md) |
|
|
55
|
+
| Reload (refetch-in-place) | `.juno-reload` | [reload.md](./reload.md) |
|
|
56
|
+
| Thumb / media placeholder | `.juno-thumb` | [thumb.md](./thumb.md) |
|
|
57
|
+
| Avatar | `.juno-avatar` | [avatar.md](./avatar.md) |
|
|
58
|
+
| Divider / separator | `.juno-divider` | [divider.md](./divider.md) |
|
|
59
|
+
| Chip / tag | `.juno-chip` | [chip.md](./chip.md) |
|
|
60
|
+
| Breadcrumb | `.juno-breadcrumb` | [breadcrumb.md](./breadcrumb.md) |
|
|
61
|
+
| Pagination | `.juno-pagination` | [pagination.md](./pagination.md) |
|
|
62
|
+
| Stepper | `.juno-stepper` | [stepper.md](./stepper.md) |
|
|
63
|
+
| Rail (app-shell nav) | `.juno-rail` | [rail.md](./rail.md) |
|
|
64
|
+
| Dock (bottom nav, narrow) | `.juno-dock` | [dock.md](./dock.md) |
|
|
65
|
+
| Pillbar (floating pill bar) | `.juno-pillbar` | [pillbar.md](./pillbar.md) |
|
|
66
|
+
| Fold slot (animated presence) | `.juno-fold` | [fold-slot.md](./fold-slot.md) |
|
|
67
|
+
| Icon loader (rings any control) | `.juno-icon-loader` | [icon-loader.md](./icon-loader.md) |
|
|
68
|
+
| Navbar (stack top bar) | `.juno-navbar` | [navbar.md](./navbar.md) |
|
|
69
|
+
| List (grouped rows) | `.juno-list` | [list.md](./list.md) |
|
|
70
|
+
|
|
71
|
+
Always pair a status color with a text label — color is never the only signal.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Accordion / disclosure
|
|
2
|
+
|
|
3
|
+
Stacked, expandable sections built on the native `<details>` / `<summary>` — keyboard and
|
|
4
|
+
screen-reader native, **zero JS**. A chevron rotates on open. Use a lone `<details>` for a
|
|
5
|
+
single disclosure, or group them in `.juno-accordion` for a bordered set.
|
|
6
|
+
|
|
7
|
+
## Web
|
|
8
|
+
|
|
9
|
+
```html
|
|
10
|
+
<div class="juno-accordion">
|
|
11
|
+
<details class="juno-accordion__item" open>
|
|
12
|
+
<summary class="juno-accordion__summary">Region · us-east-1</summary>
|
|
13
|
+
<div class="juno-accordion__body">Primary region. 3 replicas, auto-scaling on.</div>
|
|
14
|
+
</details>
|
|
15
|
+
<details class="juno-accordion__item">
|
|
16
|
+
<summary class="juno-accordion__summary">Region · eu-west-1</summary>
|
|
17
|
+
<div class="juno-accordion__body">Failover armed. 1 of 3 replicas reporting.</div>
|
|
18
|
+
</details>
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
<!-- lone disclosure (frames itself) -->
|
|
22
|
+
<details class="juno-accordion__item">
|
|
23
|
+
<summary class="juno-accordion__summary">Advanced options</summary>
|
|
24
|
+
<div class="juno-accordion__body">…</div>
|
|
25
|
+
</details>
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
| Class | Effect |
|
|
29
|
+
| -------------------------- | -------------------------------------------------------------- |
|
|
30
|
+
| `.juno-accordion` | Bordered group; clips its items' corners. |
|
|
31
|
+
| `.juno-accordion__item` | A `<details>`; row rule between items. `[open]` to start open. |
|
|
32
|
+
| `.juno-accordion__summary` | The `<summary>` header; native marker hidden, chevron added. |
|
|
33
|
+
| `.juno-accordion__body` | The revealed content (`s0`, `label` text). |
|
|
34
|
+
|
|
35
|
+
## Anatomy (any platform)
|
|
36
|
+
|
|
37
|
+
- Summary: `s1` row, `data` label, control-padding; hover → `s2`. A chevron (a rotated
|
|
38
|
+
corner) flips from ▸ to ▾ via `[open]`, `motion.duration.quick`.
|
|
39
|
+
- Body: `s0` panel under a 1px rule. Native open/close (no height animation by default).
|
|
40
|
+
- A lone `details.juno-accordion__item:only-child` draws its own border + radius.
|
|
41
|
+
|
|
42
|
+
## Usage
|
|
43
|
+
|
|
44
|
+
- **Zero JS** — `<details>` toggles itself; `<summary>` is focusable and Enter/Space work.
|
|
45
|
+
For "only one open at a time", give the `<details>` a shared `name` attribute (native
|
|
46
|
+
exclusive accordion) — no script needed.
|
|
47
|
+
- Keep the summary a short label; put detail in the body.
|
|
48
|
+
- To animate open/close, progressively enhance with `::details-content` +
|
|
49
|
+
`interpolate-size` where supported; the component stays correct without it.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Alert / inline notification
|
|
2
|
+
|
|
3
|
+
A role-tinted banner for in-context messages — validation summaries, system status,
|
|
4
|
+
callouts. Soft-fill with a role accent rail; icon + title + text + optional actions and
|
|
5
|
+
dismiss. Color comes from `var(--juno-role)` (set by a `.juno--<role>` class).
|
|
6
|
+
|
|
7
|
+
## Web
|
|
8
|
+
|
|
9
|
+
```html
|
|
10
|
+
<div class="juno-alert juno--warning" role="alert">
|
|
11
|
+
<span class="juno-alert__icon" aria-hidden="true">⚠</span>
|
|
12
|
+
<div class="juno-alert__body">
|
|
13
|
+
<span class="juno-alert__title">Deploy blocked</span>
|
|
14
|
+
<span class="juno-alert__text">Two required checks are still failing.</span>
|
|
15
|
+
<div class="juno-alert__actions">
|
|
16
|
+
<button class="juno-btn juno--warning">RE-RUN</button>
|
|
17
|
+
<button class="juno-btn juno-btn--ghost">VIEW LOG</button>
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
<button class="juno-alert__close" aria-label="Dismiss">✕</button>
|
|
21
|
+
</div>
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
| Class | Effect |
|
|
25
|
+
| ---------------------- | --------------------------------------------------------------------------- |
|
|
26
|
+
| `.juno-alert` | Soft role wash + role border + start accent rail. Default `active`. |
|
|
27
|
+
| `.juno-alert__icon` | Leading glyph, role-colored. Mark it `aria-hidden`. |
|
|
28
|
+
| `.juno-alert__body` | `__title` (data, semibold) + `__text` (label) column. |
|
|
29
|
+
| `.juno-alert__actions` | Row of buttons under the text. |
|
|
30
|
+
| `.juno-alert__close` | Ghost dismiss button (app removes the alert). |
|
|
31
|
+
| `.juno-alert--solid` | High-emphasis: full role fill, text on `s0`. |
|
|
32
|
+
| `.juno--<role>` | Sets the color (`active` info · `nominal` success · `caution` · `warning`). |
|
|
33
|
+
|
|
34
|
+
## Anatomy (any platform)
|
|
35
|
+
|
|
36
|
+
- Surface: `color-mix(role 10%)` wash, `color-mix(role 30%)` border, `border.width.3`
|
|
37
|
+
role rail on the inline-start edge, `radius.5`, surface padding.
|
|
38
|
+
- Icon + title (`data`, semibold) + text (`label`); `--solid` swaps to a full role fill.
|
|
39
|
+
|
|
40
|
+
## Usage
|
|
41
|
+
|
|
42
|
+
- **Inline, not floating** — alerts sit in the layout. For transient confirmations use a
|
|
43
|
+
[toast](./toast.md).
|
|
44
|
+
- `role="alert"` for urgent (assertive announce); `role="status"` for passive.
|
|
45
|
+
- Pair the role color with the icon **and** a word — never color alone.
|
|
46
|
+
- Dismiss is the app's job: remove the node (`showcase/app.js` wires `.juno-alert__close`).
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Avatar
|
|
2
|
+
|
|
3
|
+
A round (or squared) portrait holding an `<img>`, **initials**, or an
|
|
4
|
+
[icon](./icon.md) fallback. One custom property drives the size; an optional role ring
|
|
5
|
+
marks status. Zero JS. Pairs with a [`.juno-skeleton--circle`](./skeleton.md) while the
|
|
6
|
+
image loads.
|
|
7
|
+
|
|
8
|
+
## Web
|
|
9
|
+
|
|
10
|
+
```html
|
|
11
|
+
<!-- image -->
|
|
12
|
+
<span class="juno-avatar"><img src="ada.jpg" alt="Ada Lovelace" /></span>
|
|
13
|
+
|
|
14
|
+
<!-- initials -->
|
|
15
|
+
<span class="juno-avatar juno-avatar--lg">AL</span>
|
|
16
|
+
|
|
17
|
+
<!-- icon fallback + status ring -->
|
|
18
|
+
<span class="juno-avatar juno-avatar--ring juno--nominal" title="Online">
|
|
19
|
+
<svg class="juno-icon" aria-hidden="true"><use href="…#juno-i-user" /></svg>
|
|
20
|
+
</span>
|
|
21
|
+
|
|
22
|
+
<!-- overlapping cluster -->
|
|
23
|
+
<span class="juno-avatar-group">
|
|
24
|
+
<span class="juno-avatar"><img src="a.jpg" alt="Ada" /></span>
|
|
25
|
+
<span class="juno-avatar"><img src="g.jpg" alt="Grace" /></span>
|
|
26
|
+
<span class="juno-avatar">+3</span>
|
|
27
|
+
</span>
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
| Class | Effect |
|
|
31
|
+
| ------------------------ | ----------------------------------------------------------- |
|
|
32
|
+
| `.juno-avatar` | Circle portrait; `--juno-avatar-size` (default `space.32`). |
|
|
33
|
+
| `.juno-avatar--sm/lg/xl` | `space.24` / `space.40` / `space.56`. |
|
|
34
|
+
| `.juno-avatar--square` | Rounded-rect instead of circle. |
|
|
35
|
+
| `.juno-avatar--ring` | Status ring in `var(--juno-role)` (+ soft halo). |
|
|
36
|
+
| `.juno-avatar-group` | Overlapping row; each tucks under the previous. |
|
|
37
|
+
| `--juno-avatar-size` | Override the size (initials scale to ~40% of it). |
|
|
38
|
+
|
|
39
|
+
## Usage
|
|
40
|
+
|
|
41
|
+
- An `<img>` fills the box (`object-fit: cover`); always set a meaningful `alt`.
|
|
42
|
+
- Initials / `+N` overflow are plain text content — center-aligned, uppercase.
|
|
43
|
+
- The **ring is decorative**: pair it with a `title` / visible label so status isn't
|
|
44
|
+
color-only.
|
|
45
|
+
- In a group, set `alt` per avatar; the trailing `+N` chip is just another avatar.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Badge / status indicator
|
|
2
|
+
|
|
3
|
+
A compact, uppercase status label.
|
|
4
|
+
|
|
5
|
+
## Web
|
|
6
|
+
|
|
7
|
+
```html
|
|
8
|
+
<span class="juno-badge juno--nominal">NOMINAL</span>
|
|
9
|
+
<span class="juno-badge juno-badge--outline juno--caution">CAUTION</span>
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
| Class | Effect |
|
|
13
|
+
| ---------------------- | ---------------------------------------------- |
|
|
14
|
+
| `.juno-badge` | Base. Filled: background = role, text = `s0`. |
|
|
15
|
+
| `.juno-badge--outline` | Transparent fill, text + border = role. |
|
|
16
|
+
| `.juno-badge--soft` | Low-fill chip: role text on a 13% role wash. |
|
|
17
|
+
| `.juno-badge--micro` | Data-UI atom: mono 10px, hairline role border. |
|
|
18
|
+
| `.juno--<role>` | Sets the color (required). |
|
|
19
|
+
|
|
20
|
+
## Anatomy (any platform)
|
|
21
|
+
|
|
22
|
+
- Font: B612, 700 weight, size `font.size.11`, uppercase, tracking `font.tracking.caps` (0.15em).
|
|
23
|
+
- Padding: `space.4` vertical, `space.10` horizontal. Radius: `radius.3`.
|
|
24
|
+
- **Filled:** fill = role color, text = `s0` (base surface).
|
|
25
|
+
- **Outline:** transparent fill, text + 1px border = role color.
|
|
26
|
+
|
|
27
|
+
## Usage
|
|
28
|
+
|
|
29
|
+
- Use the semantic roles for status; `muted` for inactive/disabled.
|
|
30
|
+
- Keep the text the literal status word — color reinforces, never replaces it.
|
|
31
|
+
- `--micro` is for provenance/kind tags (`device`, `TRANSCODE`, model names) and
|
|
32
|
+
threshold values that repeat dozens of times per screen. Threshold coloring is app
|
|
33
|
+
policy — map value → role class yourself, e.g.
|
|
34
|
+
`juno-badge--micro juno--nominal` for a ≥ 90% confidence. Same recipe as the
|
|
35
|
+
[gauge](./gauge.md) thresholds.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Breadcrumb
|
|
2
|
+
|
|
3
|
+
A horizontal trail of links to ancestor pages, ending at the current page. Built on a
|
|
4
|
+
real `<nav><ol>`; the separator is a CSS chevron (no glyph font). Zero JS.
|
|
5
|
+
|
|
6
|
+
## Web
|
|
7
|
+
|
|
8
|
+
```html
|
|
9
|
+
<nav class="juno-breadcrumb" aria-label="Breadcrumb">
|
|
10
|
+
<ol>
|
|
11
|
+
<li><a href="/">Home</a></li>
|
|
12
|
+
<li><a href="/fleet">Fleet</a></li>
|
|
13
|
+
<li><a aria-current="page">api-gateway</a></li>
|
|
14
|
+
</ol>
|
|
15
|
+
</nav>
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
| Part / attr | Effect |
|
|
19
|
+
| ----------------------- | ---------------------------------------------------- |
|
|
20
|
+
| `.juno-breadcrumb` | `<nav>` wrapper; lay out an `<ol>` of `<li>` inside. |
|
|
21
|
+
| `li + li::before` | CSS chevron separator (rotates under RTL). |
|
|
22
|
+
| `a[href]` | `label` link → `data` + underline on hover. |
|
|
23
|
+
| `[aria-current="page"]` | The current crumb — brightest, semibold, not a link. |
|
|
24
|
+
|
|
25
|
+
## Usage
|
|
26
|
+
|
|
27
|
+
- Always `aria-label="Breadcrumb"` on the `<nav>`, and `aria-current="page"` on the last
|
|
28
|
+
crumb (drop its `href` so it isn't a link).
|
|
29
|
+
- Order matters: root → … → current, left to right (mirrors under `dir="rtl"`).
|
|
30
|
+
- For very deep trails, collapse the middle to an ellipsis crumb the app expands — junoui
|
|
31
|
+
ships the look, the app owns the collapse.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Button
|
|
2
|
+
|
|
3
|
+
## Web
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<button class="juno-btn juno--nominal">CONFIRM</button>
|
|
7
|
+
<button class="juno-btn juno-btn--ghost">CANCEL</button>
|
|
8
|
+
<button class="juno-btn juno-btn--sm juno-btn--ghost">EDIT</button>
|
|
9
|
+
<button class="juno-btn" disabled>DISABLED</button>
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
| Class | Effect |
|
|
13
|
+
| ------------------ | -------------------------------------------------------------------------------- |
|
|
14
|
+
| `.juno-btn` | Base. Primary (filled): background = role, text = `s0`. Default role = `active`. |
|
|
15
|
+
| `.juno-btn--ghost` | Transparent, `data` text, `border` outline; hover → `s2`. |
|
|
16
|
+
| `.juno-btn--sm` | Dense-toolbar size: `font.size.11`, `space.4` × `space.10`, `radius.3`. |
|
|
17
|
+
| `.juno--<role>` | Sets the primary fill color. |
|
|
18
|
+
| `:disabled` | `muted` fill, `label` text, not-allowed. |
|
|
19
|
+
|
|
20
|
+
## Anatomy (any platform)
|
|
21
|
+
|
|
22
|
+
- Font: B612, 700 weight, size `font.size.13`, uppercase, tracking `font.tracking.caps`.
|
|
23
|
+
- Padding: `space.10` × `space.20`. Radius: `radius.4`. Min height: `size.tap.min` (24px; use 44px on mobile).
|
|
24
|
+
- States: hover brighten ~8%, active darken ~6%, disabled = `muted`/`label`.
|
|
25
|
+
|
|
26
|
+
## Usage
|
|
27
|
+
|
|
28
|
+
- Primary action filled with `nominal` (confirm) or `active` (apply).
|
|
29
|
+
- `warning` fill only for genuinely critical/destructive actions.
|
|
30
|
+
- One primary per group; everything else is ghost.
|
|
31
|
+
- `--sm` drops below the WCAG tap-minimum on purpose — it is for dense **desktop**
|
|
32
|
+
toolbars (40–46px chrome bars). Keep the default size anywhere touch is expected.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Card / panel
|
|
2
|
+
|
|
3
|
+
A surface grouping a titled header and a body.
|
|
4
|
+
|
|
5
|
+
## Web
|
|
6
|
+
|
|
7
|
+
```html
|
|
8
|
+
<article class="juno-card juno-card--accent juno--caution">
|
|
9
|
+
<header class="juno-card__head">
|
|
10
|
+
HYD SYS B
|
|
11
|
+
<span class="juno-badge juno-badge--outline juno--caution">CAUTION</span>
|
|
12
|
+
</header>
|
|
13
|
+
<div class="juno-card__body">
|
|
14
|
+
<div class="juno-card__row">
|
|
15
|
+
<span class="juno-label">Pressure</span>
|
|
16
|
+
<span class="juno-value juno-text-caution">2,650</span>
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
19
|
+
</article>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
| Class | Effect |
|
|
23
|
+
| -------------------- | ------------------------------------------------------ |
|
|
24
|
+
| `.juno-card` | `s1` surface, 1px `border`, radius `radius.8`. |
|
|
25
|
+
| `.juno-card--accent` | 2px top edge in the role color (status hint). |
|
|
26
|
+
| `.juno-card--alert` | Full border in role + tinted header — critical panels. |
|
|
27
|
+
| `.juno-card__head` | Uppercase title row; holds a status badge. |
|
|
28
|
+
| `.juno-card__body` | Padded content column. |
|
|
29
|
+
| `.juno-card__row` | Label-left / value-right baseline row. |
|
|
30
|
+
|
|
31
|
+
## Anatomy (any platform)
|
|
32
|
+
|
|
33
|
+
- Surface `s1`, border `border` 1px, radius `radius.8`.
|
|
34
|
+
- Header: padding `space.12`/`space.16`, bottom 1px divider, title B612 600 uppercase tracking `wide`.
|
|
35
|
+
- Body: padding `space.16`, rows gapped `space.12`.
|
|
36
|
+
- Escalation: accent (2px top) → alert (full role border + `s2` header tinted in role).
|
|
37
|
+
|
|
38
|
+
## Usage
|
|
39
|
+
|
|
40
|
+
- One subject per card. Header carries the identifier + a status badge.
|
|
41
|
+
- Match accent/alert role to the card's worst current status.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Checkbox & Radio
|
|
2
|
+
|
|
3
|
+
Custom-styled native inputs (`appearance: none`) — keyboard and screen-reader support
|
|
4
|
+
come for free. The checkbox is a **targeting-reticle** square whose solid core drops in
|
|
5
|
+
on check; the radio is a ring with a center dot. Wrap with `.juno-choice` for a label row.
|
|
6
|
+
|
|
7
|
+
## Web
|
|
8
|
+
|
|
9
|
+
```html
|
|
10
|
+
<label class="juno-choice"> <input class="juno-checkbox" type="checkbox" checked /> TCAS </label>
|
|
11
|
+
|
|
12
|
+
<label class="juno-choice"> <input class="juno-radio" type="radio" name="mode" /> SELECTED </label>
|
|
13
|
+
<label class="juno-choice">
|
|
14
|
+
<input class="juno-radio juno--target" type="radio" name="mode" checked /> MANAGED
|
|
15
|
+
</label>
|
|
16
|
+
|
|
17
|
+
<label class="juno-choice">
|
|
18
|
+
<input class="juno-checkbox" type="checkbox" disabled /> Restricted
|
|
19
|
+
</label>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
| Class | Effect |
|
|
23
|
+
| ---------------- | --------------------------------------------------------- |
|
|
24
|
+
| `.juno-checkbox` | `space.16` reticle square; checked core + role ring-glow. |
|
|
25
|
+
| `.juno-radio` | Same as a circle with a center dot. |
|
|
26
|
+
| `.juno-choice` | Inline-flex label row; `gap-control`, `data` text. |
|
|
27
|
+
| `.juno--<role>` | Recolors the core/dot (default `active`). |
|
|
28
|
+
| `:checked` | Border → role, 3px role glow, core scales in (spring). |
|
|
29
|
+
| `:disabled` | `s1` + dimmed; row text → `muted`. |
|
|
30
|
+
|
|
31
|
+
## Anatomy (any platform)
|
|
32
|
+
|
|
33
|
+
- Box `space.16` on `control-surface` with a `control-edge` border; checked adds a
|
|
34
|
+
`border-width.3` ring at 22% role and a `space.8` core (spring scale-in).
|
|
35
|
+
- Label row: B612 `font.size.13`, `data`, `gap-control` between box and text.
|
|
36
|
+
|
|
37
|
+
## Usage
|
|
38
|
+
|
|
39
|
+
- Checkbox = independent toggles; radio = one-of-many (share a `name`).
|
|
40
|
+
- Keep the label inside the same `<label>` so the hit area covers both.
|
|
41
|
+
- For a single on/off with an emphasized track, use the [switch](./switch.md).
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Chip / Tag
|
|
2
|
+
|
|
3
|
+
A compact pill for a discrete entity — a filter, a selected value, a removable tag.
|
|
4
|
+
Where a [badge](./badge.md) is a **static** status label, a chip is **interactive**:
|
|
5
|
+
selectable and/or dismissible. Reads `--juno-role` for its accent; the app owns
|
|
6
|
+
selection and removal (zero JS).
|
|
7
|
+
|
|
8
|
+
## Web
|
|
9
|
+
|
|
10
|
+
```html
|
|
11
|
+
<!-- plain tag -->
|
|
12
|
+
<span class="juno-chip">us-east-1</span>
|
|
13
|
+
|
|
14
|
+
<!-- role-tinted -->
|
|
15
|
+
<span class="juno-chip juno--active">live</span>
|
|
16
|
+
|
|
17
|
+
<!-- toggle (filter) chip -->
|
|
18
|
+
<button class="juno-chip juno-chip--toggle juno--active" aria-pressed="true">Errors</button>
|
|
19
|
+
|
|
20
|
+
<!-- removable -->
|
|
21
|
+
<span class="juno-chip">
|
|
22
|
+
filter:prod
|
|
23
|
+
<button class="juno-chip__remove" aria-label="Remove prod filter">
|
|
24
|
+
<svg class="juno-icon juno-icon--sm" aria-hidden="true"><use href="…#juno-i-x" /></svg>
|
|
25
|
+
</button>
|
|
26
|
+
</span>
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
| Class | Effect |
|
|
30
|
+
| -------------------- | ------------------------------------------------------------ |
|
|
31
|
+
| `.juno-chip` | Pill; `control-surface` fill, strong border, `data` text. |
|
|
32
|
+
| `.juno--<role>` | Role accent (border + tinted fill + role text). |
|
|
33
|
+
| `.juno-chip--toggle` | Use on a `<button>`; `aria-pressed="true"` fills the accent. |
|
|
34
|
+
| `.juno-chip__remove` | Trailing dismiss button (put an `x` icon inside; label it). |
|
|
35
|
+
| `:disabled` | Dims + blocks pointer. |
|
|
36
|
+
|
|
37
|
+
## Usage
|
|
38
|
+
|
|
39
|
+
- **Toggle chip:** a real `<button>`; the app flips `aria-pressed`. Use for filter sets.
|
|
40
|
+
- **Removable chip:** the `__remove` button needs an `aria-label` ("Remove X"); the app
|
|
41
|
+
deletes the chip on click.
|
|
42
|
+
- Chip vs badge: chip = interactive / user data; badge = read-only status. Don't make a
|
|
43
|
+
badge clickable — reach for a chip.
|
|
44
|
+
- Color is never the only signal — the chip's text carries the meaning; role is accent.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Divider
|
|
2
|
+
|
|
3
|
+
A hairline rule that separates content. Horizontal by default; vertical for a column
|
|
4
|
+
separator; or labeled to break the line with a centered caption.
|
|
5
|
+
|
|
6
|
+
## Web
|
|
7
|
+
|
|
8
|
+
```html
|
|
9
|
+
<!-- semantic horizontal break -->
|
|
10
|
+
<hr class="juno-divider" />
|
|
11
|
+
|
|
12
|
+
<!-- labeled -->
|
|
13
|
+
<div class="juno-divider juno-divider--label">OR</div>
|
|
14
|
+
|
|
15
|
+
<!-- vertical (inside a flex row) -->
|
|
16
|
+
<span class="juno-divider juno-divider--vertical"></span>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
| Class | Effect |
|
|
20
|
+
| ------------------------- | ------------------------------------------------------------------- |
|
|
21
|
+
| `.juno-divider` | Full-width `border`-colored hairline. |
|
|
22
|
+
| `.juno-divider--vertical` | Hairline column rule; stretches to the row (`align-self: stretch`). |
|
|
23
|
+
| `.juno-divider--label` | Caption centered between two rules (uppercase `label`). |
|
|
24
|
+
|
|
25
|
+
## Usage
|
|
26
|
+
|
|
27
|
+
- Use a real `<hr>` for a **semantic** break; a `<span>` / `<div>` when it's purely
|
|
28
|
+
decorative.
|
|
29
|
+
- The vertical variant needs a parent that gives it block size — a flex row works
|
|
30
|
+
(`align-self: stretch`); otherwise set a height.
|
|
31
|
+
- Don't over-divide: whitespace separates most things. Reach for a rule only when groups
|
|
32
|
+
would otherwise read as one.
|