@aleph-alpha/ui-library 6.0.0 → 6.2.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/config.d.ts +28 -4
- package/config.js +141 -23
- package/dist/system/components/UiTagsInput/UiTagsInput.vue.d.ts +2 -0
- package/dist/system/components/UiTagsInput/UiTagsInputItemDelete.vue.d.ts +2 -1
- package/dist/system/components/UiTagsInput/types.d.ts +21 -2
- package/dist/system/components/core/sidebar/utils.d.ts +9 -0
- package/dist/system/components/core/tags-input/TagsInputItemDelete.vue.d.ts +5 -0
- package/dist/system/icons/story-sidebar-icons.json +8 -0
- package/dist/system/lib.js +6106 -5997
- package/dist/system/patterns/UiLayout/UiLayoutContent.vue.d.ts +39 -0
- package/dist/system/patterns/UiLayout/index.d.ts +2 -0
- package/dist/system/patterns/UiLayout/layout-shell.d.ts +944 -0
- package/dist/system/patterns/UiLayout/types.d.ts +43 -0
- package/dist/system/patterns/index.d.ts +1 -0
- package/dist/system/story-sidebar-icons.json +8 -0
- package/docs/public-docs/migration-guide.md +402 -0
- package/docs/public-docs/quick-start.md +19 -10
- package/package.json +7 -4
- package/src/components/UiAlert/UiAlert.stories.ts +732 -0
- package/src/components/UiAlert/__tests__/UiAlert.test.ts +57 -11
- package/src/components/UiChip/UiChip.stories.ts +756 -2
- package/src/components/UiChip/UiChip.vue +7 -6
- package/src/components/UiChip/__tests__/UiChip.test.ts +38 -61
- package/src/components/UiDrawer/UiDrawer.stories.ts +665 -0
- package/src/components/UiDrawer/__tests__/UiDrawer.test.ts +6 -190
- package/src/components/UiLabel/UiLabel.stories.ts +691 -16
- package/src/components/UiLabel/__tests__/UiLabel.test.ts +18 -26
- package/src/components/UiSheet/UiSheet.stories.ts +751 -0
- package/src/components/UiSheet/__tests__/UiSheet.test.ts +6 -190
- package/src/components/UiSlider/UiSlider.stories.ts +716 -0
- package/src/components/UiSlider/__tests__/UiSlider.test.ts +8 -45
- package/src/components/UiSwitch/UiSwitch.stories.ts +11 -5
- package/src/components/UiTagsInput/UiTagsInput.stories.ts +850 -4
- package/src/components/UiTagsInput/UiTagsInput.vue +34 -0
- package/src/components/UiTagsInput/UiTagsInputItemDelete.vue +4 -1
- package/src/components/UiTagsInput/__tests__/UiTagsInput.test.ts +113 -29
- package/src/components/UiTagsInput/types.ts +24 -2
- package/src/components/core/sheet/SheetContent.vue +6 -1
- package/src/components/core/sidebar/Sidebar.vue +21 -5
- package/src/components/core/sidebar/utils.ts +10 -0
- package/src/components/core/switch/index.ts +8 -7
- package/src/components/core/tags-input/TagsInput.vue +4 -1
- package/src/components/core/tags-input/TagsInputItem.vue +13 -1
- package/src/components/core/tags-input/TagsInputItemDelete.vue +40 -7
- package/src/patterns/UiLayout/UiLayoutContent.stories.ts +1234 -0
- package/src/patterns/UiLayout/UiLayoutContent.vue +98 -0
- package/src/patterns/UiLayout/__tests__/UiLayoutContent.test.ts +97 -0
- package/src/patterns/UiLayout/index.ts +2 -0
- package/src/patterns/UiLayout/layout-shell.ts +64 -15
- package/src/patterns/UiLayout/types.ts +44 -0
- package/src/patterns/index.ts +1 -0
- package/src/theme/Typography.stories.ts +125 -133
- package/tokens.json +8132 -2475
- package/dist/system/icons/mobile-device-frame.png +0 -0
- package/dist/system/mobile-device-frame.png +0 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How the content box is divided between the primary content and the sidebar
|
|
3
|
+
* when the `sidebar` slot is filled, in columns of the 12-column layout grid.
|
|
4
|
+
*/
|
|
5
|
+
export type UiLayoutContentSidebarMode = 'default' | 'wide' | 'max';
|
|
6
|
+
/**
|
|
7
|
+
* Container for the primary content area — the main part of an application
|
|
8
|
+
* layout. It renders the sheet surface (`background/surface/secondary`) and
|
|
9
|
+
* carries the design system's 48px margin on its left and right edges — 32px
|
|
10
|
+
* below the `desktop` breakpoint (1200px), toward the minimum desktop size of
|
|
11
|
+
* 1024px — so pages start from the same inset instead of each carrying its
|
|
12
|
+
* own spacing. Divide the space inside it with a 12-column grid and 24px
|
|
13
|
+
* gutters.
|
|
14
|
+
*
|
|
15
|
+
* Slots: `default` for the page content; `split` for a split view — a border
|
|
16
|
+
* divides the content box into two equal parts, each keeping a 28px margin
|
|
17
|
+
* from the divider and a 6-column grid of its own; and `sidebar` for
|
|
18
|
+
* secondary content — locked to the right edge and sized by `sidebarMode`.
|
|
19
|
+
* In the sidebar view the primary area is the rounded sheet (12px radius)
|
|
20
|
+
* while the sidebar has no surface of its own; both keep 48px margins.
|
|
21
|
+
* @category Layout
|
|
22
|
+
* @useCases main content area, page body, layout grid container, split view, secondary sidebar
|
|
23
|
+
* @keywords layout, content, main, margin, grid, page, split, sidebar
|
|
24
|
+
* @related UiSidebar, UiTopBar
|
|
25
|
+
*/
|
|
26
|
+
export interface UiLayoutContentProps {
|
|
27
|
+
/**
|
|
28
|
+
* The element the content area renders as. Defaults to `main`, so the
|
|
29
|
+
* content area is exposed as the page's main landmark; pass another tag
|
|
30
|
+
* when the page already has a `main` landmark.
|
|
31
|
+
* @type {string}
|
|
32
|
+
* @default 'main'
|
|
33
|
+
*/
|
|
34
|
+
as?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Column split between the primary content and the sidebar, applied when
|
|
37
|
+
* the `sidebar` slot is filled: `default` is 8 to 4, `wide` is 7 to 5, and
|
|
38
|
+
* `max` is 6 to 6.
|
|
39
|
+
* @type {'default' | 'wide' | 'max'}
|
|
40
|
+
* @default 'default'
|
|
41
|
+
*/
|
|
42
|
+
sidebarMode?: UiLayoutContentSidebarMode;
|
|
43
|
+
}
|
|
@@ -6,6 +6,7 @@ export * from './UiDataTable';
|
|
|
6
6
|
export * from './UiDatePicker';
|
|
7
7
|
export * from './UiFileUpload';
|
|
8
8
|
export * from './UiFloatActions';
|
|
9
|
+
export * from './UiLayout';
|
|
9
10
|
export * from './UiPlaceholder';
|
|
10
11
|
export * from './UiProfileCard';
|
|
11
12
|
export * from './UiSidebar';
|
|
@@ -4,7 +4,10 @@
|
|
|
4
4
|
"components-uibuttongroup--accessibility": "accessibility",
|
|
5
5
|
"components-uicheckbox--design-notes": "palette",
|
|
6
6
|
"components-uicheckbox--accessibility": "accessibility",
|
|
7
|
+
"components-uichip--accessibility": "accessibility",
|
|
8
|
+
"components-uialert--accessibility": "accessibility",
|
|
7
9
|
"components-uidialog--accessibility": "accessibility",
|
|
10
|
+
"components-uidrawer--accessibility": "accessibility",
|
|
8
11
|
"components-uialertdialog--accessibility": "accessibility",
|
|
9
12
|
"components-uidropdownmenu--accessibility": "accessibility",
|
|
10
13
|
"components-uitooltip--accessibility": "accessibility",
|
|
@@ -13,18 +16,23 @@
|
|
|
13
16
|
"components-uifield--accessibility": "accessibility",
|
|
14
17
|
"components-uiitem--design-notes": "palette",
|
|
15
18
|
"components-uiitem--accessibility": "accessibility",
|
|
19
|
+
"components-uilabel--accessibility": "accessibility",
|
|
16
20
|
"components-uiinput--design-notes": "palette",
|
|
17
21
|
"components-uiinput--accessibility": "accessibility",
|
|
18
22
|
"components-uitextarea--accessibility": "accessibility",
|
|
19
23
|
"components-uilistbox--accessibility": "accessibility",
|
|
20
24
|
"components-uiradiogroup--accessibility": "accessibility",
|
|
21
25
|
"components-uiselect--accessibility": "accessibility",
|
|
26
|
+
"components-uisheet--accessibility": "accessibility",
|
|
27
|
+
"components-uislider--accessibility": "accessibility",
|
|
22
28
|
"components-uiswitch--accessibility": "accessibility",
|
|
29
|
+
"components-uitagsinput--accessibility": "accessibility",
|
|
23
30
|
"components-uitoggle--accessibility": "accessibility",
|
|
24
31
|
"components-uitogglegroup--accessibility": "accessibility",
|
|
25
32
|
"components-uiautocomplete--accessibility": "accessibility",
|
|
26
33
|
"components-uibreadcrumb--accessibility": "accessibility",
|
|
27
34
|
"patterns-uifloatactions--accessibility": "accessibility",
|
|
35
|
+
"patterns-uilayout-content--accessibility": "accessibility",
|
|
28
36
|
"patterns-uidatatable--accessibility": "accessibility",
|
|
29
37
|
"patterns-uitopbar--accessibility": "accessibility",
|
|
30
38
|
"patterns-uifileupload-uifileitem--accessibility": "accessibility",
|
|
@@ -0,0 +1,402 @@
|
|
|
1
|
+
# Migration Guide
|
|
2
|
+
|
|
3
|
+
What changed in every `@aleph-alpha/ui-library` release from 3.0.0 onwards, and what you have to do about it.
|
|
4
|
+
|
|
5
|
+
Read the section for the release you are jumping to, then work backwards through the sections for every release in between. Each section lists only the changes that require you to edit code: new components and additive props are in the [CHANGELOG](https://github.com/Aleph-Alpha/frontend-hub/blob/main/packages/ui-library/CHANGELOG.md) and do not appear here.
|
|
6
|
+
|
|
7
|
+
!!! warning "Breaking changes are not always in a major"
|
|
8
|
+
The library and `@aleph-alpha/chat-kit` share a release group, so a major bump can come from either package. The reverse also happens: **5.11.0 removed `UiSidebarProvider` and `UiSidebarInset` in a minor release.** Read the section for every version you skip, not just the majors.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## General Advice
|
|
13
|
+
|
|
14
|
+
### Migrate one version at a time
|
|
15
|
+
|
|
16
|
+
Move through the releases in order and get the app running after each step, rather than jumping from 3.x to 6.0 in one commit. Most of the work in this guide is in a single release (5.11.0), and it is much easier to see what broke when nothing else moved.
|
|
17
|
+
|
|
18
|
+
### Pin before you start
|
|
19
|
+
|
|
20
|
+
The library follows the [Component Lifecycle](component-lifecycle.md): components tagged `experimental` or `beta` in Storybook can change their API in a minor release. If you depend on one, pin the exact version while you migrate.
|
|
21
|
+
|
|
22
|
+
### Check the Node version first
|
|
23
|
+
|
|
24
|
+
Every release declares a minimum Node version in `engines`. On too old a Node you get an `EBADENGINE` warning, or a hard install failure if your project sets `engine-strict=true`.
|
|
25
|
+
|
|
26
|
+
| Library version | Minimum Node |
|
|
27
|
+
| --------------- | ------------ |
|
|
28
|
+
| 6.0.0 and later | `>=22.13.0` |
|
|
29
|
+
| 3.0.0 – 5.11.0 | `>=20.19.0` |
|
|
30
|
+
|
|
31
|
+
### Let Storybook tell you what a component looks like now
|
|
32
|
+
|
|
33
|
+
Several releases change spacing, typography, and default visibility without changing any prop. [Storybook](https://dev.aleph-alpha.de/ui-library) is the reference for the current appearance; comparing it against your app is faster than reading diffs.
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Migrating to 7.0 (unreleased)
|
|
38
|
+
|
|
39
|
+
### Numbered body and label classes become step names
|
|
40
|
+
|
|
41
|
+
The token scale names its size steps instead of numbering them, so the typography utilities follow. Both spellings work in 6.x and produce identical declarations; **the numbered classes are removed in 7.0.0**, so do the rename now.
|
|
42
|
+
|
|
43
|
+
| Deprecated | Replacement | Size |
|
|
44
|
+
| ---------- | ----------- | ---- |
|
|
45
|
+
| `label-12-{regular,medium,bold}` | `label-xs-{regular,medium,bold}` | 12px |
|
|
46
|
+
| `label-14-{regular,medium,bold}` | `label-s-{regular,medium,bold}` | 14px |
|
|
47
|
+
| `label-16-{regular,medium,bold}` | `label-m-{regular,medium,bold}` | 16px |
|
|
48
|
+
| `body-14-{regular,medium,bold}` | `body-s-{regular,medium,bold}` | 14px |
|
|
49
|
+
| `body-16-{regular,medium,bold}` | `body-m-{regular,medium,bold}` | 16px |
|
|
50
|
+
|
|
51
|
+
The `*-normal` aliases rename the same way (`body-14-normal` → `body-s-normal`), and heading utilities are unaffected — they were already step-named (`heading-s` … `heading-2xl`).
|
|
52
|
+
|
|
53
|
+
Because the replacement is a pure rename, a search and replace is enough:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
# From your project root. `sed -i ''` is BSD/macOS; GNU sed takes `sed -i`.
|
|
57
|
+
rg -l 'label-1[246]-|body-1[46]-' src \
|
|
58
|
+
| xargs sed -i '' \
|
|
59
|
+
-e 's/label-12-/label-xs-/g' \
|
|
60
|
+
-e 's/label-14-/label-s-/g' \
|
|
61
|
+
-e 's/label-16-/label-m-/g' \
|
|
62
|
+
-e 's/body-14-/body-s-/g' \
|
|
63
|
+
-e 's/body-16-/body-m-/g'
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Check the result against the [Typography](https://dev.aleph-alpha.de/ui-library/?path=/docs/css-utility-typography--docs) page in Storybook, which lists every step with the deprecated name it replaces.
|
|
67
|
+
|
|
68
|
+
!!! note "Only the class names changed"
|
|
69
|
+
The underlying tokens are the same `Label 12`, `Label 14`, `Label 16`, `Body 14`, and `Body 16` groups, so nothing about your rendered type changes. If the rename shifts your layout, the class was misspelled and was never matching.
|
|
70
|
+
|
|
71
|
+
### AA Brand is available as a theme
|
|
72
|
+
|
|
73
|
+
Additive, but worth knowing if you maintain a theme setup: `2-theme/AA Brand` joins AA Base and WCAG 2.2 as a selectable token theme.
|
|
74
|
+
|
|
75
|
+
```ts
|
|
76
|
+
// uno.config.ts — pick it at build time
|
|
77
|
+
export default defineUiLibraryConfig({ themeMode: 'brand' });
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
```ts
|
|
81
|
+
// …or emit it alongside the default theme and toggle `html.brand-theme` at runtime
|
|
82
|
+
export default defineUiLibraryConfig({ brandTheme: true });
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
A theme only overrides what it redefines; anything AA Brand leaves out still resolves from AA Base.
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## Migrating from 5.11 to 6.0
|
|
90
|
+
|
|
91
|
+
### Node 20 is no longer supported
|
|
92
|
+
|
|
93
|
+
The only breaking change in 6.0.0. The `engines` field moved from `>=20.19.0` to `>=22.13.0` across the monorepo, and `.nvmrc` now pins `22.22.2`.
|
|
94
|
+
|
|
95
|
+
There is no code change. Update the Node version wherever your project declares one:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
# .nvmrc
|
|
99
|
+
22.22.2
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
```json
|
|
103
|
+
// package.json
|
|
104
|
+
{
|
|
105
|
+
"engines": {
|
|
106
|
+
"node": ">=22.13.0"
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Then update CI images, Docker base images, and any `actions/setup-node` step.
|
|
112
|
+
|
|
113
|
+
!!! danger "With `engine-strict`, installs fail rather than warn"
|
|
114
|
+
If your `.npmrc` sets `engine-strict=true` — as this repository does — the install is rejected with `EBADENGINE` on Node 20, so CI fails before the build runs.
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## Migrating from 5.10 to 5.11
|
|
119
|
+
|
|
120
|
+
This release rewrote the sidebar pattern for mobile and is the largest migration in the 3.x–6.x range. `UiSidebarProvider` and `UiSidebarInset` were removed, `UiSidebar` lost its `variant` prop, and the desktop sidebar changed from a fixed overlay to an ordinary flex child.
|
|
121
|
+
|
|
122
|
+
### Summary of the sidebar changes
|
|
123
|
+
|
|
124
|
+
| Before (5.10 and earlier) | After (5.11) |
|
|
125
|
+
| ------------------------- | ------------ |
|
|
126
|
+
| `UiSidebarProvider` owned open state, CSS variables, and the layout wrapper | `UiSidebar` owns all of it; there is no provider |
|
|
127
|
+
| `UiSidebarInset` rendered the content column as `<main>` | No inset component; you write the content column yourself |
|
|
128
|
+
| `UiSidebar variant="sidebar" \| "floating" \| "inset"` | `variant` removed; one appearance |
|
|
129
|
+
| Desktop sidebar was `fixed` with a spacer element | Desktop sidebar is a flex child inside your own row |
|
|
130
|
+
| `UiSidebarTrigger` was hidden below `md` | Trigger renders at every breakpoint and supports `v-model:open` |
|
|
131
|
+
| Mobile slid the inset sideways | Mobile renders an off-canvas drawer inside `UiSidebar` |
|
|
132
|
+
|
|
133
|
+
### Everything that was removed
|
|
134
|
+
|
|
135
|
+
Four components and three types are gone. Two of the components are public API; the other two are the `core` primitives they wrapped, which are internal (`components/core` is excluded from the package barrel) and only matter if you deep-import them.
|
|
136
|
+
|
|
137
|
+
| Removed | Public API? | Action |
|
|
138
|
+
| ------- | ----------- | ------ |
|
|
139
|
+
| `UiSidebarProvider` | Yes | Delete the wrapper and move `default-open` / `v-model:open` onto `UiSidebar`, which now owns the state. [Details](#uisidebarprovider-is-gone-bind-state-on-uisidebar) |
|
|
140
|
+
| `UiSidebarInset` | Yes | No replacement component. Write the content column as your own element. [Details](#uisidebarinset-is-gone-write-the-content-column) |
|
|
141
|
+
| `SidebarProvider` | No, internal | No replacement. `Sidebar` provides the context itself, so drop the wrapper. |
|
|
142
|
+
| `SidebarInset` | No, internal | No replacement. Write the content column as your own element. |
|
|
143
|
+
| `UiSidebarProviderProps` | Yes | Use `UiSidebarProps`. |
|
|
144
|
+
| `UiSidebarProviderEmits` | Yes | Use the new `UiSidebarEmits`. |
|
|
145
|
+
| `UiSidebarInsetProps` | Yes | No replacement; there is no inset component to type. |
|
|
146
|
+
|
|
147
|
+
Everything else the sidebar exports — `UiSidebar`, `UiSidebarContent`, `UiSidebarHeader`, `UiSidebarFooter`, `UiSidebarGroup*`, `UiSidebarMenu*`, `UiSidebarPopover*`, `UiSidebarRail`, `UiSidebarSub`, and `UiSidebarTrigger` — is still exported under the same name. The sections below cover the ones whose behaviour changed.
|
|
148
|
+
|
|
149
|
+
### `UiSidebarProvider` is gone; bind state on `UiSidebar`
|
|
150
|
+
|
|
151
|
+
`UiSidebar` now holds the open state itself. It accepts the props the provider used to take (`open`, `defaultOpen`, `mobileTransitionDuration`), emits `update:open`, and still handles <kbd>Cmd</kbd>/<kbd>Ctrl</kbd>+<kbd>B</kbd> and the `sidebar_state` cookie. It also brings its own `TooltipProvider`, so menu-button tooltips keep working on the collapsed icon rail.
|
|
152
|
+
|
|
153
|
+
```vue
|
|
154
|
+
<!-- Before: 5.10 -->
|
|
155
|
+
<UiSidebarProvider :default-open="true">
|
|
156
|
+
<UiSidebar collapsible="icon">
|
|
157
|
+
<UiSidebarContent>…</UiSidebarContent>
|
|
158
|
+
</UiSidebar>
|
|
159
|
+
</UiSidebarProvider>
|
|
160
|
+
|
|
161
|
+
<!-- After: 5.11 -->
|
|
162
|
+
<UiSidebar :default-open="true" collapsible="icon">
|
|
163
|
+
<UiSidebarContent>…</UiSidebarContent>
|
|
164
|
+
</UiSidebar>
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
The removed `UiSidebarProviderProps` and `UiSidebarProviderEmits` types are replaced by `UiSidebarProps` and the new `UiSidebarEmits`.
|
|
168
|
+
|
|
169
|
+
### You now own the layout wrapper
|
|
170
|
+
|
|
171
|
+
The provider used to render the flex wrapper that gave the shell its height (`flex min-h-svh w-full overflow-hidden bg-background`) and set `--sidebar-width`, `--sidebar-width-icon`, `--sidebar-width-mobile`, and `--sidebar-mobile-transition-duration` on it. `UiSidebar` sets those variables on itself so it can be dropped anywhere, which means **the sidebar no longer establishes the page height or the row it sits in**. Without a wrapper of your own, the sidebar collapses to its content height.
|
|
172
|
+
|
|
173
|
+
Wrap the sidebar and the content column in a flex row with an explicit height:
|
|
174
|
+
|
|
175
|
+
```vue
|
|
176
|
+
<div class="flex h-svh w-full overflow-hidden">
|
|
177
|
+
<UiSidebar v-model:open="open" collapsible="icon">
|
|
178
|
+
<UiSidebarContent>…</UiSidebarContent>
|
|
179
|
+
</UiSidebar>
|
|
180
|
+
|
|
181
|
+
<main class="bg-background flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden">
|
|
182
|
+
…
|
|
183
|
+
</main>
|
|
184
|
+
</div>
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
!!! note "Siblings that need `--sidebar-width`"
|
|
188
|
+
Because the variable now lives on the sidebar element, a sibling cannot inherit it. Either set it on a container the two share, or use the fallback: `calc(var(--sidebar-width, 16rem) - 1rem)`. The defaults are `16rem` expanded and `3rem` on the icon rail.
|
|
189
|
+
|
|
190
|
+
### `UiSidebarInset` is gone; write the content column
|
|
191
|
+
|
|
192
|
+
There is no replacement component. The inset was a `<main>` element with a handful of classes, so it becomes markup in your app. This also retires the `as` prop that 5.2.0 added for pages with more than one inset — you now choose the element directly.
|
|
193
|
+
|
|
194
|
+
```vue
|
|
195
|
+
<!-- Before: 5.10 -->
|
|
196
|
+
<UiSidebarInset>
|
|
197
|
+
<PageContent />
|
|
198
|
+
</UiSidebarInset>
|
|
199
|
+
|
|
200
|
+
<!-- After: 5.11 -->
|
|
201
|
+
<main class="bg-background flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden">
|
|
202
|
+
<PageContent />
|
|
203
|
+
</main>
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
### `variant` is removed from `UiSidebar`
|
|
207
|
+
|
|
208
|
+
The `sidebar`, `floating`, and `inset` variants are gone, along with the `data-variant` attribute and the rounded/shadowed treatments they applied. Delete the prop; there is one appearance now. If you relied on `variant="floating"` or `variant="inset"`, apply the rounding and shadow on your own wrapper instead.
|
|
209
|
+
|
|
210
|
+
### `UiSidebarTrigger` is visible at every breakpoint
|
|
211
|
+
|
|
212
|
+
The trigger dropped its `hidden md:inline-flex` classes, because its expected home is now a top bar that stays on screen in mobile mode. Two consequences:
|
|
213
|
+
|
|
214
|
+
- If you already place a trigger in your own header, it now also renders below `md`. Remove your own responsive wrapper or hide it yourself.
|
|
215
|
+
- The trigger built into `UiSidebarHeader` is now desktop-only (`hidden md:inline-flex`), since the whole header is off-canvas on mobile.
|
|
216
|
+
|
|
217
|
+
The trigger also gained a controlled mode for exactly this arrangement. A top bar is the sidebar's *sibling*, so there is no sidebar context to inject from; bind `open` to the same ref the sidebar uses. `tooltipSide` (default `right`) lets the tooltip open downwards out of a bar.
|
|
218
|
+
|
|
219
|
+
```vue
|
|
220
|
+
<UiTopBar>
|
|
221
|
+
<template #sidebar-toggle>
|
|
222
|
+
<UiSidebarTrigger v-model:open="open" tooltip="Toggle sidebar" tooltip-side="bottom" />
|
|
223
|
+
</template>
|
|
224
|
+
</UiTopBar>
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
Left uncontrolled and placed inside a `UiSidebar`, it behaves as before. The trigger now also sets `aria-expanded`.
|
|
228
|
+
|
|
229
|
+
### If you reach for the sidebar context, it moved
|
|
230
|
+
|
|
231
|
+
`useSidebar()` is internal — it lives in `components/core` and is not exported from the package — so this only affects library contributors and anything importing a deep path. The context now comes from `UiSidebar` instead of the provider, so a `useSidebar()` call that used to sit between the provider and the sidebar throws. Move it inside `UiSidebar`, or use `useSidebarOptional()`, which returns `null` instead of throwing when there is no sidebar above it.
|
|
232
|
+
|
|
233
|
+
In an app, drive the sidebar with `v-model:open` and, for a trigger outside it, `v-model:open` on `UiSidebarTrigger`.
|
|
234
|
+
|
|
235
|
+
### Tell the mobile drawer where your top bar ends
|
|
236
|
+
|
|
237
|
+
The mobile drawer is an overlay anchored to the viewport, so it does not know about a bar above it. Set `--sidebar-offset-top` on a shared ancestor and the drawer starts below it and shortens by the same amount. The fallback is `0px`, so a full-height drawer needs no change.
|
|
238
|
+
|
|
239
|
+
```vue
|
|
240
|
+
<script setup lang="ts">
|
|
241
|
+
const topBarRef = ref<ComponentPublicInstance | HTMLElement | null>(null)
|
|
242
|
+
const topBarHeight = ref(0)
|
|
243
|
+
useResizeObserver(topBarRef, ([entry]) => {
|
|
244
|
+
if (entry) topBarHeight.value = entry.borderBoxSize[0]?.blockSize ?? 0
|
|
245
|
+
})
|
|
246
|
+
const shellStyle = computed(() => ({
|
|
247
|
+
'--sidebar-offset-top': `${topBarHeight.value}px`,
|
|
248
|
+
}))
|
|
249
|
+
</script>
|
|
250
|
+
|
|
251
|
+
<template>
|
|
252
|
+
<div class="flex h-svh w-full flex-col" :style="shellStyle">
|
|
253
|
+
<UiTopBar ref="topBarRef" class="shrink-0">…</UiTopBar>
|
|
254
|
+
…
|
|
255
|
+
</div>
|
|
256
|
+
</template>
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
Set the variable by name; the `SIDEBAR_OFFSET_TOP_VAR` constant is internal to the library and not exported from the package.
|
|
260
|
+
|
|
261
|
+
### Name the sidebar landmark yourself
|
|
262
|
+
|
|
263
|
+
`UiSidebar` renders a `div`, not an `aside`: committing every sidebar to a `complementary` landmark cannot be overridden and breaks when a screen nests two of them. Add the landmark in your app:
|
|
264
|
+
|
|
265
|
+
```vue
|
|
266
|
+
<UiSidebar role="navigation" aria-label="Main">…</UiSidebar>
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
This was true before 5.11 as well, but it is worth checking while you are in this code.
|
|
270
|
+
|
|
271
|
+
### Visual changes to `UiSidebarMenuButton`
|
|
272
|
+
|
|
273
|
+
No API change, but rows look different and may shift your layout:
|
|
274
|
+
|
|
275
|
+
- Rows are taller on touch: `h-10` below `md`, `h-8` from `md` up, with matching vertical padding.
|
|
276
|
+
- A title in a row that has a subtitle is now `body-14-regular`, where it used to be `body-14-bold` (or `body-14-medium` when active). An active row without a subtitle still uses `body-14-medium`.
|
|
277
|
+
- Subtitles moved from `body-14-regular` to `label-12-medium` with a small top margin.
|
|
278
|
+
|
|
279
|
+
### Migration checklist
|
|
280
|
+
|
|
281
|
+
1. Remove `UiSidebarProvider`; move `default-open` / `v-model:open` onto `UiSidebar`.
|
|
282
|
+
2. Add your own flex row with an explicit height around the sidebar and content column.
|
|
283
|
+
3. Replace `UiSidebarInset` with a `<main>` (or other element) you own.
|
|
284
|
+
4. Delete `variant` from `UiSidebar`.
|
|
285
|
+
5. If you import the internal sidebar context, move the `useSidebar()` call inside `UiSidebar`.
|
|
286
|
+
6. Check every `UiSidebarTrigger`: it now shows below `md`. Bind `v-model:open` for triggers outside the sidebar.
|
|
287
|
+
7. Set `--sidebar-offset-top` if a top bar sits above the mobile drawer.
|
|
288
|
+
8. Re-check row heights and sidebar typography against Storybook.
|
|
289
|
+
|
|
290
|
+
The **Patterns → UiLayout** stories in [Storybook](https://dev.aleph-alpha.de/ui-library) show the full desktop and mobile shell with the sidebar, top bar, and content column arranged as intended. There is deliberately no layout component: the shell is the patterns arranged the way a product would arrange them, so the story source is the reference implementation.
|
|
291
|
+
|
|
292
|
+
### Also in 5.11.0
|
|
293
|
+
|
|
294
|
+
Brand icons became a separate, tree-shakable entry point. `UiIcon` still takes a Lucide name as a string, and now also accepts an imported brand icon component. This is additive.
|
|
295
|
+
|
|
296
|
+
```vue
|
|
297
|
+
<script setup lang="ts">
|
|
298
|
+
import { FlagsDe } from '@aleph-alpha/ui-library/icons'
|
|
299
|
+
</script>
|
|
300
|
+
|
|
301
|
+
<template>
|
|
302
|
+
<UiIcon :name="FlagsDe" aria-label="Germany" />
|
|
303
|
+
</template>
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
---
|
|
307
|
+
|
|
308
|
+
## Migrating from 5.4 to 5.5
|
|
309
|
+
|
|
310
|
+
### Spark tokens became opt-out
|
|
311
|
+
|
|
312
|
+
`defineUiLibraryConfig()` gained `includeSparkTokens`, which defaults to `true`, so nothing changes unless you want it to. The legacy Spark token preset (`--core-*`, `--brand-*`, `--semantic-*`, `--primitives-*`) is only needed for coexistence with `ds-components-vue`. A pure UI Library app can drop it and emit less CSS:
|
|
313
|
+
|
|
314
|
+
```typescript
|
|
315
|
+
// uno.config.ts
|
|
316
|
+
export default defineUiLibraryConfig({ includeSparkTokens: false })
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
Turn it off only once nothing in the app still references Spark variables or utilities.
|
|
320
|
+
|
|
321
|
+
---
|
|
322
|
+
|
|
323
|
+
## Migrating from 5.2 to 5.3
|
|
324
|
+
|
|
325
|
+
### `useFloat` arrived already deprecated
|
|
326
|
+
|
|
327
|
+
The floating-action pattern added the `useAnchorFloat` composable along with a `useFloat` alias that is marked `@deprecated` from the start. There is nothing to migrate unless you picked up the alias; if you did, switch to the real name. It still works and has no removal date.
|
|
328
|
+
|
|
329
|
+
```diff
|
|
330
|
+
- import { useFloat } from '@aleph-alpha/ui-library'
|
|
331
|
+
+ import { useAnchorFloat } from '@aleph-alpha/ui-library'
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
### Raw font-size classes left the components (5.3.1)
|
|
335
|
+
|
|
336
|
+
5.3.1 replaced every `text-xs`, `text-sm`, `text-base`, and `text-lg` inside the library with the design-system typography utilities (`label-12-*`, `label-14-*`, `body-14-*`, and so on). Component internals are not your API, but the change is visible if you overrode library typography by relying on those classes, or if your own code still uses raw sizes.
|
|
337
|
+
|
|
338
|
+
See [Typography](quick-start.md#typography) for the mapping from raw sizes to tokens.
|
|
339
|
+
|
|
340
|
+
---
|
|
341
|
+
|
|
342
|
+
## Migrating from 3.1 to 3.2
|
|
343
|
+
|
|
344
|
+
### `UiSnackbar` was redesigned and two props were removed
|
|
345
|
+
|
|
346
|
+
`richColors` and `icons` no longer exist on `UiSnackbar`. Coloured backgrounds per toast type and per-type custom icons were dropped in favour of a design-system status icon.
|
|
347
|
+
|
|
348
|
+
```diff
|
|
349
|
+
- <UiSnackbar rich-colors :icons="myIcons" />
|
|
350
|
+
+ <UiSnackbar />
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
The component now ships a `showSnackbar()` helper, a `showSnackbarPromise()` helper for async work, and two composable pieces (`UiSnackbarContent`, `UiSnackbarIcon`) for custom toast bodies. `closeButton` now defaults to `true`. `toast()` from `vue-sonner` is still re-exported and still works.
|
|
354
|
+
|
|
355
|
+
!!! warning "`UiSnackbar` is experimental"
|
|
356
|
+
Since 3.2.0 the component is tagged experimental: its API and behaviour can still change in a minor release. Pin the version if you need stability. See [Component Lifecycle](component-lifecycle.md).
|
|
357
|
+
|
|
358
|
+
### The CSS preset package was split
|
|
359
|
+
|
|
360
|
+
`@aleph-alpha/config-css-preset` became three packages: `@aleph-alpha/config-unocss`, `@aleph-alpha/config-fonts`, and `@aleph-alpha/config-tokens`. Apps that consume the UI Library through `@aleph-alpha/ui-library/config` need no change, since `defineUiLibraryConfig()` pulls in what it needs. Apps that depended on the old package directly must switch to the relevant replacement.
|
|
361
|
+
|
|
362
|
+
---
|
|
363
|
+
|
|
364
|
+
## Migrating to 5.0, 4.0, and 3.0
|
|
365
|
+
|
|
366
|
+
**No UI Library code changes are required for any of these majors.** All three were triggered by `@aleph-alpha/chat-kit`, which shares the release group:
|
|
367
|
+
|
|
368
|
+
| Version | Breaking change | Affects |
|
|
369
|
+
| ------- | --------------- | ------- |
|
|
370
|
+
| 5.0.0 | `CkInput` removed | chat-kit |
|
|
371
|
+
| 4.0.0 | Regenerate button and tree methods | chat-kit |
|
|
372
|
+
| 3.0.0 | `CkPromptActionButton` renamed to `CkPromptSendButton` | chat-kit |
|
|
373
|
+
|
|
374
|
+
If you also use chat-kit, follow its own changelog for these.
|
|
375
|
+
|
|
376
|
+
---
|
|
377
|
+
|
|
378
|
+
## Deprecations
|
|
379
|
+
|
|
380
|
+
Everything currently marked `@deprecated` in the library, and what to use instead.
|
|
381
|
+
|
|
382
|
+
| Deprecated | Since | Replacement | Removal |
|
|
383
|
+
| ---------- | ----- | ----------- | ------- |
|
|
384
|
+
| `useFloat` | 5.3.0 | `useAnchorFloat` | Not scheduled |
|
|
385
|
+
| `label-12-*` | Unreleased | `label-xs-*` | 7.0.0 |
|
|
386
|
+
| `label-14-*` | Unreleased | `label-s-*` | 7.0.0 |
|
|
387
|
+
| `label-16-*` | Unreleased | `label-m-*` | 7.0.0 |
|
|
388
|
+
| `body-14-*` | Unreleased | `body-s-*` | 7.0.0 |
|
|
389
|
+
| `body-16-*` | Unreleased | `body-m-*` | 7.0.0 |
|
|
390
|
+
|
|
391
|
+
The deprecations announced before 3.0.0 have already been removed: `UiIconButton` was merged into `UiButton` (use `UiButton size="icon-sm"` with an `aria-label`) and `UiChatHistory` moved to `@aleph-alpha/chat-kit`. Both were removed in 2.2.0, so they do not affect a migration from 3.0.0 or later.
|
|
392
|
+
|
|
393
|
+
Deprecations follow the [Deprecation Workflow](component-lifecycle.md#deprecation-workflow): components are marked in code and in Storybook, and stay for at least three months after the announcement. Watch for the `deprecated` badge in [Storybook](https://dev.aleph-alpha.de/ui-library) and for `@deprecated` in your editor.
|
|
394
|
+
|
|
395
|
+
|
|
396
|
+
---
|
|
397
|
+
|
|
398
|
+
## Getting help
|
|
399
|
+
|
|
400
|
+
- Component APIs, states, and live examples: [Storybook](https://dev.aleph-alpha.de/ui-library)
|
|
401
|
+
- Full release history: [CHANGELOG](https://github.com/Aleph-Alpha/frontend-hub/blob/main/packages/ui-library/CHANGELOG.md)
|
|
402
|
+
- Questions and migration support: [Contributing](contributing.md)
|
|
@@ -60,6 +60,8 @@ Use `defineUiLibraryConfig()` for normal app setup. Reach for the lower-level ex
|
|
|
60
60
|
| Token overrides | `defineUiLibraryConfig({ extend })` | You need to override a small set of CSS variables while keeping the default token theme. |
|
|
61
61
|
| Accessible token set | `defineUiLibraryConfig({ themeMode: 'accessible' })` or `defineUiLibraryConfig({ accessible: true })` | The app should use the WCAG 2.2 token set as its main theme. |
|
|
62
62
|
| Runtime accessible theme | `defineUiLibraryConfig({ accessibleTheme: true })` | The app should emit both default and accessible token CSS so users can toggle the accessible theme with `html.accessible-theme`. |
|
|
63
|
+
| AA Brand token set | `defineUiLibraryConfig({ themeMode: 'brand' })` or `defineUiLibraryConfig({ brand: true })` | The app should use the AA Brand token set as its main theme. |
|
|
64
|
+
| Runtime AA Brand theme | `defineUiLibraryConfig({ brandTheme: true })` | The app should emit both default and AA Brand token CSS so the brand theme can be toggled with `html.brand-theme`. |
|
|
63
65
|
| Manual preset composition | `presetUiLibraryThemeFromTokens()` and `presetUiLibraryUtils()` | You already have a custom UnoCSS config and need explicit control over preset order. |
|
|
64
66
|
| Fully custom theme | `presetUiLibraryTheme(theme)` | You want to provide complete light/dark CSS variable maps instead of deriving them from `tokens.json`. |
|
|
65
67
|
|
|
@@ -132,6 +134,8 @@ export default defineUiLibraryConfig({
|
|
|
132
134
|
})
|
|
133
135
|
```
|
|
134
136
|
|
|
137
|
+
The AA Brand token set works the same way — `themeMode: 'brand'` to make it the main theme, or `brandTheme: true` (with an optional `brandSelector`, default `html.brand-theme`) to emit it alongside the default for runtime toggling. A theme set only overrides what it redefines; anything it leaves out resolves from AA Base.
|
|
138
|
+
|
|
135
139
|
<details>
|
|
136
140
|
<summary>Advanced: manual preset composition</summary>
|
|
137
141
|
|
|
@@ -233,21 +237,26 @@ Style text with the design-system typography utilities — **never** raw UnoCSS/
|
|
|
233
237
|
|
|
234
238
|
| Group | Utilities | Use for |
|
|
235
239
|
|-------|-----------|---------|
|
|
236
|
-
| Labels | `label-
|
|
237
|
-
| Body | `body-
|
|
240
|
+
| Labels | `label-xs-*`, `label-s-*`, `label-m-*` (`-regular` \| `-medium` \| `-bold`; `-regular` also aliased as `-normal`) | UI / inline element text: buttons, menu items, form labels, badges, table cells |
|
|
241
|
+
| Body | `body-s-*`, `body-m-*` (`-regular` \| `-medium` \| `-bold`) | Paragraphs and prose / descriptions |
|
|
238
242
|
| Headings | `heading-s`, `heading-m`, `heading-l`, `heading-xl`, `heading-2xl` (one class each, no weight suffix) | Section and page headings |
|
|
239
243
|
|
|
244
|
+
The steps are the token sizes: `xs` is 12px, `s` is 14px, `m` is 16px.
|
|
245
|
+
|
|
246
|
+
!!! warning "Numbered names are deprecated"
|
|
247
|
+
`label-12-*`, `label-14-*`, `label-16-*`, `body-14-*`, and `body-16-*` still resolve to the same declarations but are removed in 7.0.0. See the [Migration Guide](migration-guide.md#numbered-body-and-label-classes-become-step-names) for the rename.
|
|
248
|
+
|
|
240
249
|
### Replace raw sizes with tokens
|
|
241
250
|
|
|
242
251
|
| Raw class (avoid) | Size | Use instead |
|
|
243
252
|
|-------------------|------|-------------|
|
|
244
|
-
| `text-xs` | 12px | `label-
|
|
245
|
-
| `text-sm` | 14px | `body-
|
|
246
|
-
| `text-base` / `text-md` | 16px | `body-
|
|
253
|
+
| `text-xs` | 12px | `label-xs-regular` (or `-medium` / `-bold`) |
|
|
254
|
+
| `text-sm` | 14px | `body-s-regular` for prose, `label-s-*` for UI text |
|
|
255
|
+
| `text-base` / `text-md` | 16px | `body-m-regular` for prose, `label-m-*` for UI text |
|
|
247
256
|
| `text-lg` / `text-xl` | 18–20px | `heading-s` |
|
|
248
257
|
| `text-2xl` | 24px | `heading-m` |
|
|
249
258
|
|
|
250
|
-
When a raw class is paired with a weight (e.g. `text-sm font-medium`), collapse both into a single token that already carries the weight (`label-
|
|
259
|
+
When a raw class is paired with a weight (e.g. `text-sm font-medium`), collapse both into a single token that already carries the weight (`label-s-medium`) rather than keeping a separate `font-*` class. For headings, drop the `font-*` class entirely — the `heading-*` utility owns its weight.
|
|
251
260
|
|
|
252
261
|
```html
|
|
253
262
|
<!-- Don't: raw sizes + separate weight -->
|
|
@@ -257,8 +266,8 @@ When a raw class is paired with a weight (e.g. `text-sm font-medium`), collapse
|
|
|
257
266
|
|
|
258
267
|
<!-- Do: design-system typography utilities -->
|
|
259
268
|
<h3 class="heading-s">Account</h3>
|
|
260
|
-
<p class="body-
|
|
261
|
-
<label class="label-
|
|
269
|
+
<p class="body-s-regular text-muted-foreground">Manage your settings.</p>
|
|
270
|
+
<label class="label-s-medium">Email</label>
|
|
262
271
|
```
|
|
263
272
|
|
|
264
273
|
Browse the live examples under **CSS utility → Typography** in [Storybook](https://dev.aleph-alpha.de/ui-library).
|
|
@@ -284,9 +293,9 @@ All config functions are exported from `@aleph-alpha/ui-library/config`:
|
|
|
284
293
|
|
|
285
294
|
| Export | Description |
|
|
286
295
|
|--------|-------------|
|
|
287
|
-
| `defineUiLibraryConfig(options?)` | **Recommended.** Complete UnoCSS config with all presets, content scanning, fonts, and tokens. Options include `extend`, `theme`, `themeMode`, `accessible`, `accessibleTheme`, `accessibleSelector`, `rootSelector`, `darkSelector`, `rootFontSize`, `includeAllTokens`, `presets`, `rules`, `shortcuts`, and any other UnoCSS config |
|
|
296
|
+
| `defineUiLibraryConfig(options?)` | **Recommended.** Complete UnoCSS config with all presets, content scanning, fonts, and tokens. Options include `extend`, `theme`, `themeMode`, `accessible`, `accessibleTheme`, `accessibleSelector`, `brand`, `brandTheme`, `brandSelector`, `rootSelector`, `darkSelector`, `rootFontSize`, `includeAllTokens`, `presets`, `rules`, `shortcuts`, and any other UnoCSS config |
|
|
288
297
|
| `getUiLibraryContentConfig()` | UnoCSS content/pipeline config to scan library classes |
|
|
289
|
-
| `presetUiLibraryThemeFromTokens(options?)` | Token preset. Bundles token CSS variables, theme colors, border radius utilities, semantic overrides, and typography classes. Options include `extend`, `theme`, `themeMode`, `accessible`, `accessibleTheme`, `accessibleSelector`, `rootSelector`, `darkSelector`, `rootFontSize`, and `includeAllTokens` |
|
|
298
|
+
| `presetUiLibraryThemeFromTokens(options?)` | Token preset. Bundles token CSS variables, theme colors, border radius utilities, semantic overrides, and typography classes. Options include `extend`, `theme`, `themeMode`, `accessible`, `accessibleTheme`, `accessibleSelector`, `brand`, `brandTheme`, `brandSelector`, `rootSelector`, `darkSelector`, `rootFontSize`, and `includeAllTokens` |
|
|
290
299
|
| `presetUiLibraryUtils()` | Utility rules required by library components (`w-(--var)`, `h-(--var)`, etc.) |
|
|
291
300
|
| `presetUiLibraryTheme(theme, options?)` | Low-level preset with manually provided theme variables (for custom themes) |
|
|
292
301
|
| `getUiLibraryThemeFromTokens()` | Returns the raw theme object derived from `tokens.json` |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aleph-alpha/ui-library",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.2.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/system/lib.js",
|
|
@@ -71,8 +71,8 @@
|
|
|
71
71
|
"http-server": "14.1.1",
|
|
72
72
|
"playwright": "^1.57.0",
|
|
73
73
|
"postcss": "8.5.10",
|
|
74
|
-
"react": "
|
|
75
|
-
"react-dom": "
|
|
74
|
+
"react": "19.2.7",
|
|
75
|
+
"react-dom": "19.2.7",
|
|
76
76
|
"sb-addon-versions": "^1.0.12",
|
|
77
77
|
"storybook": "10.2.17",
|
|
78
78
|
"storybook-addon-tag-badges": "^3.1.0",
|
|
@@ -89,6 +89,9 @@
|
|
|
89
89
|
"wait-on": "9.0.3",
|
|
90
90
|
"@aleph-alpha/eslint-config-frontend": "0.7.1",
|
|
91
91
|
"@aleph-alpha/prettier-config-frontend": "2.1.1",
|
|
92
|
+
"@aleph-alpha/storybook-addon-filters": "0.0.1",
|
|
93
|
+
"@aleph-alpha/storybook-addon-sidebar": "0.0.1",
|
|
94
|
+
"@aleph-alpha/storybook-addon-theming": "0.0.1",
|
|
92
95
|
"@aleph-alpha/tsconfig-frontend": "0.7.3"
|
|
93
96
|
},
|
|
94
97
|
"peerDependencies": {
|
|
@@ -144,7 +147,7 @@
|
|
|
144
147
|
"lint": "eslint 'src/**/*.{js,vue,ts}' --cache",
|
|
145
148
|
"test": "vitest --run --project=unit",
|
|
146
149
|
"test:watch": "vitest --project=unit",
|
|
147
|
-
"test:storybook": "pnpm concurrently -k --ks SIGKILL -s command-test -n \"storybook,test\" \"pnpm http-server ../../dist/storybook/ui-library --port 4400 --silent\" \"wait-on tcp:4400 && test-storybook --url http://127.0.0.1:4400 --junit\"",
|
|
150
|
+
"test:storybook": "pnpm concurrently -k --ks SIGKILL -s command-test -n \"storybook,test\" \"pnpm http-server ../../dist/storybook/ui-library --port 4400 --silent\" \"wait-on tcp:4400 && test-storybook --url http://127.0.0.1:4400 --junit $STORYBOOK_TEST_PATTERN\"",
|
|
148
151
|
"test:storybook:local": "pnpm build-storybook && pnpm concurrently -k --ks SIGKILL -s command-test -n \"storybook,test\" \"pnpm http-server storybook-static --port 4400 --silent\" \"wait-on tcp:4400 && test-storybook --url http://127.0.0.1:4400 --junit\"",
|
|
149
152
|
"test:all": "vitest --run",
|
|
150
153
|
"storybook": "storybook dev -p 6006",
|