@okshaun/components 0.4.6 → 0.5.1
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 +84 -15
- package/dist/index.js +661 -430
- package/dist/index.js.map +1 -1
- package/dist/panda.buildinfo.json +64 -72
- package/dist/preset.js +620 -338
- package/dist/preset.js.map +1 -1
- package/dist/sprite.symbol.html +1 -1
- package/package.json +2 -5
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';
|
|
@@ -26,6 +27,7 @@ import { LabelVariantProps } from '../../../styled-system/recipes';
|
|
|
26
27
|
import { LinkVariantProps } from '../../../styled-system/recipes';
|
|
27
28
|
import { menu } from '../../../styled-system/recipes';
|
|
28
29
|
import { MenuVariantProps } from '../../../styled-system/recipes';
|
|
30
|
+
import { NumericSizeToken } from '../../../styled-system/tokens';
|
|
29
31
|
import { Placement } from '@floating-ui/react';
|
|
30
32
|
import { RadioInputVariantProps } from '../../../styled-system/recipes';
|
|
31
33
|
import { RadioVariantProps } from '../../../styled-system/recipes';
|
|
@@ -42,6 +44,7 @@ import { TextVariantProps } from '../../../styled-system/recipes';
|
|
|
42
44
|
import { ToggleInputVariantProps } from '../../../styled-system/recipes';
|
|
43
45
|
import { ToggleVariantProps } from '../../../styled-system/recipes';
|
|
44
46
|
import { TooltipVariantProps } from '../../../styled-system/recipes';
|
|
47
|
+
import { WrapProps } from '../../../styled-system/jsx';
|
|
45
48
|
|
|
46
49
|
declare type AllowedIconSizes = keyof typeof numericSizes;
|
|
47
50
|
|
|
@@ -92,25 +95,66 @@ export declare type AutocompleteProps = MenuVariantProps & {
|
|
|
92
95
|
};
|
|
93
96
|
|
|
94
97
|
/**
|
|
95
|
-
*
|
|
96
|
-
*
|
|
98
|
+
* Avatar component for displaying user or entity images with optional
|
|
99
|
+
* presence and status indicators.
|
|
97
100
|
*/
|
|
98
|
-
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
|
+
};
|
|
99
127
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
}) => 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';
|
|
106
133
|
|
|
107
134
|
/**
|
|
108
|
-
*
|
|
109
|
-
*
|
|
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)
|
|
110
141
|
*/
|
|
111
|
-
export declare
|
|
112
|
-
|
|
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 */
|
|
113
156
|
className?: string;
|
|
157
|
+
/** Content to wrap with the badge */
|
|
114
158
|
children?: React_2.ReactNode;
|
|
115
159
|
};
|
|
116
160
|
|
|
@@ -172,6 +216,7 @@ export declare type ButtonProps<E extends React_2.ElementType = 'button'> = Reac
|
|
|
172
216
|
disabled?: boolean;
|
|
173
217
|
iconBefore?: IconNamesList;
|
|
174
218
|
iconAfter?: IconNamesList;
|
|
219
|
+
gap?: NumericSizeToken;
|
|
175
220
|
};
|
|
176
221
|
|
|
177
222
|
export declare const Card: React.FC<CardProps>;
|
|
@@ -227,9 +272,33 @@ export declare type CheckboxProps = {
|
|
|
227
272
|
|
|
228
273
|
export declare const Chip: React.FC<ChipProps>;
|
|
229
274
|
|
|
230
|
-
export declare
|
|
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'> & {
|
|
231
290
|
children: string | ReactNode;
|
|
232
|
-
|
|
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;
|
|
233
302
|
};
|
|
234
303
|
|
|
235
304
|
export declare const Code: React.FC<CodeProps>;
|