@dnotrever2/super-kit 0.1.14 → 0.1.16
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 +224 -12
- package/dist/Accordion/Accordion.d.ts +42 -0
- package/dist/Accordion/index.d.ts +1 -0
- package/dist/Badge/Badge.d.ts +7 -3
- 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/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 +1326 -924
- package/dist/super-kit.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -32,29 +32,124 @@ import "@dnotrever2/super-kit/dist/styles/index.css";
|
|
|
32
32
|
|
|
33
33
|
## Components
|
|
34
34
|
|
|
35
|
+
### Accordion
|
|
36
|
+
|
|
37
|
+
Expandable content sections with single or multiple open items.
|
|
38
|
+
|
|
39
|
+
```tsx
|
|
40
|
+
import { Accordion, Badge } from "@dnotrever2/super-kit";
|
|
41
|
+
|
|
42
|
+
<Accordion
|
|
43
|
+
defaultValue="deploy"
|
|
44
|
+
items={[
|
|
45
|
+
{
|
|
46
|
+
value: "deploy",
|
|
47
|
+
title: "Deploy pipeline",
|
|
48
|
+
content: "Build, test, and publish the current release."
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
value: "limits",
|
|
52
|
+
title: <>Usage limits <Badge variant="warning" pill>3</Badge></>,
|
|
53
|
+
content: "Requests are throttled when the workspace reaches its quota."
|
|
54
|
+
}
|
|
55
|
+
]}
|
|
56
|
+
/>
|
|
57
|
+
|
|
58
|
+
<Accordion
|
|
59
|
+
defaultValue={["deploy", "access"]}
|
|
60
|
+
items={items}
|
|
61
|
+
/>
|
|
62
|
+
|
|
63
|
+
<Accordion
|
|
64
|
+
multiple={false}
|
|
65
|
+
indicator="plus-minus"
|
|
66
|
+
border="divider"
|
|
67
|
+
radius="square"
|
|
68
|
+
highlight="header"
|
|
69
|
+
spacing={0}
|
|
70
|
+
defaultValue="deploy"
|
|
71
|
+
items={items}
|
|
72
|
+
/>
|
|
73
|
+
|
|
74
|
+
<Accordion
|
|
75
|
+
highlight="item"
|
|
76
|
+
hoverHighlight={false}
|
|
77
|
+
headerStyle={{ minHeight: 46, padding: "12px 16px" }}
|
|
78
|
+
bodyStyle={{ padding: "0 16px", color: "var(--fg-2)" }}
|
|
79
|
+
items={items}
|
|
80
|
+
/>
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
| Prop | Type | Default |
|
|
84
|
+
| ------------------ | ------------------------------------- | ------------------ |
|
|
85
|
+
| `items` | `AccordionItem[]` | required |
|
|
86
|
+
| `value` | `string \| string[]` | — controlled |
|
|
87
|
+
| `defaultValue` | `string \| string[]` | `""` or `[]` |
|
|
88
|
+
| `onValueChange` | `(value: string \| string[]) => void` | — |
|
|
89
|
+
| `multiple` | `boolean` | `true` |
|
|
90
|
+
| `hideIndicator` | `boolean` | `false` |
|
|
91
|
+
| `indicator` | `"chevron" \| "plus-minus"` | `"chevron"` |
|
|
92
|
+
| `border` | `"boxed" \| "none" \| "divider"` | `"boxed"` |
|
|
93
|
+
| `highlight` | `"none" \| "item" \| "header"` | `"none"` |
|
|
94
|
+
| `radius` | `"rounded" \| "square"` | `"rounded"` |
|
|
95
|
+
| `hoverHighlight` | `boolean` | `true` |
|
|
96
|
+
| `spacing` | `number \| string` | `8` |
|
|
97
|
+
| `disabled` | `boolean` | `false` |
|
|
98
|
+
| `itemClassName` | `string` | — |
|
|
99
|
+
| `headerClassName` | `string` | — |
|
|
100
|
+
| `headerStyle` | `CSSProperties` | — |
|
|
101
|
+
| `bodyClassName` | `string` | — |
|
|
102
|
+
| `bodyStyle` | `CSSProperties` | — |
|
|
103
|
+
| `triggerClassName` | `string` | — |
|
|
104
|
+
| `contentClassName` | `string` | — |
|
|
105
|
+
|
|
106
|
+
**AccordionItem fields**
|
|
107
|
+
|
|
108
|
+
| Field | Type |
|
|
109
|
+
| -------------- | ----------------------------------------- |
|
|
110
|
+
| `value` | `string` |
|
|
111
|
+
| `title` | `ReactNode` |
|
|
112
|
+
| `content` | `ReactNode` |
|
|
113
|
+
| `disabled` | `boolean` |
|
|
114
|
+
| `icon` | `ReactNode` |
|
|
115
|
+
| `className` | `string` |
|
|
116
|
+
| `triggerProps` | `ButtonHTMLAttributes<HTMLButtonElement>` |
|
|
117
|
+
| `contentProps` | `HTMLAttributes<HTMLDivElement>` |
|
|
118
|
+
|
|
119
|
+
By default, opening one item does not close the others. Use `multiple={false}` when only one item should stay open. Use `hideIndicator` to remove the arrow, or `indicator="plus-minus"` to show a small `+`/`-` indicator. Use `border="none"` to remove borders, `border="divider"` to show only separators between items, and `spacing` to control the gap between items. Use `radius="square"` for square corners. Use `highlight="item"` to highlight the whole open item, or `highlight="header"` to highlight only the header. Use `hoverHighlight={false}` to disable hover highlight. Use `headerClassName`/`headerStyle` and `bodyClassName`/`bodyStyle` to customize colors, height, width, padding, margin, and other layout styles.
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
35
123
|
### Badge
|
|
36
124
|
|
|
37
|
-
Status labels
|
|
125
|
+
Status labels and tags.
|
|
38
126
|
|
|
39
127
|
```tsx
|
|
40
128
|
import { Badge } from "@dnotrever2/super-kit";
|
|
41
129
|
|
|
42
130
|
<Badge variant="success">Deployed</Badge>
|
|
43
131
|
<Badge variant="danger" pill>Failed</Badge>
|
|
44
|
-
<Badge variant="
|
|
45
|
-
<Badge variant="
|
|
46
|
-
<Badge variant="
|
|
132
|
+
<Badge variant="danger" coloredText>Failed</Badge>
|
|
133
|
+
<Badge variant="danger" outline>Failed</Badge>
|
|
134
|
+
<Badge variant="primary" label labelDirection="left">New</Badge>
|
|
135
|
+
<Badge variant="success" indicator aria-label="Online" />
|
|
47
136
|
<Badge dismissable onDismiss={() => {}}>api-gateway</Badge>
|
|
48
137
|
```
|
|
49
138
|
|
|
50
139
|
| Prop | Type | Default |
|
|
51
140
|
| ------------- | ------------------------------------------------------------------------------------------------------------------------------- | --------------- |
|
|
52
|
-
| `variant` | `"
|
|
141
|
+
| `variant` | `"primary" \| "secondary" \| "ghost" \| "danger" \| "success" \| "warning"` | `"secondary"` |
|
|
53
142
|
| `icon` | `ReactNode` | — |
|
|
54
143
|
| `pill` | `boolean` | `false` |
|
|
144
|
+
| `outline` | `boolean` | `false` |
|
|
145
|
+
| `coloredText` | `boolean` | `false` |
|
|
146
|
+
| `indicator` | `boolean` | `false` |
|
|
147
|
+
| `label` | `boolean` | `false` |
|
|
148
|
+
| `labelDirection` | `"left" \| "right"` | `"right"` |
|
|
55
149
|
| `dismissable` | `boolean` | `false` |
|
|
56
150
|
| `onDismiss` | `() => void` | — |
|
|
57
|
-
|
|
151
|
+
|
|
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`.
|
|
58
153
|
|
|
59
154
|
---
|
|
60
155
|
|
|
@@ -98,16 +193,20 @@ The last item is treated as the current page unless `current` is set explicitly.
|
|
|
98
193
|
|
|
99
194
|
### Button
|
|
100
195
|
|
|
101
|
-
Standard action button with semantic variants
|
|
196
|
+
Standard action button with semantic variants.
|
|
102
197
|
|
|
103
198
|
```tsx
|
|
104
|
-
import { Button } from "@dnotrever2/super-kit";
|
|
199
|
+
import { Button, Spinner } from "@dnotrever2/super-kit";
|
|
105
200
|
|
|
106
201
|
<Button variant="primary" onClick={deploy}>Deploy</Button>
|
|
107
202
|
<Button variant="success" icon={<CheckIcon />}>Approve</Button>
|
|
108
203
|
<Button variant="danger">Delete</Button>
|
|
109
|
-
<Button variant="
|
|
110
|
-
|
|
204
|
+
<Button variant="danger" coloredText>Delete</Button>
|
|
205
|
+
<Button variant="primary" outline>Configure</Button>
|
|
206
|
+
<Button variant="primary" rounded>Deploy</Button>
|
|
207
|
+
<Button variant="ghost" icon={<SettingsIcon />} aria-label="Settings" />
|
|
208
|
+
<Button variant="primary" disabled icon={<Spinner size="sm" onAccent />}>
|
|
209
|
+
Loading...
|
|
111
210
|
</Button>
|
|
112
211
|
```
|
|
113
212
|
|
|
@@ -116,9 +215,15 @@ import { Button } from "@dnotrever2/super-kit";
|
|
|
116
215
|
| `variant` | `"primary" \| "secondary" \| "ghost" \| "danger" \| "success" \| "warning"` | `"secondary"` |
|
|
117
216
|
| `size` | `"sm" \| "md" \| "lg"` | `"md"` |
|
|
118
217
|
| `icon` | `ReactNode` | — |
|
|
119
|
-
| `
|
|
218
|
+
| `outline` | `boolean` | `false` |
|
|
219
|
+
| `rounded` | `boolean` | `false` |
|
|
220
|
+
| `coloredText` | `boolean` | `false` |
|
|
120
221
|
| `disabled` | `boolean` | `false` |
|
|
121
222
|
|
|
223
|
+
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.
|
|
224
|
+
To create a loading button, pass a `Spinner` as `icon`, use text such as `"Loading..."`, and set `disabled` to block interaction.
|
|
225
|
+
To create an icon button, pass only `icon` and no text. Provide an accessible label with `aria-label`.
|
|
226
|
+
|
|
122
227
|
Forwards a `ref` to the underlying `<button>`. Accepts all native button attributes.
|
|
123
228
|
|
|
124
229
|
---
|
|
@@ -303,6 +408,7 @@ const [open, setOpen] = useState(false);
|
|
|
303
408
|
### Modal
|
|
304
409
|
|
|
305
410
|
Dialog overlay with backdrop. Renders as a `div`-based panel, not `<dialog>`.
|
|
411
|
+
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`.
|
|
306
412
|
|
|
307
413
|
```tsx
|
|
308
414
|
import { Modal } from "@dnotrever2/super-kit";
|
|
@@ -354,6 +460,35 @@ import { Popover } from "@dnotrever2/super-kit";
|
|
|
354
460
|
|
|
355
461
|
---
|
|
356
462
|
|
|
463
|
+
### Progress
|
|
464
|
+
|
|
465
|
+
Determinate or indeterminate progress bar.
|
|
466
|
+
|
|
467
|
+
```tsx
|
|
468
|
+
import { Progress } from "@dnotrever2/super-kit";
|
|
469
|
+
|
|
470
|
+
<Progress value={64} label="Deploy progress" showValue />
|
|
471
|
+
<Progress shape="circle" value={72} label="Deploy" />
|
|
472
|
+
<Progress indeterminate label="Publishing" showValue />
|
|
473
|
+
<Progress value={82} variant="success" size="lg" />
|
|
474
|
+
```
|
|
475
|
+
|
|
476
|
+
| Prop | Type | Default |
|
|
477
|
+
| --------------- | ----------------------------------------------------------------- | ---------- |
|
|
478
|
+
| `value` | `number` | — |
|
|
479
|
+
| `max` | `number` | `100` |
|
|
480
|
+
| `variant` | `"accent" \| "success" \| "warning" \| "danger" \| "info" \| "neutral"` | `"accent"` |
|
|
481
|
+
| `size` | `"sm" \| "md" \| "lg"` | `"md"` |
|
|
482
|
+
| `shape` | `"bar" \| "circle"` | `"bar"` |
|
|
483
|
+
| `label` | `ReactNode` | — |
|
|
484
|
+
| `valueLabel` | `string` | — |
|
|
485
|
+
| `showValue` | `boolean` | `false` |
|
|
486
|
+
| `indeterminate` | `boolean` | `false` |
|
|
487
|
+
|
|
488
|
+
When `value` is omitted or `indeterminate` is true, the progress renders in loading mode. Circular progress shows the percentage in the center.
|
|
489
|
+
|
|
490
|
+
---
|
|
491
|
+
|
|
357
492
|
### PushButton
|
|
358
493
|
|
|
359
494
|
Toggle button and grouped toolbar segments.
|
|
@@ -471,6 +606,83 @@ Forwards a `ref` to the root `<div>`.
|
|
|
471
606
|
|
|
472
607
|
---
|
|
473
608
|
|
|
609
|
+
### Tabs
|
|
610
|
+
|
|
611
|
+
Accessible tab navigation with raised, rounded, or underline styles.
|
|
612
|
+
|
|
613
|
+
```tsx
|
|
614
|
+
import { Badge, Tabs } from "@dnotrever2/super-kit";
|
|
615
|
+
|
|
616
|
+
<Tabs
|
|
617
|
+
variant="raised"
|
|
618
|
+
items={[
|
|
619
|
+
{ value: "overview", label: "Overview", content: <Overview /> },
|
|
620
|
+
{
|
|
621
|
+
value: "deployments",
|
|
622
|
+
label: <>Deployments <Badge variant="primary" pill>4</Badge></>,
|
|
623
|
+
content: <Deployments />
|
|
624
|
+
},
|
|
625
|
+
{ value: "settings", label: "Settings", content: <Settings /> }
|
|
626
|
+
]}
|
|
627
|
+
/>
|
|
628
|
+
|
|
629
|
+
<Tabs
|
|
630
|
+
variant="underline"
|
|
631
|
+
transparent
|
|
632
|
+
closable
|
|
633
|
+
onTabClose={(value) => closeTab(value)}
|
|
634
|
+
items={[
|
|
635
|
+
{ value: "overview", label: "Overview" },
|
|
636
|
+
{ value: "deployments", label: "Deployments" }
|
|
637
|
+
]}
|
|
638
|
+
/>
|
|
639
|
+
|
|
640
|
+
<Tabs
|
|
641
|
+
variant="rounded"
|
|
642
|
+
items={[
|
|
643
|
+
{ value: "daily", label: "Daily" },
|
|
644
|
+
{ value: "weekly", label: "Weekly" }
|
|
645
|
+
]}
|
|
646
|
+
/>
|
|
647
|
+
```
|
|
648
|
+
|
|
649
|
+
| Prop | Type | Default |
|
|
650
|
+
| --------------- | ---------------------------- | ------------------- |
|
|
651
|
+
| `items` | `TabItem[]` | required |
|
|
652
|
+
| `variant` | `"raised" \| "underline" \| "rounded"` | `"raised"` |
|
|
653
|
+
| `value` | `string` | — controlled |
|
|
654
|
+
| `defaultValue` | `string` | first enabled item |
|
|
655
|
+
| `onValueChange` | `(value: string) => void` | — |
|
|
656
|
+
| `ariaLabel` | `string` | `"Tabs"` |
|
|
657
|
+
| `disabled` | `boolean` | `false` |
|
|
658
|
+
| `closable` | `boolean` | `false` |
|
|
659
|
+
| `closeLabel` | `string` | `"Close tab"` |
|
|
660
|
+
| `onTabClose` | `(value: string) => void` | — |
|
|
661
|
+
| `tabItemClassName` | `string` | — |
|
|
662
|
+
| `tabClassName` | `string` | — |
|
|
663
|
+
| `transparent` | `boolean` | `false` — underline only |
|
|
664
|
+
| `inactiveTransparent` | `boolean` | `false` — raised/rounded only |
|
|
665
|
+
|
|
666
|
+
**TabItem fields**
|
|
667
|
+
|
|
668
|
+
| Field | Type |
|
|
669
|
+
| ------------ | ----------------------------------------- |
|
|
670
|
+
| `value` | `string` |
|
|
671
|
+
| `label` | `ReactNode` |
|
|
672
|
+
| `content` | `ReactNode` |
|
|
673
|
+
| `disabled` | `boolean` |
|
|
674
|
+
| `closable` | `boolean` |
|
|
675
|
+
| `closeLabel` | `string` |
|
|
676
|
+
| `onClose` | `(value: string) => void` |
|
|
677
|
+
| `className` | `string` — class for the tab wrapper |
|
|
678
|
+
| `tabProps` | `ButtonHTMLAttributes<HTMLButtonElement>` |
|
|
679
|
+
| `closeButtonProps` | `ButtonHTMLAttributes<HTMLButtonElement>` |
|
|
680
|
+
| `panelProps` | `HTMLAttributes<HTMLDivElement>` |
|
|
681
|
+
|
|
682
|
+
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.
|
|
683
|
+
|
|
684
|
+
---
|
|
685
|
+
|
|
474
686
|
### Spinner
|
|
475
687
|
|
|
476
688
|
Loading indicator in three styles.
|
|
@@ -483,7 +695,7 @@ import { Spinner } from "@dnotrever2/super-kit";
|
|
|
483
695
|
<Spinner variant="bar" />
|
|
484
696
|
|
|
485
697
|
// Inside a primary button (white on accent background)
|
|
486
|
-
<Button variant="primary"
|
|
698
|
+
<Button variant="primary" disabled icon={<Spinner size="sm" onAccent />}>
|
|
487
699
|
Deploying
|
|
488
700
|
</Button>
|
|
489
701
|
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { ButtonHTMLAttributes, CSSProperties, HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export type AccordionValue = string | string[];
|
|
3
|
+
export type AccordionIndicator = "chevron" | "plus-minus";
|
|
4
|
+
export type AccordionBorder = "boxed" | "none" | "divider";
|
|
5
|
+
export type AccordionHighlight = "none" | "item" | "header";
|
|
6
|
+
export type AccordionRadius = "rounded" | "square";
|
|
7
|
+
export type AccordionItem = {
|
|
8
|
+
value: string;
|
|
9
|
+
title: ReactNode;
|
|
10
|
+
content: ReactNode;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
icon?: ReactNode;
|
|
13
|
+
className?: string;
|
|
14
|
+
triggerProps?: ButtonHTMLAttributes<HTMLButtonElement>;
|
|
15
|
+
contentProps?: HTMLAttributes<HTMLDivElement>;
|
|
16
|
+
};
|
|
17
|
+
export type AccordionProps = Omit<HTMLAttributes<HTMLDivElement>, "defaultValue" | "onChange"> & {
|
|
18
|
+
items: AccordionItem[];
|
|
19
|
+
value?: AccordionValue;
|
|
20
|
+
defaultValue?: AccordionValue;
|
|
21
|
+
onValueChange?: (value: AccordionValue) => void;
|
|
22
|
+
multiple?: boolean;
|
|
23
|
+
hideIndicator?: boolean;
|
|
24
|
+
indicator?: AccordionIndicator;
|
|
25
|
+
border?: AccordionBorder;
|
|
26
|
+
highlight?: AccordionHighlight;
|
|
27
|
+
radius?: AccordionRadius;
|
|
28
|
+
hoverHighlight?: boolean;
|
|
29
|
+
spacing?: number | string;
|
|
30
|
+
disabled?: boolean;
|
|
31
|
+
itemClassName?: string;
|
|
32
|
+
headerClassName?: string;
|
|
33
|
+
headerStyle?: CSSProperties;
|
|
34
|
+
bodyClassName?: string;
|
|
35
|
+
bodyStyle?: CSSProperties;
|
|
36
|
+
triggerClassName?: string;
|
|
37
|
+
contentClassName?: string;
|
|
38
|
+
};
|
|
39
|
+
export declare function Accordion({ items, value, defaultValue, onValueChange, multiple, hideIndicator, indicator, border, highlight, radius, hoverHighlight, spacing, disabled, itemClassName, headerClassName, headerStyle, bodyClassName, bodyStyle, triggerClassName, contentClassName, className, style, ...props }: AccordionProps): import("react/jsx-runtime").JSX.Element;
|
|
40
|
+
export declare namespace Accordion {
|
|
41
|
+
var displayName: string;
|
|
42
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Accordion';
|
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
|
}
|
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/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export * from './Accordion';
|
|
1
2
|
export * from './Badge';
|
|
2
3
|
export * from './Breadcrumb';
|
|
3
4
|
export * from './Scrollable';
|
|
@@ -8,9 +9,11 @@ export * from './Markers';
|
|
|
8
9
|
export * from './Menu';
|
|
9
10
|
export * from './Modal';
|
|
10
11
|
export * from './Popover';
|
|
12
|
+
export * from './Progress';
|
|
11
13
|
export * from './PushButton';
|
|
12
14
|
export * from './Select';
|
|
13
15
|
export * from './Spinner';
|
|
16
|
+
export * from './Tabs';
|
|
14
17
|
export * from './Textarea';
|
|
15
18
|
export * from './Toast';
|
|
16
19
|
export * from './Tooltip';
|