@bitrise/bitkit-v2 0.3.441-beta.2799 → 0.3.442
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/dist/components/BitkitMarkdown/BitkitMarkdown.js +2 -8
- package/dist/components/BitkitMarkdown/BitkitMarkdown.js.map +1 -1
- package/dist/components/BitkitTabs/BitkitTabs.d.ts +22 -0
- package/dist/components/BitkitTabs/BitkitTabs.js +66 -40
- package/dist/components/BitkitTabs/BitkitTabs.js.map +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/theme/slot-recipes/Tabs.recipe.d.ts +94 -6
- package/dist/theme/slot-recipes/Tabs.recipe.js +214 -131
- package/dist/theme/slot-recipes/Tabs.recipe.js.map +1 -1
- package/dist/theme/slot-recipes/index.d.ts +94 -6
- package/dist/utilities/getTextContent.d.ts +3 -0
- package/dist/utilities/getTextContent.js +14 -0
- package/dist/utilities/getTextContent.js.map +1 -0
- package/docs/v1-to-v2-migration-guide.md +20 -0
- package/package.json +1 -1
|
@@ -225,6 +225,26 @@ The API changed fundamentally — from index-based to value-based:
|
|
|
225
225
|
|
|
226
226
|
This is one of the more involved migrations — every tab needs an explicit `value`.
|
|
227
227
|
|
|
228
|
+
| v1 | v2 |
|
|
229
|
+
|----|----|
|
|
230
|
+
| `ContainedTab` | `BitkitTabs.Trigger`, with `variant="contained"` on the root |
|
|
231
|
+
| `leftIconName` / `iconName` | `icon` |
|
|
232
|
+
| `iconColor` | `iconColor`, `contained` only, and only an `icon/*` token |
|
|
233
|
+
| `isWarning` | `icon={IconWarningYellow}` |
|
|
234
|
+
| `badge={{ children: '3' }}` | `badge={<BitkitBadge>3</BitkitBadge>}` |
|
|
235
|
+
| `isDisabled` | `disabled` |
|
|
236
|
+
| `isLazy` | `lazyMount` **and** `unmountOnExit` |
|
|
237
|
+
| `onChange(index)` | `onValueChange({ value })` |
|
|
238
|
+
| `TabPanels` / `TabPanel` | `BitkitTabs.ContentGroup` / `BitkitTabs.Content` |
|
|
239
|
+
|
|
240
|
+
Things that behave differently:
|
|
241
|
+
- **An uncontrolled root needs `defaultValue`.** v1 fell back to index 0; without `defaultValue`, v2 selects nothing and shows no panel. The same happens when `value` matches no trigger, e.g. a stale query parameter for a tab that is hidden.
|
|
242
|
+
- **`isLazy` alone is `lazyMount`, not the whole thing.** v1's `isLazy` unmounts a panel when you leave it; `lazyMount` on its own keeps every visited panel mounted.
|
|
243
|
+
- **`List` renders only its direct `Trigger` children** (fragments are unwrapped). A component that wraps a trigger compiles and then disappears. `Content` has no such filter.
|
|
244
|
+
- **`Trigger` children are a `string`.** `Attachments {count}` is two children; write one template string, or move the count to `badge`.
|
|
245
|
+
- **Tabs that do not fit collapse into a "N more…" menu** instead of v1's horizontal scroll.
|
|
246
|
+
- **Don't stretch line tabs yourself.** On mobile they share the row on their own while all of them fit, so drop per-trigger `flex` / `width`.
|
|
247
|
+
|
|
228
248
|
### Table
|
|
229
249
|
|
|
230
250
|
```tsx
|