@mirohq/design-system-button 3.2.0-deprecated-button.1 → 4.0.0-button.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/dist/module.js CHANGED
@@ -1,299 +1,313 @@
1
1
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
- import React, { useRef } from 'react';
3
- import { useButton } from '@react-aria/button';
4
- import { mergeProps } from '@react-aria/utils';
2
+ import React, { createContext, useContext } from 'react';
3
+ import { addPropsToChildren, booleanify } from '@mirohq/design-system-utils';
5
4
  import { Spinner } from '@mirohq/design-system-spinner';
6
- import { useLink } from '@react-aria/link';
7
- import { useFocusRing } from '@react-aria/focus';
8
5
  import { Primitive } from '@mirohq/design-system-primitive';
9
6
  import { styled } from '@mirohq/design-system-stitches';
7
+ import { BaseButton, sizes } from '@mirohq/design-system-base-button';
8
+ import { isIconComponent, styles } from '@mirohq/design-system-base-icon';
9
+ import { focus } from '@mirohq/design-system-styles';
10
10
 
11
- const focusFilled = {
12
- "&[data-focused]": {
13
- boxShadow: "inset 0 0 0 1px white, 0 0 0 1px rgba(104, 129, 255, 1), 0 0 0 5px rgba(217, 224, 255, 1)"
11
+ const ButtonContext = createContext({});
12
+ const ButtonProvider = ({
13
+ children,
14
+ ...restProps
15
+ }) => /* @__PURE__ */ jsx(
16
+ ButtonContext.Provider,
17
+ {
18
+ value: {
19
+ ...restProps
20
+ },
21
+ children
14
22
  }
23
+ );
24
+ const useButtonContext = () => useContext(ButtonContext);
25
+
26
+ const StyledIconSlot = styled(Primitive.div, {});
27
+ const buttonIconSizes = {
28
+ small: "small",
29
+ medium: "small",
30
+ large: "medium",
31
+ "x-large": "medium"
15
32
  };
16
- const focusOutline = {
17
- "&[data-focused]": {
18
- boxShadow: "0 0 0 1px rgba(104, 129, 255, 1), 0 0 0 5px rgba(217, 224, 255, 1)",
19
- borderColor: "transparent"
33
+ const buttonIconWeights = {
34
+ small: "thin",
35
+ medium: "thin",
36
+ large: "normal",
37
+ "x-large": "normal"
38
+ };
39
+ const IconSlot = React.forwardRef(({ children, ...restProps }, forwardRef) => {
40
+ const { size } = useButtonContext();
41
+ const formattedChildren = addPropsToChildren(
42
+ children,
43
+ (child) => isIconComponent(child),
44
+ {
45
+ "data-icon-component": "",
46
+ size: buttonIconSizes[size],
47
+ weight: buttonIconWeights[size]
48
+ }
49
+ );
50
+ return /* @__PURE__ */ jsx(StyledIconSlot, { ...restProps, ref: forwardRef, "aria-hidden": true, asChild: true, children: formattedChildren });
51
+ });
52
+
53
+ const disabledSelector = '&[disabled], &[aria-disabled="true"]';
54
+ const iconSlotSelector = "& ".concat(StyledIconSlot);
55
+ const externalIconSelector = "& svg:not([data-icon-component]), & img:not([data-icon-component])";
56
+ const solidDisabled = {
57
+ [disabledSelector]: {
58
+ backgroundColor: "$background-neutrals-disabled",
59
+ color: "$text-neutrals-disabled",
60
+ [iconSlotSelector]: {
61
+ color: "$icon-neutrals-disabled"
62
+ }
63
+ }
64
+ };
65
+ const outlineDisabled = {
66
+ [disabledSelector]: {
67
+ backgroundColor: "$background-neutrals",
68
+ borderColor: "$border-neutrals-disabled",
69
+ color: "$text-neutrals-disabled",
70
+ [iconSlotSelector]: {
71
+ color: "$icon-neutrals-disabled"
72
+ }
20
73
  }
21
74
  };
22
- const focusDefault = {
23
- "&[data-focused]": {
24
- boxShadow: "0 0 0 1px rgba(104, 129, 255, 1), 0 0 0 5px rgba(217, 224, 255, 1)"
75
+ const ghostDisabled = {
76
+ [disabledSelector]: {
77
+ color: "$text-neutrals-disabled",
78
+ backgroundColor: "$transparent",
79
+ [iconSlotSelector]: {
80
+ color: "$icon-neutrals-disabled"
81
+ }
25
82
  }
26
83
  };
27
- const pressedSelector = "&:active, &[data-pressed]";
28
- const StyledButton = styled(Primitive.button, {
29
- boxSizing: "border-box",
30
- display: "inline-block",
31
- outline: "none",
84
+ const LABEL_OFFSET = 2;
85
+ const StyledButton = styled(BaseButton, {
32
86
  whiteSpace: "nowrap",
33
87
  textOverflow: "ellipsis",
34
88
  textAlign: "center",
35
- verticalAlign: "middle",
36
- userSelect: "none",
37
- fontFamily: "inherit",
38
- fontStyle: "normal",
39
- fontStretch: "normal",
40
- letterSpacing: "normal",
41
- fontWeight: "normal",
42
89
  position: "relative",
43
- cursor: "pointer",
44
- border: "none",
45
- textDecoration: "none",
46
- backgroundColor: "transparent",
47
- "&[disabled]": {
48
- pointerEvents: "none",
49
- opacity: 0.4
90
+ width: "fit-content",
91
+ maxWidth: "100%",
92
+ lineHeight: 1,
93
+ fontWeight: "$semibold",
94
+ border: "1px solid transparent",
95
+ // to make outline and solid/ghost variants the same width
96
+ ...focus.css({
97
+ // TODO https://miro.atlassian.net/browse/MDS-1284 use `$focus-small` token after updating themes/web/local/shadows.ts :oliver.l 2024-09-05
98
+ boxShadow: "0px 0px 0px 2px $colors$border-focus-inner, 0px 0px 0px 4px $colors$focus-keyboard"
99
+ }),
100
+ ["& ".concat(StyledIconSlot, ":first-child")]: {
101
+ marginLeft: -LABEL_OFFSET,
102
+ marginRight: "calc($50 + ".concat(LABEL_OFFSET, "px)")
103
+ },
104
+ ["& ".concat(StyledIconSlot, ":last-child")]: {
105
+ marginRight: -LABEL_OFFSET,
106
+ marginLeft: "calc($50 + ".concat(LABEL_OFFSET, "px)")
50
107
  },
51
108
  variants: {
52
109
  variant: {
53
- primary: {},
54
- secondary: {},
55
- danger: {}
56
- },
57
- appearance: {
58
- filled: {},
59
- outlined: {},
60
- flat: {}
61
- },
62
- size: {
63
- large: {
64
- padding: "14px 32px 18px 32px",
65
- fontSize: "20px",
66
- lineHeight: "28px",
67
- height: "60px"
110
+ primary: {
111
+ backgroundColor: "$background-primary-prominent",
112
+ color: "$text-neutrals-inverted",
113
+ [iconSlotSelector]: {
114
+ color: "$icon-primary-inverted"
115
+ },
116
+ "&[data-hovered]": {
117
+ backgroundColor: "$background-primary-prominent-hover"
118
+ },
119
+ "&[data-pressed]": {
120
+ backgroundColor: "$background-primary-prominent-active"
121
+ },
122
+ ...solidDisabled
68
123
  },
69
- medium: {
70
- padding: "11px 24px 13px 24px",
71
- fontSize: "16px",
72
- lineHeight: "24px",
73
- height: "48px"
124
+ secondary: {
125
+ backgroundColor: "$button-background-secondary",
126
+ color: "$text-neutrals",
127
+ [iconSlotSelector]: {
128
+ color: "$icon-neutrals"
129
+ },
130
+ "&[data-hovered]": {
131
+ color: "$text-neutrals-hover",
132
+ backgroundColor: "$button-background-secondary-hover"
133
+ },
134
+ "&[data-pressed]": {
135
+ color: "$text-neutrals-active",
136
+ backgroundColor: "$button-background-secondary-pressed"
137
+ },
138
+ ...solidDisabled
74
139
  },
75
- small: {
76
- padding: "7px 16px 9px 16px",
77
- fontSize: "14px",
78
- lineHeight: "20px",
79
- height: "36px"
140
+ tertiary: {
141
+ borderColor: "$border-primary",
142
+ color: "$text-primary",
143
+ [iconSlotSelector]: {
144
+ color: "$icon-primary"
145
+ },
146
+ "&[data-hovered]": {
147
+ backgroundColor: "$background-primary-subtle-hover",
148
+ borderColor: "$border-primary-hover",
149
+ color: "$text-primary-hover",
150
+ [iconSlotSelector]: {
151
+ color: "$icon-primary-hover"
152
+ }
153
+ },
154
+ "&[data-pressed]": {
155
+ backgroundColor: "$background-primary-subtle-active",
156
+ borderColor: "$border-primary-active",
157
+ color: "$text-primary-active",
158
+ [iconSlotSelector]: {
159
+ color: "$icon-primary-active"
160
+ }
161
+ },
162
+ ...outlineDisabled
163
+ },
164
+ ghost: {
165
+ backgroundColor: "transparent",
166
+ color: "$text-neutrals",
167
+ "&[data-hovered]": {
168
+ backgroundColor: "$button-background-secondary-hover",
169
+ color: "$text-neutrals-hover",
170
+ [iconSlotSelector]: {
171
+ color: "$icon-primary-hover"
172
+ }
173
+ },
174
+ "&[data-pressed]": {
175
+ backgroundColor: "$button-background-secondary-pressed",
176
+ color: "$text-neutrals-active",
177
+ [iconSlotSelector]: {
178
+ color: "$icon-primary-active"
179
+ }
180
+ },
181
+ ...ghostDisabled
80
182
  },
81
- "x-small": {
82
- padding: "5px 12px 7px",
83
- fontSize: "14px",
84
- lineHeight: "20px",
85
- height: "32px"
183
+ "ghost-subtle": {
184
+ backgroundColor: "transparent",
185
+ color: "$text-neutrals",
186
+ [iconSlotSelector]: {
187
+ color: "$icon-neutrals"
188
+ },
189
+ "&[data-hovered]": {
190
+ backgroundColor: "$background-neutrals-subtle-hover"
191
+ },
192
+ "&[data-pressed]": {
193
+ backgroundColor: "$background-neutrals-subtle-active"
194
+ },
195
+ ...ghostDisabled
86
196
  },
87
- "xx-small": {
88
- padding: "3px 12px",
89
- fontSize: "12px",
90
- lineHeight: "18px",
91
- height: "24px"
92
- }
93
- },
94
- rounded: {
95
- true: {
96
- borderRadius: "$half"
97
- }
98
- },
99
- loading: {
100
- true: {
101
- "&[disabled]": {
102
- cursor: "default",
103
- opacity: 1,
104
- pointerEvents: "none",
105
- "& > span": {
106
- visibility: "hidden"
197
+ danger: {
198
+ backgroundColor: "$background-danger-prominent",
199
+ color: "$text-danger-inverted",
200
+ [iconSlotSelector]: {
201
+ color: "$icon-danger-inverted"
202
+ },
203
+ "&[data-hovered]": {
204
+ backgroundColor: "$background-danger-prominent-hover"
205
+ },
206
+ "&[data-pressed]": {
207
+ backgroundColor: "$background-danger-prominent-active"
208
+ },
209
+ ...solidDisabled
210
+ },
211
+ "danger-secondary": {
212
+ borderColor: "$border-danger",
213
+ color: "$text-danger",
214
+ [iconSlotSelector]: {
215
+ color: "$icon-danger"
216
+ },
217
+ "&[data-hovered]": {
218
+ backgroundColor: "$background-danger-subtle-hover",
219
+ color: "$text-danger-hover",
220
+ [iconSlotSelector]: {
221
+ color: "$icon-danger-hover"
107
222
  }
108
- }
109
- }
110
- },
111
- fluid: {
112
- true: {
113
- width: "100%",
114
- display: "block"
115
- }
116
- }
117
- },
118
- compoundVariants: [
119
- {
120
- size: "small",
121
- rounded: true,
122
- css: {
123
- padding: "10px 16px",
124
- height: "40px"
125
- }
126
- },
127
- {
128
- size: "large",
129
- rounded: false,
130
- css: {
131
- borderRadius: "$50"
132
- }
133
- },
134
- {
135
- size: "medium",
136
- rounded: false,
137
- css: {
138
- borderRadius: "$50"
139
- }
140
- },
141
- {
142
- size: "small",
143
- rounded: false,
144
- css: {
145
- borderRadius: "$50"
146
- }
147
- },
148
- {
149
- size: "x-small",
150
- rounded: false,
151
- css: {
152
- borderRadius: "$50"
153
- }
154
- },
155
- {
156
- size: "xx-small",
157
- rounded: false,
158
- css: {
159
- borderRadius: "$25"
160
- }
161
- },
162
- {
163
- variant: "primary",
164
- appearance: "filled",
165
- css: {
166
- color: "#FFFFFF",
167
- backgroundColor: "#3859FF",
168
- ...focusFilled,
169
- "&:hover": {
170
- color: "#FFFFFF",
171
- backgroundColor: "#3F53D9"
172
223
  },
173
- [pressedSelector]: {
174
- backgroundColor: "#122277"
175
- }
176
- }
177
- },
178
- {
179
- variant: "primary",
180
- appearance: "outlined",
181
- css: {
182
- color: "rgba(66, 98, 255, 1)",
183
- border: "1px solid rgba(66, 98, 255, 1)",
184
- ...focusOutline,
185
- "&:hover": {
186
- color: "rgba(66, 98, 255, 1)",
187
- backgroundColor: "rgba(244, 246, 255, 1)"
224
+ "&[data-pressed]": {
225
+ backgroundColor: "$background-danger-subtle-active",
226
+ color: "$text-danger-active",
227
+ [iconSlotSelector]: {
228
+ color: "$icon-danger-active"
229
+ }
188
230
  },
189
- [pressedSelector]: {
190
- backgroundColor: "rgba(240, 242, 255, 1)"
191
- }
192
- }
193
- },
194
- {
195
- variant: "primary",
196
- appearance: "flat",
197
- css: {
198
- color: "rgba(66, 98, 255, 1)",
199
- ...focusDefault,
200
- "&:hover": {
201
- color: "rgba(69, 91, 237, 1)",
202
- backgroundColor: "rgba(245, 245, 247, 1)"
231
+ ...outlineDisabled
232
+ },
233
+ "ghost-danger": {
234
+ backgroundColor: "transparent",
235
+ color: "$text-danger",
236
+ [iconSlotSelector]: {
237
+ color: "$icon-danger"
203
238
  },
204
- [pressedSelector]: {
205
- color: "rgba(61, 81, 212, 1)"
206
- }
207
- }
208
- },
209
- {
210
- variant: "secondary",
211
- appearance: "filled",
212
- css: {
213
- color: "rgba(5, 0, 56, 1)",
214
- backgroundColor: "rgba(245, 245, 247, 1)",
215
- ...focusFilled,
216
- "&:hover": {
217
- color: "rgba(5, 0, 56, 1)",
218
- backgroundColor: "rgba(240, 240, 243, 1)"
239
+ "&[data-hovered]": {
240
+ backgroundColor: "$background-danger-subtle",
241
+ color: "$text-danger-hover",
242
+ [iconSlotSelector]: {
243
+ color: "$icon-danger-hover"
244
+ }
219
245
  },
220
- [pressedSelector]: {
221
- backgroundColor: "rgba(235, 235, 239, 1)"
222
- }
223
- }
224
- },
225
- {
226
- variant: "secondary",
227
- appearance: "outlined",
228
- css: {
229
- color: "rgba(5, 0, 56, 1)",
230
- border: "1px solid rgba(205, 204, 215, 1)",
231
- ...focusOutline,
232
- "&:hover": {
233
- color: "rgba(5, 0, 56, 1)",
234
- backgroundColor: "rgba(245, 245, 247, 1)"
246
+ "&[data-pressed]": {
247
+ backgroundColor: "$background-danger-subtle-hover",
248
+ color: "$text-danger-active",
249
+ [iconSlotSelector]: {
250
+ color: "$icon-danger-active"
251
+ }
235
252
  },
236
- [pressedSelector]: {
237
- backgroundColor: "rgba(235, 235, 239, 1)"
238
- }
253
+ ...ghostDisabled
239
254
  }
240
255
  },
241
- {
242
- variant: "secondary",
243
- appearance: "flat",
244
- css: {
245
- color: "rgba(5, 0, 56, 1)",
246
- ...focusDefault,
247
- "&:hover": {
248
- color: "rgba(5, 0, 56, 1)",
249
- backgroundColor: "rgba(245, 245, 247, 1)"
256
+ size: {
257
+ "x-large": {
258
+ height: sizes.xLarge,
259
+ fontSize: "$200",
260
+ paddingX: "calc($200 + ".concat(LABEL_OFFSET, "px)"),
261
+ [externalIconSelector]: {
262
+ ...styles.size.medium,
263
+ ...styles.weight.normal
250
264
  }
251
- }
252
- },
253
- {
254
- variant: "danger",
255
- appearance: "filled",
256
- css: {
257
- color: "#FFFFFF",
258
- backgroundColor: "rgba(217, 41, 41, 1)",
259
- ...focusFilled,
260
- "&:hover": {
261
- backgroundColor: "rgba(199, 20, 20, 1)"
262
- },
263
- [pressedSelector]: {
264
- backgroundColor: "rgba(184, 13, 13, 1)"
265
+ },
266
+ large: {
267
+ height: sizes.large,
268
+ fontSize: "$200",
269
+ paddingX: "calc($150 + ".concat(LABEL_OFFSET, "px)"),
270
+ [externalIconSelector]: {
271
+ ...styles.size.medium,
272
+ ...styles.weight.normal
273
+ }
274
+ },
275
+ medium: {
276
+ height: sizes.medium,
277
+ fontSize: "$175",
278
+ paddingX: "calc($100 + ".concat(LABEL_OFFSET, "px)"),
279
+ [externalIconSelector]: {
280
+ ...styles.size.small,
281
+ ...styles.weight.thin
282
+ }
283
+ },
284
+ small: {
285
+ fontSize: "$175",
286
+ height: "$6",
287
+ paddingX: "calc($100 + ".concat(LABEL_OFFSET, "px)"),
288
+ [externalIconSelector]: {
289
+ ...styles.size.small,
290
+ ...styles.weight.thin
265
291
  }
266
292
  }
267
293
  },
268
- {
269
- variant: "danger",
270
- appearance: "outlined",
271
- css: {
272
- color: "rgba(217, 41, 41, 1)",
273
- border: "1px solid rgba(217, 41, 41, 1)",
274
- ...focusOutline,
275
- "&:hover": {
276
- color: "rgba(217, 41, 41, 1)",
277
- backgroundColor: "rgba(254, 247, 247, 1)"
278
- },
279
- [pressedSelector]: {
280
- backgroundColor: "rgba(253, 242, 242, 1)"
281
- }
294
+ rounded: {
295
+ true: {
296
+ borderRadius: "$round"
282
297
  }
283
298
  },
284
- {
285
- variant: "danger",
286
- appearance: "flat",
287
- css: {
288
- color: "rgba(217, 41, 41, 1)",
289
- ...focusDefault,
290
- "&:hover": {
291
- color: "rgba(217, 41, 41, 1)",
292
- backgroundColor: "rgba(245, 245, 247, 1)"
293
- }
299
+ fluid: {
300
+ true: {
301
+ display: "flex",
302
+ justifyContent: "center",
303
+ maxWidth: "100%",
304
+ width: "100%"
294
305
  }
295
306
  }
296
- ]
307
+ }
308
+ });
309
+ const StyledHiddenContent = styled(Primitive.span, {
310
+ visibility: "hidden"
297
311
  });
298
312
  const StyledSpinnerBox = styled(Primitive.div, {
299
313
  display: "flex",
@@ -307,97 +321,64 @@ const StyledSpinnerBox = styled(Primitive.div, {
307
321
  margin: "auto"
308
322
  });
309
323
 
324
+ const Label = Primitive.span;
325
+ Label.displayName = "Label";
326
+
310
327
  const Button = React.forwardRef(
311
328
  ({
312
329
  variant = "primary",
313
- appearance = "filled",
314
- size = "medium",
330
+ size = "large",
315
331
  loading = false,
316
332
  rounded = false,
317
333
  fluid = false,
318
- disabled = false,
319
- href,
320
- target,
321
- rel,
334
+ "aria-disabled": ariaDisabled,
335
+ asChild = false,
322
336
  children,
323
- onPress,
324
- onClick,
325
- asChild,
326
337
  ...restProps
327
338
  }, forwardRef) => {
328
- let spinnerSize;
329
- if (typeof size === "string") {
330
- spinnerSize = ["x-small", "xx-small"].includes(size) ? "small" : "medium";
331
- } else {
332
- spinnerSize = "medium";
339
+ let spinnerSize = "medium";
340
+ if (typeof size === "string" && ["small", "medium"].includes(size)) {
341
+ spinnerSize = "small";
333
342
  }
334
- const _loading = loading === "true" || loading === true;
335
- const shouldBeDisabled = disabled === true || _loading;
336
- const asLink = href != null;
337
- const ref = useRef(null);
338
- const refWithFallback = forwardRef != null ? forwardRef : ref;
339
- const { buttonProps, isPressed } = useButton(
340
- {
341
- isDisabled: shouldBeDisabled,
342
- href,
343
- onPress: onPress != null ? onPress : onClick,
344
- allowFocusWhenDisabled: false,
345
- ...restProps
346
- },
347
- // @ts-expect-error
348
- refWithFallback
349
- );
350
- const { linkProps } = useLink(
351
- {
352
- isDisabled: disabled,
353
- onPress: onPress != null ? onPress : onClick,
354
- ...restProps
355
- },
356
- // @ts-expect-error
357
- refWithFallback
358
- );
359
- const Content = /* @__PURE__ */ jsxs(Fragment, { children: [
360
- _loading && /* @__PURE__ */ jsx(StyledSpinnerBox, { children: /* @__PURE__ */ jsx(Spinner, { size: spinnerSize }) }),
361
- /* @__PURE__ */ jsx("span", { children })
362
- ] });
363
- const tabIndexProp = shouldBeDisabled && {
364
- tabIndex: -1
365
- };
366
- const { isFocusVisible, focusProps } = useFocusRing();
367
- const elementProps = mergeProps(
368
- restProps,
369
- asLink ? linkProps : buttonProps,
370
- focusProps
371
- );
372
- return /* @__PURE__ */ jsx(
343
+ const shouldHaveAriaDisabled = booleanify(ariaDisabled) || loading;
344
+ let formattedChildren = children;
345
+ if (loading) {
346
+ const spinnerTestId = process.env.NODE_ENV === "test" ? "button-spinner" : void 0;
347
+ if (asChild && React.Children.toArray(children).length === 1 && React.isValidElement(children)) {
348
+ const firstLevelChild = React.Children.only(children);
349
+ const { children: secondLevelChildren, ...childProps } = firstLevelChild.props;
350
+ formattedChildren = React.cloneElement(firstLevelChild, {
351
+ ...childProps,
352
+ children: /* @__PURE__ */ jsxs(Fragment, { children: [
353
+ /* @__PURE__ */ jsx(StyledSpinnerBox, { "data-testid": spinnerTestId, children: /* @__PURE__ */ jsx(Spinner, { size: spinnerSize }) }),
354
+ /* @__PURE__ */ jsx(StyledHiddenContent, { children: secondLevelChildren })
355
+ ] })
356
+ });
357
+ } else {
358
+ formattedChildren = /* @__PURE__ */ jsxs(Fragment, { children: [
359
+ /* @__PURE__ */ jsx(StyledSpinnerBox, { "data-testid": spinnerTestId, children: /* @__PURE__ */ jsx(Spinner, { size: spinnerSize }) }),
360
+ /* @__PURE__ */ jsx(StyledHiddenContent, { children })
361
+ ] });
362
+ }
363
+ }
364
+ return /* @__PURE__ */ jsx(ButtonProvider, { size, children: /* @__PURE__ */ jsx(
373
365
  StyledButton,
374
366
  {
375
- ...elementProps,
367
+ ...restProps,
368
+ asChild,
376
369
  variant,
377
- appearance,
378
- size,
379
- loading,
380
370
  rounded,
381
371
  fluid,
382
- disabled: shouldBeDisabled,
383
- asChild: asLink || asChild,
384
- ...tabIndexProp,
385
- "data-pressed": isPressed ? "" : void 0,
386
- "data-focused": isFocusVisible ? "" : void 0,
387
- ref: refWithFallback,
388
- children: asLink ? /* @__PURE__ */ jsx(
389
- "a",
390
- {
391
- href,
392
- target,
393
- rel: target === "_blank" ? "noopener noreferrer ".concat(rel) : rel,
394
- children: Content
395
- }
396
- ) : Content
372
+ size,
373
+ "aria-disabled": shouldHaveAriaDisabled ? true : void 0,
374
+ ref: forwardRef,
375
+ children: formattedChildren
397
376
  }
398
- );
377
+ ) });
399
378
  }
400
379
  );
380
+ Button.IconSlot = IconSlot;
381
+ Button.Label = Label;
401
382
 
402
383
  export { Button };
403
384
  //# sourceMappingURL=module.js.map