@backstage/ui 0.11.0-next.0 → 0.11.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 (111) hide show
  1. package/CHANGELOG.md +163 -0
  2. package/css/styles.css +38 -12
  3. package/dist/components/Accordion/Accordion.module.css.esm.js +2 -2
  4. package/dist/components/Avatar/Avatar.module.css.esm.js +2 -2
  5. package/dist/components/Box/Box.esm.js +13 -6
  6. package/dist/components/Box/Box.esm.js.map +1 -1
  7. package/dist/components/Box/Box.module.css.esm.js +2 -2
  8. package/dist/components/Box/definition.esm.js +4 -1
  9. package/dist/components/Box/definition.esm.js.map +1 -1
  10. package/dist/components/Button/Button.esm.js +12 -1
  11. package/dist/components/Button/Button.esm.js.map +1 -1
  12. package/dist/components/Button/Button.module.css.esm.js +2 -2
  13. package/dist/components/ButtonIcon/ButtonIcon.module.css.esm.js +2 -2
  14. package/dist/components/Card/Card.module.css.esm.js +2 -2
  15. package/dist/components/Checkbox/Checkbox.esm.js +10 -7
  16. package/dist/components/Checkbox/Checkbox.esm.js.map +1 -1
  17. package/dist/components/Checkbox/Checkbox.module.css.esm.js +2 -2
  18. package/dist/components/Checkbox/definition.esm.js +2 -1
  19. package/dist/components/Checkbox/definition.esm.js.map +1 -1
  20. package/dist/components/Container/Container.module.css.esm.js +2 -2
  21. package/dist/components/Dialog/Dialog.module.css.esm.js +2 -2
  22. package/dist/components/FieldError/FieldError.module.css.esm.js +2 -2
  23. package/dist/components/FieldLabel/FieldLabel.module.css.esm.js +2 -2
  24. package/dist/components/Flex/Flex.esm.js +14 -6
  25. package/dist/components/Flex/Flex.esm.js.map +1 -1
  26. package/dist/components/Flex/Flex.module.css.esm.js +2 -2
  27. package/dist/components/Flex/definition.esm.js +4 -1
  28. package/dist/components/Flex/definition.esm.js.map +1 -1
  29. package/dist/components/Grid/Grid.esm.js +27 -12
  30. package/dist/components/Grid/Grid.esm.js.map +1 -1
  31. package/dist/components/Grid/Grid.module.css.esm.js +2 -2
  32. package/dist/components/Grid/definition.esm.js +8 -2
  33. package/dist/components/Grid/definition.esm.js.map +1 -1
  34. package/dist/components/Header/Header.module.css.esm.js +2 -2
  35. package/dist/components/HeaderPage/HeaderPage.module.css.esm.js +2 -2
  36. package/dist/components/Link/Link.esm.js +9 -6
  37. package/dist/components/Link/Link.esm.js.map +1 -1
  38. package/dist/components/Link/Link.module.css.esm.js +2 -2
  39. package/dist/components/Menu/Menu.esm.js +3 -26
  40. package/dist/components/Menu/Menu.esm.js.map +1 -1
  41. package/dist/components/Menu/Menu.module.css.esm.js +2 -2
  42. package/dist/components/Popover/Popover.esm.js +45 -0
  43. package/dist/components/Popover/Popover.esm.js.map +1 -0
  44. package/dist/components/Popover/Popover.module.css.esm.js +3 -3
  45. package/dist/components/Popover/definition.esm.js +3 -1
  46. package/dist/components/Popover/definition.esm.js.map +1 -1
  47. package/dist/components/RadioGroup/RadioGroup.module.css.esm.js +2 -2
  48. package/dist/components/SearchField/SearchField.module.css.esm.js +2 -2
  49. package/dist/components/Select/Select.esm.js +5 -5
  50. package/dist/components/Select/Select.esm.js.map +1 -1
  51. package/dist/components/Select/Select.module.css.esm.js +2 -2
  52. package/dist/components/Select/SelectContent.esm.js +1 -0
  53. package/dist/components/Select/SelectContent.esm.js.map +1 -1
  54. package/dist/components/Skeleton/Skeleton.module.css.esm.js +2 -2
  55. package/dist/components/Switch/Switch.module.css.esm.js +2 -2
  56. package/dist/components/Table/Table.module.css.esm.js +2 -2
  57. package/dist/components/Table/components/Column.esm.js +3 -3
  58. package/dist/components/Table/components/Column.esm.js.map +1 -1
  59. package/dist/components/Table/components/Row.esm.js +1 -0
  60. package/dist/components/Table/components/Row.esm.js.map +1 -1
  61. package/dist/components/Table/components/Table.esm.js +162 -15
  62. package/dist/components/Table/components/Table.esm.js.map +1 -1
  63. package/dist/components/Table/components/TableRoot.esm.js +26 -0
  64. package/dist/components/Table/components/TableRoot.esm.js.map +1 -0
  65. package/dist/components/Table/definition.esm.js +3 -0
  66. package/dist/components/Table/definition.esm.js.map +1 -1
  67. package/dist/components/Table/hooks/getEffectivePageSize.esm.js +25 -0
  68. package/dist/components/Table/hooks/getEffectivePageSize.esm.js.map +1 -0
  69. package/dist/components/Table/hooks/useCompletePagination.esm.js +108 -0
  70. package/dist/components/Table/hooks/useCompletePagination.esm.js.map +1 -0
  71. package/dist/components/Table/hooks/useCursorPagination.esm.js +59 -0
  72. package/dist/components/Table/hooks/useCursorPagination.esm.js.map +1 -0
  73. package/dist/components/Table/hooks/useDebouncedReload.esm.js +17 -0
  74. package/dist/components/Table/hooks/useDebouncedReload.esm.js.map +1 -0
  75. package/dist/components/Table/hooks/useOffsetPagination.esm.js +66 -0
  76. package/dist/components/Table/hooks/useOffsetPagination.esm.js.map +1 -0
  77. package/dist/components/Table/hooks/usePageCache.esm.js +168 -0
  78. package/dist/components/Table/hooks/usePageCache.esm.js.map +1 -0
  79. package/dist/components/Table/hooks/useQueryState.esm.js +42 -0
  80. package/dist/components/Table/hooks/useQueryState.esm.js.map +1 -0
  81. package/dist/components/Table/hooks/useStableCallback.esm.js +10 -0
  82. package/dist/components/Table/hooks/useStableCallback.esm.js.map +1 -0
  83. package/dist/components/Table/hooks/useTable.esm.js +100 -98
  84. package/dist/components/Table/hooks/useTable.esm.js.map +1 -1
  85. package/dist/components/TablePagination/TablePagination.esm.js +114 -103
  86. package/dist/components/TablePagination/TablePagination.esm.js.map +1 -1
  87. package/dist/components/TablePagination/TablePagination.module.css.esm.js +2 -2
  88. package/dist/components/Tabs/Tabs.module.css.esm.js +2 -2
  89. package/dist/components/TagGroup/TagGroup.module.css.esm.js +2 -2
  90. package/dist/components/Text/Text.module.css.esm.js +2 -2
  91. package/dist/components/TextField/TextField.module.css.esm.js +2 -2
  92. package/dist/components/ToggleButton/ToggleButton.esm.js +51 -0
  93. package/dist/components/ToggleButton/ToggleButton.esm.js.map +1 -0
  94. package/dist/components/ToggleButton/ToggleButton.module.css.esm.js +8 -0
  95. package/dist/components/ToggleButton/ToggleButton.module.css.esm.js.map +1 -0
  96. package/dist/components/ToggleButton/definition.esm.js +12 -0
  97. package/dist/components/ToggleButton/definition.esm.js.map +1 -0
  98. package/dist/components/ToggleButtonGroup/ToggleButtonGroup.esm.js +33 -0
  99. package/dist/components/ToggleButtonGroup/ToggleButtonGroup.esm.js.map +1 -0
  100. package/dist/components/ToggleButtonGroup/ToggleButtonGroup.module.css.esm.js +8 -0
  101. package/dist/components/ToggleButtonGroup/ToggleButtonGroup.module.css.esm.js.map +1 -0
  102. package/dist/components/ToggleButtonGroup/definition.esm.js +11 -0
  103. package/dist/components/ToggleButtonGroup/definition.esm.js.map +1 -0
  104. package/dist/components/Tooltip/Tooltip.module.css.esm.js +2 -2
  105. package/dist/components/VisuallyHidden/VisuallyHidden.module.css.esm.js +2 -2
  106. package/dist/hooks/useSurface.esm.js +74 -0
  107. package/dist/hooks/useSurface.esm.js.map +1 -0
  108. package/dist/index.d.ts +391 -98
  109. package/dist/index.esm.js +7 -0
  110. package/dist/index.esm.js.map +1 -1
  111. package/package.json +5 -4
package/CHANGELOG.md CHANGED
@@ -1,5 +1,168 @@
1
1
  # @backstage/ui
2
2
 
