@ngrok/mantle 0.78.0 → 0.79.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/dist/agent.json +1 -1
- package/dist/alert-dialog.d.ts +85 -46
- package/dist/alert-dialog.js +1 -1
- package/dist/alert.d.ts +24 -16
- package/dist/alert.js +1 -1
- package/dist/button-ClC60Nzg.js +1 -0
- package/dist/{button-Bw9MpShl.d.ts → button-DcXOWUYo.d.ts} +49 -7
- package/dist/button.d.ts +6 -5
- package/dist/button.js +1 -1
- package/dist/calendar.js +1 -1
- package/dist/centered-layout.d.ts +17 -5
- package/dist/code-block.js +1 -1
- package/dist/command.d.ts +12 -12
- package/dist/command.js +1 -1
- package/dist/data-table.d.ts +36 -10
- package/dist/data-table.js +1 -1
- package/dist/{dialog-DVDFVT_-.js → dialog-ZCgG41hx.js} +1 -1
- package/dist/dialog.d.ts +72 -54
- package/dist/dialog.js +1 -1
- package/dist/dropdown-menu-Bt1aKF1g.js +1 -0
- package/dist/{dropdown-menu-DT30TQzL.d.ts → dropdown-menu-DP_Ne9Mr.d.ts} +7 -4
- package/dist/dropdown-menu.d.ts +2 -2
- package/dist/dropdown-menu.js +1 -1
- package/dist/empty.d.ts +12 -12
- package/dist/field.d.ts +19 -2
- package/dist/field.js +1 -1
- package/dist/hover-card.d.ts +9 -7
- package/dist/{icon-button-DuRSCsPh.d.ts → icon-button-B7uEj1qq.d.ts} +68 -5
- package/dist/icon-button-DV2-GZHf.js +1 -0
- package/dist/{index-CDwfBOAA.d.ts → index-BivvYYs-.d.ts} +5 -5
- package/dist/index-g2rfwNCH.d.ts +1 -0
- package/dist/intents-DdSKSj1c.d.ts +28 -0
- package/dist/llms.txt +1 -1
- package/dist/pagination.d.ts +1 -1
- package/dist/pagination.js +1 -1
- package/dist/popover.d.ts +11 -11
- package/dist/{primitive-wm7Wk-gy.js → primitive-M-kZdNIS.js} +1 -1
- package/dist/sheet.d.ts +81 -52
- package/dist/sheet.js +1 -1
- package/dist/{sizes-Dje_rwKc.d.ts → sizes-BCoI4bhP.d.ts} +2 -2
- package/dist/split-button.d.ts +8 -7
- package/dist/split-button.js +1 -1
- package/dist/theme-switcher.d.ts +150 -21
- package/dist/theme-switcher.js +1 -1
- package/dist/toast-D3ntBmn4.js +1 -0
- package/dist/toast.d.ts +19 -13
- package/dist/toast.js +1 -1
- package/dist/tooltip.d.ts +6 -6
- package/package.json +1 -1
- package/dist/button-AS5Ir3DE.js +0 -1
- package/dist/dropdown-menu-ByUQkAvJ.js +0 -1
- package/dist/icon-button-CxVsZ2N1.js +0 -1
- package/dist/index-BnI3OppC.d.ts +0 -1
- package/dist/toast-RkhbliFh.js +0 -1
package/dist/sheet.d.ts
CHANGED
|
@@ -1,13 +1,33 @@
|
|
|
1
|
+
import { t as ButtonIntent } from "./intents-DdSKSj1c.js";
|
|
1
2
|
import { t as Root } from "./primitive-C64-m48O.js";
|
|
2
|
-
import { n as IconButtonProps } from "./icon-button-
|
|
3
|
+
import { n as IconButtonAppearance, r as IconButtonProps } from "./icon-button-B7uEj1qq.js";
|
|
3
4
|
import { HTMLAttributes } from "react";
|
|
4
5
|
import { VariantProps } from "class-variance-authority";
|
|
5
6
|
//#region src/components/sheet/sheet.d.ts
|
|
6
|
-
type SheetCloseIconButtonProps = Partial<Omit<IconButtonProps, "icon"
|
|
7
|
+
type SheetCloseIconButtonProps = Partial<Omit<IconButtonProps, "icon" | "appearance" | "intent">> & {
|
|
8
|
+
/**
|
|
9
|
+
* The visual style of the close icon button. Optional here —
|
|
10
|
+
* `Sheet.CloseIconButton` defaults to `"ghost"` so it stays visually quiet
|
|
11
|
+
* in the `Sheet.Header` beside the title.
|
|
12
|
+
*
|
|
13
|
+
* @default "ghost"
|
|
14
|
+
*/
|
|
15
|
+
appearance?: IconButtonAppearance;
|
|
16
|
+
/**
|
|
17
|
+
* The tone of the close icon button. Optional here — `Sheet.CloseIconButton`
|
|
18
|
+
* defaults to `"neutral"`, the workhorse tone for routine dismissal.
|
|
19
|
+
*
|
|
20
|
+
* @default "neutral"
|
|
21
|
+
*/
|
|
22
|
+
intent?: ButtonIntent;
|
|
23
|
+
};
|
|
7
24
|
/**
|
|
8
25
|
* An icon button that closes the `Sheet` when clicked.
|
|
9
26
|
* Should be rendered within the `Sheet.Header` as a child of `Sheet.Actions`.
|
|
10
27
|
*
|
|
28
|
+
* Composes around the mantle `IconButton` and defaults to
|
|
29
|
+
* `appearance="ghost"` and `intent="neutral"`.
|
|
30
|
+
*
|
|
11
31
|
* @see https://mantle.ngrok.com/components/overlays/sheet#sheetcloseiconbutton
|
|
12
32
|
*
|
|
13
33
|
* @example
|
|
@@ -21,6 +41,7 @@ type SheetCloseIconButtonProps = Partial<Omit<IconButtonProps, "icon">>;
|
|
|
21
41
|
* <Sheet.Actions>
|
|
22
42
|
* <IconButton
|
|
23
43
|
* appearance="ghost"
|
|
44
|
+
* intent="neutral"
|
|
24
45
|
* type="button"
|
|
25
46
|
* icon={<TrashSimple />}
|
|
26
47
|
* label="Delete"
|
|
@@ -43,9 +64,9 @@ type SheetCloseIconButtonProps = Partial<Omit<IconButtonProps, "icon">>;
|
|
|
43
64
|
* </Sheet.Body>
|
|
44
65
|
* <Sheet.Footer>
|
|
45
66
|
* <Sheet.Close asChild>
|
|
46
|
-
* <Button type="button">Close</Button>
|
|
67
|
+
* <Button type="button" appearance="outlined" intent="neutral">Close</Button>
|
|
47
68
|
* </Sheet.Close>
|
|
48
|
-
* <Button type="button" appearance="filled">
|
|
69
|
+
* <Button type="button" appearance="filled" intent="neutral">
|
|
49
70
|
* Save
|
|
50
71
|
* </Button>
|
|
51
72
|
* </Sheet.Footer>
|
|
@@ -54,7 +75,7 @@ type SheetCloseIconButtonProps = Partial<Omit<IconButtonProps, "icon">>;
|
|
|
54
75
|
* ```
|
|
55
76
|
*/
|
|
56
77
|
declare const CloseIconButton: {
|
|
57
|
-
({ size, type, label, appearance, ...props }: SheetCloseIconButtonProps): import("react").JSX.Element;
|
|
78
|
+
({ size, type, label, appearance, intent, ...props }: SheetCloseIconButtonProps): import("react").JSX.Element;
|
|
58
79
|
displayName: string;
|
|
59
80
|
};
|
|
60
81
|
/**
|
|
@@ -74,6 +95,7 @@ declare const CloseIconButton: {
|
|
|
74
95
|
* <Sheet.Actions>
|
|
75
96
|
* <IconButton
|
|
76
97
|
* appearance="ghost"
|
|
98
|
+
* intent="neutral"
|
|
77
99
|
* type="button"
|
|
78
100
|
* icon={<TrashSimple />}
|
|
79
101
|
* label="Delete"
|
|
@@ -96,9 +118,9 @@ declare const CloseIconButton: {
|
|
|
96
118
|
* </Sheet.Body>
|
|
97
119
|
* <Sheet.Footer>
|
|
98
120
|
* <Sheet.Close asChild>
|
|
99
|
-
* <Button type="button">Close</Button>
|
|
121
|
+
* <Button type="button" appearance="outlined" intent="neutral">Close</Button>
|
|
100
122
|
* </Sheet.Close>
|
|
101
|
-
* <Button type="button" appearance="filled">
|
|
123
|
+
* <Button type="button" appearance="filled" intent="neutral">
|
|
102
124
|
* Save
|
|
103
125
|
* </Button>
|
|
104
126
|
* </Sheet.Footer>
|
|
@@ -127,6 +149,7 @@ declare const Body: {
|
|
|
127
149
|
* <Sheet.Actions>
|
|
128
150
|
* <IconButton
|
|
129
151
|
* appearance="ghost"
|
|
152
|
+
* intent="neutral"
|
|
130
153
|
* type="button"
|
|
131
154
|
* icon={<TrashSimple />}
|
|
132
155
|
* label="Delete"
|
|
@@ -149,9 +172,9 @@ declare const Body: {
|
|
|
149
172
|
* </Sheet.Body>
|
|
150
173
|
* <Sheet.Footer>
|
|
151
174
|
* <Sheet.Close asChild>
|
|
152
|
-
* <Button type="button">Close</Button>
|
|
175
|
+
* <Button type="button" appearance="outlined" intent="neutral">Close</Button>
|
|
153
176
|
* </Sheet.Close>
|
|
154
|
-
* <Button type="button" appearance="filled">
|
|
177
|
+
* <Button type="button" appearance="filled" intent="neutral">
|
|
155
178
|
* Save
|
|
156
179
|
* </Button>
|
|
157
180
|
* </Sheet.Footer>
|
|
@@ -180,6 +203,7 @@ declare const Header: {
|
|
|
180
203
|
* <Sheet.Actions>
|
|
181
204
|
* <IconButton
|
|
182
205
|
* appearance="ghost"
|
|
206
|
+
* intent="neutral"
|
|
183
207
|
* type="button"
|
|
184
208
|
* icon={<TrashSimple />}
|
|
185
209
|
* label="Delete"
|
|
@@ -202,9 +226,9 @@ declare const Header: {
|
|
|
202
226
|
* </Sheet.Body>
|
|
203
227
|
* <Sheet.Footer>
|
|
204
228
|
* <Sheet.Close asChild>
|
|
205
|
-
* <Button type="button">Close</Button>
|
|
229
|
+
* <Button type="button" appearance="outlined" intent="neutral">Close</Button>
|
|
206
230
|
* </Sheet.Close>
|
|
207
|
-
* <Button type="button" appearance="filled">
|
|
231
|
+
* <Button type="button" appearance="filled" intent="neutral">
|
|
208
232
|
* Save
|
|
209
233
|
* </Button>
|
|
210
234
|
* </Sheet.Footer>
|
|
@@ -252,7 +276,7 @@ declare const Footer: {
|
|
|
252
276
|
* // Triggering a stateful sheet
|
|
253
277
|
* <Sheet.Root>
|
|
254
278
|
* <Sheet.Trigger asChild>
|
|
255
|
-
* <Button type="button" appearance="filled">
|
|
279
|
+
* <Button type="button" appearance="filled" intent="neutral">
|
|
256
280
|
* Open Sheet
|
|
257
281
|
* </Button>
|
|
258
282
|
* </Sheet.Trigger>
|
|
@@ -263,6 +287,7 @@ declare const Footer: {
|
|
|
263
287
|
* <Sheet.Actions>
|
|
264
288
|
* <IconButton
|
|
265
289
|
* appearance="ghost"
|
|
290
|
+
* intent="neutral"
|
|
266
291
|
* type="button"
|
|
267
292
|
* icon={<TrashSimple />}
|
|
268
293
|
* label="Delete"
|
|
@@ -285,9 +310,9 @@ declare const Footer: {
|
|
|
285
310
|
* </Sheet.Body>
|
|
286
311
|
* <Sheet.Footer>
|
|
287
312
|
* <Sheet.Close asChild>
|
|
288
|
-
* <Button type="button">Close</Button>
|
|
313
|
+
* <Button type="button" appearance="outlined" intent="neutral">Close</Button>
|
|
289
314
|
* </Sheet.Close>
|
|
290
|
-
* <Button type="button" appearance="filled">
|
|
315
|
+
* <Button type="button" appearance="filled" intent="neutral">
|
|
291
316
|
* Save
|
|
292
317
|
* </Button>
|
|
293
318
|
* </Sheet.Footer>
|
|
@@ -306,6 +331,7 @@ declare const Footer: {
|
|
|
306
331
|
* <Sheet.Actions>
|
|
307
332
|
* <IconButton
|
|
308
333
|
* appearance="ghost"
|
|
334
|
+
* intent="neutral"
|
|
309
335
|
* type="button"
|
|
310
336
|
* icon={<TrashSimple />}
|
|
311
337
|
* label="Delete"
|
|
@@ -328,9 +354,9 @@ declare const Footer: {
|
|
|
328
354
|
* </Sheet.Body>
|
|
329
355
|
* <Sheet.Footer>
|
|
330
356
|
* <Sheet.Close asChild>
|
|
331
|
-
* <Button type="button">Close</Button>
|
|
357
|
+
* <Button type="button" appearance="outlined" intent="neutral">Close</Button>
|
|
332
358
|
* </Sheet.Close>
|
|
333
|
-
* <Button type="button" appearance="filled">
|
|
359
|
+
* <Button type="button" appearance="filled" intent="neutral">
|
|
334
360
|
* Save
|
|
335
361
|
* </Button>
|
|
336
362
|
* </Sheet.Footer>
|
|
@@ -353,7 +379,7 @@ declare const Sheet: {
|
|
|
353
379
|
* ```tsx
|
|
354
380
|
* <Sheet.Root>
|
|
355
381
|
* <Sheet.Trigger asChild>
|
|
356
|
-
* <Button type="button" appearance="filled">Open Sheet</Button>
|
|
382
|
+
* <Button type="button" appearance="filled" intent="neutral">Open Sheet</Button>
|
|
357
383
|
* </Sheet.Trigger>
|
|
358
384
|
* <Sheet.Content>
|
|
359
385
|
* <Sheet.Header>
|
|
@@ -372,9 +398,9 @@ declare const Sheet: {
|
|
|
372
398
|
* </Sheet.Body>
|
|
373
399
|
* <Sheet.Footer>
|
|
374
400
|
* <Sheet.Close asChild>
|
|
375
|
-
* <Button type="button">Close</Button>
|
|
401
|
+
* <Button type="button" appearance="outlined" intent="neutral">Close</Button>
|
|
376
402
|
* </Sheet.Close>
|
|
377
|
-
* <Button type="button" appearance="filled">Save</Button>
|
|
403
|
+
* <Button type="button" appearance="filled" intent="neutral">Save</Button>
|
|
378
404
|
* </Sheet.Footer>
|
|
379
405
|
* </Sheet.Content>
|
|
380
406
|
* </Sheet.Root>
|
|
@@ -390,7 +416,7 @@ declare const Sheet: {
|
|
|
390
416
|
* ```tsx
|
|
391
417
|
* <Sheet.Root>
|
|
392
418
|
* <Sheet.Trigger asChild>
|
|
393
|
-
* <Button type="button" appearance="filled">Open Sheet</Button>
|
|
419
|
+
* <Button type="button" appearance="filled" intent="neutral">Open Sheet</Button>
|
|
394
420
|
* </Sheet.Trigger>
|
|
395
421
|
* <Sheet.Content>
|
|
396
422
|
* <Sheet.Header>
|
|
@@ -409,9 +435,9 @@ declare const Sheet: {
|
|
|
409
435
|
* </Sheet.Body>
|
|
410
436
|
* <Sheet.Footer>
|
|
411
437
|
* <Sheet.Close asChild>
|
|
412
|
-
* <Button type="button">Close</Button>
|
|
438
|
+
* <Button type="button" appearance="outlined" intent="neutral">Close</Button>
|
|
413
439
|
* </Sheet.Close>
|
|
414
|
-
* <Button type="button" appearance="filled">Save</Button>
|
|
440
|
+
* <Button type="button" appearance="filled" intent="neutral">Save</Button>
|
|
415
441
|
* </Sheet.Footer>
|
|
416
442
|
* </Sheet.Content>
|
|
417
443
|
* </Sheet.Root>
|
|
@@ -428,7 +454,7 @@ declare const Sheet: {
|
|
|
428
454
|
* ```tsx
|
|
429
455
|
* <Sheet.Root>
|
|
430
456
|
* <Sheet.Trigger asChild>
|
|
431
|
-
* <Button type="button" appearance="filled">Open Sheet</Button>
|
|
457
|
+
* <Button type="button" appearance="filled" intent="neutral">Open Sheet</Button>
|
|
432
458
|
* </Sheet.Trigger>
|
|
433
459
|
* <Sheet.Content>
|
|
434
460
|
* <Sheet.Header>
|
|
@@ -447,9 +473,9 @@ declare const Sheet: {
|
|
|
447
473
|
* </Sheet.Body>
|
|
448
474
|
* <Sheet.Footer>
|
|
449
475
|
* <Sheet.Close asChild>
|
|
450
|
-
* <Button type="button">Close</Button>
|
|
476
|
+
* <Button type="button" appearance="outlined" intent="neutral">Close</Button>
|
|
451
477
|
* </Sheet.Close>
|
|
452
|
-
* <Button type="button" appearance="filled">Save</Button>
|
|
478
|
+
* <Button type="button" appearance="filled" intent="neutral">Save</Button>
|
|
453
479
|
* </Sheet.Footer>
|
|
454
480
|
* </Sheet.Content>
|
|
455
481
|
* </Sheet.Root>
|
|
@@ -467,7 +493,7 @@ declare const Sheet: {
|
|
|
467
493
|
* ```tsx
|
|
468
494
|
* <Sheet.Root>
|
|
469
495
|
* <Sheet.Trigger asChild>
|
|
470
|
-
* <Button type="button" appearance="filled">Open Sheet</Button>
|
|
496
|
+
* <Button type="button" appearance="filled" intent="neutral">Open Sheet</Button>
|
|
471
497
|
* </Sheet.Trigger>
|
|
472
498
|
* <Sheet.Content>
|
|
473
499
|
* <Sheet.Header>
|
|
@@ -486,9 +512,9 @@ declare const Sheet: {
|
|
|
486
512
|
* </Sheet.Body>
|
|
487
513
|
* <Sheet.Footer>
|
|
488
514
|
* <Sheet.Close asChild>
|
|
489
|
-
* <Button type="button">Close</Button>
|
|
515
|
+
* <Button type="button" appearance="outlined" intent="neutral">Close</Button>
|
|
490
516
|
* </Sheet.Close>
|
|
491
|
-
* <Button type="button" appearance="filled">Save</Button>
|
|
517
|
+
* <Button type="button" appearance="filled" intent="neutral">Save</Button>
|
|
492
518
|
* </Sheet.Footer>
|
|
493
519
|
* </Sheet.Content>
|
|
494
520
|
* </Sheet.Root>
|
|
@@ -499,13 +525,16 @@ declare const Sheet: {
|
|
|
499
525
|
* An icon button that closes the `Sheet` when clicked.
|
|
500
526
|
* Should be rendered within the `Sheet.Header` as a child of `Sheet.Actions`.
|
|
501
527
|
*
|
|
528
|
+
* Composes around the mantle `IconButton` and defaults to
|
|
529
|
+
* `appearance="ghost"` and `intent="neutral"`.
|
|
530
|
+
*
|
|
502
531
|
* @see https://mantle.ngrok.com/components/overlays/sheet#sheetcloseiconbutton
|
|
503
532
|
*
|
|
504
533
|
* @example
|
|
505
534
|
* ```tsx
|
|
506
535
|
* <Sheet.Root>
|
|
507
536
|
* <Sheet.Trigger asChild>
|
|
508
|
-
* <Button type="button" appearance="filled">Open Sheet</Button>
|
|
537
|
+
* <Button type="button" appearance="filled" intent="neutral">Open Sheet</Button>
|
|
509
538
|
* </Sheet.Trigger>
|
|
510
539
|
* <Sheet.Content>
|
|
511
540
|
* <Sheet.Header>
|
|
@@ -524,9 +553,9 @@ declare const Sheet: {
|
|
|
524
553
|
* </Sheet.Body>
|
|
525
554
|
* <Sheet.Footer>
|
|
526
555
|
* <Sheet.Close asChild>
|
|
527
|
-
* <Button type="button">Close</Button>
|
|
556
|
+
* <Button type="button" appearance="outlined" intent="neutral">Close</Button>
|
|
528
557
|
* </Sheet.Close>
|
|
529
|
-
* <Button type="button" appearance="filled">Save</Button>
|
|
558
|
+
* <Button type="button" appearance="filled" intent="neutral">Save</Button>
|
|
530
559
|
* </Sheet.Footer>
|
|
531
560
|
* </Sheet.Content>
|
|
532
561
|
* </Sheet.Root>
|
|
@@ -548,7 +577,7 @@ declare const Sheet: {
|
|
|
548
577
|
* ```tsx
|
|
549
578
|
* <Sheet.Root>
|
|
550
579
|
* <Sheet.Trigger asChild>
|
|
551
|
-
* <Button type="button" appearance="filled">Open Sheet</Button>
|
|
580
|
+
* <Button type="button" appearance="filled" intent="neutral">Open Sheet</Button>
|
|
552
581
|
* </Sheet.Trigger>
|
|
553
582
|
* <Sheet.Content>
|
|
554
583
|
* <Sheet.Header>
|
|
@@ -567,9 +596,9 @@ declare const Sheet: {
|
|
|
567
596
|
* </Sheet.Body>
|
|
568
597
|
* <Sheet.Footer>
|
|
569
598
|
* <Sheet.Close asChild>
|
|
570
|
-
* <Button type="button">Close</Button>
|
|
599
|
+
* <Button type="button" appearance="outlined" intent="neutral">Close</Button>
|
|
571
600
|
* </Sheet.Close>
|
|
572
|
-
* <Button type="button" appearance="filled">Save</Button>
|
|
601
|
+
* <Button type="button" appearance="filled" intent="neutral">Save</Button>
|
|
573
602
|
* </Sheet.Footer>
|
|
574
603
|
* </Sheet.Content>
|
|
575
604
|
* </Sheet.Root>
|
|
@@ -598,7 +627,7 @@ declare const Sheet: {
|
|
|
598
627
|
* ```tsx
|
|
599
628
|
* <Sheet.Root>
|
|
600
629
|
* <Sheet.Trigger asChild>
|
|
601
|
-
* <Button type="button" appearance="filled">Open Sheet</Button>
|
|
630
|
+
* <Button type="button" appearance="filled" intent="neutral">Open Sheet</Button>
|
|
602
631
|
* </Sheet.Trigger>
|
|
603
632
|
* <Sheet.Content>
|
|
604
633
|
* <Sheet.Header>
|
|
@@ -617,9 +646,9 @@ declare const Sheet: {
|
|
|
617
646
|
* </Sheet.Body>
|
|
618
647
|
* <Sheet.Footer>
|
|
619
648
|
* <Sheet.Close asChild>
|
|
620
|
-
* <Button type="button">Close</Button>
|
|
649
|
+
* <Button type="button" appearance="outlined" intent="neutral">Close</Button>
|
|
621
650
|
* </Sheet.Close>
|
|
622
|
-
* <Button type="button" appearance="filled">Save</Button>
|
|
651
|
+
* <Button type="button" appearance="filled" intent="neutral">Save</Button>
|
|
623
652
|
* </Sheet.Footer>
|
|
624
653
|
* </Sheet.Content>
|
|
625
654
|
* </Sheet.Root>
|
|
@@ -636,7 +665,7 @@ declare const Sheet: {
|
|
|
636
665
|
* ```tsx
|
|
637
666
|
* <Sheet.Root>
|
|
638
667
|
* <Sheet.Trigger asChild>
|
|
639
|
-
* <Button type="button" appearance="filled">Open Sheet</Button>
|
|
668
|
+
* <Button type="button" appearance="filled" intent="neutral">Open Sheet</Button>
|
|
640
669
|
* </Sheet.Trigger>
|
|
641
670
|
* <Sheet.Content>
|
|
642
671
|
* <Sheet.Header>
|
|
@@ -655,9 +684,9 @@ declare const Sheet: {
|
|
|
655
684
|
* </Sheet.Body>
|
|
656
685
|
* <Sheet.Footer>
|
|
657
686
|
* <Sheet.Close asChild>
|
|
658
|
-
* <Button type="button">Close</Button>
|
|
687
|
+
* <Button type="button" appearance="outlined" intent="neutral">Close</Button>
|
|
659
688
|
* </Sheet.Close>
|
|
660
|
-
* <Button type="button" appearance="filled">Save</Button>
|
|
689
|
+
* <Button type="button" appearance="filled" intent="neutral">Save</Button>
|
|
661
690
|
* </Sheet.Footer>
|
|
662
691
|
* </Sheet.Content>
|
|
663
692
|
* </Sheet.Root>
|
|
@@ -674,7 +703,7 @@ declare const Sheet: {
|
|
|
674
703
|
* ```tsx
|
|
675
704
|
* <Sheet.Root>
|
|
676
705
|
* <Sheet.Trigger asChild>
|
|
677
|
-
* <Button type="button" appearance="filled">Open Sheet</Button>
|
|
706
|
+
* <Button type="button" appearance="filled" intent="neutral">Open Sheet</Button>
|
|
678
707
|
* </Sheet.Trigger>
|
|
679
708
|
* <Sheet.Content>
|
|
680
709
|
* <Sheet.Header>
|
|
@@ -693,9 +722,9 @@ declare const Sheet: {
|
|
|
693
722
|
* </Sheet.Body>
|
|
694
723
|
* <Sheet.Footer>
|
|
695
724
|
* <Sheet.Close asChild>
|
|
696
|
-
* <Button type="button">Close</Button>
|
|
725
|
+
* <Button type="button" appearance="outlined" intent="neutral">Close</Button>
|
|
697
726
|
* </Sheet.Close>
|
|
698
|
-
* <Button type="button" appearance="filled">Save</Button>
|
|
727
|
+
* <Button type="button" appearance="filled" intent="neutral">Save</Button>
|
|
699
728
|
* </Sheet.Footer>
|
|
700
729
|
* </Sheet.Content>
|
|
701
730
|
* </Sheet.Root>
|
|
@@ -712,7 +741,7 @@ declare const Sheet: {
|
|
|
712
741
|
* ```tsx
|
|
713
742
|
* <Sheet.Root>
|
|
714
743
|
* <Sheet.Trigger asChild>
|
|
715
|
-
* <Button type="button" appearance="filled">Open Sheet</Button>
|
|
744
|
+
* <Button type="button" appearance="filled" intent="neutral">Open Sheet</Button>
|
|
716
745
|
* </Sheet.Trigger>
|
|
717
746
|
* <Sheet.Content>
|
|
718
747
|
* <Sheet.Header>
|
|
@@ -731,9 +760,9 @@ declare const Sheet: {
|
|
|
731
760
|
* </Sheet.Body>
|
|
732
761
|
* <Sheet.Footer>
|
|
733
762
|
* <Sheet.Close asChild>
|
|
734
|
-
* <Button type="button">Close</Button>
|
|
763
|
+
* <Button type="button" appearance="outlined" intent="neutral">Close</Button>
|
|
735
764
|
* </Sheet.Close>
|
|
736
|
-
* <Button type="button" appearance="filled">Save</Button>
|
|
765
|
+
* <Button type="button" appearance="filled" intent="neutral">Save</Button>
|
|
737
766
|
* </Sheet.Footer>
|
|
738
767
|
* </Sheet.Content>
|
|
739
768
|
* </Sheet.Root>
|
|
@@ -749,7 +778,7 @@ declare const Sheet: {
|
|
|
749
778
|
* ```tsx
|
|
750
779
|
* <Sheet.Root>
|
|
751
780
|
* <Sheet.Trigger asChild>
|
|
752
|
-
* <Button type="button" appearance="filled">Open Sheet</Button>
|
|
781
|
+
* <Button type="button" appearance="filled" intent="neutral">Open Sheet</Button>
|
|
753
782
|
* </Sheet.Trigger>
|
|
754
783
|
* <Sheet.Content>
|
|
755
784
|
* <Sheet.Header>
|
|
@@ -768,9 +797,9 @@ declare const Sheet: {
|
|
|
768
797
|
* </Sheet.Body>
|
|
769
798
|
* <Sheet.Footer>
|
|
770
799
|
* <Sheet.Close asChild>
|
|
771
|
-
* <Button type="button">Close</Button>
|
|
800
|
+
* <Button type="button" appearance="outlined" intent="neutral">Close</Button>
|
|
772
801
|
* </Sheet.Close>
|
|
773
|
-
* <Button type="button" appearance="filled">Save</Button>
|
|
802
|
+
* <Button type="button" appearance="filled" intent="neutral">Save</Button>
|
|
774
803
|
* </Sheet.Footer>
|
|
775
804
|
* </Sheet.Content>
|
|
776
805
|
* </Sheet.Root>
|
|
@@ -787,7 +816,7 @@ declare const Sheet: {
|
|
|
787
816
|
* ```tsx
|
|
788
817
|
* <Sheet.Root>
|
|
789
818
|
* <Sheet.Trigger asChild>
|
|
790
|
-
* <Button type="button" appearance="filled">Open Sheet</Button>
|
|
819
|
+
* <Button type="button" appearance="filled" intent="neutral">Open Sheet</Button>
|
|
791
820
|
* </Sheet.Trigger>
|
|
792
821
|
* <Sheet.Content>
|
|
793
822
|
* <Sheet.Header>
|
|
@@ -806,9 +835,9 @@ declare const Sheet: {
|
|
|
806
835
|
* </Sheet.Body>
|
|
807
836
|
* <Sheet.Footer>
|
|
808
837
|
* <Sheet.Close asChild>
|
|
809
|
-
* <Button type="button">Close</Button>
|
|
838
|
+
* <Button type="button" appearance="outlined" intent="neutral">Close</Button>
|
|
810
839
|
* </Sheet.Close>
|
|
811
|
-
* <Button type="button" appearance="filled">Save</Button>
|
|
840
|
+
* <Button type="button" appearance="filled" intent="neutral">Save</Button>
|
|
812
841
|
* </Sheet.Footer>
|
|
813
842
|
* </Sheet.Content>
|
|
814
843
|
* </Sheet.Root>
|
package/dist/sheet.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./icon-button-
|
|
1
|
+
import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./icon-button-DV2-GZHf.js";import{a as n,c as r,i,n as a,o,r as s,s as c,t as l}from"./primitive-M-kZdNIS.js";import{forwardRef as u}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";import{XIcon as p}from"@phosphor-icons/react/X";import{cva as m}from"class-variance-authority";const h=o;h.displayName=`Sheet`;const g=r;g.displayName=`SheetTrigger`;const _=l;_.displayName=`SheetClose`;const v=n;v.displayName=`SheetPortal`;const y=u(({className:t,...n},r)=>d(i,{"data-slot":`sheet-overlay`,className:e(`bg-overlay data-state-closed:animate-out data-state-closed:fade-out-0 data-state-open:animate-in data-state-open:fade-in-0 fixed inset-0 z-50 backdrop-blur-xs`,t),...n,ref:r}));y.displayName=i.displayName;const b=m(`bg-dialog border-dialog inset-y-0 h-full w-full fixed z-50 flex flex-col shadow-lg outline-hidden transition ease-in-out focus-within:outline-hidden data-state-closed:duration-100 data-state-closed:animate-out data-state-open:duration-100 data-state-open:animate-in`,{variants:{side:{left:`data-state-closed:slide-out-to-left data-state-open:slide-in-from-left left-0 border-r`,right:`data-state-closed:slide-out-to-right data-state-open:slide-in-from-right right-0 border-l`}},defaultVariants:{side:`right`}}),x=u(({children:t,className:n,preferredWidth:r=`sm:max-w-[30rem]`,side:i=`right`,...o},s)=>f(v,{children:[d(y,{}),d(a,{"data-slot":`sheet-content`,"data-mantle-modal-content":!0,className:e(b({side:i}),r,n),ref:s,...o,children:t})]}));x.displayName=a.displayName;const S=({size:e=`md`,type:n=`button`,label:r=`Close Sheet`,appearance:i=`ghost`,intent:a=`neutral`,...o})=>d(l,{asChild:!0,children:d(t,{"data-slot":`sheet-close-icon-button`,appearance:i,icon:d(p,{}),intent:a,label:r,size:e,type:n,...o})});S.displayName=`SheetCloseIconButton`;const C=({className:t,...n})=>d(`div`,{"data-slot":`sheet-body`,className:e(`scrollbar scrollbar-gutter-stable text-body flex-1 overflow-y-auto p-6`,t),...n});C.displayName=`SheetBody`;const w=({className:t,...n})=>d(`div`,{"data-slot":`sheet-header`,className:e(`border-dialog-muted flex shrink-0 flex-col gap-2 border-b py-4 pl-6 pr-4`,`has-[.icon-button]:pr-4`,t),...n});w.displayName=`SheetHeader`;const T=({className:t,...n})=>d(`div`,{"data-slot":`sheet-footer`,className:e(`border-dialog-muted flex shrink-0 justify-end gap-2 border-t px-6 py-2.5`,t),...n});T.displayName=`SheetFooter`;const E=u(({className:t,...n},r)=>d(c,{"data-slot":`sheet-title`,ref:r,className:e(`text-strong flex-1 truncate text-lg font-medium`,t),...n}));E.displayName=c.displayName;const D=u(({children:t,className:n,...r},i)=>d(`div`,{"data-slot":`sheet-title-group`,className:e(`flex items-center justify-between gap-2`,n),...r,ref:i,children:t}));D.displayName=`SheetTitleGroup`;const O=u(({className:t,...n},r)=>d(s,{"data-slot":`sheet-description`,ref:r,className:e(`text-body text-sm`,t),...n}));O.displayName=s.displayName;const k=u(({children:t,className:n,...r},i)=>d(`div`,{"data-slot":`sheet-actions`,className:e(`flex h-full items-center gap-2`,n),...r,ref:i,children:t}));k.displayName=`SheetActions`;const A={Root:h,Actions:k,Body:C,Close:_,CloseIconButton:S,Content:x,Description:O,Footer:T,Header:w,Title:E,TitleGroup:D,Trigger:g};export{A as Sheet};
|
|
@@ -20,8 +20,8 @@ declare const buttonSizes: readonly ["xs", "sm", "md", "lg", "xl"];
|
|
|
20
20
|
*
|
|
21
21
|
* @example
|
|
22
22
|
* ```tsx
|
|
23
|
-
* <Button size="sm">Dense action</Button>
|
|
24
|
-
* <IconButton size="sm" label="Copy" icon={<CopyIcon />} />
|
|
23
|
+
* <Button appearance="outlined" intent="neutral" size="sm">Dense action</Button>
|
|
24
|
+
* <IconButton appearance="outlined" intent="neutral" size="sm" label="Copy" icon={<CopyIcon />} />
|
|
25
25
|
* ```
|
|
26
26
|
*/
|
|
27
27
|
type ButtonSize = (typeof buttonSizes)[number];
|
package/dist/split-button.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { t as Button } from "./button-
|
|
2
|
-
import { t as IconButton } from "./icon-button-
|
|
3
|
-
import { t as
|
|
4
|
-
import { t as
|
|
1
|
+
import { t as Button } from "./button-DcXOWUYo.js";
|
|
2
|
+
import { t as IconButton } from "./icon-button-B7uEj1qq.js";
|
|
3
|
+
import { t as WithDataSlot } from "./data-slot-CChfb_cv.js";
|
|
4
|
+
import { t as ButtonSize } from "./sizes-BCoI4bhP.js";
|
|
5
|
+
import { t as DropdownMenu } from "./dropdown-menu-DP_Ne9Mr.js";
|
|
5
6
|
import { ComponentProps, ReactNode } from "react";
|
|
6
7
|
//#region src/components/split-button/split-button.d.ts
|
|
7
8
|
type RootProps = ComponentProps<typeof DropdownMenu.Root> & ComponentProps<"div"> & {
|
|
@@ -13,8 +14,8 @@ type RootProps = ComponentProps<typeof DropdownMenu.Root> & ComponentProps<"div"
|
|
|
13
14
|
*/
|
|
14
15
|
size?: ButtonSize;
|
|
15
16
|
};
|
|
16
|
-
type PrimaryActionProps = Omit<ComponentProps<typeof Button>, "appearance" | "
|
|
17
|
-
type MenuTriggerProps = Omit<ComponentProps<typeof IconButton>, "appearance" | "size" | "asChild" | "icon"> & {
|
|
17
|
+
type PrimaryActionProps = Omit<ComponentProps<typeof Button>, "appearance" | "intent" | "size">;
|
|
18
|
+
type MenuTriggerProps = Omit<ComponentProps<typeof IconButton>, "appearance" | "intent" | "size" | "asChild" | "icon"> & {
|
|
18
19
|
icon?: ReactNode;
|
|
19
20
|
};
|
|
20
21
|
/**
|
|
@@ -171,7 +172,7 @@ declare const SplitButton: {
|
|
|
171
172
|
* </SplitButton.Root>
|
|
172
173
|
* ```
|
|
173
174
|
*/
|
|
174
|
-
readonly MenuContent: import("react").ForwardRefExoticComponent<Omit<Omit<import("@radix-ui/react-dropdown-menu").DropdownMenuContentProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
|
|
175
|
+
readonly MenuContent: import("react").ForwardRefExoticComponent<Omit<Omit<import("@radix-ui/react-dropdown-menu").DropdownMenuContentProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & WithDataSlot & {
|
|
175
176
|
width?: "trigger" | "content";
|
|
176
177
|
} & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
177
178
|
/**
|
package/dist/split-button.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./icon-CDtYjF_H.js";import{t as n}from"./icon-button-
|
|
1
|
+
import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./icon-CDtYjF_H.js";import{t as n}from"./icon-button-DV2-GZHf.js";import{t as r}from"./button-ClC60Nzg.js";import{t as i}from"./dropdown-menu-Bt1aKF1g.js";import{CaretDownIcon as a}from"@phosphor-icons/react/CaretDown";import{createContext as o,forwardRef as s,useContext as c,useMemo as l}from"react";import{jsx as u}from"react/jsx-runtime";const d=o({size:`md`}),f=s(({className:t,children:n,dir:r,open:a,defaultOpen:o,onOpenChange:s,modal:c,size:f=`md`,...p},m)=>{let h=l(()=>({size:f}),[f]);return u(i.Root,{dir:r,open:a,defaultOpen:o,onOpenChange:s,modal:c,children:u(d.Provider,{value:h,children:u(`div`,{"data-slot":`split-button`,"data-size":f,className:e(`flex flex-row [&>*:first-child]:rounded-r-none [&>*:last-child]:rounded-l-none [&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:not(:first-child)]:-ml-px [&>*:focus]:relative [&>*:focus]:z-10 [&>*:hover]:relative [&>*:hover]:z-10 *:active:scale-100!`,t),ref:m,...p,children:n})})})});f.displayName=`SplitButton`;const p=s((e,t)=>{let{size:n}=c(d);return u(r,{appearance:`outlined`,intent:`neutral`,ref:t,size:n,...e})});p.displayName=`SplitButtonPrimaryAction`;const m=s(({icon:e,...r},o)=>{let{size:s}=c(d);return u(i.Trigger,{asChild:!0,className:`group`,children:u(n,{icon:e??u(t,{svg:u(a,{weight:`bold`,className:`size-4 group-data-[state=open]:-rotate-180 transition-transform ease-out duration-150`})}),appearance:`outlined`,intent:`neutral`,ref:o,size:s,...r})})});m.displayName=`SplitButtonMenuTrigger`;const h=s(({align:e=`end`,...t},n)=>u(i.Content,{align:e,ref:n,...t}));h.displayName=`SplitButtonMenuContent`;const g=s(({className:t,...n},r)=>u(i.Item,{className:e(`gap-2`,t),ref:r,...n}));g.displayName=`SplitButtonMenuItem`;const _={Root:f,PrimaryAction:p,MenuTrigger:m,MenuContent:h,MenuItem:g};export{_ as SplitButton};
|