@the-portland-company/shell 0.90.0 → 0.91.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 CHANGED
@@ -1,3 +1,13 @@
1
+ ## 0.91.0
2
+
3
+ Reverts the 0.88.0 and 0.89.0 shared form set (Ben 2026-10-24: restore the look from before the 10-22/23 shell wave; keep the 0.90.0 PageHeader, which matches the Spec). No live app uses 0.88 or newer.
4
+
5
+ - **Removed** `Button`, `Input`, `Select`, `Textarea`, `Checkbox`, `FileInput`, `FormField` and their types, from the root and `/native`.
6
+ - **Card** is back to its 0.87 form (plain padded box, `title` as an h3); the `--app-card-*` tokens are gone from chrome.css.
7
+ - **Theme.** The native-field border rule applies to every text-like control again (no `data-shell-field` exemption).
8
+ - **ESLint guard removed** (`@the-portland-company/shell/eslint`, its peer and dev dependency): its rules required the removed primitives.
9
+ - **Kept:** the 0.90.0 PageHeader, the router-agnostic PageHeader / BreadcrumbBar split and their `/native` exports (with `Card`, `HeaderTabBar`), and the `shell-version-check` bin.
10
+
1
11
  ## 0.90.0
2
12
 
3
13
  `PageHeader` matches the Spec (Reference/UI-Platform "Page header" and "Page header and width").
package/README.md CHANGED
@@ -172,56 +172,13 @@ All `<ShellChrome>` props are optional — only supply what your app has. The ch
172
172
 
173
173
  ---
174
174
 
175
- ## Form primitives
175
+ ## Page primitives on `native`
176
176
 
177
- Shared `Button`, `Input`, `Select`, `Textarea`, `Checkbox`, `FileInput` and `Card`, styled from the shell's tokens (`--app-btn-*`, `--app-field-*`, `--color-*`). 5px radius, 12px horizontal padding.
177
+ `PageHeader`, `Card`, `FormColumn`, and the deprecated `BreadcrumbBar` and `HeaderTabBar` are also exported from `@the-portland-company/shell/native`, which needs no Chakra or react-router peer.
178
178
 
179
- | Export | Props |
180
- |---|---|
181
- | `<Button>` | `variant`: `primary` (default) \| `secondary` \| `ghost` \| `danger`; `size`: `md` (44px, default) \| `sm` (36px); `loading` (spinner, `aria-busy`, blocks clicks); `disabled`; `href` or `as` for a link-button (e.g. `as={Link} to="/x"`); `type` defaults to `button`; forwards its ref. |
182
- | `<Input>` | All native input props plus `label`, `helperText`, `error`, `invalid`, `wrapperClassName`. 44px tall. Forwards its ref to the `<input>`. |
183
- | `<Select>` | Same as `Input`, with `<option>` children. 44px tall. Forwards its ref to the `<select>`. |
184
- | `<Textarea>` | Same as `Input`, 88px minimum height. Forwards its ref to the `<textarea>`. |
185
- | `<Checkbox>` | All native checkbox props plus `label`, `description`, `indeterminate`, `invalid`, `wrapperClassName`. The whole row is a 44px touch target; accent fill; `data-shell-field`. Forwards its ref to the `<input>`. |
186
- | `<FileInput>` | The `type="file"` control: `label`, `helperText`, `error`, `invalid`, `accept`, `multiple`, `wrapperClassName`. 44px tall. Forwards its ref. `Input` does not accept `type="file"` or `"checkbox"`. |
187
- | `<Card>` | `title`, `subtitle`, `aside`, `actions`, `footer`, `bodyClassName`, `padding` (`none \| sm \| md \| lg`, default `md`), `minH`, plus any div props. Plain `<Card title>` is a padded box with an h3; any of `subtitle`, `aside`, `actions`, `footer`, `bodyClassName` gives a bordered header / body / footer. |
188
-
189
- **Card and dark mode.** Card and Checkbox read `--app-card-bg`, `--app-card-border`, `--app-card-fg` and `--app-card-fg-muted` from `chrome.css`: light on `:root`, dark under `.dark`. Do not paint a card white in app CSS; override these tokens if an app needs a different surface.
190
-
191
- An `error` message marks the control invalid (`aria-invalid`, red border) and replaces the helper text; the label, helper and error are wired with `htmlFor` and `aria-describedby`.
192
-
193
- These primitives (and `Card`, `PageHeader`, `FormColumn`) are also exported from `@the-portland-company/shell/native`, which needs no Chakra or react-router peer. Apps without those peers should import from `native`.
194
-
195
- **Rule:** apps must use these instead of a local `Button`, `Input`, `Select` or `Textarea`. Do not hand-roll form controls or button styles in an app; if a control needs a new variant or state, add it here so every app gets it.
196
-
197
- ## Enforcement
198
-
199
- Spec: Components — shared primitives are mandatory. Apps must not hand-roll Button/Card/Input/Select/Textarea, and must not fall behind the shell version. Both are checked mechanically.
200
-
201
- Adopt in three lines:
202
-
203
- ```js
204
- // eslint.config.js (ESLint 9+ flat config)
205
- import shell from '@the-portland-company/shell/eslint'
206
- export default [...shell.configs.recommended /* , your other configs */]
207
- ```
208
-
209
- ```json
210
- // package.json
211
- { "scripts": { "lint": "eslint . && shell-version-check" } }
212
- ```
213
-
214
- Run `shell-version-check` in CI too (it is a package `bin`, so `npx shell-version-check` works after install).
215
-
216
- | Rule (`politogy-shell/…`) | Fails on |
217
- |---|---|
218
- | `no-local-primitives` | Declaring or exporting a local `Button`, `Card`, `Input`, `Select`, `Textarea`, `Checkbox`, `FileInput`, `PageHeader` or `FormColumn` (re-exports from the shell are fine). |
219
- | `no-raw-control-styling` | JSX `<button>`, `<input>`, `<select>`, `<textarea>` with `className` or `style`. Allowed in a file that imports the shell primitive of the same kind (wrapping). `<input type="checkbox">` needs `Checkbox` and `<input type="file">` needs `FileInput`; importing `Input` does not excuse them. |
220
- | `no-global-control-classes` | `className` strings matching `\b(btn\|input)(-[a-z]+)?\b`, including inside `clsx(...)`, ternaries and template literals. |
221
-
222
- Escape hatch: put `// shell-primitive-exempt: <reason>` on the line above (or the same line as) the offending code. A reason is required. Prefer adding the missing variant to the shell instead.
179
+ ## shell-version-check
223
180
 
224
- `shell-version-check` exits 1 when the app's declared shell range cannot install the latest published version (`npm view`, 10s timeout; exit 2 if that lookup fails). `--offline` compares against the installed shell version instead; `--cwd=<dir>` checks another package. The shell package itself does not enable these rules.
181
+ `shell-version-check` (a package `bin`, so `npx shell-version-check` works after install) exits 1 when the app's declared shell range cannot install the latest published version (`npm view`, 10s timeout; exit 2 if that lookup fails). `--offline` compares against the installed shell version instead; `--cwd=<dir>` checks another package.
225
182
 
226
183
  ## CSS imports
227
184