3
+ ## 0.11.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 243e5e7: **BREAKING**: Redesigned Table component with new `useTable` hook API.
8
+
9
+ - The `Table` component (React Aria wrapper) is renamed to `TableRoot`
10
+ - New high-level `Table` component that handles data display, pagination, sorting, and selection
11
+ - The `useTable` hook is completely redesigned with a new API supporting three pagination modes (complete, offset, cursor)
12
+ - New types: `ColumnConfig`, `TableProps`, `TableItem`, `UseTableOptions`, `UseTableResult`
13
+
14
+ New features include unified pagination modes, debounced query changes, stale data preservation during reloads, and row selection with toggle/replace behaviors.
15
+
16
+ **Migration guide:**
17
+
18
+ 1. Update imports and use the new `useTable` hook:
19
+
20
+ ```diff
21
+ -import { Table, useTable } from '@backstage/ui';
22
+ -const { data, paginationProps } = useTable({ data: items, pagination: {...} });
23
+ +import { Table, useTable, type ColumnConfig } from '@backstage/ui';
24
+ +const { tableProps } = useTable({
25
+ + mode: 'complete',
26
+ + getData: () => items,
27
+ +});
28
+ ```
29
+
30
+ 2. Define columns and render with the new Table API:
31
+
32
+ ```diff
33
+ -<Table aria-label="My table">
34
+ - <TableHeader>...</TableHeader>
35
+ - <TableBody items={data}>...</TableBody>
36
+ -</Table>
37
+ -<TablePagination {...paginationProps} />
38
+ +const columns: ColumnConfig<Item>[] = [
39
+ + { id: 'name', label: 'Name', isRowHeader: true, cell: item => <CellText title={item.name} /> },
40
+ + { id: 'type', label: 'Type', cell: item => <CellText title={item.type} /> },
41
+ +];
42
+ +
43
+ +<Table columnConfig={columns} {...tableProps} />
44
+ ```
45
+
46
+ Affected components: Table, TableRoot, TablePagination
47
+
48
+ - 95246eb: **Breaking** Updating color tokens to match the new neutral style on different surfaces.
49
+
50
+ ## Migration notes
51
+
52
+ There's no direct replacement for the old tint tokens but you can use the new neutral set of color tokens on surface 0 or 1 as a replacement.
53
+
54
+ - `--bui-bg-tint` can be replaced by `--bui-bg-neutral-on-surface-0`
55
+ - `--bui-bg-tint-hover` can be replaced by `--bui-bg-neutral-on-surface-0-hover`
56
+ - `--bui-bg-tint-pressed` can be replaced by `--bui-bg-neutral-on-surface-0-pressed`
57
+ - `--bui-bg-tint-disabled` can be replaced by `--bui-bg-neutral-on-surface-0-disabled`
58
+
59
+ - ea0c6d8: Introduce new `ToggleButton` & `ToggleButtonGroup` components in Backstage UI
60
+ - 4ea1d15: **BREAKING**: Renamed CSS variable `--bui-bg` to `--bui-bg-surface-0` for consistency.
61
+
62
+ ### Patch Changes
63
+
64
+ - 1880402: Fixes app background color on dark mode.
65
+ - d2fdded: Added indeterminate state support to the Checkbox component for handling partial selection scenarios like table header checkboxes.
66
+
67
+ Affected components: Checkbox
68
+
69
+ - 4fb15d2: Added missing `aria-label` attributes to `SearchField` components in `Select`, `MenuAutocomplete`, and `MenuAutocompleteListbox` to fix accessibility warnings.
70
+
71
+ Affected components: Select, MenuAutocomplete, MenuAutocompleteListbox
72
+
73
+ - 21c87cc: Fixes disabled state in primary and secondary buttons in Backstage UI.
74
+ - 9c76682: build(deps-dev): bump `storybook` from 10.1.9 to 10.1.10
75
+ - de80336: Fixed disabled tertiary buttons incorrectly showing hover effects on surfaces.
76
+ - 133d5c6: Added new Popover component for Backstage UI with automatic overflow handling, and full placement support. Also introduced `--bui-shadow` token for consistent elevation styling across overlay components (Popover, Tooltip, Menu).
77
+ - 973c839: Fixed Table sorting indicator not being visible when a column is actively sorted.
78
+
79
+ Affected components: Table, Column
80
+
81
+ - df40cfc: Fixed Menu component trigger button not toggling correctly. Removed custom click-outside handler that was interfering with React Aria's built-in state management, allowing the menu to properly open and close when clicking the trigger button.
82
+ - b01ab96: Added support for column width configuration in Table component. Columns now accept `width`, `defaultWidth`, `minWidth`, and `maxWidth` props for responsive layout control.
83
+
84
+ Affected components: Table, Column
85
+
86
+ - b4a4911: Fixed SearchField `startCollapsed` prop not working correctly in Backstage UI. The field now properly starts in a collapsed state, expands when clicked and focused, and collapses back when unfocused with no input. Also fixed CSS logic to work correctly in all layout contexts (flex row, flex column, and regular containers).
87
+
88
+ Affected components: SearchField
89
+
90
+ - b3253b6: Fixed `Link` component causing hard page refreshes for internal routes. The component now properly uses React Router's navigation instead of full page reloads.
91
+ - fe7fe69: Added support for custom pagination options in `useTable` hook and `Table` component. You can now configure `pageSizeOptions` to customize the page size dropdown, and hook into pagination events via `onPageSizeChange`, `onNextPage`, and `onPreviousPage` callbacks. When `pageSize` doesn't match any option, the first option is used and a warning is logged.
92
+
93
+ Affected components: Table, TablePagination
94
+
95
+ - cfac8a4: Fixed missing border styles on table selection cells in multi-select mode.
96
+
97
+ Affected components: Table
98
+
99
+ - 2532d2a: Added `className` and `style` props to the `Table` component.
100
+
101
+ Affected components: Table
102
+
103
+ ## 0.11.0-next.1
104
+
105
+ ### Minor Changes
106
+
107
+ - 243e5e7: **BREAKING**: Redesigned Table component with new `useTable` hook API.
108
+
109
+ - The `Table` component (React Aria wrapper) is renamed to `TableRoot`
110
+ - New high-level `Table` component that handles data display, pagination, sorting, and selection
111
+ - The `useTable` hook is completely redesigned with a new API supporting three pagination modes (complete, offset, cursor)
112
+ - New types: `ColumnConfig`, `TableProps`, `TableItem`, `UseTableOptions`, `UseTableResult`
113
+
114
+ New features include unified pagination modes, debounced query changes, stale data preservation during reloads, and row selection with toggle/replace behaviors.
115
+
116
+ **Migration guide:**
117
+
118
+ 1. Update imports and use the new `useTable` hook:
119
+
120
+ ```diff
121
+ -import { Table, useTable } from '@backstage/ui';
122
+ -const { data, paginationProps } = useTable({ data: items, pagination: {...} });
123
+ +import { Table, useTable, type ColumnConfig } from '@backstage/ui';
124
+ +const { tableProps } = useTable({
125
+ + mode: 'complete',
126
+ + getData: () => items,
127
+ +});
128
+ ```
129
+
130
+ 2. Define columns and render with the new Table API:
131
+
132
+ ```diff
133
+ -<Table aria-label="My table">
134
+ - <TableHeader>...</TableHeader>
135
+ - <TableBody items={data}>...</TableBody>
136
+ -</Table>
137
+ -<TablePagination {...paginationProps} />
138
+ +const columns: ColumnConfig<Item>[] = [
139
+ + { id: 'name', label: 'Name', isRowHeader: true, cell: item => <CellText title={item.name} /> },
140
+ + { id: 'type', label: 'Type', cell: item => <CellText title={item.type} /> },
141
+ +];
142
+ +
143
+ +<Table columnConfig={columns} {...tableProps} />
144
+ ```
145
+
146
+ Affected components: Table, TableRoot, TablePagination
147
+
148
+ - 95246eb: **Breaking** Updating color tokens to match the new neutral style on different surfaces.
149
+
150
+ ## Migration notes
151
+
152
+ There's no direct replacement for the old tint tokens but you can use the new neutral set of color tokens on surface 0 or 1 as a replacement.
153
+
154
+ - `--bui-bg-tint` can be replaced by `--bui-bg-neutral-on-surface-0`
155
+ - `--bui-bg-tint-hover` can be replaced by `--bui-bg-neutral-on-surface-0-hover`
156
+ - `--bui-bg-tint-pressed` can be replaced by `--bui-bg-neutral-on-surface-0-pressed`
157
+ - `--bui-bg-tint-disabled` can be replaced by `--bui-bg-neutral-on-surface-0-disabled`
158
+
159
+ - ea0c6d8: Introduce new `ToggleButton` & `ToggleButtonGroup` components in Backstage UI
160
+
161
+ ### Patch Changes
162
+
163
+ - 21c87cc: Fixes disabled state in primary and secondary buttons in Backstage UI.
164
+ - b3253b6: Fixed `Link` component causing hard page refreshes for internal routes. The component now properly uses React Router's navigation instead of full page reloads.
165
+
3
166
  ## 0.11.0-next.0
4
167
 
5
168
  ### Minor Changes
package/css/styles.css CHANGED
@@ -58,11 +58,23 @@
58
58
  --bui-bg-solid: #1f5493;
59
59
  --bui-bg-solid-hover: #163a66;
60
60
  --bui-bg-solid-pressed: #0f2b4e;
