@nimbus-ds/split-button 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/CHANGELOG.md +12 -0
- package/dist/index.d.ts +23 -14
- package/dist/index.js +1 -1
- package/package.json +11 -11
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
The Split Button component combines a primary action button with a dropdown menu of related secondary actions.
|
|
4
4
|
|
|
5
|
+
## 2026-02-12 `1.1.0`
|
|
6
|
+
|
|
7
|
+
#### 🎉 New features
|
|
8
|
+
|
|
9
|
+
- Enabled `className` prop forwarding to allow consumers to pass custom CSS classes. ([#426](https://github.com/TiendaNube/nimbus-design-system/pull/426) by [@joacotornello](https://github.com/joacotornello))
|
|
10
|
+
|
|
11
|
+
## 2026-01-13 `1.0.1`
|
|
12
|
+
|
|
13
|
+
#### 🎉 New features
|
|
14
|
+
|
|
15
|
+
- Adds support for React 19. ([#404](https://github.com/TiendaNube/nimbus-design-system/pull/404) by [@joacotornello](https://github.com/joacotornello))
|
|
16
|
+
|
|
5
17
|
## 2025-10-21 `1.0.0`
|
|
6
18
|
|
|
7
19
|
#### 🎉 New features
|
package/dist/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
The Split Button component combines a primary action button with a dropdown menu of related secondary actions.
|
|
4
4
|
|
|
5
|
+
## 2026-02-12 `1.1.0`
|
|
6
|
+
|
|
7
|
+
#### 🎉 New features
|
|
8
|
+
|
|
9
|
+
- Enabled `className` prop forwarding to allow consumers to pass custom CSS classes. ([#426](https://github.com/TiendaNube/nimbus-design-system/pull/426) by [@joacotornello](https://github.com/joacotornello))
|
|
10
|
+
|
|
11
|
+
## 2026-01-13 `1.0.1`
|
|
12
|
+
|
|
13
|
+
#### 🎉 New features
|
|
14
|
+
|
|
15
|
+
- Adds support for React 19. ([#404](https://github.com/TiendaNube/nimbus-design-system/pull/404) by [@joacotornello](https://github.com/joacotornello))
|
|
16
|
+
|
|
5
17
|
## 2025-10-21 `1.0.0`
|
|
6
18
|
|
|
7
19
|
#### 🎉 New features
|
package/dist/index.d.ts
CHANGED
|
@@ -22,10 +22,10 @@ export interface PolymorphicForwardRefComponent<IntrinsicElementString, OwnProps
|
|
|
22
22
|
* so that events are typed when using JSX.IntrinsicElements.
|
|
23
23
|
*/
|
|
24
24
|
<As = IntrinsicElementString>(props: As extends "" ? {
|
|
25
|
-
as: keyof JSX.IntrinsicElements;
|
|
25
|
+
as: keyof React.JSX.IntrinsicElements;
|
|
26
26
|
} : As extends React.ComponentType<infer P> ? Merge<P, OwnProps & {
|
|
27
27
|
as: As;
|
|
28
|
-
}> : As extends keyof JSX.IntrinsicElements ? Merge<JSX.IntrinsicElements[As], OwnProps & {
|
|
28
|
+
}> : As extends keyof React.JSX.IntrinsicElements ? Merge<React.JSX.IntrinsicElements[As], OwnProps & {
|
|
29
29
|
as: As;
|
|
30
30
|
}> : never): React.ReactElement | null;
|
|
31
31
|
}
|
|
@@ -34,6 +34,7 @@ export interface Conditions<T> {
|
|
|
34
34
|
md?: T;
|
|
35
35
|
lg?: T;
|
|
36
36
|
xl?: T;
|
|
37
|
+
xxl?: T;
|
|
37
38
|
}
|
|
38
39
|
export type BorderStyle = "solid" | "none" | "hidden" | "dashed" | "dotted";
|
|
39
40
|
export type BoxSizing = "border-box" | "content-box";
|
|
@@ -50,6 +51,7 @@ export type Position = "absolute" | "fixed" | "relative" | "static" | "sticky";
|
|
|
50
51
|
export type Overflow = "visible" | "hidden" | "scroll" | "auto";
|
|
51
52
|
export type PointerEvents = "auto" | "none" | "visiblePainted" | "visibleFill" | "visibleStroke" | "visible" | "painted" | "fill" | "stroke" | "all" | "inherit";
|
|
52
53
|
export type TransitionTiming = "ease" | "ease-in" | "ease-out" | "ease-in-out" | "linear" | "step-start" | "step-end";
|
|
54
|
+
export type ScrollbarWidth = "auto" | "none" | "thin";
|
|
53
55
|
declare const propertiesBox: {
|
|
54
56
|
gap: {
|
|
55
57
|
none: string;
|
|
@@ -119,9 +121,7 @@ declare const propertiesBox: {
|
|
|
119
121
|
"warning-surface": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
120
122
|
"warning-surfaceHighlight": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
121
123
|
"warning-textLow": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
122
|
-
"danger-interactive": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
123
|
-
* The min height property specifies the height of a box's content area.
|
|
124
|
-
*/
|
|
124
|
+
"danger-interactive": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
125
125
|
"danger-surface": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
126
126
|
"danger-surfaceHighlight": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
127
127
|
"danger-textLow": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
@@ -131,6 +131,7 @@ declare const propertiesBox: {
|
|
|
131
131
|
"neutral-surfaceHighlight": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
132
132
|
"neutral-surfaceDisabled": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
133
133
|
"neutral-textLow": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
134
|
+
"neutral-textHigh": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
134
135
|
"ai-generative-surface": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
135
136
|
"ai-generative-surfaceHighlight": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
136
137
|
transparent: string;
|
|
@@ -154,9 +155,7 @@ declare const propertiesBox: {
|
|
|
154
155
|
"warning-surface": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
155
156
|
"warning-surfaceHighlight": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
156
157
|
"warning-textLow": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
157
|
-
"danger-interactive": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
158
|
-
* The min height property specifies the height of a box's content area.
|
|
159
|
-
*/
|
|
158
|
+
"danger-interactive": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
160
159
|
"danger-surface": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
161
160
|
"danger-surfaceHighlight": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
162
161
|
"danger-textLow": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
@@ -166,6 +165,7 @@ declare const propertiesBox: {
|
|
|
166
165
|
"neutral-surfaceHighlight": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
167
166
|
"neutral-surfaceDisabled": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
168
167
|
"neutral-textLow": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
168
|
+
"neutral-textHigh": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
169
169
|
"ai-generative-surface": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
170
170
|
"ai-generative-surfaceHighlight": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
171
171
|
transparent: string;
|
|
@@ -179,7 +179,9 @@ declare const propertiesBox: {
|
|
|
179
179
|
"success-surfaceHighlight": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
180
180
|
"warning-interactive": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
181
181
|
"warning-surface": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
182
|
-
"warning-surfaceHighlight": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
182
|
+
"warning-surfaceHighlight": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; /**
|
|
183
|
+
* The gridTemplateAreas property specifies named grid areas, establishing the cells in the grid and assigning them names.
|
|
184
|
+
*/
|
|
183
185
|
"danger-interactive": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
184
186
|
"danger-surface": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
185
187
|
"danger-surfaceHighlight": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
@@ -187,6 +189,7 @@ declare const propertiesBox: {
|
|
|
187
189
|
"neutral-surface": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
188
190
|
"neutral-surfaceDisabled": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
189
191
|
"neutral-surfaceHighlight": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
192
|
+
"ai-generative-interactiveHover": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
190
193
|
transparent: string;
|
|
191
194
|
};
|
|
192
195
|
borderRadius: {
|
|
@@ -212,7 +215,9 @@ declare const propertiesBox: {
|
|
|
212
215
|
};
|
|
213
216
|
borderStyle: BorderStyle[];
|
|
214
217
|
boxSizing: BoxSizing[];
|
|
215
|
-
cursor: Cursor[];
|
|
218
|
+
cursor: Cursor[]; /**
|
|
219
|
+
* The padding properties are used to generate space around an box's content area.
|
|
220
|
+
*/
|
|
216
221
|
spacing: {
|
|
217
222
|
none: string;
|
|
218
223
|
"0-5": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
@@ -324,9 +329,7 @@ declare const propertiesBox: {
|
|
|
324
329
|
"18": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
325
330
|
"20": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
326
331
|
h1: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
327
|
-
h2: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
328
|
-
* This defines the ability for a flex item to shrink if necessary.
|
|
329
|
-
*/
|
|
332
|
+
h2: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
330
333
|
h3: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
331
334
|
h4: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
332
335
|
h5: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
@@ -361,6 +364,7 @@ declare const propertiesBox: {
|
|
|
361
364
|
h5: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
362
365
|
h6: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
363
366
|
};
|
|
367
|
+
scrollbarWidth: ScrollbarWidth[];
|
|
364
368
|
};
|
|
365
369
|
export type BoxBorderColorProperties = keyof typeof propertiesBox.borderColor;
|
|
366
370
|
export type BoxBorderRadiusProperties = keyof typeof propertiesBox.borderRadius;
|
|
@@ -380,6 +384,7 @@ export type BoxLineHeightProperties = keyof typeof propertiesBox.lineHeight;
|
|
|
380
384
|
export type BoxBackgroundProperties = keyof typeof propertiesBox.background;
|
|
381
385
|
export interface BoxConditions<T> extends Conditions<T> {
|
|
382
386
|
focus?: T;
|
|
387
|
+
focusVisible?: T;
|
|
383
388
|
focusWithin?: T;
|
|
384
389
|
active?: T;
|
|
385
390
|
hover?: T;
|
|
@@ -760,6 +765,10 @@ export interface BoxSprinkle {
|
|
|
760
765
|
* @default left
|
|
761
766
|
*/
|
|
762
767
|
textAlign?: TextAlign | BoxConditions<TextAlign>;
|
|
768
|
+
/**
|
|
769
|
+
* The scrollbarWidth property specifies the width of the scrollbar.
|
|
770
|
+
*/
|
|
771
|
+
scrollbarWidth?: ScrollbarWidth | BoxConditions<ScrollbarWidth>;
|
|
763
772
|
}
|
|
764
773
|
declare const propertiesPopover: {
|
|
765
774
|
backgroundColor: {
|
|
@@ -939,7 +948,7 @@ export interface SplitButtonActionProperties {
|
|
|
939
948
|
*/
|
|
940
949
|
disabled?: boolean;
|
|
941
950
|
}
|
|
942
|
-
export type SplitButtonActionProps = SplitButtonActionProperties & Pick<BoxProps, "backgroundColor" | "borderWidth" | "display" | "alignItems" | "gap" | "p" | "borderRadius">;
|
|
951
|
+
export type SplitButtonActionProps = SplitButtonActionProperties & Pick<BoxProps, "className" | "backgroundColor" | "borderWidth" | "display" | "alignItems" | "gap" | "p" | "borderRadius">;
|
|
943
952
|
declare const SplitButtonAction: React.FC<SplitButtonActionProps>;
|
|
944
953
|
export interface SplitButtonPrimaryProperties {
|
|
945
954
|
/**
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("@nimbus-ds/box"),require("@nimbus-ds/icon"),require("@nimbus-ds/text"),require("@nimbus-ds/styles"),require("@nimbus-ds/icons"),require("@floating-ui/react")):"function"==typeof define&&define.amd?define(["react","@nimbus-ds/box","@nimbus-ds/icon","@nimbus-ds/text","@nimbus-ds/styles","@nimbus-ds/icons","@floating-ui/react"],t):"object"==typeof exports?exports["@nimbus-ds/split-button"]=t(require("react"),require("@nimbus-ds/box"),require("@nimbus-ds/icon"),require("@nimbus-ds/text"),require("@nimbus-ds/styles"),require("@nimbus-ds/icons"),require("@floating-ui/react")):e["@nimbus-ds/split-button"]=t(e.react,e["@nimbus-ds/box"],e["@nimbus-ds/icon"],e["@nimbus-ds/text"],e["@nimbus-ds/styles"],e["@nimbus-ds/icons"],e["@floating-ui/react"])}(global,((e,t,r,n,o,i,a)=>(()=>{"use strict";var l={36:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Popover=void 0;const n=r(769).__importStar(r(155)),o=r(955),i=r(367),a=({className:e,style:t,visible:r,onVisibility:a,backgroundColor:l="neutral-background",position:u="bottom",padding:s="base",width:c="fit-content",arrow:p=!0,offset:d=10,enabledHover:f=!1,enabledDismiss:y=!0,enabledClick:b=!0,matchReferenceWidth:m=!1,renderOverlay:_=!1,children:v,content:h,...S})=>{const{className:w,style:g,otherProps:P}=i.popover.sprinkle({...S,width:c,padding:s,backgroundColor:l,color:l}),x=(0,n.useRef)(null),[O,j]=(0,n.useState)(!1),B=(0,n.useMemo)((()=>void 0===r?O:r),[r,O]),E=[(0,o.offset)(d),(0,o.arrow)({element:x}),(0,o.shift)(),(0,o.flip)({crossAxis:u.includes("-"),fallbackAxisSideDirection:"end",padding:5}),m&&(0,o.size)({apply({rects:e,elements:t}){Object.assign(t.floating.style,{width:`${e.reference.width}px`})}})].filter((e=>!1!==e)),{refThemeProvider:C}=(0,i.useTheme)(),{context:k,floatingStyles:A}=(0,o.useFloating)({open:B,placement:u,strategy:"fixed",middleware:E,whileElementsMounted:o.autoUpdate,onOpenChange:void 0!==a?a:j}),{getReferenceProps:T,getFloatingProps:D}=(0,o.useInteractions)([(0,o.useHover)(k,{enabled:f,restMs:50,delay:{close:100},handleClose:(0,o.safePolygon)({buffer:1})}),(0,o.useClick)(k,{enabled:b}),(0,o.useDismiss)(k,{enabled:y,outsidePressEvent:_?"mousedown":void 0})]),M=n.default.createElement("div",{...P,ref:k.refs.setFloating,className:[i.popover.classnames.content,w].join(" "),style:{...g,...A},...D()},h,p&&n.default.createElement(o.FloatingArrow,{"data-testid":"arrow-element",ref:x,context:k,fill:"currentColor"}));return n.default.createElement(n.default.Fragment,null,n.default.createElement("div",{"data-testid":"popover-container",ref:k.refs.setReference,...T()},"function"==typeof v?v({open:B,setVisibility:j}):v),n.default.createElement(o.FloatingPortal,{id:"nimbus-popover-floating",root:C?.current},B&&n.default.createElement(n.default.Fragment,null,_&&n.default.createElement("div",{className:i.popover.classnames.overlay,"data-testid":"popover-overlay"}),M)))};t.Popover=a,a.displayName="Popover"},909:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Popover=void 0;const n=r(36);var o=r(36);Object.defineProperty(t,"Popover",{enumerable:!0,get:function(){return o.Popover}}),t.default=n.Popover},752:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.useSplitButtonContext=t.SplitButton=void 0;const n=r(769).__importStar(r(155)),o=r(558),i=r(337),a=r(373),l=({children:e,disabled:t=!1,open:r,onOpenChange:i,popoverPosition:l="bottom-end",...u})=>{const[s,c]=(0,n.useState)(!1),p=void 0!==r,d=p?r:s,f=(0,n.useCallback)((e=>{p||c(e),i?.(e)}),[p,i]),y=(0,n.useMemo)((()=>({disabled:t,open:d,popoverPosition:l,onOpenChange:f})),[t,d,l,f]);return n.default.createElement(a.SplitButtonContext.Provider,{value:y},n.default.createElement(o.Box,{display:"flex",gap:"none",...u},e))};t.SplitButton=l,l.Action=i.SplitButtonAction,l.Primary=i.SplitButtonPrimary,l.Secondary=i.SplitButtonSecondary,l.displayName="SplitButton";var u=r(373);Object.defineProperty(t,"useSplitButtonContext",{enumerable:!0,get:function(){return u.useSplitButtonContext}})},182:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SplitButtonAction=void 0;const n=r(769).__importDefault(r(155)),o=r(558),i=r(208),a=r(526),l=({children:e,icon:t,onClick:r,disabled:l=!1,...u})=>n.default.createElement(o.Box,{backgroundColor:{xs:"transparent",hover:l?"transparent":"neutral-surface"},borderWidth:"none",display:"flex",alignItems:"center",gap:"2",paddingX:"2",paddingY:"1",borderRadius:"1",...u,onClick:r,disabled:l,cursor:l?"auto":"pointer",as:"button",type:"button"},t&&n.default.createElement(i.Icon,{color:l?"neutral-textDisabled":"neutral-textHigh",source:t}),n.default.createElement(a.Text,{fontSize:"base",color:l?"neutral-textDisabled":"neutral-textHigh"},e));t.SplitButtonAction=l,l.displayName="SplitButton.Action"},380:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SplitButtonAction=void 0;var n=r(182);Object.defineProperty(t,"SplitButtonAction",{enumerable:!0,get:function(){return n.SplitButtonAction}})},920:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SplitButtonPrimary=void 0;const n=r(769).__importDefault(r(155)),o=r(367),i=r(373);t.SplitButtonPrimary=({children:e,disabled:t,onClick:r,...a})=>{const l=(0,i.useSplitButtonContext)(),u=t??l.disabled;return n.default.createElement("button",{type:"button",className:o.splitButton.primaryAppearance.primary,disabled:u,onClick:r,...a},e)},t.SplitButtonPrimary.displayName="SplitButton.Primary"},504:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SplitButtonPrimary=void 0;var n=r(920);Object.defineProperty(t,"SplitButtonPrimary",{enumerable:!0,get:function(){return n.SplitButtonPrimary}})},900:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SplitButtonSecondary=void 0;const n=r(769).__importDefault(r(155)),o=r(367),i=r(809),a=r(909),l=r(558),u=r(373);t.SplitButtonSecondary=({children:e,ariaLabel:t="Show more actions",disabled:r,...s})=>{const c=(0,u.useSplitButtonContext)(),p=r??c.disabled;return n.default.createElement(a.Popover,{visible:c.open,onVisibility:c.onOpenChange,position:c.popoverPosition,arrow:!1,padding:"small",width:"280px",enabledClick:!0,enabledDismiss:!0,content:n.default.createElement(l.Box,{display:"flex",flexDirection:"column",gap:"1",width:"100%"},e)},n.default.createElement("button",{type:"button",className:o.splitButton.secondaryAppearance.primary,disabled:p,"aria-label":t,"aria-expanded":c.open,"aria-haspopup":"true",...s},n.default.createElement(i.ChevronDownIcon,null)))},t.SplitButtonSecondary.displayName="SplitButton.Secondary"},732:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SplitButtonSecondary=void 0;var n=r(900);Object.defineProperty(t,"SplitButtonSecondary",{enumerable:!0,get:function(){return n.SplitButtonSecondary}})},337:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SplitButtonSecondary=t.SplitButtonPrimary=t.SplitButtonAction=void 0;var n=r(380);Object.defineProperty(t,"SplitButtonAction",{enumerable:!0,get:function(){return n.SplitButtonAction}});var o=r(504);Object.defineProperty(t,"SplitButtonPrimary",{enumerable:!0,get:function(){return o.SplitButtonPrimary}});var i=r(732);Object.defineProperty(t,"SplitButtonSecondary",{enumerable:!0,get:function(){return i.SplitButtonSecondary}})},178:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.useSplitButtonContext=t.SplitButtonContext=void 0;const n=r(155);t.SplitButtonContext=(0,n.createContext)(void 0);t.useSplitButtonContext=()=>{const e=(0,n.useContext)(t.SplitButtonContext);if(!e)throw new Error("SplitButton compound components must be used within SplitButton");return e}},373:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});r(769).__exportStar(r(178),t)},955:e=>{e.exports=a},558:e=>{e.exports=t},208:e=>{e.exports=r},809:e=>{e.exports=i},367:e=>{e.exports=o},526:e=>{e.exports=n},155:t=>{t.exports=e},769:(e,t,r)=>{r.r(t),r.d(t,{__addDisposableResource:()=>M,__assign:()=>i,__asyncDelegator:()=>O,__asyncGenerator:()=>x,__asyncValues:()=>j,__await:()=>P,__awaiter:()=>y,__classPrivateFieldGet:()=>A,__classPrivateFieldIn:()=>D,__classPrivateFieldSet:()=>T,__createBinding:()=>m,__decorate:()=>l,__disposeResources:()=>F,__esDecorate:()=>s,__exportStar:()=>_,__extends:()=>o,__generator:()=>b,__importDefault:()=>k,__importStar:()=>C,__makeTemplateObject:()=>B,__metadata:()=>f,__param:()=>u,__propKey:()=>p,__read:()=>h,__rest:()=>a,__runInitializers:()=>c,__setFunctionName:()=>d,__spread:()=>S,__spreadArray:()=>g,__spreadArrays:()=>w,__values:()=>v,default:()=>R});var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)};function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var i=function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};function a(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}function l(e,t,r,n){var o,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a}function u(e,t){return function(r,n){t(r,n,e)}}function s(e,t,r,n,o,i){function a(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var l,u=n.kind,s="getter"===u?"get":"setter"===u?"set":"value",c=!t&&e?n.static?e:e.prototype:null,p=t||(c?Object.getOwnPropertyDescriptor(c,n.name):{}),d=!1,f=r.length-1;f>=0;f--){var y={};for(var b in n)y[b]="access"===b?{}:n[b];for(var b in n.access)y.access[b]=n.access[b];y.addInitializer=function(e){if(d)throw new TypeError("Cannot add initializers after decoration has completed");i.push(a(e||null))};var m=(0,r[f])("accessor"===u?{get:p.get,set:p.set}:p[s],y);if("accessor"===u){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw new TypeError("Object expected");(l=a(m.get))&&(p.get=l),(l=a(m.set))&&(p.set=l),(l=a(m.init))&&o.unshift(l)}else(l=a(m))&&("field"===u?o.unshift(l):p[s]=l)}c&&Object.defineProperty(c,n.name,p),d=!0}function c(e,t,r){for(var n=arguments.length>2,o=0;o<t.length;o++)r=n?t[o].call(e,r):t[o].call(e);return n?r:void 0}function p(e){return"symbol"==typeof e?e:"".concat(e)}function d(e,t,r){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function f(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function y(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function l(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,l)}u((n=n.apply(e,t||[])).next())}))}function b(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(l){return function(u){return function(l){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,l[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&l[0]?n.return:l[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,l[1])).done)return o;switch(n=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return a.label++,{value:l[1],done:!1};case 5:a.label++,n=l[1],l=[0];continue;case 7:l=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==l[0]&&2!==l[0])){a=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){a.label=l[1];break}if(6===l[0]&&a.label<o[1]){a.label=o[1],o=l;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(l);break}o[2]&&a.ops.pop(),a.trys.pop();continue}l=t.call(e,a)}catch(e){l=[6,e],n=0}finally{r=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,u])}}}var m=Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]};function _(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||m(t,e,r)}function v(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function h(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}function S(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(h(arguments[t]));return e}function w(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),o=0;for(t=0;t<r;t++)for(var i=arguments[t],a=0,l=i.length;a<l;a++,o++)n[o]=i[a];return n}function g(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}function P(e){return this instanceof P?(this.v=e,this):new P(e)}function x(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,o=r.apply(e,t||[]),i=[];return n={},a("next"),a("throw"),a("return"),n[Symbol.asyncIterator]=function(){return this},n;function a(e){o[e]&&(n[e]=function(t){return new Promise((function(r,n){i.push([e,t,r,n])>1||l(e,t)}))})}function l(e,t){try{(r=o[e](t)).value instanceof P?Promise.resolve(r.value.v).then(u,s):c(i[0][2],r)}catch(e){c(i[0][3],e)}var r}function u(e){l("next",e)}function s(e){l("throw",e)}function c(e,t){e(t),i.shift(),i.length&&l(i[0][0],i[0][1])}}function O(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:P(e[n](t)),done:!1}:o?o(t):t}:o}}function j(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=v(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,o){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,o,(t=e[r](t)).done,t.value)}))}}}function B(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 C(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&m(t,e,r);return E(t,e),t}function k(e){return e&&e.__esModule?e:{default:e}}function A(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function T(e,t,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r}function D(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)}function M(e,t,r){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var n;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose]}if("function"!=typeof n)throw new TypeError("Object not disposable.");e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}var I="function"==typeof SuppressedError?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};function F(e){function t(t){e.error=e.hasError?new I(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}return function r(){for(;e.stack.length;){var n=e.stack.pop();try{var o=n.dispose&&n.dispose.call(n.value);if(n.async)return Promise.resolve(o).then(r,(function(e){return t(e),r()}))}catch(e){t(e)}}if(e.hasError)throw e.error}()}const R={__extends:o,__assign:i,__rest:a,__decorate:l,__param:u,__metadata:f,__awaiter:y,__generator:b,__createBinding:m,__exportStar:_,__values:v,__read:h,__spread:S,__spreadArrays:w,__spreadArray:g,__await:P,__asyncGenerator:x,__asyncDelegator:O,__asyncValues:j,__makeTemplateObject:B,__importStar:C,__importDefault:k,__classPrivateFieldGet:A,__classPrivateFieldSet:T,__classPrivateFieldIn:D,__addDisposableResource:M,__disposeResources:F}}},u={};function s(e){var t=u[e];if(void 0!==t)return t.exports;var r=u[e]={exports:{}};return l[e](r,r.exports,s),r.exports}s.d=(e,t)=>{for(var r in t)s.o(t,r)&&!s.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var c={};return(()=>{var e=c;Object.defineProperty(e,"__esModule",{value:!0}),e.SplitButton=void 0;const t=s(752);Object.defineProperty(e,"SplitButton",{enumerable:!0,get:function(){return t.SplitButton}}),e.default=t.SplitButton})(),c})()));
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("@nimbus-ds/box"),require("@nimbus-ds/icon"),require("@nimbus-ds/text"),require("@nimbus-ds/styles"),require("@nimbus-ds/icons"),require("@floating-ui/react")):"function"==typeof define&&define.amd?define(["react","@nimbus-ds/box","@nimbus-ds/icon","@nimbus-ds/text","@nimbus-ds/styles","@nimbus-ds/icons","@floating-ui/react"],t):"object"==typeof exports?exports["@nimbus-ds/split-button"]=t(require("react"),require("@nimbus-ds/box"),require("@nimbus-ds/icon"),require("@nimbus-ds/text"),require("@nimbus-ds/styles"),require("@nimbus-ds/icons"),require("@floating-ui/react")):e["@nimbus-ds/split-button"]=t(e.react,e["@nimbus-ds/box"],e["@nimbus-ds/icon"],e["@nimbus-ds/text"],e["@nimbus-ds/styles"],e["@nimbus-ds/icons"],e["@floating-ui/react"])}(global,((e,t,r,n,o,i,a)=>(()=>{"use strict";var l={36:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Popover=void 0;const n=r(769).__importStar(r(155)),o=r(955),i=r(367),a=({className:e,style:t,visible:r,onVisibility:a,backgroundColor:l="neutral-background",position:s="bottom",padding:u="base",width:c="fit-content",arrow:p=!0,offset:d=10,enabledHover:f=!1,enabledDismiss:y=!0,enabledClick:b=!0,matchReferenceWidth:m=!1,renderOverlay:_=!1,children:v,content:h,...S})=>{const{className:w,style:g,otherProps:P}=i.popover.sprinkle({...S,width:c,padding:u,backgroundColor:l,color:l}),x=(0,n.useRef)(null),[O,j]=(0,n.useState)(!1),B=(0,n.useMemo)((()=>void 0===r?O:r),[r,O]),E=[(0,o.offset)(d),(0,o.arrow)({element:x}),(0,o.shift)(),(0,o.flip)({crossAxis:s.includes("-"),fallbackAxisSideDirection:"end",padding:5}),m&&(0,o.size)({apply({rects:e,elements:t}){Object.assign(t.floating.style,{width:`${e.reference.width}px`})}})].filter((e=>!1!==e)),{refThemeProvider:C}=(0,i.useTheme)(),{context:k,floatingStyles:A}=(0,o.useFloating)({open:B,placement:s,strategy:"fixed",middleware:E,whileElementsMounted:o.autoUpdate,onOpenChange:e=>{j(e),a?.(e)}}),{getReferenceProps:T,getFloatingProps:D}=(0,o.useInteractions)([(0,o.useHover)(k,{enabled:f,restMs:50,delay:{close:100},handleClose:(0,o.safePolygon)({buffer:1})}),(0,o.useClick)(k,{enabled:b}),(0,o.useDismiss)(k,{enabled:y,outsidePressEvent:_?"mousedown":void 0})]),M=n.default.createElement("div",{...P,ref:k.refs.setFloating,className:[e,i.popover.classnames.content,w].join(" "),style:{...g,...A},...D()},h,p&&n.default.createElement(o.FloatingArrow,{"data-testid":"arrow-element",ref:x,context:k,fill:"currentColor"}));return n.default.createElement(n.default.Fragment,null,n.default.createElement("div",{"data-testid":"popover-container",ref:k.refs.setReference,...T()},"function"==typeof v?v({open:B,setVisibility:j}):v),n.default.createElement(o.FloatingPortal,{id:"nimbus-popover-floating",root:C?.current},B&&n.default.createElement(n.default.Fragment,null,_&&n.default.createElement("div",{className:i.popover.classnames.overlay,"data-testid":"popover-overlay"}),M)))};t.Popover=a,a.displayName="Popover"},909:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Popover=void 0;const n=r(36);var o=r(36);Object.defineProperty(t,"Popover",{enumerable:!0,get:function(){return o.Popover}}),t.default=n.Popover},752:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.useSplitButtonContext=t.SplitButton=void 0;const n=r(769).__importStar(r(155)),o=r(558),i=r(337),a=r(373),l=({className:e,children:t,disabled:r=!1,open:i,onOpenChange:l,popoverPosition:s="bottom-end",...u})=>{const[c,p]=(0,n.useState)(!1),d=void 0!==i,f=d?i:c,y=(0,n.useCallback)((e=>{d||p(e),l?.(e)}),[d,l]),b=(0,n.useMemo)((()=>({disabled:r,open:f,popoverPosition:s,onOpenChange:y})),[r,f,s,y]);return n.default.createElement(a.SplitButtonContext.Provider,{value:b},n.default.createElement(o.Box,{className:e,display:"flex",gap:"none",...u},t))};t.SplitButton=l,l.Action=i.SplitButtonAction,l.Primary=i.SplitButtonPrimary,l.Secondary=i.SplitButtonSecondary,l.displayName="SplitButton";var s=r(373);Object.defineProperty(t,"useSplitButtonContext",{enumerable:!0,get:function(){return s.useSplitButtonContext}})},182:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SplitButtonAction=void 0;const n=r(769).__importDefault(r(155)),o=r(558),i=r(208),a=r(526),l=({className:e,children:t,icon:r,onClick:l,disabled:s=!1,...u})=>n.default.createElement(o.Box,{className:e,backgroundColor:{xs:"transparent",hover:s?"transparent":"neutral-surface"},borderWidth:"none",display:"flex",alignItems:"center",gap:"2",paddingX:"2",paddingY:"1",borderRadius:"1",...u,onClick:l,disabled:s,cursor:s?"auto":"pointer",as:"button",type:"button"},r&&n.default.createElement(i.Icon,{color:s?"neutral-textDisabled":"neutral-textHigh",source:r}),n.default.createElement(a.Text,{fontSize:"base",color:s?"neutral-textDisabled":"neutral-textHigh"},t));t.SplitButtonAction=l,l.displayName="SplitButton.Action"},380:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SplitButtonAction=void 0;var n=r(182);Object.defineProperty(t,"SplitButtonAction",{enumerable:!0,get:function(){return n.SplitButtonAction}})},920:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SplitButtonPrimary=void 0;const n=r(769).__importDefault(r(155)),o=r(367),i=r(373);t.SplitButtonPrimary=({className:e,children:t,disabled:r,onClick:a,...l})=>{const s=(0,i.useSplitButtonContext)(),u=r??s.disabled;return n.default.createElement("button",{type:"button",className:[e,o.splitButton.primaryAppearance.primary].join(" "),disabled:u,onClick:a,...l},t)},t.SplitButtonPrimary.displayName="SplitButton.Primary"},504:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SplitButtonPrimary=void 0;var n=r(920);Object.defineProperty(t,"SplitButtonPrimary",{enumerable:!0,get:function(){return n.SplitButtonPrimary}})},900:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SplitButtonSecondary=void 0;const n=r(769).__importDefault(r(155)),o=r(367),i=r(809),a=r(909),l=r(558),s=r(373);t.SplitButtonSecondary=({className:e,children:t,ariaLabel:r="Show more actions",disabled:u,...c})=>{const p=(0,s.useSplitButtonContext)(),d=u??p.disabled;return n.default.createElement(a.Popover,{visible:p.open,onVisibility:p.onOpenChange,position:p.popoverPosition,arrow:!1,padding:"small",width:"280px",enabledClick:!0,enabledDismiss:!0,content:n.default.createElement(l.Box,{display:"flex",flexDirection:"column",gap:"1",width:"100%"},t)},n.default.createElement("button",{type:"button",className:[e,o.splitButton.secondaryAppearance.primary].join(" "),disabled:d,"aria-label":r,"aria-expanded":p.open,"aria-haspopup":"true",...c},n.default.createElement(i.ChevronDownIcon,null)))},t.SplitButtonSecondary.displayName="SplitButton.Secondary"},732:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SplitButtonSecondary=void 0;var n=r(900);Object.defineProperty(t,"SplitButtonSecondary",{enumerable:!0,get:function(){return n.SplitButtonSecondary}})},337:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SplitButtonSecondary=t.SplitButtonPrimary=t.SplitButtonAction=void 0;var n=r(380);Object.defineProperty(t,"SplitButtonAction",{enumerable:!0,get:function(){return n.SplitButtonAction}});var o=r(504);Object.defineProperty(t,"SplitButtonPrimary",{enumerable:!0,get:function(){return o.SplitButtonPrimary}});var i=r(732);Object.defineProperty(t,"SplitButtonSecondary",{enumerable:!0,get:function(){return i.SplitButtonSecondary}})},178:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.useSplitButtonContext=t.SplitButtonContext=void 0;const n=r(155);t.SplitButtonContext=(0,n.createContext)(void 0);t.useSplitButtonContext=()=>{const e=(0,n.useContext)(t.SplitButtonContext);if(!e)throw new Error("SplitButton compound components must be used within SplitButton");return e}},373:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});r(769).__exportStar(r(178),t)},955:e=>{e.exports=a},558:e=>{e.exports=t},208:e=>{e.exports=r},809:e=>{e.exports=i},367:e=>{e.exports=o},526:e=>{e.exports=n},155:t=>{t.exports=e},769:(e,t,r)=>{r.r(t),r.d(t,{__addDisposableResource:()=>M,__assign:()=>i,__asyncDelegator:()=>O,__asyncGenerator:()=>x,__asyncValues:()=>j,__await:()=>P,__awaiter:()=>y,__classPrivateFieldGet:()=>A,__classPrivateFieldIn:()=>D,__classPrivateFieldSet:()=>T,__createBinding:()=>m,__decorate:()=>l,__disposeResources:()=>I,__esDecorate:()=>u,__exportStar:()=>_,__extends:()=>o,__generator:()=>b,__importDefault:()=>k,__importStar:()=>C,__makeTemplateObject:()=>B,__metadata:()=>f,__param:()=>s,__propKey:()=>p,__read:()=>h,__rest:()=>a,__runInitializers:()=>c,__setFunctionName:()=>d,__spread:()=>S,__spreadArray:()=>g,__spreadArrays:()=>w,__values:()=>v,default:()=>F});var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)};function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var i=function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};function a(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}function l(e,t,r,n){var o,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a}function s(e,t){return function(r,n){t(r,n,e)}}function u(e,t,r,n,o,i){function a(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var l,s=n.kind,u="getter"===s?"get":"setter"===s?"set":"value",c=!t&&e?n.static?e:e.prototype:null,p=t||(c?Object.getOwnPropertyDescriptor(c,n.name):{}),d=!1,f=r.length-1;f>=0;f--){var y={};for(var b in n)y[b]="access"===b?{}:n[b];for(var b in n.access)y.access[b]=n.access[b];y.addInitializer=function(e){if(d)throw new TypeError("Cannot add initializers after decoration has completed");i.push(a(e||null))};var m=(0,r[f])("accessor"===s?{get:p.get,set:p.set}:p[u],y);if("accessor"===s){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw new TypeError("Object expected");(l=a(m.get))&&(p.get=l),(l=a(m.set))&&(p.set=l),(l=a(m.init))&&o.unshift(l)}else(l=a(m))&&("field"===s?o.unshift(l):p[u]=l)}c&&Object.defineProperty(c,n.name,p),d=!0}function c(e,t,r){for(var n=arguments.length>2,o=0;o<t.length;o++)r=n?t[o].call(e,r):t[o].call(e);return n?r:void 0}function p(e){return"symbol"==typeof e?e:"".concat(e)}function d(e,t,r){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function f(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function y(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{s(n.next(e))}catch(e){i(e)}}function l(e){try{s(n.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,l)}s((n=n.apply(e,t||[])).next())}))}function b(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(l){return function(s){return function(l){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,l[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&l[0]?n.return:l[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,l[1])).done)return o;switch(n=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return a.label++,{value:l[1],done:!1};case 5:a.label++,n=l[1],l=[0];continue;case 7:l=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==l[0]&&2!==l[0])){a=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){a.label=l[1];break}if(6===l[0]&&a.label<o[1]){a.label=o[1],o=l;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(l);break}o[2]&&a.ops.pop(),a.trys.pop();continue}l=t.call(e,a)}catch(e){l=[6,e],n=0}finally{r=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,s])}}}var m=Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]};function _(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||m(t,e,r)}function v(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function h(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}function S(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(h(arguments[t]));return e}function w(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),o=0;for(t=0;t<r;t++)for(var i=arguments[t],a=0,l=i.length;a<l;a++,o++)n[o]=i[a];return n}function g(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}function P(e){return this instanceof P?(this.v=e,this):new P(e)}function x(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,o=r.apply(e,t||[]),i=[];return n={},a("next"),a("throw"),a("return"),n[Symbol.asyncIterator]=function(){return this},n;function a(e){o[e]&&(n[e]=function(t){return new Promise((function(r,n){i.push([e,t,r,n])>1||l(e,t)}))})}function l(e,t){try{(r=o[e](t)).value instanceof P?Promise.resolve(r.value.v).then(s,u):c(i[0][2],r)}catch(e){c(i[0][3],e)}var r}function s(e){l("next",e)}function u(e){l("throw",e)}function c(e,t){e(t),i.shift(),i.length&&l(i[0][0],i[0][1])}}function O(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:P(e[n](t)),done:!1}:o?o(t):t}:o}}function j(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=v(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,o){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,o,(t=e[r](t)).done,t.value)}))}}}function B(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 C(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&m(t,e,r);return E(t,e),t}function k(e){return e&&e.__esModule?e:{default:e}}function A(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function T(e,t,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r}function D(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)}function M(e,t,r){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var n;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose]}if("function"!=typeof n)throw new TypeError("Object not disposable.");e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}var N="function"==typeof SuppressedError?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};function I(e){function t(t){e.error=e.hasError?new N(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}return function r(){for(;e.stack.length;){var n=e.stack.pop();try{var o=n.dispose&&n.dispose.call(n.value);if(n.async)return Promise.resolve(o).then(r,(function(e){return t(e),r()}))}catch(e){t(e)}}if(e.hasError)throw e.error}()}const F={__extends:o,__assign:i,__rest:a,__decorate:l,__param:s,__metadata:f,__awaiter:y,__generator:b,__createBinding:m,__exportStar:_,__values:v,__read:h,__spread:S,__spreadArrays:w,__spreadArray:g,__await:P,__asyncGenerator:x,__asyncDelegator:O,__asyncValues:j,__makeTemplateObject:B,__importStar:C,__importDefault:k,__classPrivateFieldGet:A,__classPrivateFieldSet:T,__classPrivateFieldIn:D,__addDisposableResource:M,__disposeResources:I}}},s={};function u(e){var t=s[e];if(void 0!==t)return t.exports;var r=s[e]={exports:{}};return l[e](r,r.exports,u),r.exports}u.d=(e,t)=>{for(var r in t)u.o(t,r)&&!u.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},u.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),u.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var c={};return(()=>{var e=c;Object.defineProperty(e,"__esModule",{value:!0}),e.SplitButton=void 0;const t=u(752);Object.defineProperty(e,"SplitButton",{enumerable:!0,get:function(){return t.SplitButton}}),e.default=t.SplitButton})(),c})()));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nimbus-ds/split-button",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"files": [
|
|
@@ -15,16 +15,16 @@
|
|
|
15
15
|
"version": "yarn version"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@nimbus-ds/box": "^4.
|
|
19
|
-
"@nimbus-ds/icon": "^3.
|
|
20
|
-
"@nimbus-ds/icons": "^1.
|
|
21
|
-
"@nimbus-ds/popover": "^4.
|
|
22
|
-
"@nimbus-ds/styles": "^9.
|
|
23
|
-
"@nimbus-ds/text": "^6.
|
|
18
|
+
"@nimbus-ds/box": "^4.4.0",
|
|
19
|
+
"@nimbus-ds/icon": "^3.4.0",
|
|
20
|
+
"@nimbus-ds/icons": "^1.17.0",
|
|
21
|
+
"@nimbus-ds/popover": "^4.4.0",
|
|
22
|
+
"@nimbus-ds/styles": "^9.56.1",
|
|
23
|
+
"@nimbus-ds/text": "^6.7.0"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
|
-
"react": "^16.8 || ^17.0 || ^18.0",
|
|
27
|
-
"react-dom": "^16.8 || ^17.0 || ^18.0"
|
|
26
|
+
"react": "^16.8 || ^17.0 || ^18.0 || ^19.0",
|
|
27
|
+
"react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0"
|
|
28
28
|
},
|
|
29
29
|
"homepage": "https://nimbus.nuvemshop.com.br/documentation",
|
|
30
30
|
"repository": {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"url": "https://github.com/TiendaNube/nimbus-design-system/issues"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@nimbus-ds/button": "^2.
|
|
39
|
-
"@nimbus-ds/webpack": "^1.7.
|
|
38
|
+
"@nimbus-ds/button": "^2.11.0",
|
|
39
|
+
"@nimbus-ds/webpack": "^1.7.2"
|
|
40
40
|
}
|
|
41
41
|
}
|