@dnotrever2/super-kit 0.1.13 → 0.1.15
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 +204 -15
- package/dist/Badge/Badge.d.ts +7 -3
- package/dist/Breadcrumb/Breadcrumb.d.ts +20 -0
- package/dist/Breadcrumb/index.d.ts +1 -0
- package/dist/Button/Button.d.ts +6 -2
- package/dist/Progress/Progress.d.ts +19 -0
- package/dist/Progress/index.d.ts +1 -0
- package/dist/Tabs/Tabs.d.ts +35 -0
- package/dist/Tabs/index.d.ts +1 -0
- package/dist/Toast/Toast.d.ts +4 -2
- package/dist/Tooltip/Tooltip.d.ts +2 -1
- package/dist/index.d.ts +3 -0
- 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 +1293 -944
- package/dist/super-kit.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -34,42 +34,91 @@ import "@dnotrever2/super-kit/dist/styles/index.css";
|
|
|
34
34
|
|
|
35
35
|
### Badge
|
|
36
36
|
|
|
37
|
-
Status labels
|
|
37
|
+
Status labels and tags.
|
|
38
38
|
|
|
39
39
|
```tsx
|
|
40
40
|
import { Badge } from "@dnotrever2/super-kit";
|
|
41
41
|
|
|
42
42
|
<Badge variant="success">Deployed</Badge>
|
|
43
43
|
<Badge variant="danger" pill>Failed</Badge>
|
|
44
|
-
<Badge variant="
|
|
45
|
-
<Badge variant="
|
|
46
|
-
<Badge variant="
|
|
44
|
+
<Badge variant="danger" coloredText>Failed</Badge>
|
|
45
|
+
<Badge variant="danger" outline>Failed</Badge>
|
|
46
|
+
<Badge variant="primary" label labelDirection="left">New</Badge>
|
|
47
|
+
<Badge variant="success" indicator aria-label="Online" />
|
|
47
48
|
<Badge dismissable onDismiss={() => {}}>api-gateway</Badge>
|
|
48
49
|
```
|
|
49
50
|
|
|
50
51
|
| Prop | Type | Default |
|
|
51
52
|
| ------------- | ------------------------------------------------------------------------------------------------------------------------------- | --------------- |
|
|
52
|
-
| `variant` | `"
|
|
53
|
+
| `variant` | `"primary" \| "secondary" \| "ghost" \| "danger" \| "success" \| "warning"` | `"secondary"` |
|
|
53
54
|
| `icon` | `ReactNode` | — |
|
|
54
55
|
| `pill` | `boolean` | `false` |
|
|
56
|
+
| `outline` | `boolean` | `false` |
|
|
57
|
+
| `coloredText` | `boolean` | `false` |
|
|
58
|
+
| `indicator` | `boolean` | `false` |
|
|
59
|
+
| `label` | `boolean` | `false` |
|
|
60
|
+
| `labelDirection` | `"left" \| "right"` | `"right"` |
|
|
55
61
|
| `dismissable` | `boolean` | `false` |
|
|
56
62
|
| `onDismiss` | `() => void` | — |
|
|
57
|
-
|
|
63
|
+
|
|
64
|
+
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`.
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
### Breadcrumb
|
|
69
|
+
|
|
70
|
+
Page hierarchy navigation with links, actions, and automatic current-page state.
|
|
71
|
+
|
|
72
|
+
```tsx
|
|
73
|
+
import { Breadcrumb } from "@dnotrever2/super-kit";
|
|
74
|
+
|
|
75
|
+
<Breadcrumb
|
|
76
|
+
items={[
|
|
77
|
+
{ label: "Projects", href: "/projects" },
|
|
78
|
+
{ label: "super-kit", href: "/projects/super-kit" },
|
|
79
|
+
{ label: "Components" }
|
|
80
|
+
]}
|
|
81
|
+
/>
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
| Prop | Type | Default |
|
|
85
|
+
| ----------- | ------------------ | -------------- |
|
|
86
|
+
| `items` | `BreadcrumbItem[]` | required |
|
|
87
|
+
| `separator` | `ReactNode` | chevron icon |
|
|
88
|
+
| `label` | `string` | `"Breadcrumb"` |
|
|
89
|
+
|
|
90
|
+
**BreadcrumbItem fields**
|
|
91
|
+
|
|
92
|
+
| Field | Type |
|
|
93
|
+
| ------------- | --------------------------------------- |
|
|
94
|
+
| `label` | `ReactNode` |
|
|
95
|
+
| `href` | `string` |
|
|
96
|
+
| `current` | `boolean` |
|
|
97
|
+
| `disabled` | `boolean` |
|
|
98
|
+
| `onClick` | `() => void` |
|
|
99
|
+
| `linkProps` | `AnchorHTMLAttributes<HTMLAnchorElement>` |
|
|
100
|
+
| `buttonProps` | `ButtonHTMLAttributes<HTMLButtonElement>` |
|
|
101
|
+
|
|
102
|
+
The last item is treated as the current page unless `current` is set explicitly.
|
|
58
103
|
|
|
59
104
|
---
|
|
60
105
|
|
|
61
106
|
### Button
|
|
62
107
|
|
|
63
|
-
Standard action button with semantic variants
|
|
108
|
+
Standard action button with semantic variants.
|
|
64
109
|
|
|
65
110
|
```tsx
|
|
66
|
-
import { Button } from "@dnotrever2/super-kit";
|
|
111
|
+
import { Button, Spinner } from "@dnotrever2/super-kit";
|
|
67
112
|
|
|
68
113
|
<Button variant="primary" onClick={deploy}>Deploy</Button>
|
|
69
114
|
<Button variant="success" icon={<CheckIcon />}>Approve</Button>
|
|
70
115
|
<Button variant="danger">Delete</Button>
|
|
71
|
-
<Button variant="
|
|
72
|
-
|
|
116
|
+
<Button variant="danger" coloredText>Delete</Button>
|
|
117
|
+
<Button variant="primary" outline>Configure</Button>
|
|
118
|
+
<Button variant="primary" rounded>Deploy</Button>
|
|
119
|
+
<Button variant="ghost" icon={<SettingsIcon />} aria-label="Settings" />
|
|
120
|
+
<Button variant="primary" disabled icon={<Spinner size="sm" onAccent />}>
|
|
121
|
+
Loading...
|
|
73
122
|
</Button>
|
|
74
123
|
```
|
|
75
124
|
|
|
@@ -78,9 +127,15 @@ import { Button } from "@dnotrever2/super-kit";
|
|
|
78
127
|
| `variant` | `"primary" \| "secondary" \| "ghost" \| "danger" \| "success" \| "warning"` | `"secondary"` |
|
|
79
128
|
| `size` | `"sm" \| "md" \| "lg"` | `"md"` |
|
|
80
129
|
| `icon` | `ReactNode` | — |
|
|
81
|
-
| `
|
|
130
|
+
| `outline` | `boolean` | `false` |
|
|
131
|
+
| `rounded` | `boolean` | `false` |
|
|
132
|
+
| `coloredText` | `boolean` | `false` |
|
|
82
133
|
| `disabled` | `boolean` | `false` |
|
|
83
134
|
|
|
135
|
+
Normal semantic buttons use a stronger background with white text. Use `coloredText` when the text should follow the button variant color. Outline buttons always use the variant color for the text.
|
|
136
|
+
To create a loading button, pass a `Spinner` as `icon`, use text such as `"Loading..."`, and set `disabled` to block interaction.
|
|
137
|
+
To create an icon button, pass only `icon` and no text. Provide an accessible label with `aria-label`.
|
|
138
|
+
|
|
84
139
|
Forwards a `ref` to the underlying `<button>`. Accepts all native button attributes.
|
|
85
140
|
|
|
86
141
|
---
|
|
@@ -265,6 +320,7 @@ const [open, setOpen] = useState(false);
|
|
|
265
320
|
### Modal
|
|
266
321
|
|
|
267
322
|
Dialog overlay with backdrop. Renders as a `div`-based panel, not `<dialog>`.
|
|
323
|
+
There is no separate `Dialog` component by design: projects can compose their own dialog patterns using existing design system primitives such as `Modal`, `Button`, `Input`, and `Textarea`.
|
|
268
324
|
|
|
269
325
|
```tsx
|
|
270
326
|
import { Modal } from "@dnotrever2/super-kit";
|
|
@@ -316,6 +372,35 @@ import { Popover } from "@dnotrever2/super-kit";
|
|
|
316
372
|
|
|
317
373
|
---
|
|
318
374
|
|
|
375
|
+
### Progress
|
|
376
|
+
|
|
377
|
+
Determinate or indeterminate progress bar.
|
|
378
|
+
|
|
379
|
+
```tsx
|
|
380
|
+
import { Progress } from "@dnotrever2/super-kit";
|
|
381
|
+
|
|
382
|
+
<Progress value={64} label="Deploy progress" showValue />
|
|
383
|
+
<Progress shape="circle" value={72} label="Deploy" />
|
|
384
|
+
<Progress indeterminate label="Publishing" showValue />
|
|
385
|
+
<Progress value={82} variant="success" size="lg" />
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
| Prop | Type | Default |
|
|
389
|
+
| --------------- | ----------------------------------------------------------------- | ---------- |
|
|
390
|
+
| `value` | `number` | — |
|
|
391
|
+
| `max` | `number` | `100` |
|
|
392
|
+
| `variant` | `"accent" \| "success" \| "warning" \| "danger" \| "info" \| "neutral"` | `"accent"` |
|
|
393
|
+
| `size` | `"sm" \| "md" \| "lg"` | `"md"` |
|
|
394
|
+
| `shape` | `"bar" \| "circle"` | `"bar"` |
|
|
395
|
+
| `label` | `ReactNode` | — |
|
|
396
|
+
| `valueLabel` | `string` | — |
|
|
397
|
+
| `showValue` | `boolean` | `false` |
|
|
398
|
+
| `indeterminate` | `boolean` | `false` |
|
|
399
|
+
|
|
400
|
+
When `value` is omitted or `indeterminate` is true, the progress renders in loading mode. Circular progress shows the percentage in the center.
|
|
401
|
+
|
|
402
|
+
---
|
|
403
|
+
|
|
319
404
|
### PushButton
|
|
320
405
|
|
|
321
406
|
Toggle button and grouped toolbar segments.
|
|
@@ -433,6 +518,83 @@ Forwards a `ref` to the root `<div>`.
|
|
|
433
518
|
|
|
434
519
|
---
|
|
435
520
|
|
|
521
|
+
### Tabs
|
|
522
|
+
|
|
523
|
+
Accessible tab navigation with raised, rounded, or underline styles.
|
|
524
|
+
|
|
525
|
+
```tsx
|
|
526
|
+
import { Badge, Tabs } from "@dnotrever2/super-kit";
|
|
527
|
+
|
|
528
|
+
<Tabs
|
|
529
|
+
variant="raised"
|
|
530
|
+
items={[
|
|
531
|
+
{ value: "overview", label: "Overview", content: <Overview /> },
|
|
532
|
+
{
|
|
533
|
+
value: "deployments",
|
|
534
|
+
label: <>Deployments <Badge variant="primary" pill>4</Badge></>,
|
|
535
|
+
content: <Deployments />
|
|
536
|
+
},
|
|
537
|
+
{ value: "settings", label: "Settings", content: <Settings /> }
|
|
538
|
+
]}
|
|
539
|
+
/>
|
|
540
|
+
|
|
541
|
+
<Tabs
|
|
542
|
+
variant="underline"
|
|
543
|
+
transparent
|
|
544
|
+
closable
|
|
545
|
+
onTabClose={(value) => closeTab(value)}
|
|
546
|
+
items={[
|
|
547
|
+
{ value: "overview", label: "Overview" },
|
|
548
|
+
{ value: "deployments", label: "Deployments" }
|
|
549
|
+
]}
|
|
550
|
+
/>
|
|
551
|
+
|
|
552
|
+
<Tabs
|
|
553
|
+
variant="rounded"
|
|
554
|
+
items={[
|
|
555
|
+
{ value: "daily", label: "Daily" },
|
|
556
|
+
{ value: "weekly", label: "Weekly" }
|
|
557
|
+
]}
|
|
558
|
+
/>
|
|
559
|
+
```
|
|
560
|
+
|
|
561
|
+
| Prop | Type | Default |
|
|
562
|
+
| --------------- | ---------------------------- | ------------------- |
|
|
563
|
+
| `items` | `TabItem[]` | required |
|
|
564
|
+
| `variant` | `"raised" \| "underline" \| "rounded"` | `"raised"` |
|
|
565
|
+
| `value` | `string` | — controlled |
|
|
566
|
+
| `defaultValue` | `string` | first enabled item |
|
|
567
|
+
| `onValueChange` | `(value: string) => void` | — |
|
|
568
|
+
| `ariaLabel` | `string` | `"Tabs"` |
|
|
569
|
+
| `disabled` | `boolean` | `false` |
|
|
570
|
+
| `closable` | `boolean` | `false` |
|
|
571
|
+
| `closeLabel` | `string` | `"Close tab"` |
|
|
572
|
+
| `onTabClose` | `(value: string) => void` | — |
|
|
573
|
+
| `tabItemClassName` | `string` | — |
|
|
574
|
+
| `tabClassName` | `string` | — |
|
|
575
|
+
| `transparent` | `boolean` | `false` — underline only |
|
|
576
|
+
| `inactiveTransparent` | `boolean` | `false` — raised/rounded only |
|
|
577
|
+
|
|
578
|
+
**TabItem fields**
|
|
579
|
+
|
|
580
|
+
| Field | Type |
|
|
581
|
+
| ------------ | ----------------------------------------- |
|
|
582
|
+
| `value` | `string` |
|
|
583
|
+
| `label` | `ReactNode` |
|
|
584
|
+
| `content` | `ReactNode` |
|
|
585
|
+
| `disabled` | `boolean` |
|
|
586
|
+
| `closable` | `boolean` |
|
|
587
|
+
| `closeLabel` | `string` |
|
|
588
|
+
| `onClose` | `(value: string) => void` |
|
|
589
|
+
| `className` | `string` — class for the tab wrapper |
|
|
590
|
+
| `tabProps` | `ButtonHTMLAttributes<HTMLButtonElement>` |
|
|
591
|
+
| `closeButtonProps` | `ButtonHTMLAttributes<HTMLButtonElement>` |
|
|
592
|
+
| `panelProps` | `HTMLAttributes<HTMLDivElement>` |
|
|
593
|
+
|
|
594
|
+
Use `tabItemClassName` or `TabItem.className` to customize the tab wrapper dimensions such as height, width, and margin. Use `tabClassName` or `tabProps.className` to customize the inner tab button, such as padding.
|
|
595
|
+
|
|
596
|
+
---
|
|
597
|
+
|
|
436
598
|
### Spinner
|
|
437
599
|
|
|
438
600
|
Loading indicator in three styles.
|
|
@@ -445,7 +607,7 @@ import { Spinner } from "@dnotrever2/super-kit";
|
|
|
445
607
|
<Spinner variant="bar" />
|
|
446
608
|
|
|
447
609
|
// Inside a primary button (white on accent background)
|
|
448
|
-
<Button variant="primary"
|
|
610
|
+
<Button variant="primary" disabled icon={<Spinner size="sm" onAccent />}>
|
|
449
611
|
Deploying
|
|
450
612
|
</Button>
|
|
451
613
|
|
|
@@ -522,18 +684,40 @@ function DeployButton() {
|
|
|
522
684
|
</Button>
|
|
523
685
|
);
|
|
524
686
|
}
|
|
687
|
+
|
|
688
|
+
function LoadingDeployButton() {
|
|
689
|
+
const { toast, dismiss } = useToast();
|
|
690
|
+
|
|
691
|
+
return (
|
|
692
|
+
<Button
|
|
693
|
+
onClick={() => {
|
|
694
|
+
const id = toast({
|
|
695
|
+
variant: "loading",
|
|
696
|
+
title: "Deploying",
|
|
697
|
+
message: "Please wait",
|
|
698
|
+
overlay: true
|
|
699
|
+
});
|
|
700
|
+
|
|
701
|
+
deploy().finally(() => dismiss(id));
|
|
702
|
+
}}
|
|
703
|
+
>
|
|
704
|
+
Deploy
|
|
705
|
+
</Button>
|
|
706
|
+
);
|
|
707
|
+
}
|
|
525
708
|
```
|
|
526
709
|
|
|
527
710
|
**`toast(options)` options**
|
|
528
711
|
|
|
529
712
|
| Field | Type | Default |
|
|
530
713
|
| ---------- | ---------------------------------------- | --------------------------- |
|
|
531
|
-
| `variant` | `"ok" \| "error" \| "warning" \| "info"` | required
|
|
714
|
+
| `variant` | `"ok" \| "error" \| "warning" \| "info" \| "loading"` | required |
|
|
532
715
|
| `title` | `string` | required |
|
|
533
716
|
| `message` | `string` | — |
|
|
534
|
-
| `duration` | `number` (ms) | `4000`
|
|
717
|
+
| `duration` | `number` (ms) | `4000`; `loading` defaults to `0` |
|
|
718
|
+
| `overlay` | `boolean` | `false` — only applies to `loading` |
|
|
535
719
|
|
|
536
|
-
`toast()` returns the toast `id`. Dismiss manually with `dismiss(id)`.
|
|
720
|
+
`toast()` returns the toast `id`. Dismiss manually with `dismiss(id)`. Loading toasts show a spinner and do not render a close button.
|
|
537
721
|
|
|
538
722
|
---
|
|
539
723
|
|
|
@@ -547,12 +731,17 @@ import { Tooltip } from "@dnotrever2/super-kit";
|
|
|
547
731
|
<Tooltip content="Deploy to production" side="top">
|
|
548
732
|
<Button variant="primary">Deploy</Button>
|
|
549
733
|
</Tooltip>
|
|
734
|
+
|
|
735
|
+
<Tooltip content="No delay" delay={0}>
|
|
736
|
+
<Button variant="primary">Deploy</Button>
|
|
737
|
+
</Tooltip>
|
|
550
738
|
```
|
|
551
739
|
|
|
552
740
|
| Prop | Type | Default |
|
|
553
741
|
| -------------- | --------------------------------- | -------- |
|
|
554
742
|
| `content` | `ReactNode` | required |
|
|
555
743
|
| `side` | `"top" \| "bottom" \| "left" \| "right"` | `"top"` |
|
|
744
|
+
| `delay` | `number` (ms) | `800` |
|
|
556
745
|
| `disabled` | `boolean` | `false` |
|
|
557
746
|
| `wrapperProps` | `HTMLAttributes<HTMLSpanElement>` | — |
|
|
558
747
|
|
package/dist/Badge/Badge.d.ts
CHANGED
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
export type BadgeVariant = "
|
|
2
|
+
export type BadgeVariant = "primary" | "secondary" | "ghost" | "danger" | "success" | "warning";
|
|
3
3
|
export type BadgeProps = HTMLAttributes<HTMLSpanElement> & {
|
|
4
4
|
variant?: BadgeVariant;
|
|
5
5
|
icon?: ReactNode;
|
|
6
6
|
pill?: boolean;
|
|
7
|
+
outline?: boolean;
|
|
8
|
+
coloredText?: boolean;
|
|
9
|
+
indicator?: boolean;
|
|
10
|
+
label?: boolean;
|
|
11
|
+
labelDirection?: "left" | "right";
|
|
7
12
|
dismissable?: boolean;
|
|
8
13
|
onDismiss?: () => void;
|
|
9
|
-
dotColor?: string;
|
|
10
14
|
children?: ReactNode;
|
|
11
15
|
};
|
|
12
|
-
export declare function Badge({ variant, icon, pill, dismissable, onDismiss,
|
|
16
|
+
export declare function Badge({ variant, icon, pill, outline, coloredText, indicator, label, labelDirection, dismissable, onDismiss, children, className, ...props }: BadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
13
17
|
export declare namespace Badge {
|
|
14
18
|
var displayName: string;
|
|
15
19
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { AnchorHTMLAttributes, ButtonHTMLAttributes, HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export type BreadcrumbItem = {
|
|
3
|
+
label: ReactNode;
|
|
4
|
+
href?: string;
|
|
5
|
+
current?: boolean;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
onClick?: () => void;
|
|
8
|
+
linkProps?: AnchorHTMLAttributes<HTMLAnchorElement>;
|
|
9
|
+
buttonProps?: ButtonHTMLAttributes<HTMLButtonElement>;
|
|
10
|
+
};
|
|
11
|
+
export type BreadcrumbProps = HTMLAttributes<HTMLElement> & {
|
|
12
|
+
items: BreadcrumbItem[];
|
|
13
|
+
separator?: ReactNode;
|
|
14
|
+
label?: string;
|
|
15
|
+
};
|
|
16
|
+
export declare function Breadcrumb({ items, separator, label, className, ...props }: BreadcrumbProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare namespace Breadcrumb {
|
|
18
|
+
var displayName: string;
|
|
19
|
+
}
|
|
20
|
+
export declare const BreadCrumb: typeof Breadcrumb;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Breadcrumb';
|
package/dist/Button/Button.d.ts
CHANGED
|
@@ -5,13 +5,17 @@ export type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
|
5
5
|
variant?: ButtonVariant;
|
|
6
6
|
size?: ButtonSize;
|
|
7
7
|
icon?: ReactNode;
|
|
8
|
-
|
|
8
|
+
outline?: boolean;
|
|
9
|
+
rounded?: boolean;
|
|
10
|
+
coloredText?: boolean;
|
|
9
11
|
children?: ReactNode;
|
|
10
12
|
};
|
|
11
13
|
export declare const Button: import('react').ForwardRefExoticComponent<ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
12
14
|
variant?: ButtonVariant;
|
|
13
15
|
size?: ButtonSize;
|
|
14
16
|
icon?: ReactNode;
|
|
15
|
-
|
|
17
|
+
outline?: boolean;
|
|
18
|
+
rounded?: boolean;
|
|
19
|
+
coloredText?: boolean;
|
|
16
20
|
children?: ReactNode;
|
|
17
21
|
} & import('react').RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export type ProgressVariant = "accent" | "success" | "warning" | "danger" | "info" | "neutral";
|
|
3
|
+
export type ProgressSize = "sm" | "md" | "lg";
|
|
4
|
+
export type ProgressShape = "bar" | "circle";
|
|
5
|
+
export type ProgressProps = HTMLAttributes<HTMLDivElement> & {
|
|
6
|
+
value?: number;
|
|
7
|
+
max?: number;
|
|
8
|
+
variant?: ProgressVariant;
|
|
9
|
+
size?: ProgressSize;
|
|
10
|
+
shape?: ProgressShape;
|
|
11
|
+
label?: ReactNode;
|
|
12
|
+
valueLabel?: string;
|
|
13
|
+
showValue?: boolean;
|
|
14
|
+
indeterminate?: boolean;
|
|
15
|
+
};
|
|
16
|
+
export declare function Progress({ value, max, variant, size, shape, label, valueLabel, showValue, indeterminate, className, ...props }: ProgressProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare namespace Progress {
|
|
18
|
+
var displayName: string;
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Progress';
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ButtonHTMLAttributes, HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export type TabsVariant = "raised" | "underline" | "rounded";
|
|
3
|
+
export type TabItem = {
|
|
4
|
+
value: string;
|
|
5
|
+
label: ReactNode;
|
|
6
|
+
content?: ReactNode;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
closable?: boolean;
|
|
9
|
+
closeLabel?: string;
|
|
10
|
+
onClose?: (value: string) => void;
|
|
11
|
+
className?: string;
|
|
12
|
+
tabProps?: ButtonHTMLAttributes<HTMLButtonElement>;
|
|
13
|
+
closeButtonProps?: ButtonHTMLAttributes<HTMLButtonElement>;
|
|
14
|
+
panelProps?: HTMLAttributes<HTMLDivElement>;
|
|
15
|
+
};
|
|
16
|
+
export type TabsProps = HTMLAttributes<HTMLDivElement> & {
|
|
17
|
+
items: TabItem[];
|
|
18
|
+
value?: string;
|
|
19
|
+
defaultValue?: string;
|
|
20
|
+
onValueChange?: (value: string) => void;
|
|
21
|
+
variant?: TabsVariant;
|
|
22
|
+
ariaLabel?: string;
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
closable?: boolean;
|
|
25
|
+
closeLabel?: string;
|
|
26
|
+
onTabClose?: (value: string) => void;
|
|
27
|
+
tabClassName?: string;
|
|
28
|
+
tabItemClassName?: string;
|
|
29
|
+
transparent?: boolean;
|
|
30
|
+
inactiveTransparent?: boolean;
|
|
31
|
+
};
|
|
32
|
+
export declare function Tabs({ items, value, defaultValue, onValueChange, variant, ariaLabel, disabled, closable, closeLabel, onTabClose, tabClassName, tabItemClassName, transparent, inactiveTransparent, className, ...props }: TabsProps): import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
export declare namespace Tabs {
|
|
34
|
+
var displayName: string;
|
|
35
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Tabs';
|
package/dist/Toast/Toast.d.ts
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
export type ToastVariant = "ok" | "error" | "warning" | "info";
|
|
2
|
+
export type ToastVariant = "ok" | "error" | "warning" | "info" | "loading";
|
|
3
3
|
export type ToastItem = {
|
|
4
4
|
id: string;
|
|
5
5
|
variant: ToastVariant;
|
|
6
6
|
title: string;
|
|
7
7
|
message?: string;
|
|
8
8
|
duration?: number;
|
|
9
|
+
overlay?: boolean;
|
|
9
10
|
};
|
|
10
11
|
export type ToastProps = HTMLAttributes<HTMLDivElement> & {
|
|
11
12
|
variant?: ToastVariant;
|
|
12
13
|
title: string;
|
|
13
14
|
message?: string;
|
|
15
|
+
overlay?: boolean;
|
|
14
16
|
onDismiss?: () => void;
|
|
15
17
|
};
|
|
16
|
-
export declare function Toast({ variant, title, message, onDismiss, className, ...props }: ToastProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare function Toast({ variant, title, message, overlay, onDismiss, className, ...props }: ToastProps): import("react/jsx-runtime").JSX.Element;
|
|
17
19
|
export declare namespace Toast {
|
|
18
20
|
var displayName: string;
|
|
19
21
|
}
|
|
@@ -3,11 +3,12 @@ export type TooltipSide = "top" | "bottom" | "left" | "right";
|
|
|
3
3
|
export type TooltipProps = {
|
|
4
4
|
content: ReactNode;
|
|
5
5
|
side?: TooltipSide;
|
|
6
|
+
delay?: number;
|
|
6
7
|
children: ReactNode;
|
|
7
8
|
wrapperProps?: HTMLAttributes<HTMLSpanElement>;
|
|
8
9
|
disabled?: boolean;
|
|
9
10
|
};
|
|
10
|
-
export declare function Tooltip({ content, side, children, wrapperProps, disabled }: TooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare function Tooltip({ content, side, delay, children, wrapperProps, disabled }: TooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
11
12
|
export declare namespace Tooltip {
|
|
12
13
|
var displayName: string;
|
|
13
14
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from './Badge';
|
|
2
|
+
export * from './Breadcrumb';
|
|
2
3
|
export * from './Scrollable';
|
|
3
4
|
export * from './Button';
|
|
4
5
|
export * from './Card';
|
|
@@ -7,9 +8,11 @@ export * from './Markers';
|
|
|
7
8
|
export * from './Menu';
|
|
8
9
|
export * from './Modal';
|
|
9
10
|
export * from './Popover';
|
|
11
|
+
export * from './Progress';
|
|
10
12
|
export * from './PushButton';
|
|
11
13
|
export * from './Select';
|
|
12
14
|
export * from './Spinner';
|
|
15
|
+
export * from './Tabs';
|
|
13
16
|
export * from './Textarea';
|
|
14
17
|
export * from './Toast';
|
|
15
18
|
export * from './Tooltip';
|