@backstage/ui 0.13.0-next.1 → 0.13.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 +282 -0
- package/dist/analytics/getNodeText.esm.js +21 -0
- package/dist/analytics/getNodeText.esm.js.map +1 -0
- package/dist/analytics/useAnalytics.esm.js +26 -0
- package/dist/analytics/useAnalytics.esm.js.map +1 -0
- package/dist/components/Accordion/Accordion.module.css.esm.js +2 -2
- package/dist/components/Accordion/definition.esm.js +1 -0
- package/dist/components/Accordion/definition.esm.js.map +1 -1
- package/dist/components/Alert/definition.esm.js +1 -0
- package/dist/components/Alert/definition.esm.js.map +1 -1
- package/dist/components/Avatar/definition.esm.js +1 -0
- package/dist/components/Avatar/definition.esm.js.map +1 -1
- package/dist/components/Box/definition.esm.js +1 -0
- 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 +1 -0
- 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 +1 -0
- package/dist/components/ButtonIcon/definition.esm.js.map +1 -1
- package/dist/components/ButtonLink/ButtonLink.esm.js +12 -4
- package/dist/components/ButtonLink/ButtonLink.esm.js.map +1 -1
- package/dist/components/ButtonLink/ButtonLink.module.css.esm.js +2 -2
- package/dist/components/ButtonLink/definition.esm.js +3 -0
- package/dist/components/ButtonLink/definition.esm.js.map +1 -1
- package/dist/components/Card/Card.esm.js +66 -5
- 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 +10 -2
- package/dist/components/Card/definition.esm.js.map +1 -1
- package/dist/components/Checkbox/Checkbox.esm.js +12 -3
- package/dist/components/Checkbox/Checkbox.esm.js.map +1 -1
- package/dist/components/Checkbox/Checkbox.module.css.esm.js +2 -2
- package/dist/components/Checkbox/definition.esm.js +1 -2
- package/dist/components/Checkbox/definition.esm.js.map +1 -1
- package/dist/components/Container/Container.module.css.esm.js +2 -2
- package/dist/components/Container/definition.esm.js +1 -0
- package/dist/components/Container/definition.esm.js.map +1 -1
- package/dist/components/Dialog/Dialog.esm.js +3 -1
- package/dist/components/Dialog/Dialog.esm.js.map +1 -1
- package/dist/components/Dialog/Dialog.module.css.esm.js +2 -2
- package/dist/components/Dialog/definition.esm.js +1 -0
- package/dist/components/Dialog/definition.esm.js.map +1 -1
- package/dist/components/FieldError/definition.esm.js +1 -0
- package/dist/components/FieldError/definition.esm.js.map +1 -1
- package/dist/components/FieldLabel/definition.esm.js +1 -0
- package/dist/components/FieldLabel/definition.esm.js.map +1 -1
- package/dist/components/Flex/Flex.esm.js +2 -1
- package/dist/components/Flex/Flex.esm.js.map +1 -1
- package/dist/components/Flex/definition.esm.js +1 -0
- package/dist/components/Flex/definition.esm.js.map +1 -1
- package/dist/components/FullPage/definition.esm.js +1 -0
- package/dist/components/FullPage/definition.esm.js.map +1 -1
- package/dist/components/Grid/Grid.esm.js +4 -2
- package/dist/components/Grid/Grid.esm.js.map +1 -1
- package/dist/components/Grid/definition.esm.js +1 -0
- package/dist/components/Grid/definition.esm.js.map +1 -1
- package/dist/components/{HeaderPage/HeaderPage.esm.js → Header/Header.esm.js} +6 -5
- package/dist/components/Header/Header.esm.js.map +1 -0
- package/dist/components/Header/Header.module.css.esm.js +8 -0
- package/dist/components/Header/Header.module.css.esm.js.map +1 -0
- package/dist/components/{HeaderPage → Header}/definition.esm.js +10 -8
- package/dist/components/Header/definition.esm.js.map +1 -0
- package/dist/components/Link/Link.esm.js +11 -3
- package/dist/components/Link/Link.esm.js.map +1 -1
- package/dist/components/Link/definition.esm.js +3 -0
- package/dist/components/Link/definition.esm.js.map +1 -1
- package/dist/components/List/List.esm.js +70 -0
- package/dist/components/List/List.esm.js.map +1 -0
- package/dist/components/List/List.module.css.esm.js +8 -0
- package/dist/components/List/List.module.css.esm.js.map +1 -0
- package/dist/components/List/definition.esm.js +44 -0
- package/dist/components/List/definition.esm.js.map +1 -0
- package/dist/components/Menu/Menu.esm.js +24 -9
- package/dist/components/Menu/Menu.esm.js.map +1 -1
- package/dist/components/Menu/Menu.module.css.esm.js +2 -2
- package/dist/components/Menu/definition.esm.js +3 -0
- package/dist/components/Menu/definition.esm.js.map +1 -1
- package/dist/components/PasswordField/definition.esm.js +1 -0
- package/dist/components/PasswordField/definition.esm.js.map +1 -1
- package/dist/components/PluginHeader/PluginHeader.esm.js +40 -8
- package/dist/components/PluginHeader/PluginHeader.esm.js.map +1 -1
- package/dist/components/PluginHeader/PluginHeader.module.css.esm.js +2 -2
- package/dist/components/PluginHeader/definition.esm.js +1 -0
- package/dist/components/PluginHeader/definition.esm.js.map +1 -1
- package/dist/components/Popover/definition.esm.js +1 -0
- package/dist/components/Popover/definition.esm.js.map +1 -1
- package/dist/components/RadioGroup/definition.esm.js +1 -0
- package/dist/components/RadioGroup/definition.esm.js.map +1 -1
- package/dist/components/SearchAutocomplete/SearchAutocomplete.esm.js +164 -0
- package/dist/components/SearchAutocomplete/SearchAutocomplete.esm.js.map +1 -0
- package/dist/components/SearchAutocomplete/SearchAutocomplete.module.css.esm.js +8 -0
- package/dist/components/SearchAutocomplete/SearchAutocomplete.module.css.esm.js.map +1 -0
- package/dist/components/SearchAutocomplete/definition.esm.js +52 -0
- package/dist/components/SearchAutocomplete/definition.esm.js.map +1 -0
- package/dist/components/SearchField/SearchField.module.css.esm.js +2 -2
- package/dist/components/SearchField/definition.esm.js +2 -0
- package/dist/components/SearchField/definition.esm.js.map +1 -1
- package/dist/components/Select/Select.module.css.esm.js +2 -2
- package/dist/components/Select/SelectTrigger.esm.js +5 -2
- package/dist/components/Select/SelectTrigger.esm.js.map +1 -1
- package/dist/components/Select/definition.esm.js +2 -0
- package/dist/components/Select/definition.esm.js.map +1 -1
- package/dist/components/Skeleton/definition.esm.js +1 -0
- package/dist/components/Skeleton/definition.esm.js.map +1 -1
- package/dist/components/Switch/definition.esm.js +1 -0
- package/dist/components/Switch/definition.esm.js.map +1 -1
- package/dist/components/Table/Table.module.css.esm.js +2 -2
- package/dist/components/Table/components/Column.esm.js +1 -1
- package/dist/components/Table/components/Column.esm.js.map +1 -1
- package/dist/components/Table/components/Row.esm.js +34 -9
- package/dist/components/Table/components/Row.esm.js.map +1 -1
- package/dist/components/Table/components/Table.esm.js +80 -67
- package/dist/components/Table/components/Table.esm.js.map +1 -1
- package/dist/components/Table/components/TableBodySkeleton.esm.js +33 -0
- package/dist/components/Table/components/TableBodySkeleton.esm.js.map +1 -0
- package/dist/components/Table/components/TableHeader.esm.js +2 -2
- package/dist/components/Table/components/TableHeader.esm.js.map +1 -1
- package/dist/components/Table/components/TableRoot.esm.js +1 -1
- package/dist/components/Table/components/TableRoot.esm.js.map +1 -1
- package/dist/components/Table/definition.esm.js +19 -3
- package/dist/components/Table/definition.esm.js.map +1 -1
- package/dist/components/Table/hooks/useCompletePagination.esm.js +14 -6
- package/dist/components/Table/hooks/useCompletePagination.esm.js.map +1 -1
- package/dist/components/TablePagination/definition.esm.js +1 -0
- package/dist/components/TablePagination/definition.esm.js.map +1 -1
- package/dist/components/Tabs/Tabs.esm.js +22 -8
- package/dist/components/Tabs/Tabs.esm.js.map +1 -1
- package/dist/components/Tabs/definition.esm.js +4 -1
- package/dist/components/Tabs/definition.esm.js.map +1 -1
- package/dist/components/TagGroup/TagGroup.esm.js +16 -6
- package/dist/components/TagGroup/TagGroup.esm.js.map +1 -1
- package/dist/components/TagGroup/definition.esm.js +3 -0
- package/dist/components/TagGroup/definition.esm.js.map +1 -1
- package/dist/components/Text/definition.esm.js +1 -0
- package/dist/components/Text/definition.esm.js.map +1 -1
- package/dist/components/TextField/TextField.module.css.esm.js +2 -2
- package/dist/components/TextField/definition.esm.js +2 -0
- package/dist/components/TextField/definition.esm.js.map +1 -1
- package/dist/components/ToggleButton/definition.esm.js +1 -0
- package/dist/components/ToggleButton/definition.esm.js.map +1 -1
- package/dist/components/ToggleButtonGroup/ToggleButtonGroup.module.css.esm.js +2 -2
- package/dist/components/ToggleButtonGroup/definition.esm.js +1 -0
- package/dist/components/ToggleButtonGroup/definition.esm.js.map +1 -1
- package/dist/components/Tooltip/definition.esm.js +1 -0
- package/dist/components/Tooltip/definition.esm.js.map +1 -1
- package/dist/components/VisuallyHidden/definition.esm.js +1 -0
- package/dist/components/VisuallyHidden/definition.esm.js.map +1 -1
- package/dist/css/styles.css +4 -3
- package/dist/hooks/useDefinition/defineComponent.esm.js.map +1 -1
- package/dist/hooks/useDefinition/useDefinition.esm.js +8 -1
- package/dist/hooks/useDefinition/useDefinition.esm.js.map +1 -1
- package/dist/index.d.ts +512 -42
- package/dist/index.esm.js +9 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/provider/BUIProvider.esm.js +28 -0
- package/dist/provider/BUIProvider.esm.js.map +1 -0
- package/dist/utils/{isExternalLink.esm.js → linkUtils.esm.js} +5 -2
- package/dist/utils/linkUtils.esm.js.map +1 -0
- package/package.json +4 -4
- package/dist/components/HeaderPage/HeaderPage.esm.js.map +0 -1
- package/dist/components/HeaderPage/HeaderPage.module.css.esm.js +0 -8
- package/dist/components/HeaderPage/HeaderPage.module.css.esm.js.map +0 -1
- package/dist/components/HeaderPage/definition.esm.js.map +0 -1
- package/dist/components/InternalLinkProvider/InternalLinkProvider.esm.js +0 -55
- package/dist/components/InternalLinkProvider/InternalLinkProvider.esm.js.map +0 -1
- package/dist/utils/isExternalLink.esm.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,287 @@
|
|
|
1
1
|
# @backstage/ui
|
|
2
2
|
|
|
3
|
+
## 0.13.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 768f09d: **BREAKING**: Simplified the neutral background prop API for container components. The explicit `neutral-1`, `neutral-2`, `neutral-3`, and `neutral-auto` values have been removed from `ProviderBg`. They are replaced by a single `'neutral'` value that always auto-increments from the parent context, making it impossible to skip or pin to an explicit neutral level.
|
|
8
|
+
|
|
9
|
+
**Migration:**
|
|
10
|
+
|
|
11
|
+
Replace any explicit `bg="neutral-1"`, `bg="neutral-2"`, `bg="neutral-3"`, or `bg="neutral-auto"` props with `bg="neutral"`. To achieve a specific neutral level in stories or tests, use nested containers — each additional `bg="neutral"` wrapper increments by one level.
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
// Before
|
|
15
|
+
<Box bg="neutral-2">...</Box>
|
|
16
|
+
|
|
17
|
+
// After
|
|
18
|
+
<Box bg="neutral">
|
|
19
|
+
<Box bg="neutral">...</Box>
|
|
20
|
+
</Box>
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
**Affected components:** Box, Flex, Grid, Card, Accordion, Popover, Tooltip, Dialog, Menu
|
|
24
|
+
|
|
25
|
+
- b42fcdc: **BREAKING**: Removed `--bui-bg-popover` CSS token. Popover, Tooltip, Menu, and Dialog now use `--bui-bg-app` for their outer shell and `Box bg="neutral-1"` for content areas, providing better theme consistency and eliminating a redundant token.
|
|
26
|
+
|
|
27
|
+
**Migration:**
|
|
28
|
+
|
|
29
|
+
Replace any usage of `--bui-bg-popover` with `--bui-bg-neutral-1` (for content surfaces) or `--bui-bg-app` (for outer shells):
|
|
30
|
+
|
|
31
|
+
```diff
|
|
32
|
+
- background: var(--bui-bg-popover);
|
|
33
|
+
+ background: var(--bui-bg-neutral-1);
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
**Affected components:** Popover, Tooltip, Menu, Dialog
|
|
37
|
+
|
|
38
|
+
- bd3a76e: **BREAKING**: Data attributes rendered by components are now always lowercase. This affects CSS selectors targeting camelCase data attributes.
|
|
39
|
+
|
|
40
|
+
**Migration:**
|
|
41
|
+
|
|
42
|
+
Update any custom CSS selectors that target camelCase data attributes to use lowercase instead:
|
|
43
|
+
|
|
44
|
+
```diff
|
|
45
|
+
- [data-startCollapsed='true'] { ... }
|
|
46
|
+
+ [data-startcollapsed='true'] { ... }
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
**Affected components:** SearchField
|
|
50
|
+
|
|
51
|
+
- 95702ab: **BREAKING**: Removed deprecated types `ComponentDefinition`, `ClassNamesMap`, `DataAttributeValues`, and `DataAttributesMap` from the public API. These were internal styling infrastructure types that have been replaced by the `defineComponent` system.
|
|
52
|
+
|
|
53
|
+
**Migration:**
|
|
54
|
+
|
|
55
|
+
Remove any direct usage of these types. Component definitions now use `defineComponent()` and their shapes are not part of the public API contract.
|
|
56
|
+
|
|
57
|
+
```diff
|
|
58
|
+
- import type { ComponentDefinition, ClassNamesMap } from '@backstage/ui';
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
If you were reading `definition.dataAttributes`, use `definition.propDefs` instead — props with `dataAttribute: true` in `propDefs` are the equivalent.
|
|
62
|
+
|
|
63
|
+
- 42f8c9b: **BREAKING**: Centralized client-side routing in `BUIProvider`. Components like Link, ButtonLink, Tabs, Menu, TagGroup, and Table now require a `BUIProvider` rendered inside a React Router context for client-side navigation to work.
|
|
64
|
+
|
|
65
|
+
**Migration:**
|
|
66
|
+
|
|
67
|
+
This change requires updating `@backstage/plugin-app` and `@backstage/core-app-api` alongside `@backstage/ui`. If you only upgrade `@backstage/ui`, BUI components will fall back to full-page navigation.
|
|
68
|
+
|
|
69
|
+
If you cannot upgrade all packages together, or if you have a custom app shell, add a `BUIProvider` inside your Router:
|
|
70
|
+
|
|
71
|
+
```diff
|
|
72
|
+
+ import { BUIProvider } from '@backstage/ui';
|
|
73
|
+
|
|
74
|
+
<BrowserRouter>
|
|
75
|
+
+ <BUIProvider>
|
|
76
|
+
<AppContent />
|
|
77
|
+
+ </BUIProvider>
|
|
78
|
+
</BrowserRouter>
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
**Affected components:** Link, ButtonLink, Tabs, Menu, TagGroup, Table
|
|
82
|
+
|
|
83
|
+
- 17d6398: **BREAKING**: Renamed internal CSS classes to match the `Header` component name.
|
|
84
|
+
|
|
85
|
+
**Migration:**: If you are targeting these classes directly in your styles, update the following:
|
|
86
|
+
|
|
87
|
+
- `bui-HeaderPage` → `bui-Header`
|
|
88
|
+
- `bui-HeaderPageContent` → `bui-HeaderContent`
|
|
89
|
+
- `bui-HeaderPageBreadcrumbs` → `bui-HeaderBreadcrumbs`
|
|
90
|
+
- `bui-HeaderPageTabsWrapper` → `bui-HeaderTabsWrapper`
|
|
91
|
+
- `bui-HeaderPageControls` → `bui-HeaderControls`
|
|
92
|
+
|
|
93
|
+
**Affected components:**: Header
|
|
94
|
+
|
|
95
|
+
- 9d5f3ba: Removed redundant `selected` and `indeterminate` props from the `Checkbox` component. Use the `isSelected` and `isIndeterminate` props instead, which are the standard React Aria props and already handle both the checkbox behaviour and the corresponding CSS data attributes.
|
|
96
|
+
|
|
97
|
+
**Migration:**
|
|
98
|
+
Replace any usage of the `selected` and `indeterminate` props on `Checkbox` with the `isSelected` and `isIndeterminate` props. Note that the checked state and related CSS data attributes (such as `data-selected` and `data-indeterminate`) are now driven by React Aria, so any custom logic that previously inspected or set these via the old props should instead rely on the React Aria-managed state and attributes exposed through the new props.
|
|
99
|
+
|
|
100
|
+
**Affected components:** Checkbox
|
|
101
|
+
|
|
102
|
+
### Patch Changes
|
|
103
|
+
|
|
104
|
+
- 04d9d8d: Added `List` and `ListRow` components. These provide a standalone, accessible list of interactive rows built on top of React Aria's `GridList` and `GridListItem` primitives. Rows support icons, descriptions, actions, menus, and single or multiple selection modes.
|
|
105
|
+
|
|
106
|
+
**Affected components:** List, ListRow
|
|
107
|
+
|
|
108
|
+
- 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.
|
|
109
|
+
- db92751: Added interactive support to the `Card` component. Pass `onPress` to make the entire card surface pressable, or `href` to make it navigate to a URL. A transparent overlay handles the interaction while nested buttons and links remain independently clickable.
|
|
110
|
+
- 12d8afe: Added analytics capabilities to the component library. Components with navigation behavior (Link, ButtonLink, Tab, MenuItem, Tag, Row) now fire analytics events on click when a `BUIProvider` is present.
|
|
111
|
+
|
|
112
|
+
New exports: `BUIProvider`, `useAnalytics`, `getNodeText`, and associated types (`AnalyticsTracker`, `UseAnalyticsFn`, `BUIProviderProps`, `AnalyticsEventAttributes`).
|
|
113
|
+
|
|
114
|
+
Components with analytics support now accept a `noTrack` prop to suppress event firing.
|
|
115
|
+
|
|
116
|
+
**Affected components:** Link, ButtonLink, Tab, MenuItem, Tag, Row
|
|
117
|
+
|
|
118
|
+
- b838cc9: Added a `loading` prop and `data-loading` data attribute to `TableRoot`, allowing consumers to distinguish between stale data and initial loading states. Both `stale` and `loading` set `aria-busy` on the table.
|
|
119
|
+
|
|
120
|
+
Affected components: TableRoot
|
|
121
|
+
|
|
122
|
+
- 690786f: Improved the `Table` component loading state to show a skeleton UI with visible headers instead of plain "Loading..." text. The table now renders its full structure during loading, with animated skeleton rows in place of data. The loading state includes proper accessibility support with `aria-busy` on the table and screen reader announcements.
|
|
123
|
+
|
|
124
|
+
Affected components: Table
|
|
125
|
+
|
|
126
|
+
- 58224d3: Fixed neutral-1 hover & pressed state in light mode.
|
|
127
|
+
- 95702ab: Migrated all components from `useStyles` to `useDefinition` hook. Exported `OwnProps` types for each component, enabling better type composition for consumers.
|
|
128
|
+
|
|
129
|
+
**Affected components:** Avatar, Checkbox, Container, Dialog, FieldError, FieldLabel, Flex, FullPage, Grid, HeaderPage, Link, Menu, PasswordField, PluginHeader, Popover, RadioGroup, SearchField, Select, Skeleton, Switch, Table, TablePagination, Tabs, TagGroup, Text, TextField, ToggleButton, ToggleButtonGroup, Tooltip, VisuallyHidden
|
|
130
|
+
|
|
131
|
+
- 430d5ed: Fixed interactive cards so that CardBody can scroll when the card has a constrained height. Previously, the overlay element blocked scroll events.
|
|
132
|
+
|
|
133
|
+
**Affected components:** Card
|
|
134
|
+
|
|
135
|
+
- 4c2c350: Removed the `transition` on `Container` padding to prevent an unwanted animation when the viewport is resized.
|
|
136
|
+
|
|
137
|
+
Affected components: Container
|
|
138
|
+
|
|
139
|
+
- e0b7eb0: Fixed --bui-fg-success token in light mode to be more accessible.
|
|
140
|
+
- ad7c883: Deprecated the `HeaderPage` component name in favor of `Header`. The old `HeaderPage`, `HeaderPageProps`, `HeaderPageOwnProps`, `HeaderPageBreadcrumb`, and `HeaderPageDefinition` exports are still available as deprecated aliases.
|
|
141
|
+
- 0ebde15: Added documentation for the table cell wrapper requirement to TSDoc comments for `Cell`, `CellText`, `CellProfile`, `ColumnConfig`, and `RowRenderFn`.
|
|
142
|
+
- d9d2dd6: Added `SearchAutocomplete` and `SearchAutocompleteItem` components for building accessible search-with-results patterns. Built on React Aria's Autocomplete with keyboard navigation and screen reader support. Designed for async/external search results with a configurable popover width.
|
|
143
|
+
|
|
144
|
+
**Affected components:** SearchAutocomplete, SearchAutocompleteItem
|
|
145
|
+
|
|
146
|
+
- a6b84e1: Made Checkbox `children` optional and added a dev warning when neither a visible label, `aria-label`, nor `aria-labelledby` is provided. The label wrapper div is no longer rendered when there are no children, removing the unnecessary gap.
|
|
147
|
+
|
|
148
|
+
**Affected components:** Checkbox
|
|
149
|
+
|
|
150
|
+
- b99f6d5: Fixed `Dialog` content overflowing when no `height` prop is set. The dialog now grows with its content and scrolls when content exceeds the viewport height.
|
|
151
|
+
|
|
152
|
+
**Affected components**: Dialog
|
|
153
|
+
|
|
154
|
+
- 2f581de: Fixed focus ring styles to use React Aria's `[data-focus-visible]` data attribute instead of the native CSS `:focus-visible` pseudo-class. This ensures keyboard focus rings render reliably when focus is managed programmatically by React Aria (e.g. inside a GridList, Menu, or Select).
|
|
155
|
+
|
|
156
|
+
**Affected components:** Accordion, Button, ButtonIcon, ButtonLink, Card, List, Menu, Select, ToggleButtonGroup
|
|
157
|
+
|
|
158
|
+
- 17d6398: Fixed incorrect bottom spacing caused by `Container` using `padding-bottom` for its default bottom spacing. Changed to `margin-bottom` and prevented it from applying when `Container` is used as the `Header` root element.
|
|
159
|
+
|
|
160
|
+
**Affected components:** Container, Header
|
|
161
|
+
|
|
162
|
+
- 2e5c651: Fixed `PluginHeader` to avoid triggering `ResizeObserver loop completed with undelivered notifications` warnings when used in layouts that react to the header height, such as pages that use `FullPage`.
|
|
163
|
+
|
|
164
|
+
**Affected components:** PluginHeader
|
|
165
|
+
|
|
166
|
+
- d4fa5b4: Fixed tab `matchStrategy` matching to ignore query parameters and hash fragments in tab `href` values. Previously, tabs with query params in their `href` (e.g., `/page?group=foo`) would never show as active since matching compared the full `href` string against `location.pathname` which never includes query params.
|
|
167
|
+
|
|
168
|
+
**Affected components:** Tabs, PluginHeader
|
|
169
|
+
|
|
170
|
+
- bc42b60: Fixed Table component to use current `--bui-bg-neutral-1` tokens instead of the removed `--bui-bg-tint` tokens, restoring row hover, selected, pressed, and disabled background colors.
|
|
171
|
+
- 9314ff5: Fixed a bug in the `useTable` hook where the loading skeleton was never shown for `complete` mode when using `getData`. The initial data state was an empty array instead of `undefined`, causing the `Table` component to skip the loading state.
|
|
172
|
+
- f42f4cc: Fixed Table column headers overflowing and wrapping when there is not enough space. Headers now truncate with ellipsis instead.
|
|
173
|
+
|
|
174
|
+
**Affected components:** Table
|
|
175
|
+
|
|
176
|
+
- 1f9682b: Fixed Table row hover, selected, pressed, and disabled background states to use the correct neutral token level based on the container background.
|
|
177
|
+
|
|
178
|
+
**Affected components:** Table
|
|
179
|
+
|
|
180
|
+
- fbd5c5a: Fixed Table rows showing a pointer cursor when not interactive. Rows now only show `cursor: pointer` when they have an `href`, are selectable, or are pressable.
|
|
181
|
+
|
|
182
|
+
**Affected components:** Table
|
|
183
|
+
|
|
184
|
+
- 612c217: Fixed `Table` rows with external `href` values to open in a new tab by automatically applying `target="_blank"` and `rel="noopener noreferrer"`.
|
|
185
|
+
|
|
186
|
+
**Affected components**: Table
|
|
187
|
+
|
|
188
|
+
- 545129a: Updated Table selection checkboxes to use `aria-label` instead of empty fragment children, improving accessibility and removing the unnecessary label gap in the selection cells.
|
|
189
|
+
|
|
190
|
+
**Affected components:** Table
|
|
191
|
+
|
|
192
|
+
- 36987db: Fixed handling of the `style` prop on `Button`, `ButtonIcon`, and `ButtonLink` so that it is now correctly forwarded to the underlying element instead of being silently dropped.
|
|
193
|
+
|
|
194
|
+
**Affected components:** Button, ButtonIcon, ButtonLink
|
|
195
|
+
|
|
196
|
+
- 95702ab: Fixed Link variant default from `'body'` to `'body-medium'` to match actual CSS selectors. The previous default did not correspond to a valid variant value.
|
|
197
|
+
|
|
198
|
+
**Affected components:** Link
|
|
199
|
+
|
|
200
|
+
- 9027b10: Fixed scroll overflow in Menu and Select popover content when constrained by viewport height.
|
|
201
|
+
|
|
202
|
+
**Affected components:** Menu, Select
|
|
203
|
+
|
|
204
|
+
- 7960d54: Added support for native HTML div attributes on the `Flex`, `Grid`, and `Grid.Item` components.
|
|
205
|
+
|
|
206
|
+
**Affected components:** Flex, Grid, Grid.Item
|
|
207
|
+
|
|
208
|
+
- 0559408: Added `virtualized` prop to `Table` component for virtualized rendering of large datasets. Accepts `true` for default row height, `{ rowHeight: number }` for fixed height, or `{ estimatedRowHeight: number }` for variable height rows.
|
|
209
|
+
- 8909359: Fixed focus-visible outline styles for Menu and Select components.
|
|
210
|
+
|
|
211
|
+
**Affected components:** Menu, Select
|
|
212
|
+
|
|
213
|
+
- 12d8afe: Fixed MenuItem `onAction` prop ordering so user-provided `onAction` handlers are chained rather than silently overwritten.
|
|
214
|
+
- aa29b50: Pages created with `PageBlueprint` now render the plugin header by default in the new frontend system.
|
|
215
|
+
- bb66b86: The `Select` trigger now automatically adapts its background colour based on the parent background context.
|
|
216
|
+
|
|
217
|
+
**Affected components:** Select
|
|
218
|
+
|
|
219
|
+
- 4105a78: Merged the internal `PluginHeaderToolbar` component into `PluginHeader`, removing the separate component and its associated types (`PluginHeaderToolbarOwnProps`, `PluginHeaderToolbarProps`) and definition (`PluginHeaderToolbarDefinition`). This is an internal refactor with no changes to the public API of `PluginHeader`.
|
|
220
|
+
|
|
221
|
+
**Affected components:** PluginHeader
|
|
222
|
+
|
|
223
|
+
- 9599697: Updated dependency `globals` to `^17.0.0`.
|
|
224
|
+
- 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.
|
|
225
|
+
- 8909359: Added proper cursor styles for RadioGroup items.
|
|
226
|
+
|
|
227
|
+
**Affected components:** RadioGroup
|
|
228
|
+
|
|
229
|
+
- fcaac3b: Fixed `Card` interactive cards not firing the `onPress` handler when clicking the card surface.
|
|
230
|
+
|
|
231
|
+
**Affected components**: Card
|
|
232
|
+
|
|
233
|
+
- b303857: Fixed `isRequired` prop not being passed to the underlying React Aria field components in TextField, SearchField, and PasswordField. Previously, `isRequired` was consumed locally for the secondary label text but never forwarded, which meant the input elements lacked `aria-required="true"` and React Aria's built-in required validation was not activated.
|
|
234
|
+
|
|
235
|
+
**Affected components:** TextField, SearchField, PasswordField
|
|
236
|
+
|
|
237
|
+
- 934ac03: `SearchField` and `TextField` now automatically adapt their background color based on the parent bg context, stepping up one neutral level (e.g. neutral-1 → neutral-2) when placed on a neutral background. `TextField` also gains a focus ring using the `--bui-ring` token.
|
|
238
|
+
|
|
239
|
+
**Affected components:** SearchField, TextField
|
|
240
|
+
|
|
241
|
+
- cd3cb0f: Improved `useBreakpoint` performance by sharing a single set of `matchMedia` listeners across all component instances instead of creating independent listeners per hook call.
|
|
242
|
+
- 36987db: Extended `AlertProps`, `ContainerProps`, `DialogBodyProps`, and `FieldLabelProps` with native div element props to allow passing attributes like `aria-*` and `data-*`.
|
|
243
|
+
|
|
244
|
+
**Affected components:** Alert, Container, DialogBody, FieldLabel
|
|
245
|
+
|
|
246
|
+
## 0.13.0-next.2
|
|
247
|
+
|
|
248
|
+
### Patch Changes
|
|
249
|
+
|
|
250
|
+
- db92751: Added interactive support to the `Card` component. Pass `onPress` to make the entire card surface pressable, or `href` to make it navigate to a URL. A transparent overlay handles the interaction while nested buttons and links remain independently clickable.
|
|
251
|
+
- 12d8afe: Added analytics capabilities to the component library. Components with navigation behavior (Link, ButtonLink, Tab, MenuItem, Tag, Row) now fire analytics events on click when a `BUIProvider` is present.
|
|
252
|
+
|
|
253
|
+
New exports: `BUIProvider`, `useAnalytics`, `getNodeText`, and associated types (`AnalyticsTracker`, `UseAnalyticsFn`, `BUIProviderProps`, `AnalyticsEventAttributes`).
|
|
254
|
+
|
|
255
|
+
Components with analytics support now accept a `noTrack` prop to suppress event firing.
|
|
256
|
+
|
|
257
|
+
**Affected components:** Link, ButtonLink, Tab, MenuItem, Tag, Row
|
|
258
|
+
|
|
259
|
+
- 430d5ed: Fixed interactive cards so that CardBody can scroll when the card has a constrained height. Previously, the overlay element blocked scroll events.
|
|
260
|
+
|
|
261
|
+
**Affected components:** Card
|
|
262
|
+
|
|
263
|
+
- ad7c883: Deprecated the `HeaderPage` component name in favor of `Header`. The old `HeaderPage`, `HeaderPageProps`, `HeaderPageOwnProps`, `HeaderPageBreadcrumb`, and `HeaderPageDefinition` exports are still available as deprecated aliases.
|
|
264
|
+
- f42f4cc: Fixed Table column headers overflowing and wrapping when there is not enough space. Headers now truncate with ellipsis instead.
|
|
265
|
+
|
|
266
|
+
**Affected components:** Table
|
|
267
|
+
|
|
268
|
+
- fbd5c5a: Fixed Table rows showing a pointer cursor when not interactive. Rows now only show `cursor: pointer` when they have an `href`, are selectable, or are pressable.
|
|
269
|
+
|
|
270
|
+
**Affected components:** Table
|
|
271
|
+
|
|
272
|
+
- 7960d54: Added support for native HTML div attributes on the `Flex`, `Grid`, and `Grid.Item` components.
|
|
273
|
+
|
|
274
|
+
**Affected components:** Flex, Grid, Grid.Item
|
|
275
|
+
|
|
276
|
+
- 12d8afe: Fixed MenuItem `onAction` prop ordering so user-provided `onAction` handlers are chained rather than silently overwritten.
|
|
277
|
+
- bb66b86: The `Select` trigger now automatically adapts its background colour based on the parent background context.
|
|
278
|
+
|
|
279
|
+
**Affected components:** Select
|
|
280
|
+
|
|
281
|
+
- 934ac03: `SearchField` and `TextField` now automatically adapt their background color based on the parent bg context, stepping up one neutral level (e.g. neutral-1 → neutral-2) when placed on a neutral background. `TextField` also gains a focus ring using the `--bui-ring` token.
|
|
282
|
+
|
|
283
|
+
**Affected components:** SearchField, TextField
|
|
284
|
+
|
|
3
285
|
## 0.13.0-next.1
|
|
4
286
|
|
|
5
287
|
### Minor Changes
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Children, isValidElement } from 'react';
|
|
2
|
+
|
|
3
|
+
function getNodeText(node) {
|
|
4
|
+
if (typeof node === "function") {
|
|
5
|
+
return void 0;
|
|
6
|
+
}
|
|
7
|
+
if (Array.isArray(node)) {
|
|
8
|
+
const text = Children.map(node, getNodeText)?.filter(Boolean).join(" ");
|
|
9
|
+
return text || void 0;
|
|
10
|
+
}
|
|
11
|
+
if (isValidElement(node)) {
|
|
12
|
+
return getNodeText(node.props.children);
|
|
13
|
+
}
|
|
14
|
+
if (typeof node === "string" || typeof node === "number") {
|
|
15
|
+
return String(node);
|
|
16
|
+
}
|
|
17
|
+
return void 0;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export { getNodeText };
|
|
21
|
+
//# sourceMappingURL=getNodeText.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getNodeText.esm.js","sources":["../../src/analytics/getNodeText.ts"],"sourcesContent":["/*\n * Copyright 2026 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 { type ReactNode, isValidElement, Children } from 'react';\n\n/**\n * Recursively extracts text content from a React node tree.\n * Returns undefined if no text content is found (e.g. icon-only children\n * or render functions).\n *\n * @public\n */\nexport function getNodeText(\n node: ReactNode | ((...args: any[]) => ReactNode),\n): string | undefined {\n if (typeof node === 'function') {\n return undefined;\n }\n if (Array.isArray(node)) {\n const text = Children.map(node, getNodeText)?.filter(Boolean).join(' ');\n return text || undefined;\n }\n if (isValidElement(node)) {\n return getNodeText(node.props.children);\n }\n if (typeof node === 'string' || typeof node === 'number') {\n return String(node);\n }\n return undefined;\n}\n"],"names":[],"mappings":";;AAyBO,SAAS,YACd,IAAA,EACoB;AACpB,EAAA,IAAI,OAAO,SAAS,UAAA,EAAY;AAC9B,IAAA,OAAO,MAAA;AAAA,EACT;AACA,EAAA,IAAI,KAAA,CAAM,OAAA,CAAQ,IAAI,CAAA,EAAG;AACvB,IAAA,MAAM,IAAA,GAAO,QAAA,CAAS,GAAA,CAAI,IAAA,EAAM,WAAW,GAAG,MAAA,CAAO,OAAO,CAAA,CAAE,IAAA,CAAK,GAAG,CAAA;AACtE,IAAA,OAAO,IAAA,IAAQ,MAAA;AAAA,EACjB;AACA,EAAA,IAAI,cAAA,CAAe,IAAI,CAAA,EAAG;AACxB,IAAA,OAAO,WAAA,CAAY,IAAA,CAAK,KAAA,CAAM,QAAQ,CAAA;AAAA,EACxC;AACA,EAAA,IAAI,OAAO,IAAA,KAAS,QAAA,IAAY,OAAO,SAAS,QAAA,EAAU;AACxD,IAAA,OAAO,OAAO,IAAI,CAAA;AAAA,EACpB;AACA,EAAA,OAAO,MAAA;AACT;;;;"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { useRef } from 'react';
|
|
2
|
+
import { createVersionedContext, useVersionedContext } from '@backstage/version-bridge';
|
|
3
|
+
|
|
4
|
+
const noopTracker = {
|
|
5
|
+
captureEvent: () => {
|
|
6
|
+
}
|
|
7
|
+
};
|
|
8
|
+
const noopUseAnalytics = () => noopTracker;
|
|
9
|
+
const BUIContext = createVersionedContext("bui");
|
|
10
|
+
function useAnalytics() {
|
|
11
|
+
const ctx = useVersionedContext("bui")?.atVersion(1);
|
|
12
|
+
const impl = ctx?.useAnalytics ?? noopUseAnalytics;
|
|
13
|
+
if (process.env.NODE_ENV !== "production") {
|
|
14
|
+
const prevImpl = useRef(impl);
|
|
15
|
+
if (prevImpl.current === noopUseAnalytics !== (impl === noopUseAnalytics)) {
|
|
16
|
+
throw new Error(
|
|
17
|
+
"@backstage/ui: The analytics hook changed between a noop and a real implementation. Ensure <BUIProvider> wraps all BUI components from first render."
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
prevImpl.current = impl;
|
|
21
|
+
}
|
|
22
|
+
return impl();
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export { BUIContext, noopTracker, useAnalytics };
|
|
26
|
+
//# sourceMappingURL=useAnalytics.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAnalytics.esm.js","sources":["../../src/analytics/useAnalytics.ts"],"sourcesContent":["/*\n * Copyright 2026 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 { useRef } from 'react';\nimport {\n createVersionedContext,\n useVersionedContext,\n} from '@backstage/version-bridge';\nimport type { AnalyticsTracker, UseAnalyticsFn } from './types';\n\n/** @internal */\nexport const noopTracker: AnalyticsTracker = {\n captureEvent: () => {},\n};\n\nconst noopUseAnalytics: UseAnalyticsFn = () => noopTracker;\n\n/** @internal */\nexport type BUIContextValue = {\n useAnalytics?: UseAnalyticsFn;\n};\n\n/** @internal */\nexport const BUIContext = createVersionedContext<{\n 1: BUIContextValue;\n}>('bui');\n\n/**\n * Returns an AnalyticsTracker for capturing analytics events.\n *\n * By default returns a noop tracker. When a `BUIProvider` is present\n * in the tree, returns the tracker provided by the consumer's hook.\n *\n * @public\n */\nexport function useAnalytics(): AnalyticsTracker {\n const ctx = useVersionedContext<{ 1: BUIContextValue }>('bui')?.atVersion(1);\n const impl = ctx?.useAnalytics ?? noopUseAnalytics;\n\n if (process.env.NODE_ENV !== 'production') {\n const prevImpl = useRef(impl);\n if (\n (prevImpl.current === noopUseAnalytics) !==\n (impl === noopUseAnalytics)\n ) {\n throw new Error(\n '@backstage/ui: The analytics hook changed between a noop and a real ' +\n 'implementation. Ensure <BUIProvider> wraps all BUI components from first render.',\n );\n }\n prevImpl.current = impl;\n }\n\n return impl();\n}\n"],"names":[],"mappings":";;;AAwBO,MAAM,WAAA,GAAgC;AAAA,EAC3C,cAAc,MAAM;AAAA,EAAC;AACvB;AAEA,MAAM,mBAAmC,MAAM,WAAA;AAQxC,MAAM,UAAA,GAAa,uBAEvB,KAAK;AAUD,SAAS,YAAA,GAAiC;AAC/C,EAAA,MAAM,GAAA,GAAM,mBAAA,CAA4C,KAAK,CAAA,EAAG,UAAU,CAAC,CAAA;AAC3E,EAAA,MAAM,IAAA,GAAO,KAAK,YAAA,IAAgB,gBAAA;AAElC,EAAA,IAAI,OAAA,CAAQ,GAAA,CAAI,QAAA,KAAa,YAAA,EAAc;AACzC,IAAA,MAAM,QAAA,GAAW,OAAO,IAAI,CAAA;AAC5B,IAAA,IACG,QAAA,CAAS,OAAA,KAAY,gBAAA,MACrB,IAAA,KAAS,gBAAA,CAAA,EACV;AACA,MAAA,MAAM,IAAI,KAAA;AAAA,QACR;AAAA,OAEF;AAAA,IACF;AACA,IAAA,QAAA,CAAS,OAAA,GAAU,IAAA;AAAA,EACrB;AAEA,EAAA,OAAO,IAAA,EAAK;AACd;;;;"}
|
|
@@ -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__b3bc0ab8d6 {\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__b3bc0ab8d6 {\n all: unset;\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: space-between;\n }\n\n .Accordion_bui-AccordionTriggerButton__b3bc0ab8d6 {\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 &[data-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__b3bc0ab8d6 {\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__b3bc0ab8d6 {\n font-size: var(--bui-font-size-2);\n line-height: 140%;\n color: var(--bui-fg-secondary);\n }\n\n .Accordion_bui-AccordionTriggerIcon__b3bc0ab8d6 {\n transition: transform 150ms ease-out;\n flex-shrink: 0;\n width: 1rem;\n height: 1rem;\n\n .Accordion_bui-Accordion__b3bc0ab8d6[data-expanded='true'] > .Accordion_bui-AccordionTrigger__b3bc0ab8d6 & {\n transform: rotate(180deg);\n }\n }\n\n .Accordion_bui-AccordionPanel__b3bc0ab8d6 {\n .Accordion_bui-Accordion__b3bc0ab8d6[data-expanded='true'] > & {\n padding-top: var(--bui-space-1);\n }\n }\n\n .Accordion_bui-AccordionGroup__b3bc0ab8d6 {\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__b3bc0ab8d6","bui-AccordionTrigger":"Accordion_bui-AccordionTrigger__b3bc0ab8d6","bui-AccordionTriggerButton":"Accordion_bui-AccordionTriggerButton__b3bc0ab8d6","bui-AccordionTriggerTitle":"Accordion_bui-AccordionTriggerTitle__b3bc0ab8d6","bui-AccordionTriggerSubtitle":"Accordion_bui-AccordionTriggerSubtitle__b3bc0ab8d6","bui-AccordionTriggerIcon":"Accordion_bui-AccordionTriggerIcon__b3bc0ab8d6","bui-AccordionPanel":"Accordion_bui-AccordionPanel__b3bc0ab8d6","bui-AccordionGroup":"Accordion_bui-AccordionGroup__b3bc0ab8d6"};
|
|
5
5
|
styleInject(css_248z);
|
|
6
6
|
|
|
7
7
|
export { styles as default };
|
|
@@ -3,6 +3,7 @@ import 'clsx';
|
|
|
3
3
|
import '../../hooks/useBreakpoint.esm.js';
|
|
4
4
|
import '../../hooks/useBg.esm.js';
|
|
5
5
|
import '../../hooks/useDefinition/helpers.esm.js';
|
|
6
|
+
import '../../analytics/useAnalytics.esm.js';
|
|
6
7
|
import { defineComponent } from '../../hooks/useDefinition/defineComponent.esm.js';
|
|
7
8
|
import styles from './Accordion.module.css.esm.js';
|
|
8
9
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definition.esm.js","sources":["../../../src/components/Accordion/definition.ts"],"sourcesContent":["/*\n * Copyright 2024 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 { defineComponent } from '../../hooks/useDefinition';\nimport type {\n AccordionOwnProps,\n AccordionTriggerOwnProps,\n AccordionPanelOwnProps,\n AccordionGroupOwnProps,\n} from './types';\nimport styles from './Accordion.module.css';\n\n/**\n * Component definition for Accordion\n * @public\n */\nexport const AccordionDefinition = defineComponent<AccordionOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Accordion',\n },\n bg: 'provider',\n propDefs: {\n bg: { dataAttribute: true, default: 'neutral' },\n children: {},\n className: {},\n },\n});\n\n/**\n * Component definition for AccordionTrigger\n * @public\n */\nexport const AccordionTriggerDefinition =\n defineComponent<AccordionTriggerOwnProps>()({\n styles,\n classNames: {\n root: 'bui-AccordionTrigger',\n button: 'bui-AccordionTriggerButton',\n title: 'bui-AccordionTriggerTitle',\n subtitle: 'bui-AccordionTriggerSubtitle',\n icon: 'bui-AccordionTriggerIcon',\n },\n propDefs: {\n className: {},\n title: {},\n subtitle: {},\n children: {},\n },\n });\n\n/**\n * Component definition for AccordionPanel\n * @public\n */\nexport const AccordionPanelDefinition =\n defineComponent<AccordionPanelOwnProps>()({\n styles,\n classNames: {\n root: 'bui-AccordionPanel',\n },\n propDefs: {\n className: {},\n },\n });\n\n/**\n * Component definition for AccordionGroup\n * @public\n */\nexport const AccordionGroupDefinition =\n defineComponent<AccordionGroupOwnProps>()({\n styles,\n classNames: {\n root: 'bui-AccordionGroup',\n },\n propDefs: {\n className: {},\n allowsMultiple: { default: false },\n },\n });\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"definition.esm.js","sources":["../../../src/components/Accordion/definition.ts"],"sourcesContent":["/*\n * Copyright 2024 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 { defineComponent } from '../../hooks/useDefinition';\nimport type {\n AccordionOwnProps,\n AccordionTriggerOwnProps,\n AccordionPanelOwnProps,\n AccordionGroupOwnProps,\n} from './types';\nimport styles from './Accordion.module.css';\n\n/**\n * Component definition for Accordion\n * @public\n */\nexport const AccordionDefinition = defineComponent<AccordionOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Accordion',\n },\n bg: 'provider',\n propDefs: {\n bg: { dataAttribute: true, default: 'neutral' },\n children: {},\n className: {},\n },\n});\n\n/**\n * Component definition for AccordionTrigger\n * @public\n */\nexport const AccordionTriggerDefinition =\n defineComponent<AccordionTriggerOwnProps>()({\n styles,\n classNames: {\n root: 'bui-AccordionTrigger',\n button: 'bui-AccordionTriggerButton',\n title: 'bui-AccordionTriggerTitle',\n subtitle: 'bui-AccordionTriggerSubtitle',\n icon: 'bui-AccordionTriggerIcon',\n },\n propDefs: {\n className: {},\n title: {},\n subtitle: {},\n children: {},\n },\n });\n\n/**\n * Component definition for AccordionPanel\n * @public\n */\nexport const AccordionPanelDefinition =\n defineComponent<AccordionPanelOwnProps>()({\n styles,\n classNames: {\n root: 'bui-AccordionPanel',\n },\n propDefs: {\n className: {},\n },\n });\n\n/**\n * Component definition for AccordionGroup\n * @public\n */\nexport const AccordionGroupDefinition =\n defineComponent<AccordionGroupOwnProps>()({\n styles,\n classNames: {\n root: 'bui-AccordionGroup',\n },\n propDefs: {\n className: {},\n allowsMultiple: { default: false },\n },\n });\n"],"names":[],"mappings":";;;;;;;;;AA6BO,MAAM,mBAAA,GAAsB,iBAAmC,CAAE;AAAA,EACtE,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,EAAA,EAAI,UAAA;AAAA,EACJ,QAAA,EAAU;AAAA,IACR,EAAA,EAAI,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,SAAA,EAAU;AAAA,IAC9C,UAAU,EAAC;AAAA,IACX,WAAW;AAAC;AAEhB,CAAC;AAMM,MAAM,0BAAA,GACX,iBAA0C,CAAE;AAAA,EAC1C,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,sBAAA;AAAA,IACN,MAAA,EAAQ,4BAAA;AAAA,IACR,KAAA,EAAO,2BAAA;AAAA,IACP,QAAA,EAAU,8BAAA;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,QAAA,EAAU;AAAA,IACR,WAAW,EAAC;AAAA,IACZ,OAAO,EAAC;AAAA,IACR,UAAU,EAAC;AAAA,IACX,UAAU;AAAC;AAEf,CAAC;AAMI,MAAM,wBAAA,GACX,iBAAwC,CAAE;AAAA,EACxC,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,QAAA,EAAU;AAAA,IACR,WAAW;AAAC;AAEhB,CAAC;AAMI,MAAM,wBAAA,GACX,iBAAwC,CAAE;AAAA,EACxC,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,QAAA,EAAU;AAAA,IACR,WAAW,EAAC;AAAA,IACZ,cAAA,EAAgB,EAAE,OAAA,EAAS,KAAA;AAAM;AAErC,CAAC;;;;"}
|
|
@@ -3,6 +3,7 @@ import 'clsx';
|
|
|
3
3
|
import '../../hooks/useBreakpoint.esm.js';
|
|
4
4
|
import '../../hooks/useBg.esm.js';
|
|
5
5
|
import '../../hooks/useDefinition/helpers.esm.js';
|
|
6
|
+
import '../../analytics/useAnalytics.esm.js';
|
|
6
7
|
import { defineComponent } from '../../hooks/useDefinition/defineComponent.esm.js';
|
|
7
8
|
import styles from './Alert.module.css.esm.js';
|
|
8
9
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definition.esm.js","sources":["../../../src/components/Alert/definition.ts"],"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 { defineComponent } from '../../hooks/useDefinition';\nimport type { AlertOwnProps } from './types';\nimport styles from './Alert.module.css';\n\n/**\n * Component definition for Alert\n * @public\n */\nexport const AlertDefinition = defineComponent<AlertOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Alert',\n contentWrapper: 'bui-AlertContentWrapper',\n content: 'bui-AlertContent',\n title: 'bui-AlertTitle',\n description: 'bui-AlertDescription',\n icon: 'bui-AlertIcon',\n spinner: 'bui-AlertSpinner',\n actions: 'bui-AlertActions',\n },\n propDefs: {\n status: { dataAttribute: true, default: 'info' },\n loading: { dataAttribute: true },\n icon: {},\n customActions: {},\n title: {},\n description: {},\n className: {},\n style: {},\n },\n utilityProps: ['m', 'mb', 'ml', 'mr', 'mt', 'mx', 'my'],\n});\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"definition.esm.js","sources":["../../../src/components/Alert/definition.ts"],"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 { defineComponent } from '../../hooks/useDefinition';\nimport type { AlertOwnProps } from './types';\nimport styles from './Alert.module.css';\n\n/**\n * Component definition for Alert\n * @public\n */\nexport const AlertDefinition = defineComponent<AlertOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Alert',\n contentWrapper: 'bui-AlertContentWrapper',\n content: 'bui-AlertContent',\n title: 'bui-AlertTitle',\n description: 'bui-AlertDescription',\n icon: 'bui-AlertIcon',\n spinner: 'bui-AlertSpinner',\n actions: 'bui-AlertActions',\n },\n propDefs: {\n status: { dataAttribute: true, default: 'info' },\n loading: { dataAttribute: true },\n icon: {},\n customActions: {},\n title: {},\n description: {},\n className: {},\n style: {},\n },\n utilityProps: ['m', 'mb', 'ml', 'mr', 'mt', 'mx', 'my'],\n});\n"],"names":[],"mappings":";;;;;;;;;AAwBO,MAAM,eAAA,GAAkB,iBAA+B,CAAE;AAAA,EAC9D,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,WAAA;AAAA,IACN,cAAA,EAAgB,yBAAA;AAAA,IAChB,OAAA,EAAS,kBAAA;AAAA,IACT,KAAA,EAAO,gBAAA;AAAA,IACP,WAAA,EAAa,sBAAA;AAAA,IACb,IAAA,EAAM,eAAA;AAAA,IACN,OAAA,EAAS,kBAAA;AAAA,IACT,OAAA,EAAS;AAAA,GACX;AAAA,EACA,QAAA,EAAU;AAAA,IACR,MAAA,EAAQ,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,MAAA,EAAO;AAAA,IAC/C,OAAA,EAAS,EAAE,aAAA,EAAe,IAAA,EAAK;AAAA,IAC/B,MAAM,EAAC;AAAA,IACP,eAAe,EAAC;AAAA,IAChB,OAAO,EAAC;AAAA,IACR,aAAa,EAAC;AAAA,IACd,WAAW,EAAC;AAAA,IACZ,OAAO;AAAC,GACV;AAAA,EACA,YAAA,EAAc,CAAC,GAAA,EAAK,IAAA,EAAM,MAAM,IAAA,EAAM,IAAA,EAAM,MAAM,IAAI;AACxD,CAAC;;;;"}
|
|
@@ -3,6 +3,7 @@ import 'clsx';
|
|
|
3
3
|
import '../../hooks/useBreakpoint.esm.js';
|
|
4
4
|
import '../../hooks/useBg.esm.js';
|
|
5
5
|
import '../../hooks/useDefinition/helpers.esm.js';
|
|
6
|
+
import '../../analytics/useAnalytics.esm.js';
|
|
6
7
|
import { defineComponent } from '../../hooks/useDefinition/defineComponent.esm.js';
|
|
7
8
|
import styles from './Avatar.module.css.esm.js';
|
|
8
9
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definition.esm.js","sources":["../../../src/components/Avatar/definition.ts"],"sourcesContent":["/*\n * Copyright 2024 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 { defineComponent } from '../../hooks/useDefinition';\nimport type { AvatarOwnProps } from './types';\nimport styles from './Avatar.module.css';\n\n/**\n * Component definition for Avatar\n * @public\n */\nexport const AvatarDefinition = defineComponent<AvatarOwnProps>()({\n styles,\n classNames: {\n root: 'bui-AvatarRoot',\n image: 'bui-AvatarImage',\n fallback: 'bui-AvatarFallback',\n },\n propDefs: {\n size: { dataAttribute: true, default: 'medium' },\n purpose: { default: 'informative' },\n src: {},\n name: {},\n className: {},\n },\n});\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"definition.esm.js","sources":["../../../src/components/Avatar/definition.ts"],"sourcesContent":["/*\n * Copyright 2024 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 { defineComponent } from '../../hooks/useDefinition';\nimport type { AvatarOwnProps } from './types';\nimport styles from './Avatar.module.css';\n\n/**\n * Component definition for Avatar\n * @public\n */\nexport const AvatarDefinition = defineComponent<AvatarOwnProps>()({\n styles,\n classNames: {\n root: 'bui-AvatarRoot',\n image: 'bui-AvatarImage',\n fallback: 'bui-AvatarFallback',\n },\n propDefs: {\n size: { dataAttribute: true, default: 'medium' },\n purpose: { default: 'informative' },\n src: {},\n name: {},\n className: {},\n },\n});\n"],"names":[],"mappings":";;;;;;;;;AAwBO,MAAM,gBAAA,GAAmB,iBAAgC,CAAE;AAAA,EAChE,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,gBAAA;AAAA,IACN,KAAA,EAAO,iBAAA;AAAA,IACP,QAAA,EAAU;AAAA,GACZ;AAAA,EACA,QAAA,EAAU;AAAA,IACR,IAAA,EAAM,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,QAAA,EAAS;AAAA,IAC/C,OAAA,EAAS,EAAE,OAAA,EAAS,aAAA,EAAc;AAAA,IAClC,KAAK,EAAC;AAAA,IACN,MAAM,EAAC;AAAA,IACP,WAAW;AAAC;AAEhB,CAAC;;;;"}
|
|
@@ -3,6 +3,7 @@ import 'clsx';
|
|
|
3
3
|
import '../../hooks/useBreakpoint.esm.js';
|
|
4
4
|
import '../../hooks/useBg.esm.js';
|
|
5
5
|
import '../../hooks/useDefinition/helpers.esm.js';
|
|
6
|
+
import '../../analytics/useAnalytics.esm.js';
|
|
6
7
|
import { defineComponent } from '../../hooks/useDefinition/defineComponent.esm.js';
|
|
7
8
|
import styles from './Box.module.css.esm.js';
|
|
8
9
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definition.esm.js","sources":["../../../src/components/Box/definition.ts"],"sourcesContent":["/*\n * Copyright 2024 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 { defineComponent } from '../../hooks/useDefinition';\nimport type { BoxOwnProps } from './types';\nimport styles from './Box.module.css';\n\n/**\n * Component definition for Box\n * @public\n */\nexport const BoxDefinition = defineComponent<BoxOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Box',\n },\n bg: 'provider',\n propDefs: {\n as: { default: 'div' },\n bg: { dataAttribute: true },\n children: {},\n className: {},\n style: {},\n },\n utilityProps: [\n 'm',\n 'mb',\n 'ml',\n 'mr',\n 'mt',\n 'mx',\n 'my',\n 'p',\n 'pb',\n 'pl',\n 'pr',\n 'pt',\n 'px',\n 'py',\n 'position',\n 'display',\n 'width',\n 'minWidth',\n 'maxWidth',\n 'height',\n 'minHeight',\n 'maxHeight',\n ],\n});\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"definition.esm.js","sources":["../../../src/components/Box/definition.ts"],"sourcesContent":["/*\n * Copyright 2024 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 { defineComponent } from '../../hooks/useDefinition';\nimport type { BoxOwnProps } from './types';\nimport styles from './Box.module.css';\n\n/**\n * Component definition for Box\n * @public\n */\nexport const BoxDefinition = defineComponent<BoxOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Box',\n },\n bg: 'provider',\n propDefs: {\n as: { default: 'div' },\n bg: { dataAttribute: true },\n children: {},\n className: {},\n style: {},\n },\n utilityProps: [\n 'm',\n 'mb',\n 'ml',\n 'mr',\n 'mt',\n 'mx',\n 'my',\n 'p',\n 'pb',\n 'pl',\n 'pr',\n 'pt',\n 'px',\n 'py',\n 'position',\n 'display',\n 'width',\n 'minWidth',\n 'maxWidth',\n 'height',\n 'minHeight',\n 'maxHeight',\n ],\n});\n"],"names":[],"mappings":";;;;;;;;;AAwBO,MAAM,aAAA,GAAgB,iBAA6B,CAAE;AAAA,EAC1D,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,EAAA,EAAI,UAAA;AAAA,EACJ,QAAA,EAAU;AAAA,IACR,EAAA,EAAI,EAAE,OAAA,EAAS,KAAA,EAAM;AAAA,IACrB,EAAA,EAAI,EAAE,aAAA,EAAe,IAAA,EAAK;AAAA,IAC1B,UAAU,EAAC;AAAA,IACX,WAAW,EAAC;AAAA,IACZ,OAAO;AAAC,GACV;AAAA,EACA,YAAA,EAAc;AAAA,IACZ,GAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,GAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,UAAA;AAAA,IACA,SAAA;AAAA,IACA,OAAA;AAAA,IACA,UAAA;AAAA,IACA,UAAA;AAAA,IACA,QAAA;AAAA,IACA,WAAA;AAAA,IACA;AAAA;AAEJ,CAAC;;;;"}
|
|
@@ -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 2024 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 .Button_bui-
|
|
4
|
-
var styles = {"bui-Button":"Button_bui-
|
|
3
|
+
var css_248z = "/*\n * Copyright 2024 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 .Button_bui-Button__310e62cdd3 {\n --loading-duration: 200ms;\n --bg: transparent;\n --bg-hover: transparent;\n --bg-active: transparent;\n --fg: inherit;\n\n position: relative;\n display: inline-flex;\n border: none;\n user-select: none;\n font-family: var(--bui-font-regular);\n font-weight: var(--bui-font-weight-bold);\n padding: 0;\n cursor: pointer;\n border-radius: var(--bui-radius-2);\n flex-shrink: 0;\n transition: background-color var(--loading-duration) ease-out,\n box-shadow var(--loading-duration) ease-out;\n\n /* Apply variables */\n color: var(--fg);\n background-color: var(--bg);\n\n &:hover {\n background-color: var(--bg-hover);\n transition: background-color 150ms ease;\n }\n\n &:active {\n background-color: var(--bg-active);\n }\n\n &[data-disabled='true'] {\n cursor: not-allowed;\n }\n\n &[data-loading='true'] {\n cursor: wait;\n }\n }\n\n .Button_bui-Button__310e62cdd3[data-variant='primary'] {\n --bg: var(--bui-bg-solid);\n --bg-hover: var(--bui-bg-solid-hover);\n --bg-active: var(--bui-bg-solid-pressed);\n --fg: var(--bui-fg-solid);\n\n &[data-disabled='true'],\n &[data-loading='true'] {\n --bg: var(--bui-bg-solid-disabled);\n --bg-hover: var(--bui-bg-solid-disabled);\n --bg-active: var(--bui-bg-solid-disabled);\n --fg: var(--bui-fg-solid-disabled);\n }\n\n &[data-focus-visible] {\n outline: 2px solid var(--bui-ring);\n outline-offset: 2px;\n }\n }\n\n .Button_bui-Button__310e62cdd3[data-variant='primary'][data-destructive='true'] {\n /* Custom properties matching future token names (without bui- prefix) */\n --bg-solid-danger: #dc2626;\n --bg-solid-danger-hover: #b91c1c;\n --bg-solid-danger-pressed: #991b1b;\n --bg-solid-danger-disabled: #fca5a5;\n --fg-solid-danger: var(--bui-white);\n\n [data-theme-mode='dark'] & {\n --bg-solid-danger: #ef4444;\n --bg-solid-danger-hover: #dc2626;\n --bg-solid-danger-pressed: #b91c1c;\n --bg-solid-danger-disabled: #7f1d1d;\n }\n\n --bg: var(--bg-solid-danger);\n --bg-hover: var(--bg-solid-danger-hover);\n --bg-active: var(--bg-solid-danger-pressed);\n --fg: var(--fg-solid-danger);\n\n &[data-disabled='true'],\n &[data-loading='true'] {\n --bg: var(--bg-solid-danger-disabled);\n --bg-hover: var(--bg-solid-danger-disabled);\n --bg-active: var(--bg-solid-danger-disabled);\n }\n\n &[data-focus-visible] {\n outline: 2px solid var(--bui-border-danger);\n outline-offset: 2px;\n }\n }\n\n .Button_bui-Button__310e62cdd3[data-variant='secondary'] {\n --bg: var(--bui-bg-neutral-1);\n --bg-hover: var(--bui-bg-neutral-1-hover);\n --bg-active: var(--bui-bg-neutral-1-pressed);\n --fg: var(--bui-fg-primary);\n\n &[data-on-bg='neutral-1'] {\n --bg: var(--bui-bg-neutral-2);\n --bg-hover: var(--bui-bg-neutral-2-hover);\n --bg-active: var(--bui-bg-neutral-2-pressed);\n }\n\n &[data-on-bg='neutral-2'] {\n --bg: var(--bui-bg-neutral-3);\n --bg-hover: var(--bui-bg-neutral-3-hover);\n --bg-active: var(--bui-bg-neutral-3-pressed);\n }\n\n &[data-on-bg='neutral-3'] {\n --bg: var(--bui-bg-neutral-4);\n --bg-hover: var(--bui-bg-neutral-4-hover);\n --bg-active: var(--bui-bg-neutral-4-pressed);\n }\n\n &[data-disabled='true'],\n &[data-loading='true'] {\n --bg-hover: var(--bg);\n --bg-active: var(--bg);\n --fg: var(--bui-fg-disabled);\n }\n\n &[data-focus-visible] {\n outline: none;\n transition: none;\n box-shadow: inset 0 0 0 2px var(--bui-ring);\n }\n }\n\n .Button_bui-Button__310e62cdd3[data-variant='secondary'][data-destructive='true'] {\n /* Custom properties for hover/active states (no tokens exist yet) */\n --bg-danger-hover: #fecaca;\n --bg-danger-pressed: #fca5a5;\n\n [data-theme-mode='dark'] & {\n --bg-danger-hover: #450a0a;\n --bg-danger-pressed: #7f1d1d;\n }\n\n --bg: var(--bui-bg-danger);\n --bg-hover: var(--bg-danger-hover);\n --bg-active: var(--bg-danger-pressed);\n --fg: var(--bui-fg-danger);\n\n &[data-disabled='true'],\n &[data-loading='true'] {\n --bg-hover: var(--bg);\n --bg-active: var(--bg);\n --fg: var(--bui-fg-disabled);\n }\n\n &[data-focus-visible] {\n box-shadow: inset 0 0 0 2px var(--bui-border-danger);\n }\n }\n\n .Button_bui-Button__310e62cdd3[data-variant='tertiary'] {\n --bg-hover: var(--bui-bg-neutral-1-hover);\n --bg-active: var(--bui-bg-neutral-1-pressed);\n --fg: var(--bui-fg-primary);\n\n &[data-on-bg='neutral-1'] {\n --bg-hover: var(--bui-bg-neutral-2-hover);\n --bg-active: var(--bui-bg-neutral-2-pressed);\n }\n\n &[data-on-bg='neutral-2'] {\n --bg-hover: var(--bui-bg-neutral-3-hover);\n --bg-active: var(--bui-bg-neutral-3-pressed);\n }\n\n &[data-on-bg='neutral-3'] {\n --bg-hover: var(--bui-bg-neutral-4-hover);\n --bg-active: var(--bui-bg-neutral-4-pressed);\n }\n\n &[data-disabled='true'],\n &[data-loading='true'] {\n --bg-hover: var(--bg);\n --bg-active: var(--bg);\n --fg: var(--bui-fg-disabled);\n }\n\n &[data-focus-visible] {\n outline: none;\n transition: none;\n box-shadow: inset 0 0 0 2px var(--bui-ring);\n }\n }\n\n .Button_bui-Button__310e62cdd3[data-variant='tertiary'][data-destructive='true'] {\n /* Custom properties for hover/active states (no tokens exist yet) */\n --bg-danger-hover: #fecaca;\n --bg-danger-pressed: #fca5a5;\n\n [data-theme-mode='dark'] & {\n --bg-danger-hover: #450a0a;\n --bg-danger-pressed: #7f1d1d;\n }\n\n --bg-hover: var(--bui-bg-danger);\n --bg-active: var(--bg-danger-pressed);\n --fg: var(--bui-fg-danger);\n\n &[data-disabled='true'],\n &[data-loading='true'] {\n --bg-hover: var(--bg);\n --bg-active: var(--bg);\n --fg: var(--bui-fg-disabled);\n }\n\n &[data-focus-visible] {\n box-shadow: inset 0 0 0 2px var(--bui-border-danger);\n }\n }\n\n .Button_bui-Button__310e62cdd3[data-size='small'] {\n font-size: var(--bui-font-size-3);\n padding: 0 var(--bui-space-2);\n height: 2rem;\n\n svg {\n width: 1rem;\n height: 1rem;\n }\n }\n\n .Button_bui-Button__310e62cdd3[data-size='medium'] {\n font-size: var(--bui-font-size-4);\n padding: 0 var(--bui-space-3);\n height: 2.5rem;\n\n svg {\n width: 1.25rem;\n height: 1.25rem;\n }\n }\n\n .Button_bui-ButtonContent__310e62cdd3 {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: var(--bui-space-1_5);\n height: 100%;\n width: 100%;\n transition: opacity var(--loading-duration) ease-out;\n\n .Button_bui-Button__310e62cdd3[data-loading='true'] & {\n opacity: 0;\n }\n }\n\n .Button_bui-ButtonSpinner__310e62cdd3 {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n display: flex;\n opacity: 0;\n transition: opacity var(--loading-duration) ease-in;\n\n .Button_bui-Button__310e62cdd3[data-loading='true'] & {\n opacity: 1;\n }\n\n & svg {\n animation: Button_bui-spin__310e62cdd3 1s linear infinite;\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n .Button_bui-Button__310e62cdd3 {\n transition-duration: 50ms;\n }\n\n .Button_bui-ButtonContent__310e62cdd3 {\n transition-duration: 50ms;\n }\n\n .Button_bui-ButtonSpinner__310e62cdd3 {\n transition-duration: 50ms;\n }\n\n .Button_bui-ButtonSpinner__310e62cdd3 svg {\n animation: none;\n }\n }\n\n @keyframes Button_bui-spin__310e62cdd3 {\n from {\n transform: rotate(0deg);\n }\n\n to {\n transform: rotate(360deg);\n }\n }\n}\n";
|
|
4
|
+
var styles = {"bui-Button":"Button_bui-Button__310e62cdd3","bui-ButtonContent":"Button_bui-ButtonContent__310e62cdd3","bui-ButtonSpinner":"Button_bui-ButtonSpinner__310e62cdd3","bui-spin":"Button_bui-spin__310e62cdd3"};
|
|
5
5
|
styleInject(css_248z);
|
|
6
6
|
|
|
7
7
|
export { styles as default };
|
|
@@ -3,6 +3,7 @@ import 'clsx';
|
|
|
3
3
|
import '../../hooks/useBreakpoint.esm.js';
|
|
4
4
|
import '../../hooks/useBg.esm.js';
|
|
5
5
|
import '../../hooks/useDefinition/helpers.esm.js';
|
|
6
|
+
import '../../analytics/useAnalytics.esm.js';
|
|
6
7
|
import { defineComponent } from '../../hooks/useDefinition/defineComponent.esm.js';
|
|
7
8
|
import styles from './Button.module.css.esm.js';
|
|
8
9
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definition.esm.js","sources":["../../../src/components/Button/definition.ts"],"sourcesContent":["/*\n * Copyright 2024 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 { defineComponent } from '../../hooks/useDefinition';\nimport type { ButtonOwnProps } from './types';\nimport styles from './Button.module.css';\n\n/**\n * Component definition for Button\n * @public\n */\nexport const ButtonDefinition = defineComponent<ButtonOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Button',\n content: 'bui-ButtonContent',\n spinner: 'bui-ButtonSpinner',\n },\n bg: 'consumer',\n propDefs: {\n size: { dataAttribute: true, default: 'small' },\n variant: { dataAttribute: true, default: 'primary' },\n destructive: { dataAttribute: true },\n loading: { dataAttribute: true },\n iconStart: {},\n iconEnd: {},\n children: {},\n className: {},\n },\n});\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"definition.esm.js","sources":["../../../src/components/Button/definition.ts"],"sourcesContent":["/*\n * Copyright 2024 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 { defineComponent } from '../../hooks/useDefinition';\nimport type { ButtonOwnProps } from './types';\nimport styles from './Button.module.css';\n\n/**\n * Component definition for Button\n * @public\n */\nexport const ButtonDefinition = defineComponent<ButtonOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Button',\n content: 'bui-ButtonContent',\n spinner: 'bui-ButtonSpinner',\n },\n bg: 'consumer',\n propDefs: {\n size: { dataAttribute: true, default: 'small' },\n variant: { dataAttribute: true, default: 'primary' },\n destructive: { dataAttribute: true },\n loading: { dataAttribute: true },\n iconStart: {},\n iconEnd: {},\n children: {},\n className: {},\n },\n});\n"],"names":[],"mappings":";;;;;;;;;AAwBO,MAAM,gBAAA,GAAmB,iBAAgC,CAAE;AAAA,EAChE,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,YAAA;AAAA,IACN,OAAA,EAAS,mBAAA;AAAA,IACT,OAAA,EAAS;AAAA,GACX;AAAA,EACA,EAAA,EAAI,UAAA;AAAA,EACJ,QAAA,EAAU;AAAA,IACR,IAAA,EAAM,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,OAAA,EAAQ;AAAA,IAC9C,OAAA,EAAS,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,SAAA,EAAU;AAAA,IACnD,WAAA,EAAa,EAAE,aAAA,EAAe,IAAA,EAAK;AAAA,IACnC,OAAA,EAAS,EAAE,aAAA,EAAe,IAAA,EAAK;AAAA,IAC/B,WAAW,EAAC;AAAA,IACZ,SAAS,EAAC;AAAA,IACV,UAAU,EAAC;AAAA,IACX,WAAW;AAAC;AAEhB,CAAC;;;;"}
|
|
@@ -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 2024 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 .ButtonIcon_bui-
|
|
4
|
-
var styles = {"bui-ButtonIcon":"ButtonIcon_bui-
|
|
3
|
+
var css_248z = "/*\n * Copyright 2024 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 .ButtonIcon_bui-ButtonIcon__8d8d9edbaf {\n --loading-duration: 200ms;\n --bg: transparent;\n --bg-hover: transparent;\n --bg-active: transparent;\n --fg: inherit;\n\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border: none;\n user-select: none;\n padding: 0;\n cursor: pointer;\n border-radius: var(--bui-radius-2);\n flex-shrink: 0;\n transition: background-color var(--loading-duration) ease-out,\n box-shadow var(--loading-duration) ease-out;\n\n /* Apply variables */\n color: var(--fg);\n background-color: var(--bg);\n\n &:hover {\n background-color: var(--bg-hover);\n transition: background-color 150ms ease;\n }\n\n &:active {\n background-color: var(--bg-active);\n }\n\n &[data-disabled='true'] {\n cursor: not-allowed;\n }\n\n &[data-loading='true'] {\n cursor: wait;\n }\n }\n\n .ButtonIcon_bui-ButtonIcon__8d8d9edbaf[data-variant='primary'] {\n --bg: var(--bui-bg-solid);\n --bg-hover: var(--bui-bg-solid-hover);\n --bg-active: var(--bui-bg-solid-pressed);\n --fg: var(--bui-fg-solid);\n\n &[data-disabled='true'],\n &[data-loading='true'] {\n --bg: var(--bui-bg-solid-disabled);\n --bg-hover: var(--bui-bg-solid-disabled);\n --bg-active: var(--bui-bg-solid-disabled);\n --fg: var(--bui-fg-solid-disabled);\n }\n\n &[data-focus-visible] {\n outline: 2px solid var(--bui-ring);\n outline-offset: 2px;\n }\n }\n\n .ButtonIcon_bui-ButtonIcon__8d8d9edbaf[data-variant='secondary'] {\n --bg: var(--bui-bg-neutral-1);\n --bg-hover: var(--bui-bg-neutral-1-hover);\n --bg-active: var(--bui-bg-neutral-1-pressed);\n --fg: var(--bui-fg-primary);\n\n &[data-on-bg='neutral-1'] {\n --bg: var(--bui-bg-neutral-2);\n --bg-hover: var(--bui-bg-neutral-2-hover);\n --bg-active: var(--bui-bg-neutral-2-pressed);\n }\n\n &[data-on-bg='neutral-2'] {\n --bg: var(--bui-bg-neutral-3);\n --bg-hover: var(--bui-bg-neutral-3-hover);\n --bg-active: var(--bui-bg-neutral-3-pressed);\n }\n\n &[data-on-bg='neutral-3'] {\n --bg: var(--bui-bg-neutral-4);\n --bg-hover: var(--bui-bg-neutral-4-hover);\n --bg-active: var(--bui-bg-neutral-4-pressed);\n }\n\n &[data-disabled='true'],\n &[data-loading='true'] {\n --bg-hover: var(--bg);\n --bg-active: var(--bg);\n --fg: var(--bui-fg-disabled);\n }\n\n &[data-focus-visible] {\n outline: none;\n transition: none;\n box-shadow: inset 0 0 0 2px var(--bui-ring);\n }\n }\n\n .ButtonIcon_bui-ButtonIcon__8d8d9edbaf[data-variant='tertiary'] {\n --bg-hover: var(--bui-bg-neutral-1-hover);\n --bg-active: var(--bui-bg-neutral-1-pressed);\n --fg: var(--bui-fg-primary);\n\n &[data-on-bg='neutral-1'] {\n --bg-hover: var(--bui-bg-neutral-2-hover);\n --bg-active: var(--bui-bg-neutral-2-pressed);\n }\n\n &[data-on-bg='neutral-2'] {\n --bg-hover: var(--bui-bg-neutral-3-hover);\n --bg-active: var(--bui-bg-neutral-3-pressed);\n }\n\n &[data-on-bg='neutral-3'] {\n --bg-hover: var(--bui-bg-neutral-4-hover);\n --bg-active: var(--bui-bg-neutral-4-pressed);\n }\n\n &[data-disabled='true'],\n &[data-loading='true'] {\n --bg-hover: var(--bg);\n --bg-active: var(--bg);\n --fg: var(--bui-fg-disabled);\n }\n\n &[data-focus-visible] {\n outline: none;\n transition: none;\n box-shadow: inset 0 0 0 2px var(--bui-ring);\n }\n }\n\n .ButtonIcon_bui-ButtonIcon__8d8d9edbaf[data-size='small'] {\n width: 2rem;\n height: 2rem;\n\n svg {\n width: 1rem;\n height: 1rem;\n }\n }\n\n .ButtonIcon_bui-ButtonIcon__8d8d9edbaf[data-size='medium'] {\n width: 2.5rem;\n height: 2.5rem;\n\n svg {\n width: 1.25rem;\n height: 1.25rem;\n }\n }\n\n .ButtonIcon_bui-ButtonIconContent__8d8d9edbaf {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 100%;\n transition: opacity var(--loading-duration) ease-out;\n\n .ButtonIcon_bui-ButtonIcon__8d8d9edbaf[data-loading='true'] & {\n opacity: 0;\n }\n }\n\n .ButtonIcon_bui-ButtonIconSpinner__8d8d9edbaf {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n display: flex;\n opacity: 0;\n transition: opacity var(--loading-duration) ease-in;\n\n .ButtonIcon_bui-ButtonIcon__8d8d9edbaf[data-loading='true'] & {\n opacity: 1;\n }\n\n & svg {\n animation: ButtonIcon_bui-spin__8d8d9edbaf 1s linear infinite;\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n .ButtonIcon_bui-ButtonIcon__8d8d9edbaf {\n transition-duration: 50ms;\n }\n\n .ButtonIcon_bui-ButtonIconContent__8d8d9edbaf {\n transition-duration: 50ms;\n }\n\n .ButtonIcon_bui-ButtonIconSpinner__8d8d9edbaf {\n transition-duration: 50ms;\n }\n\n .ButtonIcon_bui-ButtonIconSpinner__8d8d9edbaf svg {\n animation: none;\n }\n }\n}\n";
|
|
4
|
+
var styles = {"bui-ButtonIcon":"ButtonIcon_bui-ButtonIcon__8d8d9edbaf","bui-ButtonIconContent":"ButtonIcon_bui-ButtonIconContent__8d8d9edbaf","bui-ButtonIconSpinner":"ButtonIcon_bui-ButtonIconSpinner__8d8d9edbaf","bui-spin":"ButtonIcon_bui-spin__8d8d9edbaf"};
|
|
5
5
|
styleInject(css_248z);
|
|
6
6
|
|
|
7
7
|
export { styles as default };
|
|
@@ -3,6 +3,7 @@ import 'clsx';
|
|
|
3
3
|
import '../../hooks/useBreakpoint.esm.js';
|
|
4
4
|
import '../../hooks/useBg.esm.js';
|
|
5
5
|
import '../../hooks/useDefinition/helpers.esm.js';
|
|
6
|
+
import '../../analytics/useAnalytics.esm.js';
|
|
6
7
|
import { defineComponent } from '../../hooks/useDefinition/defineComponent.esm.js';
|
|
7
8
|
import styles from './ButtonIcon.module.css.esm.js';
|
|
8
9
|
|