@backstage/ui 0.12.0-next.2 → 0.12.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.
Files changed (87) hide show
  1. package/CHANGELOG.md +362 -1
  2. package/dist/components/Accordion/Accordion.esm.js +82 -97
  3. package/dist/components/Accordion/Accordion.esm.js.map +1 -1
  4. package/dist/components/Accordion/Accordion.module.css.esm.js +2 -2
  5. package/dist/components/Accordion/definition.esm.js +54 -13
  6. package/dist/components/Accordion/definition.esm.js.map +1 -1
  7. package/dist/components/Alert/definition.esm.js +1 -3
  8. package/dist/components/Alert/definition.esm.js.map +1 -1
  9. package/dist/components/Avatar/Avatar.module.css.esm.js +2 -2
  10. package/dist/components/Box/Box.esm.js +2 -2
  11. package/dist/components/Box/Box.esm.js.map +1 -1
  12. package/dist/components/Box/Box.module.css.esm.js +2 -2
  13. package/dist/components/Box/definition.esm.js +3 -3
  14. package/dist/components/Box/definition.esm.js.map +1 -1
  15. package/dist/components/Button/Button.module.css.esm.js +2 -2
  16. package/dist/components/Button/definition.esm.js +2 -3
  17. package/dist/components/Button/definition.esm.js.map +1 -1
  18. package/dist/components/ButtonIcon/ButtonIcon.module.css.esm.js +2 -2
  19. package/dist/components/ButtonIcon/definition.esm.js +2 -3
  20. package/dist/components/ButtonIcon/definition.esm.js.map +1 -1
  21. package/dist/components/ButtonLink/ButtonLink.module.css.esm.js +2 -2
  22. package/dist/components/ButtonLink/definition.esm.js +2 -3
  23. package/dist/components/ButtonLink/definition.esm.js.map +1 -1
  24. package/dist/components/Card/Card.esm.js +27 -47
  25. package/dist/components/Card/Card.esm.js.map +1 -1
  26. package/dist/components/Card/Card.module.css.esm.js +2 -2
  27. package/dist/components/Card/definition.esm.js +47 -7
  28. package/dist/components/Card/definition.esm.js.map +1 -1
  29. package/dist/components/Checkbox/Checkbox.module.css.esm.js +2 -2
  30. package/dist/components/Dialog/Dialog.esm.js +1 -1
  31. package/dist/components/Dialog/Dialog.module.css.esm.js +2 -2
  32. package/dist/components/Flex/Flex.esm.js +6 -8
  33. package/dist/components/Flex/Flex.esm.js.map +1 -1
  34. package/dist/components/Flex/Flex.module.css.esm.js +2 -2
  35. package/dist/components/Flex/definition.esm.js +8 -1
  36. package/dist/components/Flex/definition.esm.js.map +1 -1
  37. package/dist/components/FullPage/FullPage.esm.js +22 -0
  38. package/dist/components/FullPage/FullPage.esm.js.map +1 -0
  39. package/dist/components/FullPage/FullPage.module.css.esm.js +8 -0
  40. package/dist/components/FullPage/FullPage.module.css.esm.js.map +1 -0
  41. package/dist/components/FullPage/definition.esm.js +8 -0
  42. package/dist/components/FullPage/definition.esm.js.map +1 -0
  43. package/dist/components/Grid/Grid.esm.js +11 -15
  44. package/dist/components/Grid/Grid.esm.js.map +1 -1
  45. package/dist/components/Grid/Grid.module.css.esm.js +2 -2
  46. package/dist/components/Grid/definition.esm.js +16 -2
  47. package/dist/components/Grid/definition.esm.js.map +1 -1
  48. package/dist/components/Menu/Menu.module.css.esm.js +2 -2
  49. package/dist/components/PasswordField/PasswordField.module.css.esm.js +2 -2
  50. package/dist/components/PluginHeader/PluginHeader.esm.js +88 -0
  51. package/dist/components/PluginHeader/PluginHeader.esm.js.map +1 -0
  52. package/dist/components/PluginHeader/PluginHeader.module.css.esm.js +8 -0
  53. package/dist/components/PluginHeader/PluginHeader.module.css.esm.js.map +1 -0
  54. package/dist/components/{Header/HeaderToolbar.esm.js → PluginHeader/PluginHeaderToolbar.esm.js} +6 -6
  55. package/dist/components/PluginHeader/PluginHeaderToolbar.esm.js.map +1 -0
  56. package/dist/components/PluginHeader/definition.esm.js +15 -0
  57. package/dist/components/PluginHeader/definition.esm.js.map +1 -0
  58. package/dist/components/Popover/Popover.module.css.esm.js +2 -2
  59. package/dist/components/RadioGroup/RadioGroup.module.css.esm.js +2 -2
  60. package/dist/components/SearchField/SearchField.module.css.esm.js +2 -2
  61. package/dist/components/Select/Select.module.css.esm.js +2 -2
  62. package/dist/components/Table/Table.module.css.esm.js +2 -2
  63. package/dist/components/TablePagination/TablePagination.esm.js +1 -1
  64. package/dist/components/TextField/TextField.module.css.esm.js +2 -2
  65. package/dist/components/ToggleButton/ToggleButton.esm.js +1 -4
  66. package/dist/components/ToggleButton/ToggleButton.esm.js.map +1 -1
  67. package/dist/components/ToggleButtonGroup/ToggleButtonGroup.module.css.esm.js +2 -2
  68. package/dist/components/Tooltip/Tooltip.module.css.esm.js +2 -2
  69. package/dist/css/styles.css +11 -13
  70. package/dist/hooks/useBg.esm.js +36 -0
  71. package/dist/hooks/useBg.esm.js.map +1 -0
  72. package/dist/hooks/useDefinition/defineComponent.esm.js.map +1 -1
  73. package/dist/hooks/useDefinition/useDefinition.esm.js +15 -12
  74. package/dist/hooks/useDefinition/useDefinition.esm.js.map +1 -1
  75. package/dist/index.d.ts +303 -77
  76. package/dist/index.esm.js +7 -4
  77. package/dist/index.esm.js.map +1 -1
  78. package/package.json +5 -5
  79. package/dist/components/Header/Header.esm.js +0 -56
  80. package/dist/components/Header/Header.esm.js.map +0 -1
  81. package/dist/components/Header/Header.module.css.esm.js +0 -8
  82. package/dist/components/Header/Header.module.css.esm.js.map +0 -1
  83. package/dist/components/Header/HeaderToolbar.esm.js.map +0 -1
  84. package/dist/components/Header/definition.esm.js +0 -14
  85. package/dist/components/Header/definition.esm.js.map +0 -1
  86. package/dist/hooks/useSurface.esm.js +0 -74
  87. package/dist/hooks/useSurface.esm.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,9 +1,20 @@
