pixelize-design-library 3.3.0 → 3.3.1

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
@@ -9,6 +9,15 @@ Found a bug or a gap? Report it as a GitHub issue and track it to closure — se
9
9
  [COMPONENT-GOTCHAS.md](COMPONENT-GOTCHAS.md#found-a-gap-or-a-bug-report-it-then-track-it). A fix's
10
10
  line below names its issue number.
11
11
 
12
+ ## [3.3.1] — 2026-11-11
13
+
14
+ ### Docs
15
+
16
+ - **One look in every app.** `DESIGN-GUIDE.md` §5a is a swap table from each browser-native or raw-Chakra
17
+ control (`<select>`, `<input>`, `Badge`, `Tooltip`, `Menu`, `useToast`, `window.confirm`, a bordered `Box`)
18
+ to the library component and the props that look right. New code always passes `Select native={false}`;
19
+ the `native` default is unchanged, so no call site moves.
20
+
12
21
  ## [Unreleased]
13
22
 
14
23
  ### Added
@@ -119,6 +119,11 @@ There is now **one** picker. `Select` does both modes off the `native` prop:
119
119
  fully-React popup — searchable, `isMulti` with chips, grouped options, `isClearable`,
120
120
  `onCreate`, `renderOption`, `onLoadMore`, optional windowing via `virtualizeAfter`.
121
121
 
122
+ **New code passes `native={false}`.** The `true` default only exists so existing call sites don't
123
+ change; a native `<select>` next to themed fields is the "two apps" look DESIGN-GUIDE §5a removes.
124
+ Converting an existing call site changes its DOM (`combobox`/`listbox`, no `<option>`), so update
125
+ its tests in the same diff.
126
+
122
127
  `isMulti` always forces the popup — there is no native multi-select — and dev-warns if you
123
128
  also passed `native`.
124
129
 
package/DESIGN-GUIDE.md CHANGED
@@ -141,6 +141,38 @@ icon-only button gets an `aria-label` and a `ToolTip`. Inline or panel busy indi
141
141
  input in `FormControl` + `FormLabel`. In a settings row (title + description left, control right)
142
142
  the row title is the label: `<Text as="label" htmlFor={id}>` pointing at the field's `id`.
143
143
 
144
+ ## 5a. One look everywhere — the swap table
145
+
146
+ A screen that mixes library controls with browser or raw-Chakra ones looks like two apps. Every
147
+ row below has one answer; pass exactly these props and nothing that restates a default.
148
+
149
+ | Instead of | Use | Props that look right |
150
+ | --- | --- | --- |
151
+ | `<select>`, `Select` with no `native` | `Select` | `native={false}` — always; the default `native` renders the browser's own list |
152
+ | `<input>`, Chakra `Input` | `TextInput` | `label`, `helperText`, `errorMessage`; default `outline` |
153
+ | `<input type="number">` | `NumberInput` | — |
154
+ | `<input type="date">` / `"time"` | `DatePicker` / `TimePicker` | — |
155
+ | `<textarea>` | `InputTextArea` | `label` |
156
+ | `<input type="checkbox">` | `Checkbox` | — |
157
+ | `<input type="radio">` | `RadioButtonGroup` + `RadioButton`, or `ChoiceCardGroup` for big choices | — |
158
+ | An on/off checkbox or `Switch` | `ToggleSwitch` | in a settings list, inside `SettingRow` |
159
+ | `<button>`, Chakra `Button` | `Button` / `IconButton` | §5 role table; icon-only gets `aria-label` + `ToolTip` |
160
+ | Chakra `Badge`, a coloured `Box` pill | `StatusTag` for a status, `Tag` otherwise | `Tag variant="subtle" size="sm" tone=…` |
161
+ | `title=""`, Chakra `Tooltip` | `ToolTip` (`OverflowToolTip` for truncated text) | — |
162
+ | Chakra `Menu` for row/page actions | `Dropdown` | — |
163
+ | `Thead`/`Tr`/`Td` data lists | `Table` | `TableRoot` only for a tiny static key/value grid; prefer `DescriptionList` |
164
+ | `window.confirm`, a hand-built confirm `Modal` | `AlertDialog` / `ConfirmDialog` | `tone="danger"` for destructive |
165
+ | `alert()`, Chakra `useToast` | `useToaster().showToast` | `status` |
166
+ | Chakra `Spinner`, "Loading…" text | `Skeletons` shaped like the content; `Spinner` inline | — |
167
+ | A `Box` with border + shadow as a card | `Card` | default `elevated`; `variant="outline"` around a table or row list |
168
+ | A hand-built header row | `PageHeader` | one `solid` action |
169
+ | A blank area when there is no data | `EmptyState` / `QueryStateBoundary` | §7 |
170
+ | Tabs built from buttons | `Tabs` (panels) / `SegmentedControl` (a value) | defaults |
171
+
172
+ Layout and type (`Box`, `Flex`, `Stack`, `Grid`, `Text`, `Heading`, `Divider`) are not swaps — import
173
+ them from `pixelize-design-library` (§8). If a row's library component can't do what the screen
174
+ needs, report the gap rather than falling back to the raw one.
175
+
144
176
  ## 6. Page anatomy
145
177
 
146
178
  ```
@@ -292,7 +324,9 @@ hides its primary; when only one section is empty on a populated page, that sect
292
324
  passthrough at all — the owned component is the only one.
293
325
  - Reaching for `SelectV2` (`@deprecated`), `SearchSelect` or `SelectSearch` (not deprecated, but not the
294
326
  preferred picker) in new work.
295
- One picker now: `Select` (`native={false}` for the themed, searchable, multi popup).
327
+ One picker now: `Select`, always with `native={false}` in new work (the themed popup).
328
+ - Any browser-native control (`<select>`, `<input type="date">`, `<textarea>`, `window.confirm`)
329
+ or raw Chakra twin where §5a names a library component.
296
330
  `Dropdown` is the exception — it is an action menu, not a picker, and is not replaced.
297
331
  - A card inside a card; a border on a content `Card` (it is borderless by default), or any resting
298
332
  shadow heavier than `shadows.card`.
package/README.md CHANGED
@@ -75,6 +75,10 @@ function App() {
75
75
  export default App;
76
76
  ```
77
77
 
78
+ Building screens? Use the library component for every control, never the browser's or Chakra's —
79
+ [DESIGN-GUIDE.md §5a](DESIGN-GUIDE.md#5a-one-look-everywhere--the-swap-table) maps each native
80
+ element to its component and props (e.g. `Select` always takes `native={false}`).
81
+
78
82
  ## Theming and filled surfaces
79
83
 
80
84
  Nine brand presets with light/dark palettes. Wrap your app in `PixelizeThemeProvider` and read tokens
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pixelize-design-library",
3
- "version": "3.3.0",
3
+ "version": "3.3.1",
4
4
  "description": "React component library for Pixelize apps: themeable Chakra-based components, design tokens and light/dark brand theming.",
5
5
  "keywords": [
6
6
  "react",