@okshaun/components 0.4.5 → 0.5.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/dist/index.d.ts +90 -13
- package/dist/index.js +671 -56
- package/dist/index.js.map +1 -1
- package/dist/panda.buildinfo.json +66 -9
- package/dist/preset.js +617 -77
- package/dist/preset.js.map +1 -1
- package/dist/sprite.symbol.html +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AriaAttributes } from 'react';
|
|
2
|
+
import { AvatarVariantProps } from '../../../styled-system/recipes';
|
|
2
3
|
import { BadgeVariantProps } from '../../../styled-system/recipes';
|
|
3
4
|
import { BoxVariantProps } from '../../../styled-system/recipes';
|
|
4
5
|
import { ButtonVariantProps } from '../../../styled-system/recipes';
|
|
@@ -6,6 +7,7 @@ import { CardVariantProps } from '../../../styled-system/recipes';
|
|
|
6
7
|
import { ChangeEventHandler } from 'react';
|
|
7
8
|
import { CheckboxInputVariantProps } from '../../../styled-system/recipes';
|
|
8
9
|
import { CheckboxVariantProps } from '../../../styled-system/recipes';
|
|
10
|
+
import { ChipVariantProps } from '../../../styled-system/recipes';
|
|
9
11
|
import { CodeVariantProps } from '../../../styled-system/recipes';
|
|
10
12
|
import { ColorToken } from '../../../styled-system/tokens';
|
|
11
13
|
import { ComponentPropsWithoutRef } from 'react';
|
|
@@ -25,6 +27,7 @@ import { LabelVariantProps } from '../../../styled-system/recipes';
|
|
|
25
27
|
import { LinkVariantProps } from '../../../styled-system/recipes';
|
|
26
28
|
import { menu } from '../../../styled-system/recipes';
|
|
27
29
|
import { MenuVariantProps } from '../../../styled-system/recipes';
|
|
30
|
+
import { NumericSizeToken } from '../../../styled-system/tokens';
|
|
28
31
|
import { Placement } from '@floating-ui/react';
|
|
29
32
|
import { RadioInputVariantProps } from '../../../styled-system/recipes';
|
|
30
33
|
import { RadioVariantProps } from '../../../styled-system/recipes';
|
|
@@ -41,6 +44,7 @@ import { TextVariantProps } from '../../../styled-system/recipes';
|
|
|
41
44
|
import { ToggleInputVariantProps } from '../../../styled-system/recipes';
|
|
42
45
|
import { ToggleVariantProps } from '../../../styled-system/recipes';
|
|
43
46
|
import { TooltipVariantProps } from '../../../styled-system/recipes';
|
|
47
|
+
import { WrapProps } from '../../../styled-system/jsx';
|
|
44
48
|
|
|
45
49
|
declare type AllowedIconSizes = keyof typeof numericSizes;
|
|
46
50
|
|
|
@@ -91,25 +95,66 @@ export declare type AutocompleteProps = MenuVariantProps & {
|
|
|
91
95
|
};
|
|
92
96
|
|
|
93
97
|
/**
|
|
94
|
-
*
|
|
95
|
-
*
|
|
98
|
+
* Avatar component for displaying user or entity images with optional
|
|
99
|
+
* presence and status indicators.
|
|
96
100
|
*/
|
|
97
|
-
export declare const
|
|
101
|
+
export declare const Avatar: React_2.ForwardRefExoticComponent<Omit<AvatarProps, "ref"> & React_2.RefAttributes<HTMLSpanElement>>;
|
|
102
|
+
|
|
103
|
+
export declare type AvatarPresence = 'online' | 'busy' | 'offline' | 'focus';
|
|
104
|
+
|
|
105
|
+
export declare type AvatarProps = BoxProps & Omit<AvatarVariantProps, 'size' | 'shape'> & {
|
|
106
|
+
/** Image source URL */
|
|
107
|
+
src?: string;
|
|
108
|
+
/** Alt text for image */
|
|
109
|
+
alt?: string;
|
|
110
|
+
/** Name for generating initials fallback */
|
|
111
|
+
name?: string;
|
|
112
|
+
/** Size of the avatar */
|
|
113
|
+
size?: AvatarSize;
|
|
114
|
+
/** Shape of the avatar */
|
|
115
|
+
shape?: AvatarShape;
|
|
116
|
+
/** Presence indicator (bottom-right) */
|
|
117
|
+
presence?: AvatarPresence;
|
|
118
|
+
/** Status indicator (top-right) */
|
|
119
|
+
status?: AvatarStatus;
|
|
120
|
+
/** Custom fallback content (overrides initials) */
|
|
121
|
+
fallback?: React_2.ReactNode;
|
|
122
|
+
/** Border color for the avatar */
|
|
123
|
+
borderColor?: string;
|
|
124
|
+
/** Additional class name */
|
|
125
|
+
className?: string;
|
|
126
|
+
};
|
|
98
127
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
}) => React_2.ReactElement;
|
|
128
|
+
export declare type AvatarShape = 'circle' | 'square' | 'hexagon';
|
|
129
|
+
|
|
130
|
+
export declare type AvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
131
|
+
|
|
132
|
+
export declare type AvatarStatus = 'approved' | 'declined' | 'locked';
|
|
105
133
|
|
|
106
134
|
/**
|
|
107
|
-
*
|
|
108
|
-
*
|
|
135
|
+
* Badge component for displaying notification counts or status indicators.
|
|
136
|
+
*
|
|
137
|
+
* - Without children: renders as standalone badge
|
|
138
|
+
* - With children: wraps content and positions badge at top-right
|
|
139
|
+
* - Without count prop: shows as dot
|
|
140
|
+
* - With count prop: shows the number (or "99+" if exceeds overflowCount)
|
|
109
141
|
*/
|
|
110
|
-
export declare
|
|
111
|
-
|
|
142
|
+
export declare const Badge: React_2.ForwardRefExoticComponent<Omit<BadgeProps, "ref"> & React_2.RefAttributes<HTMLSpanElement>>;
|
|
143
|
+
|
|
144
|
+
export declare type BadgeAppearance = 'neutral' | 'inverted' | 'subtle' | 'subtle-inverted' | 'success' | 'danger' | 'warning' | 'info';
|
|
145
|
+
|
|
146
|
+
export declare type BadgeProps = BoxProps & Omit<BadgeVariantProps, 'standalone' | 'dot'> & {
|
|
147
|
+
/** Number to show in badge. If provided, switches to count mode. */
|
|
148
|
+
count?: number;
|
|
149
|
+
/** Show badge when count is zero. Default: false */
|
|
150
|
+
showZero?: boolean;
|
|
151
|
+
/** Max count to show. Displays "99+" when exceeded. Default: 99 */
|
|
152
|
+
overflowCount?: number;
|
|
153
|
+
/** Color scheme of the badge. Default: 'danger' */
|
|
154
|
+
appearance?: BadgeAppearance;
|
|
155
|
+
/** Additional class name */
|
|
112
156
|
className?: string;
|
|
157
|
+
/** Content to wrap with the badge */
|
|
113
158
|
children?: React_2.ReactNode;
|
|
114
159
|
};
|
|
115
160
|
|
|
@@ -171,6 +216,7 @@ export declare type ButtonProps<E extends React_2.ElementType = 'button'> = Reac
|
|
|
171
216
|
disabled?: boolean;
|
|
172
217
|
iconBefore?: IconNamesList;
|
|
173
218
|
iconAfter?: IconNamesList;
|
|
219
|
+
gap?: NumericSizeToken;
|
|
174
220
|
};
|
|
175
221
|
|
|
176
222
|
export declare const Card: React.FC<CardProps>;
|
|
@@ -224,6 +270,37 @@ export declare type CheckboxProps = {
|
|
|
224
270
|
error?: boolean;
|
|
225
271
|
} & Omit<BoxProps, 'checked' | 'onChange' | keyof CheckboxVariantProps> & CheckboxVariantProps;
|
|
226
272
|
|
|
273
|
+
export declare const Chip: React.FC<ChipProps>;
|
|
274
|
+
|
|
275
|
+
export declare const ChipGroup: React.FC<ChipGroupProps>;
|
|
276
|
+
|
|
277
|
+
export declare type ChipGroupProps = Omit<WrapProps, 'role'> & {
|
|
278
|
+
type: ChipGroupType;
|
|
279
|
+
value: string | string[];
|
|
280
|
+
onChange: (value: string | string[]) => void;
|
|
281
|
+
children: ReactNode;
|
|
282
|
+
label?: string;
|
|
283
|
+
id?: string;
|
|
284
|
+
name?: string;
|
|
285
|
+
};
|
|
286
|
+
|
|
287
|
+
export declare type ChipGroupType = 'single' | 'multi';
|
|
288
|
+
|
|
289
|
+
export declare type ChipProps = BoxProps & Omit<ChipVariantProps, 'before' | 'after'> & {
|
|
290
|
+
children: string | ReactNode;
|
|
291
|
+
/** Content to render before the label (e.g., Icon, Avatar) */
|
|
292
|
+
before?: ReactNode;
|
|
293
|
+
/** Content to render after the label (e.g., Badge, Icon) */
|
|
294
|
+
after?: ReactNode;
|
|
295
|
+
disabled?: boolean;
|
|
296
|
+
loading?: boolean;
|
|
297
|
+
deleted?: boolean;
|
|
298
|
+
dismissable?: boolean;
|
|
299
|
+
onDismiss?: () => void;
|
|
300
|
+
value?: string;
|
|
301
|
+
gap?: NumericSizeToken;
|
|
302
|
+
};
|
|
303
|
+
|
|
227
304
|
export declare const Code: React.FC<CodeProps>;
|
|
228
305
|
|
|
229
306
|
export declare type CodeProps = Omit<BoxProps, keyof CodeVariantProps | keyof TextProps> & CodeVariantProps & TextProps & {
|