1
1
  # @backstage/ui
2
2
 
3
- ## 0.12.0-next.2
3
+ ## 0.12.0
4
4
 
5
5
  ### Minor Changes
6
6
 
7
+ - 46a9adc: **BREAKING**: Alert no longer accepts a `surface` prop
8
+
9
+ The Alert component's background is now driven entirely by its `status` prop. The `surface` prop has been removed.
10
+
11
+ ```diff
12
+ - <Alert surface="1" status="info" />
13
+ + <Alert status="info" />
14
+ ```
15
+
16
+ **Affected components:** Alert
17
+
7
18
  - b63c25b: **BREAKING**: Removed gray scale tokens and renamed background surface tokens to neutral tokens
8
19
 
9
20
  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 +42,356 @@
31
42
  + background: var(--bui-bg-neutral-1);
32
43
  ```
33
44
 
45
+ - 7898df0: **BREAKING**: Replaced `Surface` / `onSurface` system with new provider/consumer background system
46
+
47
+ The old `Surface` type (`'0'`–`'3'`, `'auto'`) and its associated props (`surface`, `onSurface`) have been replaced by a provider/consumer `bg` architecture.
48
+
49
+ **Types:**
50
+
51
+ - `ContainerBg` — `'neutral-1'` | `'neutral-2'` | `'neutral-3'` | `'danger'` | `'warning'` | `'success'`
52
+ - `ProviderBg` — `ContainerBg | 'neutral-auto'`
53
+
54
+ 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.
55
+
56
+ **Hooks:**
57
+
58
+ - `useBgProvider(bg?)` — for provider components. Returns `{ bg: undefined }` when no `bg` is given (transparent). Supports `'neutral-auto'` to auto-increment from the parent context.
59
+ - `useBgConsumer()` — for consumer components. Returns the parent container's `bg` unchanged.
60
+
61
+ **Component roles:**
62
+
63
+ - **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.
64
+ - **Consumer-only** (Button, ButtonIcon, ButtonLink): set `data-on-bg`, inherit the parent container's `bg` unchanged.
65
+ - **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.
66
+
67
+ **Neutral level capping:**
68
+
69
+ 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`.
70
+
71
+ **Migration:**
72
+
73
+ Rename the `surface` prop to `bg` on provider components and update values:
74
+
75
+ ```diff
76
+ - <Box surface="1">
77
+ + <Box bg="neutral-1">
78
+
79
+ - <Card surface="2">
80
+ + <Card bg="neutral-2">
81
+
82
+ - <Flex surface="0">
83
+ + <Flex bg="neutral-1">
84
+
85
+ - <Grid.Root surface="1">
86
+ + <Grid.Root bg="neutral-1">
87
+ ```
88
+
89
+ Remove `onSurface` from consumer components — they now always inherit from the parent container:
90
+
91
+ ```diff
92
+ - <Button onSurface="1" variant="secondary">
93
+ + <Button variant="secondary">
94
+
95
+ - <ButtonIcon onSurface="2" variant="secondary" />
96
+ + <ButtonIcon variant="secondary" />
97
+
98
+ - <ToggleButton onSurface="1">
99
+ + <ToggleButton>
100
+ ```
101
+
102
+ Update type imports:
103
+
104
+ ```diff
105
+ - import type { Surface, LeafSurfaceProps, ContainerSurfaceProps } from '@backstage/ui';
106
+ + import type { ContainerBg, ProviderBg } from '@backstage/ui';
107
+ ```
108
+
109
+ Replace hook usage in custom components:
110
+
111
+ ```diff
112
+ - import { useSurface, SurfaceProvider } from '@backstage/ui';
113
+ + import { useBgProvider, useBgConsumer, BgProvider } from '@backstage/ui';
114
+
115
+ - const { surface } = useSurface({ surface: props.surface });
116
+ + const { bg } = useBgProvider(props.bg);
117
+
118
+ - const { surface } = useSurface({ onSurface: props.onSurface });
119
+ + const { bg } = useBgConsumer();
120
+ ```
121
+
122
+ Update CSS selectors targeting surface data attributes:
123
+
124
+ ```diff
125
+ - [data-surface='1'] { ... }
126
+ + [data-bg='neutral-1'] { ... }
127
+
128
+ - [data-on-surface='1'] { ... }
129
+ + [data-on-bg='neutral-1'] { ... }
130
+ ```
131
+
132
+ 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.
133
+
134
+ **Affected components:** Box, Button, ButtonIcon, ButtonLink, ToggleButton, Card, Flex, Grid
135
+
136
+ - 4137a43: **BREAKING:** Renamed, added, and removed CSS tokens.
137
+
138
+ - Renamed `--bui-bg-neutral-0` to `--bui-bg-app`.
139
+ - Renamed `--bui-border` to `--bui-border-2`.
140
+ - Added `--bui-border-1` for subtle, low-contrast borders.
141
+ - Added `--bui-bg-popover` for the background color of popovers, tooltips, menus, and dialogs.
142
+ - Removed `--bui-border-hover`, `--bui-border-pressed`, and `--bui-border-disabled`.
143
+
144
+ **Migration:**
145
+
146
+ ```diff
147
+ - var(--bui-bg-neutral-0)
148
+ + var(--bui-bg-app)
149
+
150
+ - var(--bui-border)
151
+ + var(--bui-border-2)
152
+ ```
153
+
154
+ Remove any references to `--bui-border-hover`, `--bui-border-pressed`, and `--bui-border-disabled` as these tokens no longer exist.
155
+
156
+ - 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.
157
+
158
+ ```diff
159
+ -/* This no longer styles ButtonIcon or ButtonLink */
160
+ -.bui-Button[data-variant="primary"] { ... }
161
+ +/* Use component-specific selectors */
162
+ +.bui-ButtonIcon[data-variant="primary"] { ... }
163
+ +.bui-ButtonLink[data-variant="primary"] { ... }
164
+ ```
165
+
166
+ Affected components: ButtonIcon, ButtonLink
167
+
168
+ - caeb9ad: **BREAKING**: The `cell` and `header` properties in `ColumnConfig` now return `ReactElement` instead of `ReactNode`.
169
+
170
+ 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.
171
+
172
+ Migration:
173
+
174
+ ```diff
175
+ const columns: ColumnConfig<MyItem>[] = [
176
+ {
177
+ id: 'name',
178
+ label: 'Name',
179
+ - cell: (item) => item.name,
180
+ + cell: (item) => <CellText title={item.name} />,
181
+ - header: () => 'Name',
182
+ + header: () => <Column>Name</Column>,
183
+ },
184
+ ];
185
+ ```
186
+
187
+ - 0ec3c0e: **BREAKING**: Renamed the `Header` component to `PluginHeader` for clarity.
188
+
189
+ The following exports have been renamed:
190
+
191
+ - `Header` → `PluginHeader`
192
+ - `HeaderProps` → `PluginHeaderProps`
193
+ - `HeaderDefinition` → `PluginHeaderDefinition`
194
+
195
+ The `HeaderTab` type is unchanged as it is shared with `HeaderPage`.
196
+
197
+ CSS class names have been updated from `bui-Header*` to `bui-PluginHeader*`.
198
+
199
+ **Migration:**
200
+
201
+ ```diff
202
+ -import { Header, HeaderDefinition } from '@backstage/ui';
203
+ +import { PluginHeader, PluginHeaderDefinition } from '@backstage/ui';
204
+
205
+ -<Header title="My plugin" />
206
+ +<PluginHeader title="My plugin" />
207
+ ```
208
+
209
+ **Affected components:** plugin-header
210
+
211
+ - 058ffd9: **BREAKING**: Removed `large` size variant from Button component as it was never implemented.
212
+
213
+ **Migration:**
214
+
215
+ ```diff
216
+ - <Button size="large">Click me</Button>
217
+ + <Button size="medium">Click me</Button>
218
+ ```
219
+
220
+ **Affected components:** Button
221
+
222
+ - 110fec0: **BREAKING**: Removed link and tint color tokens, added new status foreground tokens, and improved Link component styling
223
+
224
+ The following color tokens have been removed:
225
+
226
+ - `--bui-fg-link` (and all related tokens: `-hover`, `-pressed`, `-disabled`)
227
+ - `--bui-fg-tint` (and all related tokens: `-hover`, `-pressed`, `-disabled`)
228
+ - `--bui-bg-tint` (and all related tokens: `-hover`, `-pressed`, `-disabled`)
229
+ - `--bui-border-tint` (and all related tokens)
230
+
231
+ **New Status Tokens:**
232
+
233
+ Added dedicated tokens for status colors that distinguish between usage on status backgrounds vs. standalone usage:
234
+
235
+ - `--bui-fg-danger-on-bg` / `--bui-fg-danger`
236
+ - `--bui-fg-warning-on-bg` / `--bui-fg-warning`
237
+ - `--bui-fg-success-on-bg` / `--bui-fg-success`
238
+ - `--bui-fg-info-on-bg` / `--bui-fg-info`
239
+
240
+ 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.
241
+
242
+ **Migration:**
243
+
244
+ For link colors, migrate to one of the following alternatives:
245
+
246
+ ```diff
247
+ .custom-link {
248
+ - color: var(--bui-fg-link);
249
+ + color: var(--bui-fg-info); /* For informational links */
250
+ + /* or */
251
+ + color: var(--bui-fg-primary); /* For standard text links */
252
+ }
253
+ ```
254
+
255
+ For tint colors (backgrounds, foregrounds, borders), migrate to appropriate status or neutral colors:
256
+
257
+ ```diff
258
+ .info-section {
259
+ - background: var(--bui-bg-tint);
260
+ + background: var(--bui-bg-info); /* For informational sections */
261
+ + /* or */
262
+ + background: var(--bui-bg-neutral-1); /* For neutral emphasis */
263
+ }
264
+ ```
265
+
266
+ If you're using status foreground colors on colored backgrounds, update to the new `-on-bg` tokens:
267
+
268
+ ```diff
269
+ .error-badge {
270
+ - color: var(--bui-fg-danger);
271
+ + color: var(--bui-fg-danger-on-bg);
272
+ background: var(--bui-bg-danger);
273
+ }
274
+ ```
275
+
276
+ **Affected components:** Link
277
+
278
+ ### Patch Changes
279
+
280
+ - 644e303: Added a new `FullPage` component that fills the remaining viewport height below the `PluginHeader`.
281
+
282
+ ```tsx
283
+ <PluginHeader title="My Plugin" tabs={tabs} />
284
+ <FullPage>
285
+ {/* content fills remaining height */}
286
+ </FullPage>
287
+ ```
288
+
289
+ **Affected components:** FullPage
290
+
291
+ - 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.
292
+ - 350c948: Fixed Box component to forward HTML attributes to the underlying div element.
293
+
294
+ **Affected components:** Box
295
+
296
+ - 7455dae: Use node prefix on native imports
297
+ - 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.
298
+
299
+ Affected components: Accordion
300
+
301
+ - 4d1b7f4: Fixed CSS Module syntax to comply with Next.js 16 Turbopack validation by flattening nested dark theme selectors.
302
+
303
+ **Affected components:** Popover, Tooltip
304
+
305
+ - 2c219b9: Added `destructive` prop to Button for dangerous actions like delete or remove. Works with all variants (primary, secondary, tertiary).
306
+
307
+ **Affected components:** Button
308
+
309
+ - 5af9e14: Fixed `useDefinition` hook adding literal "undefined" class name when no className prop was passed.
310
+ - 5c76d13: Allow `ref` as a prop on the `Tag` component
311
+
312
+ Affected components: Tag
313
+
314
+ - ab25658: Cleaned up `useDefinition` `ownProps` types to remove never-typed ghost properties from autocomplete.
315
+ - 741a98d: Allow data to be passed directly to the `useTable` hook using the property `data` instead of `getData()` for mode `"complete"`.
316
+
317
+ 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.
318
+
319
+ Affected components: Table
320
+
321
+ - a0fe1b2: Fixed changing columns after first render from crashing. It now renders the table with the new column layout as columns change.
322
+
323
+ Affected components: Table
324
+
325
+ - 508bd1a: Added new `Alert` component with support for status variants (info, success, warning, danger), icons, loading states, and custom actions.
326
+
327
+ Updated status color tokens for improved contrast and consistency across light and dark themes:
328
+
329
+ - Added new `--bui-bg-info` and `--bui-fg-info` tokens for info status
330
+ - Updated `--bui-bg-danger`, `--bui-fg-danger` tokens
331
+ - Updated `--bui-bg-warning`, `--bui-fg-warning` tokens
332
+ - Updated `--bui-bg-success`, `--bui-fg-success` tokens
333
+
334
+ **Affected components**: Alert
335
+
336
+ - 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.
337
+
338
+ 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`.
339
+
340
+ Affected components: Tabs, Tab, TagGroup, Tag, Menu, MenuItem, MenuAutocomplete
341
+
342
+ - 092c453: Fixed an infinite render loop in Tabs when navigating to a URL that doesn't match any tab `href`.
343
+ - becf851: export PasswordField component
344
+ - becee36: Migrated Accordion components to use `useDefinition` instead of `useStyles`, and added automatic background adaptation based on parent container context.
345
+ - 5320aa8: Fixed components to not require a Router context when rendering without internal links.
346
+
347
+ Affected components: Link, ButtonLink, Row
348
+
349
+ - a7e0d50: Updated `react-router-dom` peer dependency to `^6.30.2` and explicitly disabled v7 future flags to suppress deprecation warnings.
350
+ - 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).
351
+
352
+ Affected components: Table
353
+
354
+ - cb090b4: Bump react-aria-components to v1.14.0
355
+ - 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+.
356
+ - 74c5a76: Fixed Switch component disabled state styling to show `not-allowed` cursor and disabled text color.
357
+
358
+ **Affected components:** Switch
359
+
360
+ - 20131c5: Migrated to use the standard `backstage-cli package build` for CSS bundling instead of a custom build script.
361
+ - Updated dependencies
362
+ - @backstage/version-bridge@1.0.12
363
+
364
+ ## 0.12.0-next.2
365
+
366
+ ### Minor Changes
367
+
368
+ - b63c25b: **BREAKING**: Removed gray scale tokens and renamed background surface tokens to neutral tokens
369
+
370
+ 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.
371
+
372
+ **Migration:**
373
+
374
+ Replace surface tokens directly:
375
+
376
+ ```diff
377
+ - background: var(--bui-bg-surface-0);
378
+ + background: var(--bui-bg-app);
379
+ ```
380
+
381
+ Replace on-surface tokens shifted by +1:
382
+
383
+ ```diff
384
+ - background: var(--bui-bg-neutral-on-surface-0);
385
+ + background: var(--bui-bg-neutral-1);
386
+ ```
387
+
388
+ Replace gray tokens 1-4 with neutral equivalents (`--bui-gray-5` through `--bui-gray-8` have no direct replacement):
389
+
390
+ ```diff
391
+ - background: var(--bui-gray-1);
392
+ + background: var(--bui-bg-neutral-1);
393
+ ```
394
+
34
395
  ### Patch Changes
35
396
 
36
397
  - 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,93 @@ 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 clsx from 'clsx';
6
- import { useStyles } from '../../hooks/useStyles.esm.js';
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(({ className, ...props }, ref) => {
12
- const { classNames, cleanedProps } = useStyles(AccordionDefinition, props);
13
- return /* @__PURE__ */ jsx(
14
- Disclosure,
15
- {
16
- ref,
17
- className: clsx(classNames.root, styles[classNames.root], className),
18
- ...cleanedProps
19
- }
20
- );
21
- });
9
+ const Accordion = forwardRef(
10
+ (props, ref) => {
11
+ const { ownProps, restProps, dataAttributes } = useDefinition(
12
+ AccordionDefinition,
13
+ props
14
+ );
15
+ const { classes } = ownProps;
16
+ return /* @__PURE__ */ jsx(
17
+ Disclosure,
18
+ {
19
+ ref,
20
+ className: classes.root,
21
+ ...dataAttributes,
22
+ ...restProps
23
+ }
24
+ );
25
+ }
26
+ );
22
27
  Accordion.displayName = "Accordion";
23
- const AccordionTrigger = forwardRef(({ className, title, subtitle, children, ...props }, ref) => {
24
- const { classNames, cleanedProps } = useStyles(AccordionDefinition, props);
25
- return /* @__PURE__ */ jsx(
26
- Heading,
27
- {
28
- ref,
29
- className: clsx(
30
- classNames.trigger,
31
- styles[classNames.trigger],
32
- className
33
- ),
34
- ...cleanedProps,
35
- children: /* @__PURE__ */ jsxs(
36
- Button,
37
- {
38
- slot: "trigger",
39
- className: clsx(
40
- classNames.triggerButton,
41
- styles[classNames.triggerButton]
42
- ),
43
- children: [
44
- children ? children : /* @__PURE__ */ jsxs(Flex, { gap: "2", align: "center", children: [
45
- /* @__PURE__ */ jsx(
46
- "span",
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
- });
28
+ const AccordionTrigger = forwardRef(
29
+ (props, ref) => {
30
+ const { ownProps, restProps, dataAttributes } = useDefinition(
31
+ AccordionTriggerDefinition,
32
+ props
33
+ );
34
+ const { classes, title, subtitle, children } = ownProps;
35
+ return /* @__PURE__ */ jsx(
36
+ Heading,
37
+ {
38
+ ref,
39
+ className: classes.root,
40
+ ...dataAttributes,
41
+ ...restProps,
42
+ children: /* @__PURE__ */ jsxs(Button, { slot: "trigger", className: classes.button, children: [
43
+ children ? children : /* @__PURE__ */ jsxs(Flex, { gap: "2", align: "center", children: [
44
+ /* @__PURE__ */ jsx("span", { className: classes.title, children: title }),
45
+ subtitle && /* @__PURE__ */ jsx("span", { className: classes.subtitle, children: subtitle })
46
+ ] }),
47
+ /* @__PURE__ */ jsx(RiArrowDownSLine, { className: classes.icon, size: 16 })
48
+ ] })
49
+ }
50
+ );
51
+ }
52
+ );
82
53
  AccordionTrigger.displayName = "AccordionTrigger";
83
- const AccordionPanel = forwardRef(({ className, ...props }, ref) => {
84
- const { classNames, cleanedProps } = useStyles(AccordionDefinition, props);
85
- return /* @__PURE__ */ jsx(
86
- DisclosurePanel,
87
- {
88
- ref,
89
- className: clsx(classNames.panel, styles[classNames.panel], className),
90
- ...cleanedProps
91
- }
92
- );
93
- });
54
+ const AccordionPanel = forwardRef(
55
+ (props, ref) => {
56
+ const { ownProps, restProps, dataAttributes } = useDefinition(
57
+ AccordionPanelDefinition,
58
+ props
59
+ );
60
+ const { classes } = ownProps;
61
+ return /* @__PURE__ */ jsx(
62
+ DisclosurePanel,
63
+ {
64
+ ref,
65
+ className: classes.root,
66
+ ...dataAttributes,
67
+ ...restProps
68
+ }
69
+ );
70
+ }
71
+ );
94
72
  AccordionPanel.displayName = "AccordionPanel";
95
- const AccordionGroup = forwardRef(({ className, allowsMultiple = false, ...props }, ref) => {
96
- const { classNames, cleanedProps } = useStyles(AccordionDefinition, props);
97
- return /* @__PURE__ */ jsx(
98
- DisclosureGroup,
99
- {
100
- ref,
101
- allowsMultipleExpanded: allowsMultiple,
102
- className: clsx(classNames.group, styles[classNames.group], className),
103
- ...cleanedProps
104
- }
105
- );
106
- });
73
+ const AccordionGroup = forwardRef(
74
+ (props, ref) => {
75
+ const { ownProps, restProps, dataAttributes } = useDefinition(
76
+ AccordionGroupDefinition,
77
+ props
78
+ );
79
+ const { classes, allowsMultiple } = ownProps;
80
+ return /* @__PURE__ */ jsx(
81
+ DisclosureGroup,
82
+ {
83
+ ref,
84
+ allowsMultipleExpanded: allowsMultiple,
85
+ className: classes.root,
86
+ ...dataAttributes,
87
+ ...restProps
88
+ }
89
+ );
90
+ }
91
+ );
107
92
  AccordionGroup.displayName = "AccordionGroup";
108
93
 
109
94
  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 clsx from 'clsx';\nimport type {\n AccordionProps,\n AccordionTriggerProps,\n AccordionPanelProps,\n AccordionGroupProps,\n} from './types';\nimport { useStyles } from '../../hooks/useStyles';\nimport { AccordionDefinition } from './definition';\nimport styles from './Accordion.module.css';\nimport { Flex } from '../Flex';\n\n/** @public */\nexport const Accordion = forwardRef<\n React.ElementRef<typeof RADisclosure>,\n AccordionProps\n>(({ className, ...props }, ref) => {\n const { classNames, cleanedProps } = useStyles(AccordionDefinition, props);\n\n return (\n <RADisclosure\n ref={ref}\n className={clsx(classNames.root, styles[classNames.root], className)}\n {...cleanedProps}\n />\n );\n});\n\nAccordion.displayName = 'Accordion';\n\n/** @public */\nexport const AccordionTrigger = forwardRef<\n React.ElementRef<typeof RAHeading>,\n AccordionTriggerProps\n>(({ className, title, subtitle, children, ...props }, ref) => {\n const { classNames, cleanedProps } = useStyles(AccordionDefinition, props);\n\n return (\n <RAHeading\n ref={ref}\n className={clsx(\n classNames.trigger,\n styles[classNames.trigger],\n className,\n )}\n {...cleanedProps}\n >\n <RAButton\n slot=\"trigger\"\n className={clsx(\n classNames.triggerButton,\n styles[classNames.triggerButton],\n )}\n >\n {children ? (\n children\n ) : (\n <Flex gap=\"2\" align=\"center\">\n <span\n className={clsx(\n classNames.triggerTitle,\n styles[classNames.triggerTitle],\n )}\n >\n {title}\n </span>\n {subtitle && (\n <span\n className={clsx(\n classNames.triggerSubtitle,\n styles[classNames.triggerSubtitle],\n )}\n >\n {subtitle}\n </span>\n )}\n </Flex>\n )}\n\n <RiArrowDownSLine\n className={clsx(\n classNames.triggerIcon,\n styles[classNames.triggerIcon],\n )}\n size={16}\n />\n </RAButton>\n </RAHeading>\n );\n});\n\nAccordionTrigger.displayName = 'AccordionTrigger';\n\n/** @public */\nexport const AccordionPanel = forwardRef<\n React.ElementRef<typeof RADisclosurePanel>,\n AccordionPanelProps\n>(({ className, ...props }, ref) => {\n const { classNames, cleanedProps } = useStyles(AccordionDefinition, props);\n\n return (\n <RADisclosurePanel\n ref={ref}\n className={clsx(classNames.panel, styles[classNames.panel], className)}\n {...cleanedProps}\n />\n );\n});\n\nAccordionPanel.displayName = 'AccordionPanel';\n\n/** @public */\nexport const AccordionGroup = forwardRef<\n React.ElementRef<typeof RADisclosureGroup>,\n AccordionGroupProps\n>(({ className, allowsMultiple = false, ...props }, ref) => {\n const { classNames, cleanedProps } = useStyles(AccordionDefinition, props);\n\n return (\n <RADisclosureGroup\n ref={ref}\n allowsMultipleExpanded={allowsMultiple}\n className={clsx(classNames.group, styles[classNames.group], className)}\n {...cleanedProps}\n />\n );\n});\n\nAccordionGroup.displayName = 'AccordionGroup';\n"],"names":["RADisclosure","RAHeading","RAButton","RADisclosurePanel","RADisclosureGroup"],"mappings":";;;;;;;;;;AAsCO,MAAM,SAAA,GAAY,WAGvB,CAAC,EAAE,WAAW,GAAG,KAAA,IAAS,GAAA,KAAQ;AAClC,EAAA,MAAM,EAAE,UAAA,EAAY,YAAA,EAAa,GAAI,SAAA,CAAU,qBAAqB,KAAK,CAAA;AAEzE,EAAA,uBACE,GAAA;AAAA,IAACA,UAAA;AAAA,IAAA;AAAA,MACC,GAAA;AAAA,MACA,SA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,KAAK,GAAG,SAAS,CAAA;AAAA,MACpE,GAAG;AAAA;AAAA,GACN;AAEJ,CAAC;AAED,cAAA,CAAe,WAAA,GAAc,gBAAA;;;;"}
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 } = ownProps;\n\n return (\n <RADisclosure\n ref={ref}\n className={classes.root}\n {...dataAttributes}\n {...restProps}\n />\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":";;;;;;;;AAyCO,MAAM,SAAA,GAAY,UAAA;AAAA,EACvB,CAAC,OAAuB,GAAA,KAAoD;AAC1E,IAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAW,cAAA,EAAe,GAAI,aAAA;AAAA,MAC9C,mBAAA;AAAA,MACA;AAAA,KACF;AACA,IAAA,MAA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AA;AAAA,KACF;AAAA,EAEJ;AACF;AAEA,gBAAA,CAAiB,WAAA,GAAc,kBAAA;AAGxB,MAAM,cAAA,GAAiB,UAAA;AAAA,EAC5B,CACE,OACA,GAAA,KACG;AACH,IAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAW,cAAA,EAAe,GAAI,aAAA;AAAA,MAC9C,wBAAA;AAAA,MACA;AAAA,KACF;AACA,IAAA,MAAM,EAAE,SAAQ,GAAI,QAAA;AAEpB,IAAA,uBACE,GAAA;AAAA,MAACC,eAAA;AAAA,MAAA;AAAA,QACC,GAAA;AAAA,QACA,WAAW,OAAA,CAAQ,IAAA;AAAA,QAClB,GAAG,cAAA;AAAA,QACH,GAAG;AAAA;AAAA,KACN;AAAA,EAEJ;AACF;AAEA,cAAA,CAAe,WAAA,GAAc,gBAAA;AAGtB,MAAM,cAAA,GAAiB,UAAA;AAAA,EAC5B,CACE,OACA,GAAA,KACG;AACH,IAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAW,cAAA,EAAe,GAAI,aAAA;AAAA,MAC9C,wBAAA;AAAA,MACA;AAAA,KACF;AACA,IAAA,MAAM,EAAE,OAAA,EAAS,cAAA,EAAe,GAAI,QAAA;AAEpC,IAAA,uBACE,GAAA;AAAA,MAACC,eAAA;AAAA,MAAA;AAAA,QACC,GAAA;AAAA,QACA,sBAAA,EAAwB,cAAA;AAAA,QACxB,WAAW,OAAA,CAAQ,IAAA;AAAA,QAClB,GAAG,cAAA;AAAA,QACH,GAAG;AAAA;AAAA,KACN;AAAA,EAEJ;AACF;AAEA,cAAA,CAAe,WAAA,GAAc,gBAAA;;;;"}
@@ -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-Accordion__089e06ba75 {\n width: 100%;\n background-color: var(--bui-bg-neutral-1);\n border-radius: var(--bui-radius-3);\n padding: var(--bui-space-3);\n }\n\n .Accordion_bui-AccordionTrigger__089e06ba75 {\n all: unset;\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: space-between;\n }\n\n .Accordion_bui-AccordionTriggerButton__089e06ba75 {\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__089e06ba75 {\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__089e06ba75 {\n font-size: var(--bui-font-size-2);\n line-height: 140%;\n color: var(--bui-fg-secondary);\n }\n\n .Accordion_bui-AccordionTriggerIcon__089e06ba75 {\n transition: transform 150ms ease-out;\n flex-shrink: 0;\n width: 1rem;\n height: 1rem;\n\n .Accordion_bui-Accordion__089e06ba75[data-expanded='true'] > .Accordion_bui-AccordionTrigger__089e06ba75 & {\n transform: rotate(180deg);\n }\n }\n\n .Accordion_bui-AccordionPanel__089e06ba75 {\n .Accordion_bui-Accordion__089e06ba75[data-expanded='true'] > & {\n padding-top: var(--bui-space-1);\n }\n }\n\n .Accordion_bui-AccordionGroup__089e06ba75 {\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__089e06ba75","bui-AccordionTrigger":"Accordion_bui-AccordionTrigger__089e06ba75","bui-AccordionTriggerButton":"Accordion_bui-AccordionTriggerButton__089e06ba75","bui-AccordionTriggerTitle":"Accordion_bui-AccordionTriggerTitle__089e06ba75","bui-AccordionTriggerSubtitle":"Accordion_bui-AccordionTriggerSubtitle__089e06ba75","bui-AccordionTriggerIcon":"Accordion_bui-AccordionTriggerIcon__089e06ba75","bui-AccordionPanel":"Accordion_bui-AccordionPanel__089e06ba75","bui-AccordionGroup":"Accordion_bui-AccordionGroup__089e06ba75"};
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__25fae93994 {\n width: 100%;\n background-color: var(--bui-bg-neutral-1);\n border-radius: var(--bui-radius-3);\n padding: var(--bui-space-3);\n\n &[data-on-bg='neutral-1'] {\n background-color: var(--bui-bg-neutral-2);\n }\n\n &[data-on-bg='neutral-2'] {\n background-color: var(--bui-bg-neutral-3);\n }\n\n &[data-on-bg='neutral-3'] {\n background-color: var(--bui-bg-neutral-4);\n }\n }\n\n .Accordion_bui-AccordionTrigger__25fae93994 {\n all: unset;\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: space-between;\n }\n\n .Accordion_bui-AccordionTriggerButton__25fae93994 {\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__25fae93994 {\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__25fae93994 {\n font-size: var(--bui-font-size-2);\n line-height: 140%;\n color: var(--bui-fg-secondary);\n }\n\n .Accordion_bui-AccordionTriggerIcon__25fae93994 {\n transition: transform 150ms ease-out;\n flex-shrink: 0;\n width: 1rem;\n height: 1rem;\n\n .Accordion_bui-Accordion__25fae93994[data-expanded='true'] > .Accordion_bui-AccordionTrigger__25fae93994 & {\n transform: rotate(180deg);\n }\n }\n\n .Accordion_bui-AccordionPanel__25fae93994 {\n .Accordion_bui-Accordion__25fae93994[data-expanded='true'] > & {\n padding-top: var(--bui-space-1);\n }\n }\n\n .Accordion_bui-AccordionGroup__25fae93994 {\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__25fae93994","bui-AccordionTrigger":"Accordion_bui-AccordionTrigger__25fae93994","bui-AccordionTriggerButton":"Accordion_bui-AccordionTriggerButton__25fae93994","bui-AccordionTriggerTitle":"Accordion_bui-AccordionTriggerTitle__25fae93994","bui-AccordionTriggerSubtitle":"Accordion_bui-AccordionTriggerSubtitle__25fae93994","bui-AccordionTriggerIcon":"Accordion_bui-AccordionTriggerIcon__25fae93994","bui-AccordionPanel":"Accordion_bui-AccordionPanel__25fae93994","bui-AccordionGroup":"Accordion_bui-AccordionGroup__25fae93994"};
5
5
  styleInject(css_248z);
6
6
 
7
7
  export { styles as default };