61
- --bui-bg-solid-disabled: #ebebeb;
62
- --bui-bg-tint: transparent;
63
- --bui-bg-tint-hover: #1f549366;
64
- --bui-bg-tint-pressed: #1f549399;
65
- --bui-bg-tint-disabled: #ebebeb;
61
+ --bui-bg-solid-disabled: #163a66;
62
+ --bui-bg-neutral-on-surface-0: oklch(0% 0 0 / .06);
63
+ --bui-bg-neutral-on-surface-0-hover: oklch(0% 0 0 / .12);
64
+ --bui-bg-neutral-on-surface-0-pressed: oklch(0% 0 0 / .16);
65
+ --bui-bg-neutral-on-surface-0-disabled: oklch(0% 0 0 / .06);
66
+ --bui-bg-neutral-on-surface-1: oklch(0% 0 0 / .06);
67
+ --bui-bg-neutral-on-surface-1-hover: oklch(0% 0 0 / .12);
68
+ --bui-bg-neutral-on-surface-1-pressed: oklch(0% 0 0 / .16);
69
+ --bui-bg-neutral-on-surface-1-disabled: oklch(0% 0 0 / .06);
70
+ --bui-bg-neutral-on-surface-2: oklch(0% 0 0 / .06);
71
+ --bui-bg-neutral-on-surface-2-hover: oklch(0% 0 0 / .12);
72
+ --bui-bg-neutral-on-surface-2-pressed: oklch(0% 0 0 / .16);
73
+ --bui-bg-neutral-on-surface-2-disabled: oklch(0% 0 0 / .06);
74
+ --bui-bg-neutral-on-surface-3: oklch(0% 0 0 / .06);
75
+ --bui-bg-neutral-on-surface-3-hover: oklch(0% 0 0 / .12);
76
+ --bui-bg-neutral-on-surface-3-pressed: oklch(0% 0 0 / .16);
77
+ --bui-bg-neutral-on-surface-3-disabled: oklch(0% 0 0 / .06);
66
78
  --bui-bg-danger: #feebe7;
67
79
  --bui-bg-warning: #fff2b2;
68
80
  --bui-bg-success: #e6f6eb;
@@ -72,7 +84,7 @@
72
84
  --bui-fg-link-hover: #1f2d5c;
73
85
  --bui-fg-disabled: #9e9e9e;
74
86
  --bui-fg-solid: var(--bui-white);
75
- --bui-fg-solid-disabled: #9c9c9c;
87
+ --bui-fg-solid-disabled: #98a8bc;
76
88
  --bui-fg-tint: #1f5493;
77
89
  --bui-fg-tint-disabled: var(--bui-gray-5);
78
90
  --bui-fg-danger: #e22b2b;
@@ -88,6 +100,7 @@
88
100
  --bui-ring: #1f5493;
89
101
  --bui-scrollbar: #a0a0a03b;
90
102
  --bui-scrollbar-thumb: #a0a0a0;
103
+ --bui-shadow: 0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a;
91
104
  --bui-animate-pulse: pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;
92
105
  }
93
106
 
@@ -107,11 +120,23 @@
107
120
  --bui-bg-solid: #9cc9ff;
108
121
  --bui-bg-solid-hover: #83b9fd;
109
122
  --bui-bg-solid-pressed: #83b9fd;
110
- --bui-bg-solid-disabled: #222;
111
- --bui-bg-tint: transparent;
112
- --bui-bg-tint-hover: #9cc9ff1f;
113
- --bui-bg-tint-pressed: #9cc9ff29;
114
- --bui-bg-tint-disabled: transparent;
123
+ --bui-bg-solid-disabled: #1b3d68;
124
+ --bui-bg-neutral-on-surface-0: oklch(100% 0 0 / .1);
125
+ --bui-bg-neutral-on-surface-0-hover: oklch(100% 0 0 / .14);
126
+ --bui-bg-neutral-on-surface-0-pressed: oklch(100% 0 0 / .2);
127
+ --bui-bg-neutral-on-surface-0-disabled: oklch(100% 0 0 / .1);
128
+ --bui-bg-neutral-on-surface-1: oklch(100% 0 0 / .06);
129
+ --bui-bg-neutral-on-surface-1-hover: oklch(100% 0 0 / .1);
130
+ --bui-bg-neutral-on-surface-1-pressed: oklch(100% 0 0 / .16);
131
+ --bui-bg-neutral-on-surface-1-disabled: oklch(100% 0 0 / .06);
132
+ --bui-bg-neutral-on-surface-2: oklch(100% 0 0 / .08);
133
+ --bui-bg-neutral-on-surface-2-hover: oklch(100% 0 0 / .12);
134
+ --bui-bg-neutral-on-surface-2-pressed: oklch(100% 0 0 / .2);
135
+ --bui-bg-neutral-on-surface-2-disabled: oklch(100% 0 0 / .08);
136
+ --bui-bg-neutral-on-surface-3: oklch(100% 0 0 / .08);
137
+ --bui-bg-neutral-on-surface-3-hover: oklch(100% 0 0 / .12);
138
+ --bui-bg-neutral-on-surface-3-pressed: oklch(100% 0 0 / .2);
139
+ --bui-bg-neutral-on-surface-3-disabled: oklch(100% 0 0 / .08);
115
140
  --bui-bg-danger: #3b1219;
116
141
  --bui-bg-warning: #302008;
117
142
  --bui-bg-success: #132d21;
@@ -121,7 +146,7 @@
121
146
  --bui-fg-link-hover: #7eb5f7;
122
147
  --bui-fg-disabled: var(--bui-gray-7);
123
148
  --bui-fg-solid: #101821;
124
- --bui-fg-solid-disabled: var(--bui-gray-5);
149
+ --bui-fg-solid-disabled: #6191cc;
125
150
  --bui-fg-tint: #9cc9ff;
126
151
  --bui-fg-tint-disabled: var(--bui-gray-5);
127
152
  --bui-fg-danger: #e22b2b;
@@ -137,6 +162,7 @@
137
162
  --bui-ring: #1f5493;
138
163
  --bui-scrollbar: #3636363a;
139
164
  --bui-scrollbar-thumb: #575757;
165
+ --bui-shadow: none;
140
166
  }
141
167
  }
142
168
 
