@hiver/skills 1.0.8 → 1.0.9
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 +1 -1
- package/collections/extension/agents/build-feature.md +2 -1
- package/collections/extension/agents/build-milestone.md +2 -1
- package/collections/extension/skills/build-component/SKILL.md +75 -1
- package/collections/extension/skills/build-component/palette/colors.md +76 -0
- package/collections/extension/skills/build-component/references/v2-components.md +100 -0
- package/collections/extension/skills/build-component/references/v2-usage-examples.md +23 -0
- package/collections/extension/skills/build-component/typography/variants.md +27 -14
- package/collections/mobile/skills/version-bump-up/SKILL.md +66 -0
- package/collections/qa-skills/README.md +103 -0
- package/collections/qa-skills/qa-suite-guide.html +760 -0
- package/collections/qa-skills/skills/hiver-explore/SKILL.md +413 -0
- package/collections/qa-skills/skills/hiver-explore/references/spec-template.md +204 -0
- package/collections/qa-skills/skills/playwright-gen/SKILL.md +280 -0
- package/collections/qa-skills/skills/playwright-gen/references/codegen-conventions.md +100 -0
- package/collections/qa-skills/skills/playwright-gen/references/step-mapping.md +137 -0
- package/collections/qa-skills/skills/qa-api-author/SKILL.md +204 -0
- package/collections/qa-skills/skills/qa-api-author/references/api-areas.md +112 -0
- package/collections/qa-skills/skills/qa-api-run/SKILL.md +178 -0
- package/collections/qa-skills/skills/qa-bugs/SKILL.md +82 -0
- package/collections/qa-skills/skills/qa-eval/SKILL.md +123 -0
- package/collections/qa-skills/skills/qa-eval/references/deterministic-checks.md +89 -0
- package/collections/qa-skills/skills/qa-kit/SKILL.md +228 -0
- package/collections/qa-skills/skills/qa-kit/knowledge-base/hiver/INDEX.md +31 -0
- package/collections/qa-skills/skills/qa-kit/knowledge-base/hiver/hig/INDEX.md +90 -0
- package/collections/qa-skills/skills/qa-kit/knowledge-base/hiver/hig/account-security.md +44 -0
- package/collections/qa-skills/skills/qa-kit/knowledge-base/hiver/hig/apps-integrations.md +43 -0
- package/collections/qa-skills/skills/qa-kit/knowledge-base/hiver/hig/automate-workflows.md +65 -0
- package/collections/qa-skills/skills/qa-kit/knowledge-base/hiver/hig/collaborate.md +36 -0
- package/collections/qa-skills/skills/qa-kit/knowledge-base/hiver/hig/customer-relationships.md +20 -0
- package/collections/qa-skills/skills/qa-kit/knowledge-base/hiver/hig/getting-started.md +31 -0
- package/collections/qa-skills/skills/qa-kit/knowledge-base/hiver/hig/hiver-ai.md +79 -0
- package/collections/qa-skills/skills/qa-kit/knowledge-base/hiver/hig/multichannel-support.md +82 -0
- package/collections/qa-skills/skills/qa-kit/knowledge-base/hiver/hig/reporting-analytics.md +35 -0
- package/collections/qa-skills/skills/qa-kit/knowledge-base/hiver/hig/self-service.md +23 -0
- package/collections/qa-skills/skills/qa-kit/knowledge-base/hiver/hig/sla-policies.md +30 -0
- package/collections/qa-skills/skills/qa-kit/knowledge-base/hiver/hig/troubleshooting.md +27 -0
- package/collections/qa-skills/skills/qa-kit/knowledge-base/hiver/omni/INDEX.md +45 -0
- package/collections/qa-skills/skills/qa-kit/knowledge-base/hiver/omni/account-security.md +13 -0
- package/collections/qa-skills/skills/qa-kit/knowledge-base/hiver/omni/apps-integrations.md +15 -0
- package/collections/qa-skills/skills/qa-kit/knowledge-base/hiver/omni/automate-workflows.md +26 -0
- package/collections/qa-skills/skills/qa-kit/knowledge-base/hiver/omni/collaborate.md +11 -0
- package/collections/qa-skills/skills/qa-kit/knowledge-base/hiver/omni/customer-relationships.md +9 -0
- package/collections/qa-skills/skills/qa-kit/knowledge-base/hiver/omni/getting-started.md +21 -0
- package/collections/qa-skills/skills/qa-kit/knowledge-base/hiver/omni/hiver-ai.md +13 -0
- package/collections/qa-skills/skills/qa-kit/knowledge-base/hiver/omni/identity-access.md +23 -0
- package/collections/qa-skills/skills/qa-kit/knowledge-base/hiver/omni/multichannel-support.md +47 -0
- package/collections/qa-skills/skills/qa-kit/knowledge-base/hiver/omni/reporting-analytics.md +13 -0
- package/collections/qa-skills/skills/qa-kit/knowledge-base/hiver/omni/self-service.md +11 -0
- package/collections/qa-skills/skills/qa-kit/knowledge-base/hiver/omni/sla-policies.md +12 -0
- package/collections/qa-skills/skills/qa-kit/references/clickup-ticket.md +163 -0
- package/collections/qa-skills/skills/qa-kit/references/eval.md +117 -0
- package/collections/qa-skills/skills/qa-kit/references/flow-capture.md +147 -0
- package/collections/qa-skills/skills/qa-kit/references/handoff-contract.md +159 -0
- package/collections/qa-skills/skills/qa-kit/references/hiver-context.md +99 -0
- package/collections/qa-skills/skills/qa-kit/references/tracker-format.md +123 -0
- package/collections/qa-skills/skills/qa-kit/references/triage-guide.md +105 -0
- package/collections/qa-skills/skills/qa-ui-author/SKILL.md +208 -0
- package/collections/qa-skills/skills/qa-ui-author/references/test-areas.md +132 -0
- package/collections/qa-skills/skills/qa-ui-run/SKILL.md +183 -0
- package/collections/web/agents/build-feature.md +2 -2
- package/collections/web/agents/build-milestone.md +2 -2
- package/collections/web/skills/build-component/SKILL.md +54 -13
- package/collections/web/skills/build-component/palette/colors.md +76 -0
- package/collections/web/skills/build-component/references/v2-components.md +100 -0
- package/collections/web/skills/build-component/references/v2-usage-examples.md +23 -0
- package/collections/web/skills/build-component/typography/variants.md +27 -14
- package/package.json +1 -1
|
@@ -85,3 +85,79 @@ Use these when wiring to MUI theme (e.g. `color="primary"`, `color="text.seconda
|
|
|
85
85
|
- **Info**: blue
|
|
86
86
|
- **Warning**: orange
|
|
87
87
|
- **Divider**: `gray.gray6`
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## Additional tokens
|
|
92
|
+
|
|
93
|
+
More tokens available on the same `theme.palette` object (in addition to the tables above). Reference these paths — not `theme.v2.primitives.*` or `theme.v2.tokens.*` (raw layers, not for application code).
|
|
94
|
+
|
|
95
|
+
### Primitive ramps (accessed as `theme.palette.<name>.<shade>`)
|
|
96
|
+
|
|
97
|
+
The following ramps land directly on `theme.palette`:
|
|
98
|
+
|
|
99
|
+
- **Neutral**: `white`, `black`, `gray`
|
|
100
|
+
- **Brand/status**: `yellow`, `red`, `green`, `orange`, `blue`
|
|
101
|
+
- **Accents**: `royal`, `teal`, `cyan`, `violet`, `pink`, `indigo`, `lime`, `amber`, `sky`, `fuchsia`
|
|
102
|
+
|
|
103
|
+
Each ramp has shades `25`, `50`, `100`, `200`, `300`, `400`, `500`, `600`, `700`, `800`, `900`, `950`, plus `alpha-*` variants (e.g. `alpha-10`, `alpha-20`, `alpha-30`).
|
|
104
|
+
|
|
105
|
+
Example: `theme.palette.royal[500]`, `theme.palette.gray[950]`, `theme.palette.blue['alpha-18']`.
|
|
106
|
+
|
|
107
|
+
### Semantic groups (accessed as `theme.palette.<group>.*`)
|
|
108
|
+
|
|
109
|
+
Values differ between light and dark modes — the same path resolves to the right hex for the active mode.
|
|
110
|
+
|
|
111
|
+
**`theme.palette.text.*`** — extends MUI's built-in `primary` / `secondary` / `disabled` with:
|
|
112
|
+
- `text.primary` → strong neutral text (light: `gray.900`)
|
|
113
|
+
- `text.secondary` → soft neutral text (light: `gray.500`)
|
|
114
|
+
- `text.disabled` → `gray.400`
|
|
115
|
+
- `text.inverse` → `gray.25`
|
|
116
|
+
- `text.neutral.{subtle,soft,default,strong,intense}`
|
|
117
|
+
- `text.brand.{subtle,soft,default,strong,intense}`
|
|
118
|
+
- `text.royal.{...}` / `text.success.{...}` / `text.warning.{...}` / `text.error.{...}` / `text.info.{...}`
|
|
119
|
+
- `text.accents.<tone>.{subtle,soft,default,strong,intense}` where `<tone>` is one of `teal`, `cyan`, `violet`, `pink`, `indigo`, `lime`, `amber`, `sky`, `fuchsia`, `green`, `blue`, `orange`, `red`, `gray`
|
|
120
|
+
- `text.on.{brand,success,warning,error,info,royal}` — foreground when placed on a solid tone-fill
|
|
121
|
+
- `text.on.accents.<tone>` — same, for accent surfaces
|
|
122
|
+
|
|
123
|
+
**`theme.palette.background.*`** — extends MUI's built-in `default` / `paper` with:
|
|
124
|
+
- `background.default` → `background.neutral.subtle` (light: `gray.25`)
|
|
125
|
+
- `background.paper` → `background.neutral.default` (light: `gray.100`)
|
|
126
|
+
- `background.disabled` / `background.inverse` / `background.overlay` / `background['selected-hover']`
|
|
127
|
+
- `background.alpha.{5}` / `background.static.{white,black}`
|
|
128
|
+
- `background.neutral.{white,subtle,soft,default,strong,intense,extreme,maximum}`
|
|
129
|
+
- `background['neutral-bold'].{soft,default,strong,intense,black}`
|
|
130
|
+
- `background.brand.{subtle,soft,default,strong,intense}`
|
|
131
|
+
- `background.royal.{...}` / `background.success.{...}` / `background.warning.{...}` / `background.error.{...}` / `background.info.{...}`
|
|
132
|
+
- `background.accents.<tone>.{subtle,soft,default,strong,intense}`
|
|
133
|
+
|
|
134
|
+
**`theme.palette.foreground.*`** — icon/glyph foreground colors:
|
|
135
|
+
- `foreground.inverse` / `foreground.disabled`
|
|
136
|
+
- `foreground.static.{white,black}` / `foreground.alpha.{30,40}`
|
|
137
|
+
- `foreground.neutral.{subtle,soft,default,strong,intense}`
|
|
138
|
+
- `foreground['neutral-bold'].{subtle,soft,default,strong,intense}`
|
|
139
|
+
- `foreground.brand.{...}` / `foreground.royal.{...}` / `foreground.success.{...}` / `foreground.warning.{...}` / `foreground.error.{...}` / `foreground.info.{...}`
|
|
140
|
+
- `foreground.accents.<tone>.{subtle,soft,default,strong,intense}`
|
|
141
|
+
- `foreground.on.{brand,success,warning,error,info,royal}` / `foreground.on.accents.<tone>`
|
|
142
|
+
|
|
143
|
+
**`theme.palette.border.*`** — stroke colors:
|
|
144
|
+
- `border.disabled`
|
|
145
|
+
- `border.neutral.{subtle,soft,default,strong,intense,extreme,maximum}`
|
|
146
|
+
- `border['neutral-bold'].{subtle,soft,default,strong,intense}`
|
|
147
|
+
- `border.brand.{subtle,soft,default,strong,intense,solid}`
|
|
148
|
+
- `border.royal.{subtle,soft,default,strong,intense,solid}`
|
|
149
|
+
- `border.success.{subtle,soft,default,strong,intense}` / `border.warning.{...}` / `border.error.{...}` / `border.info.{subtle,soft,default,strong,intense,solid}`
|
|
150
|
+
- `border.accents.<tone>.{subtle,soft,default,strong,intense}`
|
|
151
|
+
|
|
152
|
+
**`theme.palette.charts.*`** — chart series palette:
|
|
153
|
+
- `charts['1']` through `charts['8']`
|
|
154
|
+
- `1` blue, `2` teal, `3` orange, `4` violet, `5` pink, `6` green, `7` red, `8` cyan
|
|
155
|
+
|
|
156
|
+
**`theme.palette.effect.*`** — focus-ring / effect layers:
|
|
157
|
+
- `effect.focus.{brand,neutral,royal,error}`
|
|
158
|
+
|
|
159
|
+
### Access rules
|
|
160
|
+
|
|
161
|
+
- Reference tokens as `theme.palette.<group>.<slot>` (e.g. `theme.palette.text.neutral.strong`, `theme.palette.royal[500]`) — same shape across light/dark, resolved by the provider.
|
|
162
|
+
- Do **not** reference `theme.v2.primitives.*` or `theme.v2.tokens.*` in application code. Those are raw/escape layers, kept for cases like module-scope style composition without theme access.
|
|
163
|
+
- Do **not** hard-code hex values — always go through `theme.palette.*`.
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# v2 components (`@hiver/hiver-ui-kit/v2`)
|
|
2
|
+
|
|
3
|
+
Load this only after the design has been identified as v2 (see `SKILL.md` → "v2 detection rules"). This file is an **index**. Per-component detail — variants, prop matrix, slot list, Figma-variable → `theme.palette.*` reconciliation, caveats — lives in each component's `.figma-spec.md` inside the `hiver-ui-kit` repo. Read the spec on demand; do not read all of them up front.
|
|
4
|
+
|
|
5
|
+
## Consumption
|
|
6
|
+
|
|
7
|
+
- **Import**: `import { <Component> } from '@hiver/hiver-ui-kit/v2';`
|
|
8
|
+
- **Provider**: v2 requires a v2-enabled theme. In existing code that already uses `HiverThemeProvider`, pass `v2` (and optionally `mode="light" | "dark"`) to enable v2 on top of v1. In v2-only trees use `HiverThemeProviderV2` (also exported from `/v2`).
|
|
9
|
+
- **Colours**: reference `theme.palette.*` (see `palette/colors.md` v2 section). **Never** reference `theme.v2.primitives.*` or `theme.v2.tokens.*` for colour tokens in application code.
|
|
10
|
+
- **Non-colour primitives** (spacing, radius, border-width, iconSize, font-family/size/weight, line-height): `theme.v2.primitives.*` is the correct access path — do **not** try to route these through `theme.palette`.
|
|
11
|
+
- **Typography**: v2 variants (`body_<sz>_<w>`, `heading_<sz>_<w>`, `display_<sz>_<w>`, `caption_<w>`, `overline_<w>`) via the same `<Typography>` component (see `typography/variants.md` v2 section).
|
|
12
|
+
- **Do not mix** v1 and v2 components in the same visual composition unless the design explicitly calls for it. It IS common to compose a v1 chrome primitive (`Popover`, `Modal`, `Popper`, `Tooltip`, `Stack`, `Box`) around v2 content — see `references/v2-usage-examples.md`.
|
|
13
|
+
|
|
14
|
+
## Component index
|
|
15
|
+
|
|
16
|
+
Cross-repo pointer format: `../hiver-ui-kit/src/v2/components/<Name>/.figma-spec.md` (relative to the web repo root). If `hiver-ui-kit` is not checked out at that path, the index below still gives import paths and one-line purposes — the token reconciliation is what's lost.
|
|
17
|
+
|
|
18
|
+
| Component | Import | Ui-kit spec (full detail) | Purpose |
|
|
19
|
+
|---|---|---|---|
|
|
20
|
+
| `Avatar` | `Avatar` | `../hiver-ui-kit/src/v2/components/Avatar/.figma-spec.md` | User/entity avatar — `type="picture" \| "initials" \| "icon"`, sizes, status ring |
|
|
21
|
+
| `Badge` | `Badge` | `../hiver-ui-kit/src/v2/components/Badge/.figma-spec.md` | Status/tone chips (`variant` × `tone` × `size` × `shape`) |
|
|
22
|
+
| `Breadcrumbs` | `Breadcrumbs` | (spec pending — see inline block below) | Root → leaf breadcrumb list |
|
|
23
|
+
| `Button` | `Button` | `../hiver-ui-kit/src/v2/components/Button/.figma-spec.md` | Filled / outlined / link buttons; 9+ variants × 5 sizes × 5 states |
|
|
24
|
+
| `Checkbox` | `Checkbox` | `../hiver-ui-kit/src/v2/components/Checkbox/.figma-spec.md` | Tri-state (`-1 / 0 / 1`) with label + description |
|
|
25
|
+
| `Dropdown` (compound: `Dropdown.Menu`, `Dropdown.ListItem`) | `Dropdown` | (spec pending — see inline block below) | Visual container only — anchoring / open state is caller's job (compose inside MUI `Popover` / `Popper`) |
|
|
26
|
+
| `IconButton` | `IconButton` | `../hiver-ui-kit/src/v2/components/IconButton/.figma-spec.md` | Icon-only button; sizes, tones, variants aligned with `Button` |
|
|
27
|
+
| `InlineSelectLabel` | `InlineSelectLabel` | `../hiver-ui-kit/src/v2/components/InlineSelectLabel/.figma-spec.md` | Inline selection summary — icon/status/avatar + label + trailing `+N` badge |
|
|
28
|
+
| `Input.Text` | `Input` (namespace) | (spec pending — inline block below) | Single-line text input |
|
|
29
|
+
| `Input.TextArea` | `Input` | `../hiver-ui-kit/src/v2/components/Input/TextArea/.figma-spec.md` | Multi-line text input |
|
|
30
|
+
| `Input.Search` | `Input` | `../hiver-ui-kit/src/v2/components/Input/Search/.figma-spec.md` | Search-styled input |
|
|
31
|
+
| `Input.Tags` | `Input` | `../hiver-ui-kit/src/v2/components/Input/Tags/.figma-spec.md` | Tag-entry input |
|
|
32
|
+
| `Radio` | `Radio` | `../hiver-ui-kit/src/v2/components/Radio/.figma-spec.md` | Radio with label + description |
|
|
33
|
+
| `Switch` | `Switch` | `../hiver-ui-kit/src/v2/components/Switch/.figma-spec.md` | Toggle switch, `xs` / `sm` / `md` |
|
|
34
|
+
| `Tab.Item` | `Tab` | `../hiver-ui-kit/src/v2/components/Tab/Item/.figma-spec.md` | Tab item |
|
|
35
|
+
| `Table.Header` / `HeaderCell` / `HeaderLabel` / `BodyCell` | `Table` | `../hiver-ui-kit/src/v2/components/Table/{Header,HeaderCell,HeaderLabel,BodyCell}/.figma-spec.md` | Table primitives (compose your own row layout) |
|
|
36
|
+
| `Tag` | `Tag` | `../hiver-ui-kit/src/v2/components/Tag/.figma-spec.md` | Removable label with tone options |
|
|
37
|
+
| `Toast` | `Toast` | `../hiver-ui-kit/src/v2/components/Toast/.figma-spec.md` | Toast notification |
|
|
38
|
+
|
|
39
|
+
## General patterns
|
|
40
|
+
|
|
41
|
+
- All v2 components accept a `slotProps` prop for fine-grained overrides on internal DOM regions. Prefer top-level props first; fall back to `slotProps` for edge cases.
|
|
42
|
+
- v2 components generally accept `sx` on the root (either explicitly or via extended MUI props).
|
|
43
|
+
- Icon glyphs are consumer-supplied ReactNodes (usually MUI icons or SVG). Icon slots typically expect the glyph to inherit `currentColor`.
|
|
44
|
+
- Every v2 component is designed to render under a v2-enabled theme provider — behaviour outside a v2 theme is not defined.
|
|
45
|
+
- When a design needs anchoring, portalling, or click-away (Dropdown, tooltip-like overlays), wrap the v2 content inside an MUI `Popover` / `Popper` / `Modal`. See `references/v2-usage-examples.md`.
|
|
46
|
+
|
|
47
|
+
## Inline detail (spec pending)
|
|
48
|
+
|
|
49
|
+
The following v2 components don't yet have a `.figma-spec.md` in `hiver-ui-kit`. The blocks below carry just enough prop / slot detail to compose them. When the spec ships, replace the block with the cross-repo pointer.
|
|
50
|
+
|
|
51
|
+
### `Dropdown` (container + compound sub-exports)
|
|
52
|
+
|
|
53
|
+
Visual container only — does **not** manage open/close state, anchoring, portalling, or focus. Wire it inside an MUI `<Popover>` / `<Popper>` and drive open state yourself.
|
|
54
|
+
|
|
55
|
+
`Dropdown` (or `Dropdown.Menu`) — the paper surface:
|
|
56
|
+
- `title?: ReactNode` — header title (mutually exclusive with `showSearch`; `showSearch` wins).
|
|
57
|
+
- `endAction?: ReactNode` — trailing icon in the title row (ignored when `showSearch` is set).
|
|
58
|
+
- `showSearch?: boolean` — replaces title with an internal v2 `<Input size="sm">` search field; configure via `slotProps.search`.
|
|
59
|
+
- `children: ReactNode` — body slot (typically a stack of `<Dropdown.ListItem>`).
|
|
60
|
+
- `showFooter?: boolean` — footer with internally-mounted Cancel + Confirm buttons; configure via `slotProps.cancelButton` / `slotProps.confirmButton`.
|
|
61
|
+
- `elevation?: 'md' | 'none'` — default `'md'`.
|
|
62
|
+
- `minWidth?: number | string` — floor for container width.
|
|
63
|
+
- `maxHeight?: number | string` — caps the body slot; header + footer stay fixed.
|
|
64
|
+
- `sx?: SxProps<Theme>` — escape hatch on the root paper.
|
|
65
|
+
- `slotProps?: { header, title, search, slot, footer, cancelButton, confirmButton }`.
|
|
66
|
+
|
|
67
|
+
`Dropdown.ListItem` — single clickable row with up to 8 optional slots + a label:
|
|
68
|
+
- DOM order (fixed, left → right): `startCheckbox` · `startRadio` · `startAppsIcon` · `startAvatar` · `startIcon` · label · `endStatusIcon` · `endIcon` · `endCheckbox`.
|
|
69
|
+
- Boolean toggles: `startCheckbox?`, `startRadio?`, `startAppsIcon?`, `startAvatar?`, `startIcon?`, `endStatusIcon?`, `endIcon?`, `endCheckbox?`.
|
|
70
|
+
- `children: ReactNode` — label rendered inside `<Typography variant="body_sm_medium">` (single-line ellipsis).
|
|
71
|
+
- `slotProps?: { root, startCheckbox, startRadio, startAppsIcon, startAvatar, startIcon, label, endStatusIcon, endIcon, endCheckbox }`.
|
|
72
|
+
- Checkbox / Radio slots mount v2 `<Checkbox size="sm">` / `<Radio size="sm">` internally — pass `{ checked, onChange }` via the corresponding `slotProps.*Checkbox` / `slotProps.startRadio`.
|
|
73
|
+
- Icon-hosting slots (`startAppsIcon`, `startIcon`, `endStatusIcon`, `endIcon`) render a 20 × 20 wrapper — pass the glyph via `slotProps.<slot>.icon`.
|
|
74
|
+
|
|
75
|
+
### `Breadcrumbs`
|
|
76
|
+
|
|
77
|
+
- `items: BreadcrumbItem[]` — ordered root → leaf; last entry rendered as "current" (`aria-current="page"`, semibold, `text.neutral.strong`).
|
|
78
|
+
- `BreadcrumbItem = { label: ReactNode; href?: string; onClick?: (e) => void; key?: string | number }` — `href` → `<a>`, `onClick` (no `href`) → `<button>`, neither → static `<span>`.
|
|
79
|
+
- `maxItems?: number` — collapse middle items into an overflow indicator when `items.length > maxItems`.
|
|
80
|
+
- `itemsBeforeCollapse?: number` — default `1`.
|
|
81
|
+
- `itemsAfterCollapse?: number` — default `2`.
|
|
82
|
+
- `onOverflowClick?: (e: MouseEvent<HTMLButtonElement>) => void` — when set, overflow renders as a focusable `<button>`.
|
|
83
|
+
- `separator?: ReactNode` — default 14px slash SVG in `foreground['neutral-bold'].strong`.
|
|
84
|
+
- `slotProps?: { root, list, item, currentItem, separator, overflow }`.
|
|
85
|
+
|
|
86
|
+
### `Input.Text`
|
|
87
|
+
|
|
88
|
+
- `size?: 'sm' | 'md' | 'lg'`.
|
|
89
|
+
- `label?: ReactNode` — sibling above the field (not a notched legend).
|
|
90
|
+
- `helperText?: ReactNode` — bottom-row left side.
|
|
91
|
+
- `error?: boolean`, `required?: boolean`.
|
|
92
|
+
- `prefix?: ReactNode` — left adornment; string values render Inter Regular 14/20 in `text.neutral.soft`, ReactNode renders as-is.
|
|
93
|
+
- `suffix?: ReactNode` — right adornment; same rendering rules as `prefix`.
|
|
94
|
+
- `showCounter?: boolean` / `counterText?: string` — bottom-row right side (e.g. `"0/100"`).
|
|
95
|
+
- `slotProps?: { root, label, field, input, prefix, suffix, helper, counter }`.
|
|
96
|
+
- Single-line only — `multiline`, `rows`, `select` are stripped from the v2 API.
|
|
97
|
+
|
|
98
|
+
## Missing a spec? Extract one.
|
|
99
|
+
|
|
100
|
+
If you're implementing a v2 design against a component whose spec is marked "pending" above, run the `v2-figma-extract` skill inside the `hiver-ui-kit` repo on the corresponding Figma selection. That produces the `.figma-spec.md` and lets you delete the inline block.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# v2 usage examples
|
|
2
|
+
|
|
3
|
+
Load this before composing common v2 shapes. It captures repo-agnostic patterns for combining v1 chrome primitives (Popover / Modal / Popper / Tooltip / Stack / Box) with v2 content components (Dropdown, Button, IconButton, InlineSelectLabel, Avatar, Input, Tag).
|
|
4
|
+
|
|
5
|
+
## Patterns to internalise
|
|
6
|
+
|
|
7
|
+
- **v1 chrome, v2 content.** For modals, popovers, portalled surfaces — v1 primitives (`Modal`, `Popover`, `Popper`, `Tooltip`, `Stack`, `Box`) provide behaviour (anchoring, focus trap, click-away, layout). v2 provides the visible surface + interactive content (`Dropdown`, `Button`, `IconButton`, `InlineSelectLabel`, `Avatar`, `Input`, `Tag`).
|
|
8
|
+
- **Neutralise v1 `Popover` chrome when placing a v2 Dropdown inside it.** Pass `PaperProps={{ elevation: 0, sx: { backgroundColor: 'transparent', boxShadow: 'none', overflow: 'visible' } }}` so the v2 Dropdown's shadow is the only visible surface.
|
|
9
|
+
- **Icon inputs to v2 components.** v2 icon-hosting components (`IconButton`, `Dropdown.ListItem`'s icon slots, `Avatar type="icon"`) accept raw SVG components, MUI icons, or `<img>` tags as children / `slotProps.<slot>.icon`. Icon slots typically expect the glyph to inherit `currentColor`.
|
|
10
|
+
- **Disabled / loading gate.** Composers gate the primary CTA via `disabled`; secondary controls stay interactive.
|
|
11
|
+
- **Inline field trigger + Popover.** Use v2 `InlineSelectLabel` as the trigger (icon / avatar + label + `+N`) and open a searchable popover with v2 `Dropdown` inside a v1 `Popover`. Render v2 `Avatar` (`type="picture" \| "initials" \| "icon"`, `size="2xs"`) for each user row.
|
|
12
|
+
- **Modal shell.** v1 `Modal` chrome around v2 `Button` (destructive) + v2 `IconButton` (close X). v1 `Stack` / `Typography` / `icons` handle layout + copy. Backdrop click / X / Esc all route through the same cancel handler.
|
|
13
|
+
- **Toolbar / composer row.** Horizontal toolbar: v1 `Stack` + `Tooltip` + `Box` around v2 `IconButton` (SVG glyph passed as child) + v2 `Button` for the primary CTA. Left cluster stays enabled; right primary reflects a disabled gate.
|
|
14
|
+
|
|
15
|
+
## Discoverable examples
|
|
16
|
+
|
|
17
|
+
TODO: fill in with real file references from the web repo as v2 consumers land.
|
|
18
|
+
|
|
19
|
+
Until then, grep the web repo for `@hiver/hiver-ui-kit/v2` to find live examples:
|
|
20
|
+
|
|
21
|
+
```sh
|
|
22
|
+
grep -rl "@hiver/hiver-ui-kit/v2" src/
|
|
23
|
+
```
|
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Map Figma text styles to `<Typography variant="...">`. Match by fontSize + fontWeight (regular 400, medium 500, semiBold 600, bold 700).
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
-
|
|
7
|
-
-
|
|
5
|
+
Two variant sets live in the theme:
|
|
6
|
+
- **v1 variants** (below) — font family **Open Sans**, names like `h2_medium`, `body1_regular`.
|
|
7
|
+
- **v2 variants** (bottom of file) — font family **Inter**, names like `heading_md_semiBold`, `body_md_regular`.
|
|
8
|
+
|
|
9
|
+
Match the Figma text style against both sets; use the variant whose fontSize/weight matches. When the match lands on a v2 variant, the design is v2 — pair it with v2 components (`@hiver/hiver-ui-kit/v2`).
|
|
8
10
|
|
|
9
11
|
## Heading variants
|
|
10
12
|
|
|
@@ -72,9 +74,21 @@ Map Figma text styles to `<Typography variant="...">`. Match by fontSize + fontW
|
|
|
72
74
|
| `buttonSmall` | 12 | 500 | 20px | 0.4px |
|
|
73
75
|
| `chip` | 12 | 500 | 12px | 0.4px |
|
|
74
76
|
|
|
75
|
-
##
|
|
77
|
+
## Usage
|
|
78
|
+
|
|
79
|
+
```jsx
|
|
80
|
+
<Typography variant="h2_medium">Section title</Typography>
|
|
81
|
+
<Typography variant="body1_regular">Body text</Typography>
|
|
82
|
+
<Typography variant="caption1_medium" color="text.secondary">Caption</Typography>
|
|
83
|
+
```
|
|
76
84
|
|
|
77
|
-
|
|
85
|
+
**Figma → variant:** Compare Figma text style fontSize and weight (Regular/Medium/Semi Bold/Bold) to the tables above and pick the closest match.
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## v2 variants
|
|
90
|
+
|
|
91
|
+
Font family **Inter**. Naming: `body_<size>_<weight>`, `heading_<size>_<weight>`, `display_<size>_<weight>`, `caption_<weight>`, `overline_<weight>`. Weight suffix → numeric weight: `regular` = 400, `medium` = 500, `semiBold` = 600, `bold` = 700.
|
|
78
92
|
|
|
79
93
|
### Display
|
|
80
94
|
|
|
@@ -113,27 +127,26 @@ Canonical 2026 design tokens. Use these for new UI built against the 2026 design
|
|
|
113
127
|
| `body_xs_medium` | 12 | 500 | 18px | -0.005em |
|
|
114
128
|
| `body_xs_semiBold` | 12 | 600 | 18px | -0.005em |
|
|
115
129
|
|
|
116
|
-
### Caption & overline
|
|
130
|
+
### Caption & overline
|
|
117
131
|
|
|
118
132
|
| Variant | fontSize | fontWeight | lineHeight | letterSpacing | Notes |
|
|
119
133
|
|---------|----------|------------|------------|---------------|-------|
|
|
120
134
|
| `caption_regular` | 12 | 400 | 14px | 0.01em | |
|
|
121
135
|
| `caption_medium` | 12 | 500 | 14px | 0.01em | |
|
|
122
136
|
| `overline_regular` | 12 | 400 | 14px | 0.01em | UPPERCASE |
|
|
137
|
+
| `overline_medium` | 12 | 500 | 14px | 0.01em | UPPERCASE |
|
|
123
138
|
|
|
124
139
|
> Note: a 2026 `overline_medium` token also exists in the theme (Inter, 12 / 500 / 14px / 0.01em / UPPERCASE) and shares its name with the legacy Open Sans `overline_medium` (11 / 500 / 18px). The 2026 spread is applied after the legacy block, so the Inter version wins at runtime — use accordingly.
|
|
125
140
|
|
|
126
|
-
|
|
141
|
+
### Usage (v2)
|
|
127
142
|
|
|
128
143
|
```jsx
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
<Typography variant="caption1_medium" color="text.secondary">Caption</Typography>
|
|
144
|
+
// Consumer must import v2 components from '@hiver/hiver-ui-kit/v2' and mount under a v2-enabled provider.
|
|
145
|
+
import { Typography } from '@hiver/hiver-ui-kit/v2';
|
|
132
146
|
|
|
133
|
-
|
|
134
|
-
<Typography variant="heading_lg_semiBold">Page title</Typography>
|
|
147
|
+
<Typography variant="heading_md_semiBold">Section title</Typography>
|
|
135
148
|
<Typography variant="body_md_regular">Body text</Typography>
|
|
136
|
-
<Typography variant="
|
|
149
|
+
<Typography variant="caption_medium" color="text.neutral.soft">Caption</Typography>
|
|
137
150
|
```
|
|
138
151
|
|
|
139
|
-
**Figma → variant:**
|
|
152
|
+
**Figma → variant (v2):** Match Figma text style fontSize and weight to the tables above. Prefer the exact match; if fontSize matches but weight doesn't, pick the closest weight variant in the same row group.
|