@dnotrever2/super-kit 0.1.20 → 0.1.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +95 -15
- package/dist/Card/Card.d.ts +1 -2
- package/dist/Markers/Markers.d.ts +7 -3
- package/dist/Menu/Menu.d.ts +9 -6
- package/dist/Modal/Modal.d.ts +4 -0
- package/dist/Popover/Popover.d.ts +3 -1
- package/dist/PushButton/PushButton.d.ts +10 -5
- package/dist/Toast/Toast.d.ts +16 -9
- package/dist/Tooltip/Tooltip.d.ts +2 -1
- package/dist/super-kit.cjs +1 -1
- package/dist/super-kit.cjs.map +1 -1
- package/dist/super-kit.css +1 -1
- package/dist/super-kit.js +2037 -1791
- package/dist/super-kit.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -151,6 +151,8 @@ import { Badge } from "@dnotrever2/super-kit";
|
|
|
151
151
|
|
|
152
152
|
Badge variants match Button variants. Normal semantic badges use a stronger background with white text. Use `coloredText` when the text should follow the badge variant color. Outline badges use the variant color for the text. Use `pill` for the rounded shape. Use `indicator` for a small status dot; provide an accessible label with `aria-label`.
|
|
153
153
|
|
|
154
|
+
Badge also accepts native `<span>` attributes, including `className`, `style`, `id`, `title`, and `aria-*`. For one-off visual tweaks, use `style` or `className`; the internal CSS variables `--badge-bg`, `--badge-fg`, and `--badge-border` can be overridden for custom background, text, and border colors.
|
|
155
|
+
|
|
154
156
|
---
|
|
155
157
|
|
|
156
158
|
### Breadcrumb
|
|
@@ -428,6 +430,7 @@ import { Checkbox, Radio, RadioGroup, Switch } from "@dnotrever2/super-kit";
|
|
|
428
430
|
|
|
429
431
|
<Checkbox label="Auto-deploy" checked={checked} onChange={setChecked} />
|
|
430
432
|
<Checkbox label="Partial" indeterminate />
|
|
433
|
+
<Checkbox label="Required" isInvalid />
|
|
431
434
|
<Checkbox label="Disabled" disabled />
|
|
432
435
|
|
|
433
436
|
<RadioGroup>
|
|
@@ -436,6 +439,7 @@ import { Checkbox, Radio, RadioGroup, Switch } from "@dnotrever2/super-kit";
|
|
|
436
439
|
</RadioGroup>
|
|
437
440
|
|
|
438
441
|
<Switch label="SSO required" checked={on} onChange={setOn} />
|
|
442
|
+
<Switch label="SSO required" thinTrack checked={on} onChange={setOn} />
|
|
439
443
|
```
|
|
440
444
|
|
|
441
445
|
**Checkbox / Switch props**
|
|
@@ -446,6 +450,8 @@ import { Checkbox, Radio, RadioGroup, Switch } from "@dnotrever2/super-kit";
|
|
|
446
450
|
| `checked` | `boolean` |
|
|
447
451
|
| `defaultChecked` | `boolean` |
|
|
448
452
|
| `indeterminate` | `boolean` (Checkbox only) |
|
|
453
|
+
| `thinTrack` | `boolean` (Switch only) |
|
|
454
|
+
| `isInvalid` | `boolean` |
|
|
449
455
|
| `disabled` | `boolean` |
|
|
450
456
|
| `onChange` | `(checked: boolean) => void` |
|
|
451
457
|
|
|
@@ -456,6 +462,7 @@ import { Checkbox, Radio, RadioGroup, Switch } from "@dnotrever2/super-kit";
|
|
|
456
462
|
| `label` | `ReactNode` |
|
|
457
463
|
| `value` | `string` |
|
|
458
464
|
| `checked` | `boolean` |
|
|
465
|
+
| `isInvalid` | `boolean` |
|
|
459
466
|
| `disabled` | `boolean` |
|
|
460
467
|
| `onChange` | `(value: string) => void` |
|
|
461
468
|
|
|
@@ -466,7 +473,7 @@ import { Checkbox, Radio, RadioGroup, Switch } from "@dnotrever2/super-kit";
|
|
|
466
473
|
Composable dropdown menu — render inside a positioned container toggled by your own trigger button.
|
|
467
474
|
|
|
468
475
|
```tsx
|
|
469
|
-
import { Menu, MenuItem
|
|
476
|
+
import { Menu, MenuItem } from "@dnotrever2/super-kit";
|
|
470
477
|
|
|
471
478
|
const [open, setOpen] = useState(false);
|
|
472
479
|
|
|
@@ -474,10 +481,22 @@ const [open, setOpen] = useState(false);
|
|
|
474
481
|
<Button onClick={() => setOpen(o => !o)}>Options</Button>
|
|
475
482
|
{open && (
|
|
476
483
|
<div style={{ position: "absolute", top: "calc(100% + 4px)", left: 0, zIndex: 20 }}>
|
|
477
|
-
<Menu style={{ width: 240 }}>
|
|
484
|
+
<Menu shadow style={{ width: 240 }}>
|
|
478
485
|
<MenuItem icon={<PlayIcon />} kbd="⌘R">Run workflow</MenuItem>
|
|
479
486
|
<MenuItem icon={<CopyIcon />}>Duplicate</MenuItem>
|
|
480
|
-
<
|
|
487
|
+
<MenuItem
|
|
488
|
+
submenuMode="external"
|
|
489
|
+
submenuTrigger="hover"
|
|
490
|
+
submenu={
|
|
491
|
+
<>
|
|
492
|
+
<MenuItem>Production</MenuItem>
|
|
493
|
+
<MenuItem>Staging</MenuItem>
|
|
494
|
+
<MenuItem>Preview</MenuItem>
|
|
495
|
+
</>
|
|
496
|
+
}
|
|
497
|
+
>
|
|
498
|
+
Deploy target
|
|
499
|
+
</MenuItem>
|
|
481
500
|
<MenuItem icon={<TrashIcon />} danger>Delete</MenuItem>
|
|
482
501
|
</Menu>
|
|
483
502
|
</div>
|
|
@@ -485,6 +504,13 @@ const [open, setOpen] = useState(false);
|
|
|
485
504
|
</div>
|
|
486
505
|
```
|
|
487
506
|
|
|
507
|
+
**Menu props**
|
|
508
|
+
|
|
509
|
+
| Prop | Type | Default |
|
|
510
|
+
| -------- | --------- | ------- |
|
|
511
|
+
| `shadow` | `boolean` | `true` |
|
|
512
|
+
| `spacing` | `"sm" \| "md" \| "lg"` | `"sm"` |
|
|
513
|
+
|
|
488
514
|
**MenuItem props**
|
|
489
515
|
|
|
490
516
|
| Prop | Type | Default |
|
|
@@ -493,6 +519,9 @@ const [open, setOpen] = useState(false);
|
|
|
493
519
|
| `kbd` | `string` | — keyboard shortcut hint |
|
|
494
520
|
| `active` | `boolean` | `false` |
|
|
495
521
|
| `danger` | `boolean` | `false` |
|
|
522
|
+
| `submenu` | `ReactNode` | — submenu items |
|
|
523
|
+
| `submenuMode` | `"external" \| "internal"` | `"external"` |
|
|
524
|
+
| `submenuTrigger` | `"hover" \| "click"` | `"hover"` |
|
|
496
525
|
| `disabled` | `boolean` | `false` |
|
|
497
526
|
|
|
498
527
|
---
|
|
@@ -508,6 +537,9 @@ import { Modal } from "@dnotrever2/super-kit";
|
|
|
508
537
|
<Modal
|
|
509
538
|
open={isOpen}
|
|
510
539
|
title="Confirm delete"
|
|
540
|
+
overlay="blur"
|
|
541
|
+
shadow
|
|
542
|
+
draggable
|
|
511
543
|
onClose={() => setIsOpen(false)}
|
|
512
544
|
>
|
|
513
545
|
<p>This action cannot be undone.</p>
|
|
@@ -518,6 +550,9 @@ import { Modal } from "@dnotrever2/super-kit";
|
|
|
518
550
|
| ---------- | ------------ | ------- |
|
|
519
551
|
| `open` | `boolean` | `false` |
|
|
520
552
|
| `title` | `ReactNode` | — |
|
|
553
|
+
| `overlay` | `"none" \| "blur" \| "dim"` | `"blur"` |
|
|
554
|
+
| `shadow` | `boolean` | `true` |
|
|
555
|
+
| `draggable` | `boolean` | `false` — drag by the modal header |
|
|
521
556
|
| `onClose` | `() => void` | — |
|
|
522
557
|
| `children` | `ReactNode` | — |
|
|
523
558
|
|
|
@@ -534,6 +569,7 @@ import { Popover } from "@dnotrever2/super-kit";
|
|
|
534
569
|
trigger={<Button variant="secondary">Settings</Button>}
|
|
535
570
|
title="Connection"
|
|
536
571
|
side="bottom-start"
|
|
572
|
+
shadow
|
|
537
573
|
>
|
|
538
574
|
<p>Content here</p>
|
|
539
575
|
</Popover>
|
|
@@ -544,12 +580,16 @@ import { Popover } from "@dnotrever2/super-kit";
|
|
|
544
580
|
| `trigger` | `ReactNode` | — |
|
|
545
581
|
| `title` | `ReactNode` | — |
|
|
546
582
|
| `side` | `"bottom-start" \| "bottom-end" \| "top-start" \| "top-end"` | `"bottom-start"` |
|
|
583
|
+
| `shadow` | `boolean` | `true` |
|
|
584
|
+
| `openOnHover` | `boolean` | `false` |
|
|
547
585
|
| `open` | `boolean` | — (controlled) |
|
|
548
586
|
| `defaultOpen` | `boolean` | `false` |
|
|
549
587
|
| `showCloseButton` | `boolean` | `true` |
|
|
550
588
|
| `onOpenChange` | `(open: boolean) => void` | — |
|
|
551
589
|
| `popProps` | `HTMLAttributes<HTMLDivElement>` | — |
|
|
552
590
|
|
|
591
|
+
The popover automatically flips between top/bottom and start/end when the preferred side would be clipped by the viewport.
|
|
592
|
+
|
|
553
593
|
---
|
|
554
594
|
|
|
555
595
|
### Progress
|
|
@@ -589,23 +629,39 @@ Toggle button and grouped toolbar segments.
|
|
|
589
629
|
import { PushButton, PushButtonGroup } from "@dnotrever2/super-kit";
|
|
590
630
|
|
|
591
631
|
// Standalone toggle
|
|
592
|
-
<PushButton on={active}
|
|
632
|
+
<PushButton on={active} onClick={() => setActive(a => !a)} icon={<GridIcon />} />
|
|
593
633
|
|
|
594
634
|
// Grouped toolbar
|
|
595
|
-
<PushButtonGroup>
|
|
635
|
+
<PushButtonGroup gap="sm" padding="sm" width={320} background rounded>
|
|
596
636
|
<PushButton on={view === "list"} onClick={() => setView("list")}>List</PushButton>
|
|
597
|
-
<PushButton
|
|
637
|
+
<PushButton
|
|
638
|
+
on={view === "grid"}
|
|
639
|
+
badge={<Badge variant="primary" pill>2</Badge>}
|
|
640
|
+
onClick={() => setView("grid")}
|
|
641
|
+
>
|
|
642
|
+
Grid
|
|
643
|
+
</PushButton>
|
|
598
644
|
</PushButtonGroup>
|
|
599
645
|
```
|
|
600
646
|
|
|
647
|
+
**PushButtonGroup props**
|
|
648
|
+
|
|
649
|
+
| Prop | Type | Default |
|
|
650
|
+
| ----- | ----------------------- | ------- |
|
|
651
|
+
| `gap` | `"sm" \| "md" \| "lg"` | `"sm"` |
|
|
652
|
+
| `padding` | `"sm" \| "md" \| "lg"` | `"sm"` |
|
|
653
|
+
| `background` | `boolean` | `true` |
|
|
654
|
+
| `rounded` | `boolean` | `false` |
|
|
655
|
+
| `width` | `CSSProperties["width"]` | — |
|
|
656
|
+
|
|
601
657
|
**PushButton props**
|
|
602
658
|
|
|
603
659
|
| Prop | Type | Default |
|
|
604
660
|
| ---------- | ----------- | --------------------------------------------- |
|
|
605
661
|
| `on` | `boolean` | `false` |
|
|
606
|
-
| `accent` | `boolean` | `false` — accent color when active |
|
|
607
|
-
| `solo` | `boolean` | `false` — standalone (no group border fusion) |
|
|
608
662
|
| `icon` | `ReactNode` | — |
|
|
663
|
+
| `badge` | `ReactNode` | — |
|
|
664
|
+
| `badgePosition` | `"left" \| "right"` | `"right"` |
|
|
609
665
|
| `disabled` | `boolean` | `false` |
|
|
610
666
|
|
|
611
667
|
---
|
|
@@ -897,7 +953,7 @@ Notification toasts via context provider and `useToast` hook.
|
|
|
897
953
|
// 1. Wrap your app
|
|
898
954
|
import { ToastProvider } from "@dnotrever2/super-kit";
|
|
899
955
|
|
|
900
|
-
<ToastProvider>
|
|
956
|
+
<ToastProvider maxVisible={3} position="bottom-right" offset={24}>
|
|
901
957
|
<App />
|
|
902
958
|
</ToastProvider>
|
|
903
959
|
|
|
@@ -914,6 +970,12 @@ function DeployButton() {
|
|
|
914
970
|
);
|
|
915
971
|
}
|
|
916
972
|
|
|
973
|
+
toast({
|
|
974
|
+
variant: "ok",
|
|
975
|
+
title: <>Deployed <Badge variant="success" pill>live</Badge></>,
|
|
976
|
+
message: <span style={{ color: "var(--fg-1)", fontSize: 13, fontWeight: 600 }}>v2.4.1 is live</span>
|
|
977
|
+
});
|
|
978
|
+
|
|
917
979
|
function LoadingDeployButton() {
|
|
918
980
|
const { toast, dismiss } = useToast();
|
|
919
981
|
|
|
@@ -924,7 +986,8 @@ function LoadingDeployButton() {
|
|
|
924
986
|
variant: "loading",
|
|
925
987
|
title: "Deploying",
|
|
926
988
|
message: "Please wait",
|
|
927
|
-
overlay: true
|
|
989
|
+
overlay: true,
|
|
990
|
+
shadow: true
|
|
928
991
|
});
|
|
929
992
|
|
|
930
993
|
deploy().finally(() => dismiss(id));
|
|
@@ -940,14 +1003,24 @@ function LoadingDeployButton() {
|
|
|
940
1003
|
|
|
941
1004
|
| Field | Type | Default |
|
|
942
1005
|
| ---------- | ---------------------------------------- | --------------------------- |
|
|
943
|
-
| `variant` | `"ok" \| "error" \| "warning" \| "info" \| "loading"` | required |
|
|
944
|
-
| `title` | `
|
|
945
|
-
| `message` | `
|
|
1006
|
+
| `variant` | `"ok" \| "error" \| "warning" \| "info" \| "loading" \| "neutral"` | required |
|
|
1007
|
+
| `title` | `ReactNode` | required |
|
|
1008
|
+
| `message` | `ReactNode` | — |
|
|
946
1009
|
| `duration` | `number` (ms) | `4000`; `loading` defaults to `0` |
|
|
947
1010
|
| `overlay` | `boolean` | `false` — only applies to `loading` |
|
|
1011
|
+
| `shadow` | `boolean` | `true` |
|
|
948
1012
|
|
|
949
1013
|
`toast()` returns the toast `id`. Dismiss manually with `dismiss(id)`. Loading toasts show a spinner and do not render a close button.
|
|
950
1014
|
|
|
1015
|
+
**ToastProvider props**
|
|
1016
|
+
|
|
1017
|
+
| Prop | Type | Default |
|
|
1018
|
+
| ------------ | ----------- | ------------ |
|
|
1019
|
+
| `maxVisible` | `number` | `3` |
|
|
1020
|
+
| `position` | `"top-left" \| "top-center" \| "top-right" \| "bottom-left" \| "bottom-center" \| "bottom-right"` | `"bottom-right"` |
|
|
1021
|
+
| `offset` | `number` | `24` |
|
|
1022
|
+
| `children` | `ReactNode` | required |
|
|
1023
|
+
|
|
951
1024
|
---
|
|
952
1025
|
|
|
953
1026
|
### Tooltip
|
|
@@ -968,6 +1041,10 @@ import { Tooltip } from "@dnotrever2/super-kit";
|
|
|
968
1041
|
<Tooltip content="Fixed top" side="top" dynamic={false}>
|
|
969
1042
|
<Button variant="primary">Deploy</Button>
|
|
970
1043
|
</Tooltip>
|
|
1044
|
+
|
|
1045
|
+
<Tooltip content="Cursor hint" cursor>
|
|
1046
|
+
<Button variant="primary">Hover me</Button>
|
|
1047
|
+
</Tooltip>
|
|
971
1048
|
```
|
|
972
1049
|
|
|
973
1050
|
| Prop | Type | Default |
|
|
@@ -976,11 +1053,12 @@ import { Tooltip } from "@dnotrever2/super-kit";
|
|
|
976
1053
|
| `side` | `"top" \| "bottom" \| "left" \| "right"` | `"top"` |
|
|
977
1054
|
| `delay` | `number` (ms) | `800` |
|
|
978
1055
|
| `dynamic` | `boolean` | `true` |
|
|
1056
|
+
| `cursor` | `boolean` | `true` |
|
|
979
1057
|
| `viewportPadding` | `number` | `8` |
|
|
980
1058
|
| `disabled` | `boolean` | `false` |
|
|
981
1059
|
| `wrapperProps` | `HTMLAttributes<HTMLSpanElement>` | — |
|
|
982
1060
|
|
|
983
|
-
By default, the tooltip flips to the opposite side when the requested side would be clipped by the viewport.
|
|
1061
|
+
By default, the tooltip flips to the opposite side when the requested side would be clipped by the viewport. When `cursor` is enabled, the tooltip appears near the cursor only after it stops moving for the configured `delay`.
|
|
984
1062
|
|
|
985
1063
|
---
|
|
986
1064
|
|
|
@@ -993,7 +1071,9 @@ All tokens are CSS custom properties defined in `src/styles/index.css` and avail
|
|
|
993
1071
|
| Token | Value |
|
|
994
1072
|
| -------- | -------------------------------- |
|
|
995
1073
|
| `--bg-0` | `#0a0b0e` — deepest background |
|
|
996
|
-
| `--bg-
|
|
1074
|
+
| `--bg-input` | `#101319` — input surface |
|
|
1075
|
+
| `--bg-1` | `#15181f` — card surface |
|
|
1076
|
+
| `--bg-disabled` | `#15181f` — disabled input surface |
|
|
997
1077
|
| `--bg-2` | `#1f242c` — hover state |
|
|
998
1078
|
| `--bg-3` | `#2a2f38` — popover / selected |
|
|
999
1079
|
|
package/dist/Card/Card.d.ts
CHANGED
|
@@ -2,13 +2,12 @@ import { ButtonHTMLAttributes, HTMLAttributes, ReactNode } from 'react';
|
|
|
2
2
|
export type CardPadding = "none" | "sm" | "md" | "lg";
|
|
3
3
|
export type CardProps = HTMLAttributes<HTMLDivElement> & {
|
|
4
4
|
padding?: CardPadding;
|
|
5
|
-
bordered?: boolean;
|
|
6
5
|
tilt?: boolean;
|
|
7
6
|
onClose?: () => void;
|
|
8
7
|
closeBtnProps?: ButtonHTMLAttributes<HTMLButtonElement>;
|
|
9
8
|
children?: ReactNode;
|
|
10
9
|
};
|
|
11
|
-
export declare function Card({ padding,
|
|
10
|
+
export declare function Card({ padding, tilt, onClose, closeBtnProps, children, className, ...props }: CardProps): import("react/jsx-runtime").JSX.Element;
|
|
12
11
|
export declare namespace Card {
|
|
13
12
|
var displayName: string;
|
|
14
13
|
}
|
|
@@ -4,18 +4,20 @@ export type CheckboxProps = Omit<InputHTMLAttributes<HTMLInputElement>, "type" |
|
|
|
4
4
|
checked?: boolean;
|
|
5
5
|
defaultChecked?: boolean;
|
|
6
6
|
indeterminate?: boolean;
|
|
7
|
+
isInvalid?: boolean;
|
|
7
8
|
onChange?: (checked: boolean) => void;
|
|
8
9
|
};
|
|
9
|
-
export declare function Checkbox({ label, checked, defaultChecked, indeterminate, disabled, onChange, className, ...props }: CheckboxProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare function Checkbox({ label, checked, defaultChecked, indeterminate, isInvalid, disabled, onChange, className, ...props }: CheckboxProps): import("react/jsx-runtime").JSX.Element;
|
|
10
11
|
export declare namespace Checkbox {
|
|
11
12
|
var displayName: string;
|
|
12
13
|
}
|
|
13
14
|
export type RadioProps = Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "onChange"> & {
|
|
14
15
|
label?: ReactNode;
|
|
15
16
|
checked?: boolean;
|
|
17
|
+
isInvalid?: boolean;
|
|
16
18
|
onChange?: (value: string) => void;
|
|
17
19
|
};
|
|
18
|
-
export declare function Radio({ label, checked, disabled, onChange, value, className, ...props }: RadioProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare function Radio({ label, checked, isInvalid, disabled, onChange, value, className, ...props }: RadioProps): import("react/jsx-runtime").JSX.Element;
|
|
19
21
|
export declare namespace Radio {
|
|
20
22
|
var displayName: string;
|
|
21
23
|
}
|
|
@@ -30,9 +32,11 @@ export type SwitchProps = Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "
|
|
|
30
32
|
label?: ReactNode;
|
|
31
33
|
checked?: boolean;
|
|
32
34
|
defaultChecked?: boolean;
|
|
35
|
+
thinTrack?: boolean;
|
|
36
|
+
isInvalid?: boolean;
|
|
33
37
|
onChange?: (checked: boolean) => void;
|
|
34
38
|
};
|
|
35
|
-
export declare function Switch({ label, checked, defaultChecked, disabled, onChange, className, ...props }: SwitchProps): import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
export declare function Switch({ label, checked, defaultChecked, disabled, thinTrack, isInvalid, onChange, className, ...props }: SwitchProps): import("react/jsx-runtime").JSX.Element;
|
|
36
40
|
export declare namespace Switch {
|
|
37
41
|
var displayName: string;
|
|
38
42
|
}
|
package/dist/Menu/Menu.d.ts
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { ButtonHTMLAttributes, HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export type MenuSubmenuMode = "external" | "internal";
|
|
3
|
+
export type MenuSubmenuTrigger = "hover" | "click";
|
|
2
4
|
export type MenuProps = HTMLAttributes<HTMLDivElement> & {
|
|
5
|
+
shadow?: boolean;
|
|
6
|
+
spacing?: "sm" | "md" | "lg";
|
|
3
7
|
children?: ReactNode;
|
|
4
8
|
};
|
|
5
|
-
export declare function Menu({ children, className, ...props }: MenuProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare function Menu({ shadow, spacing, children, className, ...props }: MenuProps): import("react/jsx-runtime").JSX.Element;
|
|
6
10
|
export declare namespace Menu {
|
|
7
11
|
var displayName: string;
|
|
8
12
|
}
|
|
@@ -11,13 +15,12 @@ export type MenuItemProps = ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
|
11
15
|
kbd?: string;
|
|
12
16
|
active?: boolean;
|
|
13
17
|
danger?: boolean;
|
|
18
|
+
submenu?: ReactNode;
|
|
19
|
+
submenuMode?: MenuSubmenuMode;
|
|
20
|
+
submenuTrigger?: MenuSubmenuTrigger;
|
|
14
21
|
children?: ReactNode;
|
|
15
22
|
};
|
|
16
|
-
export declare function MenuItem({ icon, kbd, active, danger, disabled, children, className, ...props }: MenuItemProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export declare function MenuItem({ icon, kbd, active, danger, submenu, submenuMode, submenuTrigger, disabled, children, className, onClick, ...props }: MenuItemProps): import("react/jsx-runtime").JSX.Element;
|
|
17
24
|
export declare namespace MenuItem {
|
|
18
25
|
var displayName: string;
|
|
19
26
|
}
|
|
20
|
-
export declare function MenuSeparator({ className, ...props }: HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
21
|
-
export declare namespace MenuSeparator {
|
|
22
|
-
var displayName: string;
|
|
23
|
-
}
|
package/dist/Modal/Modal.d.ts
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { ButtonHTMLAttributes, HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export type ModalOverlay = "none" | "blur" | "dim";
|
|
2
3
|
export type ModalProps = {
|
|
3
4
|
open: boolean;
|
|
4
5
|
title?: ReactNode;
|
|
5
6
|
subtitle?: ReactNode;
|
|
6
7
|
children?: ReactNode;
|
|
7
8
|
footer?: ReactNode;
|
|
9
|
+
overlay?: ModalOverlay;
|
|
10
|
+
shadow?: boolean;
|
|
11
|
+
draggable?: boolean;
|
|
8
12
|
closeOnBackdrop?: boolean;
|
|
9
13
|
showCloseButton?: boolean;
|
|
10
14
|
backdropProps?: HTMLAttributes<HTMLDivElement>;
|
|
@@ -7,11 +7,13 @@ export type PopoverProps = {
|
|
|
7
7
|
children?: ReactNode;
|
|
8
8
|
trigger?: ReactNode;
|
|
9
9
|
side?: PopoverSide;
|
|
10
|
+
shadow?: boolean;
|
|
11
|
+
openOnHover?: boolean;
|
|
10
12
|
showCloseButton?: boolean;
|
|
11
13
|
onOpenChange?: (open: boolean) => void;
|
|
12
14
|
popProps?: HTMLAttributes<HTMLDivElement>;
|
|
13
15
|
};
|
|
14
|
-
export declare function Popover({ open: openProp, defaultOpen, title, children, trigger, side, showCloseButton, onOpenChange, popProps }: PopoverProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare function Popover({ open: openProp, defaultOpen, title, children, trigger, side, shadow, openOnHover, showCloseButton, onOpenChange, popProps }: PopoverProps): import("react/jsx-runtime").JSX.Element;
|
|
15
17
|
export declare namespace Popover {
|
|
16
18
|
var displayName: string;
|
|
17
19
|
}
|
|
@@ -1,19 +1,24 @@
|
|
|
1
|
-
import { ButtonHTMLAttributes, HTMLAttributes, ReactNode } from 'react';
|
|
1
|
+
import { ButtonHTMLAttributes, CSSProperties, HTMLAttributes, ReactNode } from 'react';
|
|
2
2
|
export type PushButtonGroupProps = HTMLAttributes<HTMLDivElement> & {
|
|
3
|
+
gap?: "sm" | "md" | "lg";
|
|
4
|
+
padding?: "sm" | "md" | "lg";
|
|
5
|
+
background?: boolean;
|
|
6
|
+
rounded?: boolean;
|
|
7
|
+
width?: CSSProperties["width"];
|
|
3
8
|
children?: ReactNode;
|
|
4
9
|
};
|
|
5
|
-
export declare function PushButtonGroup({ children, className, ...props }: PushButtonGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare function PushButtonGroup({ gap, padding, background, rounded, width, children, className, ...props }: PushButtonGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
6
11
|
export declare namespace PushButtonGroup {
|
|
7
12
|
var displayName: string;
|
|
8
13
|
}
|
|
9
14
|
export type PushButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
10
15
|
on?: boolean;
|
|
11
|
-
accent?: boolean;
|
|
12
|
-
solo?: boolean;
|
|
13
16
|
icon?: ReactNode;
|
|
17
|
+
badge?: ReactNode;
|
|
18
|
+
badgePosition?: "left" | "right";
|
|
14
19
|
children?: ReactNode;
|
|
15
20
|
};
|
|
16
|
-
export declare function PushButton({ on,
|
|
21
|
+
export declare function PushButton({ on, icon, badge, badgePosition, children, disabled, className, ...props }: PushButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
17
22
|
export declare namespace PushButton {
|
|
18
23
|
var displayName: string;
|
|
19
24
|
}
|
package/dist/Toast/Toast.d.ts
CHANGED
|
@@ -1,21 +1,24 @@
|
|
|
1
1
|
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
export type ToastVariant = "ok" | "error" | "warning" | "info" | "loading";
|
|
2
|
+
export type ToastVariant = "ok" | "error" | "warning" | "info" | "loading" | "neutral";
|
|
3
|
+
export type ToastPosition = "top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right";
|
|
3
4
|
export type ToastItem = {
|
|
4
5
|
id: string;
|
|
5
6
|
variant: ToastVariant;
|
|
6
|
-
title:
|
|
7
|
-
message?:
|
|
7
|
+
title: ReactNode;
|
|
8
|
+
message?: ReactNode;
|
|
8
9
|
duration?: number;
|
|
9
10
|
overlay?: boolean;
|
|
11
|
+
shadow?: boolean;
|
|
10
12
|
};
|
|
11
|
-
export type ToastProps = HTMLAttributes<HTMLDivElement> & {
|
|
13
|
+
export type ToastProps = Omit<HTMLAttributes<HTMLDivElement>, "title"> & {
|
|
12
14
|
variant?: ToastVariant;
|
|
13
|
-
title:
|
|
14
|
-
message?:
|
|
15
|
+
title: ReactNode;
|
|
16
|
+
message?: ReactNode;
|
|
15
17
|
overlay?: boolean;
|
|
18
|
+
shadow?: boolean;
|
|
16
19
|
onDismiss?: () => void;
|
|
17
20
|
};
|
|
18
|
-
export declare function Toast({ variant, title, message, overlay, onDismiss, className, ...props }: ToastProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export declare function Toast({ variant, title, message, overlay, shadow, onDismiss, className, ...props }: ToastProps): import("react/jsx-runtime").JSX.Element;
|
|
19
22
|
export declare namespace Toast {
|
|
20
23
|
var displayName: string;
|
|
21
24
|
}
|
|
@@ -23,8 +26,12 @@ type ToastContextValue = {
|
|
|
23
26
|
toast: (options: Omit<ToastItem, "id">) => string;
|
|
24
27
|
dismiss: (id: string) => void;
|
|
25
28
|
};
|
|
26
|
-
export
|
|
29
|
+
export type ToastProviderProps = {
|
|
30
|
+
maxVisible?: number;
|
|
31
|
+
position?: ToastPosition;
|
|
32
|
+
offset?: number;
|
|
27
33
|
children: ReactNode;
|
|
28
|
-
}
|
|
34
|
+
};
|
|
35
|
+
export declare function ToastProvider({ maxVisible, position, offset, children }: ToastProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
29
36
|
export declare function useToast(): ToastContextValue;
|
|
30
37
|
export {};
|
|
@@ -5,12 +5,13 @@ export type TooltipProps = {
|
|
|
5
5
|
side?: TooltipSide;
|
|
6
6
|
delay?: number;
|
|
7
7
|
dynamic?: boolean;
|
|
8
|
+
cursor?: boolean;
|
|
8
9
|
viewportPadding?: number;
|
|
9
10
|
children: ReactNode;
|
|
10
11
|
wrapperProps?: HTMLAttributes<HTMLSpanElement>;
|
|
11
12
|
disabled?: boolean;
|
|
12
13
|
};
|
|
13
|
-
export declare function Tooltip({ content, side, delay, dynamic, viewportPadding, children, wrapperProps, disabled }: TooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare function Tooltip({ content, side, delay, dynamic, cursor, viewportPadding, children, wrapperProps, disabled }: TooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
14
15
|
export declare namespace Tooltip {
|
|
15
16
|
var displayName: string;
|
|
16
17
|
}
|