@@ -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-module_bui-Accordion__wEbQl {\n width: 100%;\n background-color: var(--bui-bg-surface-1);\n border-radius: var(--bui-radius-3);\n padding: var(--bui-space-3);\n }\n\n .Accordion-module_bui-AccordionTrigger__1fPAs {\n all: unset;\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: space-between;\n }\n\n .Accordion-module_bui-AccordionTriggerButton__3RF1r {\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-module_bui-AccordionTriggerTitle__3DOpr {\n font-size: var(--bui-font-size-4);\n font-weight: var(--bui-font-weight-bold);\n line-height: 140%;\n }\n\n .Accordion-module_bui-AccordionTriggerSubtitle__jU446 {\n font-size: var(--bui-font-size-2);\n line-height: 140%;\n color: var(--bui-fg-secondary);\n }\n\n .Accordion-module_bui-AccordionTriggerIcon__1953s {\n transition: transform 150ms ease-out;\n flex-shrink: 0;\n width: 1rem;\n height: 1rem;\n\n [data-expanded='true'] & {\n transform: rotate(180deg);\n }\n }\n\n .Accordion-module_bui-AccordionPanel__1bJFQ {\n [data-expanded='true'] & {\n padding-top: var(--bui-space-1);\n }\n }\n\n .Accordion-module_bui-AccordionGroup__3bll0 {\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-module_bui-Accordion__wEbQl","bui-AccordionTrigger":"Accordion-module_bui-AccordionTrigger__1fPAs","bui-AccordionTriggerButton":"Accordion-module_bui-AccordionTriggerButton__3RF1r","bui-AccordionTriggerTitle":"Accordion-module_bui-AccordionTriggerTitle__3DOpr","bui-AccordionTriggerSubtitle":"Accordion-module_bui-AccordionTriggerSubtitle__jU446","bui-AccordionTriggerIcon":"Accordion-module_bui-AccordionTriggerIcon__1953s","bui-AccordionPanel":"Accordion-module_bui-AccordionPanel__1bJFQ","bui-AccordionGroup":"Accordion-module_bui-AccordionGroup__3bll0"};
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__65122c2f40 {\n width: 100%;\n background-color: var(--bui-bg-surface-1);\n border-radius: var(--bui-radius-3);\n padding: var(--bui-space-3);\n }\n\n .Accordion_bui-AccordionTrigger__65122c2f40 {\n all: unset;\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: space-between;\n }\n\n .Accordion_bui-AccordionTriggerButton__65122c2f40 {\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__65122c2f40 {\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__65122c2f40 {\n font-size: var(--bui-font-size-2);\n line-height: 140%;\n color: var(--bui-fg-secondary);\n }\n\n .Accordion_bui-AccordionTriggerIcon__65122c2f40 {\n transition: transform 150ms ease-out;\n flex-shrink: 0;\n width: 1rem;\n height: 1rem;\n\n [data-expanded='true'] & {\n transform: rotate(180deg);\n }\n }\n\n .Accordion_bui-AccordionPanel__65122c2f40 {\n [data-expanded='true'] & {\n padding-top: var(--bui-space-1);\n }\n }\n\n .Accordion_bui-AccordionGroup__65122c2f40 {\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__65122c2f40","bui-AccordionTrigger":"Accordion_bui-AccordionTrigger__65122c2f40","bui-AccordionTriggerButton":"Accordion_bui-AccordionTriggerButton__65122c2f40","bui-AccordionTriggerTitle":"Accordion_bui-AccordionTriggerTitle__65122c2f40","bui-AccordionTriggerSubtitle":"Accordion_bui-AccordionTriggerSubtitle__65122c2f40","bui-AccordionTriggerIcon":"Accordion_bui-AccordionTriggerIcon__65122c2f40","bui-AccordionPanel":"Accordion_bui-AccordionPanel__65122c2f40","bui-AccordionGroup":"Accordion_bui-AccordionGroup__65122c2f40"};
5
5
  styleInject(css_248z);
6
6
 
7
7
  export { styles as default };
@@ -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 .Avatar-module_bui-AvatarRoot__3BSck {\n display: inline-flex;\n justify-content: center;\n align-items: center;\n vertical-align: middle;\n border-radius: 100%;\n user-select: none;\n font-weight: 500;\n color: var(--bui-fg-primary);\n background-color: var(--bui-bg-surface-2);\n font-size: 1rem;\n line-height: 1;\n overflow: hidden;\n height: 2rem;\n width: 2rem;\n }\n\n .Avatar-module_bui-AvatarRoot__3BSck[data-size='x-small'] {\n height: 1.25rem;\n width: 1.25rem;\n }\n\n .Avatar-module_bui-AvatarRoot__3BSck[data-size='small'] {\n height: 1.5rem;\n width: 1.5rem;\n }\n\n .Avatar-module_bui-AvatarRoot__3BSck[data-size='medium'] {\n height: 2rem;\n width: 2rem;\n }\n\n .Avatar-module_bui-AvatarRoot__3BSck[data-size='large'] {\n height: 2.5rem;\n width: 2.5rem;\n }\n\n .Avatar-module_bui-AvatarRoot__3BSck[data-size='x-large'] {\n height: 3rem;\n width: 3rem;\n }\n\n .Avatar-module_bui-AvatarImage__2ehc- {\n object-fit: cover;\n height: 100%;\n width: 100%;\n display: block;\n }\n\n .Avatar-module_bui-AvatarFallback__3qnqR {\n align-items: center;\n display: flex;\n justify-content: center;\n height: 100%;\n width: 100%;\n font-size: var(--bui-font-size-3);\n font-weight: var(--bui-font-weight-regular);\n box-shadow: inset 0 0 0 1px var(--bui-border);\n border-radius: var(--bui-radius-full);\n }\n}\n";
4
- var styles = {"bui-AvatarRoot":"Avatar-module_bui-AvatarRoot__3BSck","bui-AvatarImage":"Avatar-module_bui-AvatarImage__2ehc-","bui-AvatarFallback":"Avatar-module_bui-AvatarFallback__3qnqR"};
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 .Avatar_bui-AvatarRoot__17171335c3 {\n display: inline-flex;\n justify-content: center;\n align-items: center;\n vertical-align: middle;\n border-radius: 100%;\n user-select: none;\n font-weight: 500;\n color: var(--bui-fg-primary);\n background-color: var(--bui-bg-surface-2);\n font-size: 1rem;\n line-height: 1;\n overflow: hidden;\n height: 2rem;\n width: 2rem;\n }\n\n .Avatar_bui-AvatarRoot__17171335c3[data-size='x-small'] {\n height: 1.25rem;\n width: 1.25rem;\n }\n\n .Avatar_bui-AvatarRoot__17171335c3[data-size='small'] {\n height: 1.5rem;\n width: 1.5rem;\n }\n\n .Avatar_bui-AvatarRoot__17171335c3[data-size='medium'] {\n height: 2rem;\n width: 2rem;\n }\n\n .Avatar_bui-AvatarRoot__17171335c3[data-size='large'] {\n height: 2.5rem;\n width: 2.5rem;\n }\n\n .Avatar_bui-AvatarRoot__17171335c3[data-size='x-large'] {\n height: 3rem;\n width: 3rem;\n }\n\n .Avatar_bui-AvatarImage__17171335c3 {\n object-fit: cover;\n height: 100%;\n width: 100%;\n display: block;\n }\n\n .Avatar_bui-AvatarFallback__17171335c3 {\n align-items: center;\n display: flex;\n justify-content: center;\n height: 100%;\n width: 100%;\n font-size: var(--bui-font-size-3);\n font-weight: var(--bui-font-weight-regular);\n box-shadow: inset 0 0 0 1px var(--bui-border);\n border-radius: var(--bui-radius-full);\n }\n}\n";
4
+ var styles = {"bui-AvatarRoot":"Avatar_bui-AvatarRoot__17171335c3","bui-AvatarImage":"Avatar_bui-AvatarImage__17171335c3","bui-AvatarFallback":"Avatar_bui-AvatarFallback__17171335c3"};
5
5
  styleInject(css_248z);
6
6
 
7
7
  export { styles as default };
@@ -1,15 +1,21 @@
1
+ import { jsx } from 'react/jsx-runtime';
1
2
  import { forwardRef, createElement } from 'react';
2
3
  import clsx from 'clsx';
3
4
  import { useStyles } from '../../hooks/useStyles.esm.js';
4
5
  import styles from './Box.module.css.esm.js';
5
6
  import { BoxDefinition } from './definition.esm.js';
7
+ import { useSurface, SurfaceProvider } from '../../hooks/useSurface.esm.js';
6
8
 
7
9
  const Box = forwardRef((props, ref) => {
8
- const { classNames, utilityClasses, style, cleanedProps } = useStyles(
9
- BoxDefinition,
10
- props
11
- );
12
- const { as = "div", children, className, ...rest } = cleanedProps;
10
+ const { surface: resolvedSurface } = useSurface({
11
+ surface: props.surface
12
+ });
13
+ const { classNames, dataAttributes, utilityClasses, style, cleanedProps } = useStyles(BoxDefinition, {
14
+ ...props,
15
+ surface: resolvedSurface
16
+ // Use resolved surface for data attribute
17
+ });
18
+ const { as = "div", children, className, surface, ...rest } = cleanedProps;
13
19
  return createElement(
14
20
  as,
15
21
  {
@@ -21,9 +27,10 @@ const Box = forwardRef((props, ref) => {
21
27
  className
22
28
  ),
23
29
  style,
30
+ ...dataAttributes,
24
31
  ...rest
25
32
  },
26
- children
33
+ resolvedSurface ? /* @__PURE__ */ jsx(SurfaceProvider, { surface: resolvedSurface, children }) : children
27
34
  );
28
35
  });
29
36
  Box.displayName = "Box";
@@ -1 +1 @@
1
- {"version":3,"file":"Box.esm.js","sources":["../../../src/components/Box/Box.tsx"],"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 { createElement, forwardRef } from 'react';\nimport { BoxProps } from './types';\nimport clsx from 'clsx';\nimport { useStyles } from '../../hooks/useStyles';\nimport styles from './Box.module.css';\nimport { BoxDefinition } from './definition';\n\n/** @public */\nexport const Box = forwardRef<HTMLDivElement, BoxProps>((props, ref) => {\n const { classNames, utilityClasses, style, cleanedProps } = useStyles(\n BoxDefinition,\n props,\n );\n\n const { as = 'div', children, className, ...rest } = cleanedProps;\n\n return createElement(\n as,\n {\n ref,\n className: clsx(\n classNames.root,\n styles[classNames.root],\n utilityClasses,\n className,\n ),\n style,\n ...rest,\n },\n children,\n );\n});\n\nBox.displayName = 'Box';\n"],"names":[],"mappings":";;;;;;AAwBO,MAAM,GAAA,GAAM,UAAA,CAAqC,CAAC,KAAA,EAAO,GAAA,KAAQ;AACtE,EAAA,MAAM,EAAE,UAAA,EAAY,cAAA,EAAgB,KAAA,EAAO,cAAa,GAAI,SAAA;AAAA,IAC1D,aAAA;AAAA,IACA;AAAA,GACF;AAEA,EAAA,MAAM,EAAE,EAAA,GAAK,KAAA,EAAO,UAAU,SAAA,EAAW,GAAG,MAAK,GAAI,YAAA;AAErD,EAAA,OAAO,aAAA;AAAA,IACL,EAAA;AAAA,IACA;AAAA,MACE,GAAA;AAAA,MACA,SAAA,EAAW,IAAA;AAAA,QACT,UAAA,CAAW,IAAA;AAAA,QACX,MAAA,CAAO,WAAW,IAAI,CAAA;AAAA,QACtB,cAAA;AAAA,QACA;AAAA,OACF;AAAA,MACA,KAAA;AAAA,MACA,GAAG;AAAA,KACL;AAAA,IACA;AAAA,GACF;AACF,CAAC;AAED,GAAA,CAAI,WAAA,GAAc,KAAA;;;;"}
1
+ {"version":3,"file":"Box.esm.js","sources":["../../../src/components/Box/Box.tsx"],"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 { createElement, forwardRef } from 'react';\nimport { BoxProps } from './types';\nimport clsx from 'clsx';\nimport { useStyles } from '../../hooks/useStyles';\nimport styles from './Box.module.css';\nimport { BoxDefinition } from './definition';\nimport { SurfaceProvider, useSurface } from '../../hooks/useSurface';\n\n/** @public */\nexport const Box = forwardRef<HTMLDivElement, BoxProps>((props, ref) => {\n // Resolve the surface this Box creates for its children\n // Using 'surface' parameter = container behavior (auto increments)\n const { surface: resolvedSurface } = useSurface({\n surface: props.surface,\n });\n\n const { classNames, dataAttributes, utilityClasses, style, cleanedProps } =\n useStyles(BoxDefinition, {\n ...props,\n surface: resolvedSurface, // Use resolved surface for data attribute\n });\n\n const { as = 'div', children, className, surface, ...rest } = cleanedProps;\n\n return createElement(\n as,\n {\n ref,\n className: clsx(\n classNames.root,\n styles[classNames.root],\n utilityClasses,\n className,\n ),\n style,\n ...dataAttributes,\n ...rest,\n },\n resolvedSurface ? (\n <SurfaceProvider surface={resolvedSurface}>{children}</SurfaceProvider>\n ) : (\n children\n ),\n );\n});\n\nBox.displayName = 'Box';\n"],"names":[],"mappings":";;;;;;;;AAyBO,MAAM,GAAA,GAAM,UAAA,CAAqC,CAAC,KAAA,EAAO,GAAA,KAAQ;AAGtE,EAAA,MAAM,EAAE,OAAA,EAAS,eAAA,EAAgB,GAAI,UAAA,CAAW;AAAA,IAC9C,SAAS,KAAA,CAAM;AAAA,GAChB,CAAA;AAED,EAAA,MAAM,EAAE,YAAY,cAAA,EAAgB,cAAA,EAAgB,OAAO,YAAA,EAAa,GACtE,UAAU,aAAA,EAAe;AAAA,IACvB,GAAG,KAAA;AAAA,IACH,OAAA,EAAS;AAAA;AAAA,GACV,CAAA;AAEH,EAAA,MAAM,EAAE,KAAK,KAAA,EAAO,QAAA,EAAU,WAAW,OAAA,EAAS,GAAG,MAAK,GAAI,YAAA;AAE9D,EAAA,OAAO,aAAA;AAAA,IACL,EAAA;AAAA,IACA;AAAA,MACE,GAAA;AAAA,MACA,SAAA,EAAW,IAAA;AAAA,QACT,UAAA,CAAW,IAAA;AAAA,QACX,MAAA,CAAO,WAAW,IAAI,CAAA;AAAA,QACtB,cAAA;AAAA,QACA;AAAA,OACF;AAAA,MACA,KAAA;AAAA,MACA,GAAG,cAAA;AAAA,MACH,GAAG;AAAA,KACL;AAAA,IACA,kCACE,GAAA,CAAC,eAAA,EAAA,EAAgB,OAAA,EAAS,eAAA,EAAkB,UAAS,CAAA,GAErD;AAAA,GAEJ;AACF,CAAC;AAED,GAAA,CAAI,WAAA,GAAc,KAAA;;;;"}
@@ -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 .Box-module_bui-Box__2Q5um {\n font-family: var(--bui-font-regular);\n font-weight: var(--bui-font-weight-regular);\n color: var(--bui-fg-primary);\n }\n}\n";
4
- var styles = {"bui-Box":"Box-module_bui-Box__2Q5um"};
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 .Box_bui-Box__38028633d4 {\n font-family: var(--bui-font-regular);\n font-weight: var(--bui-font-weight-regular);\n color: var(--bui-fg-primary);\n }\n\n .Box_bui-Box__38028633d4[data-surface='0'] {\n background-color: var(--bui-bg-surface-0);\n }\n\n .Box_bui-Box__38028633d4[data-surface='1'] {\n background-color: var(--bui-bg-surface-1);\n }\n\n .Box_bui-Box__38028633d4[data-surface='2'] {\n background-color: var(--bui-bg-surface-2);\n }\n\n .Box_bui-Box__38028633d4[data-surface='3'] {\n background-color: var(--bui-bg-surface-3);\n }\n\n .Box_bui-Box__38028633d4[data-surface='danger'] {\n background-color: var(--bui-bg-danger);\n }\n\n .Box_bui-Box__38028633d4[data-surface='warning'] {\n background-color: var(--bui-bg-warning);\n }\n\n .Box_bui-Box__38028633d4[data-surface='success'] {\n background-color: var(--bui-bg-success);\n }\n}\n";
4
+ var styles = {"bui-Box":"Box_bui-Box__38028633d4"};
5
5
  styleInject(css_248z);
