@drdex0101/water-design-system 1.0.1 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/components/Badge/Badge.d.ts +16 -0
- package/dist/components/Badge/index.d.ts +1 -0
- package/dist/components/Button/Button.d.ts +20 -2
- package/dist/components/Checkbox/Checkbox.d.ts +13 -0
- package/dist/components/Checkbox/index.d.ts +1 -0
- package/dist/components/Divider/Divider.d.ts +9 -0
- package/dist/components/Divider/index.d.ts +1 -0
- package/dist/components/Input/Input.d.ts +20 -0
- package/dist/components/Input/index.d.ts +1 -0
- package/dist/components/Poker/PokerCard.d.ts +28 -0
- package/dist/components/Poker/PokerPlayer.d.ts +38 -0
- package/dist/components/Poker/PokerStatusIndicator.d.ts +28 -0
- package/dist/components/Poker/PokerTable.d.ts +39 -0
- package/dist/components/Poker/index.d.ts +4 -0
- package/dist/components/Slider/Slider.d.ts +23 -0
- package/dist/components/Slider/index.d.ts +1 -0
- package/dist/components/Switch/Switch.d.ts +17 -0
- package/dist/components/Switch/index.d.ts +1 -0
- package/dist/components/Tabs/Tabs.d.ts +26 -0
- package/dist/components/Tabs/index.d.ts +1 -0
- package/dist/components/Toast/Toast.d.ts +18 -0
- package/dist/components/Toast/index.d.ts +1 -0
- package/dist/components/Toggle/Toggle.d.ts +34 -0
- package/dist/components/Toggle/index.d.ts +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/pages/SpacingTokens.d.ts +2 -0
- package/dist/tokens/colors.d.ts +38 -204
- package/dist/tokens/index.d.ts +1 -5
- package/dist/tokens/semantic.d.ts +201 -114
- package/dist/tokens/spacing.d.ts +54 -0
- package/dist/water-design-system.es.js +2336 -582
- package/dist/water-design-system.umd.js +15 -4
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -12,13 +12,13 @@ A modern React component library built with TypeScript and Vite.
|
|
|
12
12
|
## Installation
|
|
13
13
|
|
|
14
14
|
```bash
|
|
15
|
-
npm install @
|
|
15
|
+
npm install @drdex0101/water-design-system
|
|
16
16
|
```
|
|
17
17
|
|
|
18
18
|
## Usage
|
|
19
19
|
|
|
20
20
|
```tsx
|
|
21
|
-
import { Button } from '@
|
|
21
|
+
import { Button } from '@drdex0101/water-design-system';
|
|
22
22
|
|
|
23
23
|
const App = () => (
|
|
24
24
|
<Button label="Click Me" onClick={() => console.log('Hello!')} />
|
|
@@ -44,8 +44,8 @@ To publish a new version:
|
|
|
44
44
|
1. Update the version in `package.json`.
|
|
45
45
|
2. Push a new tag:
|
|
46
46
|
```bash
|
|
47
|
-
git tag v1.0.
|
|
48
|
-
git push origin v1.0.
|
|
47
|
+
git tag v1.0.1
|
|
48
|
+
git push origin v1.0.1
|
|
49
49
|
```
|
|
50
50
|
3. GitHub Actions will automatically build and publish to npm.
|
|
51
51
|
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export type BadgeType = 'default' | 'positive' | 'warning' | 'error' | 'neutral' | 'outline';
|
|
4
|
+
export interface BadgeProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, 'children'> {
|
|
5
|
+
/** Badge text content */
|
|
6
|
+
label: string;
|
|
7
|
+
/** Badge type/variant */
|
|
8
|
+
type?: BadgeType;
|
|
9
|
+
/** Show icon on the left side */
|
|
10
|
+
leftIcon?: React.ReactNode;
|
|
11
|
+
/** Show icon on the right side */
|
|
12
|
+
rightIcon?: React.ReactNode;
|
|
13
|
+
/** Callback when close icon is clicked (shows X icon on right) */
|
|
14
|
+
onClose?: () => void;
|
|
15
|
+
}
|
|
16
|
+
export declare const Badge: ({ label, type, leftIcon, rightIcon, onClose, style, ...props }: BadgeProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Badge';
|
|
@@ -1,6 +1,24 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
|
|
3
|
+
export type ButtonType = 'primary' | 'secondary' | 'outline' | 'warning' | 'call' | 'raise' | 'disabled';
|
|
4
|
+
export type ButtonSize = 'L' | 'M' | 'S';
|
|
5
|
+
export type ButtonShape = 'rounded' | 'full-rounded';
|
|
3
6
|
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
4
|
-
|
|
7
|
+
/** Button text content */
|
|
8
|
+
label?: string;
|
|
9
|
+
/** Button variant type */
|
|
10
|
+
variant?: ButtonType;
|
|
11
|
+
/** Button size */
|
|
12
|
+
size?: ButtonSize;
|
|
13
|
+
/** Button shape */
|
|
14
|
+
shape?: ButtonShape;
|
|
15
|
+
/** Loading state */
|
|
16
|
+
loading?: boolean;
|
|
17
|
+
/** Icon to display on the left */
|
|
18
|
+
leftIcon?: React.ReactNode;
|
|
19
|
+
/** Icon to display on the right */
|
|
20
|
+
rightIcon?: React.ReactNode;
|
|
21
|
+
/** Children content (alternative to label) */
|
|
22
|
+
children?: React.ReactNode;
|
|
5
23
|
}
|
|
6
|
-
export declare const Button: ({ label, ...props }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export declare const Button: ({ label, variant, size, shape, loading, leftIcon, rightIcon, children, disabled, style, onMouseEnter, onMouseLeave, onMouseDown, onMouseUp, ...props }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type' | 'size'> {
|
|
4
|
+
/** Checkbox label text */
|
|
5
|
+
label?: string;
|
|
6
|
+
/** Controlled checked state */
|
|
7
|
+
checked?: boolean;
|
|
8
|
+
/** Default checked state for uncontrolled usage */
|
|
9
|
+
defaultChecked?: boolean;
|
|
10
|
+
/** Callback when checkbox value changes */
|
|
11
|
+
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
12
|
+
}
|
|
13
|
+
export declare const Checkbox: ({ label, checked, defaultChecked, disabled, onChange, id, style, ...props }: CheckboxProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Checkbox';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface DividerProps extends React.HTMLAttributes<HTMLHRElement> {
|
|
4
|
+
/** Orientation of the divider */
|
|
5
|
+
orientation?: 'horizontal' | 'vertical';
|
|
6
|
+
/** Custom color for the divider */
|
|
7
|
+
color?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const Divider: ({ orientation, color, style, ...props }: DividerProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Divider';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export type InputState = 'default' | 'focus' | 'error' | 'disabled' | 'typing' | 'typed';
|
|
4
|
+
export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'> {
|
|
5
|
+
/** Label text above the input */
|
|
6
|
+
label?: string;
|
|
7
|
+
/** Helper text below the input */
|
|
8
|
+
helperText?: string;
|
|
9
|
+
/** Error message (overrides helperText when present) */
|
|
10
|
+
error?: string;
|
|
11
|
+
/** Left icon element */
|
|
12
|
+
leftIcon?: React.ReactNode;
|
|
13
|
+
/** Right icon element */
|
|
14
|
+
rightIcon?: React.ReactNode;
|
|
15
|
+
/** Input shape */
|
|
16
|
+
shape?: 'rounded' | 'pill';
|
|
17
|
+
/** Full width input */
|
|
18
|
+
fullWidth?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Input';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export type PokerCardState = 'default' | 'add' | 'back' | 'pending' | 'option';
|
|
4
|
+
export type PokerCardSuit = 'heart' | 'spade' | 'diamond' | 'club' | 'empty' | 'number' | 'both';
|
|
5
|
+
export interface PokerCardProps {
|
|
6
|
+
/** Card state */
|
|
7
|
+
state?: PokerCardState;
|
|
8
|
+
/** Card suit */
|
|
9
|
+
suit?: PokerCardSuit;
|
|
10
|
+
/** Card value (for default state) */
|
|
11
|
+
value?: string;
|
|
12
|
+
/** Whether the card is selected */
|
|
13
|
+
selected?: boolean;
|
|
14
|
+
/** Click handler */
|
|
15
|
+
onClick?: () => void;
|
|
16
|
+
/** Custom style */
|
|
17
|
+
style?: React.CSSProperties;
|
|
18
|
+
}
|
|
19
|
+
export declare const PokerCard: ({ state, suit, value, selected, onClick, style, }: PokerCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export interface PokerCardGroupProps {
|
|
21
|
+
/** Array of cards */
|
|
22
|
+
cards: PokerCardProps[];
|
|
23
|
+
/** Gap between cards */
|
|
24
|
+
gap?: number;
|
|
25
|
+
/** Custom style */
|
|
26
|
+
style?: React.CSSProperties;
|
|
27
|
+
}
|
|
28
|
+
export declare const PokerCardGroup: ({ cards, gap, style }: PokerCardGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export type PokerPlayerState = 'start' | 'default' | 'showRange' | 'flip' | 'fold';
|
|
4
|
+
export interface PokerPlayerProps {
|
|
5
|
+
/** Player state */
|
|
6
|
+
state?: PokerPlayerState;
|
|
7
|
+
/** Whether this is the hero (main player) */
|
|
8
|
+
isHero?: boolean;
|
|
9
|
+
/** Player name (optional) */
|
|
10
|
+
playerName?: string;
|
|
11
|
+
/** Whether the player is selected */
|
|
12
|
+
selected?: boolean;
|
|
13
|
+
/** Player position label (e.g., "BTN", "SB", "BB", "UTG") */
|
|
14
|
+
position?: string;
|
|
15
|
+
/** Player stack size */
|
|
16
|
+
stack?: string;
|
|
17
|
+
/** Cards to show (for flip/showRange states) */
|
|
18
|
+
cards?: Array<{
|
|
19
|
+
suit: string;
|
|
20
|
+
value: string;
|
|
21
|
+
}>;
|
|
22
|
+
/** Click handler */
|
|
23
|
+
onClick?: () => void;
|
|
24
|
+
/** Custom style */
|
|
25
|
+
style?: React.CSSProperties;
|
|
26
|
+
}
|
|
27
|
+
export declare const PokerPlayer: ({ state, isHero, playerName, selected, position, stack, cards, onClick, style, }: PokerPlayerProps) => import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export interface PokerPlayerCircleProps {
|
|
29
|
+
/** Whether this is the hero */
|
|
30
|
+
isHero?: boolean;
|
|
31
|
+
/** Whether selected */
|
|
32
|
+
selected?: boolean;
|
|
33
|
+
/** Click handler */
|
|
34
|
+
onClick?: () => void;
|
|
35
|
+
/** Custom style */
|
|
36
|
+
style?: React.CSSProperties;
|
|
37
|
+
}
|
|
38
|
+
export declare const PokerPlayerCircle: ({ isHero, selected, onClick, style, }: PokerPlayerCircleProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export type PokerActionType = 'bet' | 'raise' | 'call' | 'fold' | 'allin' | 'waiting';
|
|
4
|
+
export interface PokerStatusIndicatorProps {
|
|
5
|
+
/** Action type */
|
|
6
|
+
action: PokerActionType;
|
|
7
|
+
/** Position label (e.g., "SB", "BB", "UTG") */
|
|
8
|
+
position?: string;
|
|
9
|
+
/** Bet amount in BB */
|
|
10
|
+
amount?: string;
|
|
11
|
+
/** Custom style */
|
|
12
|
+
style?: React.CSSProperties;
|
|
13
|
+
}
|
|
14
|
+
export declare const PokerStatusIndicator: ({ action, position, amount, style, }: PokerStatusIndicatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export interface PokerChipProps {
|
|
16
|
+
/** Amount (e.g., "-30 BB") */
|
|
17
|
+
amount: string;
|
|
18
|
+
/** Color - positive or negative */
|
|
19
|
+
variant?: 'positive' | 'negative';
|
|
20
|
+
/** Custom style */
|
|
21
|
+
style?: React.CSSProperties;
|
|
22
|
+
}
|
|
23
|
+
export declare const PokerChip: ({ amount, variant, style }: PokerChipProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export interface DealerButtonProps {
|
|
25
|
+
/** Custom style */
|
|
26
|
+
style?: React.CSSProperties;
|
|
27
|
+
}
|
|
28
|
+
export declare const DealerButton: ({ style }: DealerButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { PokerCardProps } from './PokerCard';
|
|
3
|
+
import { PokerPlayerProps } from './PokerPlayer';
|
|
4
|
+
|
|
5
|
+
export type PokerTableOrientation = 'vertical' | 'horizontal';
|
|
6
|
+
export interface PokerTablePlayer extends PokerPlayerProps {
|
|
7
|
+
/** Player seat position (0-8, clockwise from bottom) */
|
|
8
|
+
seat: number;
|
|
9
|
+
}
|
|
10
|
+
export interface PokerTableProps {
|
|
11
|
+
/** Table orientation */
|
|
12
|
+
orientation?: PokerTableOrientation;
|
|
13
|
+
/** Players at the table */
|
|
14
|
+
players?: PokerTablePlayer[];
|
|
15
|
+
/** Community cards */
|
|
16
|
+
communityCards?: PokerCardProps[];
|
|
17
|
+
/** Pot size in BB */
|
|
18
|
+
pot?: string;
|
|
19
|
+
/** Blinds info (e.g., "100 / 200 / 100") */
|
|
20
|
+
blinds?: string;
|
|
21
|
+
/** Dealer seat position */
|
|
22
|
+
dealerSeat?: number;
|
|
23
|
+
/** Click handler for empty seats */
|
|
24
|
+
onSeatClick?: (seat: number) => void;
|
|
25
|
+
/** Click handler for cards */
|
|
26
|
+
onCardClick?: (index: number) => void;
|
|
27
|
+
/** Custom style */
|
|
28
|
+
style?: React.CSSProperties;
|
|
29
|
+
}
|
|
30
|
+
export declare const PokerTable: ({ orientation, players, communityCards, pot, blinds, dealerSeat, onSeatClick, onCardClick, style, }: PokerTableProps) => import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
export interface PokerTablePreviewProps {
|
|
32
|
+
/** Table orientation */
|
|
33
|
+
orientation?: PokerTableOrientation;
|
|
34
|
+
/** Scale factor */
|
|
35
|
+
scale?: number;
|
|
36
|
+
/** Custom style */
|
|
37
|
+
style?: React.CSSProperties;
|
|
38
|
+
}
|
|
39
|
+
export declare const PokerTablePreview: ({ orientation, scale, style, }: PokerTablePreviewProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface SliderProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type' | 'onChange'> {
|
|
4
|
+
/** Minimum value */
|
|
5
|
+
min?: number;
|
|
6
|
+
/** Maximum value */
|
|
7
|
+
max?: number;
|
|
8
|
+
/** Step increment */
|
|
9
|
+
step?: number;
|
|
10
|
+
/** Current value */
|
|
11
|
+
value?: number;
|
|
12
|
+
/** Default value for uncontrolled usage */
|
|
13
|
+
defaultValue?: number;
|
|
14
|
+
/** Callback when value changes */
|
|
15
|
+
onChange?: (value: number) => void;
|
|
16
|
+
/** Show min/max labels */
|
|
17
|
+
showLabels?: boolean;
|
|
18
|
+
/** Format function for labels */
|
|
19
|
+
formatLabel?: (value: number) => string;
|
|
20
|
+
/** Show value input fields */
|
|
21
|
+
showInputs?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export declare const Slider: ({ min, max, step, value, defaultValue, onChange, showLabels, formatLabel, showInputs, disabled, style, ...props }: SliderProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Slider';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface SwitchProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type' | 'onChange' | 'size'> {
|
|
4
|
+
/** Whether the switch is checked */
|
|
5
|
+
checked?: boolean;
|
|
6
|
+
/** Default checked state for uncontrolled usage */
|
|
7
|
+
defaultChecked?: boolean;
|
|
8
|
+
/** Callback when switch value changes */
|
|
9
|
+
onChange?: (checked: boolean) => void;
|
|
10
|
+
/** Label for the left/off state */
|
|
11
|
+
leftLabel?: string;
|
|
12
|
+
/** Label for the right/on state */
|
|
13
|
+
rightLabel?: string;
|
|
14
|
+
/** Size of the switch */
|
|
15
|
+
size?: 'sm' | 'md';
|
|
16
|
+
}
|
|
17
|
+
export declare const Switch: ({ checked, defaultChecked, onChange, leftLabel, rightLabel, size, disabled, style, id, ...props }: SwitchProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Switch';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export type TabsVariant = 'default' | 'text';
|
|
4
|
+
export interface TabItem {
|
|
5
|
+
/** Unique identifier for the tab */
|
|
6
|
+
id: string;
|
|
7
|
+
/** Tab label */
|
|
8
|
+
label: string;
|
|
9
|
+
/** Whether the tab is disabled */
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface TabsProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
13
|
+
/** Array of tab items */
|
|
14
|
+
items: TabItem[];
|
|
15
|
+
/** Currently active tab ID */
|
|
16
|
+
activeTab?: string;
|
|
17
|
+
/** Default active tab ID for uncontrolled usage */
|
|
18
|
+
defaultActiveTab?: string;
|
|
19
|
+
/** Callback when tab changes */
|
|
20
|
+
onChange?: (tabId: string) => void;
|
|
21
|
+
/** Tab style variant */
|
|
22
|
+
variant?: TabsVariant;
|
|
23
|
+
/** Additional tool element to display on the right */
|
|
24
|
+
tool?: React.ReactNode;
|
|
25
|
+
}
|
|
26
|
+
export declare const Tabs: ({ items, activeTab, defaultActiveTab, onChange, variant, tool, style, ...props }: TabsProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Tabs';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export type ToastType = 'neutral' | 'info' | 'success' | 'alert';
|
|
4
|
+
export interface ToastProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
5
|
+
/** Toast title */
|
|
6
|
+
title: string;
|
|
7
|
+
/** Toast description/message */
|
|
8
|
+
description?: string;
|
|
9
|
+
/** Toast type/variant */
|
|
10
|
+
type?: ToastType;
|
|
11
|
+
/** Action button label */
|
|
12
|
+
actionLabel?: string;
|
|
13
|
+
/** Action button click handler */
|
|
14
|
+
onAction?: () => void;
|
|
15
|
+
/** Close handler */
|
|
16
|
+
onClose?: () => void;
|
|
17
|
+
}
|
|
18
|
+
export declare const Toast: ({ title, description, type, actionLabel, onAction, onClose, style, ...props }: ToastProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Toast';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface ToggleProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'onChange'> {
|
|
4
|
+
/** Toggle label */
|
|
5
|
+
label: string;
|
|
6
|
+
/** Whether the toggle is selected */
|
|
7
|
+
selected?: boolean;
|
|
8
|
+
/** Default selected state for uncontrolled usage */
|
|
9
|
+
defaultSelected?: boolean;
|
|
10
|
+
/** Callback when toggle state changes */
|
|
11
|
+
onChange?: (selected: boolean) => void;
|
|
12
|
+
/** Right icon element */
|
|
13
|
+
rightIcon?: React.ReactNode;
|
|
14
|
+
}
|
|
15
|
+
export declare const Toggle: ({ label, selected, defaultSelected, onChange, rightIcon, disabled, style, ...props }: ToggleProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export interface ToggleGroupItem {
|
|
17
|
+
id: string;
|
|
18
|
+
label: string;
|
|
19
|
+
rightIcon?: React.ReactNode;
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface ToggleGroupProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
23
|
+
/** Array of toggle items */
|
|
24
|
+
items: ToggleGroupItem[];
|
|
25
|
+
/** Currently selected item ID */
|
|
26
|
+
value?: string;
|
|
27
|
+
/** Default selected item ID for uncontrolled usage */
|
|
28
|
+
defaultValue?: string;
|
|
29
|
+
/** Callback when selection changes */
|
|
30
|
+
onChange?: (value: string) => void;
|
|
31
|
+
/** Allow deselecting (toggle off) */
|
|
32
|
+
allowDeselect?: boolean;
|
|
33
|
+
}
|
|
34
|
+
export declare const ToggleGroup: ({ items, value, defaultValue, onChange, allowDeselect, style, ...props }: ToggleGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Toggle';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,12 @@
|
|
|
1
|
+
export * from './components/Badge';
|
|
1
2
|
export * from './components/Button';
|
|
3
|
+
export * from './components/Checkbox';
|
|
4
|
+
export * from './components/Divider';
|
|
5
|
+
export * from './components/Input';
|
|
6
|
+
export * from './components/Slider';
|
|
7
|
+
export * from './components/Switch';
|
|
8
|
+
export * from './components/Tabs';
|
|
9
|
+
export * from './components/Toast';
|
|
10
|
+
export * from './components/Toggle';
|
|
11
|
+
export * from './components/Poker';
|
|
2
12
|
export * from './tokens';
|