overflow-toolbar 0.1.7 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +53 -38
- package/dist/components/MuiOverflow/MuiOverflow.js +3 -2
- package/dist/components/MuiOverflow/MuiOverflow.js.map +1 -1
- package/dist/components/MuiOverflow/MuiOverflowItem.d.ts +6 -6
- package/dist/components/MuiOverflow/MuiOverflowItem.d.ts.map +1 -1
- package/dist/components/MuiOverflow/MuiOverflowItem.js +9 -8
- package/dist/components/MuiOverflow/MuiOverflowItem.js.map +1 -1
- package/dist/components/MuiOverflow/MuiOverflowMenu.d.ts +7 -6
- package/dist/components/MuiOverflow/MuiOverflowMenu.d.ts.map +1 -1
- package/dist/components/MuiOverflow/MuiOverflowMenu.js +7 -6
- package/dist/components/MuiOverflow/MuiOverflowMenu.js.map +1 -1
- package/dist/components/MuiOverflow/index.d.ts +1 -0
- package/dist/components/MuiOverflow/index.d.ts.map +1 -1
- package/dist/components/NoFrameworkOverflow/NoFrameworkOverflow.d.ts +3 -0
- package/dist/components/NoFrameworkOverflow/NoFrameworkOverflow.d.ts.map +1 -1
- package/dist/components/NoFrameworkOverflow/NoFrameworkOverflow.js +21 -17
- package/dist/components/NoFrameworkOverflow/NoFrameworkOverflow.js.map +1 -1
- package/dist/components/NoFrameworkOverflow/index.d.ts +2 -0
- package/dist/components/NoFrameworkOverflow/index.d.ts.map +1 -1
- package/dist/components/NoFrameworkOverflow/noframework.css +1 -110
- package/dist/components/Overflow/Overflow.css +1 -1
- package/dist/components/Overflow/Overflow.d.ts +8 -1
- package/dist/components/Overflow/Overflow.d.ts.map +1 -1
- package/dist/components/Overflow/Overflow.js +37 -29
- package/dist/components/Overflow/Overflow.js.map +1 -1
- package/dist/components/Overflow/OverflowController.d.ts +2 -1
- package/dist/components/Overflow/OverflowController.d.ts.map +1 -1
- package/dist/components/Overflow/OverflowController.js +52 -44
- package/dist/components/Overflow/OverflowController.js.map +1 -1
- package/dist/components/Overflow/OverflowItem.d.ts +10 -6
- package/dist/components/Overflow/OverflowItem.d.ts.map +1 -1
- package/dist/components/Overflow/OverflowItem.js +20 -11
- package/dist/components/Overflow/OverflowItem.js.map +1 -1
- package/dist/components/Overflow/OverflowMenu.d.ts +18 -6
- package/dist/components/Overflow/OverflowMenu.d.ts.map +1 -1
- package/dist/components/Overflow/OverflowMenu.js +37 -26
- package/dist/components/Overflow/OverflowMenu.js.map +1 -1
- package/dist/components/Overflow/index.d.ts +2 -1
- package/dist/components/Overflow/index.d.ts.map +1 -1
- package/dist/components/Overflow/overflowSteps.d.ts +10 -6
- package/dist/components/Overflow/overflowSteps.d.ts.map +1 -1
- package/dist/components/Overflow/overflowSteps.js +34 -23
- package/dist/components/Overflow/overflowSteps.js.map +1 -1
- package/dist/components/Overflow/useResizer.d.ts +1 -1
- package/dist/components/Overflow/useResizer.d.ts.map +1 -1
- package/dist/components/Overflow/useResizer.js +12 -12
- package/dist/components/Overflow/useResizer.js.map +1 -1
- package/dist/components/RxOverflow/RxOverflow.d.ts +0 -1
- package/dist/components/RxOverflow/RxOverflow.d.ts.map +1 -1
- package/dist/components/RxOverflow/RxOverflow.js +1 -1
- package/dist/components/RxOverflow/RxOverflow.js.map +1 -1
- package/dist/components/RxOverflow/RxOverflowItem.d.ts +6 -6
- package/dist/components/RxOverflow/RxOverflowItem.d.ts.map +1 -1
- package/dist/components/RxOverflow/RxOverflowItem.js +7 -6
- package/dist/components/RxOverflow/RxOverflowItem.js.map +1 -1
- package/dist/components/RxOverflow/RxOverflowMenu.d.ts +7 -6
- package/dist/components/RxOverflow/RxOverflowMenu.d.ts.map +1 -1
- package/dist/components/RxOverflow/RxOverflowMenu.js +20 -17
- package/dist/components/RxOverflow/RxOverflowMenu.js.map +1 -1
- package/dist/components/RxOverflow/index.d.ts +2 -0
- package/dist/components/RxOverflow/index.d.ts.map +1 -1
- package/dist/index.js +30 -27
- package/dist/index.js.map +1 -1
- package/dist/mui.js +7 -6
- package/dist/mui.js.map +1 -1
- package/dist/overflow.js +7 -6
- package/dist/overflow.js.map +1 -1
- package/dist/rx.js +10 -8
- package/dist/rx.js.map +1 -1
- package/dist/vanilla.js +4 -2
- package/dist/vanilla.js.map +1 -1
- package/package.json +2 -14
- package/styles.d.ts +0 -3
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ A responsive toolbar overflow component that automatically collapses items into
|
|
|
14
14
|
- **Automatic overflow detection** — items collapse into a menu as the container narrows using ResizeObserver
|
|
15
15
|
- **Three item states** — visible, min (icon-only), and hidden (in menu)
|
|
16
16
|
- **Compact mode** — items collapse one at a time instead of all at once
|
|
17
|
-
- **Reverse mode** — collapse from the
|
|
17
|
+
- **Reverse mode** — collapse from the right instead of the left
|
|
18
18
|
- **Menu-only items** — items that always live in the dropdown (e.g. Help, About)
|
|
19
19
|
- **Min state** — items shrink to icon-only before being fully hidden
|
|
20
20
|
- **Three implementations** — React/Radix UI (shadcn-compatible), Material UI, and vanilla JavaScript
|
|
@@ -33,17 +33,15 @@ npm install overflow-toolbar
|
|
|
33
33
|
|
|
34
34
|
```tsx
|
|
35
35
|
import { RxOverflow, RxOverflowItem, RxOverflowMenu } from 'overflow-toolbar/rx';
|
|
36
|
-
import 'overflow-toolbar/rx/styles';
|
|
37
|
-
import 'overflow-toolbar/styles';
|
|
38
36
|
|
|
39
37
|
<RxOverflow style={{ gap: 8 }}>
|
|
40
38
|
<RxOverflowMenu opener={<button>More</button>}>
|
|
41
|
-
<RxOverflowItem
|
|
42
|
-
<RxOverflowItem
|
|
39
|
+
<RxOverflowItem menuId="format"><button>Format</button></RxOverflowItem>
|
|
40
|
+
<RxOverflowItem menuId="filter"><button>Filters</button></RxOverflowItem>
|
|
43
41
|
</RxOverflowMenu>
|
|
44
42
|
|
|
45
|
-
<RxOverflowItem
|
|
46
|
-
<RxOverflowItem
|
|
43
|
+
<RxOverflowItem menuId="format"><button>Format</button></RxOverflowItem>
|
|
44
|
+
<RxOverflowItem menuId="filter"><button>Filters</button></RxOverflowItem>
|
|
47
45
|
</RxOverflow>
|
|
48
46
|
```
|
|
49
47
|
|
|
@@ -51,17 +49,16 @@ import 'overflow-toolbar/styles';
|
|
|
51
49
|
|
|
52
50
|
```tsx
|
|
53
51
|
import { MuiOverflow, MuiOverflowItem, MuiOverflowMenu } from 'overflow-toolbar/mui';
|
|
54
|
-
import 'overflow-toolbar/styles';
|
|
55
52
|
import { Button, MenuItem } from '@mui/material';
|
|
56
53
|
|
|
57
54
|
<MuiOverflow sx={{ gap: 1 }}>
|
|
58
55
|
<MuiOverflowMenu opener={<Button>More</Button>}>
|
|
59
|
-
<MuiOverflowItem
|
|
60
|
-
<MuiOverflowItem
|
|
56
|
+
<MuiOverflowItem menuId="format"><MenuItem>Format</MenuItem></MuiOverflowItem>
|
|
57
|
+
<MuiOverflowItem menuId="filter"><MenuItem>Filters</MenuItem></MuiOverflowItem>
|
|
61
58
|
</MuiOverflowMenu>
|
|
62
59
|
|
|
63
|
-
<MuiOverflowItem
|
|
64
|
-
<MuiOverflowItem
|
|
60
|
+
<MuiOverflowItem menuId="format"><Button>Format</Button></MuiOverflowItem>
|
|
61
|
+
<MuiOverflowItem menuId="filter"><Button>Filters</Button></MuiOverflowItem>
|
|
65
62
|
</MuiOverflow>
|
|
66
63
|
```
|
|
67
64
|
|
|
@@ -69,8 +66,6 @@ import { Button, MenuItem } from '@mui/material';
|
|
|
69
66
|
|
|
70
67
|
```js
|
|
71
68
|
import { OverflowToolbar } from 'overflow-toolbar/vanilla';
|
|
72
|
-
import 'overflow-toolbar/vanilla/styles';
|
|
73
|
-
import 'overflow-toolbar/styles';
|
|
74
69
|
|
|
75
70
|
const ul = document.querySelector('#my-toolbar');
|
|
76
71
|
const toolbar = new OverflowToolbar(ul);
|
|
@@ -84,14 +79,14 @@ const toolbar = new OverflowToolbar(ul);
|
|
|
84
79
|
<li data-overflow-role="menu">
|
|
85
80
|
<button data-menu-trigger>More</button>
|
|
86
81
|
<div data-menu-panel>
|
|
87
|
-
<button data-
|
|
88
|
-
<button data-
|
|
82
|
+
<button data-menu-id="format">Format</button>
|
|
83
|
+
<button data-menu-id="filter">Filters</button>
|
|
89
84
|
</div>
|
|
90
85
|
</li>
|
|
91
|
-
<li data-overflow-role="item" data-
|
|
86
|
+
<li data-overflow-role="item" data-menu-id="format">
|
|
92
87
|
<button>Format</button>
|
|
93
88
|
</li>
|
|
94
|
-
<li data-overflow-role="item" data-
|
|
89
|
+
<li data-overflow-role="item" data-menu-id="filter">
|
|
95
90
|
<button>Filters</button>
|
|
96
91
|
</li>
|
|
97
92
|
</ul>
|
|
@@ -108,9 +103,8 @@ Import only what you need for optimal tree-shaking:
|
|
|
108
103
|
| `overflow-toolbar/rx` | Radix UI / shadcn variant (`RxOverflow`, `RxOverflowItem`, `RxOverflowMenu`) |
|
|
109
104
|
| `overflow-toolbar/mui` | Material UI variant (`MuiOverflow`, `MuiOverflowItem`, `MuiOverflowMenu`) |
|
|
110
105
|
| `overflow-toolbar/vanilla` | Vanilla JS (`OverflowToolbar`) |
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
| `overflow-toolbar/vanilla/styles` | Vanilla JS styles |
|
|
106
|
+
|
|
107
|
+
CSS is included automatically when you import any subpath — no separate style imports needed.
|
|
114
108
|
|
|
115
109
|
## API
|
|
116
110
|
|
|
@@ -122,29 +116,50 @@ The container component. Wraps toolbar items and the overflow menu.
|
|
|
122
116
|
|---|---|---|---|
|
|
123
117
|
| `children` | `ReactNode` | — | Overflow items and menu |
|
|
124
118
|
| `compact` | `boolean` | `false` | Collapse items one at a time |
|
|
125
|
-
| `reverse` | `boolean` | `false` | Collapse from the
|
|
119
|
+
| `reverse` | `boolean` | `false` | Collapse from the right |
|
|
126
120
|
| `className` | `string` | — | CSS class name |
|
|
127
121
|
| `style` | `CSSProperties` | — | Inline styles |
|
|
128
122
|
| `sx` | `SxProps` | — | MUI system props (MUI only) |
|
|
129
123
|
|
|
130
124
|
### `OverflowItem` / `RxOverflowItem` / `MuiOverflowItem`
|
|
131
125
|
|
|
132
|
-
Wraps each toolbar item. Place matching items in both the toolbar and the menu, linked by `
|
|
126
|
+
Wraps each toolbar item. Place matching items in both the toolbar and the menu, linked by `menuId`.
|
|
133
127
|
|
|
134
128
|
| Prop | Type | Default | Description |
|
|
135
129
|
|---|---|---|---|
|
|
136
130
|
| `children` | `ReactNode` | — | Item content |
|
|
137
|
-
| `
|
|
131
|
+
| `menuId` | `string` | — | Links toolbar item to its menu counterpart |
|
|
138
132
|
| `minStateWidth` | `string` \| `number` | — | Width in min state (`string` for Rx, `number` for MUI spacing units) |
|
|
139
133
|
|
|
140
134
|
### `OverflowMenu` / `RxOverflowMenu` / `MuiOverflowMenu`
|
|
141
135
|
|
|
142
136
|
The dropdown menu container. Must include an `opener` element (the trigger button).
|
|
143
137
|
|
|
144
|
-
| Prop | Type | Description |
|
|
145
|
-
|
|
146
|
-
| `children` | `ReactNode` | Menu items |
|
|
147
|
-
| `opener` | `ReactNode` | The button that opens the menu |
|
|
138
|
+
| Prop | Type | Default | Description |
|
|
139
|
+
|---|---|---|---|
|
|
140
|
+
| `children` | `ReactNode` | — | Menu items |
|
|
141
|
+
| `opener` | `ReactNode` | — | The button that opens the menu |
|
|
142
|
+
| `open` | `boolean` | — | Controlled open state. When provided, you manage open/close. |
|
|
143
|
+
| `onOpenChange` | `(open: boolean) => void` | — | Called when the menu opens or closes. Use alone for notifications, or with `open` for full control. |
|
|
144
|
+
|
|
145
|
+
#### Controlled Menu
|
|
146
|
+
|
|
147
|
+
By default, the menu manages its own open/close state. To control it programmatically, pass `open` and `onOpenChange`:
|
|
148
|
+
|
|
149
|
+
```tsx
|
|
150
|
+
const [menuOpen, setMenuOpen] = useState(false);
|
|
151
|
+
|
|
152
|
+
<RxOverflowMenu
|
|
153
|
+
opener={<button>More</button>}
|
|
154
|
+
open={menuOpen}
|
|
155
|
+
onOpenChange={setMenuOpen}
|
|
156
|
+
>
|
|
157
|
+
{/* items */}
|
|
158
|
+
</RxOverflowMenu>
|
|
159
|
+
|
|
160
|
+
// Close programmatically from anywhere:
|
|
161
|
+
setMenuOpen(false);
|
|
162
|
+
```
|
|
148
163
|
|
|
149
164
|
### `OverflowController`
|
|
150
165
|
|
|
@@ -166,15 +181,15 @@ The overflow engine scans immediate children for internal role markers to measur
|
|
|
166
181
|
{/* WRONG — wrapper breaks overflow behavior */}
|
|
167
182
|
<RxOverflow>
|
|
168
183
|
<div className="group">
|
|
169
|
-
<RxOverflowItem
|
|
170
|
-
<RxOverflowItem
|
|
184
|
+
<RxOverflowItem menuId="a"><button>A</button></RxOverflowItem>
|
|
185
|
+
<RxOverflowItem menuId="b"><button>B</button></RxOverflowItem>
|
|
171
186
|
</div>
|
|
172
187
|
</RxOverflow>
|
|
173
188
|
|
|
174
189
|
{/* CORRECT — items are direct children */}
|
|
175
190
|
<RxOverflow>
|
|
176
|
-
<RxOverflowItem
|
|
177
|
-
<RxOverflowItem
|
|
191
|
+
<RxOverflowItem menuId="a"><button>A</button></RxOverflowItem>
|
|
192
|
+
<RxOverflowItem menuId="b"><button>B</button></RxOverflowItem>
|
|
178
193
|
</RxOverflow>
|
|
179
194
|
```
|
|
180
195
|
|
|
@@ -194,7 +209,7 @@ Items collapse one at a time with tight spacing. Adjacent buttons get squared-of
|
|
|
194
209
|
|
|
195
210
|
### Reverse Mode
|
|
196
211
|
|
|
197
|
-
Items collapse from the
|
|
212
|
+
Items collapse from the right side first instead of the left:
|
|
198
213
|
|
|
199
214
|
```tsx
|
|
200
215
|
<RxOverflow reverse>
|
|
@@ -207,7 +222,7 @@ Items collapse from the left side first instead of the right:
|
|
|
207
222
|
Items shrink to a fixed width (icon-only) before being fully hidden:
|
|
208
223
|
|
|
209
224
|
```tsx
|
|
210
|
-
<RxOverflowItem
|
|
225
|
+
<RxOverflowItem menuId="format" minStateWidth="2.25rem">
|
|
211
226
|
<button><FormatIcon /> Format</button>
|
|
212
227
|
</RxOverflowItem>
|
|
213
228
|
```
|
|
@@ -215,18 +230,18 @@ Items shrink to a fixed width (icon-only) before being fully hidden:
|
|
|
215
230
|
For MUI, `minStateWidth` accepts a number (theme spacing units):
|
|
216
231
|
|
|
217
232
|
```tsx
|
|
218
|
-
<MuiOverflowItem
|
|
233
|
+
<MuiOverflowItem menuId="format" minStateWidth={5}>
|
|
219
234
|
<Button><FormatIcon /> Format</Button>
|
|
220
235
|
</MuiOverflowItem>
|
|
221
236
|
```
|
|
222
237
|
|
|
223
238
|
### Menu-Only Items
|
|
224
239
|
|
|
225
|
-
Items without a `
|
|
240
|
+
Items without a `menuId` always stay where they are — in the toolbar or in the menu:
|
|
226
241
|
|
|
227
242
|
```tsx
|
|
228
243
|
<RxOverflowMenu opener={<button>More</button>}>
|
|
229
|
-
<RxOverflowItem
|
|
244
|
+
<RxOverflowItem menuId="format"><button>Format</button></RxOverflowItem>
|
|
230
245
|
{/* Always in the menu */}
|
|
231
246
|
<RxOverflowItem><div role="separator" /></RxOverflowItem>
|
|
232
247
|
<RxOverflowItem><button>Help</button></RxOverflowItem>
|
|
@@ -241,7 +256,7 @@ The vanilla implementation uses `data-` attributes for configuration:
|
|
|
241
256
|
|---|---|---|
|
|
242
257
|
| `data-overflow-role="item"` | `<li>` | Marks a toolbar item |
|
|
243
258
|
| `data-overflow-role="menu"` | `<li>` | Marks the menu container |
|
|
244
|
-
| `data-
|
|
259
|
+
| `data-menu-id` | `<li>`, menu item | Links toolbar and menu items |
|
|
245
260
|
| `data-min-state-width` | `<li>` | Min-state width (CSS value) |
|
|
246
261
|
| `data-menu-trigger` | `<button>` | The menu open/close button |
|
|
247
262
|
| `data-menu-panel` | `<div>` | The menu panel (uses Popover API) |
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import '../Overflow/Overflow.css';
|
|
1
2
|
import { styled as o } from "@mui/material/styles";
|
|
2
3
|
import r from "../Overflow/Overflow.js";
|
|
3
|
-
const
|
|
4
|
+
const m = o(r)({});
|
|
4
5
|
export {
|
|
5
|
-
|
|
6
|
+
m as default
|
|
6
7
|
};
|
|
7
8
|
//# sourceMappingURL=MuiOverflow.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MuiOverflow.js","sources":["../../../src/components/MuiOverflow/MuiOverflow.tsx"],"sourcesContent":["import { styled } from '@mui/material/styles';\nimport type { OverflowProps } from '../Overflow';\nimport { Overflow } from '../Overflow';\n\nconst MuiOverflow: React.ComponentType<OverflowProps> = styled(Overflow)({});\n\nexport default MuiOverflow;\n"],"names":["MuiOverflow","styled","Overflow"],"mappings":"
|
|
1
|
+
{"version":3,"file":"MuiOverflow.js","sources":["../../../src/components/MuiOverflow/MuiOverflow.tsx"],"sourcesContent":["import { styled } from '@mui/material/styles';\nimport type { OverflowProps } from '../Overflow';\nimport { Overflow } from '../Overflow';\n\nconst MuiOverflow: React.ComponentType<OverflowProps> = styled(Overflow)({});\n\nexport default MuiOverflow;\n"],"names":["MuiOverflow","styled","Overflow"],"mappings":";;;AAIA,MAAMA,IAAkDC,EAAOC,CAAQ,EAAE,CAAA,CAAE;"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
interface MuiOverflowItemProps {
|
|
3
3
|
children: ReactNode;
|
|
4
|
-
|
|
4
|
+
menuId?: string;
|
|
5
5
|
minStateWidth?: number;
|
|
6
6
|
}
|
|
7
|
-
declare function MuiOverflowItem({ children,
|
|
8
|
-
declare
|
|
9
|
-
overflowRole: "item";
|
|
10
|
-
}
|
|
11
|
-
export default
|
|
7
|
+
declare function MuiOverflowItem({ children, menuId, minStateWidth }: MuiOverflowItemProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare namespace MuiOverflowItem {
|
|
9
|
+
var overflowRole: "item";
|
|
10
|
+
}
|
|
11
|
+
export default MuiOverflowItem;
|
|
12
12
|
//# sourceMappingURL=MuiOverflowItem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MuiOverflowItem.d.ts","sourceRoot":"","sources":["../../../src/components/MuiOverflow/MuiOverflowItem.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,UAAU,oBAAoB;IAC5B,QAAQ,EAAE,SAAS,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,iBAAS,eAAe,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,aAAa,EAAE,EAAE,oBAAoB,2CASjF
|
|
1
|
+
{"version":3,"file":"MuiOverflowItem.d.ts","sourceRoot":"","sources":["../../../src/components/MuiOverflow/MuiOverflowItem.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,UAAU,oBAAoB;IAC5B,QAAQ,EAAE,SAAS,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,iBAAS,eAAe,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,aAAa,EAAE,EAAE,oBAAoB,2CASjF;kBATQ,eAAe;;;AAYxB,eAAe,eAAe,CAAC"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import f from "
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import '../Overflow/Overflow.css';
|
|
2
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
3
|
+
import { useTheme as f } from "@mui/material/styles";
|
|
4
|
+
import s from "../Overflow/OverflowItem.js";
|
|
5
|
+
function n({ children: e, menuId: t, minStateWidth: o }) {
|
|
6
|
+
const r = f(), m = o !== void 0 ? r.spacing(o) : void 0;
|
|
7
|
+
return /* @__PURE__ */ i(s, { menuId: t, minStateWidth: m, children: e });
|
|
7
8
|
}
|
|
8
|
-
|
|
9
|
+
n.overflowRole = "item";
|
|
9
10
|
export {
|
|
10
|
-
|
|
11
|
+
n as default
|
|
11
12
|
};
|
|
12
13
|
//# sourceMappingURL=MuiOverflowItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MuiOverflowItem.js","sources":["../../../src/components/MuiOverflow/MuiOverflowItem.tsx"],"sourcesContent":["import { useTheme } from '@mui/material/styles';\nimport type { ReactNode } from 'react';\nimport { OverflowItem } from '../Overflow';\n\ninterface MuiOverflowItemProps {\n children: ReactNode;\n
|
|
1
|
+
{"version":3,"file":"MuiOverflowItem.js","sources":["../../../src/components/MuiOverflow/MuiOverflowItem.tsx"],"sourcesContent":["import { useTheme } from '@mui/material/styles';\nimport type { ReactNode } from 'react';\nimport { OverflowItem } from '../Overflow';\n\ninterface MuiOverflowItemProps {\n children: ReactNode;\n menuId?: string;\n minStateWidth?: number;\n}\n\nfunction MuiOverflowItem({ children, menuId, minStateWidth }: MuiOverflowItemProps) {\n const theme = useTheme();\n const cssWidth = minStateWidth !== undefined ? theme.spacing(minStateWidth) : undefined;\n\n return (\n <OverflowItem menuId={menuId} minStateWidth={cssWidth}>\n {children}\n </OverflowItem>\n );\n}\n\nMuiOverflowItem.overflowRole = 'item' as const;\nexport default MuiOverflowItem;\n"],"names":["MuiOverflowItem","children","menuId","minStateWidth","theme","useTheme","cssWidth","jsx","OverflowItem"],"mappings":";;;;AAUA,SAASA,EAAgB,EAAE,UAAAC,GAAU,QAAAC,GAAQ,eAAAC,KAAuC;AAClF,QAAMC,IAAQC,EAAA,GACRC,IAAWH,MAAkB,SAAYC,EAAM,QAAQD,CAAa,IAAI;AAE9E,SACE,gBAAAI,EAACC,GAAA,EAAa,QAAAN,GAAgB,eAAeI,GAC1C,UAAAL,GACH;AAEJ;AAEAD,EAAgB,eAAe;"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
-
|
|
2
|
+
import { type OverflowMenuControlProps } from '../Overflow';
|
|
3
|
+
interface MuiOverflowMenuProps extends OverflowMenuControlProps {
|
|
3
4
|
opener: ReactNode;
|
|
4
5
|
children: ReactNode;
|
|
5
6
|
}
|
|
6
|
-
declare function MuiOverflowMenu({ opener, children }: MuiOverflowMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
declare
|
|
8
|
-
overflowRole: "menu";
|
|
9
|
-
}
|
|
10
|
-
export default
|
|
7
|
+
declare function MuiOverflowMenu({ opener, children, open, onOpenChange }: MuiOverflowMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare namespace MuiOverflowMenu {
|
|
9
|
+
var overflowRole: "menu";
|
|
10
|
+
}
|
|
11
|
+
export default MuiOverflowMenu;
|
|
11
12
|
//# sourceMappingURL=MuiOverflowMenu.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MuiOverflowMenu.d.ts","sourceRoot":"","sources":["../../../src/components/MuiOverflow/MuiOverflowMenu.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"MuiOverflowMenu.d.ts","sourceRoot":"","sources":["../../../src/components/MuiOverflow/MuiOverflowMenu.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAgB,KAAK,wBAAwB,EAAwB,MAAM,aAAa,CAAC;AAEhG,UAAU,oBAAqB,SAAQ,wBAAwB;IAC7D,MAAM,EAAE,SAAS,CAAC;IAClB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,iBAAS,eAAe,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,YAAY,EAAE,EAAE,oBAAoB,2CAYtF;kBAZQ,eAAe;;;AAexB,eAAe,eAAe,CAAC"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
import '../Overflow/Overflow.css';
|
|
1
2
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
function M({ opener: n, children: o }) {
|
|
5
|
-
return /* @__PURE__ */ r(
|
|
3
|
+
import l from "@mui/material/Menu";
|
|
4
|
+
import p from "../Overflow/OverflowMenu.js";
|
|
5
|
+
function M({ opener: n, children: o, open: u, onOpenChange: i }) {
|
|
6
|
+
return /* @__PURE__ */ r(p, { opener: n, renderMenu: ({ anchorEl: t, open: f, onClose: e, children: m }) => /* @__PURE__ */ r(l, { anchorEl: t, open: f, onClose: e, onClick: e, children: m }), open: u, onOpenChange: i, children: o });
|
|
6
7
|
}
|
|
7
|
-
|
|
8
|
+
M.overflowRole = "menu";
|
|
8
9
|
export {
|
|
9
|
-
|
|
10
|
+
M as default
|
|
10
11
|
};
|
|
11
12
|
//# sourceMappingURL=MuiOverflowMenu.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MuiOverflowMenu.js","sources":["../../../src/components/MuiOverflow/MuiOverflowMenu.tsx"],"sourcesContent":["import Menu from '@mui/material/Menu';\nimport type { ReactNode } from 'react';\nimport { OverflowMenu, type RenderMenuProps } from '../Overflow';\n\ninterface MuiOverflowMenuProps {\n opener: ReactNode;\n children: ReactNode;\n}\n\nfunction MuiOverflowMenu({ opener, children }: MuiOverflowMenuProps) {\n const renderMenu = ({ anchorEl, open, onClose, children: menuChildren }: RenderMenuProps) => (\n <Menu anchorEl={anchorEl} open={open} onClose={onClose} onClick={onClose}>\n {menuChildren}\n </Menu>\n );\n\n return (\n <OverflowMenu opener={opener} renderMenu={renderMenu}>\n {children}\n </OverflowMenu>\n );\n}\n\
|
|
1
|
+
{"version":3,"file":"MuiOverflowMenu.js","sources":["../../../src/components/MuiOverflow/MuiOverflowMenu.tsx"],"sourcesContent":["import Menu from '@mui/material/Menu';\nimport type { ReactNode } from 'react';\nimport { OverflowMenu, type OverflowMenuControlProps, type RenderMenuProps } from '../Overflow';\n\ninterface MuiOverflowMenuProps extends OverflowMenuControlProps {\n opener: ReactNode;\n children: ReactNode;\n}\n\nfunction MuiOverflowMenu({ opener, children, open, onOpenChange }: MuiOverflowMenuProps) {\n const renderMenu = ({ anchorEl, open, onClose, children: menuChildren }: RenderMenuProps) => (\n <Menu anchorEl={anchorEl} open={open} onClose={onClose} onClick={onClose}>\n {menuChildren}\n </Menu>\n );\n\n return (\n <OverflowMenu opener={opener} renderMenu={renderMenu} open={open} onOpenChange={onOpenChange}>\n {children}\n </OverflowMenu>\n );\n}\n\nMuiOverflowMenu.overflowRole = 'menu' as const;\nexport default MuiOverflowMenu;\n"],"names":["MuiOverflowMenu","opener","children","open","onOpenChange","OverflowMenu","anchorEl","onClose","menuChildren","jsx","Menu"],"mappings":";;;;AASA,SAASA,EAAgB,EAAE,QAAAC,GAAQ,UAAAC,GAAU,MAAAC,GAAM,cAAAC,KAAsC;AAOvF,2BACGC,GAAA,EAAa,QAAAJ,GAAgB,YAPb,CAAC,EAAE,UAAAK,GAAU,MAAAH,GAAM,SAAAI,GAAS,UAAUC,QACvD,gBAAAC,EAACC,KAAK,UAAAJ,GAAoB,MAAMH,GAAM,SAAAI,GAAkB,SAASA,GAC9D,UAAAC,GACH,GAIsD,MAAAL,GAAY,cAAAC,GAC/D,UAAAF,GACH;AAEJ;AAEAF,EAAgB,eAAe;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/MuiOverflow/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/MuiOverflow/index.ts"],"names":[],"mappings":"AAAA,OAAO,0BAA0B,CAAC;AAClC,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -2,11 +2,13 @@ import { type OverflowHost, type ScanResult } from '../Overflow/OverflowControll
|
|
|
2
2
|
export interface OverflowToolbarOptions {
|
|
3
3
|
compact?: boolean;
|
|
4
4
|
reverse?: boolean;
|
|
5
|
+
snap?: boolean;
|
|
5
6
|
}
|
|
6
7
|
export declare class OverflowToolbar implements OverflowHost {
|
|
7
8
|
private ul;
|
|
8
9
|
private compact;
|
|
9
10
|
private reverse;
|
|
11
|
+
private snap;
|
|
10
12
|
private controller;
|
|
11
13
|
constructor(ul: HTMLUListElement, opts?: OverflowToolbarOptions);
|
|
12
14
|
/** Re-scan after external DOM changes and restart the observer. */
|
|
@@ -16,6 +18,7 @@ export declare class OverflowToolbar implements OverflowHost {
|
|
|
16
18
|
getContainerEl(): HTMLElement;
|
|
17
19
|
isCompact(): boolean;
|
|
18
20
|
isReverse(): boolean;
|
|
21
|
+
isSnap(): boolean;
|
|
19
22
|
scanChildren(): ScanResult;
|
|
20
23
|
private setupPopover;
|
|
21
24
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NoFrameworkOverflow.d.ts","sourceRoot":"","sources":["../../../src/components/NoFrameworkOverflow/NoFrameworkOverflow.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,UAAU,EAGhB,MAAM,gCAAgC,CAAC;AAExC,MAAM,WAAW,sBAAsB;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"NoFrameworkOverflow.d.ts","sourceRoot":"","sources":["../../../src/components/NoFrameworkOverflow/NoFrameworkOverflow.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,UAAU,EAGhB,MAAM,gCAAgC,CAAC;AAExC,MAAM,WAAW,sBAAsB;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,qBAAa,eAAgB,YAAW,YAAY;IAClD,OAAO,CAAC,EAAE,CAAmB;IAC7B,OAAO,CAAC,OAAO,CAAU;IACzB,OAAO,CAAC,OAAO,CAAU;IACzB,OAAO,CAAC,IAAI,CAAU;IACtB,OAAO,CAAC,UAAU,CAAqB;gBAE3B,EAAE,EAAE,gBAAgB,EAAE,IAAI,GAAE,sBAA2B;IAenE,mEAAmE;IACnE,MAAM,IAAI,IAAI;IAId,uDAAuD;IACvD,OAAO,IAAI,IAAI;IAOf,cAAc,IAAI,WAAW;IAI7B,SAAS,IAAI,OAAO;IAIpB,SAAS,IAAI,OAAO;IAIpB,MAAM,IAAI,OAAO;IAIjB,YAAY,IAAI,UAAU;IA8D1B,OAAO,CAAC,YAAY;CAcrB"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { OverflowController as
|
|
1
|
+
import { OverflowController as p } from "../Overflow/OverflowController.js";
|
|
2
2
|
class y {
|
|
3
3
|
ul;
|
|
4
4
|
compact;
|
|
5
5
|
reverse;
|
|
6
|
+
snap;
|
|
6
7
|
controller;
|
|
7
|
-
constructor(
|
|
8
|
-
this.ul =
|
|
8
|
+
constructor(s, e = {}) {
|
|
9
|
+
this.ul = s, this.compact = e.compact ?? !1, this.reverse = e.reverse ?? !1, this.snap = e.snap ?? !1, this.ul.classList.add("overflow"), this.compact && this.ul.classList.add("overflow-compact"), this.reverse && this.ul.classList.add("overflow-reverse"), this.snap && this.ul.classList.add("overflow-snap"), this.controller = new p(this), this.controller.connect();
|
|
9
10
|
}
|
|
10
11
|
/** Re-scan after external DOM changes and restart the observer. */
|
|
11
12
|
update() {
|
|
@@ -13,7 +14,7 @@ class y {
|
|
|
13
14
|
}
|
|
14
15
|
/** Tear down ResizeObserver and clean up DOM state. */
|
|
15
16
|
destroy() {
|
|
16
|
-
this.controller.disconnect(), this.ul.classList.remove("overflow", "overflow-compact", "overflow-reverse");
|
|
17
|
+
this.controller.disconnect(), this.ul.classList.remove("overflow", "overflow-compact", "overflow-reverse", "overflow-snap");
|
|
17
18
|
}
|
|
18
19
|
/* ── OverflowHost ─────────────────────────────────────── */
|
|
19
20
|
getContainerEl() {
|
|
@@ -25,27 +26,30 @@ class y {
|
|
|
25
26
|
isReverse() {
|
|
26
27
|
return this.reverse;
|
|
27
28
|
}
|
|
29
|
+
isSnap() {
|
|
30
|
+
return this.snap;
|
|
31
|
+
}
|
|
28
32
|
scanChildren() {
|
|
29
|
-
const
|
|
30
|
-
let e = null,
|
|
33
|
+
const s = [];
|
|
34
|
+
let e = null, o = -1, r = -1, l = 0;
|
|
31
35
|
for (const t of Array.from(this.ul.children)) {
|
|
32
36
|
const n = t.dataset.overflowRole;
|
|
33
37
|
if (n) {
|
|
34
|
-
if (n === "item" && (
|
|
38
|
+
if (n === "item" && (r === -1 && (r = l), s.push({
|
|
35
39
|
el: t,
|
|
36
40
|
buttonEl: t.querySelector("button"),
|
|
37
|
-
|
|
41
|
+
menuId: t.dataset.menuId || void 0,
|
|
38
42
|
minStateWidth: t.dataset.minStateWidth || void 0
|
|
39
43
|
})), n === "menu") {
|
|
40
|
-
|
|
44
|
+
o = l;
|
|
41
45
|
const c = t.querySelector("[data-menu-trigger]"), i = t.querySelector("[data-menu-panel]");
|
|
42
46
|
if (c && i) {
|
|
43
47
|
t.classList.add("overflow-opener"), i.setAttribute("popover", ""), this.setupPopover(c, i);
|
|
44
48
|
const a = Array.from(i.children), d = /* @__PURE__ */ new Set();
|
|
45
49
|
let u = !1;
|
|
46
50
|
for (const h of a) {
|
|
47
|
-
const
|
|
48
|
-
|
|
51
|
+
const f = h.dataset.menuId;
|
|
52
|
+
f ? d.add(f) : u = !0;
|
|
49
53
|
}
|
|
50
54
|
e = {
|
|
51
55
|
el: t,
|
|
@@ -59,16 +63,16 @@ class y {
|
|
|
59
63
|
l++;
|
|
60
64
|
}
|
|
61
65
|
}
|
|
62
|
-
const
|
|
63
|
-
return { items:
|
|
66
|
+
const m = o !== -1 && (r === -1 || o < r);
|
|
67
|
+
return { items: s, menu: e, menuFirst: m };
|
|
64
68
|
}
|
|
65
|
-
setupPopover(
|
|
66
|
-
|
|
69
|
+
setupPopover(s, e) {
|
|
70
|
+
s.addEventListener("click", () => {
|
|
67
71
|
if (e.matches(":popover-open"))
|
|
68
72
|
e.hidePopover();
|
|
69
73
|
else {
|
|
70
|
-
const
|
|
71
|
-
e.style.position = "fixed", e.style.top = `${
|
|
74
|
+
const o = s.getBoundingClientRect();
|
|
75
|
+
e.style.position = "fixed", e.style.top = `${o.bottom + 4}px`, e.style.left = `${o.left}px`, e.style.margin = "0", e.showPopover();
|
|
72
76
|
}
|
|
73
77
|
});
|
|
74
78
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NoFrameworkOverflow.js","sources":["../../../src/components/NoFrameworkOverflow/NoFrameworkOverflow.ts"],"sourcesContent":["import {\n OverflowController,\n type OverflowHost,\n type ScanResult,\n type ScannedItem,\n type ScannedMenu,\n} from '../Overflow/OverflowController';\n\nexport interface OverflowToolbarOptions {\n compact?: boolean;\n reverse?: boolean;\n}\n\nexport class OverflowToolbar implements OverflowHost {\n private ul: HTMLUListElement;\n private compact: boolean;\n private reverse: boolean;\n private controller: OverflowController;\n\n constructor(ul: HTMLUListElement, opts: OverflowToolbarOptions = {}) {\n this.ul = ul;\n this.compact = opts.compact ?? false;\n this.reverse = opts.reverse ?? false;\n\n this.ul.classList.add('overflow');\n if (this.compact) this.ul.classList.add('overflow-compact');\n if (this.reverse) this.ul.classList.add('overflow-reverse');\n\n this.controller = new OverflowController(this);\n this.controller.connect();\n }\n\n /** Re-scan after external DOM changes and restart the observer. */\n update(): void {\n this.controller.update();\n }\n\n /** Tear down ResizeObserver and clean up DOM state. */\n destroy(): void {\n this.controller.disconnect();\n this.ul.classList.remove('overflow', 'overflow-compact', 'overflow-reverse');\n }\n\n /* ── OverflowHost ─────────────────────────────────────── */\n\n getContainerEl(): HTMLElement {\n return this.ul;\n }\n\n isCompact(): boolean {\n return this.compact;\n }\n\n isReverse(): boolean {\n return this.reverse;\n }\n\n scanChildren(): ScanResult {\n const items: ScannedItem[] = [];\n let menu: ScannedMenu | null = null;\n let menuIndex = -1;\n let firstItemIndex = -1;\n let index = 0;\n\n for (const child of Array.from(this.ul.children) as HTMLElement[]) {\n const role = child.dataset.overflowRole as 'item' | 'menu' | undefined;\n if (!role) continue;\n\n if (role === 'item') {\n if (firstItemIndex === -1) firstItemIndex = index;\n items.push({\n el: child,\n buttonEl: child.querySelector('button'),\n
|
|
1
|
+
{"version":3,"file":"NoFrameworkOverflow.js","sources":["../../../src/components/NoFrameworkOverflow/NoFrameworkOverflow.ts"],"sourcesContent":["import {\n OverflowController,\n type OverflowHost,\n type ScanResult,\n type ScannedItem,\n type ScannedMenu,\n} from '../Overflow/OverflowController';\n\nexport interface OverflowToolbarOptions {\n compact?: boolean;\n reverse?: boolean;\n snap?: boolean;\n}\n\nexport class OverflowToolbar implements OverflowHost {\n private ul: HTMLUListElement;\n private compact: boolean;\n private reverse: boolean;\n private snap: boolean;\n private controller: OverflowController;\n\n constructor(ul: HTMLUListElement, opts: OverflowToolbarOptions = {}) {\n this.ul = ul;\n this.compact = opts.compact ?? false;\n this.reverse = opts.reverse ?? false;\n this.snap = opts.snap ?? false;\n\n this.ul.classList.add('overflow');\n if (this.compact) this.ul.classList.add('overflow-compact');\n if (this.reverse) this.ul.classList.add('overflow-reverse');\n if (this.snap) this.ul.classList.add('overflow-snap');\n\n this.controller = new OverflowController(this);\n this.controller.connect();\n }\n\n /** Re-scan after external DOM changes and restart the observer. */\n update(): void {\n this.controller.update();\n }\n\n /** Tear down ResizeObserver and clean up DOM state. */\n destroy(): void {\n this.controller.disconnect();\n this.ul.classList.remove('overflow', 'overflow-compact', 'overflow-reverse', 'overflow-snap');\n }\n\n /* ── OverflowHost ─────────────────────────────────────── */\n\n getContainerEl(): HTMLElement {\n return this.ul;\n }\n\n isCompact(): boolean {\n return this.compact;\n }\n\n isReverse(): boolean {\n return this.reverse;\n }\n\n isSnap(): boolean {\n return this.snap;\n }\n\n scanChildren(): ScanResult {\n const items: ScannedItem[] = [];\n let menu: ScannedMenu | null = null;\n let menuIndex = -1;\n let firstItemIndex = -1;\n let index = 0;\n\n for (const child of Array.from(this.ul.children) as HTMLElement[]) {\n const role = child.dataset.overflowRole as 'item' | 'menu' | undefined;\n if (!role) continue;\n\n if (role === 'item') {\n if (firstItemIndex === -1) firstItemIndex = index;\n items.push({\n el: child,\n buttonEl: child.querySelector('button'),\n menuId: child.dataset.menuId || undefined,\n minStateWidth: child.dataset.minStateWidth || undefined,\n });\n }\n\n if (role === 'menu') {\n menuIndex = index;\n const trigger = child.querySelector<HTMLElement>('[data-menu-trigger]');\n const panel = child.querySelector<HTMLElement>('[data-menu-panel]');\n\n if (trigger && panel) {\n child.classList.add('overflow-opener');\n panel.setAttribute('popover', '');\n this.setupPopover(trigger, panel);\n\n const menuItemEls = Array.from(panel.children) as HTMLElement[];\n const inMenuIds = new Set<string>();\n let hasMenuOnlyItems = false;\n for (const mi of menuItemEls) {\n const mid = mi.dataset.menuId;\n if (mid) {\n inMenuIds.add(mid);\n } else {\n hasMenuOnlyItems = true;\n }\n }\n\n menu = {\n el: child,\n triggerEl: trigger,\n menuItemEls,\n inMenuIds,\n hasMenuOnlyItems,\n };\n }\n }\n\n index++;\n }\n\n const menuFirst =\n menuIndex !== -1 && (firstItemIndex === -1 || menuIndex < firstItemIndex);\n\n return { items, menu, menuFirst };\n }\n\n private setupPopover(trigger: HTMLElement, panel: HTMLElement): void {\n trigger.addEventListener('click', () => {\n if (panel.matches(':popover-open')) {\n panel.hidePopover();\n } else {\n const rect = trigger.getBoundingClientRect();\n panel.style.position = 'fixed';\n panel.style.top = `${rect.bottom + 4}px`;\n panel.style.left = `${rect.left}px`;\n panel.style.margin = '0';\n panel.showPopover();\n }\n });\n }\n}\n"],"names":["OverflowToolbar","ul","opts","OverflowController","items","menu","menuIndex","firstItemIndex","index","child","role","trigger","panel","menuItemEls","inMenuIds","hasMenuOnlyItems","mi","mid","menuFirst","rect"],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/NoFrameworkOverflow/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,YAAY,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/NoFrameworkOverflow/index.ts"],"names":[],"mappings":"AAAA,OAAO,0BAA0B,CAAC;AAClC,OAAO,mBAAmB,CAAC;AAC3B,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,YAAY,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC"}
|