@nimbus-ds/menubutton 2.0.2 → 2.1.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/package.json +1 -1
- package/dist/CHANGELOG.md +0 -166
- package/dist/README.md +0 -13
- package/dist/index.d.ts +0 -88
- package/dist/index.js +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
MenuButton component is meant to be used inside Menus and navigation, and allows the user to navigate between different sections of an application.
|
|
4
4
|
|
|
5
|
+
## 2026-03-04 `2.0.3`
|
|
6
|
+
|
|
7
|
+
#### 🐛 Bug fixes
|
|
8
|
+
|
|
9
|
+
- Fixed `className` prop not being passed through to the underlying element. ([#156](https://github.com/TiendaNube/nimbus-patterns/pull/156) by [@joacotornello](https://github.com/joacotornello))
|
|
10
|
+
|
|
5
11
|
## 2026-01-15 `2.0.2`
|
|
6
12
|
|
|
7
13
|
#### 📚 3rd party library updates
|
package/package.json
CHANGED
package/dist/CHANGELOG.md
DELETED
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
MenuButton component is meant to be used inside Menus and navigation, and allows the user to navigate between different sections of an application.
|
|
4
|
-
|
|
5
|
-
## 2026-01-15 `2.0.2`
|
|
6
|
-
|
|
7
|
-
#### 📚 3rd party library updates
|
|
8
|
-
|
|
9
|
-
- Extends support to React 19. ([#138](https://github.com/TiendaNube/nimbus-patterns/pull/138) by [@joacotornello](https://github.com/joacotornello))
|
|
10
|
-
|
|
11
|
-
## 2025-11-14 `2.0.1`
|
|
12
|
-
|
|
13
|
-
#### 🐛 Bug fixes
|
|
14
|
-
|
|
15
|
-
- Don't render start icon in popover content when menu is collapsed. ([#134](https://github.com/TiendaNube/nimbus-patterns/pull/134) by [@joacotornello](https://github.com/joacotornello))
|
|
16
|
-
|
|
17
|
-
## 2025-11-04 `2.0.0`
|
|
18
|
-
|
|
19
|
-
#### 🛠 Breaking changes
|
|
20
|
-
|
|
21
|
-
- Renamed `showTooltipsWhenCollapsed` prop to `showPopoversWhenCollapsed` in `MenuButton` and `MenuButton.Accordion` components. ([#131](https://github.com/TiendaNube/nimbus-patterns/pull/131) by [@joacotornello](https://github.com/joacotornello))
|
|
22
|
-
|
|
23
|
-
#### 🎉 New features
|
|
24
|
-
|
|
25
|
-
- Adds support for popovers inside `MenuButton.Accordion` component. ([#131](https://github.com/TiendaNube/nimbus-patterns/pull/131) by [@joacotornello](https://github.com/joacotornello))
|
|
26
|
-
|
|
27
|
-
## 2025-10-09 `1.9.0`
|
|
28
|
-
|
|
29
|
-
#### 🎉 New features
|
|
30
|
-
|
|
31
|
-
- Added `tooltipText` prop to `MenuButton` component to display custom tooltip text when menu is collapsed. ([#129](https://github.com/TiendaNube/nimbus-patterns/pull/129) by [@joacotornello](https://github.com/joacotornello))
|
|
32
|
-
- Added `tooltipText` prop to `MenuButton.Accordion` component to display custom tooltip text when menu is collapsed. ([#129](https://github.com/TiendaNube/nimbus-patterns/pull/129) by [@joacotornello](https://github.com/joacotornello))
|
|
33
|
-
- Added automatic tooltip support that displays button label when menu is collapsed and tooltips are enabled. ([#129](https://github.com/TiendaNube/nimbus-patterns/pull/129) by [@joacotornello](https://github.com/joacotornello))
|
|
34
|
-
|
|
35
|
-
## 2025-08-08 `1.8.0`
|
|
36
|
-
|
|
37
|
-
#### 🎉 New features
|
|
38
|
-
|
|
39
|
-
- Added `expanded` prop support for MenuButton and MenuButtonAccordion components. ([#117](https://github.com/TiendaNube/nimbus-patterns/pull/117) by [@joacotornello](https://github.com/joacotornello))
|
|
40
|
-
|
|
41
|
-
## 2025-08-05 `1.7.0`
|
|
42
|
-
|
|
43
|
-
#### 🎉 New features
|
|
44
|
-
|
|
45
|
-
- Updated MenuButton icon size from 14px to 16px for better visual consistency. ([#115](https://github.com/TiendaNube/nimbus-patterns/pull/115) by [@noecondoleo](https://github.com/noecondoleo) [@FedeTrevi-se](https://github.com/FedeTrevi-se))
|
|
46
|
-
|
|
47
|
-
## 2025-03-18 `1.6.0`
|
|
48
|
-
|
|
49
|
-
#### 🎉 New features
|
|
50
|
-
|
|
51
|
-
- Adds `use-client` directive to the build output in order to support NextJS applications. ([#104](https://github.com/TiendaNube/nimbus-patterns/pull/104) by [@joacotornello](https://github.com/joacotornello))
|
|
52
|
-
|
|
53
|
-
### 💡 Others
|
|
54
|
-
|
|
55
|
-
- Rebuild after build process changes to add support for modular imports and Server Components. ([#104](https://github.com/TiendaNube/nimbus-patterns/pull/104) by [@joacotornello](https://github.com/joacotornello))
|
|
56
|
-
|
|
57
|
-
## 2024-02-07 `1.5.5`
|
|
58
|
-
|
|
59
|
-
### 🎉 New features
|
|
60
|
-
|
|
61
|
-
- Add `wordBreak="break-all"` property to allow overflowing text to be trimmed at any position. ([#94](https://github.com/TiendaNube/nimbus-patterns/pull/94) by [@juanchigallego](https://github.com/juanchigallego))
|
|
62
|
-
|
|
63
|
-
## 2024-01-09 `1.5.4`
|
|
64
|
-
|
|
65
|
-
#### 🐛 Bug fixes
|
|
66
|
-
|
|
67
|
-
- Remove visual focus box-shadow from `MenuButton` component because it visually hints the element is on focus even after an action has been performed. ([#93](https://github.com/TiendaNube/nimbus-patterns/pull/93) by [@juanchigallego](https://github.com/juanchigallego))
|
|
68
|
-
|
|
69
|
-
## 2023-12-18 `1.5.3`
|
|
70
|
-
|
|
71
|
-
### 🎉 New features
|
|
72
|
-
|
|
73
|
-
- Adjust component padding and size of the icon child. ([#90](https://github.com/TiendaNube/nimbus-patterns/pull/90) by [@juanchigallego](https://github.com/juanchigallego))
|
|
74
|
-
- Adjust padding on `MenuButtonAccordion` subcomponent. ([#90](https://github.com/TiendaNube/nimbus-patterns/pull/90) by [@juanchigallego](https://github.com/juanchigallego))
|
|
75
|
-
|
|
76
|
-
## 2023-06-15 `1.5.2`
|
|
77
|
-
|
|
78
|
-
#### 💡 Others
|
|
79
|
-
|
|
80
|
-
- Removed module key from `package.json`. ([#62](https://github.com/TiendaNube/nimbus-patterns/pull/62) by [@juniorconquista](https://github.com/juniorconquista))
|
|
81
|
-
|
|
82
|
-
## 2023-05-23 `1.5.0`
|
|
83
|
-
|
|
84
|
-
#### 📚 3rd party library updates
|
|
85
|
-
|
|
86
|
-
- Updated `@nimbus-ds/components@4.x` to `@nimbus-ds/components@5.x`. ([#56](https://github.com/TiendaNube/nimbus-patterns/pull/56) by [@juniorconquista](https://github.com/juniorconquista))
|
|
87
|
-
|
|
88
|
-
## 2023-05-08 `1.4.0`
|
|
89
|
-
|
|
90
|
-
### 🎉 New features
|
|
91
|
-
|
|
92
|
-
- Added `as` property to the `MenuButton.Accordion` component API. ([#50](https://github.com/TiendaNube/nimbus-patterns/pull/50) by [@juniorconquista](https://github.com/juniorconquista))
|
|
93
|
-
|
|
94
|
-
## 2023-04-24 `1.3.1`
|
|
95
|
-
|
|
96
|
-
#### 🐛 Bug fixes
|
|
97
|
-
|
|
98
|
-
- Renamed `controlled` property to `open` in `MenuButton.Accordion` component API. ([#48](https://github.com/TiendaNube/nimbus-patterns/pull/48) by [@juniorconquista](https://github.com/juniorconquista))
|
|
99
|
-
- Changed the background color of the `MenuButton.Accordion` component when it is open. ([#48](https://github.com/TiendaNube/nimbus-patterns/pull/48) by [@juniorconquista](https://github.com/juniorconquista))
|
|
100
|
-
|
|
101
|
-
## 2023-04-12 `1.3.0`
|
|
102
|
-
|
|
103
|
-
#### 🎉 New features
|
|
104
|
-
|
|
105
|
-
- Added `MenuButton.Accordion` subcomponent. ([#44](https://github.com/TiendaNube/nimbus-patterns/pull/44) by [@juniorconquista](https://github.com/juniorconquista))
|
|
106
|
-
|
|
107
|
-
## 2023-04-04 `1.2.0`
|
|
108
|
-
|
|
109
|
-
#### 🎉 New features
|
|
110
|
-
|
|
111
|
-
- Added `as` property to the `MenuButton` component API. ([#32](https://github.com/TiendaNube/nimbus-patterns/pull/32) by [@juniorconquista](https://github.com/juniorconquista))
|
|
112
|
-
|
|
113
|
-
#### 📚 3rd party library updates
|
|
114
|
-
|
|
115
|
-
- Added `@nimbus-ds/typings@1.1.0`. ([#32](https://github.com/TiendaNube/nimbus-patterns/pull/32) by [@juniorconquista](https://github.com/juniorconquista))
|
|
116
|
-
- Updated `@nimbus-ds/components@4.x`. ([#32](https://github.com/TiendaNube/nimbus-patterns/pull/32) by [@juniorconquista](https://github.com/juniorconquista))
|
|
117
|
-
- Updated `@nimbus-ds/components@4.x`. ([#32](https://github.com/TiendaNube/nimbus-patterns/pull/32) by [@juniorconquista](https://github.com/juniorconquista))
|
|
118
|
-
- Removed `@nimbus-ds/styles@7.0.0`. ([#32](https://github.com/TiendaNube/nimbus-patterns/pull/32) by [@juniorconquista](https://github.com/juniorconquista))
|
|
119
|
-
|
|
120
|
-
## 2023-03-20 `1.1.2`
|
|
121
|
-
|
|
122
|
-
### 📚 3rd party library updates
|
|
123
|
-
|
|
124
|
-
- Updated `@nimbus-ds/styles@7.0.0`. ([#27](https://github.com/TiendaNube/nimbus-patterns/pull/27) by [@juanchigallego](https://github.com/juanchigallego))
|
|
125
|
-
|
|
126
|
-
### 💡 Others
|
|
127
|
-
|
|
128
|
-
- Updated props to match current versions of `components` and `styles`. ([#27](https://github.com/TiendaNube/nimbus-patterns/pull/27) by [@juanchigallego](https://github.com/juanchigallego))
|
|
129
|
-
|
|
130
|
-
## 2023-03-13 `1.1.1`
|
|
131
|
-
|
|
132
|
-
### 📚 Documentation
|
|
133
|
-
|
|
134
|
-
- Add props documentation. ([#26](https://github.com/TiendaNube/nimbus-patterns/pull/26) by [@juanchigallego](https://github.com/juanchigallego))
|
|
135
|
-
|
|
136
|
-
## 2023-02-17 `1.1.0`
|
|
137
|
-
|
|
138
|
-
### 🎉 New features
|
|
139
|
-
|
|
140
|
-
- Removed external dependency from `@tiendanube/icons` package to now use internal `@nimbus-ds/icons` package. ([#15](https://github.com/TiendaNube/nimbus-design-system/pull/#15) by [@juniorconquista](https://github.com/juniorconquista))
|
|
141
|
-
|
|
142
|
-
### 📚 3rd party library updates
|
|
143
|
-
|
|
144
|
-
- Added `@nimbus-ds/components@2.8.0`. ([#20](https://github.com/TiendaNube/nimbus-patterns/pull/20) by [@juniorconquista](https://github.com/juniorconquista))
|
|
145
|
-
- Added `@nimbus-ds/styles@6.11.0`. ([#20](https://github.com/TiendaNube/nimbus-patterns/pull/20) by [@juniorconquista](https://github.com/juniorconquista))
|
|
146
|
-
- Added `@nimbus-ds/icons@1.0.0`. ([#20](https://github.com/TiendaNube/nimbus-patterns/pull/20) by [@juniorconquista](https://github.com/juniorconquista))
|
|
147
|
-
- Removed `@nimbus-ds/icon@2.0.0`. ([#20](https://github.com/TiendaNube/nimbus-patterns/pull/20) by [@juniorconquista](https://github.com/juniorconquista))
|
|
148
|
-
- Removed `@nimbus-ds/text@5.0.0`. ([#20](https://github.com/TiendaNube/nimbus-patterns/pull/20) by [@juniorconquista](https://github.com/juniorconquista))
|
|
149
|
-
- Removed `@nimbus-ds/box@2.4.0`. ([#20](https://github.com/TiendaNube/nimbus-patterns/pull/20) by [@juniorconquista](https://github.com/juniorconquista))
|
|
150
|
-
- Removed `@tiendanube/icons@0.3.1`. ([#20](https://github.com/TiendaNube/nimbus-patterns/pull/20) by [@juniorconquista](https://github.com/juniorconquista))
|
|
151
|
-
|
|
152
|
-
## 2023-02-10 `1.0.0`
|
|
153
|
-
|
|
154
|
-
### 📚 3rd party library updates
|
|
155
|
-
|
|
156
|
-
- Added `@nimbus-ds/icon@2.0.0`. ([#14](https://github.com/TiendaNube/nimbus-patterns/pull/14) by [@juanchigallego](https://github.com/juanchigallego))
|
|
157
|
-
- Added `@nimbus-ds/box@2.4.0`. ([#14](https://github.com/TiendaNube/nimbus-patterns/pull/14) by [@juanchigallego](https://github.com/juanchigallego))
|
|
158
|
-
- Added `@nimbus-ds/text@5.0.0`. ([#14](https://github.com/TiendaNube/nimbus-patterns/pull/14) by [@juanchigallego](https://github.com/juanchigallego))
|
|
159
|
-
- Added `@nimbus-ds/tokens@6.0.1`. ([#14](https://github.com/TiendaNube/nimbus-patterns/pull/14) by [@juanchigallego](https://github.com/juanchigallego))
|
|
160
|
-
- Added `@tiendanube/icons@0.3.2`. ([#14](https://github.com/TiendaNube/nimbus-patterns/pull/14) by [@juanchigallego](https://github.com/juanchigallego))
|
|
161
|
-
|
|
162
|
-
### 🎉 New features
|
|
163
|
-
|
|
164
|
-
- Added `MenuButton` component. ([#14](https://github.com/TiendaNube/nimbus-patterns/pull/14) by [@juanchigallego](https://github.com/juanchigallego))
|
|
165
|
-
- Added `label`, `onClick`, `startIcon`, `active` and `children` properties to the `MenuButton` component API. ([#14](https://github.com/TiendaNube/nimbus-patterns/pull/14) by [@juanchigallego](https://github.com/juanchigallego))
|
|
166
|
-
- Added story documentation in Storybook. ([#14](https://github.com/TiendaNube/nimbus-patterns/pull/14) by [@juanchigallego](https://github.com/juanchigallego))
|
package/dist/README.md
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
# `@nimbus-ds/menubutton`
|
|
2
|
-
|
|
3
|
-
[](https://www.npmjs.com/package/@nimbus-ds/menubutton)
|
|
4
|
-
|
|
5
|
-
MenuButton component is meant to be used inside Menus and navigation, and allows the user to navigate between different sections of an application.
|
|
6
|
-
|
|
7
|
-
## Installation
|
|
8
|
-
|
|
9
|
-
```sh
|
|
10
|
-
$ yarn add @nimbus-ds/menubutton
|
|
11
|
-
# or
|
|
12
|
-
$ npm install @nimbus-ds/menubutton
|
|
13
|
-
```
|
package/dist/index.d.ts
DELETED
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
// Generated by dts-bundle-generator v8.1.2
|
|
2
|
-
|
|
3
|
-
import { IconProps } from '@nimbus-ds/icons';
|
|
4
|
-
import { PolymorphicForwardRefComponent } from '@nimbus-ds/typings';
|
|
5
|
-
import { ButtonHTMLAttributes, ComponentPropsWithRef, FC, HTMLAttributes, ReactNode } from 'react';
|
|
6
|
-
|
|
7
|
-
export interface MenuButtonAccordionProperties {
|
|
8
|
-
/**
|
|
9
|
-
* Content of the menu.
|
|
10
|
-
* @TJS-type React.ReactNode
|
|
11
|
-
*/
|
|
12
|
-
children: ReactNode;
|
|
13
|
-
/**
|
|
14
|
-
* It will be the accordion anchor and can contain all the props available in the MenuButton component's API.
|
|
15
|
-
* @TJS-type React.ReactNode
|
|
16
|
-
*/
|
|
17
|
-
menuButton: MenuButtonProperties;
|
|
18
|
-
/**
|
|
19
|
-
* Required ID used to maintain correct component accessibility, it will be passed on to MenuButtonAccordion's children.
|
|
20
|
-
*/
|
|
21
|
-
contentid: string;
|
|
22
|
-
/**
|
|
23
|
-
* Changes the component usage so that control of open and close is controlled from outside the component.
|
|
24
|
-
*/
|
|
25
|
-
open?: boolean;
|
|
26
|
-
/**
|
|
27
|
-
* Sets the state of the button as active/inactive.
|
|
28
|
-
*/
|
|
29
|
-
active?: boolean;
|
|
30
|
-
/**
|
|
31
|
-
* Whether the MenuButtonAccordion is expanded.
|
|
32
|
-
* If `undefined`, it follows `MenuExpandContext`.
|
|
33
|
-
* If provided, it overrides the context.
|
|
34
|
-
*/
|
|
35
|
-
expanded?: boolean;
|
|
36
|
-
}
|
|
37
|
-
export type MenuButtonAccordionBaseProps = MenuButtonAccordionProperties & {
|
|
38
|
-
menuButton: Omit<MenuButtonProps, "expanded" | "tooltipText">;
|
|
39
|
-
} & Omit<HTMLAttributes<HTMLElement>, "color">;
|
|
40
|
-
declare const MenuButtonAccordion: PolymorphicForwardRefComponent<"button" | "a", MenuButtonAccordionBaseProps>;
|
|
41
|
-
export interface MenuButtonComponents {
|
|
42
|
-
Accordion: typeof MenuButtonAccordion;
|
|
43
|
-
}
|
|
44
|
-
export interface MenuButtonProperties {
|
|
45
|
-
/**
|
|
46
|
-
* Text label for the button.
|
|
47
|
-
*/
|
|
48
|
-
label?: string;
|
|
49
|
-
/**
|
|
50
|
-
* Function executed when clicking the button.
|
|
51
|
-
* @TJS-type () => void;
|
|
52
|
-
*/
|
|
53
|
-
onClick?: () => void;
|
|
54
|
-
/**
|
|
55
|
-
* Sets an icon element on the left of the button.
|
|
56
|
-
* @TJS-type React.FC<IconProps>
|
|
57
|
-
*/
|
|
58
|
-
startIcon?: FC<IconProps>;
|
|
59
|
-
/**
|
|
60
|
-
* Sets the state of the button as active/inactive.
|
|
61
|
-
*/
|
|
62
|
-
active?: boolean;
|
|
63
|
-
/**
|
|
64
|
-
* Inner components displayed on the right of the button component.
|
|
65
|
-
* @TJS-type React.ReactNode
|
|
66
|
-
*/
|
|
67
|
-
children?: ReactNode;
|
|
68
|
-
/**
|
|
69
|
-
* Controlled override for menu expansion state. This prop does not manage internal state
|
|
70
|
-
* and is not forwarded to the DOM as an attribute. It is used only for layout and visual
|
|
71
|
-
* state determination.
|
|
72
|
-
* If not provided, the expanded state will be determined by the context.
|
|
73
|
-
*/
|
|
74
|
-
expanded?: boolean;
|
|
75
|
-
/**
|
|
76
|
-
* Whether to show popovers when the button is collapsed. Defaults to true.
|
|
77
|
-
*/
|
|
78
|
-
showPopoversWhenCollapsed?: boolean;
|
|
79
|
-
}
|
|
80
|
-
export type MenuButtonBaseProps = MenuButtonProperties & Omit<ButtonHTMLAttributes<HTMLButtonElement>, "color">;
|
|
81
|
-
export declare const MenuButton: PolymorphicForwardRefComponent<"button" | "a", MenuButtonBaseProps> & MenuButtonComponents;
|
|
82
|
-
export type MenuButtonProps = ComponentPropsWithRef<typeof MenuButton>;
|
|
83
|
-
|
|
84
|
-
export {
|
|
85
|
-
MenuButton as default,
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
export {};
|
package/dist/index.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("@nimbus-ds/components")):"function"==typeof define&&define.amd?define(["react","@nimbus-ds/components"],t):"object"==typeof exports?exports["@nimbus-ds/menubutton"]=t(require("react"),require("@nimbus-ds/components")):e["@nimbus-ds/menubutton"]=t(e.react,e["@nimbus-ds/components"])}(global,((e,t)=>(()=>{"use strict";var n={390:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.initialMenuContext=void 0;const o=n(476);t.initialMenuContext={expanded:!0,showPopoversWhenCollapsed:!0,popoverPosition:"right",activeAccordionPopover:null,setActiveAccordionPopover:o.noop}},81:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.useMenuExpandContext=t.MenuExpandContext=void 0;const o=n(156),r=n(390),a=(0,o.createContext)(void 0);t.MenuExpandContext=a;t.useMenuExpandContext=(e=!0)=>{const t=(0,o.useContext)(a);if(void 0===t){if(!e)return r.initialMenuContext;throw new Error("Menu subcomponents must be used within MenuExpandContext.Provider")}return t}},843:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.useMenuExpandContext=t.MenuExpandContext=void 0;var o=n(81);Object.defineProperty(t,"MenuExpandContext",{enumerable:!0,get:function(){return o.MenuExpandContext}}),Object.defineProperty(t,"useMenuExpandContext",{enumerable:!0,get:function(){return o.useMenuExpandContext}})},385:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.noop=void 0;t.noop=()=>{}},476:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.noop=void 0;var o=n(385);Object.defineProperty(t,"noop",{enumerable:!0,get:function(){return o.noop}})},492:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MenuButton=void 0;const o=n(15).__importStar(n(156)),r=n(280),a=n(843),i=n(612),u=(0,o.forwardRef)((({className:e,style:t,label:n,onClick:u,startIcon:c,children:l,active:s=!1,as:d="button",expanded:f,showPopoversWhenCollapsed:p,...y},v)=>{const b=(0,o.useId)(),{expanded:m,showPopoversWhenCollapsed:h,popoverPosition:_,activeAccordionPopover:x,setActiveAccordionPopover:w}=(0,a.useMenuExpandContext)(!1),P=f??m,g=p??h??!0,M=(0,o.useMemo)((()=>!P&&!!x&&x===b),[P,x,b]),O=s?"primary-interactive":"neutral-textHigh",j=y.disabled?"neutral-textDisabled":O,C=o.default.createElement(i.MenuButtonContent,{ref:v,expanded:P,disabledColor:j,label:n,startIcon:c,active:s,as:d,onClick:u,...y},l);return!P&&g?o.default.createElement(r.Popover,{content:o.default.createElement(i.MenuButtonContent,{expanded:!0,disabledColor:j,label:n,active:s,as:d,onClick:u,...y},l),arrow:!0,position:_??"right",padding:"small",onVisibility:e=>{w((t=>e?b:t===b?null:t))},enabledHover:!0,enabledClick:!1,visible:M},C):C}));t.MenuButton=u,u.Accordion=i.MenuButtonAccordion,u.displayName="MenuButton"},112:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MenuButtonAccordion=void 0;const o=n(15).__importStar(n(156)),r=n(280),a=n(843),i=n(492),u=(0,o.forwardRef)((({className:e,style:t,open:n,active:u,menuButton:c,children:l,as:s,expanded:d,...f},p)=>{const y=(0,o.useId)(),{expanded:v,popoverPosition:b,showPopoversWhenCollapsed:m,activeAccordionPopover:h,setActiveAccordionPopover:_}=(0,a.useMenuExpandContext)(!1),x=d??v,[w,P]=(0,o.useState)(!1),g=(0,o.useMemo)((()=>!x&&!!h&&h===y),[x,h,y]),M=(0,o.useMemo)((()=>n??w),[n,w]),O=(0,o.useMemo)((()=>({expanded:!0,popoverPosition:b,activeAccordionPopover:null,setActiveAccordionPopover:()=>{}})),[b]),j=o.default.createElement(r.Box,{...f,ref:p,as:s,backgroundColor:u?"primary-surface":M?"neutral-surface":"transparent",borderRadius:"2",zIndex:M?"100":void 0,textDecoration:"none"},o.default.createElement(i.MenuButton,{...c,onClick:void 0!==n?c.onClick:()=>P((e=>!e)),active:u,"aria-expanded":M&&x,showPopoversWhenCollapsed:!1,expanded:x}),M&&x&&o.default.createElement(r.Box,{id:"content-1","aria-hidden":!M,height:M?"auto":"0",overflow:"hidden",display:"flex",flexDirection:"column",gap:"0-5",pl:"6",pb:"1",pr:"1"},l));return!x&&m?o.default.createElement(r.Popover,{content:o.default.createElement(a.MenuExpandContext.Provider,{value:O},o.default.createElement(r.Box,{minWidth:"200px",display:"flex",flexDirection:"column",gap:"0-5"},l)),arrow:!0,position:b??"right",padding:"small",enabledClick:!1,onVisibility:e=>{_((t=>e?y:t===y?null:t))},enabledHover:!0,visible:g},j):j}));t.MenuButtonAccordion=u},414:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MenuButtonAccordion=void 0;const o=n(112);var r=n(112);Object.defineProperty(t,"MenuButtonAccordion",{enumerable:!0,get:function(){return r.MenuButtonAccordion}}),t.default=o.MenuButtonAccordion},951:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MenuButtonContent=void 0;const o=n(15).__importStar(n(156)),r=n(280),a=(0,o.forwardRef)((({expanded:e,disabledColor:t,label:n,startIcon:a,children:i,active:u,as:c="button",onClick:l,...s},d)=>{const f=e?{}:{justifyContent:"center",paddingX:"none"};return o.default.createElement(r.Box,{...s,ref:d,as:c,type:"button",onClick:l,alignItems:"center",textDecoration:"none",backgroundColor:{xs:u?"primary-surface":"transparent",hover:"primary-surface",active:"primary-surfaceHighlight",disabled:"neutral-surfaceDisabled"},borderRadius:"2",borderWidth:"none",cursor:{xs:"pointer",disabled:"not-allowed"},display:"flex",gap:"2",px:"2",py:{xs:"2",md:"1"},width:"100%",transitionProperty:"all",transitionDuration:"base",transitionTimingFunction:"ease-in-out",maxHeight:{xs:"34px",md:"26px"},...f},a&&o.default.createElement(r.Icon,{color:t,source:o.default.createElement(a,{size:16})}),e&&o.default.createElement(r.Box,{display:"inline-flex",flex:"1"},o.default.createElement(r.Text,{fontSize:"base",color:t,lineClamp:1,wordBreak:"break-all"},n)),e&&i)}));t.MenuButtonContent=a,a.displayName="MenuButtonContent"},864:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MenuButtonContent=void 0;var o=n(951);Object.defineProperty(t,"MenuButtonContent",{enumerable:!0,get:function(){return o.MenuButtonContent}})},612:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});const o=n(15);o.__exportStar(n(414),t),o.__exportStar(n(864),t)},15:(e,t,n)=>{n.r(t),n.d(t,{__assign:()=>a,__asyncDelegator:()=>O,__asyncGenerator:()=>M,__asyncValues:()=>j,__await:()=>g,__awaiter:()=>y,__classPrivateFieldGet:()=>A,__classPrivateFieldIn:()=>I,__classPrivateFieldSet:()=>k,__createBinding:()=>b,__decorate:()=>u,__esDecorate:()=>l,__exportStar:()=>m,__extends:()=>r,__generator:()=>v,__importDefault:()=>B,__importStar:()=>S,__makeTemplateObject:()=>C,__metadata:()=>p,__param:()=>c,__propKey:()=>d,__read:()=>_,__rest:()=>i,__runInitializers:()=>s,__setFunctionName:()=>f,__spread:()=>x,__spreadArray:()=>P,__spreadArrays:()=>w,__values:()=>h});var o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)};function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var a=function(){return a=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},a.apply(this,arguments)};function i(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n}function u(e,t,n,o){var r,a=arguments.length,i=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,n,o);else for(var u=e.length-1;u>=0;u--)(r=e[u])&&(i=(a<3?r(i):a>3?r(t,n,i):r(t,n))||i);return a>3&&i&&Object.defineProperty(t,n,i),i}function c(e,t){return function(n,o){t(n,o,e)}}function l(e,t,n,o,r,a){function i(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var u,c=o.kind,l="getter"===c?"get":"setter"===c?"set":"value",s=!t&&e?o.static?e:e.prototype:null,d=t||(s?Object.getOwnPropertyDescriptor(s,o.name):{}),f=!1,p=n.length-1;p>=0;p--){var y={};for(var v in o)y[v]="access"===v?{}:o[v];for(var v in o.access)y.access[v]=o.access[v];y.addInitializer=function(e){if(f)throw new TypeError("Cannot add initializers after decoration has completed");a.push(i(e||null))};var b=(0,n[p])("accessor"===c?{get:d.get,set:d.set}:d[l],y);if("accessor"===c){if(void 0===b)continue;if(null===b||"object"!=typeof b)throw new TypeError("Object expected");(u=i(b.get))&&(d.get=u),(u=i(b.set))&&(d.set=u),(u=i(b.init))&&r.push(u)}else(u=i(b))&&("field"===c?r.push(u):d[l]=u)}s&&Object.defineProperty(s,o.name,d),f=!0}function s(e,t,n){for(var o=arguments.length>2,r=0;r<t.length;r++)n=o?t[r].call(e,n):t[r].call(e);return o?n:void 0}function d(e){return"symbol"==typeof e?e:"".concat(e)}function f(e,t,n){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})}function p(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function y(e,t,n,o){return new(n||(n=Promise))((function(r,a){function i(e){try{c(o.next(e))}catch(e){a(e)}}function u(e){try{c(o.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,u)}c((o=o.apply(e,t||[])).next())}))}function v(e,t){var n,o,r,a,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(u){return function(c){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(i=0)),i;)try{if(n=1,o&&(r=2&u[0]?o.return:u[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,u[1])).done)return r;switch(o=0,r&&(u=[2&u[0],r.value]),u[0]){case 0:case 1:r=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,o=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(r=i.trys,(r=r.length>0&&r[r.length-1])||6!==u[0]&&2!==u[0])){i=0;continue}if(3===u[0]&&(!r||u[1]>r[0]&&u[1]<r[3])){i.label=u[1];break}if(6===u[0]&&i.label<r[1]){i.label=r[1],r=u;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(u);break}r[2]&&i.ops.pop(),i.trys.pop();continue}u=t.call(e,i)}catch(e){u=[6,e],o=0}finally{n=r=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}}var b=Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]};function m(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||b(t,e,n)}function h(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],o=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function _(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var o,r,a=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(o=a.next()).done;)i.push(o.value)}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return i}function x(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(_(arguments[t]));return e}function w(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var o=Array(e),r=0;for(t=0;t<n;t++)for(var a=arguments[t],i=0,u=a.length;i<u;i++,r++)o[r]=a[i];return o}function P(e,t,n){if(n||2===arguments.length)for(var o,r=0,a=t.length;r<a;r++)!o&&r in t||(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}function g(e){return this instanceof g?(this.v=e,this):new g(e)}function M(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var o,r=n.apply(e,t||[]),a=[];return o={},i("next"),i("throw"),i("return"),o[Symbol.asyncIterator]=function(){return this},o;function i(e){r[e]&&(o[e]=function(t){return new Promise((function(n,o){a.push([e,t,n,o])>1||u(e,t)}))})}function u(e,t){try{(n=r[e](t)).value instanceof g?Promise.resolve(n.value.v).then(c,l):s(a[0][2],n)}catch(e){s(a[0][3],e)}var n}function c(e){u("next",e)}function l(e){u("throw",e)}function s(e,t){e(t),a.shift(),a.length&&u(a[0][0],a[0][1])}}function O(e){var t,n;return t={},o("next"),o("throw",(function(e){throw e})),o("return"),t[Symbol.iterator]=function(){return this},t;function o(o,r){t[o]=e[o]?function(t){return(n=!n)?{value:g(e[o](t)),done:!1}:r?r(t):t}:r}}function j(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=h(e),t={},o("next"),o("throw"),o("return"),t[Symbol.asyncIterator]=function(){return this},t);function o(n){t[n]=e[n]&&function(t){return new Promise((function(o,r){(function(e,t,n,o){Promise.resolve(o).then((function(t){e({value:t,done:n})}),t)})(o,r,(t=e[n](t)).done,t.value)}))}}}function C(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var E=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function S(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&b(t,e,n);return E(t,e),t}function B(e){return e&&e.__esModule?e:{default:e}}function A(e,t,n,o){if("a"===n&&!o)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?o:"a"===n?o.call(e):o?o.value:t.get(e)}function k(e,t,n,o,r){if("m"===o)throw new TypeError("Private method is not writable");if("a"===o&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===o?r.call(e,n):r?r.value=n:t.set(e,n),n}function I(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}},280:e=>{e.exports=t},156:t=>{t.exports=e}},o={};function r(e){var t=o[e];if(void 0!==t)return t.exports;var a=o[e]={exports:{}};return n[e](a,a.exports,r),a.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return(()=>{var e=a;Object.defineProperty(e,"__esModule",{value:!0}),e.MenuButton=void 0;const t=r(492);var n=r(492);Object.defineProperty(e,"MenuButton",{enumerable:!0,get:function(){return n.MenuButton}}),e.default=t.MenuButton})(),a})()));
|