@backstage/ui 0.12.0-next.2 → 0.12.1-next.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 +379 -1
- package/dist/components/Accordion/Accordion.esm.js +83 -97
- package/dist/components/Accordion/Accordion.esm.js.map +1 -1
- package/dist/components/Accordion/Accordion.module.css.esm.js +2 -2
- package/dist/components/Accordion/definition.esm.js +56 -13
- package/dist/components/Accordion/definition.esm.js.map +1 -1
- package/dist/components/Alert/definition.esm.js +1 -3
- package/dist/components/Alert/definition.esm.js.map +1 -1
- package/dist/components/Avatar/Avatar.module.css.esm.js +2 -2
- package/dist/components/Box/Box.esm.js +2 -2
- package/dist/components/Box/Box.esm.js.map +1 -1
- package/dist/components/Box/Box.module.css.esm.js +2 -2
- package/dist/components/Box/definition.esm.js +3 -3
- package/dist/components/Box/definition.esm.js.map +1 -1
- package/dist/components/Button/Button.module.css.esm.js +2 -2
- package/dist/components/Button/definition.esm.js +2 -3
- package/dist/components/Button/definition.esm.js.map +1 -1
- package/dist/components/ButtonIcon/ButtonIcon.module.css.esm.js +2 -2
- package/dist/components/ButtonIcon/definition.esm.js +2 -3
- package/dist/components/ButtonIcon/definition.esm.js.map +1 -1
- package/dist/components/ButtonLink/ButtonLink.module.css.esm.js +2 -2
- package/dist/components/ButtonLink/definition.esm.js +2 -3
- package/dist/components/ButtonLink/definition.esm.js.map +1 -1
- package/dist/components/Card/Card.esm.js +27 -47
- package/dist/components/Card/Card.esm.js.map +1 -1
- package/dist/components/Card/Card.module.css.esm.js +2 -2
- package/dist/components/Card/definition.esm.js +47 -7
- package/dist/components/Card/definition.esm.js.map +1 -1
- package/dist/components/Checkbox/Checkbox.module.css.esm.js +2 -2
- package/dist/components/Dialog/Dialog.esm.js +1 -1
- package/dist/components/Dialog/Dialog.module.css.esm.js +2 -2
- package/dist/components/Flex/Flex.esm.js +6 -8
- package/dist/components/Flex/Flex.esm.js.map +1 -1
- package/dist/components/Flex/Flex.module.css.esm.js +2 -2
- package/dist/components/Flex/definition.esm.js +8 -1
- package/dist/components/Flex/definition.esm.js.map +1 -1
- package/dist/components/FullPage/FullPage.esm.js +22 -0
- package/dist/components/FullPage/FullPage.esm.js.map +1 -0
- package/dist/components/FullPage/FullPage.module.css.esm.js +8 -0
- package/dist/components/FullPage/FullPage.module.css.esm.js.map +1 -0
- package/dist/components/FullPage/definition.esm.js +8 -0
- package/dist/components/FullPage/definition.esm.js.map +1 -0
- package/dist/components/Grid/Grid.esm.js +11 -15
- package/dist/components/Grid/Grid.esm.js.map +1 -1
- package/dist/components/Grid/Grid.module.css.esm.js +2 -2
- package/dist/components/Grid/definition.esm.js +16 -2
- package/dist/components/Grid/definition.esm.js.map +1 -1
- package/dist/components/Menu/Menu.module.css.esm.js +2 -2
- package/dist/components/PasswordField/PasswordField.module.css.esm.js +2 -2
- package/dist/components/PluginHeader/PluginHeader.esm.js +88 -0
- package/dist/components/PluginHeader/PluginHeader.esm.js.map +1 -0
- package/dist/components/PluginHeader/PluginHeader.module.css.esm.js +8 -0
- package/dist/components/PluginHeader/PluginHeader.module.css.esm.js.map +1 -0
- package/dist/components/{Header/HeaderToolbar.esm.js → PluginHeader/PluginHeaderToolbar.esm.js} +6 -6
- package/dist/components/PluginHeader/PluginHeaderToolbar.esm.js.map +1 -0
- package/dist/components/PluginHeader/definition.esm.js +15 -0
- package/dist/components/PluginHeader/definition.esm.js.map +1 -0
- package/dist/components/Popover/Popover.module.css.esm.js +2 -2
- package/dist/components/RadioGroup/RadioGroup.module.css.esm.js +2 -2
- package/dist/components/SearchField/SearchField.module.css.esm.js +2 -2
- package/dist/components/Select/Select.module.css.esm.js +2 -2
- package/dist/components/Table/Table.module.css.esm.js +2 -2
- package/dist/components/TablePagination/TablePagination.esm.js +1 -1
- package/dist/components/TextField/TextField.module.css.esm.js +2 -2
- package/dist/components/ToggleButton/ToggleButton.esm.js +1 -4
- package/dist/components/ToggleButton/ToggleButton.esm.js.map +1 -1
- package/dist/components/ToggleButtonGroup/ToggleButtonGroup.module.css.esm.js +2 -2
- package/dist/components/Tooltip/Tooltip.module.css.esm.js +2 -2
- package/dist/css/styles.css +11 -13
- package/dist/hooks/useBg.esm.js +36 -0
- package/dist/hooks/useBg.esm.js.map +1 -0
- package/dist/hooks/useDefinition/defineComponent.esm.js.map +1 -1
- package/dist/hooks/useDefinition/helpers.esm.js +24 -1
- package/dist/hooks/useDefinition/helpers.esm.js.map +1 -1
- package/dist/hooks/useDefinition/useDefinition.esm.js +22 -29
- package/dist/hooks/useDefinition/useDefinition.esm.js.map +1 -1
- package/dist/index.d.ts +312 -79
- package/dist/index.esm.js +7 -4
- package/dist/index.esm.js.map +1 -1
- package/package.json +5 -5
- package/dist/components/Header/Header.esm.js +0 -56
- package/dist/components/Header/Header.esm.js.map +0 -1
- package/dist/components/Header/Header.module.css.esm.js +0 -8
- package/dist/components/Header/Header.module.css.esm.js.map +0 -1
- package/dist/components/Header/HeaderToolbar.esm.js.map +0 -1
- package/dist/components/Header/definition.esm.js +0 -14
- package/dist/components/Header/definition.esm.js.map +0 -1
- package/dist/hooks/useSurface.esm.js +0 -74
- package/dist/hooks/useSurface.esm.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,37 @@
|
|
|
1
1
|
# @backstage/ui
|
|
2
2
|
|
|
3
|
-
## 0.12.
|
|
3
|
+
## 0.12.1-next.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- a1f4bee: Made Accordion a `bg` provider so nested components like Button auto-increment their background level. Updated `useDefinition` to resolve `bg` `propDef` defaults for provider components.
|
|
8
|
+
- 8909359: Fixed focus-visible outline styles for Menu and Select components.
|
|
9
|
+
|
|
10
|
+
**Affected components:** Menu, Select
|
|
11
|
+
|
|
12
|
+
- 0f462f8: Improved type safety in `useDefinition` by centralizing prop resolution and strengthening the `BgPropsConstraint` to require that `bg` provider components declare `children` as a required prop in their OwnProps type.
|
|
13
|
+
- 8909359: Added proper cursor styles for RadioGroup items.
|
|
14
|
+
|
|
15
|
+
**Affected components:** RadioGroup
|
|
16
|
+
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
- @backstage/version-bridge@1.0.12
|
|
19
|
+
|
|
20
|
+
## 0.12.0
|
|
4
21
|
|
|
5
22
|
### Minor Changes
|
|
6
23
|
|
|
24
|
+
- 46a9adc: **BREAKING**: Alert no longer accepts a `surface` prop
|
|
25
|
+
|
|
26
|
+
The Alert component's background is now driven entirely by its `status` prop. The `surface` prop has been removed.
|
|
27
|
+
|
|
28
|
+
```diff
|
|
29
|
+
- <Alert surface="1" status="info" />
|
|
30
|
+
+ <Alert status="info" />
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
**Affected components:** Alert
|
|
34
|
+
|
|
7
35
|
- b63c25b: **BREAKING**: Removed gray scale tokens and renamed background surface tokens to neutral tokens
|
|
8
36
|
|
|
9
37
|
The `--bui-gray-1` through `--bui-gray-8` tokens have been removed. The `--bui-bg-surface-*` and `--bui-bg-neutral-on-surface-*` tokens have been replaced by a unified `--bui-bg-neutral-*` scale.
|
|
@@ -31,6 +59,356 @@
|
|
|
31
59
|
+ background: var(--bui-bg-neutral-1);
|
|
32
60
|
```
|
|
33
61
|
|
|
62
|
+
- 7898df0: **BREAKING**: Replaced `Surface` / `onSurface` system with new provider/consumer background system
|
|
63
|
+
|
|
64
|
+
The old `Surface` type (`'0'`–`'3'`, `'auto'`) and its associated props (`surface`, `onSurface`) have been replaced by a provider/consumer `bg` architecture.
|
|
65
|
+
|
|
66
|
+
**Types:**
|
|
67
|
+
|
|
68
|
+
- `ContainerBg` — `'neutral-1'` | `'neutral-2'` | `'neutral-3'` | `'danger'` | `'warning'` | `'success'`
|
|
69
|
+
- `ProviderBg` — `ContainerBg | 'neutral-auto'`
|
|
70
|
+
|
|
71
|
+
Consumer components (e.g. Button) inherit the parent's `bg` via `data-on-bg`, and CSS handles the visual step-up. See "Neutral level capping" below for details on how levels are bounded.
|
|
72
|
+
|
|
73
|
+
**Hooks:**
|
|
74
|
+
|
|
75
|
+
- `useBgProvider(bg?)` — for provider components. Returns `{ bg: undefined }` when no `bg` is given (transparent). Supports `'neutral-auto'` to auto-increment from the parent context.
|
|
76
|
+
- `useBgConsumer()` — for consumer components. Returns the parent container's `bg` unchanged.
|
|
77
|
+
|
|
78
|
+
**Component roles:**
|
|
79
|
+
|
|
80
|
+
- **Provider-only** (Box, Flex, Grid): set `data-bg`, wrap children in `BgProvider`. **Transparent by default** — they do _not_ auto-increment; pass `bg="neutral-auto"` explicitly if you want automatic neutral stepping.
|
|
81
|
+
- **Consumer-only** (Button, ButtonIcon, ButtonLink): set `data-on-bg`, inherit the parent container's `bg` unchanged.
|
|
82
|
+
- **Provider + Consumer** (Card): sets both `data-bg` and `data-on-bg`, wraps children. Card passes `bg="neutral-auto"` to its inner Box, so it auto-increments from the parent context.
|
|
83
|
+
|
|
84
|
+
**Neutral level capping:**
|
|
85
|
+
|
|
86
|
+
Provider components cap at `neutral-3`. There is no `neutral-4` prop value. The `neutral-4` level exists only in consumer component CSS — for example, a Button sitting on a `neutral-3` surface uses `neutral-4` tokens internally via `data-on-bg`.
|
|
87
|
+
|
|
88
|
+
**Migration:**
|
|
89
|
+
|
|
90
|
+
Rename the `surface` prop to `bg` on provider components and update values:
|
|
91
|
+
|
|
92
|
+
```diff
|
|
93
|
+
- <Box surface="1">
|
|
94
|
+
+ <Box bg="neutral-1">
|
|
95
|
+
|
|
96
|
+
- <Card surface="2">
|
|
97
|
+
+ <Card bg="neutral-2">
|
|
98
|
+
|
|
99
|
+
- <Flex surface="0">
|
|
100
|
+
+ <Flex bg="neutral-1">
|
|
101
|
+
|
|
102
|
+
- <Grid.Root surface="1">
|
|
103
|
+
+ <Grid.Root bg="neutral-1">
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Remove `onSurface` from consumer components — they now always inherit from the parent container:
|
|
107
|
+
|
|
108
|
+
```diff
|
|
109
|
+
- <Button onSurface="1" variant="secondary">
|
|
110
|
+
+ <Button variant="secondary">
|
|
111
|
+
|
|
112
|
+
- <ButtonIcon onSurface="2" variant="secondary" />
|
|
113
|
+
+ <ButtonIcon variant="secondary" />
|
|
114
|
+
|
|
115
|
+
- <ToggleButton onSurface="1">
|
|
116
|
+
+ <ToggleButton>
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Update type imports:
|
|
120
|
+
|
|
121
|
+
```diff
|
|
122
|
+
- import type { Surface, LeafSurfaceProps, ContainerSurfaceProps } from '@backstage/ui';
|
|
123
|
+
+ import type { ContainerBg, ProviderBg } from '@backstage/ui';
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
Replace hook usage in custom components:
|
|
127
|
+
|
|
128
|
+
```diff
|
|
129
|
+
- import { useSurface, SurfaceProvider } from '@backstage/ui';
|
|
130
|
+
+ import { useBgProvider, useBgConsumer, BgProvider } from '@backstage/ui';
|
|
131
|
+
|
|
132
|
+
- const { surface } = useSurface({ surface: props.surface });
|
|
133
|
+
+ const { bg } = useBgProvider(props.bg);
|
|
134
|
+
|
|
135
|
+
- const { surface } = useSurface({ onSurface: props.onSurface });
|
|
136
|
+
+ const { bg } = useBgConsumer();
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Update CSS selectors targeting surface data attributes:
|
|
140
|
+
|
|
141
|
+
```diff
|
|
142
|
+
- [data-surface='1'] { ... }
|
|
143
|
+
+ [data-bg='neutral-1'] { ... }
|
|
144
|
+
|
|
145
|
+
- [data-on-surface='1'] { ... }
|
|
146
|
+
+ [data-on-bg='neutral-1'] { ... }
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
Note: Provider components use `data-bg` (values: `neutral-1` through `neutral-3`, plus intent values). Consumer components use `data-on-bg`, which reflects the parent container's `bg` directly. The `neutral-4` level never appears as a prop or `data-bg` value — it is used only in consumer CSS.
|
|
150
|
+
|
|
151
|
+
**Affected components:** Box, Button, ButtonIcon, ButtonLink, ToggleButton, Card, Flex, Grid
|
|
152
|
+
|
|
153
|
+
- 4137a43: **BREAKING:** Renamed, added, and removed CSS tokens.
|
|
154
|
+
|
|
155
|
+
- Renamed `--bui-bg-neutral-0` to `--bui-bg-app`.
|
|
156
|
+
- Renamed `--bui-border` to `--bui-border-2`.
|
|
157
|
+
- Added `--bui-border-1` for subtle, low-contrast borders.
|
|
158
|
+
- Added `--bui-bg-popover` for the background color of popovers, tooltips, menus, and dialogs.
|
|
159
|
+
- Removed `--bui-border-hover`, `--bui-border-pressed`, and `--bui-border-disabled`.
|
|
160
|
+
|
|
161
|
+
**Migration:**
|
|
162
|
+
|
|
163
|
+
```diff
|
|
164
|
+
- var(--bui-bg-neutral-0)
|
|
165
|
+
+ var(--bui-bg-app)
|
|
166
|
+
|
|
167
|
+
- var(--bui-border)
|
|
168
|
+
+ var(--bui-border-2)
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
Remove any references to `--bui-border-hover`, `--bui-border-pressed`, and `--bui-border-disabled` as these tokens no longer exist.
|
|
172
|
+
|
|
173
|
+
- b1f723b: **BREAKING**: Changed CSS selectors for `ButtonIcon` and `ButtonLink` components. Custom styles targeting `.bui-Button` to style these components must be updated to use `.bui-ButtonIcon` or `.bui-ButtonLink` respectively.
|
|
174
|
+
|
|
175
|
+
```diff
|
|
176
|
+
-/* This no longer styles ButtonIcon or ButtonLink */
|
|
177
|
+
-.bui-Button[data-variant="primary"] { ... }
|
|
178
|
+
+/* Use component-specific selectors */
|
|
179
|
+
+.bui-ButtonIcon[data-variant="primary"] { ... }
|
|
180
|
+
+.bui-ButtonLink[data-variant="primary"] { ... }
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
Affected components: ButtonIcon, ButtonLink
|
|
184
|
+
|
|
185
|
+
- caeb9ad: **BREAKING**: The `cell` and `header` properties in `ColumnConfig` now return `ReactElement` instead of `ReactNode`.
|
|
186
|
+
|
|
187
|
+
This fixes an issue where React Aria's Collection component would inject an `id` prop into Fragment wrappers, causing "Invalid prop `id` supplied to `React.Fragment`" errors on render.
|
|
188
|
+
|
|
189
|
+
Migration:
|
|
190
|
+
|
|
191
|
+
```diff
|
|
192
|
+
const columns: ColumnConfig<MyItem>[] = [
|
|
193
|
+
{
|
|
194
|
+
id: 'name',
|
|
195
|
+
label: 'Name',
|
|
196
|
+
- cell: (item) => item.name,
|
|
197
|
+
+ cell: (item) => <CellText title={item.name} />,
|
|
198
|
+
- header: () => 'Name',
|
|
199
|
+
+ header: () => <Column>Name</Column>,
|
|
200
|
+
},
|
|
201
|
+
];
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
- 0ec3c0e: **BREAKING**: Renamed the `Header` component to `PluginHeader` for clarity.
|
|
205
|
+
|
|
206
|
+
The following exports have been renamed:
|
|
207
|
+
|
|
208
|
+
- `Header` → `PluginHeader`
|
|
209
|
+
- `HeaderProps` → `PluginHeaderProps`
|
|
210
|
+
- `HeaderDefinition` → `PluginHeaderDefinition`
|
|
211
|
+
|
|
212
|
+
The `HeaderTab` type is unchanged as it is shared with `HeaderPage`.
|
|
213
|
+
|
|
214
|
+
CSS class names have been updated from `bui-Header*` to `bui-PluginHeader*`.
|
|
215
|
+
|
|
216
|
+
**Migration:**
|
|
217
|
+
|
|
218
|
+
```diff
|
|
219
|
+
-import { Header, HeaderDefinition } from '@backstage/ui';
|
|
220
|
+
+import { PluginHeader, PluginHeaderDefinition } from '@backstage/ui';
|
|
221
|
+
|
|
222
|
+
-<Header title="My plugin" />
|
|
223
|
+
+<PluginHeader title="My plugin" />
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
**Affected components:** plugin-header
|
|
227
|
+
|
|
228
|
+
- 058ffd9: **BREAKING**: Removed `large` size variant from Button component as it was never implemented.
|
|
229
|
+
|
|
230
|
+
**Migration:**
|
|
231
|
+
|
|
232
|
+
```diff
|
|
233
|
+
- <Button size="large">Click me</Button>
|
|
234
|
+
+ <Button size="medium">Click me</Button>
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
**Affected components:** Button
|
|
238
|
+
|
|
239
|
+
- 110fec0: **BREAKING**: Removed link and tint color tokens, added new status foreground tokens, and improved Link component styling
|
|
240
|
+
|
|
241
|
+
The following color tokens have been removed:
|
|
242
|
+
|
|
243
|
+
- `--bui-fg-link` (and all related tokens: `-hover`, `-pressed`, `-disabled`)
|
|
244
|
+
- `--bui-fg-tint` (and all related tokens: `-hover`, `-pressed`, `-disabled`)
|
|
245
|
+
- `--bui-bg-tint` (and all related tokens: `-hover`, `-pressed`, `-disabled`)
|
|
246
|
+
- `--bui-border-tint` (and all related tokens)
|
|
247
|
+
|
|
248
|
+
**New Status Tokens:**
|
|
249
|
+
|
|
250
|
+
Added dedicated tokens for status colors that distinguish between usage on status backgrounds vs. standalone usage:
|
|
251
|
+
|
|
252
|
+
- `--bui-fg-danger-on-bg` / `--bui-fg-danger`
|
|
253
|
+
- `--bui-fg-warning-on-bg` / `--bui-fg-warning`
|
|
254
|
+
- `--bui-fg-success-on-bg` / `--bui-fg-success`
|
|
255
|
+
- `--bui-fg-info-on-bg` / `--bui-fg-info`
|
|
256
|
+
|
|
257
|
+
The `-on-bg` variants are designed for text on colored backgrounds, while the base variants are for standalone status indicators with improved visibility and contrast.
|
|
258
|
+
|
|
259
|
+
**Migration:**
|
|
260
|
+
|
|
261
|
+
For link colors, migrate to one of the following alternatives:
|
|
262
|
+
|
|
263
|
+
```diff
|
|
264
|
+
.custom-link {
|
|
265
|
+
- color: var(--bui-fg-link);
|
|
266
|
+
+ color: var(--bui-fg-info); /* For informational links */
|
|
267
|
+
+ /* or */
|
|
268
|
+
+ color: var(--bui-fg-primary); /* For standard text links */
|
|
269
|
+
}
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
For tint colors (backgrounds, foregrounds, borders), migrate to appropriate status or neutral colors:
|
|
273
|
+
|
|
274
|
+
```diff
|
|
275
|
+
.info-section {
|
|
276
|
+
- background: var(--bui-bg-tint);
|
|
277
|
+
+ background: var(--bui-bg-info); /* For informational sections */
|
|
278
|
+
+ /* or */
|
|
279
|
+
+ background: var(--bui-bg-neutral-1); /* For neutral emphasis */
|
|
280
|
+
}
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
If you're using status foreground colors on colored backgrounds, update to the new `-on-bg` tokens:
|
|
284
|
+
|
|
285
|
+
```diff
|
|
286
|
+
.error-badge {
|
|
287
|
+
- color: var(--bui-fg-danger);
|
|
288
|
+
+ color: var(--bui-fg-danger-on-bg);
|
|
289
|
+
background: var(--bui-bg-danger);
|
|
290
|
+
}
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
**Affected components:** Link
|
|
294
|
+
|
|
295
|
+
### Patch Changes
|
|
296
|
+
|
|
297
|
+
- 644e303: Added a new `FullPage` component that fills the remaining viewport height below the `PluginHeader`.
|
|
298
|
+
|
|
299
|
+
```tsx
|
|
300
|
+
<PluginHeader title="My Plugin" tabs={tabs} />
|
|
301
|
+
<FullPage>
|
|
302
|
+
{/* content fills remaining height */}
|
|
303
|
+
</FullPage>
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
**Affected components:** FullPage
|
|
307
|
+
|
|
308
|
+
- 44877e4: Fixed dark theme `--bui-fg-secondary` and `--bui-fg-disabled` tokens using black-based `oklch(0% ...)` instead of white-based `oklch(100% ...)`, making secondary and disabled text visible on dark backgrounds.
|
|
309
|
+
- 350c948: Fixed Box component to forward HTML attributes to the underlying div element.
|
|
310
|
+
|
|
311
|
+
**Affected components:** Box
|
|
312
|
+
|
|
313
|
+
- 7455dae: Use node prefix on native imports
|
|
314
|
+
- c8ae765: Fixed nested Accordion icon state issue where the inner accordion's arrow icon would incorrectly show as expanded when only the outer accordion was expanded. The CSS selector now uses a direct parent selector to ensure the icon only responds to its own accordion's expanded state.
|
|
315
|
+
|
|
316
|
+
Affected components: Accordion
|
|
317
|
+
|
|
318
|
+
- 4d1b7f4: Fixed CSS Module syntax to comply with Next.js 16 Turbopack validation by flattening nested dark theme selectors.
|
|
319
|
+
|
|
320
|
+
**Affected components:** Popover, Tooltip
|
|
321
|
+
|
|
322
|
+
- 2c219b9: Added `destructive` prop to Button for dangerous actions like delete or remove. Works with all variants (primary, secondary, tertiary).
|
|
323
|
+
|
|
324
|
+
**Affected components:** Button
|
|
325
|
+
|
|
326
|
+
- 5af9e14: Fixed `useDefinition` hook adding literal "undefined" class name when no className prop was passed.
|
|
327
|
+
- 5c76d13: Allow `ref` as a prop on the `Tag` component
|
|
328
|
+
|
|
329
|
+
Affected components: Tag
|
|
330
|
+
|
|
331
|
+
- ab25658: Cleaned up `useDefinition` `ownProps` types to remove never-typed ghost properties from autocomplete.
|
|
332
|
+
- 741a98d: Allow data to be passed directly to the `useTable` hook using the property `data` instead of `getData()` for mode `"complete"`.
|
|
333
|
+
|
|
334
|
+
This simplifies usage as data changes, rather than having to perform a `useEffect` when data changes, and then reloading the data. It also happens immediately, so stale data won't remain until a rerender (with an internal async state change), so less flickering.
|
|
335
|
+
|
|
336
|
+
Affected components: Table
|
|
337
|
+
|
|
338
|
+
- a0fe1b2: Fixed changing columns after first render from crashing. It now renders the table with the new column layout as columns change.
|
|
339
|
+
|
|
340
|
+
Affected components: Table
|
|
341
|
+
|
|
342
|
+
- 508bd1a: Added new `Alert` component with support for status variants (info, success, warning, danger), icons, loading states, and custom actions.
|
|
343
|
+
|
|
344
|
+
Updated status color tokens for improved contrast and consistency across light and dark themes:
|
|
345
|
+
|
|
346
|
+
- Added new `--bui-bg-info` and `--bui-fg-info` tokens for info status
|
|
347
|
+
- Updated `--bui-bg-danger`, `--bui-fg-danger` tokens
|
|
348
|
+
- Updated `--bui-bg-warning`, `--bui-fg-warning` tokens
|
|
349
|
+
- Updated `--bui-bg-success`, `--bui-fg-success` tokens
|
|
350
|
+
|
|
351
|
+
**Affected components**: Alert
|
|
352
|
+
|
|
353
|
+
- da30862: Fixed client-side navigation for container components by wrapping the container (not individual items) in RouterProvider. Components now conditionally provide routing context only when children have internal links, removing the Router context requirement when not needed. This also removes the need to wrap these components in MemoryRouter during tests when they are not using the `href` prop.
|
|
354
|
+
|
|
355
|
+
Additionally, when multiple tabs match the current URL via prefix matching, the tab with the most specific path (highest segment count) is now selected. For example, with URL `/catalog/users/john`, a tab with path `/catalog/users` is now selected over a tab with path `/catalog`.
|
|
356
|
+
|
|
357
|
+
Affected components: Tabs, Tab, TagGroup, Tag, Menu, MenuItem, MenuAutocomplete
|
|
358
|
+
|
|
359
|
+
- 092c453: Fixed an infinite render loop in Tabs when navigating to a URL that doesn't match any tab `href`.
|
|
360
|
+
- becf851: export PasswordField component
|
|
361
|
+
- becee36: Migrated Accordion components to use `useDefinition` instead of `useStyles`, and added automatic background adaptation based on parent container context.
|
|
362
|
+
- 5320aa8: Fixed components to not require a Router context when rendering without internal links.
|
|
363
|
+
|
|
364
|
+
Affected components: Link, ButtonLink, Row
|
|
365
|
+
|
|
366
|
+
- a7e0d50: Updated `react-router-dom` peer dependency to `^6.30.2` and explicitly disabled v7 future flags to suppress deprecation warnings.
|
|
367
|
+
- 8c39412: The Table component now wraps the react-aria-components `Table` with a `ResizableTableContainer` only if any column has a width property set. This means that column widths can adapt to the content otherwise (if no width is explicitly set).
|
|
368
|
+
|
|
369
|
+
Affected components: Table
|
|
370
|
+
|
|
371
|
+
- cb090b4: Bump react-aria-components to v1.14.0
|
|
372
|
+
- c429101: Fixed React 17 compatibility by using `useId` from `react-aria` instead of the built-in React hook which is only available in React 18+.
|
|
373
|
+
- 74c5a76: Fixed Switch component disabled state styling to show `not-allowed` cursor and disabled text color.
|
|
374
|
+
|
|
375
|
+
**Affected components:** Switch
|
|
376
|
+
|
|
377
|
+
- 20131c5: Migrated to use the standard `backstage-cli package build` for CSS bundling instead of a custom build script.
|
|
378
|
+
- Updated dependencies
|
|
379
|
+
- @backstage/version-bridge@1.0.12
|
|
380
|
+
|
|
381
|
+
## 0.12.0-next.2
|
|
382
|
+
|
|
383
|
+
### Minor Changes
|
|
384
|
+
|
|
385
|
+
- b63c25b: **BREAKING**: Removed gray scale tokens and renamed background surface tokens to neutral tokens
|
|
386
|
+
|
|
387
|
+
The `--bui-gray-1` through `--bui-gray-8` tokens have been removed. The `--bui-bg-surface-*` and `--bui-bg-neutral-on-surface-*` tokens have been replaced by a unified `--bui-bg-neutral-*` scale.
|
|
388
|
+
|
|
389
|
+
**Migration:**
|
|
390
|
+
|
|
391
|
+
Replace surface tokens directly:
|
|
392
|
+
|
|
393
|
+
```diff
|
|
394
|
+
- background: var(--bui-bg-surface-0);
|
|
395
|
+
+ background: var(--bui-bg-app);
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
Replace on-surface tokens shifted by +1:
|
|
399
|
+
|
|
400
|
+
```diff
|
|
401
|
+
- background: var(--bui-bg-neutral-on-surface-0);
|
|
402
|
+
+ background: var(--bui-bg-neutral-1);
|
|
403
|
+
```
|
|
404
|
+
|
|
405
|
+
Replace gray tokens 1-4 with neutral equivalents (`--bui-gray-5` through `--bui-gray-8` have no direct replacement):
|
|
406
|
+
|
|
407
|
+
```diff
|
|
408
|
+
- background: var(--bui-gray-1);
|
|
409
|
+
+ background: var(--bui-bg-neutral-1);
|
|
410
|
+
```
|
|
411
|
+
|
|
34
412
|
### Patch Changes
|
|
35
413
|
|
|
36
414
|
- c8ae765: Fixed nested Accordion icon state issue where the inner accordion's arrow icon would incorrectly show as expanded when only the outer accordion was expanded. The CSS selector now uses a direct parent selector to ensure the icon only responds to its own accordion's expanded state.
|
|
@@ -2,108 +2,94 @@ import { jsx, jsxs } from 'react/jsx-runtime';
|
|
|
2
2
|
import { forwardRef } from 'react';
|
|
3
3
|
import { Disclosure, Heading, Button, DisclosurePanel, DisclosureGroup } from 'react-aria-components';
|
|
4
4
|
import { RiArrowDownSLine } from '@remixicon/react';
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import { AccordionDefinition } from './definition.esm.js';
|
|
8
|
-
import styles from './Accordion.module.css.esm.js';
|
|
5
|
+
import { useDefinition } from '../../hooks/useDefinition/useDefinition.esm.js';
|
|
6
|
+
import { AccordionDefinition, AccordionTriggerDefinition, AccordionPanelDefinition, AccordionGroupDefinition } from './definition.esm.js';
|
|
9
7
|
import { Flex } from '../Flex/Flex.esm.js';
|
|
10
8
|
|
|
11
|
-
const Accordion = forwardRef(
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
9
|
+
const Accordion = forwardRef(
|
|
10
|
+
(props, ref) => {
|
|
11
|
+
const { ownProps, restProps, dataAttributes } = useDefinition(
|
|
12
|
+
AccordionDefinition,
|
|
13
|
+
props
|
|
14
|
+
);
|
|
15
|
+
const { classes, childrenWithBgProvider } = ownProps;
|
|
16
|
+
return /* @__PURE__ */ jsx(
|
|
17
|
+
Disclosure,
|
|
18
|
+
{
|
|
19
|
+
ref,
|
|
20
|
+
className: classes.root,
|
|
21
|
+
...dataAttributes,
|
|
22
|
+
...restProps,
|
|
23
|
+
children: childrenWithBgProvider
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
);
|
|
22
28
|
Accordion.displayName = "Accordion";
|
|
23
|
-
const AccordionTrigger = forwardRef(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
{
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
)
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
className: clsx(
|
|
49
|
-
classNames.triggerTitle,
|
|
50
|
-
styles[classNames.triggerTitle]
|
|
51
|
-
),
|
|
52
|
-
children: title
|
|
53
|
-
}
|
|
54
|
-
),
|
|
55
|
-
subtitle && /* @__PURE__ */ jsx(
|
|
56
|
-
"span",
|
|
57
|
-
{
|
|
58
|
-
className: clsx(
|
|
59
|
-
classNames.triggerSubtitle,
|
|
60
|
-
styles[classNames.triggerSubtitle]
|
|
61
|
-
),
|
|
62
|
-
children: subtitle
|
|
63
|
-
}
|
|
64
|
-
)
|
|
65
|
-
] }),
|
|
66
|
-
/* @__PURE__ */ jsx(
|
|
67
|
-
RiArrowDownSLine,
|
|
68
|
-
{
|
|
69
|
-
className: clsx(
|
|
70
|
-
classNames.triggerIcon,
|
|
71
|
-
styles[classNames.triggerIcon]
|
|
72
|
-
),
|
|
73
|
-
size: 16
|
|
74
|
-
}
|
|
75
|
-
)
|
|
76
|
-
]
|
|
77
|
-
}
|
|
78
|
-
)
|
|
79
|
-
}
|
|
80
|
-
);
|
|
81
|
-
});
|
|
29
|
+
const AccordionTrigger = forwardRef(
|
|
30
|
+
(props, ref) => {
|
|
31
|
+
const { ownProps, restProps, dataAttributes } = useDefinition(
|
|
32
|
+
AccordionTriggerDefinition,
|
|
33
|
+
props
|
|
34
|
+
);
|
|
35
|
+
const { classes, title, subtitle, children } = ownProps;
|
|
36
|
+
return /* @__PURE__ */ jsx(
|
|
37
|
+
Heading,
|
|
38
|
+
{
|
|
39
|
+
ref,
|
|
40
|
+
className: classes.root,
|
|
41
|
+
...dataAttributes,
|
|
42
|
+
...restProps,
|
|
43
|
+
children: /* @__PURE__ */ jsxs(Button, { slot: "trigger", className: classes.button, children: [
|
|
44
|
+
children ? children : /* @__PURE__ */ jsxs(Flex, { gap: "2", align: "center", children: [
|
|
45
|
+
/* @__PURE__ */ jsx("span", { className: classes.title, children: title }),
|
|
46
|
+
subtitle && /* @__PURE__ */ jsx("span", { className: classes.subtitle, children: subtitle })
|
|
47
|
+
] }),
|
|
48
|
+
/* @__PURE__ */ jsx(RiArrowDownSLine, { className: classes.icon, size: 16 })
|
|
49
|
+
] })
|
|
50
|
+
}
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
);
|
|
82
54
|
AccordionTrigger.displayName = "AccordionTrigger";
|
|
83
|
-
const AccordionPanel = forwardRef(
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
55
|
+
const AccordionPanel = forwardRef(
|
|
56
|
+
(props, ref) => {
|
|
57
|
+
const { ownProps, restProps, dataAttributes } = useDefinition(
|
|
58
|
+
AccordionPanelDefinition,
|
|
59
|
+
props
|
|
60
|
+
);
|
|
61
|
+
const { classes } = ownProps;
|
|
62
|
+
return /* @__PURE__ */ jsx(
|
|
63
|
+
DisclosurePanel,
|
|
64
|
+
{
|
|
65
|
+
ref,
|
|
66
|
+
className: classes.root,
|
|
67
|
+
...dataAttributes,
|
|
68
|
+
...restProps
|
|
69
|
+
}
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
);
|
|
94
73
|
AccordionPanel.displayName = "AccordionPanel";
|
|
95
|
-
const AccordionGroup = forwardRef(
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
74
|
+
const AccordionGroup = forwardRef(
|
|
75
|
+
(props, ref) => {
|
|
76
|
+
const { ownProps, restProps, dataAttributes } = useDefinition(
|
|
77
|
+
AccordionGroupDefinition,
|
|
78
|
+
props
|
|
79
|
+
);
|
|
80
|
+
const { classes, allowsMultiple } = ownProps;
|
|
81
|
+
return /* @__PURE__ */ jsx(
|
|
82
|
+
DisclosureGroup,
|
|
83
|
+
{
|
|
84
|
+
ref,
|
|
85
|
+
allowsMultipleExpanded: allowsMultiple,
|
|
86
|
+
className: classes.root,
|
|
87
|
+
...dataAttributes,
|
|
88
|
+
...restProps
|
|
89
|
+
}
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
);
|
|
107
93
|
AccordionGroup.displayName = "AccordionGroup";
|
|
108
94
|
|
|
109
95
|
export { Accordion, AccordionGroup, AccordionPanel, AccordionTrigger };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Accordion.esm.js","sources":["../../../src/components/Accordion/Accordion.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { forwardRef } from 'react';\nimport {\n Disclosure as RADisclosure,\n Button as RAButton,\n DisclosurePanel as RADisclosurePanel,\n DisclosureGroup as RADisclosureGroup,\n Heading as RAHeading,\n} from 'react-aria-components';\nimport { RiArrowDownSLine } from '@remixicon/react';\nimport
|
|
1
|
+
{"version":3,"file":"Accordion.esm.js","sources":["../../../src/components/Accordion/Accordion.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { forwardRef, Ref } from 'react';\nimport {\n Disclosure as RADisclosure,\n Button as RAButton,\n DisclosurePanel as RADisclosurePanel,\n DisclosureGroup as RADisclosureGroup,\n Heading as RAHeading,\n} from 'react-aria-components';\nimport { RiArrowDownSLine } from '@remixicon/react';\nimport type {\n AccordionProps,\n AccordionTriggerProps,\n AccordionPanelProps,\n AccordionGroupProps,\n} from './types';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport {\n AccordionDefinition,\n AccordionTriggerDefinition,\n AccordionPanelDefinition,\n AccordionGroupDefinition,\n} from './definition';\nimport { Flex } from '../Flex';\n\n/** @public */\nexport const Accordion = forwardRef(\n (props: AccordionProps, ref: Ref<React.ElementRef<typeof RADisclosure>>) => {\n const { ownProps, restProps, dataAttributes } = useDefinition(\n AccordionDefinition,\n props,\n );\n const { classes, childrenWithBgProvider } = ownProps;\n\n return (\n <RADisclosure\n ref={ref}\n className={classes.root}\n {...dataAttributes}\n {...restProps}\n >\n {childrenWithBgProvider}\n </RADisclosure>\n );\n },\n);\n\nAccordion.displayName = 'Accordion';\n\n/** @public */\nexport const AccordionTrigger = forwardRef(\n (\n props: AccordionTriggerProps,\n ref: Ref<React.ElementRef<typeof RAHeading>>,\n ) => {\n const { ownProps, restProps, dataAttributes } = useDefinition(\n AccordionTriggerDefinition,\n props,\n );\n const { classes, title, subtitle, children } = ownProps;\n\n return (\n <RAHeading\n ref={ref}\n className={classes.root}\n {...dataAttributes}\n {...restProps}\n >\n <RAButton slot=\"trigger\" className={classes.button}>\n {children ? (\n children\n ) : (\n <Flex gap=\"2\" align=\"center\">\n <span className={classes.title}>{title}</span>\n {subtitle && <span className={classes.subtitle}>{subtitle}</span>}\n </Flex>\n )}\n\n <RiArrowDownSLine className={classes.icon} size={16} />\n </RAButton>\n </RAHeading>\n );\n },\n);\n\nAccordionTrigger.displayName = 'AccordionTrigger';\n\n/** @public */\nexport const AccordionPanel = forwardRef(\n (\n props: AccordionPanelProps,\n ref: Ref<React.ElementRef<typeof RADisclosurePanel>>,\n ) => {\n const { ownProps, restProps, dataAttributes } = useDefinition(\n AccordionPanelDefinition,\n props,\n );\n const { classes } = ownProps;\n\n return (\n <RADisclosurePanel\n ref={ref}\n className={classes.root}\n {...dataAttributes}\n {...restProps}\n />\n );\n },\n);\n\nAccordionPanel.displayName = 'AccordionPanel';\n\n/** @public */\nexport const AccordionGroup = forwardRef(\n (\n props: AccordionGroupProps,\n ref: Ref<React.ElementRef<typeof RADisclosureGroup>>,\n ) => {\n const { ownProps, restProps, dataAttributes } = useDefinition(\n AccordionGroupDefinition,\n props,\n );\n const { classes, allowsMultiple } = ownProps;\n\n return (\n <RADisclosureGroup\n ref={ref}\n allowsMultipleExpanded={allowsMultiple}\n className={classes.root}\n {...dataAttributes}\n {...restProps}\n />\n );\n },\n);\n\nAccordionGroup.displayName = 'AccordionGroup';\n"],"names":["RADisclosure","RAHeading","RAButton","RADisclosurePanel","RADisclosureGroup"],"mappings":"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"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import styleInject from '../../node_modules_dist/style-inject/dist/style-inject.es.esm.js';
|
|
2
2
|
|
|
3
|
-
var css_248z = "/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n@layer tokens, base, components, utilities;\n\n@layer components {\n .Accordion_bui-
|
|
4
|
-
var styles = {"bui-Accordion":"Accordion_bui-
|
|
3
|
+
var css_248z = "/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n@layer tokens, base, components, utilities;\n\n@layer components {\n .Accordion_bui-Accordion__9b8ddcbafb {\n width: 100%;\n border-radius: var(--bui-radius-3);\n padding: var(--bui-space-3);\n\n &[data-bg='neutral-1'] {\n background-color: var(--bui-bg-neutral-1);\n }\n\n &[data-bg='neutral-2'] {\n background-color: var(--bui-bg-neutral-2);\n }\n\n &[data-bg='neutral-3'] {\n background-color: var(--bui-bg-neutral-3);\n }\n }\n\n .Accordion_bui-AccordionTrigger__9b8ddcbafb {\n all: unset;\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: space-between;\n }\n\n .Accordion_bui-AccordionTriggerButton__9b8ddcbafb {\n all: unset;\n width: 100%;\n color: var(--bui-fg-primary);\n display: flex;\n align-items: center;\n justify-content: space-between;\n cursor: pointer;\n text-align: left;\n\n &:focus-visible {\n outline: none;\n transition: none;\n box-shadow: inset 0 0 0 2px var(--bui-ring);\n }\n\n &[data-disabled='true'] {\n background-color: transparent;\n color: var(--bui-fg-disabled);\n cursor: not-allowed;\n }\n }\n\n .Accordion_bui-AccordionTriggerTitle__9b8ddcbafb {\n font-size: var(--bui-font-size-4);\n font-weight: var(--bui-font-weight-bold);\n line-height: 140%;\n }\n\n .Accordion_bui-AccordionTriggerSubtitle__9b8ddcbafb {\n font-size: var(--bui-font-size-2);\n line-height: 140%;\n color: var(--bui-fg-secondary);\n }\n\n .Accordion_bui-AccordionTriggerIcon__9b8ddcbafb {\n transition: transform 150ms ease-out;\n flex-shrink: 0;\n width: 1rem;\n height: 1rem;\n\n .Accordion_bui-Accordion__9b8ddcbafb[data-expanded='true'] > .Accordion_bui-AccordionTrigger__9b8ddcbafb & {\n transform: rotate(180deg);\n }\n }\n\n .Accordion_bui-AccordionPanel__9b8ddcbafb {\n .Accordion_bui-Accordion__9b8ddcbafb[data-expanded='true'] > & {\n padding-top: var(--bui-space-1);\n }\n }\n\n .Accordion_bui-AccordionGroup__9b8ddcbafb {\n display: flex;\n flex-direction: column;\n gap: var(--bui-space-3);\n width: 100%;\n }\n}\n";
|
|
4
|
+
var styles = {"bui-Accordion":"Accordion_bui-Accordion__9b8ddcbafb","bui-AccordionTrigger":"Accordion_bui-AccordionTrigger__9b8ddcbafb","bui-AccordionTriggerButton":"Accordion_bui-AccordionTriggerButton__9b8ddcbafb","bui-AccordionTriggerTitle":"Accordion_bui-AccordionTriggerTitle__9b8ddcbafb","bui-AccordionTriggerSubtitle":"Accordion_bui-AccordionTriggerSubtitle__9b8ddcbafb","bui-AccordionTriggerIcon":"Accordion_bui-AccordionTriggerIcon__9b8ddcbafb","bui-AccordionPanel":"Accordion_bui-AccordionPanel__9b8ddcbafb","bui-AccordionGroup":"Accordion_bui-AccordionGroup__9b8ddcbafb"};
|
|
5
5
|
styleInject(css_248z);
|
|
6
6
|
|
|
7
7
|
export { styles as default };
|