6
6
 
7
7
  export { styles as default };
@@ -25,7 +25,10 @@ const BoxDefinition = {
25
25
  "height",
26
26
  "minHeight",
27
27
  "maxHeight"
28
- ]
28
+ ],
29
+ dataAttributes: {
30
+ surface: ["0", "1", "2", "3", "danger", "warning", "success"]
31
+ }
29
32
  };
30
33
 
31
34
  export { BoxDefinition };
@@ -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 type { ComponentDefinition } from '../../types';\n\n/**\n * Component definition for Box\n * @public\n */\nexport const BoxDefinition = {\n classNames: {\n root: 'bui-Box',\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} as const satisfies ComponentDefinition;\n"],"names":[],"mappings":"AAsBO,MAAM,aAAA,GAAgB;AAAA,EAC3B,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA,GACR;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;;;;"}
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 type { ComponentDefinition } from '../../types';\n\n/**\n * Component definition for Box\n * @public\n */\nexport const BoxDefinition = {\n classNames: {\n root: 'bui-Box',\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 dataAttributes: {\n surface: ['0', '1', '2', '3', 'danger', 'warning', 'success'] as const,\n },\n} as const satisfies ComponentDefinition;\n"],"names":[],"mappings":"AAsBO,MAAM,aAAA,GAAgB;AAAA,EAC3B,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA,GACR;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,GACF;AAAA,EACA,cAAA,EAAgB;AAAA,IACd,OAAA,EAAS,CAAC,GAAA,EAAK,GAAA,EAAK,KAAK,GAAA,EAAK,QAAA,EAAU,WAAW,SAAS;AAAA;AAEhE;;;;"}
@@ -6,6 +6,7 @@ import { RiLoader4Line } from '@remixicon/react';
6
6
  import { useStyles } from '../../hooks/useStyles.esm.js';
7
7
  import { ButtonDefinition } from './definition.esm.js';
8
8
  import stylesButton from './Button.module.css.esm.js';
9
+ import { useSurface } from '../../hooks/useSurface.esm.js';
9
10
 
10
11
  const Button = forwardRef(
11
12
  (props, ref) => {
@@ -17,7 +18,16 @@ const Button = forwardRef(
17
18
  ...props
18
19
  }
19
20
  );
20
- const { children, className, iconStart, iconEnd, loading, ...rest } = cleanedProps;
21
+ const {
22
+ children,
23
+ className,
24
+ iconStart,
25
+ iconEnd,
26
+ loading,
27
+ onSurface,
28
+ ...rest
29
+ } = cleanedProps;
30
+ const { surface } = useSurface({ onSurface });
21
31
  return /* @__PURE__ */ jsx(
22
32
  Button$1,
23
33
  {
@@ -25,6 +35,7 @@ const Button = forwardRef(
25
35
  ref,
26
36
  isPending: loading,
27
37
  ...dataAttributes,
38
+ ...typeof surface === "string" ? { "data-on-surface": surface } : {},
28
39
  ...rest,
29
40
  children: ({ isPending }) => /* @__PURE__ */ jsxs(Fragment, { children: [
30
41
  /* @__PURE__ */ jsxs(
@@ -1 +1 @@
1
- {"version":3,"file":"Button.esm.js","sources":["../../../src/components/Button/Button.tsx"],"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 clsx from 'clsx';\nimport { forwardRef, Ref } from 'react';\nimport { Button as RAButton, ProgressBar } from 'react-aria-components';\nimport { RiLoader4Line } from '@remixicon/react';\nimport type { ButtonProps } from './types';\nimport { useStyles } from '../../hooks/useStyles';\nimport { ButtonDefinition } from './definition';\nimport styles from './Button.module.css';\n\n/** @public */\nexport const Button = forwardRef(\n (props: ButtonProps, ref: Ref<HTMLButtonElement>) => {\n const { classNames, dataAttributes, cleanedProps } = useStyles(\n ButtonDefinition,\n {\n size: 'small',\n variant: 'primary',\n ...props,\n },\n );\n\n const { children, className, iconStart, iconEnd, loading, ...rest } =\n cleanedProps;\n\n return (\n <RAButton\n className={clsx(classNames.root, styles[classNames.root], className)}\n ref={ref}\n isPending={loading}\n {...dataAttributes}\n {...rest}\n >\n {({ isPending }) => (\n <>\n <span\n className={clsx(classNames.content, styles[classNames.content])}\n >\n {iconStart}\n {children}\n {iconEnd}\n </span>\n\n {isPending && (\n <ProgressBar\n aria-label=\"Loading\"\n isIndeterminate\n className={clsx(classNames.spinner, styles[classNames.spinner])}\n >\n <RiLoader4Line aria-hidden=\"true\" />\n </ProgressBar>\n )}\n </>\n )}\n </RAButton>\n );\n },\n);\n\nButton.displayName = 'Button';\n"],"names":["RAButton","styles"],"mappings":";;;;;;;;;AA0BO,MAAM,MAAA,GAAS,UAAA;AAAA,EACpB,CAAC,OAAoB,GAAA,KAAgC;AACnD,IAAA,MAAM,EAAE,UAAA,EAAY,cAAA,EAAgB,YAAA,EAAa,GAAI,SAAA;AAAA,MACnD,gBAAA;AAAA,MACA;AAAA,QACE,IAAA,EAAM,OAAA;AAAA,QACN,OAAA,EAAS,SAAA;AAAA,QACT,GAAG;AAAA;AACL,KACF;AAEA,IAAA,MAAM,EAAE,UAAU,SAAA,EAAW,SAAA,EAAW,SAAS,OAAA,EAAS,GAAG,MAAK,GAChE,YAAA;AAEF,IAAA,uBACE,GAAA;AAAA,MAACA,QAAA;AAAA,MAAA;AAAA,QACC,SAAA,EAAW,KAAK,UAAA,CAAW,IAAA,EAAMC,aAAO,UAAA,CAAW,IAAI,GAAG,SAAS,CAAA;AAAA,QACnE,GAAA;AAAA,QACA,SAAA,EAAW,OAAA;AAAA,QACV,GAAG,cAAA;AAAA,QACH,GAAG,IAAA;AAAA,QAEH,QAAA,EAAA,CAAC,EAAE,SAAA,EAAU,qBACZ,IAAA,CAAA,QAAA,EAAA,EACE,QAAA,EAAA;AAAA,0BAAA,IAAA;AAAA,YAAC,MAAA;AAAA,YAAA;AAAA,cACC,WAAW,IAAA,CAAK,UAAA,CAAW,SAASA,YAAA,CAAO,UAAA,CAAW,OAAO,CAAC,CAAA;AAAA,cAE7D,QAAA,EAAA;AAAA,gBAAA,SAAA;AAAA,gBACA,QAAA;AAAA,gBACA;AAAA;AAAA;AAAA,WACH;AAAA,UAEC,SAAA,oBACC,GAAA;AAAA,YAAC,WAAA;AAAA,YAAA;AAAA,cACC,YAAA,EAAW,SAAA;AAAA,cACX,eAAA,EAAe,IAAA;AAAA,cACf,WAAW,IAAA,CAAK,UAAA,CAAW,SAASA,YAAA,CAAO,UAAA,CAAW,OAAO,CAAC,CAAA;AAAA,cAE9D,QAAA,kBAAA,GAAA,CAAC,aAAA,EAAA,EAAc,aAAA,EAAY,MAAA,EAAO;AAAA;AAAA;AACpC,SAAA,EAEJ;AAAA;AAAA,KAEJ;AAAA,EAEJ;AACF;AAEA,MAAA,CAAO,WAAA,GAAc,QAAA;;;;"}
1
+ {"version":3,"file":"Button.esm.js","sources":["../../../src/components/Button/Button.tsx"],"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 clsx from 'clsx';\nimport { forwardRef, Ref } from 'react';\nimport { Button as RAButton, ProgressBar } from 'react-aria-components';\nimport { RiLoader4Line } from '@remixicon/react';\nimport type { ButtonProps } from './types';\nimport { useStyles } from '../../hooks/useStyles';\nimport { ButtonDefinition } from './definition';\nimport styles from './Button.module.css';\nimport { useSurface } from '../../hooks/useSurface';\n\n/**\n * A button component built on React Aria Components that provides accessible\n * interactive elements for triggering actions.\n *\n * @remarks\n * The Button component supports multiple variants (primary, secondary, tertiary, danger),\n * sizes (small, medium), and states including loading and disabled. It automatically\n * handles keyboard navigation, focus management, and ARIA attributes for accessibility.\n *\n * @example\n * Basic usage:\n * ```tsx\n * <Button>Click me</Button>\n * ```\n *\n * @example\n * With icons and loading state:\n * ```tsx\n * <Button\n * variant=\"primary\"\n * size=\"medium\"\n * iconStart={<IconComponent />}\n * loading={isSubmitting}\n * >\n * Submit\n * </Button>\n * ```\n *\n * @public\n */\nexport const Button = forwardRef(\n (props: ButtonProps, ref: Ref<HTMLButtonElement>) => {\n const { classNames, dataAttributes, cleanedProps } = useStyles(\n ButtonDefinition,\n {\n size: 'small',\n variant: 'primary',\n ...props,\n },\n );\n\n const {\n children,\n className,\n iconStart,\n iconEnd,\n loading,\n onSurface,\n ...rest\n } = cleanedProps;\n\n const { surface } = useSurface({ onSurface });\n\n return (\n <RAButton\n className={clsx(classNames.root, styles[classNames.root], className)}\n ref={ref}\n isPending={loading}\n {...dataAttributes}\n {...(typeof surface === 'string' ? { 'data-on-surface': surface } : {})}\n {...rest}\n >\n {({ isPending }) => (\n <>\n <span\n className={clsx(classNames.content, styles[classNames.content])}\n >\n {iconStart}\n {children}\n {iconEnd}\n </span>\n\n {isPending && (\n <ProgressBar\n aria-label=\"Loading\"\n isIndeterminate\n className={clsx(classNames.spinner, styles[classNames.spinner])}\n >\n <RiLoader4Line aria-hidden=\"true\" />\n </ProgressBar>\n )}\n </>\n )}\n </RAButton>\n );\n },\n);\n\nButton.displayName = 'Button';\n"],"names":["RAButton","styles"],"mappings":";;;;;;;;;;AAwDO,MAAM,MAAA,GAAS,UAAA;AAAA,EACpB,CAAC,OAAoB,GAAA,KAAgC;AACnD,IAAA,MAAM,EAAE,UAAA,EAAY,cAAA,EAAgB,YAAA,EAAa,GAAI,SAAA;AAAA,MACnD,gBAAA;AAAA,MACA;AAAA,QACE,IAAA,EAAM,OAAA;AAAA,QACN,OAAA,EAAS,SAAA;AAAA,QACT,GAAG;AAAA;AACL,KACF;AAEA,IAAA,MAAM;AAAA,MACJ,QAAA;AAAA,MACA,SAAA;AAAA,MACA,SAAA;AAAA,MACA,OAAA;AAAA,MACA,OAAA;AAAA,MACA,SAAA;AAAA,MACA,GAAG;AAAA,KACL,GAAI,YAAA;AAEJ,IAAA,MAAM,EAAE,OAAA,EAAQ,GAAI,UAAA,CAAW,EAAE,WAAW,CAAA;AAE5C,IAAA,uBACE,GAAA;AAAA,MAACA,QAAA;AAAA,MAAA;AAAA,QACC,SAAA,EAAW,KAAK,UAAA,CAAW,IAAA,EAAMC,aAAO,UAAA,CAAW,IAAI,GAAG,SAAS,CAAA;AAAA,QACnE,GAAA;AAAA,QACA,SAAA,EAAW,OAAA;AAAA,QACV,GAAG,cAAA;AAAA,QACH,GAAI,OAAO,OAAA,KAAY,QAAA,GAAW,EAAE,iBAAA,EAAmB,OAAA,KAAY,EAAC;AAAA,QACpE,GAAG,IAAA;AAAA,QAEH,QAAA,EAAA,CAAC,EAAE,SAAA,EAAU,qBACZ,IAAA,CAAA,QAAA,EAAA,EACE,QAAA,EAAA;AAAA,0BAAA,IAAA;AAAA,YAAC,MAAA;AAAA,YAAA;AAAA,cACC,WAAW,IAAA,CAAK,UAAA,CAAW,SAASA,YAAA,CAAO,UAAA,CAAW,OAAO,CAAC,CAAA;AAAA,cAE7D,QAAA,EAAA;AAAA,gBAAA,SAAA;AAAA,gBACA,QAAA;AAAA,gBACA;AAAA;AAAA;AAAA,WACH;AAAA,UAEC,SAAA,oBACC,GAAA;AAAA,YAAC,WAAA;AAAA,YAAA;AAAA,cACC,YAAA,EAAW,SAAA;AAAA,cACX,eAAA,EAAe,IAAA;AAAA,cACf,WAAW,IAAA,CAAK,UAAA,CAAW,SAASA,YAAA,CAAO,UAAA,CAAW,OAAO,CAAC,CAAA;AAAA,cAE9D,QAAA,kBAAA,GAAA,CAAC,aAAA,EAAA,EAAc,aAAA,EAAY,MAAA,EAAO;AAAA;AAAA;AACpC,SAAA,EAEJ;AAAA;AAAA,KAEJ;AAAA,EAEJ;AACF;AAEA,MAAA,CAAO,WAAA,GAAc,QAAA;;;;"}
@@ -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-module_bui-Button__1BvMm {\n --loading-duration: 200ms;\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 &[data-disabled='true'] {\n cursor: not-allowed;\n }\n\n &[data-loading='true'] {\n cursor: wait;\n }\n }\n\n .Button-module_bui-Button__1BvMm[data-variant='primary'] {\n background-color: var(--bui-bg-solid);\n color: var(--bui-fg-solid);\n\n &:hover {\n background-color: var(--bui-bg-solid-hover);\n transition: background-color 150ms ease;\n }\n\n &:active {\n background-color: var(--bui-bg-solid-pressed);\n }\n\n &:focus-visible {\n outline: 2px solid var(--bui-ring);\n outline-offset: 2px;\n }\n\n &[data-disabled='true'],\n &[data-loading='true'] {\n background-color: var(--bui-bg-solid-disabled);\n color: var(--bui-fg-solid-disabled);\n }\n }\n\n .Button-module_bui-Button__1BvMm[data-variant='secondary'] {\n background-color: var(--bui-bg-surface-1);\n box-shadow: inset 0 0 0 1px var(--bui-border);\n color: var(--bui-fg-primary);\n\n &:hover {\n box-shadow: inset 0 0 0 1px var(--bui-border-hover);\n transition: box-shadow 150ms ease;\n }\n\n &:active {\n box-shadow: inset 0 0 0 1px var(--bui-border-pressed);\n }\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 &[data-loading='true'] {\n box-shadow: inset 0 0 0 1px var(--bui-border-disabled);\n color: var(--bui-fg-disabled);\n }\n }\n\n .Button-module_bui-Button__1BvMm[data-variant='tertiary'] {\n background-color: transparent;\n color: var(--bui-fg-primary);\n\n &:hover {\n background-color: var(--bui-bg-surface-1);\n transition: background-color 200ms ease;\n }\n\n &:active {\n background-color: var(--bui-bg-surface-2);\n }\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 &[data-loading='true'] {\n background-color: transparent;\n color: var(--bui-fg-disabled);\n }\n }\n\n .Button-module_bui-Button__1BvMm[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-module_bui-Button__1BvMm[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-module_bui-ButtonContent__2x-bP {\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-module_bui-Button__1BvMm[data-loading='true'] & {\n opacity: 0;\n }\n }\n\n .Button-module_bui-ButtonSpinner__1MWbK {\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-module_bui-Button__1BvMm[data-loading='true'] & {\n opacity: 1;\n }\n\n & svg {\n animation: Button-module_bui-spin__yALtH 1s linear infinite;\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n .Button-module_bui-Button__1BvMm {\n transition-duration: 50ms;\n }\n\n .Button-module_bui-ButtonContent__2x-bP {\n transition-duration: 50ms;\n }\n\n .Button-module_bui-ButtonSpinner__1MWbK {\n transition-duration: 50ms;\n }\n\n .Button-module_bui-ButtonSpinner__1MWbK svg {\n animation: none;\n }\n }\n\n @keyframes Button-module_bui-spin__yALtH {\n from {\n transform: rotate(0deg);\n }\n\n to {\n transform: rotate(360deg);\n }\n }\n}\n";
4
- var stylesButton = {"bui-Button":"Button-module_bui-Button__1BvMm","bui-ButtonContent":"Button-module_bui-ButtonContent__2x-bP","bui-ButtonSpinner":"Button-module_bui-ButtonSpinner__1MWbK","bui-spin":"Button-module_bui-spin__yALtH"};
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__47f4267606 {\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__47f4267606[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 &:focus-visible {\n outline: 2px solid var(--bui-ring);\n outline-offset: 2px;\n }\n }\n\n .Button_bui-Button__47f4267606[data-variant='secondary'] {\n --bg: var(--bui-bg-neutral-on-surface-0);\n --bg-hover: var(--bui-bg-neutral-on-surface-0-hover);\n --bg-active: var(--bui-bg-neutral-on-surface-0-pressed);\n --fg: var(--bui-fg-primary);\n\n &[data-on-surface='1'] {\n --bg: var(--bui-bg-neutral-on-surface-1);\n --bg-hover: var(--bui-bg-neutral-on-surface-1-hover);\n --bg-active: var(--bui-bg-neutral-on-surface-1-pressed);\n }\n\n &[data-on-surface='2'] {\n --bg: var(--bui-bg-neutral-on-surface-2);\n --bg-hover: var(--bui-bg-neutral-on-surface-2-hover);\n --bg-active: var(--bui-bg-neutral-on-surface-2-pressed);\n }\n\n &[data-on-surface='3'] {\n --bg: var(--bui-bg-neutral-on-surface-3);\n --bg-hover: var(--bui-bg-neutral-on-surface-3-hover);\n --bg-active: var(--bui-bg-neutral-on-surface-3-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 &: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__47f4267606[data-variant='tertiary'] {\n --bg-hover: var(--bui-bg-neutral-on-surface-0-hover);\n --bg-active: var(--bui-bg-neutral-on-surface-0-pressed);\n --fg: var(--bui-fg-primary);\n\n &[data-on-surface='1'] {\n --bg-hover: var(--bui-bg-neutral-on-surface-1-hover);\n --bg-active: var(--bui-bg-neutral-on-surface-1-pressed);\n }\n\n &[data-on-surface='2'] {\n --bg-hover: var(--bui-bg-neutral-on-surface-2-hover);\n --bg-active: var(--bui-bg-neutral-on-surface-2-pressed);\n }\n\n &[data-on-surface='3'] {\n --bg-hover: var(--bui-bg-neutral-on-surface-3-hover);\n --bg-active: var(--bui-bg-neutral-on-surface-3-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 &: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__47f4267606[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__47f4267606[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__47f4267606 {\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__47f4267606[data-loading='true'] & {\n opacity: 0;\n }\n }\n\n .Button_bui-ButtonSpinner__47f4267606 {\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__47f4267606[data-loading='true'] & {\n opacity: 1;\n }\n\n & svg {\n animation: Button_bui-spin__47f4267606 1s linear infinite;\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n .Button_bui-Button__47f4267606 {\n transition-duration: 50ms;\n }\n\n .Button_bui-ButtonContent__47f4267606 {\n transition-duration: 50ms;\n }\n\n .Button_bui-ButtonSpinner__47f4267606 {\n transition-duration: 50ms;\n }\n\n .Button_bui-ButtonSpinner__47f4267606 svg {\n animation: none;\n }\n }\n\n @keyframes Button_bui-spin__47f4267606 {\n from {\n transform: rotate(0deg);\n }\n\n to {\n transform: rotate(360deg);\n }\n }\n}\n";
4
+ var stylesButton = {"bui-Button":"Button_bui-Button__47f4267606","bui-ButtonContent":"Button_bui-ButtonContent__47f4267606","bui-ButtonSpinner":"Button_bui-ButtonSpinner__47f4267606","bui-spin":"Button_bui-spin__47f4267606"};
5
5
  styleInject(css_248z);
6
6
 
7
7
  export { stylesButton as default };
@@ -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-module_bui-ButtonIcon__1PaYD {\n align-items: center;\n justify-content: center;\n }\n\n .ButtonIcon-module_bui-ButtonIcon__1PaYD[data-size='small'] {\n padding: 0;\n width: 2rem;\n }\n\n .ButtonIcon-module_bui-ButtonIcon__1PaYD[data-size='medium'] {\n padding: 0;\n width: 2.5rem;\n }\n}\n";
4
- var stylesButtonIcon = {"bui-ButtonIcon":"ButtonIcon-module_bui-ButtonIcon__1PaYD"};
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__8091494e93 {\n align-items: center;\n justify-content: center;\n }\n\n .ButtonIcon_bui-ButtonIcon__8091494e93[data-size='small'] {\n padding: 0;\n width: 2rem;\n }\n\n .ButtonIcon_bui-ButtonIcon__8091494e93[data-size='medium'] {\n padding: 0;\n width: 2.5rem;\n }\n}\n";
4
+ var stylesButtonIcon = {"bui-ButtonIcon":"ButtonIcon_bui-ButtonIcon__8091494e93"};
5
5
  styleInject(css_248z);
6
6
 
7
7
  export { stylesButtonIcon as default };
@@ -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 .Card-module_bui-Card__3nX8A {\n display: flex;\n flex-direction: column;\n gap: var(--bui-space-3);\n background-color: var(--bui-bg-surface-1);\n border-radius: var(--bui-radius-3);\n padding-block: var(--bui-space-3);\n color: var(--bui-fg-primary);\n border: 1px solid var(--bui-border);\n overflow: hidden;\n min-height: 0;\n width: 100%;\n }\n\n .Card-module_bui-CardBody__GqqG_ {\n flex: 1;\n min-height: 0;\n overflow: auto;\n padding-inline: var(--bui-space-3);\n }\n\n .Card-module_bui-CardHeader__gQjh1 {\n padding-inline: var(--bui-space-3);\n }\n\n .Card-module_bui-CardFooter__3t062 {\n padding-inline: var(--bui-space-3);\n }\n}\n";
4
- var styles = {"bui-Card":"Card-module_bui-Card__3nX8A","bui-CardBody":"Card-module_bui-CardBody__GqqG_","bui-CardHeader":"Card-module_bui-CardHeader__gQjh1","bui-CardFooter":"Card-module_bui-CardFooter__3t062"};
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 .Card_bui-Card__2625fd3ebb {\n display: flex;\n flex-direction: column;\n gap: var(--bui-space-3);\n background-color: var(--bui-bg-surface-1);\n border-radius: var(--bui-radius-3);\n padding-block: var(--bui-space-3);\n color: var(--bui-fg-primary);\n border: 1px solid var(--bui-border);\n overflow: hidden;\n min-height: 0;\n width: 100%;\n }\n\n .Card_bui-CardBody__2625fd3ebb {\n flex: 1;\n min-height: 0;\n overflow: auto;\n padding-inline: var(--bui-space-3);\n }\n\n .Card_bui-CardHeader__2625fd3ebb {\n padding-inline: var(--bui-space-3);\n }\n\n .Card_bui-CardFooter__2625fd3ebb {\n padding-inline: var(--bui-space-3);\n }\n}\n";
4
+ var styles = {"bui-Card":"Card_bui-Card__2625fd3ebb","bui-CardBody":"Card_bui-CardBody__2625fd3ebb","bui-CardHeader":"Card_bui-CardHeader__2625fd3ebb","bui-CardFooter":"Card_bui-CardFooter__2625fd3ebb"};
5
5
  styleInject(css_248z);
6
6
 
7
7
  export { styles as default };
@@ -1,32 +1,35 @@
1
- import { jsxs, jsx } from 'react/jsx-runtime';
1
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
2
  import { forwardRef } from 'react';
3
3
  import { Checkbox as Checkbox$1 } from 'react-aria-components';
4
4
  import { useStyles } from '../../hooks/useStyles.esm.js';
5
5
  import { CheckboxDefinition } from './definition.esm.js';
6
6
  import clsx from 'clsx';
7
7
  import styles from './Checkbox.module.css.esm.js';
8
- import { RiCheckLine } from '@remixicon/react';
8
+ import { RiSubtractLine, RiCheckLine } from '@remixicon/react';
9
9
 
10
10
  const Checkbox = forwardRef(
11
11
  (props, ref) => {
12
12
  const { classNames } = useStyles(CheckboxDefinition);
13
13
  const { className, children, ...rest } = props;
14
- return /* @__PURE__ */ jsxs(
14
+ return /* @__PURE__ */ jsx(
15
15
  Checkbox$1,
16
16
  {
17
17
  ref,
18
18
  className: clsx(classNames.root, styles[classNames.root], className),
19
19
  ...rest,
20
- children: [
20
+ children: ({ isIndeterminate }) => /* @__PURE__ */ jsxs(Fragment, { children: [
21
21
  /* @__PURE__ */ jsx(
22
22
  "div",
23
23
  {
24
- className: clsx(classNames.indicator, styles[classNames.indicator]),
25
- children: /* @__PURE__ */ jsx(RiCheckLine, { size: 12 })
24
+ className: clsx(
25
+ classNames.indicator,
26
+ styles[classNames.indicator]
27
+ ),
28
+ children: isIndeterminate ? /* @__PURE__ */ jsx(RiSubtractLine, { size: 12 }) : /* @__PURE__ */ jsx(RiCheckLine, { size: 12 })
26
29
  }
27
30
  ),
28
31
  children
29
- ]
32
+ ] })
30
33
  }
31
34
  );
32
35
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.esm.js","sources":["../../../src/components/Checkbox/Checkbox.tsx"],"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 { forwardRef } from 'react';\nimport { Checkbox as RACheckbox } from 'react-aria-components';\nimport type { CheckboxProps } from './types';\nimport { useStyles } from '../../hooks/useStyles';\nimport { CheckboxDefinition } from './definition';\nimport clsx from 'clsx';\nimport styles from './Checkbox.module.css';\nimport { RiCheckLine } from '@remixicon/react';\n\n/** @public */\nexport const Checkbox = forwardRef<HTMLLabelElement, CheckboxProps>(\n (props, ref) => {\n const { classNames } = useStyles(CheckboxDefinition);\n const { className, children, ...rest } = props;\n\n return (\n <RACheckbox\n ref={ref}\n className={clsx(classNames.root, styles[classNames.root], className)}\n {...rest}\n >\n <div\n className={clsx(classNames.indicator, styles[classNames.indicator])}\n >\n <RiCheckLine size={12} />\n </div>\n {children}\n </RACheckbox>\n );\n },\n);\n"],"names":["RACheckbox"],"mappings":";;;;;;;;;AA0BO,MAAM,QAAA,GAAW,UAAA;AAAA,EACtB,CAAC,OAAO,GAAA,KAAQ;AACd,IAAA,MAAM,EAAE,UAAA,EAAW,GAAI,SAAA,CAAU,kBAAkB,CAAA;AACnD,IAAA,MAAM,EAAE,SAAA,EAAW,QAAA,EAAU,GAAG,MAAK,GAAI,KAAA;AAEzC,IAAA,uBACE,IAAA;AAAA,MAACA,UAAA;AAAA,MAAA;AAAA,QACC,GAAA;AAAA,QACA,SAAA,EAAW,KAAK,UAAA,CAAW,IAAA,EAAM,OAAO,UAAA,CAAW,IAAI,GAAG,SAAS,CAAA;AAAA,QAClE,GAAG,IAAA;AAAA,QAEJ,QAAA,EAAA;AAAA,0BAAA,GAAA;AAAA,YAAC,KAAA;AAAA,YAAA;AAAA,cACC,WAAW,IAAA,CAAK,UAAA,CAAW,WAAW,MAAA,CAAO,UAAA,CAAW,SAAS,CAAC,CAAA;AAAA,cAElE,QAAA,kBAAA,GAAA,CAAC,WAAA,EAAA,EAAY,IAAA,EAAM,EAAA,EAAI;AAAA;AAAA,WACzB;AAAA,UACC;AAAA;AAAA;AAAA,KACH;AAAA,EAEJ;AACF;;;;"}
1
+ {"version":3,"file":"Checkbox.esm.js","sources":["../../../src/components/Checkbox/Checkbox.tsx"],"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 { forwardRef } from 'react';\nimport { Checkbox as RACheckbox } from 'react-aria-components';\nimport type { CheckboxProps } from './types';\nimport { useStyles } from '../../hooks/useStyles';\nimport { CheckboxDefinition } from './definition';\nimport clsx from 'clsx';\nimport styles from './Checkbox.module.css';\nimport { RiCheckLine, RiSubtractLine } from '@remixicon/react';\n\n/** @public */\nexport const Checkbox = forwardRef<HTMLLabelElement, CheckboxProps>(\n (props, ref) => {\n const { classNames } = useStyles(CheckboxDefinition);\n const { className, children, ...rest } = props;\n\n return (\n <RACheckbox\n ref={ref}\n className={clsx(classNames.root, styles[classNames.root], className)}\n {...rest}\n >\n {({ isIndeterminate }) => (\n <>\n <div\n className={clsx(\n classNames.indicator,\n styles[classNames.indicator],\n )}\n >\n {isIndeterminate ? (\n <RiSubtractLine size={12} />\n ) : (\n <RiCheckLine size={12} />\n )}\n </div>\n {children}\n </>\n )}\n </RACheckbox>\n );\n },\n);\n"],"names":["RACheckbox"],"mappings":";;;;;;;;;AA0BO,MAAM,QAAA,GAAW,UAAA;AAAA,EACtB,CAAC,OAAO,GAAA,KAAQ;AACd,IAAA,MAAM,EAAE,UAAA,EAAW,GAAI,SAAA,CAAU,kBAAkB,CAAA;AACnD,IAAA,MAAM,EAAE,SAAA,EAAW,QAAA,EAAU,GAAG,MAAK,GAAI,KAAA;AAEzC,IAAA,uBACE,GAAA;AAAA,MAACA,UAAA;AAAA,MAAA;AAAA,QACC,GAAA;AAAA,QACA,SAAA,EAAW,KAAK,UAAA,CAAW,IAAA,EAAM,OAAO,UAAA,CAAW,IAAI,GAAG,SAAS,CAAA;AAAA,QAClE,GAAG,IAAA;AAAA,QAEH,QAAA,EAAA,CAAC,EAAE,eAAA,EAAgB,qBAClB,IAAA,CAAA,QAAA,EAAA,EACE,QAAA,EAAA;AAAA,0BAAA,GAAA;AAAA,YAAC,KAAA;AAAA,YAAA;AAAA,cACC,SAAA,EAAW,IAAA;AAAA,gBACT,UAAA,CAAW,SAAA;AAAA,gBACX,MAAA,CAAO,WAAW,SAAS;AAAA,eAC7B;AAAA,cAEC,QAAA,EAAA,eAAA,uBACE,cAAA,EAAA,EAAe,IAAA,EAAM,IAAI,CAAA,mBAE1B,GAAA,CAAC,WAAA,EAAA,EAAY,IAAA,EAAM,EAAA,EAAI;AAAA;AAAA,WAE3B;AAAA,UACC;AAAA,SAAA,EACH;AAAA;AAAA,KAEJ;AAAA,EAEJ;AACF;;;;"}
@@ -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 .Checkbox-module_bui-Checkbox__1Oiwl {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: var(--bui-space-2);\n font-size: var(--bui-font-size-3);\n font-family: var(--bui-font-regular);\n font-weight: var(--bui-font-weight-regular);\n color: var(--bui-fg-primary);\n user-select: none;\n cursor: pointer;\n }\n\n .Checkbox-module_bui-Checkbox__1Oiwl[data-disabled] {\n cursor: not-allowed;\n opacity: 0.5;\n }\n\n .Checkbox-module_bui-CheckboxIndicator__2ZJtl {\n border: none;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 1rem;\n height: 1rem;\n box-shadow: inset 0 0 0 1px var(--bui-border);\n border-radius: 2px;\n transition: background-color 0.2s ease-in-out;\n background-color: var(--bui-bg-surface-1);\n padding: 0;\n flex-shrink: 0;\n color: transparent;\n\n .Checkbox-module_bui-Checkbox__1Oiwl[data-focus-visible] & {\n transition: none;\n outline: 2px solid var(--bui-ring);\n outline-offset: 2px;\n }\n\n .Checkbox-module_bui-Checkbox__1Oiwl[data-selected] & {\n background-color: var(--bui-bg-solid);\n box-shadow: none;\n color: var(--bui-fg-solid);\n }\n\n .Checkbox-module_bui-Checkbox__1Oiwl[data-hovered]:not([data-selected]) & {\n box-shadow: inset 0 0 0 1px var(--bui-border-hover);\n }\n\n @media (prefers-reduced-motion: reduce) {\n & {\n transition: none;\n }\n }\n }\n}\n";
4
- var styles = {"bui-Checkbox":"Checkbox-module_bui-Checkbox__1Oiwl","bui-CheckboxIndicator":"Checkbox-module_bui-CheckboxIndicator__2ZJtl"};
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 .Checkbox_bui-Checkbox__74dcbb2139 {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: var(--bui-space-2);\n font-size: var(--bui-font-size-3);\n font-family: var(--bui-font-regular);\n font-weight: var(--bui-font-weight-regular);\n color: var(--bui-fg-primary);\n user-select: none;\n cursor: pointer;\n }\n\n .Checkbox_bui-Checkbox__74dcbb2139[data-disabled] {\n cursor: not-allowed;\n opacity: 0.5;\n }\n\n .Checkbox_bui-CheckboxIndicator__74dcbb2139 {\n border: none;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 1rem;\n height: 1rem;\n box-shadow: inset 0 0 0 1px var(--bui-border);\n border-radius: 2px;\n transition: background-color 0.2s ease-in-out;\n background-color: var(--bui-bg-surface-1);\n padding: 0;\n flex-shrink: 0;\n color: transparent;\n\n .Checkbox_bui-Checkbox__74dcbb2139[data-focus-visible] & {\n transition: none;\n outline: 2px solid var(--bui-ring);\n outline-offset: 2px;\n }\n\n .Checkbox_bui-Checkbox__74dcbb2139[data-selected] & {\n background-color: var(--bui-bg-solid);\n box-shadow: none;\n color: var(--bui-fg-solid);\n }\n\n .Checkbox_bui-Checkbox__74dcbb2139[data-indeterminate] & {\n background-color: var(--bui-bg-surface-1);\n box-shadow: inset 0 0 0 1px var(--bui-border);\n color: var(--bui-fg-primary);\n }\n\n .Checkbox_bui-Checkbox__74dcbb2139[data-hovered]:not([data-selected]):not([data-indeterminate])\n & {\n box-shadow: inset 0 0 0 1px var(--bui-border-hover);\n }\n\n @media (prefers-reduced-motion: reduce) {\n & {\n transition: none;\n }\n }\n }\n}\n";
4
+ var styles = {"bui-Checkbox":"Checkbox_bui-Checkbox__74dcbb2139","bui-CheckboxIndicator":"Checkbox_bui-CheckboxIndicator__74dcbb2139"};
5
5
  styleInject(css_248z);
6
6
 
7
7
  export { styles as default };